Add Electra fork boilerplate (#5122)

* Add Electra fork boilerplate

* Remove electra from spec tests

* Fix tests

* Remove sneaky log file

* Fix more tests

* Fix even more tests and add suggestions

* Remove unrelated lcli addition

* Update more tests

* Merge branch 'unstable' into electra

* Add comment for test-suite lcli override

* Merge branch 'unstable' into electra

* Cleanup

* Merge branch 'unstable' into electra

* Apply suggestions

* Merge branch 'unstable' into electra

* Merge sigp/unstable into electra

* Merge branch 'unstable' into electra
This commit is contained in:
Mac L
2024-04-02 23:35:02 +11:00
committed by GitHub
parent 3058b96f25
commit f8fdb71f50
105 changed files with 2079 additions and 405 deletions

View File

@@ -6,7 +6,7 @@ use std::io::Write;
use std::time::{SystemTime, UNIX_EPOCH};
use types::{
EthSpec, ExecutionPayloadHeader, ExecutionPayloadHeaderCapella, ExecutionPayloadHeaderDeneb,
ExecutionPayloadHeaderMerge, ForkName,
ExecutionPayloadHeaderElectra, ExecutionPayloadHeaderMerge, ForkName,
};
pub fn run<T: EthSpec>(matches: &ArgMatches) -> Result<(), String> {
@@ -48,6 +48,14 @@ pub fn run<T: EthSpec>(matches: &ArgMatches) -> Result<(), String> {
prev_randao: eth1_block_hash.into_root(),
..ExecutionPayloadHeaderDeneb::default()
}),
ForkName::Electra => ExecutionPayloadHeader::Electra(ExecutionPayloadHeaderElectra {
gas_limit,
base_fee_per_gas,
timestamp: genesis_time,
block_hash: eth1_block_hash,
prev_randao: eth1_block_hash.into_root(),
..ExecutionPayloadHeaderElectra::default()
}),
};
let mut file = File::create(file_name).map_err(|_| "Unable to create file".to_string())?;