update readme

This commit is contained in:
Ian Norden 2020-06-26 13:11:49 -05:00
parent b82b8f5139
commit 18ba50ad67

View File

@ -2,14 +2,33 @@
Uses [pg-ipfs-ethdb](https://github.com/vulcanize/pg-ipfs-ethdb) to validate completeness of Ethereum state data on PG-IPFS
## Background
State data on Ethereum is stored in the form of [Modified Merkle Patricia Tries](https://eth.wiki/en/fundamentals/patricia-tree).
To prove the existence of a specific node in an MMPT with a known root hash, one provides a list of all of the nodes along the path descending
from the root node to the node in question. To validate the completeness of a state database- to confirm every node for a state and/or storage trie(s) is present
in a database- requires traversing the entire trie (or linked set of tries) and confirming the presence of every node in the database.
## Usage
Run
`./eth-ipfs-state-validator validateTrie --root={state root string} --config={path to .toml config file} `
`full` validates completeness of the entire state corresponding to a provided state root, including both state and storage tries
With `root` as the state root hash we want to validate the corresponding trie for.
The config file holds the parameters for connecting to the IPFS-backing Postgres database.
`./eth-ipfs-state-validator validateTrie --config={path to db config} --type=full --state-root={state root hex string}`
`state` validates completeness of the state trie corresponding to a provided state root, excluding the storage tries
`./eth-ipfs-state-validator validateTrie --config={path to db config} --type=state --state-root={state root hex string}`
`storage` validates completeness of only the storage trie corresponding to a provided storage root and contract address
`./eth-ipfs-state-validator validateTrie --config={path to db config} --type=storage --storage-root={state root hex string} --address={contract address hex string}`
The config file holds the parameters for connecting to an [IPFS-backing Postgres database](https://github.com/ipfs/go-ds-sql).
```toml
[database]
@ -19,3 +38,16 @@ The config file holds the parameters for connecting to the IPFS-backing Postgres
password = ""
port = 5432
```
## Maintainers
@vulcanize
@AFDudley
@i-norden
## Contributing
Contributions are welcome!
VulcanizeDB follows the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct).
## License
[AGPL-3.0](LICENSE) © Vulcanize Inc