Skip to content

fix(consensus): Avoid a concurrency bug when verifying transactions in blocks that are already present in the mempool #2273

fix(consensus): Avoid a concurrency bug when verifying transactions in blocks that are already present in the mempool

fix(consensus): Avoid a concurrency bug when verifying transactions in blocks that are already present in the mempool #2273

Triggered via pull request January 14, 2025 17:49
Status Failure
Total duration 7m 43s
Billable time 25m
Artifacts

ci-build-crates.yml

on: pull_request
Generate crates matrix
15s
Generate crates matrix
Check crates matrix
3s
Check crates matrix
Matrix: build
Open or update issues for building crates individually failures
0s
Open or update issues for building crates individually failures
Fit to window
Zoom out
Zoom in

Annotations

21 errors and 2 warnings
needless call to `as_bytes()`: zebra-network/src/protocol/external/codec.rs#L262
error: needless call to `as_bytes()` --> zebra-network/src/protocol/external/codec.rs:262:20 | 262 | if reason.as_bytes().len() > MAX_REJECT_REASON_LENGTH { | ^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `reason.len()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes
needless call to `as_bytes()`: zebra-network/src/protocol/external/codec.rs#L251
error: needless call to `as_bytes()` --> zebra-network/src/protocol/external/codec.rs:251:20 | 251 | if message.as_bytes().len() > MAX_REJECT_MESSAGE_LENGTH { | ^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `message.len()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes
needless call to `as_bytes()`: zebra-network/src/protocol/external/codec.rs#L227
error: needless call to `as_bytes()` --> zebra-network/src/protocol/external/codec.rs:227:20 | 227 | if user_agent.as_bytes().len() > MAX_USER_AGENT_LENGTH { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `user_agent.len()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes = note: `-D clippy::needless-as-bytes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_as_bytes)]`
this `map_or` is redundant: zebra-state/src/service/non_finalized_state/chain.rs#L968
error: this `map_or` is redundant --> zebra-state/src/service/non_finalized_state/chain.rs:968:16 | 968 | || self | ________________^ 969 | | .orchard_tree( 970 | | height 971 | | .previous() ... | 974 | | ) 975 | | .map_or(true, |prev_tree| prev_tree != tree) | |____________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or help: use a standard comparison instead | 968 ~ || (self 969 + .orchard_tree( 970 + height 971 + .previous() 972 + .expect("Already checked for underflow.") 973 + .into(), 974 + ) != Some(tree)) |
this `map_or` is redundant: zebra-state/src/service/non_finalized_state/chain.rs#L761
error: this `map_or` is redundant --> zebra-state/src/service/non_finalized_state/chain.rs:761:16 | 761 | || self | ________________^ 762 | | .sapling_tree( 763 | | height 764 | | .previous() ... | 767 | | ) 768 | | .map_or(true, |prev_tree| prev_tree != tree) | |____________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or help: use a standard comparison instead | 761 ~ || (self 762 + .sapling_tree( 763 + height 764 + .previous() 765 + .expect("Already checked for underflow.") 766 + .into(), 767 + ) != Some(tree)) |
this `map_or` is redundant: zebra-state/src/service/non_finalized_state/chain.rs#L556
error: this `map_or` is redundant --> zebra-state/src/service/non_finalized_state/chain.rs:556:16 | 556 | || self | ________________^ 557 | | .sprout_tree( 558 | | height 559 | | .previous() ... | 562 | | ) 563 | | .map_or(true, |prev_tree| prev_tree != tree) | |____________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `-D clippy::unnecessary-map-or` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_map_or)]` help: use a standard comparison instead | 556 ~ || (self 557 + .sprout_tree( 558 + height 559 + .previous() 560 + .expect("Already checked for underflow.") 561 + .into(), 562 + ) != Some(tree)) |
this `map_or` is redundant: zebra-state/src/service/non_finalized_state/chain.rs#L968
error: this `map_or` is redundant --> zebra-state/src/service/non_finalized_state/chain.rs:968:16 | 968 | || self | ________________^ 969 | | .orchard_tree( 970 | | height 971 | | .previous() ... | 974 | | ) 975 | | .map_or(true, |prev_tree| prev_tree != tree) | |____________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or help: use a standard comparison instead | 968 ~ || (self 969 + .orchard_tree( 970 + height 971 + .previous() 972 + .expect("Already checked for underflow.") 973 + .into(), 974 + ) != Some(tree)) |
this `map_or` is redundant: zebra-state/src/service/non_finalized_state/chain.rs#L761
error: this `map_or` is redundant --> zebra-state/src/service/non_finalized_state/chain.rs:761:16 | 761 | || self | ________________^ 762 | | .sapling_tree( 763 | | height 764 | | .previous() ... | 767 | | ) 768 | | .map_or(true, |prev_tree| prev_tree != tree) | |____________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or help: use a standard comparison instead | 761 ~ || (self 762 + .sapling_tree( 763 + height 764 + .previous() 765 + .expect("Already checked for underflow.") 766 + .into(), 767 + ) != Some(tree)) |
this `map_or` is redundant: zebra-state/src/service/non_finalized_state/chain.rs#L556
error: this `map_or` is redundant --> zebra-state/src/service/non_finalized_state/chain.rs:556:16 | 556 | || self | ________________^ 557 | | .sprout_tree( 558 | | height 559 | | .previous() ... | 562 | | ) 563 | | .map_or(true, |prev_tree| prev_tree != tree) | |____________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `-D clippy::unnecessary-map-or` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_map_or)]` help: use a standard comparison instead | 556 ~ || (self 557 + .sprout_tree( 558 + height 559 + .previous() 560 + .expect("Already checked for underflow.") 561 + .into(), 562 + ) != Some(tree)) |
Build zebrad crate: zebra-network/src/protocol/external/codec.rs#L227
needless call to `as_bytes()`
Build zebrad crate: zebra-network/src/protocol/external/codec.rs#L251
needless call to `as_bytes()`
Build zebrad crate: zebra-network/src/protocol/external/codec.rs#L262
needless call to `as_bytes()`
Build zebrad crate
Process completed with exit code 101.
Build zebra-script crate
The job was canceled because "zebrad" failed.
Build zebra-state crate
The job was canceled because "zebrad" failed.
Build zebra-state crate
The operation was canceled.
Build zebra-utils crate
The job was canceled because "zebrad" failed.
Build zebra-utils crate
The operation was canceled.
Generate crates matrix
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Check crates matrix
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636