From fffe3dc10ea65837de5a7bfae2cb670b4754e60c Mon Sep 17 00:00:00 2001 From: rootdiae Date: Wed, 15 Jan 2025 13:56:20 +0800 Subject: [PATCH 1/2] repeat words --- book/src/dev/zebra-dependencies-for-audit.md | 2 +- tower-batch-control/src/worker.rs | 2 +- zebra-chain/src/block/serialize.rs | 2 +- zebra-chain/src/history_tree/tests/vectors.rs | 2 +- zebra-chain/src/transaction/builder.rs | 2 +- zebra-consensus/src/checkpoint.rs | 2 +- zebra-rpc/src/queue.rs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/book/src/dev/zebra-dependencies-for-audit.md b/book/src/dev/zebra-dependencies-for-audit.md index f33aba321b8..7655ff275de 100644 --- a/book/src/dev/zebra-dependencies-for-audit.md +++ b/book/src/dev/zebra-dependencies-for-audit.md @@ -63,7 +63,7 @@ The following consensus, security, and functional changes are in Zebra's develop The following list of dependencies is out of scope for the audit. -Please ignore the dependency versions in these tables, some of them are are outdated. All versions of these dependencies are out of scope. +Please ignore the dependency versions in these tables, some of them are outdated. All versions of these dependencies are out of scope. The latest versions of Zebra's dependencies are in [`Cargo.lock`](https://github.com/ZcashFoundation/zebra/tree/audit-v1.0.0-rc.0/Cargo.lock), including transitive dependencies. They can be viewed using `cargo tree`. diff --git a/tower-batch-control/src/worker.rs b/tower-batch-control/src/worker.rs index f2266e67100..865a2f37009 100644 --- a/tower-batch-control/src/worker.rs +++ b/tower-batch-control/src/worker.rs @@ -323,7 +323,7 @@ where // We don't schedule any batches on an errored service self.pending_batch_timer = None; - // By closing the mpsc::Receiver, we know that that the run() loop will + // By closing the mpsc::Receiver, we know that the run() loop will // drain all pending requests. We just need to make sure that any // requests that we receive before we've exhausted the receiver receive // the error: diff --git a/zebra-chain/src/block/serialize.rs b/zebra-chain/src/block/serialize.rs index e763915e499..edb4f7afc07 100644 --- a/zebra-chain/src/block/serialize.rs +++ b/zebra-chain/src/block/serialize.rs @@ -39,7 +39,7 @@ fn check_version(version: u32) -> Result<(), &'static str> { // but this is not actually part of the consensus rules, and in fact // broken mining software created blocks that do not have version 4. // There are approximately 4,000 blocks with version 536870912; this - // is the bit-reversal of the value 4, indicating that that mining pool + // is the bit-reversal of the value 4, indicating that mining pool // reversed bit-ordering of the version field. Because the version field // was not properly validated, these blocks were added to the chain. // diff --git a/zebra-chain/src/history_tree/tests/vectors.rs b/zebra-chain/src/history_tree/tests/vectors.rs index e65da99b676..e8aeeeb447d 100644 --- a/zebra-chain/src/history_tree/tests/vectors.rs +++ b/zebra-chain/src/history_tree/tests/vectors.rs @@ -55,7 +55,7 @@ fn push_and_prune_for_network_upgrade( assert_eq!(first_commitment, ChainHistoryActivationReserved); } - // Build initial history tree tree with only the first block + // Build initial history tree with only the first block let first_sapling_root = sapling::tree::Root::try_from(**sapling_roots.get(&height).expect("test vector exists"))?; let mut tree = NonEmptyHistoryTree::from_block( diff --git a/zebra-chain/src/transaction/builder.rs b/zebra-chain/src/transaction/builder.rs index 37397353aab..bcf1570d595 100644 --- a/zebra-chain/src/transaction/builder.rs +++ b/zebra-chain/src/transaction/builder.rs @@ -26,7 +26,7 @@ impl Transaction { // > (nActionsOrchard > 0 and enableSpendsOrchard = 1). // // > A coinbase transaction for a block at block height greater than 0 MUST have - // > a script that, as its first item, encodes the block height height as follows. ... + // > a script that, as its first item, encodes the block height as follows. ... // > let heightBytes be the signed little-endian representation of height, // > using the minimum nonzero number of bytes such that the most significant byte // > is < 0x80. The length of heightBytes MUST be in the range {1 .. 5}. diff --git a/zebra-consensus/src/checkpoint.rs b/zebra-consensus/src/checkpoint.rs index 36b3a76d57f..e9fc2b616cb 100644 --- a/zebra-consensus/src/checkpoint.rs +++ b/zebra-consensus/src/checkpoint.rs @@ -1059,7 +1059,7 @@ where #[instrument(name = "checkpoint", skip(self, block))] fn call(&mut self, block: Arc) -> Self::Future { // Reset the verifier back to the state tip if requested - // (e.g. due to an error when committing a block to to the state) + // (e.g. due to an error when committing a block to the state) if let Ok(tip) = self.reset_receiver.try_recv() { self.reset_progress(tip); } diff --git a/zebra-rpc/src/queue.rs b/zebra-rpc/src/queue.rs index 4504cd2070f..78c9fdd9033 100644 --- a/zebra-rpc/src/queue.rs +++ b/zebra-rpc/src/queue.rs @@ -211,7 +211,7 @@ impl Runner { /// Remove transactions that are expired according to number of blocks and current spacing between blocks. fn remove_expired(&mut self, spacing: Duration) { - // Have some extra time to to make sure we re-submit each transaction `NUMBER_OF_BLOCKS_TO_EXPIRE` + // Have some extra time to make sure we re-submit each transaction `NUMBER_OF_BLOCKS_TO_EXPIRE` // times, as the main loop also takes some time to run. let extra_time = Duration::seconds(5); From 8034946195e65451358e199f6ee6f0f1b15cb421 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 16 Jan 2025 16:59:42 +0800 Subject: [PATCH 2/2] Update zebra-chain/src/block/serialize.rs Co-authored-by: Pili Guerra <1311133+mpguerra@users.noreply.github.com> --- zebra-chain/src/block/serialize.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra-chain/src/block/serialize.rs b/zebra-chain/src/block/serialize.rs index edb4f7afc07..e763915e499 100644 --- a/zebra-chain/src/block/serialize.rs +++ b/zebra-chain/src/block/serialize.rs @@ -39,7 +39,7 @@ fn check_version(version: u32) -> Result<(), &'static str> { // but this is not actually part of the consensus rules, and in fact // broken mining software created blocks that do not have version 4. // There are approximately 4,000 blocks with version 536870912; this - // is the bit-reversal of the value 4, indicating that mining pool + // is the bit-reversal of the value 4, indicating that that mining pool // reversed bit-ordering of the version field. Because the version field // was not properly validated, these blocks were added to the chain. //