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

Add in trie dumping logic between txns #106

Closed
BGluth opened this issue Mar 13, 2024 · 4 comments
Closed

Add in trie dumping logic between txns #106

BGluth opened this issue Mar 13, 2024 · 4 comments
Labels
crate: trace_decoder Anything related to the trace_decoder crate. enhancement New feature or request

Comments

@BGluth
Copy link
Member

BGluth commented Mar 13, 2024

I currently have some logic that I hacked in to dump all tries before and after txns. It's been useful enough times that I think we should probably get this back into main that is enabled with a prog arg or a feature flag.

@BGluth BGluth added enhancement New feature or request crate: trace_decoder Anything related to the trace_decoder crate. labels Mar 13, 2024
@BGluth BGluth self-assigned this Mar 13, 2024
@vgnom vgnom added this to the Type 1 - Q1 2024 milestone Mar 14, 2024
@Nashtare
Copy link
Collaborator

Nashtare commented Apr 1, 2024

Will you want to dump absolutely all tries or select them with some mechanism? IIRC this was taking a gigantic amount of space for real blocks, with all the storage tries stored to disk, so maybe there's a good middle ground that's still useful for debugging?

@vgnom vgnom assigned temaniarpit27 and unassigned BGluth Apr 9, 2024
@BGluth
Copy link
Member Author

BGluth commented Apr 9, 2024

That is a fair point, as this did produce ~1 mil files per block and take a large amount of GBs.

We can trim this safely easily though. Right now we're printing out all full tries every single txn, even if there's no trie mutation. While this can be useful (sometimes), we probably only need to do this at the start of the block. We could even maybe have a setting of how much we want to record about the tries (eg. only tries that mutated), as most of the time we only care about tries that change.

BGluth pushed a commit that referenced this issue Jun 17, 2024
* fix: discard intermediary proofs

* fix: write intermediate proofs on creation

* fix: return list of blocks proved

* fix: remove files

* fix: comment

* fix: reviews

* fix: rename jerigon params to proof params

* fix: error

* fix: refactor

* fix: comment
@temaniarpit27 temaniarpit27 removed their assignment Jun 25, 2024
@Nashtare
Copy link
Collaborator

@BGluth Rather than dumping thousand of tries, I've proposed an alternative approach to automatically track discrepancies in state trie and possibly storage tries in #415. I think we have everything needed to do it, assuming we have some debug API of the decoder that exposes pre/post tries, as opposed to just pre tries as it currently does.

@Nashtare
Copy link
Collaborator

Closing as we will favor the approaches discussed in the debugging tools related discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: trace_decoder Anything related to the trace_decoder crate. enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

4 participants