From 07ffbc0e9d4bfcd38680331c7d585df173619e02 Mon Sep 17 00:00:00 2001 From: 0xbeny <55846654+0xbeny@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:05:06 +0000 Subject: [PATCH] fix: read BeaconRootsCode by fromHex --- core/chain_makers_test.go | 2 +- params/protocol_params.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go index a2ec9e6507..bfd8a145fe 100644 --- a/core/chain_makers_test.go +++ b/core/chain_makers_test.go @@ -43,7 +43,7 @@ func TestGeneratePOSChain(t *testing.T) { bb = common.Address{0xbb} funds = big.NewInt(0).Mul(big.NewInt(1337), big.NewInt(params.Ether)) config = *params.AllEthashProtocolChanges - asm4788 = common.Hex2Bytes("3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500") + asm4788 = params.BeaconRootsCode gspec = &Genesis{ Config: &config, Alloc: types.GenesisAlloc{ diff --git a/params/protocol_params.go b/params/protocol_params.go index 55661c3750..9c3b49910c 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -188,7 +188,7 @@ var ( BeaconRootsAddress = common.HexToAddress("0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02") // BeaconRootsCode is the code where historical beacon roots are stored as per EIP-4788 - BeaconRootsCode = []byte("3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500") + BeaconRootsCode = common.FromHex("3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500") // SystemAddress is where the system-transaction is sent from as per EIP-4788 SystemAddress = common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffffe")