local testnet config updates

This commit is contained in:
realbigsean 2022-12-06 08:54:46 -05:00
parent e72d9fb922
commit 2704955b2e
No known key found for this signature in database
GPG Key ID: B372B64D866BF8CC
8 changed files with 20 additions and 14 deletions

1
Cargo.lock generated
View File

@ -3228,6 +3228,7 @@ dependencies = [
"environment",
"eth1_test_rig",
"eth2",
"eth2_hashing",
"eth2_network_config",
"eth2_ssz",
"eth2_wallet",

View File

@ -14,7 +14,7 @@ use std::io::Read;
use std::path::PathBuf;
use std::str::FromStr;
use std::time::{SystemTime, UNIX_EPOCH};
use types::ExecutionBlockHash;
use types::{BeaconStateMerge, ExecutionBlockHash};
use types::{
test_utils::generate_deterministic_keypairs, Address, BeaconState, ChainSpec, Config, Eth1Data,
EthSpec, ExecutionPayloadHeader, ExecutionPayloadHeaderMerge, Hash256, Keypair, PublicKey,
@ -141,10 +141,13 @@ pub fn run<T: EthSpec>(testnet_dir_path: PathBuf, matches: &ArgMatches) -> Resul
None
};
let mut merge_state : types::BeaconState<T>=BeaconState::Merge(BeaconStateMerge::from_ssz_bytes(genesis_state_bytes.unwrap().as_ref()).unwrap());
upgrade_to_capella(&mut merge_state, &spec).unwrap();
let testnet = Eth2NetworkConfig {
deposit_contract_deploy_block,
boot_enr: Some(vec![]),
genesis_state_bytes,
genesis_state_bytes: Some(merge_state.as_ssz_bytes()),
config: Config::from_chain_spec::<T>(&spec),
};

View File

@ -44,7 +44,7 @@ http_port=${@:$OPTIND+2:1}
execution_endpoint=${@:$OPTIND+3:1}
execution_jwt=${@:$OPTIND+4:1}
lighthouse_binary=lighthouse-4844
lighthouse_binary=lighthouse
exec $lighthouse_binary \
--debug-level $DEBUG_LEVEL \

View File

@ -1,4 +1,4 @@
priv_key="02fd74636e96a8ffac8e7b01b0de8dea94d6bcf4989513b38cf59eb32163ff91"
bootnode --nodekeyhex $priv_key
/home/sean/CLionProjects/eip4844-interop/geth/go-ethereum/build/bin/bootnode --nodekeyhex $priv_key

View File

@ -11,8 +11,9 @@
"istanbulBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"mergeForkBlock": 0,
"shardingForkBlock": 64,
"mergeNetsplitBlock": 0,
"shanghaiBlock": 0,
"shardingForkBlock": 32,
"terminalTotalDifficulty": 0
},
"alloc": {

View File

@ -33,7 +33,7 @@ http_port=${@:$OPTIND+2:1}
auth_port=${@:$OPTIND+3:1}
genesis_file=${@:$OPTIND+4:1}
geth_binary=geth-merge
geth_binary=/home/sean/CLionProjects/eip4844-interop/geth/go-ethereum/build/bin/geth
# Init
$geth_binary init \
@ -51,5 +51,4 @@ exec $geth_binary \
--syncmode=full \
--bootnodes $EL_BOOTNODE_ENODE \
--port $network_port \
--http.port $http_port \
--authrpc.port $auth_port
--http.port $auth_port

View File

@ -104,10 +104,10 @@ echo "executing: ./setup.sh >> $LOG_DIR/setup.log"
# Delay to let boot_enr.yaml to be created
execute_command_add_PID bootnode.log ./bootnode.sh
sleeping 1
sleeping 3
execute_command_add_PID el_bootnode.log ./el_bootnode.sh
sleeping 1
sleeping 3
# Start beacon nodes
BN_udp_tcp_base=9000
@ -120,12 +120,14 @@ EL_base_auth_http=5000
(( $VC_COUNT < $BN_COUNT )) && SAS=-s || SAS=
for (( el=1; el<=$BN_COUNT; el++ )); do
execute_command_add_PID geth_$el.log ./geth.sh $DATADIR/geth_datadir$el $((EL_base_network + $el)) $((EL_base_http + $el)) $((EL_base_auth_http + $el)) $genesis_file
execute_command_add_PID geth_$el.log ./geth.sh $DATADIR/geth_datadir$el $((EL_base_network + $el)) $((EL_base_http + $el)) $((EL_base_auth_http + $el + 10)) $genesis_file
done
sleeping 20
for (( bn=1; bn<=$BN_COUNT; bn++ )); do
execute_command_add_PID json_snoop_$bn.log json_rpc_snoop -p $((EL_base_auth_http + $bn)) -b 0.0.0.0 http://localhost:$((EL_base_auth_http + $bn + 10))
secret=$DATADIR/geth_datadir$bn/geth/jwtsecret
echo $secret
execute_command_add_PID beacon_node_$bn.log ./beacon_node.sh $SAS -d $DEBUG_LEVEL $DATADIR/node_$bn $((BN_udp_tcp_base + $bn)) $((BN_http_port_base + $bn)) http://localhost:$((EL_base_auth_http + $bn)) $secret

View File

@ -37,8 +37,8 @@ CHAIN_ID=4242
# Hard fork configuration
ALTAIR_FORK_EPOCH=0
BELLATRIX_FORK_EPOCH=0
CAPELLA_FORK_EPOCH=1
EIP4844_FORK_EPOCH=2
CAPELLA_FORK_EPOCH=0
EIP4844_FORK_EPOCH=1
TTD=0