From b5a6bb06d41b53586579822bdb2807cc8418d367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ula=C5=9F=20Erdo=C4=9Fan?= Date: Thu, 21 Dec 2023 20:03:00 +0300 Subject: [PATCH] core/vm: change the implementation address to 0x100 --- core/vm/contracts.go | 2 +- core/vm/contracts_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index ea675a97fa..f23f1baa4b 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -111,7 +111,7 @@ var PrecompiledContractsCancun = map[common.Address]PrecompiledContract{ // PrecompiledContractsP256Verify contains the precompiled Ethereum // contract specified in EIP-7212. This is exported for testing purposes. var PrecompiledContractsP256Verify = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{0x0b}): &p256Verify{}, + common.BytesToAddress([]byte{0x01, 0x00}): &p256Verify{}, } // PrecompiledContractsBLS contains the set of pre-compiled Ethereum diff --git a/core/vm/contracts_test.go b/core/vm/contracts_test.go index 7657b4972c..d783f352f4 100644 --- a/core/vm/contracts_test.go +++ b/core/vm/contracts_test.go @@ -58,7 +58,7 @@ var allPrecompiles = map[common.Address]PrecompiledContract{ common.BytesToAddress([]byte{9}): &blake2F{}, common.BytesToAddress([]byte{0x0a}): &kzgPointEvaluation{}, - common.BytesToAddress([]byte{0x0b}): &p256Verify{}, + common.BytesToAddress([]byte{0x01, 0x00}): &p256Verify{}, common.BytesToAddress([]byte{0x0f, 0x0a}): &bls12381G1Add{}, common.BytesToAddress([]byte{0x0f, 0x0b}): &bls12381G1Mul{}, @@ -405,7 +405,7 @@ func BenchmarkPrecompiledP256Verify(bench *testing.B) { Expected: "0000000000000000000000000000000000000000000000000000000000000001", Name: "p256Verify", } - benchmarkPrecompiled("0b", t, bench) + benchmarkPrecompiled("100", t, bench) } -func TestPrecompiledP256Verify(t *testing.T) { testJson("p256Verify", "0b", t) } +func TestPrecompiledP256Verify(t *testing.T) { testJson("p256Verify", "100", t) }