Skip to content
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

remove all references to InsertOrdered #341

Merged
merged 1 commit into from
Apr 13, 2023
Merged

Conversation

gballet
Copy link
Member

@gballet gballet commented Apr 13, 2023

The InsertOrdered model does not work as well for the verkle conversion, as it doesn't take advantage of the per-level deserialization. This will make the process slower. It also makes things more difficult if the stateful and stateless code are to be merged: that method would have to be supported in a stateless context. Finally, it also contains a lot of duplicated code compared to Insert, which is wasteful.

This PR:

  • Removes all references to InsertOrdered;
  • In unit tests where it was used to enforce the hashing of nodes, FlushAtDepth is used. Note that the semantics of FlushAtDepth are changed to also hash leaf nodes. This would make things more expensive if we were to use it for the conversion method, but this method is falling out of favor;
  • It also improves the ToDot unit test in a stateful context.

@gballet gballet requested a review from jsign April 13, 2023 08:57
@gballet gballet merged commit 4bea276 into master Apr 13, 2023
@tokenecho
Copy link

Is there an alternative? Insert behaves differently than InsertOrdered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants