-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite in-memory Merkle tree #2700
Conversation
Review commit-by-commit to see the progression, and observe that the new code is equivalent. |
Or review the whole thing, it can be clearer. |
@AlCutter @mhutchinson I noticed that this code hasn't been moved to |
42b2800
to
86264bf
Compare
86264bf
to
61d18af
Compare
ping |
Between being ill and oncall, I'm unlikely to get to this in the next few days. And I'm off next week. This is one for @AlCutter |
Expect the clients giving correct tree sizes, otherwise panic.
@AlCutter I made a few more simplifications. It's strictly more convenient to review the latest state of the code. You may look at individual commits mainly to understand my "thinking process". |
The code for
internal/merkle/inmemory
is old and needs a refresh. This change rewritesthe in-memory Merkle tree concisely, and updates all the call sites.
The previous implementation quoted C++ code, used a lot of non-Go constructs, and did
not have the benefit of reusing other Merkle primitives. All of these are good reasons for a
complete rewrite.