Skip to content

Commit

Permalink
Upgrade superstruct to 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ethDreamer committed May 3, 2024
1 parent 7c6526d commit 5ec6d06
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
5 changes: 2 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ smallvec = "1.11.2"
snap = "1"
ssz_types = "0.6"
strum = { version = "0.24", features = ["derive"] }
superstruct = "0.7"
superstruct = { git = "https://github.com/sigp/superstruct", rev = "45eecbfb9708c9fe11dbb6a6a5bd8d618f02269e" }
syn = "1"
sysinfo = "0.26"
tempfile = "3"
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/beacon_chain/src/bellatrix_readiness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
});
}

if let Some(&expected) = expected_withdrawals_root {
if let Some(&got) = got_withdrawals_root {
if let Some(expected) = expected_withdrawals_root {
if let Some(got) = got_withdrawals_root {
if got != expected {
return Ok(GenesisExecutionPayloadStatus::WithdrawalsRootMismatch {
got,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/execution_layer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2182,7 +2182,7 @@ fn verify_builder_bid<E: EthSpec>(
.ok()
.cloned()
.map(|withdrawals| Withdrawals::<E>::from(withdrawals).tree_hash_root());
let payload_withdrawals_root = header.withdrawals_root().ok().copied();
let payload_withdrawals_root = header.withdrawals_root().ok();

if header.parent_hash() != parent_hash {
Err(Box::new(InvalidBuilderPayload::ParentHash {
Expand Down
9 changes: 3 additions & 6 deletions consensus/types/src/execution_payload_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,13 @@ pub struct ExecutionPayloadHeader<E: EthSpec> {
pub block_hash: ExecutionBlockHash,
#[superstruct(getter(copy))]
pub transactions_root: Hash256,
#[superstruct(only(Capella, Deneb, Electra))]
#[superstruct(getter(copy))]
#[superstruct(only(Capella, Deneb, Electra), partial_getter(copy))]
pub withdrawals_root: Hash256,
#[superstruct(only(Deneb, Electra))]
#[superstruct(only(Deneb, Electra), partial_getter(copy))]
#[serde(with = "serde_utils::quoted_u64")]
#[superstruct(getter(copy))]
pub blob_gas_used: u64,
#[superstruct(only(Deneb, Electra))]
#[superstruct(only(Deneb, Electra), partial_getter(copy))]
#[serde(with = "serde_utils::quoted_u64")]
#[superstruct(getter(copy))]
pub excess_blob_gas: u64,
#[superstruct(only(Electra), partial_getter(copy))]
pub deposit_receipts_root: Hash256,
Expand Down

0 comments on commit 5ec6d06

Please sign in to comment.