Skip to content

Commit

Permalink
Merge branch 'main' into ci-docker-timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 authored Oct 16, 2023
2 parents c914ca4 + 0507670 commit 4fc0e6e
Show file tree
Hide file tree
Showing 33 changed files with 832 additions and 256 deletions.
296 changes: 133 additions & 163 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [Getting Started](#getting-started)
- [Docker](#docker)
- [Building Zebra](#building-zebra)
- [Optional Features](#optional-features)
- [Optional Configs & Features](#optional-features)
- [Known Issues](#known-issues)
- [Future Work](#future-work)
- [Documentation](#documentation)
Expand Down Expand Up @@ -116,13 +116,24 @@ zebrad start
See the [Installing Zebra](https://zebra.zfnd.org/user/install.html) and [Running Zebra](https://zebra.zfnd.org/user/run.html)
sections in the book for more details.

#### Optional Features
#### Optional Configs & Features

##### Configuring Progress Bars

Configure `tracing.progress_bar` in your `zebrad.toml` to
[show key metrics in the terminal using progress bars](https://zfnd.org/experimental-zebra-progress-bars/).
When progress bars are active, Zebra automatically sends logs to a file.

In future releases, the `progress_bar = "summary"` config will show a few key metrics,
and the "detailed" config will show all available metrics. Please let us know which metrics are
important to you!

##### Custom Build Features

You can also build Zebra with additional [Cargo features](https://doc.rust-lang.org/cargo/reference/features.html#command-line-feature-options):

- `getblocktemplate-rpcs` for [mining support](https://zebra.zfnd.org/user/mining.html)
- `prometheus` for [Prometheus metrics](https://zebra.zfnd.org/user/metrics.html)
- `progress-bar` [experimental progress bars](https://zfnd.org/experimental-zebra-progress-bars/)
- `sentry` for [Sentry monitoring](https://zebra.zfnd.org/user/tracing.html#sentry-production-monitoring)
- `elasticsearch` for [experimental Elasticsearch support](https://zebra.zfnd.org/user/elasticsearch.html)

Expand Down
9 changes: 0 additions & 9 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ skip-tree = [
# wait for rocksdb to upgrade
{ name = "bindgen", version = "=0.65.1" },

# wait for console-subscriber to upgrade
{ name = "prost-derive", version = "=0.11.9" },

# wait for console-subscriber to upgrade
{ name = "prost-types", version = "=0.11.9" },

# wait for console-subscriber to upgrade
{ name = "tonic", version = "=0.9.2" },

# wait for tracing and many other crates to upgrade
# this duplicate dependency currently only exists in testing builds
{ name = "regex-syntax", version = "=0.6.29" },
Expand Down
2 changes: 1 addition & 1 deletion tower-batch-control/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rayon = "1.7.0"
tokio = { version = "1.33.0", features = ["time", "sync", "tracing", "macros"] }
tokio-util = "0.7.8"
tower = { version = "0.4.13", features = ["util", "buffer"] }
tracing = "0.1.37"
tracing = "0.1.39"
tracing-futures = "0.2.5"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion tower-fallback/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ categories = ["algorithms", "asynchronous"]
pin-project = "1.1.3"
tower = "0.4.13"
futures-core = "0.3.28"
tracing = "0.1.37"
tracing = "0.1.39"

[dev-dependencies]
tokio = { version = "1.33.0", features = ["full", "tracing", "test-util"] }
Expand Down
4 changes: 2 additions & 2 deletions zebra-chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ humantime = "2.1.0"
displaydoc = "0.2.4"
static_assertions = "1.1.0"
thiserror = "1.0.48"
tracing = "0.1.37"
tracing = "0.1.39"

# Serialization
hex = { version = "0.4.3", features = ["serde"] }
Expand Down Expand Up @@ -138,7 +138,7 @@ color-eyre = "0.6.2"
# Enable a feature that makes tinyvec compile much faster.
tinyvec = { version = "1.6.0", features = ["rustc_1_55"] }
spandoc = "0.2.2"
tracing = "0.1.37"
tracing = "0.1.39"

# Make the optional testing dependencies required
proptest = "1.3.1"
Expand Down
4 changes: 2 additions & 2 deletions zebra-chain/src/amount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
// TODO:
// - remove the default NegativeAllowed bound, to make consensus rule reviews easier
// - put a Constraint bound on the type generic, not just some implementations
#[derive(Clone, Copy, Serialize, Deserialize)]
#[derive(Clone, Copy, Serialize, Deserialize, Default)]
#[serde(try_from = "i64")]
#[serde(into = "i64")]
#[serde(bound = "C: Constraint + Clone")]
Expand Down Expand Up @@ -509,7 +509,7 @@ impl Constraint for NegativeAllowed {
/// 0..=MAX_MONEY,
/// );
/// ```
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Default)]
pub struct NonNegative;

impl Constraint for NonNegative {
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/orchard/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl ZcashDeserialize for Root {
}

/// A node of the Orchard Incremental Note Commitment Tree.
#[derive(Copy, Clone, Eq, PartialEq)]
#[derive(Copy, Clone, Eq, PartialEq, Default)]
pub struct Node(pallas::Base);

impl Node {
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/sapling/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl ZcashDeserialize for Root {
///
/// Note that it's handled as a byte buffer and not a point coordinate (jubjub::Fq)
/// because that's how the spec handles the MerkleCRH^Sapling function inputs and outputs.
#[derive(Copy, Clone, Eq, PartialEq)]
#[derive(Copy, Clone, Eq, PartialEq, Default)]
pub struct Node([u8; 32]);

impl AsRef<[u8; 32]> for Node {
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/value_balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod tests;
use ValueBalanceError::*;

/// An amount spread between different Zcash pools.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Default)]
pub struct ValueBalance<C> {
transparent: Amount<C>,
sprout: Amount<C>,
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ metrics = "0.21.1"
thiserror = "1.0.48"
tokio = { version = "1.33.0", features = ["time", "sync", "tracing", "rt-multi-thread"] }
tower = { version = "0.4.13", features = ["timeout", "util", "buffer"] }
tracing = "0.1.37"
tracing = "0.1.39"
tracing-futures = "0.2.5"

orchard = "0.5.0"
Expand Down
50 changes: 50 additions & 0 deletions zebra-consensus/src/checkpoint/main-checkpoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11210,3 +11210,53 @@
2237898 0000000000d828b783a0b565084948017dd54667b470e18bf7fd808e98afc438
2238298 00000000001f208cadd174f7726b1bc958bf478ec3cffa5f093c757e17281a36
2238698 000000000113210e4cfe24701b23df168d63381008d30eb87d2c833554e58055
2239098 00000000005662febe1341946f498f5d9d5dc6c39630fa750d5a6bb231b1b3be
2239498 0000000000fb27120130bb4c2721b2adeaa25bb9038606e3d93ba928fd8b3584
2239898 0000000000645790ce398fd7cc2d51244dec038eeeef9222163d332fb7f0acdc
2240298 00000000000aa7b30793674e33dc2dce26e5cdcd1fd788c11c9ae69a49fbb111
2240698 0000000000f18c1523d59120c350ae85afc1f0effb9d7ca68f36e60412262881
2241098 00000000009899cefe84a57de16725a2394ddd3d9765322bbc863afdb834fa84
2241498 00000000004bd9303ee01ccb844ecbcbc35b115bad101e9cb84cc53760e3dd25
2241898 00000000000fcd10c7cb3a60f8fc461654e9b30d8d5b0b547e7d6a886985431a
2242298 000000000036012b82075cb3994fdbaa6c4e6c137a354d0e2f7beed9022532d6
2242698 00000000018fcab0b410cf2f8578e7f28173c963707753f73dc3918d8ac33597
2243098 00000000016a59104d11603f53aa968d7efcb98c2a8f7099137790aa586d007d
2243498 00000000002a4ca2ef0df65b639ecf1d695efa06d374e3c9e17400b3a899d4a8
2243898 00000000018f5d41aadab6a95df0658bc43de8ab1f2321bdb0828d6ed90d175b
2244298 0000000001071cf163c54a45439692d66e413cdc56f267b2fbff50682552baf6
2244698 0000000000fe501883b6751ba7a1e51ca5b1f2af5675b651a35c43ca5f1dc0ae
2245098 00000000013d99facdcad44f8ab2c184ec8ea4deed4126049ddbf6b8436ba966
2245498 00000000007a81bb85f63d73d6245e1ad44c69018f0b7a5916229e5ff29396ec
2245898 00000000000daf5f830d8b912c49dd5c86e50fdb95cd678fdbc32812b910c72f
2246298 000000000081a003991eb2ef03669e00fdd020f9b1c257773d49565e89cfb929
2246698 000000000157bc4eedef772ff51727ebdbe1a416cf5f122899fad97cdb80b5f2
2247098 000000000065afd59544b99fd69aaf47b48ee0c4c46542d53bcf1d10eabd961b
2247498 000000000149a6d21161b70e2201026ab97c7b864bd6af2649b56b8a87aae66d
2247898 000000000143b94184bbff80663b71b155a412d1e4c6f705ec684064aef5532a
2248298 0000000000a440d2dfd1f3e02e85982f8885c66374cf7a408ae50b446b7a95f9
2248698 0000000000b737791ab7a870038f2a6857faf9ac3880c3f8bd7a099c4efe86c0
2249098 000000000003ba095b8fa156964270acce4695319400934d0427aa70574fc18c
2249498 00000000009af5342fda5276c7e8136010430fc7b88f12d0529053d0c1dc34a8
2249898 0000000001521367d10ac5dfabc821b36d311cdd7f3e455535693cefa44baa40
2250298 0000000001d0cc4d9cada586cbc6dbcee099381bf141cfbd9017d4d5ae494cce
2250698 0000000000b2255b80bb3e66a18e457e574aac3dbaf2d5217642985ed3d8928d
2251098 0000000001728f8f71b980897ab0f1bc6414e2a0bd1a01a9c85805b8a4246d67
2251498 00000000009c64581a5dcb6f5daeb9fc939f3f82332c227b0270a29b4131ec8c
2251898 00000000009145fb53ba0c0a0aef0203348d84c4271c824919fe30351de36513
2252298 0000000000e928e6a013d4d03cdffeab9d9e7ea5062234ec03b6ed03d35f51ed
2252698 000000000024ae8486c74f3e7eb2bfa02b50eeac23ac96cd0e36ffe9d8b0ce96
2253098 000000000042c7ff48fcc7291cbc36a97930897216959a4baf77a5c3edd2b3da
2253498 00000000003f7c72b280fdf5a14d27f924d8b46d5cbd84b73966920897540311
2253898 000000000086f805f8cd33c03bb66d2656216af0ed005b6a2fdd2ead709557a7
2254298 0000000000e63424d7f007f6dccc724fa8aad1c328b4f28fd0c2e0f8774720a8
2254698 000000000046527138e00a07325372fc078dd7306528029050c800bb30eee7b8
2255098 0000000000d59a69903fe48f8cd10801d8a3dfcad643824856925cf97715f32a
2255498 00000000010e3dee658abf231630be0fc93cc333350560ac2ab7ce3d942f2c0d
2255898 0000000000aa37a5e6feb3549b6f866b5d99567cec4f5eb8be9fc3a60d195e99
2256298 000000000161018956e2f22c64ebd1f40d5d5724dc43c0edda9de6200fd6021b
2256698 000000000017ff6d6cc047533708b7382aaac4f79373508fa25855f33ca3e138
2257098 0000000000e025ca0a42f0649940216d86ae3634b91405557b2a17dc9bbf7e8c
2257498 000000000061e5e737670a3612041e6326a74bc6bb865b221ede2fe148ace070
2257898 00000000008820c978833e535149174f965a6b3e4a6ac4b1ddc48345478ba64c
2258298 000000000100d9383f9c9ff554d473e8a276855beb6804b6b9a62f809b567a40
2258698 0000000000a91531d88040a47c0f1b8f5b16ea1833aa97affaa04d5e7fc18aed
59 changes: 59 additions & 0 deletions zebra-consensus/src/checkpoint/test-checkpoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6306,3 +6306,62 @@
2522000 0005f889589b8c25d4abe97edc6fca1f867a2df04903ca2d38d38a1d404a3c0d
2522400 001ff1664752da479f0b4657f8bc3e132da097fe5532e06183f68cf59959c967
2522800 000036ebe2e67a1c5db21fc028d2f5ea6651c61d9e03d259b51163a9bbb0cf1b
2523200 0028c4b53d0333e8c856eb723feb1d43a550ce4cdb49c01715798c44451b49a5
2523600 000e5ea0858c53d9e579650272035d2b062c94b80ad8d42a4a54fec7db1c92cc
2524000 000ba1e0a3745d05714cc9d84c8c72ce40819b82a378899394b2a21a117cb928
2524400 001177f2afbedaf47206bd6be1557a8b4b943095323953e5b567d89a7049cb47
2524800 0087c080962b0aed55a34dcdaa88f17513b54f4e609fff399810a203659405d8
2525200 00ae5fcf53d50e069e311fcce52728a360bf034e5a3a98117c4cfe7f1a3225f9
2525600 00221359c0b24c843d636b08ffe26242580bad5624adedfb58616a4716ec1fc5
2526000 001fbf2ccdde41f716066a2d6fe547036bba0b0e616bac244f54395b04369490
2526400 00665e692722e54a0adb4e38c6b2d9d032ffe97e43f4be364199be06a2c7f598
2526800 000d26a95d4021506be2b08b1b3cf580507bc30503bdd6f1217a0a537202418c
2527200 003d1aa9aa844c569a4889d2fb8fc294c8c6850686abfa07f12ed9d8940b6c86
2527600 0016f1dbafe5a61726cd1376238752f684e756fed07916db675023f5bcfc6591
2528000 001bed30a08703a5b1a98264bf48ce953e0733349fac1b223a83d30761c7a0e8
2528400 00152b454e4c97de3cb76df03811bd2bb627b69240e472afc750e0527235355a
2528800 001f8d71cc39da83900ba7db716099fb9963a21ec1ce74eeddfbb4920858052a
2529200 001574302f3ef2968b97391a025c0c178b62f5381e8cedcc3e728a78657790bc
2529600 002dc58bb40d57724d4497c73b651189e6679fbfa57560ba75a84b178a8fa99c
2530000 000d90ebe86cd1b15080ad419d5a59a13035dfffaa9e3e0f6016e44faff164db
2530400 001220b459188e9ff99a230b1ff87a32ed39e4baabc5dd3f99ab0967a1982a0f
2530800 001b79e826bc9c24c19c25abdc963da520859ed67c1e4787cfea1e915ffab835
2531200 0015b035801bb9846cc2554c97ac726d3738f3be59dc4ce7d49e020f98103bb8
2531600 000815786b2a3aab5ce13a67be5d038e060de43804016b9a1f2bacc5c098694e
2532000 0001e47dde90fd6f2868652068170b727c1e422b311ae60cc770655728af6b12
2532400 0018c05b120af179f4b9476f866b908049eb74f3fcaa0fc6b636d2dbc7049f01
2532800 00397dc0c12ec82cf7074815e187b0840f40b0a028782f28dc40da689a103a20
2533200 00892c1c2bfa29d94c15b666fc4f0db6d1e3f97e9cd63df656996ef5947ceab9
2533600 000c0703db639039fade3a641832a587be391a0c98ed57f61f222f9750501e44
2534000 000fafb4b3abb9db1414291b7ceb42fde471cb1d595042cdb770280a195f8667
2534400 0037f3f98539e0c6a259cc66f90779c105b217fc7d9aa5251c458353751797d6
2534800 000920c9b1170ee274a7cada6d58e25b076e9b3b4e615fee462729b04184e65a
2535200 0029dac81f58f49a814e68ab87abde862eb34bc06a2dbb6910e9523476ab775b
2535600 0027ea1f5a7b07cfd83d554b202d9796b0bb37cfc19ae118ed1f2362e24028d4
2536000 00088288e1323f66e3f5b31cca66908d2ebbbb1660def0fafda2d31080cd05f6
2536400 0003895374a5e5e65b30e281267c22cdd5663cdeed83199e5641e0be76ca1cfc
2536800 000169dd5e51b4abbe196e584765e97a2f72b1afbb8cd6117214d66fd04193ac
2537200 004331e57869225dd41d7d13efb16048c7098638262ff9e139c349fdf4219e1e
2537600 00045b97eced9319e929824f9bea56c571a77d3b104e6b3c44ab41812426e540
2538000 0037bb8156d3ee43ff0dc54d9a169c47c7fbed2f12048e470fd7efbe40db6754
2538400 002ad8f8d3845963bdcc10d40c63e31cb3b341c9f4538146889475e39ffd1ea9
2538800 000983cfdebb96b6338d57603afd55d233fe16078743b21c9960ec66ffece45c
2539200 0015604f16dde84d9466c1ddb3ea7390c37bb7d070320f50ceff3927e84ab850
2539600 0019335125c2ade7ad3ce3e7394bbb13951df7b9f873821efccc49a7e08e0bec
2540000 0010c1345d4412a8367aec519bee8d566053cab59109c333201ce35eefe9dd21
2540400 0002a4795e1e927f7b5ab6f355737557613d5269c52e25e523691167930fb35f
2540800 000bd4153715bbe7ba1118d4314461850adc16ad2cb12a0e99fcce22b462f3bc
2541200 00028d6ab82bd6bfe3b4d351e33fc500342548f05e9d00a26f46e146103bb23a
2541600 000a0786992577c16735b8f4bd3aca629582e3a02b7d5686457c1196a73e9b03
2542000 0013052546b09cba64ea3a4e119047d96c4cd7a6e043eb0f43f1cf1704585586
2542400 001fbc9e2686653ae5e6b673cd438fd3fb88acbc0b01e6fc7d7738f3e86cb314
2542800 0017f5fe146be4bb9eb00b91a1e3ad3cc80bd14abf262540b279cb10c291fc90
2543200 001de3b190b8359667564d37ec81193c081ed66fb3380710bfd404edc901307d
2543600 000b26694e9241f10b71b95a118531cefa1d78a010e1077bb484aa1687d29e1b
2544000 0014ebfa07905683441b84289cee9ddd2f23f2f1fb23a02ffb4f4c937829e7a3
2544400 000b8ad313960c5276e49ca99d3d799fd20486aa23c1e7c3fd29707b1d59db61
2544800 003566e38a998f15fd07fbb8bdaec4e74947a1f932ad54dd76208925baae6e4a
2545200 0008c02621c639ccd6ec96ed8910a01b57cfecbdd853b58d774d21b07d98b21f
2545600 000922846ef68b656beee14815e999df2dd44625fdaa9fca703354db588d1b5a
2546000 0008416c201ea4c6694b57a7571c4a38b4bccbe07a445d36d301d2d4d286a361
2546400 000d9091cc81528757991f79e116b4de846d76d4a04028358ba19a65e5acc480
2 changes: 1 addition & 1 deletion zebra-network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ tower = { version = "0.4.13", features = ["retry", "discover", "load", "load-she
metrics = "0.21.1"
tracing-futures = "0.2.5"
tracing-error = { version = "0.2.0", features = ["traced-error"] }
tracing = "0.1.37"
tracing = "0.1.39"

# prod feature progress-bar
howudoin = { version = "0.1.2", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion zebra-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ indexmap = { version = "2.0.1", features = ["serde"] }
tokio = { version = "1.33.0", features = ["time", "rt-multi-thread", "macros", "tracing"] }
tower = "0.4.13"

tracing = "0.1.37"
tracing = "0.1.39"

hex = { version = "0.4.3", features = ["serde"] }
serde = { version = "1.0.188", features = ["serde_derive"] }
Expand Down
8 changes: 2 additions & 6 deletions zebra-rpc/src/methods/tests/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ async fn test_mocked_rpc_response_data_for_network(network: Network) {

// Mock the data for the response.
let mut subtrees = BTreeMap::new();
let subtree_root = [0u8; 32].as_slice().try_into().expect(
"The array [0u8; 32] should be convertible to a Sapling note commitment tree node.",
);
let subtree_root = sapling::tree::Node::default();

for i in 0..2u16 {
let subtree = NoteCommitmentSubtreeData::new(Height(i.into()), subtree_root);
Expand Down Expand Up @@ -377,9 +375,7 @@ async fn test_mocked_rpc_response_data_for_network(network: Network) {

// Mock the data for the response.
let mut subtrees = BTreeMap::new();
let subtree_root = [0u8; 32].try_into().expect(
"The array [0u8; 32] should be convertible to a Sapling note commitment tree node.",
);
let subtree_root = orchard::tree::Node::default();

for i in 0..2u16 {
let subtree = NoteCommitmentSubtreeData::new(Height(i.into()), subtree_root);
Expand Down
2 changes: 1 addition & 1 deletion zebra-state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ thiserror = "1.0.48"
rayon = "1.7.0"
tokio = { version = "1.33.0", features = ["rt-multi-thread", "sync", "tracing"] }
tower = { version = "0.4.13", features = ["buffer", "util"] }
tracing = "0.1.37"
tracing = "0.1.39"

# elasticsearch specific dependencies.
# Security: avoid default dependency on openssl
Expand Down
2 changes: 1 addition & 1 deletion zebra-state/src/service/finalized_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub use disk_format::{OutputIndex, OutputLocation, TransactionLocation, MAX_ON_D

pub(super) use zebra_db::ZebraDb;

use disk_db::DiskWriteBatch;
pub(super) use disk_db::DiskWriteBatch;

/// The finalized part of the chain state, stored in the db.
///
Expand Down
16 changes: 14 additions & 2 deletions zebra-state/src/service/finalized_state/zebra_db/shielded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ impl ZebraDb {
.collect();
}

// Make sure the amount of retrieved subtrees does not exceed the given limit.
#[cfg(debug_assertions)]
if let Some(limit) = limit {
assert!(list.len() <= limit.0.into());
}

// Check that we got the start subtree.
if list.get(&start_index).is_some() {
list
Expand Down Expand Up @@ -462,6 +468,12 @@ impl ZebraDb {
.collect();
}

// Make sure the amount of retrieved subtrees does not exceed the given limit.
#[cfg(debug_assertions)]
if let Some(limit) = limit {
assert!(list.len() <= limit.0.into());
}

// Check that we got the start subtree.
if list.get(&start_index).is_some() {
list
Expand Down Expand Up @@ -645,7 +657,7 @@ impl DiskWriteBatch {

// Sapling tree methods

/// Inserts the Sapling note commitment subtree.
/// Inserts the Sapling note commitment subtree into the batch.
pub fn insert_sapling_subtree(
&mut self,
zebra_db: &ZebraDb,
Expand Down Expand Up @@ -698,7 +710,7 @@ impl DiskWriteBatch {

// Orchard tree methods

/// Inserts the Orchard note commitment subtree.
/// Inserts the Orchard note commitment subtree into the batch.
pub fn insert_orchard_subtree(
&mut self,
zebra_db: &ZebraDb,
Expand Down
Loading

0 comments on commit 4fc0e6e

Please sign in to comment.