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

[Execution state] complete ledger - make the regCount metric smarter #1748

Closed
ramtinms opened this issue Dec 9, 2021 · 2 comments · Fixed by #2126
Closed

[Execution state] complete ledger - make the regCount metric smarter #1748

ramtinms opened this issue Dec 9, 2021 · 2 comments · Fixed by #2126

Comments

@ramtinms
Copy link
Contributor

ramtinms commented Dec 9, 2021

Currently, each node holds a uint64 for the regCount and a uint16 for a maxDepth. The first one captures the number of registers s and the second one captures the maximum depth under that subtree. The register counts can be computed and kept on trie level instead of each node keeping that info. This is possible by knowing which values are adding new and which registers are being updated.

By keeping this data on trie level we can save a lot of memory space. Note that the checkpointer has to also be updated to not lose the counts after recovery.

@Ullaakut
Copy link

I can get started on this whenever you want, I think it is pretty straight-forward and has a lot of similarity with #1747. Those two could be tackled first.

@Ullaakut
Copy link

The same comment applies as #1747 (comment).

Currently, adding an attribute to the trie that gets updated during update calls will require some changes in the design of the update function and even perhaps of the trie itself if we want to attach update to it as a method.

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