diff --git a/cmd/config.go b/cmd/config.go new file mode 100644 index 00000000..38619de7 --- /dev/null +++ b/cmd/config.go @@ -0,0 +1,26 @@ +package main + +import ( + "os" + "strings" + + "github.com/0xPolygon/cdk/config" + "github.com/urfave/cli/v2" +) + +func configCmd(cliCtx *cli.Context) error { + // String buffer to concatenate all the default config vars + defaultConfig := strings.Builder{} + defaultConfig.WriteString(config.DefaultMandatoryVars) + if !cliCtx.Bool(config.FlagMinConfig) { + defaultConfig.WriteString(config.DefaultVars) + defaultConfig.WriteString(config.DefaultValues) + } + + _, err := os.Stdout.WriteString(defaultConfig.String()) + if err != nil { + return err + } + + return nil +} diff --git a/cmd/main.go b/cmd/main.go index 15b0fdc6..d8b3c302 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -62,6 +62,13 @@ var ( Usage: "Allow that config-files contains deprecated fields", Required: false, } + + minConfigFlag = cli.BoolFlag{ + Name: config.FlagMinConfig, + Aliases: []string{"m"}, + Usage: "Output minimal mandatory configuration", + Required: false, + } ) func main() { @@ -90,6 +97,13 @@ func main() { Action: start, Flags: append(flags, &customNetworkFlag), }, + { + Name: "config", + Aliases: []string{}, + Usage: "Output a default configuration file", + Action: configCmd, + Flags: []cli.Flag{&minConfigFlag}, + }, } err := app.Run(os.Args) diff --git a/config/config.go b/config/config.go index 9363b93b..ce44656a 100644 --- a/config/config.go +++ b/config/config.go @@ -58,6 +58,8 @@ const ( FlagDisableDefaultConfigVars = "disable-default-config-vars" // FlagAllowDeprecatedFields is the flag to allow deprecated fields FlagAllowDeprecatedFields = "allow-deprecated-fields" + // FlagMinConfig is the flag to print minimal configuration + FlagMinConfig = "min" deprecatedFieldSyncDB = "Aggregator.Synchronizer.DB is deprecated. Use Aggregator.Synchronizer.SQLDB instead." diff --git a/config/default.go b/config/default.go index 2cb8c1eb..014c96a8 100644 --- a/config/default.go +++ b/config/default.go @@ -1,47 +1,135 @@ package config -// This values doesnt have a default value because depend on the -// environment / deployment +// These values don't have default values because they depend on the environment +// or deployment settings const DefaultMandatoryVars = ` +# ------------------------------------------------------------------------------ +# Layer 1 (Ethereum) RPC provider URL +# ------------------------------------------------------------------------------ L1URL = "http://localhost:8545" + +# ------------------------------------------------------------------------------ +# Layer 2 Sequencer RPC URL +# Usually running on the same machine as cdk-node +# ------------------------------------------------------------------------------ L2URL = "http://localhost:8123" + +# ------------------------------------------------------------------------------ +# AggLayerURL is the Agglayer URL +# ------------------------------------------------------------------------------ AggLayerURL = "https://agglayer-dev.polygon.technology" +# ------------------------------------------------------------------------------ +# ForkId is the fork id of the chain +# ------------------------------------------------------------------------------ +ForkId = 12 + +# ------------------------------------------------------------------------------ +# ContractVersions is the version of the contracts used in the chain +# ------------------------------------------------------------------------------ +ContractVersions = "banana" -ForkId = 9 -ContractVersions = "elderberry" +# ------------------------------------------------------------------------------ +# IsValidiumMode should be set to true, if we are dealing with the validium chain +# ------------------------------------------------------------------------------ IsValidiumMode = false +# ------------------------------------------------------------------------------ +# L2Coinbase is the address that will receive the fees +# ------------------------------------------------------------------------------ L2Coinbase = "0xfa3b44587990f97ba8b6ba7e230a5f0e95d14b3d" + +# ------------------------------------------------------------------------------ +# SequencerPrivateKeyPath is the path to the sequencer private key +# ------------------------------------------------------------------------------ SequencerPrivateKeyPath = "/app/sequencer.keystore" + +# ------------------------------------------------------------------------------ +# SequencerPrivateKeyPassword is the password to the sequencer private key +# ------------------------------------------------------------------------------ SequencerPrivateKeyPassword = "test" + +# ------------------------------------------------------------------------------ +# WitnessURL is the URL of the RPC node that will be used to get the witness +# ------------------------------------------------------------------------------ WitnessURL = "http://localhost:8123" +# ------------------------------------------------------------------------------ +# AggregatorPrivateKeyPath is the path to the aggregator private key +# ------------------------------------------------------------------------------ AggregatorPrivateKeyPath = "/app/keystore/aggregator.keystore" + +# ------------------------------------------------------------------------------ +# AggregatorPrivateKeyPassword is the password that unlocks the aggregator private key +# ------------------------------------------------------------------------------ AggregatorPrivateKeyPassword = "testonly" -# Who send Proof to L1? AggLayer addr, or aggregator addr? + +# ------------------------------------------------------------------------------ +# SenderProofToL1Addr is the address that sends the proof to L1 +# ------------------------------------------------------------------------------ SenderProofToL1Addr = "0x0000000000000000000000000000000000000000" -polygonBridgeAddr = "0x0000000000000000000000000000000000000000" +# ------------------------------------------------------------------------------ +# polygonBridgeAddr is the address of the bridge contract +# ------------------------------------------------------------------------------ +polygonBridgeAddr = "0x0000000000000000000000000000000000000000" -# This values can be override directly from genesis.json +# ------------------------------------------------------------------------------ +# These values can be overridden directly from genesis.json +# rollupCreationBlockNumber is the block number where the rollup contract was created +# ------------------------------------------------------------------------------ rollupCreationBlockNumber = 0 + +# ------------------------------------------------------------------------------ +# rollupManagerCreationBlockNumber is the block number where the rollup manager contract was created +# ------------------------------------------------------------------------------ rollupManagerCreationBlockNumber = 0 + +# ------------------------------------------------------------------------------ +# genesisBlockNumber is the block number of the genesis block +# ------------------------------------------------------------------------------ genesisBlockNumber = 0 + +# ------------------------------------------------------------------------------ +# These values are used to configure the L1 network +# ------------------------------------------------------------------------------ [L1Config] - chainId = 0 - polygonZkEVMGlobalExitRootAddress = "0x0000000000000000000000000000000000000000" - polygonRollupManagerAddress = "0x0000000000000000000000000000000000000000" - polTokenAddress = "0x0000000000000000000000000000000000000000" - polygonZkEVMAddress = "0x0000000000000000000000000000000000000000" + # ---------------------------------------------------------------------------- + # chainId is the chain id of the L1 network + # ---------------------------------------------------------------------------- + chainId = 0 + # ---------------------------------------------------------------------------- + # polygonZkEVMGlobalExitRootAddress is the address of the global exit root contract + # ---------------------------------------------------------------------------- + polygonZkEVMGlobalExitRootAddress = "0x0000000000000000000000000000000000000000" -[L2Config] - GlobalExitRootAddr = "0x0000000000000000000000000000000000000000" + # ---------------------------------------------------------------------------- + # polygonRollupManagerAddress is the address of the rollup manager contract + # ---------------------------------------------------------------------------- + polygonRollupManagerAddress = "0x0000000000000000000000000000000000000000" + + # ---------------------------------------------------------------------------- + # polTokenAddress is the address of the POL token + # ---------------------------------------------------------------------------- + polTokenAddress = "0x0000000000000000000000000000000000000000" + + # ---------------------------------------------------------------------------- + # polygonZkEVMAddress is the address of the ZkEVM contract + # ---------------------------------------------------------------------------- + polygonZkEVMAddress = "0x0000000000000000000000000000000000000000" +# ------------------------------------------------------------------------------ +# These values are used to configure the L2 network +# ------------------------------------------------------------------------------ +[L2Config] + # ---------------------------------------------------------------------------- + # GlobalExitRootAddr is the address of the global exit root contract + # ---------------------------------------------------------------------------- + GlobalExitRootAddr = "0x0000000000000000000000000000000000000000" ` -// This doesnt below to config, but are the vars used +// This doesn't belong to config, but are the vars used // to avoid repetition in config-files const DefaultVars = ` PathRWData = "/tmp/cdk" @@ -51,296 +139,1308 @@ L1URLSyncChunkSize = 100 // DefaultValues is the default configuration const DefaultValues = ` +# This is the default configuration for the cdk-node + +# ------------------------------------------------------------------------------ +# ForkUpgradeBatchNumber is the batch number of the fork upgrade +# when the batch number is reached the node will stop to allow the fork upgrade +# ------------------------------------------------------------------------------ ForkUpgradeBatchNumber = 0 -ForkUpgradeNewForkId = 0 +# ------------------------------------------------------------------------------ +# ForkUpgradeNewForkId is the new fork id that will be used after the fork upgrade +# ------------------------------------------------------------------------------ +ForkUpgradeNewForkId = 0 +# ------------------------------------------------------------------------------ +# Log configuration +# ------------------------------------------------------------------------------ [Log] -Environment = "development" # "production" or "development" -Level = "info" -Outputs = ["stderr"] + # ---------------------------------------------------------------------------- + # Environment is the environment where the node is running + # ---------------------------------------------------------------------------- + Environment = "development" # "production" or "development" + + # ---------------------------------------------------------------------------- + # Level is the log level + # ---------------------------------------------------------------------------- + Level = "info" + + # ---------------------------------------------------------------------------- + # Outputs are the outputs where the logs will be written + # ---------------------------------------------------------------------------- + Outputs = ["stderr"] +# ------------------------------------------------------------------------------ +# Etherman configuration +# ------------------------------------------------------------------------------ [Etherman] - URL="{{L1URL}}" - ForkIDChunkSize={{L1URLSyncChunkSize}} - [Etherman.EthermanConfig] - URL="{{L1URL}}" - MultiGasProvider=false - L1ChainID={{NetworkConfig.L1.L1ChainID}} - HTTPHeaders=[] - [Etherman.EthermanConfig.Etherscan] - ApiKey="" - Url="https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=" + # ---------------------------------------------------------------------------- + # URL is the URL of the L1 RPC node, usually an Ethereum node or an RPC provider + # ---------------------------------------------------------------------------- + URL="{{L1URL}}" + + # ---------------------------------------------------------------------------- + # ForkIDChunkSize is the chunk size used to get the fork id. + # This depends on the RPC provider, some providers don't support big chunk sizes + # so this should be adjusted to what the provider supports + # ---------------------------------------------------------------------------- + ForkIDChunkSize={{L1URLSyncChunkSize}} + + # ---------------------------------------------------------------------------- + # EthermanConfig is the configuration of the Etherman + # ---------------------------------------------------------------------------- + [Etherman.EthermanConfig] + # ---------------------------------------------------------------------------- + # URL is the URL of the L1 RPC node, usually an Ethereum node or an RPC provider + # ---------------------------------------------------------------------------- + URL="{{L1URL}}" + + # ---------------------------------------------------------------------------- + # MultiGasProvider is used to get the gas price from multiple providers + # ---------------------------------------------------------------------------- + MultiGasProvider=false + + # ---------------------------------------------------------------------------- + # L1ChainID is the chain id of the L1 network + # ---------------------------------------------------------------------------- + L1ChainID={{NetworkConfig.L1.L1ChainID}} + + # ---------------------------------------------------------------------------- + # HTTPHeaders additional headers that will be used in the HTTP requests + # ---------------------------------------------------------------------------- + HTTPHeaders=[] + + [Etherman.EthermanConfig.Etherscan] + ApiKey="" + Url="https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=" +# ------------------------------------------------------------------------------ +# Common configuration +# ------------------------------------------------------------------------------ [Common] -NetworkID = 1 -IsValidiumMode = {{IsValidiumMode}} -ContractVersions = "{{ContractVersions}}" + # ---------------------------------------------------------------------------- + # NetworkID is the network id of the CDK chain + # ---------------------------------------------------------------------------- + NetworkID = 1 + + # ---------------------------------------------------------------------------- + # IsValidiumMode is true if the chain is a Validium chain, false if it's a Rollup chain + # ---------------------------------------------------------------------------- + IsValidiumMode = {{IsValidiumMode}} + + # ---------------------------------------------------------------------------- + # Versions of the contracts used in the chain + # ---------------------------------------------------------------------------- + ContractVersions = "{{ContractVersions}}" +# ------------------------------------------------------------------------------ +# SequenceSender configuration +# ------------------------------------------------------------------------------ [SequenceSender] -WaitPeriodSendSequence = "15s" -LastBatchVirtualizationTimeMaxWaitPeriod = "10s" -L1BlockTimestampMargin = "30s" -MaxTxSizeForL1 = 131072 -L2Coinbase = "{{L2Coinbase}}" -PrivateKey = { Path = "{{SequencerPrivateKeyPath}}", Password = "{{SequencerPrivateKeyPassword}}"} -SequencesTxFileName = "sequencesender.json" -GasOffset = 80000 -WaitPeriodPurgeTxFile = "15m" -MaxPendingTx = 1 -MaxBatchesForL1 = 300 -BlockFinality = "FinalizedBlock" -RPCURL = "{{L2URL}}" -GetBatchWaitInterval = "10s" - [SequenceSender.EthTxManager] - FrequencyToMonitorTxs = "1s" - WaitTxToBeMined = "2m" - GetReceiptMaxTime = "250ms" - GetReceiptWaitInterval = "1s" - PrivateKeys = [ - {Path = "{{SequencerPrivateKeyPath}}", Password = "{{SequencerPrivateKeyPassword}}"}, - ] - ForcedGas = 0 - GasPriceMarginFactor = 1 - MaxGasPriceLimit = 0 - StoragePath = "ethtxmanager.sqlite" - ReadPendingL1Txs = false - SafeStatusL1NumberOfBlocks = 0 - FinalizedStatusL1NumberOfBlocks = 0 - [SequenceSender.EthTxManager.Etherman] - URL = "{{L1URL}}" - MultiGasProvider = false - L1ChainID = {{NetworkConfig.L1.L1ChainID}} + # ---------------------------------------------------------------------------- + # WaitPeriodSendSequence is the wait period between sending sequences + # ---------------------------------------------------------------------------- + WaitPeriodSendSequence = "15s" + + # ---------------------------------------------------------------------------- + # LastBatchVirtualizationTimeMaxWaitPeriod is the max wait period to virtualize the last batch + # ---------------------------------------------------------------------------- + LastBatchVirtualizationTimeMaxWaitPeriod = "10s" + + # ---------------------------------------------------------------------------- + # L1BlockTimestampMargin is the margin of the L1 block timestamp + # ---------------------------------------------------------------------------- + L1BlockTimestampMargin = "30s" + + # ---------------------------------------------------------------------------- + # MaxTxSizeForL1 is the max size of the transaction that will be sent to L1 + # ---------------------------------------------------------------------------- + MaxTxSizeForL1 = 131072 + + # ---------------------------------------------------------------------------- + # L2Coinbase is the address that will receive the fees + # ---------------------------------------------------------------------------- + L2Coinbase = "{{L2Coinbase}}" + + # ---------------------------------------------------------------------------- + # PrivateKey is the private key of the sequence-sender + # ---------------------------------------------------------------------------- + PrivateKey = { Path = "{{SequencerPrivateKeyPath}}", Password = "{{SequencerPrivateKeyPassword}}" } + + # ---------------------------------------------------------------------------- + # SequencesTxFileName is the file name to store sequences sent to L1 + # ---------------------------------------------------------------------------- + SequencesTxFileName = "sequencesender.json" + + # ---------------------------------------------------------------------------- + # GasOffset is the amount of gas to be added to the gas estimation in order + # to provide an amount that is higher than the estimated one. This is used + # to avoid the TX getting reverted in case something has changed in the network + # state after the estimation which can cause the TX to require more gas to be + # executed. + # + # ex: + # gas estimation: 1000 + # gas offset: 100 + # final gas: 1100 + # ---------------------------------------------------------------------------- + GasOffset = 80000 + + # ---------------------------------------------------------------------------- + # WaitPeriodPurgeTxFile is the wait period to purge the tx file + # ---------------------------------------------------------------------------- + WaitPeriodPurgeTxFile = "15m" + + # ---------------------------------------------------------------------------- + # MaxPendingTx is the max number of pending transactions + # ---------------------------------------------------------------------------- + MaxPendingTx = 1 + + # ---------------------------------------------------------------------------- + # MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx + # ---------------------------------------------------------------------------- + MaxBatchesForL1 = 300 + + # ---------------------------------------------------------------------------- + # BlockFinality indicates the status of the blocks that will be queried in order to sync + # ---------------------------------------------------------------------------- + BlockFinality = "FinalizedBlock" + + # ---------------------------------------------------------------------------- + # RPCURL is the URL of the L2 RPC node + # ---------------------------------------------------------------------------- + RPCURL = "{{L2URL}}" + + # ---------------------------------------------------------------------------- + # GetBatchWaitInterval is the time to wait to query for a new batch when there are no more batches available + # ---------------------------------------------------------------------------- + GetBatchWaitInterval = "10s" + + [SequenceSender.EthTxManager] + # ---------------------------------------------------------------------------- + # FrequencyToMonitorTxs frequency of the resending failed txs + # ---------------------------------------------------------------------------- + FrequencyToMonitorTxs = "1s" + + # ---------------------------------------------------------------------------- + # WaitTxToBeMined time to wait after transaction was sent to the ethereum + # ---------------------------------------------------------------------------- + WaitTxToBeMined = "2m" + + # ---------------------------------------------------------------------------- + # GetReceiptMaxTime is the max time to wait to get the receipt of the mined transaction + # ---------------------------------------------------------------------------- + GetReceiptMaxTime = "250ms" + + # ---------------------------------------------------------------------------- + # GetReceiptWaitInterval is the time to sleep before trying to get the receipt of the mined transaction + # ---------------------------------------------------------------------------- + GetReceiptWaitInterval = "1s" + + # ---------------------------------------------------------------------------- + # PrivateKeys defines all the key store files that are going + # to be read in order to provide the private keys to sign the L1 txs + # ---------------------------------------------------------------------------- + PrivateKeys = [ + {Path = "{{SequencerPrivateKeyPath}}", Password = "{{SequencerPrivateKeyPassword}}"}, + ] + + # ---------------------------------------------------------------------------- + # ForcedGas is the amount of gas to be forced in case of gas estimation error + # ---------------------------------------------------------------------------- + ForcedGas = 0 + + # ---------------------------------------------------------------------------- + # GasPriceMarginFactor is used to multiply the suggested gas price provided by the network + # in order to allow a different gas price to be set for all the transactions and making it + # easier to have the txs prioritized in the pool, default value is 1. + # + # ex: + # suggested gas price: 100 + # GasPriceMarginFactor: 1 + # gas price = 100 + # + # suggested gas price: 100 + # GasPriceMarginFactor: 1.1 + # gas price = 110 + # ---------------------------------------------------------------------------- + GasPriceMarginFactor = 1 + + # ---------------------------------------------------------------------------- + # MaxGasPriceLimit helps avoiding transactions to be sent over a specified + # gas price amount, default value is 0, which means no limit. + # If the gas price provided by the network and adjusted by the GasPriceMarginFactor + # is greater than this configuration, transaction will have its gas price set to + # the value configured in this config as the limit. + # + # ex: + # + # suggested gas price: 100 + # gas price margin factor: 20% + # max gas price limit: 150 + # tx gas price = 120 + # + # suggested gas price: 100 + # gas price margin factor: 20% + # max gas price limit: 110 + # tx gas price = 110 + # ---------------------------------------------------------------------------- + MaxGasPriceLimit = 0 + + # ---------------------------------------------------------------------------- + # StoragePath is the path of the internal storage + # ---------------------------------------------------------------------------- + StoragePath = "ethtxmanager.sqlite" + + # ---------------------------------------------------------------------------- + # ReadPendingL1Txs is a flag to enable the reading of pending L1 txs + # It can only be enabled if DBPath is empty + # ---------------------------------------------------------------------------- + ReadPendingL1Txs = false + + # ---------------------------------------------------------------------------- + # SafeStatusL1NumberOfBlocks overwrites the number of blocks to consider a tx as safe + # overwriting the default value provided by the network + # 0 means that the default value will be used + # ---------------------------------------------------------------------------- + SafeStatusL1NumberOfBlocks = 0 + + # ---------------------------------------------------------------------------- + # FinalizedStatusL1NumberOfBlocks overwrites the number of blocks to consider a tx as finalized + # overwriting the default value provided by the network + # 0 means that the default value will be used + # ---------------------------------------------------------------------------- + FinalizedStatusL1NumberOfBlocks = 0 + + [SequenceSender.EthTxManager.Etherman] + # ---------------------------------------------------------------------------- + # URL is the URL of the Ethereum node for L1 + # ---------------------------------------------------------------------------- + URL = "{{L1URL}}" + + # ---------------------------------------------------------------------------- + # # MultiGasProvider allows that L1 gas price calculation use multiple sources + # ---------------------------------------------------------------------------- + MultiGasProvider = false + + # ---------------------------------------------------------------------------- + # L1ChainID is the chain ID of the L1 + # ---------------------------------------------------------------------------- + L1ChainID = {{NetworkConfig.L1.L1ChainID}} [Aggregator] -# GRPC server host -Host = "0.0.0.0" -# GRPC server port -Port = 50081 -RetryTime = "5s" -VerifyProofInterval = "10s" -ProofStatePollingInterval = "5s" -TxProfitabilityCheckerType = "acceptall" -TxProfitabilityMinReward = "1.1" -IntervalAfterWhichBatchConsolidateAnyway="0s" -BatchProofSanityCheckEnabled = true -# ChainID is L2ChainID. Is populated on runtimme -ChainID = 0 -ForkId = {{ForkId}} -SenderAddress = "{{SenderProofToL1Addr}}" -CleanupLockedProofsInterval = "2m" -GeneratingProofCleanupThreshold = "10m" -GasOffset = 0 -RPCURL = "{{L2URL}}" -WitnessURL = "{{WitnessURL}}" -UseFullWitness = false -SettlementBackend = "l1" -AggLayerTxTimeout = "5m" -AggLayerURL = "{{AggLayerURL}}" -SyncModeOnlyEnabled = false -DBPath = "{{PathRWData}}/aggregator_db.sqlite" - [Aggregator.SequencerPrivateKey] - Path = "{{SequencerPrivateKeyPath}}" - Password = "{{SequencerPrivateKeyPassword}}" - [Aggregator.Log] - Environment ="{{Log.Environment}}" # "production" or "development" - Level = "{{Log.Level}}" - Outputs = ["stderr"] - [Aggregator.EthTxManager] - FrequencyToMonitorTxs = "1s" - WaitTxToBeMined = "2m" - GetReceiptMaxTime = "250ms" - GetReceiptWaitInterval = "1s" - PrivateKeys = [ - {Path = "{{AggregatorPrivateKeyPath}}", Password = "{{AggregatorPrivateKeyPassword}}"}, - ] - ForcedGas = 0 - GasPriceMarginFactor = 1 - MaxGasPriceLimit = 0 - StoragePath = "" - ReadPendingL1Txs = false - SafeStatusL1NumberOfBlocks = 0 - FinalizedStatusL1NumberOfBlocks = 0 - [Aggregator.EthTxManager.Etherman] - URL = "{{L1URL}}" - L1ChainID = {{NetworkConfig.L1.L1ChainID}} - HTTPHeaders = [] - [Aggregator.Synchronizer] - [Aggregator.Synchronizer.Log] - Environment = "{{Log.Environment}}" # "production" or "development" - Level = "{{Log.Level}}" - Outputs = ["stderr"] - [Aggregator.Synchronizer.SQLDB] - DriverName = "sqlite3" - DataSource = "file:{{PathRWData}}/aggregator_sync_db.sqlite" - [Aggregator.Synchronizer.Synchronizer] - SyncInterval = "10s" - SyncChunkSize = 1000 - GenesisBlockNumber = {{genesisBlockNumber}} - SyncUpToBlock = "finalized" - BlockFinality = "finalized" - OverrideStorageCheck = false - [Aggregator.Synchronizer.Etherman] - L1URL = "{{L1URL}}" - ForkIDChunkSize = 100 - L1ChainID = {{NetworkConfig.L1.L1ChainID}} - PararellBlockRequest = false - [Aggregator.Synchronizer.Etherman.Contracts] - GlobalExitRootManagerAddr = "{{NetworkConfig.L1.GlobalExitRootManagerAddr}}" - RollupManagerAddr = "{{NetworkConfig.L1.RollupManagerAddr}}" - ZkEVMAddr = "{{NetworkConfig.L1.ZkEVMAddr}}" - [Aggregator.Synchronizer.Etherman.Validium] - Enabled = {{IsValidiumMode}} - # L2URL, empty ask to contract - TrustedSequencerURL = "" - RetryOnDACErrorInterval = "1m" - DataSourcePriority = ["trusted", "external"] - [Aggregator.Synchronizer.Etherman.Validium.Translator] - FullMatchRules = [] - [Aggregator.Synchronizer.Etherman.Validium.RateLimit] - NumRequests = 1000 - Interval = "1s" + # ------------------------------------------------------------------------------ + # Host denotes GRPC server IP address + # ------------------------------------------------------------------------------ + Host = "0.0.0.0" + + # ------------------------------------------------------------------------------ + # Port denotes the GRPC server port + # ------------------------------------------------------------------------------ + Port = 50081 + + # ------------------------------------------------------------------------------ + # RetryTime is the time the aggregator main loop sleeps if there are no proofs to aggregate + # or batches to generate proofs. It is also used in the isSynced loop + # ------------------------------------------------------------------------------ + RetryTime = "5s" + + # ------------------------------------------------------------------------------ + # VerifyProofInterval is the interval of time to verify/send a proof in L1 + # ------------------------------------------------------------------------------ + VerifyProofInterval = "10s" + + # ------------------------------------------------------------------------------ + # ProofStatePollingInterval is the interval time to polling the prover about the generation state of a proof + # ------------------------------------------------------------------------------ + ProofStatePollingInterval = "5s" + + # ------------------------------------------------------------------------------ + # IntervalAfterWhichBatchConsolidateAnyway is the interval duration for the main sequencer to check + # if there are no transactions. If there are no transactions in this interval, the sequencer will + # consolidate the batch anyway. + # ------------------------------------------------------------------------------ + IntervalAfterWhichBatchConsolidateAnyway="0s" + + # ------------------------------------------------------------------------------ + # BatchProofSanityCheckEnabled is a flag to enable the sanity check of the batch proof + # ------------------------------------------------------------------------------ + BatchProofSanityCheckEnabled = true + + # ------------------------------------------------------------------------------ + # ChainID is the L2 ChainID provided by the Network Config + # ------------------------------------------------------------------------------ + ChainID = 0 + + # ------------------------------------------------------------------------------ + # ForkID is the L2 ForkID provided by the Network Config + # ------------------------------------------------------------------------------ + ForkId = {{ForkId}} + + # ------------------------------------------------------------------------------ + # SenderAddress defines which private key the eth tx manager needs to use + # to sign the L1 txs + # ------------------------------------------------------------------------------ + SenderAddress = "{{SenderProofToL1Addr}}" + + # ------------------------------------------------------------------------------ + # CleanupLockedProofsInterval is the interval of time to clean up locked proofs. + # ------------------------------------------------------------------------------ + CleanupLockedProofsInterval = "2m" + + # ------------------------------------------------------------------------------ + # GeneratingProofCleanupThreshold represents the time interval after + # which a proof in generating state is considered to be stuck and + # allowed to be cleared. + # ------------------------------------------------------------------------------ + GeneratingProofCleanupThreshold = "10m" + + # ------------------------------------------------------------------------------ + # GasOffset is the amount of gas to be added to the gas estimation in order + # to provide an amount that is higher than the estimated one. This is used + # to avoid the TX getting reverted in case something has changed in the network + # state after the estimation which can cause the TX to require more gas to be + # executed. + # + # ex: + # gas estimation: 1000 + # gas offset: 100 + # final gas: 1100 + # ------------------------------------------------------------------------------ + GasOffset = 0 + + # ------------------------------------------------------------------------------ + # RPCURL is the URL of the RPC server + # ------------------------------------------------------------------------------ + RPCURL = "{{L2URL}}" + + # ------------------------------------------------------------------------------ + # WitnessURL is the URL of the witness server + # ------------------------------------------------------------------------------ + WitnessURL = "{{WitnessURL}}" + + # ------------------------------------------------------------------------------ + # UseFullWitness is a flag to enable the use of full witness in the aggregator + # ------------------------------------------------------------------------------ + UseFullWitness = false + + # ------------------------------------------------------------------------------ + # SettlementBackend configuration defines how a final ZKP should be settled. + # It can be settled directly to L1 or over Agglayer. + # ------------------------------------------------------------------------------ + SettlementBackend = "l1" + + # ------------------------------------------------------------------------------ + # AggLayerTxTimeout is the interval time to wait for a tx to be mined from the agglayer + # ------------------------------------------------------------------------------ + AggLayerTxTimeout = "5m" + + # ------------------------------------------------------------------------------ + # AggLayerURL is the url of the agglayer service + # ------------------------------------------------------------------------------ + AggLayerURL = "{{AggLayerURL}}" + + # ------------------------------------------------------------------------------ + # SyncModeOnlyEnabled is a flag that activates sync mode exclusively. + # When enabled, the aggregator will sync data only from L1 and will not generate or read the data stream. + # ------------------------------------------------------------------------------ + SyncModeOnlyEnabled = false + + # ------------------------------------------------------------------------------ + # SequencerPrivateKey Private key of the trusted sequencer + # ------------------------------------------------------------------------------ + [Aggregator.SequencerPrivateKey] + Path = "{{SequencerPrivateKeyPath}}" + Password = "{{SequencerPrivateKeyPassword}}" + + [Aggregator.Log] + # ---------------------------------------------------------------------------- + # Environment of the log + # ---------------------------------------------------------------------------- + Environment ="{{Log.Environment}}" # "production" or "development" + + # ---------------------------------------------------------------------------- + # Level of the log + # ---------------------------------------------------------------------------- + Level = "{{Log.Level}}" + + # ---------------------------------------------------------------------------- + # Outputs of the log + # ---------------------------------------------------------------------------- + Outputs = ["stderr"] + + [Aggregator.EthTxManager] + # ---------------------------------------------------------------------------- + # FrequencyToMonitorTxs is the frequency to monitor the txs + # ---------------------------------------------------------------------------- + FrequencyToMonitorTxs = "1s" + + # ---------------------------------------------------------------------------- + # WaitTxToBeMined is the wait period to wait for the tx to be mined + # ---------------------------------------------------------------------------- + WaitTxToBeMined = "2m" + + # ---------------------------------------------------------------------------- + # GetReceiptMaxTime is the max time to get the receipt of the tx + # ---------------------------------------------------------------------------- + GetReceiptMaxTime = "250ms" + + # ---------------------------------------------------------------------------- + # GetReceiptWaitInterval is the wait interval to get the receipt + # ---------------------------------------------------------------------------- + GetReceiptWaitInterval = "1s" + + # ---------------------------------------------------------------------------- + # PrivateKeys is the private keys to use to sign the txs + # ---------------------------------------------------------------------------- + PrivateKeys = [ + {Path = "{{AggregatorPrivateKeyPath}}", Password = "{{AggregatorPrivateKeyPassword}}"}, + ] + + # ---------------------------------------------------------------------------- + # ForcedGas is the forced gas to use in case of gas estimation error + # ---------------------------------------------------------------------------- + ForcedGas = 0 + + # ---------------------------------------------------------------------------- + # GasPriceMarginFactor is the gas price margin factor + # ---------------------------------------------------------------------------- + GasPriceMarginFactor = 1 + + # ---------------------------------------------------------------------------- + # MaxGasPriceLimit is the max gas price limit + # ---------------------------------------------------------------------------- + MaxGasPriceLimit = 0 + + # ---------------------------------------------------------------------------- + # StoragePath is the path of the storage + # ---------------------------------------------------------------------------- + StoragePath = "" + + # ---------------------------------------------------------------------------- + # ReadPendingL1Txs is a flag to enable the reading of pending L1 txs + # ---------------------------------------------------------------------------- + ReadPendingL1Txs = false + + # ---------------------------------------------------------------------------- + # SafeStatusL1NumberOfBlocks overwrites the number of blocks to consider a tx as safe + # overwriting the default value provided by the network + # 0 means that the default value will be used + # ---------------------------------------------------------------------------- + SafeStatusL1NumberOfBlocks = 0 + + # ---------------------------------------------------------------------------- + # FinalizedStatusL1NumberOfBlocks overwrites the number of blocks to consider a tx as finalized + # overwriting the default value provided by the network + # 0 means that the default value will be used + # ---------------------------------------------------------------------------- + FinalizedStatusL1NumberOfBlocks = 0 + + [Aggregator.EthTxManager.Etherman] + # ---------------------------------------------------------------------------- + # URL is the URL of the Ethereum node for L1 + # ---------------------------------------------------------------------------- + URL = "{{L1URL}}" + + # ---------------------------------------------------------------------------- + # allow that L1 gas price calculation use multiple sources + # ---------------------------------------------------------------------------- + MultiGasProvider = false + + # ---------------------------------------------------------------------------- + # L1ChainID is the chain ID of the L1 + # ---------------------------------------------------------------------------- + L1ChainID = {{NetworkConfig.L1.L1ChainID}} + + # ---------------------------------------------------------------------------- + # HTTPHeaders additional headers that will be used in the HTTP requests + # ---------------------------------------------------------------------------- + HTTPHeaders = [] + + [Aggregator.Synchronizer] + [Aggregator.Synchronizer.Log] + # ---------------------------------------------------------------------------- + # Environment of the log + # ---------------------------------------------------------------------------- + Environment = "{{Log.Environment}}" # "production" or "development" + + # ---------------------------------------------------------------------------- + # Level of the log + # ---------------------------------------------------------------------------- + Level = "{{Log.Level}}" + + # ---------------------------------------------------------------------------- + # Outputs of the log + # ---------------------------------------------------------------------------- + Outputs = ["stderr"] + + [Aggregator.Synchronizer.SQLDB] + # ---------------------------------------------------------------------------- + # DriverName of the SQL database + # ---------------------------------------------------------------------------- + DriverName = "sqlite3" + + # ---------------------------------------------------------------------------- + # DataSource of the SQL database + # ---------------------------------------------------------------------------- + DataSource = "file:{{PathRWData}}/aggregator_sync_db.sqlite" + + [Aggregator.Synchronizer.Synchronizer] + # ---------------------------------------------------------------------------- + # SyncInterval is the interval to sync + # ---------------------------------------------------------------------------- + SyncInterval = "10s" + + # ---------------------------------------------------------------------------- + # SyncChunkSize is the chunk size to sync + # ---------------------------------------------------------------------------- + SyncChunkSize = 1000 + + # ---------------------------------------------------------------------------- + # GenesisBlockNumber is the block number of the genesis block + # ---------------------------------------------------------------------------- + GenesisBlockNumber = {{genesisBlockNumber}} + + # ---------------------------------------------------------------------------- + # SyncUpToBlock is the block to sync up to + # ---------------------------------------------------------------------------- + SyncUpToBlock = "finalized" + + # ---------------------------------------------------------------------------- + # BlockFinality is the finality of the block + # ---------------------------------------------------------------------------- + BlockFinality = "finalized" + + # ---------------------------------------------------------------------------- + # OverrideStorageCheck is a flag to override the storage check + # ---------------------------------------------------------------------------- + OverrideStorageCheck = false + + [Aggregator.Synchronizer.Etherman] + # ---------------------------------------------------------------------------- + # L1URL is the URL of the L1 + # ---------------------------------------------------------------------------- + L1URL = "{{L1URL}}" + + # ---------------------------------------------------------------------------- + # ForkIDChunkSize is the chunk size of the fork ID + # ---------------------------------------------------------------------------- + ForkIDChunkSize = 100 + + # ---------------------------------------------------------------------------- + # L1ChainID is the chain ID of the L1 + # ---------------------------------------------------------------------------- + L1ChainID = {{NetworkConfig.L1.L1ChainID}} + + # ---------------------------------------------------------------------------- + # PararellBlockRequest is a flag to enable parallel block requests + # ---------------------------------------------------------------------------- + PararellBlockRequest = false + + [Aggregator.Synchronizer.Etherman.Contracts] + # ---------------------------------------------------------------------------- + # GlobalExitRootManagerAddr is the address of the global exit root manager contract + # ---------------------------------------------------------------------------- + GlobalExitRootManagerAddr = "{{NetworkConfig.L1.GlobalExitRootManagerAddr}}" + + # ---------------------------------------------------------------------------- + # RollupManagerAddr is the address of the rollup manager contract + # ---------------------------------------------------------------------------- + RollupManagerAddr = "{{NetworkConfig.L1.RollupManagerAddr}}" + + # ---------------------------------------------------------------------------- + # ZkEVMAddr is the address of the ZkEVM contract + # ---------------------------------------------------------------------------- + ZkEVMAddr = "{{NetworkConfig.L1.ZkEVMAddr}}" + + [Aggregator.Synchronizer.Etherman.Validium] + # ---------------------------------------------------------------------------- + # Enabled is a flag to enable Validium + # ---------------------------------------------------------------------------- + Enabled = {{IsValidiumMode}} + + # ---------------------------------------------------------------------------- + # TrustedSequencerURL is the URL of the trusted sequencer + # ---------------------------------------------------------------------------- + TrustedSequencerURL = "" + + # ---------------------------------------------------------------------------- + # RetryOnDACErrorInterval is the interval to retry on DAC error + # ---------------------------------------------------------------------------- + RetryOnDACErrorInterval = "1m" + + # ---------------------------------------------------------------------------- + # DataSourcePriority is the priority of the data source + # ---------------------------------------------------------------------------- + DataSourcePriority = ["trusted", "external"] + + [Aggregator.Synchronizer.Etherman.Validium.Translator] + # ---------------------------------------------------------------------------- + # FullMatchRules are the full match rules + # ---------------------------------------------------------------------------- + FullMatchRules = [] + + [Aggregator.Synchronizer.Etherman.Validium.RateLimit] + # ---------------------------------------------------------------------------- + # NumRequests is the number of requests + # ---------------------------------------------------------------------------- + NumRequests = 1000 + + # ---------------------------------------------------------------------------- + # Interval is the interval of the rate limit + # ---------------------------------------------------------------------------- + Interval = "1s" + +# ------------------------------------------------------------------------------ +# ReorgDetectorL1 configuration +# ------------------------------------------------------------------------------ [ReorgDetectorL1] -DBPath = "{{PathRWData}}/reorgdetectorl1.sqlite" + # ---------------------------------------------------------------------------- + # DBPath is the path of the database + # ---------------------------------------------------------------------------- + DBPath = "{{PathRWData}}/reorgdetectorl1.sqlite" +# ------------------------------------------------------------------------------ +# ReorgDetectorL2 configuration +# ------------------------------------------------------------------------------ [ReorgDetectorL2] -DBPath = "{{PathRWData}}/reorgdetectorl2.sqlite" + # ---------------------------------------------------------------------------- + # DBPath is the path of the database + # ---------------------------------------------------------------------------- + DBPath = "{{PathRWData}}/reorgdetectorl2.sqlite" +# ------------------------------------------------------------------------------ +# L1InfoTreeSync configuration +# ------------------------------------------------------------------------------ [L1InfoTreeSync] -DBPath = "{{PathRWData}}/L1InfoTreeSync.sqlite" -GlobalExitRootAddr="{{NetworkConfig.L1.GlobalExitRootManagerAddr}}" -RollupManagerAddr = "{{NetworkConfig.L1.RollupManagerAddr}}" -SyncBlockChunkSize=100 -BlockFinality="LatestBlock" -URLRPCL1="{{L1URL}}" -WaitForNewBlocksPeriod="100ms" -InitialBlock={{genesisBlockNumber}} -RetryAfterErrorPeriod="1s" -MaxRetryAttemptsAfterError=-1 + # ---------------------------------------------------------------------------- + # DBPath is the path of the database + # ---------------------------------------------------------------------------- + DBPath = "{{PathRWData}}/L1InfoTreeSync.sqlite" + + # ---------------------------------------------------------------------------- + # GlobalExitRootAddr is the address of the global exit root manager contract + # ---------------------------------------------------------------------------- + GlobalExitRootAddr="{{NetworkConfig.L1.GlobalExitRootManagerAddr}}" + + # ---------------------------------------------------------------------------- + # RollupManagerAddr is the address of the rollup manager contract + # ---------------------------------------------------------------------------- + RollupManagerAddr = "{{NetworkConfig.L1.RollupManagerAddr}}" + + # ---------------------------------------------------------------------------- + # SyncBlockChunkSize is the chunk size used to sync the blocks + # ---------------------------------------------------------------------------- + SyncBlockChunkSize=100 + + # ---------------------------------------------------------------------------- + # BlockFinality indicates the status of the blocks that will be queried in order to sync + # ---------------------------------------------------------------------------- + BlockFinality="LatestBlock" + + # ---------------------------------------------------------------------------- + # URLRPCL1 is the URL of the L1 RPC node + # ---------------------------------------------------------------------------- + URLRPCL1="{{L1URL}}" + + # ---------------------------------------------------------------------------- + # WaitForNewBlocksPeriod is the wait period to get new blocks + # ---------------------------------------------------------------------------- + WaitForNewBlocksPeriod="100ms" + + # ---------------------------------------------------------------------------- + # InitialBlock is the initial block to start the sync + # ---------------------------------------------------------------------------- + InitialBlock={{rollupManagerCreationBlockNumber}} + + # ---------------------------------------------------------------------------- + # RetryAfterErrorPeriod is the time that will be waited when an unexpected error happens before retry + # ---------------------------------------------------------------------------- + RetryAfterErrorPeriod="1s" + + # ---------------------------------------------------------------------------- + # MaxRetryAttemptsAfterError is the maximum number of consecutive attempts that will happen before panicking. + # Any number smaller than zero will be considered as unlimited retries + # ---------------------------------------------------------------------------- + MaxRetryAttemptsAfterError=-1 +# ------------------------------------------------------------------------------ +# AggOracle configuration +# ------------------------------------------------------------------------------ [AggOracle] -TargetChainType="EVM" -URLRPCL1="{{L1URL}}" -BlockFinality="FinalizedBlock" -WaitPeriodNextGER="100ms" - [AggOracle.EVMSender] - GlobalExitRootL2="{{L2Config.GlobalExitRootAddr}}" - URLRPCL2="{{L2URL}}" - ChainIDL2=1337 - GasOffset=0 - WaitPeriodMonitorTx="100ms" - SenderAddr="0x70997970c51812dc3a010c7d01b50e0d17dc79c8" - [AggOracle.EVMSender.EthTxManager] - FrequencyToMonitorTxs = "1s" - WaitTxToBeMined = "2s" - GetReceiptMaxTime = "250ms" - GetReceiptWaitInterval = "1s" - PrivateKeys = [ - {Path = "/app/keystore/aggoracle.keystore", Password = "testonly"}, - ] - ForcedGas = 0 - GasPriceMarginFactor = 1 - MaxGasPriceLimit = 0 - StoragePath = "{{PathRWData}}/ethtxmanager-sequencesender.sqlite" - ReadPendingL1Txs = false - SafeStatusL1NumberOfBlocks = 5 - FinalizedStatusL1NumberOfBlocks = 10 - [AggOracle.EVMSender.EthTxManager.Etherman] - URL = "{{L2URL}}" - MultiGasProvider = false - L1ChainID = {{NetworkConfig.L1.L1ChainID}} - HTTPHeaders = [] + # ---------------------------------------------------------------------------- + # TargetChainType is the target chain type + # ---------------------------------------------------------------------------- + TargetChainType="EVM" + + # ---------------------------------------------------------------------------- + # URLRPCL1 is the URL of the L1 RPC node + # ---------------------------------------------------------------------------- + URLRPCL1="{{L1URL}}" + + # ---------------------------------------------------------------------------- + # BlockFinality indicates the status of the blocks that will be queried in order to sync + # ---------------------------------------------------------------------------- + BlockFinality="FinalizedBlock" + + # ---------------------------------------------------------------------------- + # WaitPeriodNextGER is the wait period to get the next GER + # ---------------------------------------------------------------------------- + WaitPeriodNextGER="100ms" + + [AggOracle.EVMSender] + # ---------------------------------------------------------------------------- + # GlobalExitRootL2 is the address of the global exit root contract + # ---------------------------------------------------------------------------- + GlobalExitRootL2="{{L2Config.GlobalExitRootAddr}}" + + # ---------------------------------------------------------------------------- + # URLRPCL2 is the URL of the L2 RPC node + # ---------------------------------------------------------------------------- + URLRPCL2="{{L2URL}}" + + # ---------------------------------------------------------------------------- + # ChainIDL2 is the chain id of the L2 network + # ---------------------------------------------------------------------------- + ChainIDL2=1337 + + # ---------------------------------------------------------------------------- + # GasOffset is the gas offset to use when sending the txs + # ---------------------------------------------------------------------------- + GasOffset=0 + + # ---------------------------------------------------------------------------- + # WaitPeriodMonitorTx is the wait period to monitor the txs + # ---------------------------------------------------------------------------- + WaitPeriodMonitorTx="100ms" + + # ---------------------------------------------------------------------------- + # SenderAddr is the address of the sender + # ---------------------------------------------------------------------------- + SenderAddr="0x70997970c51812dc3a010c7d01b50e0d17dc79c8" + + # ---------------------------------------------------------------------------- + # EthTxManager is the configuration of the EthTxManager + # ---------------------------------------------------------------------------- + [AggOracle.EVMSender.EthTxManager] + # ---------------------------------------------------------------------------- + # FrequencyToMonitorTxs is the frequency to monitor the txs + # ---------------------------------------------------------------------------- + FrequencyToMonitorTxs = "1s" + + # ---------------------------------------------------------------------------- + # WaitTxToBeMined is the wait period to wait for the tx to be mined + # ---------------------------------------------------------------------------- + WaitTxToBeMined = "2s" + + # ---------------------------------------------------------------------------- + # GetReceiptMaxTime is the max time to get the receipt of the tx + # ---------------------------------------------------------------------------- + GetReceiptMaxTime = "250ms" + + # ---------------------------------------------------------------------------- + # GetReceiptWaitInterval is the wait interval to get the receipt + # ---------------------------------------------------------------------------- + GetReceiptWaitInterval = "1s" + + # ---------------------------------------------------------------------------- + # PrivateKeys is the private keys to use to sign the txs + # ---------------------------------------------------------------------------- + PrivateKeys = [ + {Path = "/app/keystore/aggoracle.keystore", Password = "testonly"}, + ] + + # ---------------------------------------------------------------------------- + # ForcedGas is the forced gas to use in case of gas estimation error + # ---------------------------------------------------------------------------- + ForcedGas = 0 + + # ---------------------------------------------------------------------------- + # GasPriceMarginFactor is the gas price margin factor + # ---------------------------------------------------------------------------- + GasPriceMarginFactor = 1 + + # ---------------------------------------------------------------------------- + # MaxGasPriceLimit is the max gas price limit + # ---------------------------------------------------------------------------- + MaxGasPriceLimit = 0 + + # ---------------------------------------------------------------------------- + # StoragePath is the path of the storage + # ---------------------------------------------------------------------------- + StoragePath = "/{{PathRWData}}/ethtxmanager-sequencesender.sqlite" + + # ---------------------------------------------------------------------------- + # ReadPendingL1Txs is a flag to enable the reading of pending L1 txs + # It can only be enabled if PersistenceFilename is empty + # ---------------------------------------------------------------------------- + ReadPendingL1Txs = false + + # ---------------------------------------------------------------------------- + # SafeStatusL1NumberOfBlocks overwrites the number of blocks to consider a tx as safe + # overwriting the default value provided by the network + # 0 means that the default value will be used + # ---------------------------------------------------------------------------- + SafeStatusL1NumberOfBlocks = 5 + + # ---------------------------------------------------------------------------- + # FinalizedStatusL1NumberOfBlocks overwrites the number of blocks to consider a tx as finalized + # overwriting the default value provided by the network + # 0 means that the default value will be used + # ---------------------------------------------------------------------------- + FinalizedStatusL1NumberOfBlocks = 10 + + [AggOracle.EVMSender.EthTxManager.Etherman] + # ---------------------------------------------------------------------------- + # URL is the URL of the L2 + # ---------------------------------------------------------------------------- + URL = "{{L2URL}}" + + # ---------------------------------------------------------------------------- + # MultiGasProvider is a flag to enable multiple gas providers + # ---------------------------------------------------------------------------- + MultiGasProvider = false + + # ---------------------------------------------------------------------------- + # L1ChainID is the chain ID of the L1 + # ---------------------------------------------------------------------------- + L1ChainID = {{NetworkConfig.L1.L1ChainID}} + + # ---------------------------------------------------------------------------- + # HTTPHeaders additional headers that will be used in the HTTP requests + # ---------------------------------------------------------------------------- + HTTPHeaders = [] +# ------------------------------------------------------------------------------ +# RPC configuration +# ------------------------------------------------------------------------------ [RPC] -Host = "0.0.0.0" -Port = 5576 -ReadTimeout = "2s" -WriteTimeout = "2s" -MaxRequestsPerIPAndSecond = 10 + # ---------------------------------------------------------------------------- + # Host defines the network adapter that will be used to serve the HTTP requests + # ---------------------------------------------------------------------------- + Host = "0.0.0.0" + + # ---------------------------------------------------------------------------- + # Port defines the port to serve the endpoints via HTTP + # ---------------------------------------------------------------------------- + Port = 5576 + + # ---------------------------------------------------------------------------- + # ReadTimeout is the HTTP server read timeout + # check net/http.server.ReadTimeout and net/http.server.ReadHeaderTimeout + # ---------------------------------------------------------------------------- + ReadTimeout = "2s" + + # ---------------------------------------------------------------------------- + # WriteTimeout is the HTTP server write timeout + # check net/http.server.WriteTimeout + # ---------------------------------------------------------------------------- + WriteTimeout = "2s" + + # ---------------------------------------------------------------------------- + # MaxRequestsPerIPAndSecond defines how much requests a single IP can + # send within a single second + # ---------------------------------------------------------------------------- + MaxRequestsPerIPAndSecond = 10 +# ------------------------------------------------------------------------------ +# ClaimSponsor configuration +# ------------------------------------------------------------------------------ [ClaimSponsor] -DBPath = "{{PathRWData}}/claimsopnsor.sqlite" -Enabled = true -SenderAddr = "0xfa3b44587990f97ba8b6ba7e230a5f0e95d14b3d" -BridgeAddrL2 = "0xB7098a13a48EcE087d3DA15b2D28eCE0f89819B8" -MaxGas = 200000 -RetryAfterErrorPeriod = "1s" -MaxRetryAttemptsAfterError = -1 -WaitTxToBeMinedPeriod = "3s" -WaitOnEmptyQueue = "3s" -GasOffset = 0 - [ClaimSponsor.EthTxManager] - FrequencyToMonitorTxs = "1s" - WaitTxToBeMined = "2s" - GetReceiptMaxTime = "250ms" - GetReceiptWaitInterval = "1s" - PrivateKeys = [ - {Path = "/app/keystore/claimsopnsor.keystore", Password = "testonly"}, - ] - ForcedGas = 0 - GasPriceMarginFactor = 1 - MaxGasPriceLimit = 0 - StoragePath = "{{PathRWData}}/ethtxmanager-claimsponsor.sqlite" - ReadPendingL1Txs = false - SafeStatusL1NumberOfBlocks = 5 - FinalizedStatusL1NumberOfBlocks = 10 - [ClaimSponsor.EthTxManager.Etherman] - URL = "{{L2URL}}" - MultiGasProvider = false - L1ChainID = {{NetworkConfig.L1.L1ChainID}} - HTTPHeaders = [] + # ---------------------------------------------------------------------------- + # DBPath is the path of the database + # ---------------------------------------------------------------------------- + DBPath = "{{PathRWData}}/claimsopnsor.sqlite" + + # ---------------------------------------------------------------------------- + # Enabled indicates if the sponsor should be run or not + # ---------------------------------------------------------------------------- + Enabled = true + + # ---------------------------------------------------------------------------- + # SenderAddr is the address that will be used to send the claim txs + # ---------------------------------------------------------------------------- + SenderAddr = "0xfa3b44587990f97ba8b6ba7e230a5f0e95d14b3d" + + # ---------------------------------------------------------------------------- + # BridgeAddrL2 is the address of the bridge smart contract on L2 + # ---------------------------------------------------------------------------- + BridgeAddrL2 = "0xB7098a13a48EcE087d3DA15b2D28eCE0f89819B8" + + # ---------------------------------------------------------------------------- + # MaxGas is the max gas (limit) allowed for a claim to be sponsored + # ---------------------------------------------------------------------------- + MaxGas = 200000 + + # ---------------------------------------------------------------------------- + # RetryAfterErrorPeriod is the time that will be waited when an unexpected error happens before retry + # ---------------------------------------------------------------------------- + RetryAfterErrorPeriod = "1s" + + # ---------------------------------------------------------------------------- + # MaxRetryAttemptsAfterError is the maximum number of consecutive attempts that will happen before panicking. + # Any number smaller than zero will be considered as unlimited retries + # ---------------------------------------------------------------------------- + MaxRetryAttemptsAfterError = -1 + + # ---------------------------------------------------------------------------- + # WaitTxToBeMinedPeriod is the period that will be used to ask if a given tx has been mined (or failed) + # ---------------------------------------------------------------------------- + WaitTxToBeMinedPeriod = "3s" + + # ---------------------------------------------------------------------------- + # WaitOnEmptyQueue is the time that will be waited before trying to send the next claim of the queue + # if the queue is empty + # ---------------------------------------------------------------------------- + WaitOnEmptyQueue = "3s" + + # ---------------------------------------------------------------------------- + # GasOffset is the gas to add on top of the estimated gas when sending the claim txs + # ---------------------------------------------------------------------------- + GasOffset = 0 + + # ---------------------------------------------------------------------------- + # EthTxManager is the configuration of the EthTxManager to be used by the claim sponsor + # ---------------------------------------------------------------------------- + [ClaimSponsor.EthTxManager] + # ---------------------------------------------------------------------------- + # FrequencyToMonitorTxs is the frequency to monitor the txs + # ---------------------------------------------------------------------------- + FrequencyToMonitorTxs = "1s" + + # ---------------------------------------------------------------------------- + # WaitTxToBeMined is the wait period to wait for the tx to be mined + # ---------------------------------------------------------------------------- + WaitTxToBeMined = "2s" + + # ---------------------------------------------------------------------------- + # GetReceiptMaxTime is the max time to get the receipt of the tx + # ---------------------------------------------------------------------------- + GetReceiptMaxTime = "250ms" + + # ---------------------------------------------------------------------------- + # GetReceiptWaitInterval is the wait interval to get the receipt + # ---------------------------------------------------------------------------- + GetReceiptWaitInterval = "1s" + + # ---------------------------------------------------------------------------- + # PrivateKeys is the private keys to use to sign the txs + # ---------------------------------------------------------------------------- + PrivateKeys = [ + {Path = "/app/keystore/claimsopnsor.keystore", Password = "testonly"}, + ] + + # ---------------------------------------------------------------------------- + # ForcedGas is the forced gas to use in case of gas estimation error + # ---------------------------------------------------------------------------- + ForcedGas = 0 + + # ---------------------------------------------------------------------------- + # GasPriceMarginFactor is the gas price margin factor + # ---------------------------------------------------------------------------- + GasPriceMarginFactor = 1 + + # ---------------------------------------------------------------------------- + # MaxGasPriceLimit is the max gas price limit + # ---------------------------------------------------------------------------- + MaxGasPriceLimit = 0 + + # ---------------------------------------------------------------------------- + # StoragePath is the path of the storage + # ---------------------------------------------------------------------------- + StoragePath = "{{PathRWData}}/ethtxmanager-claimsponsor.sqlite" + + # ---------------------------------------------------------------------------- + # ReadPendingL1Txs is a flag to enable the reading of pending L1 txs + # ---------------------------------------------------------------------------- + ReadPendingL1Txs = false + + # ---------------------------------------------------------------------------- + # SafeStatusL1NumberOfBlocks overwrites the number of blocks to consider a tx as safe + # overwriting the default value provided by the network + # 0 means that the default value will be used + # ---------------------------------------------------------------------------- + SafeStatusL1NumberOfBlocks = 5 + + # ---------------------------------------------------------------------------- + # FinalizedStatusL1NumberOfBlocks overwrites the number of blocks to consider a tx as finalized + # overwriting the default value provided by the network + # 0 means that the default value will be used + # ---------------------------------------------------------------------------- + FinalizedStatusL1NumberOfBlocks = 10 + + [ClaimSponsor.EthTxManager.Etherman] + # ---------------------------------------------------------------------------- + # URL is the URL of the L2 + # ---------------------------------------------------------------------------- + URL = "{{L2URL}}" + + # ---------------------------------------------------------------------------- + # MultiGasProvider is a flag to enable multiple gas providers + # ---------------------------------------------------------------------------- + MultiGasProvider = false + + # ---------------------------------------------------------------------------- + # L1ChainID is the chain ID of the L1 + # ---------------------------------------------------------------------------- + L1ChainID = {{NetworkConfig.L1.L1ChainID}} + + # ---------------------------------------------------------------------------- + # HTTPHeaders additional headers that will be used in the HTTP requests + # ---------------------------------------------------------------------------- + HTTPHeaders = [] +# ------------------------------------------------------------------------------ +# BridgeL1Sync configuration +# ------------------------------------------------------------------------------ [BridgeL1Sync] -DBPath = "{{PathRWData}}/bridgel1sync.sqlite" -BlockFinality = "LatestBlock" -InitialBlockNum = 0 -BridgeAddr = "{{polygonBridgeAddr}}" -SyncBlockChunkSize = 100 -RetryAfterErrorPeriod = "1s" -MaxRetryAttemptsAfterError = -1 -WaitForNewBlocksPeriod = "3s" -OriginNetwork=0 + # ---------------------------------------------------------------------------- + # DBPath path of the DB + # ---------------------------------------------------------------------------- + DBPath = "{{PathRWData}}/bridgel1sync.sqlite" + + # ---------------------------------------------------------------------------- + # BlockFinality indicates the status of the blocks that will be queried in order to sync + # ---------------------------------------------------------------------------- + BlockFinality = "LatestBlock" + + # ---------------------------------------------------------------------------- + # InitialBlockNum is the first block that will be queried when starting the synchronization from scratch. + # It should be a number equal or below the creation of the bridge contract + # ---------------------------------------------------------------------------- + InitialBlockNum = 0 + + # ---------------------------------------------------------------------------- + # BridgeAddr is the address of the bridge smart contract + # ---------------------------------------------------------------------------- + BridgeAddr = "{{polygonBridgeAddr}}" + + # ---------------------------------------------------------------------------- + # SyncBlockChunkSize is the amount of blocks that will be queried to the client on each request + # ---------------------------------------------------------------------------- + SyncBlockChunkSize = 100 + + # ---------------------------------------------------------------------------- + # RetryAfterErrorPeriod is the time that will be waited when an unexpected error happens before retry + # ---------------------------------------------------------------------------- + RetryAfterErrorPeriod = "1s" + + # ---------------------------------------------------------------------------- + # MaxRetryAttemptsAfterError is the maximum number of consecutive attempts that will happen before panicking. + # Any number smaller than zero will be considered as unlimited retries + # ---------------------------------------------------------------------------- + MaxRetryAttemptsAfterError = -1 + + # ---------------------------------------------------------------------------- + # WaitForNewBlocksPeriod time that will be waited when the synchronizer has reached the latest block + # ---------------------------------------------------------------------------- + WaitForNewBlocksPeriod = "3s" + + # ---------------------------------------------------------------------------- + # OriginNetwork is the id of the network where the bridge is deployed + # ---------------------------------------------------------------------------- + OriginNetwork=0 +# ------------------------------------------------------------------------------ +# BridgeL2Sync configuration +# ------------------------------------------------------------------------------ [BridgeL2Sync] -DBPath = "{{PathRWData}}/bridgel2sync.sqlite" -BlockFinality = "LatestBlock" -InitialBlockNum = 0 -BridgeAddr = "{{polygonBridgeAddr}}" -SyncBlockChunkSize = 100 -RetryAfterErrorPeriod = "1s" -MaxRetryAttemptsAfterError = -1 -WaitForNewBlocksPeriod = "3s" -OriginNetwork=1 + # ---------------------------------------------------------------------------- + # DBPath path of the DB + # ---------------------------------------------------------------------------- + DBPath = "{{PathRWData}}/bridgel2sync.sqlite" + + # ---------------------------------------------------------------------------- + # BlockFinality indicates the status of the blocks that will be queried in order to sync + # ---------------------------------------------------------------------------- + BlockFinality = "LatestBlock" + + # ---------------------------------------------------------------------------- + # InitialBlockNum is the first block that will be queried when starting the synchronization from scratch. + # ---------------------------------------------------------------------------- + InitialBlockNum = 0 + + # ---------------------------------------------------------------------------- + # BridgeAddr is the address of the bridge smart contract + # ---------------------------------------------------------------------------- + BridgeAddr = "{{polygonBridgeAddr}}" + + # ---------------------------------------------------------------------------- + # SyncBlockChunkSize is the amount of blocks that will be queried to the client on each request + # ---------------------------------------------------------------------------- + SyncBlockChunkSize = 100 + + # ---------------------------------------------------------------------------- + # RetryAfterErrorPeriod is the time that will be waited when an unexpected error happens before retry + # ---------------------------------------------------------------------------- + RetryAfterErrorPeriod = "1s" + + # ---------------------------------------------------------------------------- + # MaxRetryAttemptsAfterError is the maximum number of consecutive attempts that will happen before panicking. + # ---------------------------------------------------------------------------- + MaxRetryAttemptsAfterError = -1 + + # ---------------------------------------------------------------------------- + # WaitForNewBlocksPeriod time that will be waited when the synchronizer has reached the latest block + # ---------------------------------------------------------------------------- + WaitForNewBlocksPeriod = "3s" + + # ---------------------------------------------------------------------------- + # OriginNetwork is the id of the network where the bridge is deployed + # ---------------------------------------------------------------------------- + OriginNetwork=1 +# ------------------------------------------------------------------------------ +# LastGERSync configuration +# ------------------------------------------------------------------------------ [LastGERSync] -DBPath = "{{PathRWData}}/lastgersync.sqlite" -BlockFinality = "LatestBlock" -InitialBlockNum = 0 -GlobalExitRootL2Addr = "{{L2Config.GlobalExitRootAddr}}" -RetryAfterErrorPeriod = "1s" -MaxRetryAttemptsAfterError = -1 -WaitForNewBlocksPeriod = "1s" -DownloadBufferSize = 100 + # ---------------------------------------------------------------------------- + # DBPath path of the DB + # ---------------------------------------------------------------------------- + DBPath = "{{PathRWData}}/lastgersync.sqlite" + + # ---------------------------------------------------------------------------- + # BlockFinality indicates the status of the blocks that will be queried in order to sync + # ---------------------------------------------------------------------------- + BlockFinality = "LatestBlock" + + # ---------------------------------------------------------------------------- + # InitialBlockNum is the first block that will be queried when starting the synchronization from scratch. + # It should be a number equal or below the creation of the bridge contract + # ---------------------------------------------------------------------------- + InitialBlockNum = 0 + + # ---------------------------------------------------------------------------- + # GlobalExitRootL2Addr is the address of the GER smart contract on L2 + # ---------------------------------------------------------------------------- + GlobalExitRootL2Addr = "{{L2Config.GlobalExitRootAddr}}" + + # ---------------------------------------------------------------------------- + # RetryAfterErrorPeriod is the time that will be waited when an unexpected error happens before retry + # ---------------------------------------------------------------------------- + RetryAfterErrorPeriod = "1s" + + # ---------------------------------------------------------------------------- + # MaxRetryAttemptsAfterError is the maximum number of consecutive attempts that will happen before panicking. + # Any number smaller than zero will be considered as unlimited retries + # ---------------------------------------------------------------------------- + MaxRetryAttemptsAfterError = -1 + + # ---------------------------------------------------------------------------- + # WaitForNewBlocksPeriod time that will be waited when the synchronizer has reached the latest block + # ---------------------------------------------------------------------------- + WaitForNewBlocksPeriod = "1s" + + # ---------------------------------------------------------------------------- + # DownloadBufferSize buffer of events to be processed. When the buffer limit is reached, + # downloading will stop until the processing catches up. + # ---------------------------------------------------------------------------- + DownloadBufferSize = 100 +# ------------------------------------------------------------------------------ +# NetworkConfig.L1 configuration +# ------------------------------------------------------------------------------ [NetworkConfig.L1] -L1ChainID = {{L1Config.chainId}} -PolAddr = "{{L1Config.polTokenAddress}}" -ZkEVMAddr = "{{L1Config.polygonZkEVMAddress}}" -RollupManagerAddr = "{{L1Config.polygonRollupManagerAddress}}" -GlobalExitRootManagerAddr = "{{L1Config.polygonZkEVMGlobalExitRootAddress}}" - + # ---------------------------------------------------------------------------- + # L1ChainID is the chain id of the L1 network + # ---------------------------------------------------------------------------- + L1ChainID = {{L1Config.chainId}} + + # ---------------------------------------------------------------------------- + # PolAddr is the address of the POL token contract + # ---------------------------------------------------------------------------- + PolAddr = "{{L1Config.polTokenAddress}}" + + # ---------------------------------------------------------------------------- + # ZkEVMAddr is the address of the ZkEVM contract + # ---------------------------------------------------------------------------- + ZkEVMAddr = "{{L1Config.polygonZkEVMAddress}}" + + # ---------------------------------------------------------------------------- + # RollupManagerAddr is the address of the rollup manager contract + # ---------------------------------------------------------------------------- + RollupManagerAddr = "{{L1Config.polygonRollupManagerAddress}}" + + # ---------------------------------------------------------------------------- + # GlobalExitRootManagerAddr is the address of the global exit root manager contract + # ---------------------------------------------------------------------------- + GlobalExitRootManagerAddr = "{{L1Config.polygonZkEVMGlobalExitRootAddress}}" +# ------------------------------------------------------------------------------ +# AggSender configuration +# ------------------------------------------------------------------------------ [AggSender] -StoragePath = "{{PathRWData}}/aggsender.sqlite" -AggLayerURL = "{{AggLayerURL}}" -AggsenderPrivateKey = {Path = "{{SequencerPrivateKeyPath}}", Password = "{{SequencerPrivateKeyPassword}}"} -URLRPCL2="{{L2URL}}" -BlockFinality = "LatestBlock" -EpochNotificationPercentage = 50 -SaveCertificatesToFilesPath = "" -MaxRetriesStoreCertificate = 3 -DelayBeetweenRetries = "60s" -KeepCertificatesHistory = true -# MaxSize of the certificate to 8Mb -MaxCertSize = 8388608 -BridgeMetadataAsHash = true + # ---------------------------------------------------------------------------- + # StoragePath is the path of the sqlite db on which the AggSender will store the data + # ---------------------------------------------------------------------------- + StoragePath = "{{PathRWData}}/aggsender.sqlite" + + # ---------------------------------------------------------------------------- + # AggLayerURL url of the AggLayer service + # ---------------------------------------------------------------------------- + AggLayerURL = "{{AggLayerURL}}" + + # ---------------------------------------------------------------------------- + # BlockGetInterval is the interval at which the AggSender will get the blocks from L1 + # ---------------------------------------------------------------------------- + + # ---------------------------------------------------------------------------- + # CheckSettledInterval is the interval at which the AggSender will check if the blocks are settled + # ---------------------------------------------------------------------------- + + # ---------------------------------------------------------------------------- + # AggsenderPrivateKey is the private key which is used to sign certificates + # ---------------------------------------------------------------------------- + AggsenderPrivateKey = {Path = "{{SequencerPrivateKeyPath}}", Password = "{{SequencerPrivateKeyPassword}}"} + + # ---------------------------------------------------------------------------- + # URLRPCL2 is the URL of the L2 RPC node + # ---------------------------------------------------------------------------- + URLRPCL2="{{L2URL}}" + + # ---------------------------------------------------------------------------- + # BlockFinality indicates which finality follows AggLayer + # ---------------------------------------------------------------------------- + BlockFinality = "LatestBlock" + + # ---------------------------------------------------------------------------- + # EpochNotificationPercentage indicates the percentage of the epoch + # the AggSender should send the certificate + # 0 -> Begin + # 50 -> Middle + # ---------------------------------------------------------------------------- + EpochNotificationPercentage = 50 + + # ---------------------------------------------------------------------------- + # SaveCertificatesToFilesPath if != "" tells the AggSender to save the certificates to a file in this path + # ---------------------------------------------------------------------------- + SaveCertificatesToFilesPath = "" + + # ---------------------------------------------------------------------------- + # MaxRetriesStoreCertificate is the maximum number of retries to store a certificate + # 0 is infinite + # ---------------------------------------------------------------------------- + MaxRetriesStoreCertificate = 3 + + # ---------------------------------------------------------------------------- + # DelayBeetweenRetries is the delay between retries: + # is used on store Certificate and also in initial check + # ---------------------------------------------------------------------------- + DelayBeetweenRetries = "60s" + + # ---------------------------------------------------------------------------- + # KeepCertificatesHistory is a flag to keep the certificates history on storage + # ---------------------------------------------------------------------------- + KeepCertificatesHistory = true + + # ---------------------------------------------------------------------------- + # MaxCertSize is the maximum size of the certificate (the emitted certificate can be bigger that this size) + # 0 is infinite + # ---------------------------------------------------------------------------- + MaxCertSize = 8388608 + + # ---------------------------------------------------------------------------- + # BridgeMetadataAsHash is a flag to import the bridge metadata as hash + # ---------------------------------------------------------------------------- + BridgeMetadataAsHash = true ` diff --git a/crates/cdk-config/src/aggregator.rs b/crates/cdk-config/src/aggregator.rs index 8f37a9af..caebaa20 100644 --- a/crates/cdk-config/src/aggregator.rs +++ b/crates/cdk-config/src/aggregator.rs @@ -45,10 +45,6 @@ pub struct Aggregator { pub verify_proof_interval: String, #[serde(rename = "ProofStatePollingInterval", default)] pub proof_state_polling_interval: String, - #[serde(rename = "TxProfitabilityCheckerType", default)] - pub tx_profitability_checker_type: String, - #[serde(rename = "TxProfitabilityMinReward", default)] - pub tx_profitability_min_reward: String, #[serde(rename = "IntervalAfterWhichBatchConsolidateAnyway", default)] pub interval_after_which_batch_consolidate_anyway: String, #[serde(rename = "ForkId", default)] @@ -100,8 +96,6 @@ impl Default for Aggregator { retry_time: "10s".to_string(), verify_proof_interval: "1m".to_string(), proof_state_polling_interval: "10s".to_string(), - tx_profitability_checker_type: "default".to_string(), - tx_profitability_min_reward: "0.1".to_string(), interval_after_which_batch_consolidate_anyway: "5m".to_string(), fork_id: 0, cleanup_locked_proofs_interval: "1h".to_string(), diff --git a/crates/cdk/src/cli.rs b/crates/cdk/src/cli.rs index d108543d..3d1a8cdf 100644 --- a/crates/cdk/src/cli.rs +++ b/crates/cdk/src/cli.rs @@ -55,4 +55,14 @@ pub(crate) enum Commands { }, /// Output the corresponding versions of the components Versions, + /// Output the default config template file + Config { + /// Output minimal config file + #[arg( + long, + short = 'm', + env = "CDK_MINIMAL_CONFIG" + )] + min: bool, + }, } diff --git a/crates/cdk/src/main.rs b/crates/cdk/src/main.rs index 61e66eab..fde97b9f 100644 --- a/crates/cdk/src/main.rs +++ b/crates/cdk/src/main.rs @@ -27,15 +27,15 @@ async fn main() -> anyhow::Result<()> { println!( "{}", - r#"🐼 - _____ _ _____ _____ _ __ - | __ \ | | / ____| __ \| |/ / - | |__) |__ | |_ _ __ _ ___ _ __ | | | | | | ' / - | ___/ _ \| | | | |/ _` |/ _ \| '_ \ | | | | | | < - | | | (_) | | |_| | (_| | (_) | | | | | |____| |__| | . \ - |_| \___/|_|\__, |\__, |\___/|_| |_| \_____|_____/|_|\_\ - __/ | __/ | - |___/ |___/ + r#" +# _____ _ _____ _____ _ __ +# | __ \ | | / ____| __ \| |/ / +# | |__) |__ | |_ _ __ _ ___ _ __ | | | | | | ' / +# | ___/ _ \| | | | |/ _` |/ _ \| '_ \ | | | | | | < +# | | | (_) | | |_| | (_| | (_) | | | | | |____| |__| | . \ +# |_| \___/|_|\__, |\__, |\___/|_| |_| \_____|_____/|_|\_\ +# __/ | __/ | +# |___/ |___/ "# .purple() ); @@ -44,6 +44,7 @@ async fn main() -> anyhow::Result<()> { cli::Commands::Node { config, components } => node(config, components)?, cli::Commands::Erigon { config, chain } => erigon(config, chain).await?, cli::Commands::Versions {} => versions::versions(), + cli::Commands::Config { min } => config(min)?, } Ok(()) @@ -182,3 +183,31 @@ async fn get_timestamp(url: Url) -> Result { struct Batch { timestamp: String, } + +/// This function simply calls the config subcommand in cdk-node. +pub fn config(min: bool) -> anyhow::Result<()> { + // This is to find the binary when running in development mode + // otherwise it will use system path + let bin_path = helpers::get_bin_path(); + + // Run the node passing the config file path as argument + let mut command = Command::new(bin_path.clone()); + command.args(&["config"]); + if min { + command.args(&["-min"]); + } + + let output_result = command.execute_output(); + match output_result { + Ok(output) => output, + Err(e) => { + eprintln!( + "Failed to execute command, trying to find executable in path: {}", + bin_path + ); + return Err(e.into()); + } + }; + + Ok(()) +} diff --git a/crates/cdk/versions.json b/crates/cdk/versions.json index 39bfb4dc..f3396dfd 100644 --- a/crates/cdk/versions.json +++ b/crates/cdk/versions.json @@ -1,13 +1,13 @@ { - "agglayer_image": "ghcr.io/agglayer/agglayer:0.2.0-rc.5", - "cdk_erigon_node_image": "hermeznetwork/cdk-erigon:v2.1.2", - "cdk_node_image": "ghcr.io/0xpolygon/cdk:0.4.0-beta8", + "agglayer_image": "ghcr.io/agglayer/agglayer:0.2.0-rc.17", + "cdk_erigon_node_image": "hermeznetwork/cdk-erigon:v2.60.0", + "cdk_node_image": "ghcr.io/0xpolygon/cdk:0.4.0", "cdk_validium_node_image": "0xpolygon/cdk-validium-node:0.7.0-cdk", - "zkevm_bridge_proxy_image": "haproxy:3.0-bookworm", - "zkevm_bridge_service_image": "hermeznetwork/zkevm-bridge-service:v0.6.0-RC1", + "zkevm_bridge_proxy_image": "haproxy:3.1-bookworm", + "zkevm_bridge_service_image": "hermeznetwork/zkevm-bridge-service:v0.6.0-RC3", "zkevm_bridge_ui_image": "leovct/zkevm-bridge-ui:multi-network", - "zkevm_contracts_image": "leovct/zkevm-contracts:v8.0.0-rc.4-fork.12", - "zkevm_da_image": "0xpolygon/cdk-data-availability:0.0.10", + "zkevm_contracts_image": "leovct/zkevm-contracts:v8.0.0-fork.12-patch.1", + "zkevm_da_image": "0xpolygon/cdk-data-availability:0.0.11", "zkevm_node_image": "hermeznetwork/zkevm-node:v0.7.3", "zkevm_pool_manager_image": "hermeznetwork/zkevm-pool-manager:v0.1.2", "zkevm_prover_image": "hermeznetwork/zkevm-prover:v8.0.0-RC14-fork.12", diff --git a/test/config/test.config.toml b/test/config/test.config.toml index 9da00c79..5d6cb39a 100644 --- a/test/config/test.config.toml +++ b/test/config/test.config.toml @@ -41,8 +41,6 @@ Host = "0.0.0.0" Port = 50081 RetryTime = "5s" VerifyProofInterval = "10s" -TxProfitabilityCheckerType = "acceptall" -TxProfitabilityMinReward = "1.1" ProofStatePollingInterval = "5s" SenderAddress = "0x3f2963d678442c4af27a797453b64ef6ce9443e9" CleanupLockedProofsInterval = "2m"