diff --git a/Cargo.lock b/Cargo.lock index da0e749c..d0a35bcb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -653,7 +653,7 @@ dependencies = [ [[package]] name = "cli" -version = "0.5.1" +version = "0.5.3" dependencies = [ "clap", "client", @@ -671,7 +671,7 @@ dependencies = [ [[package]] name = "client" -version = "0.5.1" +version = "0.5.3" dependencies = [ "common", "config", @@ -762,7 +762,7 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "common" -version = "0.5.1" +version = "0.5.3" dependencies = [ "ethers", "eyre", @@ -774,7 +774,7 @@ dependencies = [ [[package]] name = "config" -version = "0.5.1" +version = "0.5.3" dependencies = [ "common", "dirs 4.0.0", @@ -795,7 +795,7 @@ dependencies = [ [[package]] name = "consensus" -version = "0.5.1" +version = "0.5.3" dependencies = [ "async-trait", "bytes", @@ -1708,7 +1708,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "execution" -version = "0.5.1" +version = "0.5.3" dependencies = [ "async-trait", "bytes", @@ -2228,7 +2228,7 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "helios" -version = "0.5.1" +version = "0.5.2" dependencies = [ "client", "common", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 2f679dca..f3a3754d 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cli" -version = "0.5.2" +version = "0.5.3" edition = "2021" [[bin]] diff --git a/client/Cargo.toml b/client/Cargo.toml index 084cee39..4aff435c 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "client" -version = "0.5.2" +version = "0.5.3" edition = "2021" [dependencies] diff --git a/common/Cargo.toml b/common/Cargo.toml index 59458923..5d5a926b 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "common" -version = "0.5.2" +version = "0.5.3" edition = "2021" [dependencies] diff --git a/config/Cargo.toml b/config/Cargo.toml index f2302c51..f174383e 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "config" -version = "0.5.2" +version = "0.5.3" edition = "2021" [dependencies] diff --git a/config/src/config.rs b/config/src/config.rs index a0c67d81..9bd9957b 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -74,14 +74,14 @@ impl Config { pub fn fork_version(&self, slot: u64) -> Vec { let epoch = slot / 32; - if epoch >= self.forks.capella.epoch { + if epoch >= self.forks.deneb.epoch { + self.forks.deneb.fork_version.clone() + } else if epoch >= self.forks.capella.epoch { self.forks.capella.fork_version.clone() } else if epoch >= self.forks.bellatrix.epoch { self.forks.bellatrix.fork_version.clone() } else if epoch >= self.forks.altair.epoch { self.forks.altair.fork_version.clone() - } else if epoch >= self.forks.deneb.epoch { - self.forks.deneb.fork_version.clone() } else { self.forks.genesis.fork_version.clone() } diff --git a/consensus/Cargo.toml b/consensus/Cargo.toml index bdfc9a50..1d631372 100644 --- a/consensus/Cargo.toml +++ b/consensus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "consensus" -version = "0.5.2" +version = "0.5.3" edition = "2021" [dependencies] diff --git a/consensus/src/consensus.rs b/consensus/src/consensus.rs index b7799134..5a6c9745 100644 --- a/consensus/src/consensus.rs +++ b/consensus/src/consensus.rs @@ -548,6 +548,10 @@ impl Inner { let should_apply_update = { let has_majority = committee_bits * 3 >= 512 * 2; + if !has_majority { + tracing::warn!("skipping block with low vote count"); + } + let update_is_newer = update_finalized_slot > self.store.finalized_header.slot.as_u64(); let good_update = update_is_newer || update_has_finalized_next_committee; @@ -598,7 +602,7 @@ impl Inner { fn log_finality_update(&self, update: &GenericUpdate) { let participation = - get_bits(&update.sync_aggregate.sync_committee_bits) as f32 / 512_f32 * 100f32; + get_bits(&update.sync_aggregate.sync_committee_bits) as f32 / 512f32 * 100f32; let decimals = if participation == 100.0 { 1 } else { 2 }; let age = self.age(self.store.finalized_header.slot.as_u64()); @@ -621,7 +625,7 @@ impl Inner { fn log_optimistic_update(&self, update: &GenericUpdate) { let participation = - get_bits(&update.sync_aggregate.sync_committee_bits) as f32 / 512_f32 * 100f32; + get_bits(&update.sync_aggregate.sync_committee_bits) as f32 / 512f32 * 100f32; let decimals = if participation == 100.0 { 1 } else { 2 }; let age = self.age(self.store.optimistic_header.slot.as_u64()); diff --git a/consensus/src/types/mod.rs b/consensus/src/types/mod.rs index be2a3f5d..56c5c432 100644 --- a/consensus/src/types/mod.rs +++ b/consensus/src/types/mod.rs @@ -45,7 +45,7 @@ pub struct BeaconBlockBody { voluntary_exits: List, sync_aggregate: SyncAggregate, pub execution_payload: ExecutionPayload, - #[superstruct(only(Capella))] + #[superstruct(only(Capella, Deneb))] bls_to_execution_changes: List, #[superstruct(only(Deneb))] blob_kzg_commitments: List, 4096>, @@ -97,7 +97,7 @@ pub struct ExecutionPayload { pub base_fee_per_gas: U256, pub block_hash: Bytes32, pub transactions: List, - #[superstruct(only(Capella))] + #[superstruct(only(Capella, Deneb))] withdrawals: List, #[superstruct(only(Deneb))] blob_gas_used: U64, diff --git a/consensus/src/types/utils.rs b/consensus/src/types/utils.rs index 586e81f8..cfe86478 100644 --- a/consensus/src/types/utils.rs +++ b/consensus/src/types/utils.rs @@ -104,7 +104,7 @@ impl From for Block { .enumerate() .map(|(i, tx)| { let rlp = Rlp::new(tx.as_slice()); - let mut tx = Transaction::decode(&rlp).unwrap(); + let mut tx = Transaction::decode(&rlp)?; tx.block_number = Some(value.block_number().as_u64().into()); tx.block_hash = Some(H256::from_slice(value.block_hash())); @@ -125,8 +125,9 @@ impl From for Block { }; } - tx + Ok::<_, eyre::Report>(tx) }) + .filter_map(|tx| tx.ok()) .collect::>(); Block { diff --git a/execution/Cargo.toml b/execution/Cargo.toml index 626f2456..9cb7ed70 100644 --- a/execution/Cargo.toml +++ b/execution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "execution" -version = "0.5.2" +version = "0.5.3" edition = "2021" [dependencies] diff --git a/execution/src/evm.rs b/execution/src/evm.rs index 6b3894b1..4ba2b9da 100644 --- a/execution/src/evm.rs +++ b/execution/src/evm.rs @@ -58,14 +58,14 @@ impl Evm { async fn call_inner(&mut self, opts: &CallOpts) -> Result { let env = self.get_env(opts, self.tag).await; - self.evm + _ = self + .evm .db .as_mut() .unwrap() .state .prefetch_state(opts) - .await - .map_err(|err| EvmError::Generic(err.to_string()))?; + .await; let tx_res = loop { self.evm.env = env.clone();