@@ -140,7 +140,7 @@ var PrecompiledContractsEuclidV2 = map[common.Address]PrecompiledContract{
140140 common .BytesToAddress ([]byte {7 }): & bn256ScalarMulIstanbul {},
141141 common .BytesToAddress ([]byte {8 }): & bn256PairingIstanbul {limitInputLength : true },
142142 common .BytesToAddress ([]byte {9 }): & blake2FDisabled {},
143- common .BytesToAddress ([]byte {0x01 , 0x00 }): & p256Verify {},
143+ common .BytesToAddress ([]byte {0x01 , 0x00 }): & p256Verify {eip7951 : false },
144144}
145145
146146// PrecompiledContractsFeynman contains the default set of pre-compiled Ethereum
@@ -155,7 +155,7 @@ var PrecompiledContractsFeynman = map[common.Address]PrecompiledContract{
155155 common .BytesToAddress ([]byte {7 }): & bn256ScalarMulIstanbul {},
156156 common .BytesToAddress ([]byte {8 }): & bn256PairingIstanbul {limitInputLength : false },
157157 common .BytesToAddress ([]byte {9 }): & blake2FDisabled {},
158- common .BytesToAddress ([]byte {0x01 , 0x00 }): & p256Verify {},
158+ common .BytesToAddress ([]byte {0x01 , 0x00 }): & p256Verify {eip7951 : false },
159159}
160160
161161// PrecompiledContractsGalileo contains the default set of pre-compiled Ethereum
@@ -170,7 +170,7 @@ var PrecompiledContractsGalileo = map[common.Address]PrecompiledContract{
170170 common .BytesToAddress ([]byte {7 }): & bn256ScalarMulIstanbul {},
171171 common .BytesToAddress ([]byte {8 }): & bn256PairingIstanbul {limitInputLength : false },
172172 common .BytesToAddress ([]byte {9 }): & blake2FDisabled {},
173- common .BytesToAddress ([]byte {0x01 , 0x00 }): & p256Verify {},
173+ common .BytesToAddress ([]byte {0x01 , 0x00 }): & p256Verify {eip7951 : true },
174174}
175175
176176// PrecompiledContractsBLS contains the set of pre-compiled Ethereum
@@ -1331,10 +1331,15 @@ func (c *bls12381MapG2) Run(input []byte) ([]byte, error) {
13311331
13321332// P256VERIFY (secp256r1 signature verification)
13331333// implemented as a native contract
1334- type p256Verify struct {}
1334+ type p256Verify struct {
1335+ eip7951 bool
1336+ }
13351337
13361338// RequiredGas returns the gas required to execute the precompiled contract
13371339func (c * p256Verify ) RequiredGas (input []byte ) uint64 {
1340+ if c .eip7951 {
1341+ return params .P256VerifyGasGalileo
1342+ }
13381343 return params .P256VerifyGas
13391344}
13401345
0 commit comments