Skip to content

Commit

Permalink
Merge pull request ethereum#2 from spencer-tb/4788-contract-fix
Browse files Browse the repository at this point in the history
core/vm/contracts: Fix beacon root pre-compile address by adding it to cancun contracts
  • Loading branch information
marioevz committed Jul 31, 2023
2 parents 568d0c8 + dcdfaa4 commit 4c0559f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions core/vm/contracts.go
Expand Up @@ -109,6 +109,7 @@ var PrecompiledContractsCancun = map[common.Address]PrecompiledContract{
common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{},
common.BytesToAddress([]byte{9}): &blake2F{},
common.BytesToAddress([]byte{0x0A}): &kzgPointEvaluation{},
params.BeaconRootsStorageAddress: &beaconRoot{},
}

// PrecompiledContractsBLS contains the set of pre-compiled Ethereum
Expand All @@ -125,19 +126,6 @@ var PrecompiledContractsBLS = map[common.Address]PrecompiledContract{
common.BytesToAddress([]byte{18}): &bls12381MapG2{},
}

var PrecompiledContracts4788 = map[common.Address]PrecompiledContract{
common.BytesToAddress([]byte{1}): &ecrecover{},
common.BytesToAddress([]byte{2}): &sha256hash{},
common.BytesToAddress([]byte{3}): &ripemd160hash{},
common.BytesToAddress([]byte{4}): &dataCopy{},
common.BytesToAddress([]byte{5}): &bigModExp{eip2565: true},
common.BytesToAddress([]byte{6}): &bn256AddIstanbul{},
common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{},
common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{},
common.BytesToAddress([]byte{9}): &blake2F{},
params.BeaconRootsStorageAddress: &beaconRoot{},
}

var (
PrecompiledAddressesCancun []common.Address
PrecompiledAddressesBerlin []common.Address
Expand Down

0 comments on commit 4c0559f

Please sign in to comment.