Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ require (
lukechampine.com/blake3 v1.3.0 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.3-0.20251024190759-96738d21616c
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.3-rc.1.0.20251027223712-a19e6a129a78

// replace github.com/ethereum/go-ethereum => ../op-geth

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A=
github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.4-0.20251001155152-4eb15ccedf7e h1:iy1vBIzACYUyOVyoADUwvAiq2eOPC0yVsDUdolPwQjk=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.4-0.20251001155152-4eb15ccedf7e/go.mod h1:DYj7+vYJ4cIB7zera9mv4LcAynCL5u4YVfoeUu6Wa+w=
github.com/ethereum-optimism/op-geth v1.101603.3-0.20251024190759-96738d21616c h1:kMV8x5lR0/YnPSK6oRgvmSahhgNGcbm8FtucZjZ4fSo=
github.com/ethereum-optimism/op-geth v1.101603.3-0.20251024190759-96738d21616c/go.mod h1:Wiy9cngs7ll1slc/dcHHRVuGhozWOpF1y6f31xENR7k=
github.com/ethereum-optimism/op-geth v1.101603.3-rc.1.0.20251027223712-a19e6a129a78 h1:57pfBMT4oyYKMTt2S0WE/aKxa1ZErxD0+C3r2B0Lasw=
github.com/ethereum-optimism/op-geth v1.101603.3-rc.1.0.20251027223712-a19e6a129a78/go.mod h1:Wiy9cngs7ll1slc/dcHHRVuGhozWOpF1y6f31xENR7k=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251009180028-9b4658b9b7af h1:WWz0gJM/boaUImtJnROecPirAerKCLpAU4m6Tx0ArOg=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251009180028-9b4658b9b7af/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y=
github.com/ethereum/c-kzg-4844/v2 v2.1.5 h1:aVtoLK5xwJ6c5RiqO8g8ptJ5KU+2Hdquf6G3aXiHh5s=
Expand Down
40 changes: 37 additions & 3 deletions op-program/client/l2/engineapi/precompiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func CreatePrecompileOverrides(precompileOracle PrecompileOracle) vm.PrecompileO
return &ecrecoverOracle{Orig: orig, Oracle: precompileOracle}
case bn256PairingPrecompileAddress:
precompile := bn256PairingOracle{Orig: orig, Oracle: precompileOracle}
if rules.IsOptimismJovian {
return &bn256PairingOracleJovian{precompile}
}
if rules.IsOptimismGranite {
return &bn256PairingOracleGranite{precompile}
}
Expand All @@ -83,8 +86,12 @@ func CreatePrecompileOverrides(precompileOracle PrecompileOracle) vm.PrecompileO
precompileAddress: blsG1AddPrecompileAddress,
}
case blsG1MSMPrecompileAddress:
sizeLimit := params.Bls12381G1MulMaxInputSizeIsthmus
if rules.IsOptimismJovian {
sizeLimit = params.Bls12381G1MulMaxInputSizeJovian
}
return &blsOperationOracleWithSizeLimit{
sizeLimit: params.Bls12381G1MulMaxInputSizeIsthmus,
sizeLimit: sizeLimit,
blsOperationOracle: blsOperationOracle{
Orig: orig,
Oracle: precompileOracle,
Expand All @@ -103,8 +110,12 @@ func CreatePrecompileOverrides(precompileOracle PrecompileOracle) vm.PrecompileO
precompileAddress: blsG2AddPrecompileAddress,
}
case blsG2MSMPrecompileAddress:
sizeLimit := params.Bls12381G2MulMaxInputSizeIsthmus
if rules.IsOptimismJovian {
sizeLimit = params.Bls12381G2MulMaxInputSizeJovian
}
return &blsOperationOracleWithSizeLimit{
sizeLimit: params.Bls12381G2MulMaxInputSizeIsthmus,
sizeLimit: sizeLimit,
blsOperationOracle: blsOperationOracle{
Orig: orig,
Oracle: precompileOracle,
Expand All @@ -114,8 +125,12 @@ func CreatePrecompileOverrides(precompileOracle PrecompileOracle) vm.PrecompileO
},
}
case blsPairingPrecompileAddress:
sizeLimit := params.Bls12381PairingMaxInputSizeIsthmus
if rules.IsOptimismJovian {
sizeLimit = params.Bls12381PairingMaxInputSizeJovian
}
return &blsOperationOracleWithSizeLimit{
sizeLimit: params.Bls12381PairingMaxInputSizeIsthmus,
sizeLimit: sizeLimit,
blsOperationOracle: blsOperationOracle{
Orig: orig,
Oracle: precompileOracle,
Expand Down Expand Up @@ -168,6 +183,10 @@ func (c *ecrecoverOracle) Run(input []byte) ([]byte, error) {

const ecRecoverInputLength = 128

if len(input) > ecRecoverInputLength {
input = input[:ecRecoverInputLength]
}

input = common.RightPadBytes(input, ecRecoverInputLength)
// "input" is (hash, v, r, s), each 32 bytes
r := new(big.Int).SetBytes(input[64:96])
Expand Down Expand Up @@ -261,6 +280,21 @@ func (b *bn256PairingOracleGranite) Name() string {
return b.Orig.Name()
}

type bn256PairingOracleJovian struct {
bn256PairingOracle
}

func (b *bn256PairingOracleJovian) Run(input []byte) ([]byte, error) {
if len(input) > int(params.Bn256PairingMaxInputSizeJovian) {
return nil, errBadPairingInputSize
}
return b.bn256PairingOracle.Run(input)
}

func (b *bn256PairingOracleJovian) Name() string {
return b.Orig.Name()
}

// kzgPointEvaluationOracle implements the EIP-4844 point evaluation precompile,
// using the preimage-oracle to perform the evaluation.
type kzgPointEvaluationOracle struct {
Expand Down
Loading