diff --git a/protocol/settings/chain.go b/protocol/settings/chain.go index b56fda04..7b706ffb 100644 --- a/protocol/settings/chain.go +++ b/protocol/settings/chain.go @@ -7,12 +7,13 @@ var defaultRateLimiting = &RateLimit{ // ChainSettings contains chain-specific settings. type ChainSettings struct { - ChainID int - Name string - EnableTrace bool - JsonRpcRateLimiting *RateLimit - InspectionInterval int // in block number - BlockThreshold int + ChainID int + Name string + EnableTrace bool + JsonRpcRateLimiting *RateLimit + InspectionInterval int // in block number + BlockThreshold int + JSONRPCRetryIntervalSeconds int } // RateLimit is token bucket algorithm parameters. @@ -27,60 +28,67 @@ type RateLimit struct { // safe offsets are adjusted to be 5-10% of the block threshold (at least 1) var allChainSettings = []ChainSettings{ { - ChainID: 1, - Name: "Ethereum Mainnet", - EnableTrace: true, - JsonRpcRateLimiting: defaultRateLimiting, - InspectionInterval: 50, - BlockThreshold: 8, + ChainID: 1, + Name: "Ethereum Mainnet", + EnableTrace: true, + JsonRpcRateLimiting: defaultRateLimiting, + InspectionInterval: 50, + BlockThreshold: 8, + JSONRPCRetryIntervalSeconds: 8, }, { - ChainID: 10, - Name: "Optimism", - EnableTrace: false, - JsonRpcRateLimiting: defaultRateLimiting, - InspectionInterval: 100, - BlockThreshold: 8, + ChainID: 10, + Name: "Optimism", + EnableTrace: false, + JsonRpcRateLimiting: defaultRateLimiting, + InspectionInterval: 100, + BlockThreshold: 10, + JSONRPCRetryIntervalSeconds: 4, }, { - ChainID: 56, - Name: "BSC", - EnableTrace: false, - JsonRpcRateLimiting: defaultRateLimiting, - InspectionInterval: 250, - BlockThreshold: 20, + ChainID: 56, + Name: "BSC", + EnableTrace: false, + JsonRpcRateLimiting: defaultRateLimiting, + InspectionInterval: 250, + BlockThreshold: 20, + JSONRPCRetryIntervalSeconds: 4, }, { - ChainID: 137, - Name: "Polygon", - EnableTrace: false, - JsonRpcRateLimiting: defaultRateLimiting, - InspectionInterval: 70, - BlockThreshold: 30, + ChainID: 137, + Name: "Polygon", + EnableTrace: false, + JsonRpcRateLimiting: defaultRateLimiting, + InspectionInterval: 70, + BlockThreshold: 30, + JSONRPCRetryIntervalSeconds: 4, }, { - ChainID: 250, - Name: "Fantom", - EnableTrace: true, - JsonRpcRateLimiting: defaultRateLimiting, - InspectionInterval: 750, - BlockThreshold: 35, + ChainID: 250, + Name: "Fantom", + EnableTrace: true, + JsonRpcRateLimiting: defaultRateLimiting, + InspectionInterval: 750, + BlockThreshold: 37, + JSONRPCRetryIntervalSeconds: 4, }, { - ChainID: 42161, - Name: "Arbitrum", - EnableTrace: false, - JsonRpcRateLimiting: defaultRateLimiting, - InspectionInterval: 1500, - BlockThreshold: 80, + ChainID: 42161, + Name: "Arbitrum", + EnableTrace: false, + JsonRpcRateLimiting: defaultRateLimiting, + InspectionInterval: 1500, + BlockThreshold: 80, + JSONRPCRetryIntervalSeconds: 4, }, { - ChainID: 43114, - Name: "Avalanche", - EnableTrace: false, - JsonRpcRateLimiting: defaultRateLimiting, - InspectionInterval: 350, - BlockThreshold: 30, + ChainID: 43114, + Name: "Avalanche", + EnableTrace: false, + JsonRpcRateLimiting: defaultRateLimiting, + InspectionInterval: 350, + BlockThreshold: 32, + JSONRPCRetryIntervalSeconds: 4, }, }