diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index 98b1640..0f6fa42 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -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 diff --git a/config/default.go b/config/default.go index d173b55..acf7f57 100644 --- a/config/default.go +++ b/config/default.go @@ -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] ` diff --git a/go.mod b/go.mod index cde3c35..c92868c 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 597dac6..a6c99f0 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/test/config/test.aggregator.config.toml b/test/config/test.aggregator.config.toml index c96f5eb..5948fbc 100644 --- a/test/config/test.aggregator.config.toml +++ b/test/config/test.aggregator.config.toml @@ -11,6 +11,7 @@ SenderAddress = "0x3f2963d678442c4af27a797453b64ef6ce9443e9" CleanupLockedProofsInterval = "2m" GeneratingProofCleanupThreshold = "10m" ForkId = 9 +GasOffset = 0 WitnessURL = "http://zkevm-erigon-seq:8123" UseL1BatchData = true UseFullWitness = false @@ -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"}, ] @@ -42,6 +42,8 @@ UseFullWitness = false MaxGasPriceLimit = 0 PersistenceFilename = "" ReadPendingL1Txs = false + SafeStatusL1NumberOfBlocks = 0 + FinalizedStatusL1NumberOfBlocks = 0 [Aggregator.EthTxManager.Etherman] URL = "" L1ChainID = 11155111