Skip to content

Commit

Permalink
Merge branch 'celo11' into Kourin1996/add-totalDifficulty-in-RPC-bloc…
Browse files Browse the repository at this point in the history
…k-for-celo1
  • Loading branch information
piersy authored Jan 21, 2025
2 parents f8c43e1 + 1d58f64 commit 94ce536
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions core/vm/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ var PrecompiledCeloContractsCel2 = map[common.Address]CeloPrecompiledContract{

var (
PrecompiledAddressesGranite []common.Address
PrecompiledAddressesCel2 []common.Address
PrecompiledAddressesFjord []common.Address
PrecompiledAddressesPrague []common.Address
PrecompiledAddressesCancun []common.Address
Expand Down Expand Up @@ -286,14 +285,16 @@ func ActivePrecompiles(rules params.Rules) []common.Address {
return addresses
}

PrecompiledAddressesCel2 = PrecompiledAddressesCel2[:0]
PrecompiledAddressesCel2 = append(PrecompiledAddressesCel2, addresses...)
// We can't hardcode the cel2 precompiles because they depend on the underlying
// active optimism fork, so instead we dynamically calculate them here.
precompiledAddressesCel2 := make([]common.Address, 0, len(addresses)+len(PrecompiledCeloContractsCel2))
precompiledAddressesCel2 = append(precompiledAddressesCel2, addresses...)

for k := range PrecompiledCeloContractsCel2 {
PrecompiledAddressesCel2 = append(PrecompiledAddressesCel2, k)
precompiledAddressesCel2 = append(precompiledAddressesCel2, k)
}

return PrecompiledAddressesCel2
return precompiledAddressesCel2
}

// RunPrecompiledContract runs and evaluates the output of a precompiled contract.
Expand Down
2 changes: 1 addition & 1 deletion eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var Defaults = Config{
RPCGasCap: 50000000,
RPCEVMTimeout: 5 * time.Second,
GPO: FullNodeGPO,
RPCTxFeeCap: 1, // 1 ether
RPCTxFeeCap: 1000, // 1000 celo
}

//go:generate go run github.com/fjl/gencodec -type Config -formats toml -out gen_config.go
Expand Down
2 changes: 1 addition & 1 deletion rpc/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type NoHistoricalFallbackError struct{}
func (e NoHistoricalFallbackError) ErrorCode() int { return -32801 }

func (e NoHistoricalFallbackError) Error() string {
return "no historical RPC is available for this historical (pre-bedrock) execution request"
return "no historical RPC is available for this historical (pre-L2) execution request"
}

type methodNotFoundError struct{ method string }
Expand Down

0 comments on commit 94ce536

Please sign in to comment.