Go to file
Henry de Valence 16cc095484
RFC: state updates (#902)
* wip

Co-authored-by: Jane Lusby <jlusby42@gmail.com>

* wip2: add nullifiers

Co-authored-by: Jane Lusby <jlusby42@gmail.com>

* Update book/src/dev/rfcs/0003-state-updates.md

Co-authored-by: teor <teor@riseup.net>

* Move to RFC number 5

* rfc: add PR link to state update RFC

* rfc: change state RFC to store blocks by height.

The rationale for this change is described in the document: it means
that we write blocks only to one end of the Sled tree, and hopefully
helps us with spatial access patterns.

This should help alleviate a major cause of memory use in Zebra's
current WIP Sled structure, which is that:

- blocks are stored in random, sparse order (by hash) in the B-tree;
- the `Request::GetDepth` method opens the entire block store and
  queries a random part of its block data to determine whether a hash is
  present;
- if present, it deserializes the complete block data of both the given
  block and the current tip block, to compute the difference in block
  heights.

This access pattern forces a large amount of B-tree data to remain
resident, and could probably be avoided if we didn't do that.

* rfc: add sprout and sapling anchors to sled trees.

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>

* rfc: fill in details of state service requests.

* rfc: extract commit process from API description

* rfc: add anchor parameters to CommitBlock.

These have to be computed by a verifier, so passing them as parameters
means we don't recompute them.

* WIP for in memory state structs

* tweeks from end of session with henry

* more updates from pairing

* rewrite non-finalized state sections

* update query instructions for each request

* more updates

* updates from pairing with henry

* updates from proofreading solo

* add guide level explanation to state rfc

* add drawbacks section

* Update book/src/dev/rfcs/0005-state-updates.md

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

* Apply suggestions from code review

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

* Update book/src/dev/rfcs/0005-state-updates.md

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

* apply changes from code review

* clarify iteration

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* apply changes from code review

* Update book/src/dev/rfcs/0005-state-updates.md

Co-authored-by: teor <teor@riseup.net>

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Apply suggestions from code review

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* add info about default constructing chains when forking from finalized state

* Update book/src/dev/rfcs/0005-state-updates.md

Co-authored-by: teor <teor@riseup.net>

* move contextual verification out of Chain

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-09-21 12:05:31 -07:00
.github Run CI workflow jobs on every PR, just like Cloud Build 2020-09-10 14:26:27 -04:00
book RFC: state updates (#902) 2020-09-21 12:05:31 -07:00
design Update data-flow.md 2020-08-04 22:44:39 -07:00
tower-batch zebra-state: Add support for temporary sled databases (#939) 2020-08-31 18:32:55 +10:00
tower-fallback build(deps): bump pin-project from 0.4.22 to 0.4.23 2020-07-28 17:27:25 -04:00
zebra-chain fix comments, use i32, simplify arms 2020-09-17 16:48:21 -07:00
zebra-client Align crate versions and user-agent with NU numbers. 2020-07-24 11:46:37 -07:00
zebra-consensus Move consensus verification errors (#1070) 2020-09-21 11:54:06 -07:00
zebra-network Add a comment about the short looo 2020-09-21 09:26:39 -07:00
zebra-rpc Align crate versions and user-agent with NU numbers. 2020-07-24 11:46:37 -07:00
zebra-script build(deps): bump zcash_script from 0.1.0 to 0.1.1 2020-09-16 12:24:34 -04:00
zebra-state consensus, state: increase Buffer sizes 2020-09-21 09:26:39 -07:00
zebra-test update panic hook for zebra-test to supress confusing output (#1065) 2020-09-17 13:20:30 -07:00
zebra-utils build(deps): bump color-eyre from 0.5.2 to 0.5.3 2020-09-15 08:04:06 -04:00
zebrad zebrad: make Inbound Poll::Ready before setup. 2020-09-21 09:26:39 -07:00
.firebaserc Try building internal docs. 2020-02-10 18:12:43 -08:00
.gitignore Add .cargo to the gitignore file 2020-08-28 20:14:12 -04:00
CONTRIBUTING.md Add issue and PR templates, document RFC process 2020-08-31 00:58:50 -04:00
Cargo.lock Move consensus verification errors (#1070) 2020-09-21 11:54:06 -07:00
Cargo.toml Refactor tracing components (#834) 2020-08-06 10:29:31 -07:00
Dockerfile Explicitly pass our config to the start command 2020-09-04 01:02:32 -04:00
LICENSE-APACHE Add copyright marks on each license 2019-11-14 11:50:49 -08:00
LICENSE-MIT Add copyright marks on each license 2019-11-14 11:50:49 -08:00
README.md Reorganize the book. (#843) 2020-08-06 15:39:54 -07:00
clippy.toml Apply clippy fixes 2020-02-05 12:42:32 -08:00
cloudbuild.yaml Fix CD workflow using cloudbuild.yaml (#637) 2020-07-10 07:37:54 -04:00
codecov.yml Disable CodeCov annotations via GitHub Checks 2020-09-10 14:52:01 -04:00
firebase.json Configure redirect for firebase hosting 2020-01-16 18:38:16 -05:00
katex-header.html Add KaTeX to rendered docs. (#832) 2020-08-05 17:34:30 -07:00
prometheus.yaml Tell Prometheus to scrape more aggressively 2020-02-14 20:14:05 -05:00

README.md

Zebra logotype


codecov License

Hello! I am Zebra, an ongoing Rust implementation of a Zcash node.

Zebra is a work in progress. It is developed as a collection of zebra-* libraries implementing the different components of a Zcash node (networking, chain structures, consensus rules, etc), and a zebrad binary which uses them.

Most of our work so far has gone into zebra-network, building a new networking stack for Zcash, zebra-chain, building foundational data structures, zebra-consensus, implementing consensus rules, and zebra-state, providing chain state.

Zebra Website.

Rendered docs from the main branch.

Join us on Discord.

License

Zebra is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT.