Skip to content

Commit

Permalink
[SHIP-2816] Add scroll sepolia network config (#14126)
Browse files Browse the repository at this point in the history
* Add scroll sepolia network config

* disable reorg protection on v2_3 scroll, zkevm

* fix node funding

* fix reorg protection logic

---------

Co-authored-by: anirudhwarrier <[email protected]>
  • Loading branch information
joaoluisam and anirudhwarrier authored Aug 15, 2024
1 parent 8fa8c3a commit 48c0846
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions integration-tests/benchmark/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ var networkConfig = map[string]NetworkConfig{
blockTime: time.Second,
deltaStage: 20 * time.Second,
},
networks.ScrollSepolia.Name: {
upkeepSLA: int64(120),
blockTime: 3 * time.Second,
deltaStage: 20 * time.Second,
},
}

func SetupAutomationBenchmarkEnv(t *testing.T, keeperTestConfig types.KeeperBenchmarkTestConfig) (*environment.Environment, blockchain.EVMNetwork) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ type EthereumKeeperRegistry struct {
func (v *EthereumKeeperRegistry) ReorgProtectionEnabled() bool {
chainId := v.client.ChainID
// reorg protection is disabled in polygon zkEVM and Scroll bc currently there is no way to get the block hash onchain
return v.version != ethereum.RegistryVersion_2_2 || (chainId != 1101 && chainId != 1442 && chainId != 2442 && chainId != 534352 && chainId != 534351)
return v.version < ethereum.RegistryVersion_2_2 || (chainId != 1101 && chainId != 1442 && chainId != 2442 && chainId != 534352 && chainId != 534351)
}

func (v *EthereumKeeperRegistry) ChainModuleAddress() common.Address {
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/testsetups/keeper_benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (k *KeeperBenchmarkTest) Setup(env *environment.Environment, config tt.Keep
for index := range keysToFund {
// Fund chainlink nodes
nodesToFund := k.chainlinkNodes
if inputs.RegistryVersions[index] == ethereum.RegistryVersion_2_0 || inputs.RegistryVersions[index] == ethereum.RegistryVersion_2_1 || inputs.RegistryVersions[index] == ethereum.RegistryVersion_2_2 {
if inputs.RegistryVersions[index] >= ethereum.RegistryVersion_2_0 {
nodesToFund = k.chainlinkNodes[1:]
}
err = actions.FundChainlinkNodesAtKeyIndexFromRootAddress(k.log, k.chainClient, contracts.ChainlinkK8sClientToChainlinkNodeWithKeysAndAddress(nodesToFund), k.Inputs.ChainlinkNodeFunding, index)
Expand Down

0 comments on commit 48c0846

Please sign in to comment.