diff --git a/aggoracle/config.go b/aggoracle/config.go index 2dd39403..e6097707 100644 --- a/aggoracle/config.go +++ b/aggoracle/config.go @@ -18,8 +18,8 @@ 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"` + // BlockFinality indicates the status of the blocks that will be queried in order to sync + 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/bridgesync/bridgesync.go b/bridgesync/bridgesync.go index a741f22a..31d82511 100644 --- a/bridgesync/bridgesync.go +++ b/bridgesync/bridgesync.go @@ -19,8 +19,8 @@ const ( type Config struct { // DBPath path of the DB DBPath string `mapstructure:"DBPath"` - // TODO: BlockFinality doesnt work as per the jsonschema - BlockFinality string `jsonschema:"enum=latest,enum=safe, enum=pending, enum=finalized" mapstructure:"BlockFinality"` + // BlockFinality indicates the status of the blocks that will be queried in order to sync + BlockFinality string `jsonschema:"enum=LatestBlock, enum=SafeBlock, enum=PendingBlock, enum=FinalizedBlock, enum=EarliestBlock" mapstructure:"BlockFinality"` // InitialBlockNum is the first block that will be queried when starting the synchronization from scratch. // It should be a number equal oir bellow the creation of the bridge contract InitialBlockNum uint64 `mapstructure:"InitialBlockNum"` diff --git a/config/default.go b/config/default.go index 755c3d19..24a84ace 100644 --- a/config/default.go +++ b/config/default.go @@ -130,7 +130,7 @@ DBPath = "/tmp/reorgdetectorl2" DBPath = "/tmp/L1InfoTreeSync" GlobalExitRootAddr="0x8464135c8F25Da09e49BC8782676a84730C318bC" SyncBlockChunkSize=10 -BlockFinality="latest" +BlockFinality="LatestBlock" URLRPCL1="http://test-aggoracle-l1:8545" WaitForNewBlocksPeriod="100ms" InitialBlock=0 @@ -138,7 +138,7 @@ InitialBlock=0 [AggOracle] TargetChainType="EVM" URLRPCL1="http://test-aggoracle-l1:8545" -BlockFinality="latest" +BlockFinality="FinalizedBlock" WaitPeriodNextGER="100ms" [AggOracle.EVMSender] GlobalExitRootL2="0x8464135c8F25Da09e49BC8782676a84730C318bC" @@ -215,7 +215,7 @@ WaitForSyncersPeriod = "3s" [BridgeL1Sync] DBPath = "/tmp/bridgel1sync" -BlockFinality = "latest" +BlockFinality = "LatestBlock" InitialBlockNum = 0 BridgeAddr = "0xB7098a13a48EcE087d3DA15b2D28eCE0f89819B8" SyncBlockChunkSize = 100 @@ -225,7 +225,7 @@ WaitForNewBlocksPeriod = "3s" [BridgeL2Sync] DBPath = "/tmp/bridgel2sync" -BlockFinality = "latest" +BlockFinality = "LatestBlock" InitialBlockNum = 0 BridgeAddr = "0xB7098a13a48EcE087d3DA15b2D28eCE0f89819B8" SyncBlockChunkSize = 100 @@ -235,7 +235,7 @@ WaitForNewBlocksPeriod = "3s" [LastGERSync] DBPath = "/tmp/lastgersync" -BlockFinality = "latest" +BlockFinality = "LatestBlock" InitialBlockNum = 0 GlobalExitRootL2Addr = "0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa" RetryAfterErrorPeriod = "1s" diff --git a/l1infotreesync/l1infotreesync.go b/l1infotreesync/l1infotreesync.go index f9a04e4c..d2c59fd8 100644 --- a/l1infotreesync/l1infotreesync.go +++ b/l1infotreesync/l1infotreesync.go @@ -22,8 +22,8 @@ type Config struct { GlobalExitRootAddr common.Address `mapstructure:"GlobalExitRootAddr"` RollupManagerAddr common.Address `mapstructure:"RollupManagerAddr"` 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"` + // BlockFinality indicates the status of the blocks that will be queried in order to sync + 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"` diff --git a/lastgersync/lastgersync.go b/lastgersync/lastgersync.go index ae5ec30e..aab54ff1 100644 --- a/lastgersync/lastgersync.go +++ b/lastgersync/lastgersync.go @@ -20,8 +20,8 @@ const ( type Config struct { // DBPath path of the DB DBPath string `mapstructure:"DBPath"` - // TODO: BlockFinality doesnt work as per the jsonschema - BlockFinality string `jsonschema:"enum=latest,enum=safe, enum=pending, enum=finalized" mapstructure:"BlockFinality"` + // BlockFinality indicates the status of the blocks that will be queried in order to sync + BlockFinality string `jsonschema:"enum=LatestBlock, enum=SafeBlock, enum=PendingBlock, enum=FinalizedBlock, enum=EarliestBlock" mapstructure:"BlockFinality"` // InitialBlockNum is the first block that will be queried when starting the synchronization from scratch. // It should be a number equal oir bellow the creation of the bridge contract InitialBlockNum uint64 `mapstructure:"InitialBlockNum"`