* Add history trees for each height in non-fin state * Refactor formatting * Pass the treestate to the finalized state I created a new structure `FinalizedBlockWithTrees` that wraps the treestate and the finalized block. I did that because the original `FinalizedBlock` is `Eq`, but `HistoryTree` can't be `Eq`. This makes Zebra faster because: 1. The finalized state doesn't retrieve the treestate from the disk if the non-finalized state supplies it. 2.The finalized state doesn't recompute the treestate if the non-finalized state supplies it. * Check block commitment before updating hist tree * Store Sprout commitment trees in non-fin state * Send trees for the root block to fin-state When committing a block and sending the treestate from the non-finalized state to the finalized state, Zebra was sending trees that correspond to the tip block instead of trees that correspond to the root block of the best chain. This commit fixes that. * Refactor doc comments * Refactor block finalization Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| proptest-regressions/service | ||
| src | ||
| tests | ||
| Cargo.toml | ||