Skip to content

Commit

Permalink
Merge pull request ethereum#138 from OffchainLabs/arbdebug-config
Browse files Browse the repository at this point in the history
arbdebug config options
  • Loading branch information
rachel-bousfield authored Jul 29, 2022
2 parents c4e81d5 + c28e6bd commit f938f28
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions arbitrum/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,27 @@ type Config struct {
// FeeHistoryMaxBlockCount limits the number of historical blocks a fee history request may cover
FeeHistoryMaxBlockCount uint64 `koanf:"feehistory-max-block-count"`

ArbDebug ArbDebugConfig `koanf:"arbdebug"`

ClassicRedirect string `koanf:"classic-redirect"`
}

type ArbDebugConfig struct {
BlockRangeBound uint64 `koanf:"block-range-bound"`
TimeoutQueueBound uint64 `koanf:"timeout-queue-bound"`
}

func ConfigAddOptions(prefix string, f *flag.FlagSet) {
f.Uint64(prefix+".gas-cap", DefaultConfig.RPCGasCap, "cap on computation gas that can be used in eth_call/estimateGas (0=infinite)")
f.Float64(prefix+".tx-fee-cap", DefaultConfig.RPCTxFeeCap, "cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap)")
f.Duration(prefix+".evm-timeout", DefaultConfig.RPCEVMTimeout, "timeout used for eth_call (0=infinite)")
f.Uint64(prefix+".bloom-bits-blocks", DefaultConfig.BloomBitsBlocks, "number of blocks a single bloom bit section vector holds")
f.Uint64(prefix+".feehistory-max-block-count", DefaultConfig.FeeHistoryMaxBlockCount, "max number of blocks a fee history request may cover")
f.String(prefix+".classic-redirect", DefaultConfig.ClassicRedirect, "url to redirect classic requests, use \"error:[CODE:]MESSAGE\" to return specified error instead of redirecting")

arbDebug := DefaultConfig.ArbDebug
f.Uint64(prefix+".arbdebug.block-range-bound", arbDebug.BlockRangeBound, "bounds the number of blocks arbdebug calls may return")
f.Uint64(prefix+".arbdebug.timeout-queue-bound", arbDebug.TimeoutQueueBound, "bounds the length of timeout queues arbdebug calls may return")
}

var DefaultConfig = Config{
Expand All @@ -46,4 +57,8 @@ var DefaultConfig = Config{
BloomConfirms: params.BloomConfirms,
FeeHistoryMaxBlockCount: 1024,
ClassicRedirect: "",
ArbDebug: ArbDebugConfig{
BlockRangeBound: 1024,
TimeoutQueueBound: 1024,
},
}

0 comments on commit f938f28

Please sign in to comment.