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

[WIP] Convert rvgo's memory implementation to radix trie #6

Closed
wants to merge 10 commits into from

Conversation

mininny
Copy link
Member

@mininny mininny commented Aug 25, 2024

No description provided.

Copy link

codecov bot commented Aug 25, 2024

Codecov Report

Attention: Patch coverage is 86.04651% with 36 lines in your changes missing coverage. Please review.

Project coverage is 73.08%. Comparing base (636210a) to head (89460e6).

Files with missing lines Patch % Lines
rvgo/fast/radix.go 87.98% 15 Missing and 13 partials ⚠️
rvgo/fast/page.go 55.55% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master       #6      +/-   ##
==========================================
+ Coverage   72.30%   73.08%   +0.77%     
==========================================
  Files          16       17       +1     
  Lines        2723     2913     +190     
==========================================
+ Hits         1969     2129     +160     
- Misses        670      689      +19     
- Partials       84       95      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mininny mininny force-pushed the feature/mininny/rvgo-radix-memory branch 2 times, most recently from 123e78b to a9204b4 Compare September 16, 2024 17:27
@mininny mininny force-pushed the feature/mininny/rvgo-radix-memory branch 2 times, most recently from a44e2be to 65c35f2 Compare September 18, 2024 20:22
@mininny mininny force-pushed the feature/mininny/rvgo-radix-memory branch from 65c35f2 to 4b88e18 Compare September 18, 2024 20:26
@mininny mininny force-pushed the feature/mininny/rvgo-radix-memory branch from a1ff36e to 89460e6 Compare September 19, 2024 16:56
// InvalidateNode invalidates the hash cache along the path to the specified address.
InvalidateNode(addr uint64)
// GenerateProof generates the Merkle proof for the given address.
GenerateProof(addr uint64) [][32]byte

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add a slice as argument, to append the result to, and then return the updated slice header. Then you can allocate a slice with the capacity of the expected proof size once, and write to that in each proof level, to prevent allocations.

@mininny
Copy link
Member Author

mininny commented Oct 3, 2024

Closing in favor of ethereum-optimism#83

@mininny mininny closed this Oct 3, 2024
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.

2 participants