Go to file
Henry de Valence 44b299d15c Parse block heights in coinbase transactions.
BIP34, which is included in Zcash, encodes the block height into each
block by adding it into the unused BitcoinScript field of the block's
coinbase transaction.  However, this is done just by requiring that the
script pushes the block height onto the stack when it executes, and
there are multiple different ways to push data onto the stack in
BitcoinScript.  Also, the genesis block does not include the block
height, by accident.

Because we want to *parse* transactions into an algebraic data type that
encodes their structural properties, rather than allow possibly-invalid
data to float through the internals of our node, we want to extract the
block height upfront and store it separately from the rest of the
coinbase data, which is inert.  So the serialization code now contains
just enough logic to parse BitcoinScript-encoded block heights, and
special-case the encoding of the genesis block.

Elsewhere in the source code, the `LockTime` struct requires that we
must use block heights less than 500,000,000 (above which the number is
interpreted as a unix timestamp, not a height).  To unify invariants, we
ensure that the parsing logic works with block heights up to
500,000,000, even though these are unlikely to ever be used for Zcash.
2020-02-14 18:23:41 -05:00
.github/workflows Try building internal docs. 2020-02-10 18:12:43 -08:00
design Update zebra-network Monodraw diagram. 2019-10-24 15:06:02 -07:00
zebra-chain Parse block heights in coinbase transactions. 2020-02-14 18:23:41 -05:00
zebra-client Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebra-consensus Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebra-network Add basic retry policies to zebra-network. 2020-02-11 15:23:19 -05:00
zebra-rpc Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebra-script Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebra-storage Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebrad Update zebrad docs and README. 2020-02-12 12:50:55 -08:00
.firebaserc Try building internal docs. 2020-02-10 18:12:43 -08:00
.gitignore Update .gitignore 2020-02-04 18:04:53 -05:00
.rustfmt.toml Tracing endpoint (#3) 2019-09-09 13:05:42 -07:00
Cargo.lock Bump tracing-futures from 0.2.1 to 0.2.2 2020-02-14 17:48:44 -05:00
Cargo.toml Upgrade tokio, futures, hyper to released versions. 2019-12-13 17:42:15 -05:00
Dockerfile Try debian:buster-slim instead of alpine 2020-01-30 13:39:13 -05: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 Update zebrad docs and README. 2020-02-12 12:50:55 -08:00
clippy.toml Apply clippy fixes 2020-02-05 12:42:32 -08:00
cloudbuild.yaml 0.17.0 has an old version cached, rolling back to 0.15.0 2020-02-04 04:44:38 -05:00
firebase.json Configure redirect for firebase hosting 2020-01-16 18:38:16 -05:00

README.md

zebra 🦓

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, and zebra-chain, building foundational data structures.

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.