3
1
Fork
You've already forked python-eris
0

Update to 0.4.0-dev spec #1

Closed
emery wants to merge 2 commits from erisx3 into main
pull from: erisx3
merge into: eris:main
eris:main
eris:pages
eris:spec-version-0.4.0
Owner
Copy link
No description provided.
Author
Owner
Copy link

I just heard back from the hashfs users that they are migrating away from hashfs. :|

I just heard back from the hashfs users that they are migrating away from hashfs. :|

Oops, sorry for closing. Clicked the wrong button by mistake.

Oops, sorry for closing. Clicked the wrong button by mistake.

Some more changes coming to 0.4.0 so I suggest keeping this open until 0.4.0 drops.

Some more changes coming to 0.4.0 so I suggest keeping this open until 0.4.0 drops.

Just saw that python-eris now has two implementations of the encoding! :)

Just saw that python-eris now has two implementations of the encoding! :)

Pushed another update of the implementation at eris/encode.py: 484f0d55d7

Working on a decoder now.

Pushed another update of the implementation at eris/encode.py: https://codeberg.org/eris/python-eris/commit/484f0d55d7230a5c5ecd6df56dd84302d797a79d Working on a decoder now.

I've moved the hashlib interface to eris/encode.py: a5bd0d2a80, added one more change from erisx3 and merged to main.

I'm sorry to have dropped your very neat implementation in hashlib_extension.py for the more verbose one in eris/encode.py. For anybody interested, it's very concise (less than 100 lines of code) and re-uses the first part of the buffer for constructing internal nodes: https://codeberg.org/eris/python-eris/src/branch/erisx3/eris/hashlib_extension.py. I don't think the re-use of the buffer improves performance in Python, as Python bytes are immutable. But it's a neat trick that should be used in a C (and C-esque languages) implementation.

Since hashfs users are migrating away from hashfs I've also droped the hashfs tests.

I've moved the hashlib interface to eris/encode.py: https://codeberg.org/eris/python-eris/commit/a5bd0d2a80d483f85edf6544f8ba5c321e17dcfb, added one more change from erisx3 and merged to main. I'm sorry to have dropped your very neat implementation in `hashlib_extension.py` for the more verbose one in `eris/encode.py`. For anybody interested, it's very concise (less than 100 lines of code) and re-uses the first part of the buffer for constructing internal nodes: https://codeberg.org/eris/python-eris/src/branch/erisx3/eris/hashlib_extension.py. I don't think the re-use of the buffer improves performance in Python, as Python bytes are immutable. But it's a neat trick that should be used in a C (and C-esque languages) implementation. Since hashfs users are migrating away from hashfs I've also droped the hashfs tests.
Author
Owner
Copy link

Deduping the encoders is fine by me, that method came from the Squeak implementation and now it's the one I'm able to keep in my mind. I did have difficulty working with Python buffers so I can imagine it's not ideal.

If that is the most compact algorithm we can find then I can describe it in the spec, either as pseudocode or in an appendix.

Deduping the encoders is fine by me, that method came from the Squeak implementation and now it's the one I'm able to keep in my mind. I did have difficulty working with Python buffers so I can imagine it's not ideal. If that is the most compact algorithm we can find then I can describe it in the spec, either as pseudocode or in an appendix.

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eris/python-eris!1
Reference in a new issue
eris/python-eris
No description provided.
Delete branch "erisx3"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?