Commit Graph

7 Commits

Author SHA1 Message Date
Jane Lusby bb0553fab6
implement initial persistent state backend based on `sled` (#473) 2020-06-15 14:41:26 -07:00
teor 334329f38a state: Move block header hashing to block_index
Only hash block headers in the lowest-level block index code.

This design has a few benefits:
  - failures are obvious, because the hash is not available,
  - get_tip() returns a smaller object,
  - we avoid re-hashing block headers multiple times.

These efficiency changes may be needed to support chain reorganisations,
multiple tips, and heavy query loads.
2020-06-12 09:46:18 -07:00
teor 26a58b23de state: Make Response::Added return the block header hash
Move block header hashing from zebra-consensus to zebra-state.
Handle zebra-state AddBlock errors in zebra-consensus BlockVerifier.
Add unit tests for BlockVerifier state error handling.

Part of #428.
2020-06-12 09:46:18 -07:00
teor 8072d5b7e8 state: Add an Error type alias to ZebraState 2020-06-12 09:46:18 -07:00
Jane Lusby ac76d75813
Make blocks queryable by height (#422) 2020-06-04 10:17:49 -07:00
dependabot-preview[bot] 07b7c711fb Bump color-eyre from 0.3.2 to 0.3.4
Bumps [color-eyre](https://github.com/yaahc/color-eyre) from 0.3.2 to 0.3.4.
- [Release notes](https://github.com/yaahc/color-eyre/releases)
- [Commits](https://github.com/yaahc/color-eyre/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-02 22:55:02 -04:00
Jane Lusby e9af80b875
Add initial version of zebra-state (#414)
* rename zebra-storage to zebra-state

* Setup initial skeleton for zebra-state

* add test

* Apply suggestions from code review

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>

* move shared test vectors to a common crate

Co-authored-by: Jane Lusby <jane@zfnd.org>
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2020-06-02 16:16:17 -07:00