Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CDK-387 #32

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions aggoracle/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
10 changes: 5 additions & 5 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,24 @@ DBPath = "/tmp/reorgdetector"
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="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"
Expand All @@ -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
Expand Down
9 changes: 4 additions & 5 deletions l1infotreesync/l1infotreesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
Loading