Commands should be called from the /cli folder for an existing database.
To print a single page of a database:
cargo run print -d <path to database> [-p <page_id of page to print>] [-o <output path>]
To print the whole database, omit the page_id:
cargo run print -d <path to database> [-o <output path>]
cargo run trie-value -d <path to database> -i <node identifier> [-v <verbose options>]
Node identifier must be in one of these formats:
- Address (<0x40 hex chars>)
- Address hash (<0x64 hex chars>)
- Address hash + storage hash (<0x128 hex chars>)
- Address with storage slot, space separated (<0x40 hex chars> )
Verbose options vary the level of information written to file:
- None: only the account/storage node information
- Verbose (-v): Node information for every node accessed along path to specified node
- Extra Verbose (-vv): Information for each page accessed followed by information for each node accessed from that page along path to specified node
Prints the state root, root subtrie page ID, and orphaned pages list.
cargo run root-page -d <path to database> [-o <output path>]
cargo run statistics -d <path to database> [-o <output path>]
Current stats, all presented with minimum, maximum, and mean:
- Nodes per page
- Bytes per page
- Depth of trie in nodes
- Depth of trie in pages
- Path prefix length
- Number of children per branch
- Node size in bytes
Traverses the trie starting at both root pages, determines which pages are reachable, and flags any unreachable pages or orphaned reachable pages.
cargo run consistency-check -d <path to database> [-o <output path>]