Skip to content

Commit

Permalink
fix block finality config
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaubennassar committed Aug 14, 2024
1 parent 29c8b74 commit 9b2b245
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions aggoracle/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
4 changes: 2 additions & 2 deletions bridgesync/bridgesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
10 changes: 5 additions & 5 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ DBPath = "/tmp/reorgdetectorl2"
DBPath = "/tmp/L1InfoTreeSync"
GlobalExitRootAddr="0x8464135c8F25Da09e49BC8782676a84730C318bC"
SyncBlockChunkSize=10
BlockFinality="latest"
BlockFinality="LatestBlock"
URLRPCL1="http://test-aggoracle-l1:8545"
WaitForNewBlocksPeriod="100ms"
InitialBlock=0
[AggOracle]
TargetChainType="EVM"
URLRPCL1="http://test-aggoracle-l1:8545"
BlockFinality="latest"
BlockFinality="FinalizedBlock"
WaitPeriodNextGER="100ms"
[AggOracle.EVMSender]
GlobalExitRootL2="0x8464135c8F25Da09e49BC8782676a84730C318bC"
Expand Down Expand Up @@ -215,7 +215,7 @@ WaitForSyncersPeriod = "3s"
[BridgeL1Sync]
DBPath = "/tmp/bridgel1sync"
BlockFinality = "latest"
BlockFinality = "LatestBlock"
InitialBlockNum = 0
BridgeAddr = "0xB7098a13a48EcE087d3DA15b2D28eCE0f89819B8"
SyncBlockChunkSize = 100
Expand All @@ -225,7 +225,7 @@ WaitForNewBlocksPeriod = "3s"
[BridgeL2Sync]
DBPath = "/tmp/bridgel2sync"
BlockFinality = "latest"
BlockFinality = "LatestBlock"
InitialBlockNum = 0
BridgeAddr = "0xB7098a13a48EcE087d3DA15b2D28eCE0f89819B8"
SyncBlockChunkSize = 100
Expand All @@ -235,7 +235,7 @@ WaitForNewBlocksPeriod = "3s"
[LastGERSync]
DBPath = "/tmp/lastgersync"
BlockFinality = "latest"
BlockFinality = "LatestBlock"
InitialBlockNum = 0
GlobalExitRootL2Addr = "0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa"
RetryAfterErrorPeriod = "1s"
Expand Down
4 changes: 2 additions & 2 deletions l1infotreesync/l1infotreesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
4 changes: 2 additions & 2 deletions lastgersync/lastgersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 9b2b245

Please sign in to comment.