0xPolygonZero / eth-trie-tools

Various debugging tools for working with tries for `eth_trie_utils`.
1 stars 2 forks source link

Trie stats, query params, and better usage docs #10

Closed BGluth closed 3 months ago

BGluth commented 3 months ago

For the longest time, trie_stats was living in it's own branch because the changes that it needed upstream was not merged into a crates.io version. Now that a version is published that has these fixes, we can merge trie_stats into main.

The logic for trie queries has always supported different ways to configure the trie output, but it was never accessible by the user. This PR adds prog args that set these.

Also added docs on what format the tries are expected to be in. I really wanted to avoid duplicating this doc 5 times across three binaries, so I ended up settling for using after_about to reuse a long shared common piece of help info. Note that I didn't really want to place this above a single argument since 2/3 of the binaries use this argument twice, which would add a lot of noise to the help page. Ideally, it would be nice to document an argument type and not just an argument, but I don't see this feature at all in clap.

BGluth commented 3 months ago

@Nashtare Not sure how this happened, but a bunch of my changes for query params somehow didn't get into the PR. Added them now, and it should be a quick review.