diff --git a/aggoracle/config.go b/aggoracle/config.go index 2dd39403..0d6025d0 100644 --- a/aggoracle/config.go +++ b/aggoracle/config.go @@ -16,10 +16,9 @@ var ( ) type Config struct { - TargetChainType TargetChainType `mapstructure:"TargetChainType"` - URLRPCL1 string `mapstructure:"URLRPCL1"` - // TODO: BlockFinality doesnt work as per the jsonschema - BlockFinality string `jsonschema:"enum=latest,enum=safe, enum=pending, enum=finalized" mapstructure:"BlockFinality"` + TargetChainType TargetChainType `mapstructure:"TargetChainType"` + URLRPCL1 string `mapstructure:"URLRPCL1"` + BlockFinality string `jsonschema:"enum=LatestBlock, enum=SafeBlock, enum=PendingBlock, enum=FinalizedBlock, enum=EarliestBlock" mapstructure:"BlockFinality"` WaitPeriodNextGER types.Duration `mapstructure:"WaitPeriodNextGER"` EVMSender chaingersender.EVMConfig `mapstructure:"EVMSender"` } diff --git a/config/default.go b/config/default.go index 85dbd1cd..b66ae1b4 100644 --- a/config/default.go +++ b/config/default.go @@ -126,7 +126,7 @@ DBPath = "/tmp/reorgdetector" DBPath = "/tmp/L1InfoTreeSync" GlobalExitRootAddr="0x8464135c8F25Da09e49BC8782676a84730C318bC" SyncBlockChunkSize=10 -BlockFinality="latest" +BlockFinality="LatestBlock" URLRPCL1="http://test-aggoracle-l1:8545" WaitForNewBlocksPeriod="100ms" InitialBlock=0 @@ -134,16 +134,16 @@ InitialBlock=0 [AggOracle] TargetChainType="EVM" URLRPCL1="http://test-aggoracle-l1:8545" -BlockFinality="latest" +BlockFinality="LatestBlock" WaitPeriodNextGER="100ms" - [EVMSender] + [AggOracle.EVMSender] GlobalExitRootL2="0x8464135c8F25Da09e49BC8782676a84730C318bC" URLRPCL2="http://test-aggoracle-l2:8545" ChainIDL2=1337 GasOffset=0 WaitPeriodMonitorTx="100ms" SenderAddr="0x70997970c51812dc3a010c7d01b50e0d17dc79c8" - [SequenceSender.EthTxManager] + [AggOracle.EVMSender.EthTxManager] FrequencyToMonitorTxs = "1s" WaitTxToBeMined = "2s" GetReceiptMaxTime = "250ms" @@ -158,7 +158,7 @@ WaitPeriodNextGER="100ms" ReadPendingL1Txs = false SafeStatusL1NumberOfBlocks = 5 FinalizedStatusL1NumberOfBlocks = 10 - [SequenceSender.EthTxManager.Etherman] + [AggOracle.EVMSender.EthTxManager.Etherman] URL = "http://test-aggoracle-l2" MultiGasProvider = false L1ChainID = 1337 diff --git a/l1infotreesync/l1infotreesync.go b/l1infotreesync/l1infotreesync.go index 7b3be753..1fa06473 100644 --- a/l1infotreesync/l1infotreesync.go +++ b/l1infotreesync/l1infotreesync.go @@ -16,11 +16,10 @@ const ( ) type Config struct { - DBPath string `mapstructure:"DBPath"` - GlobalExitRootAddr common.Address `mapstructure:"GlobalExitRootAddr"` - SyncBlockChunkSize uint64 `mapstructure:"SyncBlockChunkSize"` - // TODO: BlockFinality doesnt work as per the jsonschema - BlockFinality string `jsonschema:"enum=latest,enum=safe, enum=pending, enum=finalized" mapstructure:"BlockFinality"` + DBPath string `mapstructure:"DBPath"` + GlobalExitRootAddr common.Address `mapstructure:"GlobalExitRootAddr"` + SyncBlockChunkSize uint64 `mapstructure:"SyncBlockChunkSize"` + BlockFinality string `jsonschema:"enum=LatestBlock, enum=SafeBlock, enum=PendingBlock, enum=FinalizedBlock, enum=EarliestBlock" mapstructure:"BlockFinality"` URLRPCL1 string `mapstructure:"URLRPCL1"` WaitForNewBlocksPeriod types.Duration `mapstructure:"WaitForNewBlocksPeriod"` InitialBlock uint64 `mapstructure:"InitialBlock"`