Add RFC for State Pruning#8
Conversation
This RFC describes State Pruning, a necessary feature for long-term stability of the Sawtooth platform. It is a method for controlling growth of the state database by providing a mechanism for pruning older state roots in the Merkle-Radix state database. Signed-off-by: Peter Schwarz <pschwarz@bitwise.io>
Signed-off-by: Peter Schwarz <pschwarz@bitwise.io>
text/0008-state-pruning.md
Outdated
|
|
||
| Along side the serialized node, a change log for a particular state root is | ||
| stored. This change log includes the keys of values that are added, and keys of | ||
| deleted values by replaced by future state roots. The change log is written to |
There was a problem hiding this comment.
"This change log includes the keys of values that are added, and keys of deleted values by replaced by future state roots." Im sure what you mean by "by replace by future state roots", is this a typo?
text/0008-state-pruning.md
Outdated
| Ethereum Geth has also discussed the use of state pruning for their Merkle trie | ||
| implemenation. It has not yet implemented this for its disk-based storage, but | ||
| it has implemented reference counting for its in-memory storage of the trie. See | ||
| this [blog post](https://blog.ethereum.org/2015/06/26/state-trie-pruning/) for |
There was a problem hiding this comment.
This link does not work. I get a "Page not found"
|
|
||
| ## Configuration | ||
|
|
||
| Maximum block depth is a local configuration option. It is set via the command |
There was a problem hiding this comment.
Will this be added to the validator.toml file as well? or only on the command line?
There was a problem hiding this comment.
Added some text for this.
- Addressed some typos. - Added a reference to the local configuration in the toml configuration, as well as CLI arguments. Signed-off-by: Peter Schwarz <pschwarz@bitwise.io>
text/0008-state-pruning.md
Outdated
|
|
||
| Along side the serialized node, a change log for a particular state root is | ||
| stored. This change log includes the keys of values that are added, and keys of | ||
| deleted values by replaced by future state roots. The change log is written to |
There was a problem hiding this comment.
typo? "...by replaced by..."
danintel
left a comment
There was a problem hiding this comment.
A valuable feature--I am frequently asked about handling long-term blockchain growth and this will be useful.
There's some spelling errors that should be fixed.
| around when to switch from the pre-compacted to the post-compacted database. | ||
|
|
||
| See the | ||
| [documenation](http://www.lmdb.tech/doc/group__mdb.html#ga3bf50d7793b36aaddf6b481a44e24244) |
| [prior-art]: #prior-art | ||
|
|
||
| Ethereum Geth has also discussed the use of state pruning for their Merkle trie | ||
| implemenation. It has not yet implemented this for its disk-based storage, but |
| end of the copy, switch the reference to the underlying database for use in | ||
| normal operation and discard the old database. | ||
|
|
||
| This particular solution is simple in it's implementation, and requires no |
This RFC describes State Pruning, a necessary feature for long-term
stability of the Sawtooth platform. It is a method for controlling
growth of the state database by providing a mechanism for pruning older
state roots in the Merkle-Radix state database.
Signed-off-by: Peter Schwarz pschwarz@bitwise.io