Skip to content

Commit

Permalink
fix config (#83)
Browse files Browse the repository at this point in the history
* fix config

* dafult config values

* update lib
  • Loading branch information
ToniRamirezM authored Jun 11, 2024
1 parent 2ed1cde commit 611b4f1
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 8 deletions.
4 changes: 2 additions & 2 deletions aggregator/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ func (a *Aggregator) handleReceivedDataStream(entry *datastreamer.FileEntry, cli

if common.Bytes2Hex(batchl2Data) != common.Bytes2Hex(virtualBatch.BatchL2Data) {
log.Warnf("BatchL2Data from L1 and data stream are different for batch %d", a.currentStreamBatch.BatchNumber)
log.Debugf("DataStream BatchL2Data:%v", common.Bytes2Hex(batchl2Data))
log.Debugf("L1 BatchL2Data:%v", common.Bytes2Hex(virtualBatch.BatchL2Data))
log.Warnf("DataStream BatchL2Data:%v", common.Bytes2Hex(batchl2Data))
log.Warnf("L1 BatchL2Data:%v", common.Bytes2Hex(virtualBatch.BatchL2Data))
}

// Ger L1InfoRoot
Expand Down
67 changes: 67 additions & 0 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,71 @@ package config

// DefaultValues is the default configuration
const DefaultValues = `
[Aggregator]
Host = "0.0.0.0"
Port = 50081
RetryTime = "5s"
VerifyProofInterval = "10s"
TxProfitabilityCheckerType = "acceptall"
TxProfitabilityMinReward = "1.1"
ProofStatePollingInterval = "5s"
SenderAddress = ""
CleanupLockedProofsInterval = "2m"
GeneratingProofCleanupThreshold = "10m"
ForkId = 9
GasOffset = 0
WitnessURL = "localhost:8123"
UseL1BatchData = false
UseFullWitness = false
[Aggregator.DB]
Name = "aggregator_db"
User = "aggregator_user"
Password = "aggregator_password"
Host = "zkevm-db"
Port = "5432"
EnableLog = false
MaxConns = 200
[Aggregator.Log]
Environment = "development" # "production" or "development"
Level = "info"
Outputs = ["stderr"]
[Aggregator.StreamClient]
Server = "localhost:6900"
[Aggregator.EthTxManager]
FrequencyToMonitorTxs = "1s"
WaitTxToBeMined = "2m"
GetReceiptMaxTime = "250ms"
GetReceiptWaitInterval = "1s"
PrivateKeys = [
{Path = "/pk/aggregator.keystore", Password = "testonly"},
]
ForcedGas = 0
GasPriceMarginFactor = 1
MaxGasPriceLimit = 0
PersistenceFilename = ""
ReadPendingL1Txs = false
SafeStatusL1NumberOfBlocks = 0
FinalizedStatusL1NumberOfBlocks = 0
[Aggregator.EthTxManager.Etherman]
URL = ""
L1ChainID = 11155111
HTTPHeaders = []
[Aggregator.Synchronizer]
[Aggregator.Synchronizer.DB]
Name = "sync_db"
User = "sync_user"
Password = "sync_password"
Host = "zkevm-db"
Port = "5432"
EnableLog = false
MaxConns = 10
[Aggregator.Synchronizer.Synchronizer]
SyncInterval = "10s"
SyncChunkSize = 1000
GenesisBlockNumber = 5511080
SyncUpToBlock = "finalized"
BlockFinality = "finalized"
[EventLog]
[EventLog.DB]
`
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21.3
require (
github.com/0xPolygonHermez/zkevm-data-streamer v0.2.2
github.com/0xPolygonHermez/zkevm-ethtx-manager v0.1.9
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.3
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.4
github.com/ethereum/go-ethereum v1.14.5
github.com/gobuffalo/packr/v2 v2.8.3
github.com/hermeznetwork/tracerr v0.3.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ github.com/0xPolygonHermez/zkevm-data-streamer v0.2.2 h1:XRMTk+W6vtJVGVjuEznfWyN
github.com/0xPolygonHermez/zkevm-data-streamer v0.2.2/go.mod h1:0QkAXcFa92mFJrCbN3UPUJGJYes851yEgYHLONnaosE=
github.com/0xPolygonHermez/zkevm-ethtx-manager v0.1.9 h1:vrAezzwTNke6NroDAltGh1k2AJ6ibmZPBsG0bCltbRc=
github.com/0xPolygonHermez/zkevm-ethtx-manager v0.1.9/go.mod h1:pRqfLQVM3nbzdhy3buqjAgcVyNDKAXOHqTSgkwiKpic=
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.3 h1:PY7SdTyg07TmZPO+jlsMKDk4gq2rvKXGkldEH7dp7cs=
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.3/go.mod h1:fAwP9VXeKdUY7gJu6S4sus72CtPFUEB7+BYFSJYMu8s=
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.4 h1:ovSpYnlOjraL33J61knxVGc20PHdPQaO1BCEDAqZSpg=
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.4/go.mod h1:fAwP9VXeKdUY7gJu6S4sus72CtPFUEB7+BYFSJYMu8s=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
Expand Down
8 changes: 5 additions & 3 deletions test/config/test.aggregator.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SenderAddress = "0x3f2963d678442c4af27a797453b64ef6ce9443e9"
CleanupLockedProofsInterval = "2m"
GeneratingProofCleanupThreshold = "10m"
ForkId = 9
GasOffset = 0
WitnessURL = "http://zkevm-erigon-seq:8123"
UseL1BatchData = true
UseFullWitness = false
Expand All @@ -31,9 +32,8 @@ UseFullWitness = false
[Aggregator.EthTxManager]
FrequencyToMonitorTxs = "1s"
WaitTxToBeMined = "2m"
ConsolidationL1ConfirmationBlocks = 5
FinalizationL1ConfirmationBlocks = 10
WaitReceiptToBeGenerated = "8s"
GetReceiptMaxTime = "250ms"
GetReceiptWaitInterval = "1s"
PrivateKeys = [
{Path = "/pk/aggregator.keystore", Password = "testonly"},
]
Expand All @@ -42,6 +42,8 @@ UseFullWitness = false
MaxGasPriceLimit = 0
PersistenceFilename = ""
ReadPendingL1Txs = false
SafeStatusL1NumberOfBlocks = 0
FinalizedStatusL1NumberOfBlocks = 0
[Aggregator.EthTxManager.Etherman]
URL = ""
L1ChainID = 11155111
Expand Down

0 comments on commit 611b4f1

Please sign in to comment.