diff --git a/config/config_test.go b/config/config_test.go index 48a0fdd286..079fa91fce 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -153,6 +153,10 @@ func Test_Defaults(t *testing.T) { path: "Sequencer.StreamServer.Version", expectedValue: uint8(0), }, + { + path: "Sequencer.StreamServer.WriteTimeout", + expectedValue: types.NewDuration(5 * time.Second), + }, { path: "Sequencer.StreamServer.Enabled", expectedValue: false, diff --git a/config/default.go b/config/default.go index 9a06ad3fef..8e99b35e69 100644 --- a/config/default.go +++ b/config/default.go @@ -206,6 +206,7 @@ StateConsistencyCheckInterval = "5s" Port = 0 Filename = "" Version = 0 + WriteTimeout = "5s" Enabled = false [SequenceSender] diff --git a/config/environments/local/local.node.config.toml b/config/environments/local/local.node.config.toml index 237ab37129..2f50f96311 100644 --- a/config/environments/local/local.node.config.toml +++ b/config/environments/local/local.node.config.toml @@ -113,6 +113,7 @@ StateConsistencyCheckInterval = "5s" [Sequencer.StreamServer] Port = 0 Filename = "" + WriteTimeout = "5s" Enabled = false [SequenceSender] diff --git a/docs/config-file/node-config-doc.html b/docs/config-file/node-config-doc.html index 858b9034fd..14800feab3 100644 --- a/docs/config-file/node-config-doc.html +++ b/docs/config-file/node-config-doc.html @@ -2,27 +2,21 @@
"300ms"
 

Default: "2m0s"Type: string

WaitTxToBeMined time to wait after transaction was sent to the ethereum


Examples:

"1m"
 
"300ms"
-

Type: array of object

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

Each item of this array must be:

Type: string

Path is the file path for the key store file


Type: string

Password is the password to decrypt the key store file



Default: 0Type: integer

ForcedGas is the amount of gas to be forced in case of gas estimation error


Default: 1Type: number

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


Default: 0Type: integer

MaxGasPriceLimit helps avoiding transactions to be sent over an 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


CustodialAssets is the configuration for the custodial assets
Default: falseType: boolean

Enable is the flag to enable the custodial assets


Default: "http://localhost:8080"Type: string

URL is the url to sign the custodial assets


Default: 2882Type: integer

Symbol is the symbol of the network, 2 prd, 2882 devnet


Default: "0x1a13bddcc02d363366e04d4aa588d3c125b0ff6f"Type: array of integer

SequencerAddr is the address of the sequencer

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Default: "0x66e39a1e507af777e8c385e2d91559e20e306303"Type: array of integer

AggregatorAddr is the address of the aggregator

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Default: "2m0s"Type: string

WaitResultTimeout is the timeout to wait for the result of the custodial assets


Examples:

"1m"
-
"300ms"
-

Default: 3Type: integer

OperateTypeSeq is the operate type of the custodial assets for the sequencer


Default: 4Type: integer

OperateTypeAgg is the operate type of the custodial assets for the aggregator


Default: 3011Type: integer

ProjectSymbol is the project symbol of the custodial assets


Default: 2Type: integer

OperateSymbol is the operate symbol of the custodial assets


Default: 3Type: integer

SysFrom is the sys from of the custodial assets


Default: 0Type: integer

UserID is the user id of the custodial assets


Default: 0Type: integer

OperateAmount is the operate amount of the custodial assets


Default: "/priapi/v1/assetonchain/ecology/ecologyOperate"Type: string

RequestSignURI is the request sign uri of the custodial assets


Default: "/priapi/v1/assetonchain/ecology/querySignDataByOrderNo"Type: string

QuerySignURI is the query sign uri of the custodial assets


Default: ""Type: string

AccessKey is the access key of the custodial assets


Default: ""Type: string

SecretKey is the secret key of the custodial assets


Pool service configuration
Default: "5m0s"Type: string

IntervalToRefreshBlockedAddresses is the time it takes to sync the
blocked address list from db to memory


Examples:

"1m"
+

Type: array of object

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

Each item of this array must be:

Type: string

Path is the file path for the key store file


Type: string

Password is the password to decrypt the key store file



Default: 0Type: integer

ForcedGas is the amount of gas to be forced in case of gas estimation error


Default: 1Type: number

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


Default: 0Type: integer

MaxGasPriceLimit helps avoiding transactions to be sent over an 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


Pool service configuration
Default: "5m0s"Type: string

IntervalToRefreshBlockedAddresses is the time it takes to sync the
blocked address list from db to memory


Examples:

"1m"
 
"300ms"
-

Default: "1m0s"Type: string

IntervalToRefreshWhiteAddresses is the time it takes to sync the
white address list from db to memory


Examples:

"1m"
-
"300ms"
-

Default: falseType: boolean

EnableWhitelist is a flag to enable/disable the whitelist


Default: "5s"Type: string

IntervalToRefreshGasPrices is the time to wait to refresh the gas prices


Examples:

"1m"
+

Default: "5s"Type: string

IntervalToRefreshGasPrices is the time to wait to refresh the gas prices


Examples:

"1m"
 
"300ms"
-

Default: 100132Type: integer

MaxTxBytesSize is the max size of a transaction in bytes


Default: 100000Type: integer

MaxTxDataBytesSize is the max size of the data field of a transaction in bytes


DB is the database configuration
Default: "pool_db"Type: string

Database name


Default: "pool_user"Type: string

Database User name


Default: "pool_password"Type: string

Database Password of the user


Default: "xlayer-pool-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


Default: 1000000000Type: integer

DefaultMinGasPriceAllowed is the default min gas price to suggest


Default: "5m0s"Type: string

MinAllowedGasPriceInterval is the interval to look back of the suggested min gas price for a tx


Examples:

"1m"
+

Default: 100132Type: integer

MaxTxBytesSize is the max size of a transaction in bytes


Default: 100000Type: integer

MaxTxDataBytesSize is the max size of the data field of a transaction in bytes


DB is the database configuration
Default: "pool_db"Type: string

Database name


Default: "pool_user"Type: string

Database User name


Default: "pool_password"Type: string

Database Password of the user


Default: "zkevm-pool-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


Default: 1000000000Type: integer

DefaultMinGasPriceAllowed is the default min gas price to suggest


Default: "5m0s"Type: string

MinAllowedGasPriceInterval is the interval to look back of the suggested min gas price for a tx


Examples:

"1m"
 
"300ms"
 

Default: "15s"Type: string

PollMinAllowedGasPriceInterval is the interval to poll the suggested min gas price for a tx


Examples:

"1m"
 
"300ms"
-

Default: 64Type: integer

AccountQueue represents the maximum number of non-executable transaction slots permitted per account


Default: 1024Type: integer

GlobalQueue represents the maximum number of non-executable transaction slots for all accounts


EffectiveGasPrice is the config for the effective gas price calculation
Default: falseType: boolean

Enabled is a flag to enable/disable the effective gas price


Default: 0.25Type: number

L1GasPriceFactor is the percentage of the L1 gas price that will be used as the L2 min gas price


Default: 16Type: integer

ByteGasCost is the gas cost per byte that is not 0


Default: 4Type: integer

ZeroByteGasCost is the gas cost per byte that is 0


Default: 1Type: number

NetProfit is the profit margin to apply to the calculated breakEvenGasPrice


Default: 1.1Type: number

BreakEvenFactor is the factor to apply to the calculated breakevenGasPrice when comparing it with the gasPriceSigned of a tx


Default: 10Type: integer

FinalDeviationPct is the max allowed deviation percentage BreakEvenGasPrice on re-calculation


Default: 0Type: integer

EthTransferGasPrice is the fixed gas price returned as effective gas price for txs tha are ETH transfers (0 means disabled)
Only one of EthTransferGasPrice or EthTransferL1GasPriceFactor params can be different than 0. If both params are set to 0, the sequencer will halt and log an error


Default: 0Type: number

EthTransferL1GasPriceFactor is the percentage of L1 gas price returned as effective gas price for txs tha are ETH transfers (0 means disabled)
Only one of EthTransferGasPrice or EthTransferL1GasPriceFactor params can be different than 0. If both params are set to 0, the sequencer will halt and log an error


Default: 0.5Type: number

L2GasPriceSuggesterFactor is the factor to apply to L1 gas price to get the suggested L2 gas price used in the
calculations when the effective gas price is disabled (testing/metrics purposes)


Default: 0Type: integer

ForkID is the current fork ID of the chain


Type: array of string

XLayer config
BlockedList is the blocked address list

Each item of this array must be:


Default: ["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]Type: array of string

FreeGasAddress is the default free gas address

Each item of this array must be:


Default: 150000Type: integer

FreeClaimGasLimit is the max gas allowed use to do a free claim


Type: array of string

BridgeClaimMethodSignature for tracking BridgeClaimMethodSignature method

Each item of this array must be:


Default: falseType: boolean

EnableFreeGasByNonce enable free gas


Type: array of string

FreeGasExAddress is the ex address which can be free gas for the transfer receiver

Each item of this array must be:


Default: 0Type: integer

FreeGasCountPerAddr is the count limit of free gas tx per address


Default: 0Type: integer

FreeGasLimit is the max gas allowed use to do a free gas tx


Configuration for RPC service. THis one offers a extended Ethereum JSON-RPC API interface to interact with the node
Default: "0.0.0.0"Type: string

Host defines the network adapter that will be used to serve the HTTP requests


Default: 8545Type: integer

Port defines the port to serve the endpoints via HTTP


Default: "1m0s"Type: string

ReadTimeout is the HTTP server read timeout
check net/http.server.ReadTimeout and net/http.server.ReadHeaderTimeout


Examples:

"1m"
+

Default: 64Type: integer

AccountQueue represents the maximum number of non-executable transaction slots permitted per account


Default: 1024Type: integer

GlobalQueue represents the maximum number of non-executable transaction slots for all accounts


EffectiveGasPrice is the config for the effective gas price calculation
Default: falseType: boolean

Enabled is a flag to enable/disable the effective gas price


Default: 0.25Type: number

L1GasPriceFactor is the percentage of the L1 gas price that will be used as the L2 min gas price


Default: 16Type: integer

ByteGasCost is the gas cost per byte that is not 0


Default: 4Type: integer

ZeroByteGasCost is the gas cost per byte that is 0


Default: 1Type: number

NetProfit is the profit margin to apply to the calculated breakEvenGasPrice


Default: 1.1Type: number

BreakEvenFactor is the factor to apply to the calculated breakevenGasPrice when comparing it with the gasPriceSigned of a tx


Default: 10Type: integer

FinalDeviationPct is the max allowed deviation percentage BreakEvenGasPrice on re-calculation


Default: 0Type: integer

EthTransferGasPrice is the fixed gas price returned as effective gas price for txs tha are ETH transfers (0 means disabled)
Only one of EthTransferGasPrice or EthTransferL1GasPriceFactor params can be different than 0. If both params are set to 0, the sequencer will halt and log an error


Default: 0Type: number

EthTransferL1GasPriceFactor is the percentage of L1 gas price returned as effective gas price for txs tha are ETH transfers (0 means disabled)
Only one of EthTransferGasPrice or EthTransferL1GasPriceFactor params can be different than 0. If both params are set to 0, the sequencer will halt and log an error


Default: 0.5Type: number

L2GasPriceSuggesterFactor is the factor to apply to L1 gas price to get the suggested L2 gas price used in the
calculations when the effective gas price is disabled (testing/metrics purposes)


Default: 0Type: integer

ForkID is the current fork ID of the chain


Default: 1Type: number

TxFeeCap is the global transaction fee(price * gaslimit) cap for
send-transaction variants. The unit is ether. 0 means no cap.


Configuration for RPC service. THis one offers a extended Ethereum JSON-RPC API interface to interact with the node
Default: "0.0.0.0"Type: string

Host defines the network adapter that will be used to serve the HTTP requests


Default: 8545Type: integer

Port defines the port to serve the endpoints via HTTP


Default: "1m0s"Type: string

ReadTimeout is the HTTP server read timeout
check net/http.server.ReadTimeout and net/http.server.ReadHeaderTimeout


Examples:

"1m"
 
"300ms"
 

Default: "1m0s"Type: string

WriteTimeout is the HTTP server write timeout
check net/http.server.WriteTimeout


Examples:

"1m"
 
"300ms"
-

Default: 500Type: number

MaxRequestsPerIPAndSecond defines how much requests a single IP can
send within a single second


Default: ""Type: string

SequencerNodeURI is used allow Non-Sequencer nodes
to relay transactions to the Sequencer node


Default: 0Type: integer

MaxCumulativeGasUsed is the max gas allowed per batch


WebSockets configuration
Default: trueType: boolean

Enabled defines if the WebSocket requests are enabled or disabled


Default: "0.0.0.0"Type: string

Host defines the network adapter that will be used to serve the WS requests


Default: 8546Type: integer

Port defines the port to serve the endpoints via WS


Default: 104857600Type: integer

ReadLimit defines the maximum size of a message read from the client (in bytes)


Default: trueType: boolean

EnableL2SuggestedGasPricePolling enables polling of the L2 gas price to block tx in the RPC with lower gas price.


Default: falseType: boolean

BatchRequestsEnabled defines if the Batch requests are enabled or disabled


Default: 20Type: integer

BatchRequestsLimit defines the limit of requests that can be incorporated into each batch request


Type: array of integer

L2Coinbase defines which address is going to receive the fees

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Default: 10000Type: integer

MaxLogsCount is a configuration to set the max number of logs that can be returned
in a single call to the state, if zero it means no limit


Default: 10000Type: integer

MaxLogsBlockRange is a configuration to set the max range for block number when querying TXs
logs in a single call to the state, if zero it means no limit


Default: 60000Type: integer

MaxNativeBlockHashBlockRange is a configuration to set the max range for block number when querying
native block hashes in a single call to the state, if zero it means no limit


Default: trueType: boolean

EnableHttpLog allows the user to enable or disable the logs related to the HTTP
requests to be captured by the server.


ZKCountersLimits defines the ZK Counter limits
Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: falseType: boolean

XLayer config
EnablePendingTransactionFilter enables pending transaction filter that can support query L2 pending transaction


Nacos configuration
Default: ""Type: string

URLs nacos server urls for discovery service of rest api, url is separated by ","


Default: ""Type: string

NamespaceId nacos namepace id for discovery service of rest api


Default: ""Type: string

ApplicationName rest application name in nacos


Default: ""Type: string

ExternalListenAddr Set the rest-server external ip and port, when it is launched by Docker


NacosWs configuration
Default: ""Type: string

URLs nacos server urls for discovery service of rest api, url is separated by ","


Default: ""Type: string

NamespaceId nacos namepace id for discovery service of rest api


Default: ""Type: string

ApplicationName rest application name in nacos


Default: ""Type: string

ExternalListenAddr Set the rest-server external ip and port, when it is launched by Docker


Default: 1Type: number

GasLimitFactor is used to multiply the suggested gas provided by the network
in order to allow a enough gas to be set for all the transactions default value is 1.

ex:
suggested gas limit: 100
GasLimitFactor: 1
gas limit = 100

suggested gas limit: 100
GasLimitFactor: 1.1
gas limit = 110


Default: []Type: array of string

DisableAPIs disable some API

Each item of this array must be:


RateLimit enable rate limit
Default: falseType: boolean

Enabled defines if the rate limit is enabled or disabled


Default: []Type: array of string

RateLimitApis defines the apis that need to be rate limited

Each item of this array must be:


Default: 100Type: integer

RateLimitBurst defines the maximum burst size of requests


Default: 1Type: integer

RateLimitDuration defines the time window for the rate limit


Default: []Type: array of object

SpecialApis defines the apis that need to be rate limited with special rate limit

Each item of this array must be:

Type: string

Api defines the api that need to be rate limited


Type: integer

Count defines the maximum burst size of requests


Type: integer

Duration defines the time window for the rate limit



DynamicGP defines the config of dynamic gas price
Default: falseType: boolean

Enabled defines if the dynamic gas price is enabled or disabled


Default: 100Type: integer

CongestionTxThreshold defines the tx threshold to measure whether there is congestion


Default: 5Type: integer

CheckBatches defines the number of recent Batches used to sample gas price


Default: 3Type: integer

SampleTxNumer defines the number of sampled gas prices in each batch


Default: 70Type: integer

Percentile defines the sampling weight of all sampled gas prices


Default: 20000000000Type: integer

MaxPrice defines the dynamic gas price upper limit


Default: 2000000000Type: integer

MinPrice defines the dynamic gas price lower limit


Default: "10s"Type: string

UpdatePeriod defines the time interval for updating dynamic gas price


Examples:

"1m"
-
"300ms"
-

Default: falseType: boolean

EnableInnerTxCacheDB enables the inner tx cache db


Type: array of integer

BridgeAddress is the address of the bridge contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


ApiAuthentication defines the authentication configuration for the API
Default: falseType: boolean

Enabled defines if the api authentication is enabled


Default: []Type: array of object

ApiKeys defines the api keys

Each item of this array must be:

Type: string

Name defines the name of the key


Type: string

Key defines the key


Type: string

Timeout defines the timeout



ApiRelay defines the relay configuration for the API
Default: falseType: boolean

Default: ""Type: string

Default: []Type: array of string

Each item of this array must be:


Configuration of service `Syncrhonizer`. For this service is also really important the value of `IsTrustedSequencer` because depending of this values is going to ask to a trusted node for trusted transactions or not
Default: "1s"Type: string

SyncInterval is the delay interval between reading new rollup information


Examples:

"1m"
+

Default: 500Type: number

MaxRequestsPerIPAndSecond defines how much requests a single IP can
send within a single second


Default: ""Type: string

SequencerNodeURI is used allow Non-Sequencer nodes
to relay transactions to the Sequencer node


Default: 0Type: integer

MaxCumulativeGasUsed is the max gas allowed per batch


WebSockets configuration
Default: trueType: boolean

Enabled defines if the WebSocket requests are enabled or disabled


Default: "0.0.0.0"Type: string

Host defines the network adapter that will be used to serve the WS requests


Default: 8546Type: integer

Port defines the port to serve the endpoints via WS


Default: 104857600Type: integer

ReadLimit defines the maximum size of a message read from the client (in bytes)


Default: trueType: boolean

EnableL2SuggestedGasPricePolling enables polling of the L2 gas price to block tx in the RPC with lower gas price.


Default: falseType: boolean

BatchRequestsEnabled defines if the Batch requests are enabled or disabled


Default: 20Type: integer

BatchRequestsLimit defines the limit of requests that can be incorporated into each batch request


Type: array of integer

L2Coinbase defines which address is going to receive the fees

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Default: 10000Type: integer

MaxLogsCount is a configuration to set the max number of logs that can be returned
in a single call to the state, if zero it means no limit


Default: 10000Type: integer

MaxLogsBlockRange is a configuration to set the max range for block number when querying TXs
logs in a single call to the state, if zero it means no limit


Default: 60000Type: integer

MaxNativeBlockHashBlockRange is a configuration to set the max range for block number when querying
native block hashes in a single call to the state, if zero it means no limit


Default: trueType: boolean

EnableHttpLog allows the user to enable or disable the logs related to the HTTP
requests to be captured by the server.


ZKCountersLimits defines the ZK Counter limits
Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: integer

Configuration of service `Syncrhonizer`. For this service is also really important the value of `IsTrustedSequencer` because depending of this values is going to ask to a trusted node for trusted transactions or not
Default: "1s"Type: string

SyncInterval is the delay interval between reading new rollup information


Examples:

"1m"
 
"300ms"
-

Default: 100Type: integer

SyncChunkSize is the number of blocks to sync on each chunk


Default: ""Type: string

TrustedSequencerURL is the rpc url to connect and sync the trusted state


Default: "safe"Type: string

SyncBlockProtection specify the state to sync (lastest, finalized or safe)


Default: trueType: boolean

L1SyncCheckL2BlockHash if is true when a batch is closed is force to check L2Block hash against trustedNode (only apply for permissionless)


Default: 600Type: integer

L1SyncCheckL2BlockNumberhModulus is the modulus used to choose the l2block to check
a modules 5, for instance, means check all l2block multiples of 5 (10,15,20,...)


Default: trueType: boolean

Enable if is true then the check l1 Block Hash is active


Default: "finalized"Type: enum (of string)

L1SafeBlockPoint is the point that a block is considered safe enough to be checked
it can be: finalized, safe,pending or latest

Must be one of:

  • "finalized"
  • "safe"
  • "latest"

Default: 0Type: integer

L1SafeBlockOffset is the offset to add to L1SafeBlockPoint as a safe point
it can be positive or negative
Example: L1SafeBlockPoint= finalized, L1SafeBlockOffset= -10, then the safe block ten blocks before the finalized block


Default: trueType: boolean

ForceCheckBeforeStart if is true then the first time the system is started it will force to check all pending blocks


Default: trueType: boolean

PreCheckEnable if is true then the pre-check is active, will check blocks between L1SafeBlock and L1PreSafeBlock


Default: "safe"Type: enum (of string)

L1PreSafeBlockPoint is the point that a block is considered safe enough to be checked
it can be: finalized, safe,pending or latest

Must be one of:

  • "finalized"
  • "safe"
  • "latest"

Default: 0Type: integer

L1PreSafeBlockOffset is the offset to add to L1PreSafeBlockPoint as a safe point
it can be positive or negative
Example: L1PreSafeBlockPoint= finalized, L1PreSafeBlockOffset= -10, then the safe block ten blocks before the finalized block


Default: "sequential"Type: enum (of string)

L1SynchronizationMode define how to synchronize with L1:
- parallel: Request data to L1 in parallel, and process sequentially. The advantage is that executor is not blocked waiting for L1 data
- sequential: Request data to L1 and execute

Must be one of:

  • "sequential"
  • "parallel"

L1ParallelSynchronization Configuration for parallel mode (if L1SynchronizationMode equal to 'parallel')
Default: 10Type: integer

MaxClients Number of clients used to synchronize with L1


Default: 25Type: integer

MaxPendingNoProcessedBlocks Size of the buffer used to store rollup information from L1, must be >= to NumberOfEthereumClientsToSync
sugested twice of NumberOfParallelOfEthereumClients


Default: "5s"Type: string

RequestLastBlockPeriod is the time to wait to request the
last block to L1 to known if we need to retrieve more data.
This value only apply when the system is synchronized


Examples:

"1m"
+

Default: 100Type: integer

SyncChunkSize is the number of blocks to sync on each chunk


Default: ""Type: string

TrustedSequencerURL is the rpc url to connect and sync the trusted state


Default: "safe"Type: string

SyncBlockProtection specify the state to sync (lastest, finalized or safe)


Default: trueType: boolean

L1SyncCheckL2BlockHash if is true when a batch is closed is force to check L2Block hash against trustedNode (only apply for permissionless)


Default: 600Type: integer

L1SyncCheckL2BlockNumberhModulus is the modulus used to choose the l2block to check
a modules 5, for instance, means check all l2block multiples of 5 (10,15,20,...)


Default: trueType: boolean

If enabled then the check l1 Block Hash is active


Default: "finalized"Type: enum (of string)

L1SafeBlockPoint is the point that a block is considered safe enough to be checked
it can be: finalized, safe,pending or latest

Must be one of:

  • "finalized"
  • "safe"
  • "latest"

Default: 0Type: integer

L1SafeBlockOffset is the offset to add to L1SafeBlockPoint as a safe point
it can be positive or negative
Example: L1SafeBlockPoint= finalized, L1SafeBlockOffset= -10, then the safe block ten blocks before the finalized block


Default: trueType: boolean

ForceCheckBeforeStart if is true then the first time the system is started it will force to check all pending blocks


Default: trueType: boolean

If enabled then the pre-check is active, will check blocks between L1SafeBlock and L1PreSafeBlock


Default: "safe"Type: enum (of string)

L1PreSafeBlockPoint is the point that a block is considered safe enough to be checked
it can be: finalized, safe,pending or latest

Must be one of:

  • "finalized"
  • "safe"
  • "latest"

Default: 0Type: integer

L1PreSafeBlockOffset is the offset to add to L1PreSafeBlockPoint as a safe point
it can be positive or negative
Example: L1PreSafeBlockPoint= finalized, L1PreSafeBlockOffset= -10, then the safe block ten blocks before the finalized block


Default: "sequential"Type: enum (of string)

L1SynchronizationMode define how to synchronize with L1:
- parallel: Request data to L1 in parallel, and process sequentially. The advantage is that executor is not blocked waiting for L1 data
- sequential: Request data to L1 and execute

Must be one of:

  • "sequential"
  • "parallel"

L1ParallelSynchronization Configuration for parallel mode (if L1SynchronizationMode equal to 'parallel')
Default: 10Type: integer

MaxClients Number of clients used to synchronize with L1


Default: 25Type: integer

MaxPendingNoProcessedBlocks Size of the buffer used to store rollup information from L1, must be >= to NumberOfEthereumClientsToSync
sugested twice of NumberOfParallelOfEthereumClients


Default: "5s"Type: string

RequestLastBlockPeriod is the time to wait to request the
last block to L1 to known if we need to retrieve more data.
This value only apply when the system is synchronized


Examples:

"1m"
 
"300ms"
 

Consumer Configuration for the consumer of rollup information from L1
Default: "5s"Type: string

AceptableInacctivityTime is the expected maximum time that the consumer
could wait until new data is produced. If the time is greater it emmit a log to warn about
that. The idea is keep working the consumer as much as possible, so if the producer is not
fast enought then you could increse the number of parallel clients to sync with L1


Examples:

"1m"
 
"300ms"
@@ -34,7 +28,7 @@
 
"300ms"
 

Default: "5s"Type: string

RollupInfoRetriesSpacing is the minimum time between retries to request rollup info (it will sleep for fulfill this time) to avoid spamming L1


Examples:

"1m"
 
"300ms"
-

Default: falseType: boolean

FallbackToSequentialModeOnSynchronized if true switch to sequential mode if the system is synchronized


L2Synchronization Configuration for L2 synchronization
Default: falseType: boolean

AcceptEmptyClosedBatches is a flag to enable or disable the acceptance of empty batches.
if true, the synchronizer will accept empty batches and process them.


Default: falseType: boolean

ReprocessFullBatchOnClose if is true when a batch is closed is force to reprocess again


Default: trueType: boolean

CheckLastL2BlockHashOnCloseBatch if is true when a batch is closed is force to check the last L2Block hash


Configuration of the sequencer service
Default: 100Type: integer

DeletePoolTxsL1BlockConfirmations is blocks amount after which txs will be deleted from the pool


Default: "12h0m0s"Type: string

DeletePoolTxsCheckInterval is frequency with which txs will be checked for deleting


Examples:

"1m"
+

Default: falseType: boolean

FallbackToSequentialModeOnSynchronized if true switch to sequential mode if the system is synchronized


L2Synchronization Configuration for L2 synchronization
Default: trueType: boolean

If enabled then the L2 sync process is permitted (only for permissionless)


Default: falseType: boolean

AcceptEmptyClosedBatches is a flag to enable or disable the acceptance of empty batches.
if true, the synchronizer will accept empty batches and process them.


Default: falseType: boolean

ReprocessFullBatchOnClose if is true when a batch is closed is force to reprocess again


Default: trueType: boolean

CheckLastL2BlockHashOnCloseBatch if is true when a batch is closed is force to check the last L2Block hash


Configuration of the sequencer service
Default: 100Type: integer

DeletePoolTxsL1BlockConfirmations is blocks amount after which txs will be deleted from the pool


Default: "12h0m0s"Type: string

DeletePoolTxsCheckInterval is frequency with which txs will be checked for deleting


Examples:

"1m"
 
"300ms"
 

Default: "10m0s"Type: string

TxLifetimeCheckInterval is the time the sequencer waits to check txs lifetime


Examples:

"1m"
 
"300ms"
@@ -44,7 +38,7 @@
 
"300ms"
 

Default: "5s"Type: string

StateConsistencyCheckInterval is the time the sequencer waits to check if a state inconsistency has happened


Examples:

"1m"
 
"300ms"
-

Finalizer's specific config properties
Default: "1m0s"Type: string

ForcedBatchesTimeout is the time the finalizer waits after receiving closing signal to process Forced Batches


Examples:

"1m"
+

Type: array of integer

L2Coinbase defines which address is going to receive the fees. It gets the config value from SequenceSender.L2Coinbase

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Finalizer's specific config properties
Default: "1m0s"Type: string

ForcedBatchesTimeout is the time the finalizer waits after receiving closing signal to process Forced Batches


Examples:

"1m"
 
"300ms"
 

Default: "100ms"Type: string

NewTxsWaitInterval is the time the finalizer sleeps between each iteration, if there are no transactions to be processed


Examples:

"1m"
 
"300ms"
@@ -58,17 +52,19 @@
 
"300ms"
 

Default: "1h0m0s"Type: string

StateRootSyncInterval indicates how often the stateroot generated by the L2 block process will be synchronized with
the stateroot used in the tx-by-tx execution


Examples:

"1m"
 
"300ms"
-

Default: 0Type: integer

HaltOnBatchNumber specifies the batch number where the Sequencer will stop to process more transactions and generate new batches.
The Sequencer will halt after it closes the batch equal to this number


Default: falseType: boolean

SequentialBatchSanityCheck indicates if the reprocess of a closed batch (sanity check) must be done in a
sequential way (instead than in parallel)


Default: falseType: boolean

SequentialProcessL2Block indicates if the processing of a L2 Block must be done in the same finalizer go func instead
in the processPendingL2Blocks go func


Default: "0s"Type: string

XLayer config
FullBatchSleepDuration is the time the finalizer sleeps between each full batch iteration


Examples:

"1m"
-
"300ms"
-

Metrics is the config for the sequencer metrics
Default: "1h0m0s"Type: string

Interval is the interval of time to calculate sequencer metrics


Examples:

"1m"
+

Default: "50ms"Type: string

FlushIdCheckInterval is the time interval to get storedFlushID value from the executor/hashdb


Examples:

"1m"
+
"300ms"
+

Default: 0Type: integer

HaltOnBatchNumber specifies the batch number where the Sequencer will stop to process more transactions and generate new batches.
The Sequencer will halt after it closes the batch equal to this number


Default: falseType: boolean

SequentialBatchSanityCheck indicates if the reprocess of a closed batch (sanity check) must be done in a
sequential way (instead than in parallel)


Default: falseType: boolean

SequentialProcessL2Block indicates if the processing of a L2 Block must be done in the same finalizer go func instead
in the processPendingL2Blocks go func


Metrics is the config for the sequencer metrics
Default: "1h0m0s"Type: string

Interval is the interval of time to calculate sequencer metrics


Examples:

"1m"
 
"300ms"
-

Default: trueType: boolean

EnableLog is a flag to enable/disable metrics logs


StreamServerCfg is the config for the stream server
Default: 0Type: integer

Port to listen on


Default: ""Type: string

Filename of the binary data file


Default: 0Type: integer

Version of the binary data file


Default: 0Type: integer

ChainID is the chain ID


Default: falseType: boolean

Enabled is a flag to enable/disable the data streamer


Log is the log configuration
Default: ""Type: enum (of string)

Must be one of:

  • "production"
  • "development"

Default: ""Type: enum (of string)

Must be one of:

  • "debug"
  • "info"
  • "warn"
  • "error"
  • "dpanic"
  • "panic"
  • "fatal"

Type: array of string

Each item of this array must be:


Default: 0Type: integer

UpgradeEtrogBatchNumber is the batch number of the upgrade etrog


Type: array of string

XLayer config
PackBatchSpacialList is the list of addresses that will have a special gas price

Each item of this array must be:


Default: 0Type: number

GasPriceMultiple is the multiple of the gas price


Default: 0Type: number

InitGasPriceMultiple is the multiple of the gas price for init free gas tx


Default: 0Type: integer

QueryPendingTxsLimit is used to limit amount txs from the db


Configuration of the sequence sender service
Default: "5s"Type: string

WaitPeriodSendSequence is the time the sequencer waits until
trying to send a sequence to L1


Examples:

"1m"
+

Default: trueType: boolean

EnableLog is a flag to enable/disable metrics logs


StreamServerCfg is the config for the stream server
Default: 0Type: integer

Port to listen on


Default: ""Type: string

Filename of the binary data file


Default: 0Type: integer

Version of the binary data file


Default: 0Type: integer

ChainID is the chain ID


Default: falseType: boolean

Enabled is a flag to enable/disable the data streamer


Log is the log configuration
Default: ""Type: enum (of string)

Must be one of:

  • "production"
  • "development"

Default: ""Type: enum (of string)

Must be one of:

  • "debug"
  • "info"
  • "warn"
  • "error"
  • "dpanic"
  • "panic"
  • "fatal"

Type: array of string

Each item of this array must be:


Default: 0Type: integer

UpgradeEtrogBatchNumber is the batch number of the upgrade etrog


Default: "5s"Type: string

WriteTimeout is the TCP write timeout when sending data to a datastream client


Examples:

"1m"
+
"300ms"
+

Configuration of the sequence sender service
Default: "5s"Type: string

WaitPeriodSendSequence is the time the sequencer waits until
trying to send a sequence to L1


Examples:

"1m"
 
"300ms"
 

Default: "5s"Type: string

LastBatchVirtualizationTimeMaxWaitPeriod is time since sequences should be sent


Examples:

"1m"
 
"300ms"
 

Default: "30s"Type: string

L1BlockTimestampMargin is the time difference (margin) that must exists between last L1 block and last L2 block in the sequence before
to send the sequence to L1. If the difference is lower than this value then sequencesender will wait until the difference is equal or greater


Examples:

"1m"
 
"300ms"
-

Default: 131072Type: integer

MaxTxSizeForL1 is the maximum size a single transaction can have. This field has
non-trivial consequences: larger transactions than 128KB are significantly harder and
more expensive to propagate; larger transactions also take more resources
to validate whether they fit into the pool or not.


Type: array of integer

SenderAddress defines which private key the eth tx manager needs to use
to sign the L1 txs

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Default: "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"Type: array of integer

L2Coinbase defines which address is going to receive the fees

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


PrivateKey defines all the key store files that are going to be read in order to provide the private keys to sign the L1 txs
Default: ""Type: string

Path is the file path for the key store file


Default: ""Type: string

Password is the password to decrypt the key store file


Default: 0Type: integer

Batch number where there is a forkid change (fork upgrade)


Default: 80000Type: integer

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


Default: 10Type: integer

XLayer config
MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx


DAPermitApiPrivateKey defines all the key store files that are going to sign batches for DA service
Default: "/pk/sequencer.keystore"Type: string

Path is the file path for the key store file


Default: "testonly"Type: string

Password is the password to decrypt the key store file


Configuration of the aggregator service
Default: "0.0.0.0"Type: string

Host for the grpc server


Default: 50081Type: integer

Port for the grpc server


Default: "5s"Type: string

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


Examples:

"1m"
+

Default: 131072Type: integer

MaxTxSizeForL1 is the maximum size a single transaction can have. This field has
non-trivial consequences: larger transactions than 128KB are significantly harder and
more expensive to propagate; larger transactions also take more resources
to validate whether they fit into the pool or not.


Type: array of integer

SenderAddress defines which private key the eth tx manager needs to use
to sign the L1 txs

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Default: "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"Type: array of integer

L2Coinbase defines which address is going to receive the fees

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


PrivateKey defines all the key store files that are going to be read in order to provide the private keys to sign the L1 txs
Default: "/pk/sequencer.keystore"Type: string

Path is the file path for the key store file


Default: "testonly"Type: string

Password is the password to decrypt the key store file


Default: 0Type: integer

Batch number where there is a forkid change (fork upgrade)


Default: 80000Type: integer

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


Default: 32Type: integer

SequenceL1BlockConfirmations is number of blocks to consider a sequence sent to L1 as final


Configuration of the aggregator service
Default: "0.0.0.0"Type: string

Host for the grpc server


Default: 50081Type: integer

Port for the grpc server


Default: "5s"Type: string

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


Examples:

"1m"
 
"300ms"
 

Default: "1m30s"Type: string

VerifyProofInterval is the interval of time to verify/send an proof in L1


Examples:

"1m"
 
"300ms"
@@ -78,16 +74,14 @@
 
"300ms"
 

Default: 0Type: integer

ChainID is the L2 ChainID provided by the Network Config


Default: 0Type: integer

ForkID is the L2 ForkID provided by the Network Config


Default: ""Type: string

SenderAddress defines which private key the eth tx manager needs to use
to sign the L1 txs


Default: "2m0s"Type: string

CleanupLockedProofsInterval is the interval of time to clean up locked proofs.


Examples:

"1m"
 
"300ms"
-

Default: "10m"Type: string

GeneratingProofCleanupThreshold represents the time interval after
which a proof in generating state is considered to be stuck and
allowed to be cleared.


Default: 0Type: integer

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


Default: 0Type: integer

UpgradeEtrogBatchNumber is the number of the first batch after upgrading to etrog


Default: 2Type: integer

BatchProofL1BlockConfirmations is number of L1 blocks to consider we can generate the proof for a virtual batch


Default: "l1"Type: string

SettlementBackend configuration defines how a final ZKP should be settled. Directly to L1 or over the Beethoven service.


Default: "5m0s"Type: string

AggLayerTxTimeout is the interval time to wait for a tx to be mined from the agglayer


Examples:

"1m"
-
"300ms"
-

Default: ""Type: string

AggLayerURL url of the agglayer service


SequencerPrivateKey Private key of the trusted sequencer
Default: ""Type: string

Path is the file path for the key store file


Default: ""Type: string

Password is the password to decrypt the key store file


Configuration of the genesis of the network. This is used to known the initial state of the network

L1: Configuration related to L1
Default: 0Type: integer

Chain ID of the L1 network


Type: array of integer

ZkEVMAddr Address of the L1 contract polygonZkEVMAddress

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

RollupManagerAddr Address of the L1 contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

PolAddr Address of the L1 Pol token Contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

GlobalExitRootManagerAddr Address of the L1 GlobalExitRootManager contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

L2: address of the PolygonZkEVMBridge proxy smart contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Default: 0Type: integer

RollupBlockNumber is the block number where the polygonZKEVM smc was deployed on L1


Default: 0Type: integer

RollupManagerBlockNumber is the block number where the RollupManager smc was deployed on L1


Type: array of integer

Root hash of the genesis block

Must contain a minimum of 32 items

Must contain a maximum of 32 items

Each item of this array must be:


Type: array of object

Actions is the data to populate into the state trie

Each item of this array must be:


Configuration of the gas price suggester service
Default: "follower"Type: string

Default: 2000000000Type: integer

DefaultGasPriceWei is used to set the gas price to be used by the default gas pricer or as minimim gas price by the follower gas pricer.


Default: 0Type: integer

MaxGasPriceWei is used to limit the gas price returned by the follower gas pricer to a maximum value. It is ignored if 0.


Default: 0Type: integer

Default: 0Type: integer

Default: "10s"Type: string

Examples:

"1m"
+

Default: "10m"Type: string

GeneratingProofCleanupThreshold represents the time interval after
which a proof in generating state is considered to be stuck and
allowed to be cleared.


Default: 0Type: integer

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


Default: 0Type: integer

UpgradeEtrogBatchNumber is the number of the first batch after upgrading to etrog


Default: 2Type: integer

BatchProofL1BlockConfirmations is number of L1 blocks to consider we can generate the proof for a virtual batch


Configuration of the genesis of the network. This is used to known the initial state of the network

L1: Configuration related to L1
Default: 0Type: integer

Chain ID of the L1 network


Type: array of integer

ZkEVMAddr Address of the L1 contract polygonZkEVMAddress

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

RollupManagerAddr Address of the L1 contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

PolAddr Address of the L1 Pol token Contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


Type: array of integer

GlobalExitRootManagerAddr Address of the L1 GlobalExitRootManager contract

Must contain a minimum of 20 items

Must contain a maximum of 20 items

Each item of this array must be:


L1: Genesis of the rollup, first block number and root
Default: 0Type: integer

BlockNumber is the block number where the polygonZKEVM smc was deployed on L1


Type: array of integer

Root hash of the genesis block

Must contain a minimum of 32 items

Must contain a maximum of 32 items

Each item of this array must be:


Type: array of object

Actions is the data to populate into the state trie

Each item of this array must be:


Configuration of the gas price suggester service
Default: "follower"Type: string

Default: 2000000000Type: integer

DefaultGasPriceWei is used to set the gas price to be used by the default gas pricer or as minimim gas price by the follower gas pricer.


Default: 0Type: integer

MaxGasPriceWei is used to limit the gas price returned by the follower gas pricer to a maximum value. It is ignored if 0.


Default: 0Type: integer

Default: 0Type: integer

Default: "10s"Type: string

Examples:

"1m"
 
"300ms"
 

Default: "1h0m0s"Type: string

Examples:

"1m"
 
"300ms"
 

Default: "5m0s"Type: string

Examples:

"1m"
 
"300ms"
-

Default: 0.15Type: number

Default: ""Type: string

XLayer config


Default: ""Type: string

Default: ""Type: string

Default: ""Type: string

Default: ""Type: string

Default: ""Type: string

Default: 0Type: integer

Default: 0Type: integer

Default: 0Type: number

DefaultL1CoinPrice is the L1 token's coin price


Default: 0Type: number

DefaultL2CoinPrice is the native token's coin price


Default: 0Type: number

Default: falseType: boolean

EnableFollowerAdjustByL2L1Price is dynamic adjust the factor through the L1 and L2 coins price in follower strategy


Configuration of the executor service
Default: "xlayer-prover:50071"Type: string

Default: 3Type: integer

MaxResourceExhaustedAttempts is the max number of attempts to make a transaction succeed because of resource exhaustion


Default: "1s"Type: string

WaitOnResourceExhaustion is the time to wait before retrying a transaction because of resource exhaustion


Examples:

"1m"
+

Default: 0.15Type: number

Configuration of the executor service
Default: "zkevm-prover:50071"Type: string

Default: 3Type: integer

MaxResourceExhaustedAttempts is the max number of attempts to make a transaction succeed because of resource exhaustion


Default: "1s"Type: string

WaitOnResourceExhaustion is the time to wait before retrying a transaction because of resource exhaustion


Examples:

"1m"
 
"300ms"
-

Default: 100000000Type: integer

Configuration of the merkle tree client service. Not use in the node, only for testing
Default: "xlayer-prover:50061"Type: string

URI is the server URI.


Configuration of the metrics service, basically is where is going to publish the metrics
Default: "0.0.0.0"Type: string

Host is the address to bind the metrics server


Default: 9091Type: integer

Port is the port to bind the metrics server


Default: falseType: boolean

Enabled is the flag to enable/disable the metrics server


Default: ""Type: string

ProfilingHost is the address to bind the profiling server


Default: 0Type: integer

ProfilingPort is the port to bind the profiling server


Default: falseType: boolean

ProfilingEnabled is the flag to enable/disable the profiling server


Configuration of the event database connection

DB is the database configuration
Default: ""Type: string

Database name


Default: ""Type: string

Database User name


Default: ""Type: string

Database Password of the user


Default: ""Type: string

Host address of database


Default: ""Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 0Type: integer

MaxConns is the maximum number of connections in the pool.


Configuration of the hash database connection
Default: "prover_db"Type: string

Database name


Default: "prover_user"Type: string

Database User name


Default: "prover_pass"Type: string

Database Password of the user


Default: "xlayer-state-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


State service configuration
Default: 0Type: integer

MaxCumulativeGasUsed is the max gas allowed per batch


Default: 0Type: integer

ChainID is the L2 ChainID provided by the Network Config


Type: array of object

ForkIdIntervals is the list of fork id intervals

Each item of this array must be:


Default: 0Type: integer

MaxResourceExhaustedAttempts is the max number of attempts to make a transaction succeed because of resource exhaustion


Default: "0s"Type: string

WaitOnResourceExhaustion is the time to wait before retrying a transaction because of resource exhaustion


Examples:

"1m"
+

Default: 100000000Type: integer

Configuration of the merkle tree client service. Not use in the node, only for testing
Default: "zkevm-prover:50061"Type: string

URI is the server URI.


Configuration of the metrics service, basically is where is going to publish the metrics
Default: "0.0.0.0"Type: string

Host is the address to bind the metrics server


Default: 9091Type: integer

Port is the port to bind the metrics server


Default: falseType: boolean

Enabled is the flag to enable/disable the metrics server


Default: ""Type: string

ProfilingHost is the address to bind the profiling server


Default: 0Type: integer

ProfilingPort is the port to bind the profiling server


Default: falseType: boolean

ProfilingEnabled is the flag to enable/disable the profiling server


Configuration of the event database connection

DB is the database configuration
Default: ""Type: string

Database name


Default: ""Type: string

Database User name


Default: ""Type: string

Database Password of the user


Default: ""Type: string

Host address of database


Default: ""Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 0Type: integer

MaxConns is the maximum number of connections in the pool.


Configuration of the hash database connection
Default: "prover_db"Type: string

Database name


Default: "prover_user"Type: string

Database User name


Default: "prover_pass"Type: string

Database Password of the user


Default: "zkevm-state-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


State service configuration
Default: 0Type: integer

MaxCumulativeGasUsed is the max gas allowed per batch


Default: 0Type: integer

ChainID is the L2 ChainID provided by the Network Config


Type: array of object

ForkIdIntervals is the list of fork id intervals

Each item of this array must be:


Default: 0Type: integer

MaxResourceExhaustedAttempts is the max number of attempts to make a transaction succeed because of resource exhaustion


Default: "0s"Type: string

WaitOnResourceExhaustion is the time to wait before retrying a transaction because of resource exhaustion


Examples:

"1m"
 
"300ms"
-

Default: 0Type: integer

Batch number from which there is a forkid change (fork upgrade)


Default: 0Type: integer

New fork id to be used for batches greaters than ForkUpgradeBatchNumber (fork upgrade)


DB is the database configuration
Default: "state_db"Type: string

Database name


Default: "state_user"Type: string

Database User name


Default: "state_password"Type: string

Database Password of the user


Default: "xlayer-state-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


Configuration for the batch constraints
Default: 300Type: integer

Default: 120000Type: integer

Default: 1125899906842624Type: integer

Default: 2145Type: integer

Default: 252357Type: integer

Default: 135191Type: integer

Default: 236585Type: integer

Default: 236585Type: integer

Default: 473170Type: integer

Default: 7570538Type: integer

Default: 1596Type: integer

Default: 0Type: integer

MaxLogsCount is a configuration to set the max number of logs that can be returned
in a single call to the state, if zero it means no limit


Default: 0Type: integer

MaxLogsBlockRange is a configuration to set the max range for block number when querying TXs
logs in a single call to the state, if zero it means no limit


Default: 0Type: integer

MaxNativeBlockHashBlockRange is a configuration to set the max range for block number when querying
native block hashes in a single call to the state, if zero it means no limit


Default: falseType: boolean

AvoidForkIDInMemory is a configuration that forces the ForkID information to be loaded
from the DB every time it's needed


Apollo configuration
Default: falseType: boolean

Default: ""Type: string

Default: ""Type: string

Default: ""Type: string

Default: 0Type: integer

ForceBatchAddress Address of the L1 ForceBatch contract


\ No newline at end of file +

Default: 0Type: integer

Batch number from which there is a forkid change (fork upgrade)


Default: 0Type: integer

New fork id to be used for batches greaters than ForkUpgradeBatchNumber (fork upgrade)


DB is the database configuration
Default: "state_db"Type: string

Database name


Default: "state_user"Type: string

Database User name


Default: "state_password"Type: string

Database Password of the user


Default: "zkevm-state-db"Type: string

Host address of database


Default: "5432"Type: string

Port Number of database


Default: falseType: boolean

EnableLog


Default: 200Type: integer

MaxConns is the maximum number of connections in the pool.


Configuration for the batch constraints
Default: 300Type: integer

Default: 120000Type: integer

Default: 1125899906842624Type: integer

Default: 2145Type: integer

Default: 252357Type: integer

Default: 135191Type: integer

Default: 236585Type: integer

Default: 236585Type: integer

Default: 473170Type: integer

Default: 7570538Type: integer

Default: 1596Type: integer

Default: 0Type: integer

MaxLogsCount is a configuration to set the max number of logs that can be returned
in a single call to the state, if zero it means no limit


Default: 0Type: integer

MaxLogsBlockRange is a configuration to set the max range for block number when querying TXs
logs in a single call to the state, if zero it means no limit


Default: 0Type: integer

MaxNativeBlockHashBlockRange is a configuration to set the max range for block number when querying
native block hashes in a single call to the state, if zero it means no limit


Default: falseType: boolean

AvoidForkIDInMemory is a configuration that forces the ForkID information to be loaded
from the DB every time it's needed


\ No newline at end of file diff --git a/docs/config-file/node-config-doc.md b/docs/config-file/node-config-doc.md index 4ece9c91a1..3dab591984 100644 --- a/docs/config-file/node-config-doc.md +++ b/docs/config-file/node-config-doc.md @@ -27,8 +27,6 @@ | - [EventLog](#EventLog ) | No | object | No | - | Configuration of the event database connection | | - [HashDB](#HashDB ) | No | object | No | - | Configuration of the hash database connection | | - [State](#State ) | No | object | No | - | State service configuration | -| - [Apollo](#Apollo ) | No | object | No | - | Apollo configuration | -| - [Fork9UpgradeBatch](#Fork9UpgradeBatch ) | No | integer | No | - | ForceBatchAddress Address of the L1 ForceBatch contract | ## 1. `IsTrustedSequencer` @@ -249,7 +247,6 @@ Url="" | - [ForcedGas](#EthTxManager_ForcedGas ) | No | integer | No | - | ForcedGas is the amount of gas to be forced in case of gas estimation error | | - [GasPriceMarginFactor](#EthTxManager_GasPriceMarginFactor ) | No | number | No | - | 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 | | - [MaxGasPriceLimit](#EthTxManager_MaxGasPriceLimit ) | No | integer | No | - | MaxGasPriceLimit helps avoiding transactions to be sent over an 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 | -| - [CustodialAssets](#EthTxManager_CustodialAssets ) | No | object | No | - | CustodialAssets is the configuration for the custodial assets | ### 6.1. `EthTxManager.FrequencyToMonitorTxs` @@ -410,310 +407,26 @@ tx gas price = 110 MaxGasPriceLimit=0 ``` -### 6.7. `[EthTxManager.CustodialAssets]` - -**Type:** : `object` -**Description:** CustodialAssets is the configuration for the custodial assets - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | ----------------------------------------------------------------------------- | -| - [Enable](#EthTxManager_CustodialAssets_Enable ) | No | boolean | No | - | Enable is the flag to enable the custodial assets | -| - [URL](#EthTxManager_CustodialAssets_URL ) | No | string | No | - | URL is the url to sign the custodial assets | -| - [Symbol](#EthTxManager_CustodialAssets_Symbol ) | No | integer | No | - | Symbol is the symbol of the network, 2 prd, 2882 devnet | -| - [SequencerAddr](#EthTxManager_CustodialAssets_SequencerAddr ) | No | array of integer | No | - | SequencerAddr is the address of the sequencer | -| - [AggregatorAddr](#EthTxManager_CustodialAssets_AggregatorAddr ) | No | array of integer | No | - | AggregatorAddr is the address of the aggregator | -| - [WaitResultTimeout](#EthTxManager_CustodialAssets_WaitResultTimeout ) | No | string | No | - | Duration | -| - [OperateTypeSeq](#EthTxManager_CustodialAssets_OperateTypeSeq ) | No | integer | No | - | OperateTypeSeq is the operate type of the custodial assets for the sequencer | -| - [OperateTypeAgg](#EthTxManager_CustodialAssets_OperateTypeAgg ) | No | integer | No | - | OperateTypeAgg is the operate type of the custodial assets for the aggregator | -| - [ProjectSymbol](#EthTxManager_CustodialAssets_ProjectSymbol ) | No | integer | No | - | ProjectSymbol is the project symbol of the custodial assets | -| - [OperateSymbol](#EthTxManager_CustodialAssets_OperateSymbol ) | No | integer | No | - | OperateSymbol is the operate symbol of the custodial assets | -| - [SysFrom](#EthTxManager_CustodialAssets_SysFrom ) | No | integer | No | - | SysFrom is the sys from of the custodial assets | -| - [UserID](#EthTxManager_CustodialAssets_UserID ) | No | integer | No | - | UserID is the user id of the custodial assets | -| - [OperateAmount](#EthTxManager_CustodialAssets_OperateAmount ) | No | integer | No | - | OperateAmount is the operate amount of the custodial assets | -| - [RequestSignURI](#EthTxManager_CustodialAssets_RequestSignURI ) | No | string | No | - | RequestSignURI is the request sign uri of the custodial assets | -| - [QuerySignURI](#EthTxManager_CustodialAssets_QuerySignURI ) | No | string | No | - | QuerySignURI is the query sign uri of the custodial assets | -| - [AccessKey](#EthTxManager_CustodialAssets_AccessKey ) | No | string | No | - | AccessKey is the access key of the custodial assets | -| - [SecretKey](#EthTxManager_CustodialAssets_SecretKey ) | No | string | No | - | SecretKey is the secret key of the custodial assets | - -#### 6.7.1. `EthTxManager.CustodialAssets.Enable` - -**Type:** : `boolean` - -**Default:** `false` - -**Description:** Enable is the flag to enable the custodial assets - -**Example setting the default value** (false): -``` -[EthTxManager.CustodialAssets] -Enable=false -``` - -#### 6.7.2. `EthTxManager.CustodialAssets.URL` - -**Type:** : `string` - -**Default:** `"http://localhost:8080"` - -**Description:** URL is the url to sign the custodial assets - -**Example setting the default value** ("http://localhost:8080"): -``` -[EthTxManager.CustodialAssets] -URL="http://localhost:8080" -``` - -#### 6.7.3. `EthTxManager.CustodialAssets.Symbol` - -**Type:** : `integer` - -**Default:** `2882` - -**Description:** Symbol is the symbol of the network, 2 prd, 2882 devnet - -**Example setting the default value** (2882): -``` -[EthTxManager.CustodialAssets] -Symbol=2882 -``` - -#### 6.7.4. `EthTxManager.CustodialAssets.SequencerAddr` - -**Type:** : `array of integer` - -**Default:** `"0x1a13bddcc02d363366e04d4aa588d3c125b0ff6f"` - -**Description:** SequencerAddr is the address of the sequencer - -**Example setting the default value** ("0x1a13bddcc02d363366e04d4aa588d3c125b0ff6f"): -``` -[EthTxManager.CustodialAssets] -SequencerAddr="0x1a13bddcc02d363366e04d4aa588d3c125b0ff6f" -``` - -#### 6.7.5. `EthTxManager.CustodialAssets.AggregatorAddr` - -**Type:** : `array of integer` - -**Default:** `"0x66e39a1e507af777e8c385e2d91559e20e306303"` - -**Description:** AggregatorAddr is the address of the aggregator - -**Example setting the default value** ("0x66e39a1e507af777e8c385e2d91559e20e306303"): -``` -[EthTxManager.CustodialAssets] -AggregatorAddr="0x66e39a1e507af777e8c385e2d91559e20e306303" -``` - -#### 6.7.6. `EthTxManager.CustodialAssets.WaitResultTimeout` - -**Title:** Duration - -**Type:** : `string` - -**Default:** `"2m0s"` - -**Description:** WaitResultTimeout is the timeout to wait for the result of the custodial assets - -**Examples:** - -```json -"1m" -``` - -```json -"300ms" -``` - -**Example setting the default value** ("2m0s"): -``` -[EthTxManager.CustodialAssets] -WaitResultTimeout="2m0s" -``` - -#### 6.7.7. `EthTxManager.CustodialAssets.OperateTypeSeq` - -**Type:** : `integer` - -**Default:** `3` - -**Description:** OperateTypeSeq is the operate type of the custodial assets for the sequencer - -**Example setting the default value** (3): -``` -[EthTxManager.CustodialAssets] -OperateTypeSeq=3 -``` - -#### 6.7.8. `EthTxManager.CustodialAssets.OperateTypeAgg` - -**Type:** : `integer` - -**Default:** `4` - -**Description:** OperateTypeAgg is the operate type of the custodial assets for the aggregator - -**Example setting the default value** (4): -``` -[EthTxManager.CustodialAssets] -OperateTypeAgg=4 -``` - -#### 6.7.9. `EthTxManager.CustodialAssets.ProjectSymbol` - -**Type:** : `integer` - -**Default:** `3011` - -**Description:** ProjectSymbol is the project symbol of the custodial assets - -**Example setting the default value** (3011): -``` -[EthTxManager.CustodialAssets] -ProjectSymbol=3011 -``` - -#### 6.7.10. `EthTxManager.CustodialAssets.OperateSymbol` - -**Type:** : `integer` - -**Default:** `2` - -**Description:** OperateSymbol is the operate symbol of the custodial assets - -**Example setting the default value** (2): -``` -[EthTxManager.CustodialAssets] -OperateSymbol=2 -``` - -#### 6.7.11. `EthTxManager.CustodialAssets.SysFrom` - -**Type:** : `integer` - -**Default:** `3` - -**Description:** SysFrom is the sys from of the custodial assets - -**Example setting the default value** (3): -``` -[EthTxManager.CustodialAssets] -SysFrom=3 -``` - -#### 6.7.12. `EthTxManager.CustodialAssets.UserID` - -**Type:** : `integer` - -**Default:** `0` - -**Description:** UserID is the user id of the custodial assets - -**Example setting the default value** (0): -``` -[EthTxManager.CustodialAssets] -UserID=0 -``` - -#### 6.7.13. `EthTxManager.CustodialAssets.OperateAmount` - -**Type:** : `integer` - -**Default:** `0` - -**Description:** OperateAmount is the operate amount of the custodial assets - -**Example setting the default value** (0): -``` -[EthTxManager.CustodialAssets] -OperateAmount=0 -``` - -#### 6.7.14. `EthTxManager.CustodialAssets.RequestSignURI` - -**Type:** : `string` - -**Default:** `"/priapi/v1/assetonchain/ecology/ecologyOperate"` - -**Description:** RequestSignURI is the request sign uri of the custodial assets - -**Example setting the default value** ("/priapi/v1/assetonchain/ecology/ecologyOperate"): -``` -[EthTxManager.CustodialAssets] -RequestSignURI="/priapi/v1/assetonchain/ecology/ecologyOperate" -``` - -#### 6.7.15. `EthTxManager.CustodialAssets.QuerySignURI` - -**Type:** : `string` - -**Default:** `"/priapi/v1/assetonchain/ecology/querySignDataByOrderNo"` - -**Description:** QuerySignURI is the query sign uri of the custodial assets - -**Example setting the default value** ("/priapi/v1/assetonchain/ecology/querySignDataByOrderNo"): -``` -[EthTxManager.CustodialAssets] -QuerySignURI="/priapi/v1/assetonchain/ecology/querySignDataByOrderNo" -``` - -#### 6.7.16. `EthTxManager.CustodialAssets.AccessKey` - -**Type:** : `string` - -**Default:** `""` - -**Description:** AccessKey is the access key of the custodial assets - -**Example setting the default value** (""): -``` -[EthTxManager.CustodialAssets] -AccessKey="" -``` - -#### 6.7.17. `EthTxManager.CustodialAssets.SecretKey` - -**Type:** : `string` - -**Default:** `""` - -**Description:** SecretKey is the secret key of the custodial assets - -**Example setting the default value** (""): -``` -[EthTxManager.CustodialAssets] -SecretKey="" -``` - ## 7. `[Pool]` **Type:** : `object` **Description:** Pool service configuration -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------------- | ------- | --------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------- | -| - [IntervalToRefreshBlockedAddresses](#Pool_IntervalToRefreshBlockedAddresses ) | No | string | No | - | Duration | -| - [IntervalToRefreshWhiteAddresses](#Pool_IntervalToRefreshWhiteAddresses ) | No | string | No | - | Duration | -| - [EnableWhitelist](#Pool_EnableWhitelist ) | No | boolean | No | - | EnableWhitelist is a flag to enable/disable the whitelist | -| - [IntervalToRefreshGasPrices](#Pool_IntervalToRefreshGasPrices ) | No | string | No | - | Duration | -| - [MaxTxBytesSize](#Pool_MaxTxBytesSize ) | No | integer | No | - | MaxTxBytesSize is the max size of a transaction in bytes | -| - [MaxTxDataBytesSize](#Pool_MaxTxDataBytesSize ) | No | integer | No | - | MaxTxDataBytesSize is the max size of the data field of a transaction in bytes | -| - [DB](#Pool_DB ) | No | object | No | - | DB is the database configuration | -| - [DefaultMinGasPriceAllowed](#Pool_DefaultMinGasPriceAllowed ) | No | integer | No | - | DefaultMinGasPriceAllowed is the default min gas price to suggest | -| - [MinAllowedGasPriceInterval](#Pool_MinAllowedGasPriceInterval ) | No | string | No | - | Duration | -| - [PollMinAllowedGasPriceInterval](#Pool_PollMinAllowedGasPriceInterval ) | No | string | No | - | Duration | -| - [AccountQueue](#Pool_AccountQueue ) | No | integer | No | - | AccountQueue represents the maximum number of non-executable transaction slots permitted per account | -| - [GlobalQueue](#Pool_GlobalQueue ) | No | integer | No | - | GlobalQueue represents the maximum number of non-executable transaction slots for all accounts | -| - [EffectiveGasPrice](#Pool_EffectiveGasPrice ) | No | object | No | - | EffectiveGasPrice is the config for the effective gas price calculation | -| - [ForkID](#Pool_ForkID ) | No | integer | No | - | ForkID is the current fork ID of the chain | -| - [BlockedList](#Pool_BlockedList ) | No | array of string | No | - | XLayer config
BlockedList is the blocked address list | -| - [FreeGasAddress](#Pool_FreeGasAddress ) | No | array of string | No | - | FreeGasAddress is the default free gas address | -| - [FreeClaimGasLimit](#Pool_FreeClaimGasLimit ) | No | integer | No | - | FreeClaimGasLimit is the max gas allowed use to do a free claim | -| - [BridgeClaimMethodSigs](#Pool_BridgeClaimMethodSigs ) | No | array of string | No | - | BridgeClaimMethodSignature for tracking BridgeClaimMethodSignature method | -| - [EnableFreeGasByNonce](#Pool_EnableFreeGasByNonce ) | No | boolean | No | - | EnableFreeGasByNonce enable free gas | -| - [FreeGasExAddress](#Pool_FreeGasExAddress ) | No | array of string | No | - | FreeGasExAddress is the ex address which can be free gas for the transfer receiver | -| - [FreeGasCountPerAddr](#Pool_FreeGasCountPerAddr ) | No | integer | No | - | FreeGasCountPerAddr is the count limit of free gas tx per address | -| - [FreeGasLimit](#Pool_FreeGasLimit ) | No | integer | No | - | FreeGasLimit is the max gas allowed use to do a free gas tx | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ------------------------------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| - [IntervalToRefreshBlockedAddresses](#Pool_IntervalToRefreshBlockedAddresses ) | No | string | No | - | Duration | +| - [IntervalToRefreshGasPrices](#Pool_IntervalToRefreshGasPrices ) | No | string | No | - | Duration | +| - [MaxTxBytesSize](#Pool_MaxTxBytesSize ) | No | integer | No | - | MaxTxBytesSize is the max size of a transaction in bytes | +| - [MaxTxDataBytesSize](#Pool_MaxTxDataBytesSize ) | No | integer | No | - | MaxTxDataBytesSize is the max size of the data field of a transaction in bytes | +| - [DB](#Pool_DB ) | No | object | No | - | DB is the database configuration | +| - [DefaultMinGasPriceAllowed](#Pool_DefaultMinGasPriceAllowed ) | No | integer | No | - | DefaultMinGasPriceAllowed is the default min gas price to suggest | +| - [MinAllowedGasPriceInterval](#Pool_MinAllowedGasPriceInterval ) | No | string | No | - | Duration | +| - [PollMinAllowedGasPriceInterval](#Pool_PollMinAllowedGasPriceInterval ) | No | string | No | - | Duration | +| - [AccountQueue](#Pool_AccountQueue ) | No | integer | No | - | AccountQueue represents the maximum number of non-executable transaction slots permitted per account | +| - [GlobalQueue](#Pool_GlobalQueue ) | No | integer | No | - | GlobalQueue represents the maximum number of non-executable transaction slots for all accounts | +| - [EffectiveGasPrice](#Pool_EffectiveGasPrice ) | No | object | No | - | EffectiveGasPrice is the config for the effective gas price calculation | +| - [ForkID](#Pool_ForkID ) | No | integer | No | - | ForkID is the current fork ID of the chain | +| - [TxFeeCap](#Pool_TxFeeCap ) | No | number | No | - | TxFeeCap is the global transaction fee(price * gaslimit) cap for
send-transaction variants. The unit is ether. 0 means no cap. | ### 7.1. `Pool.IntervalToRefreshBlockedAddresses` @@ -742,48 +455,7 @@ blocked address list from db to memory IntervalToRefreshBlockedAddresses="5m0s" ``` -### 7.2. `Pool.IntervalToRefreshWhiteAddresses` - -**Title:** Duration - -**Type:** : `string` - -**Default:** `"1m0s"` - -**Description:** IntervalToRefreshWhiteAddresses is the time it takes to sync the -white address list from db to memory - -**Examples:** - -```json -"1m" -``` - -```json -"300ms" -``` - -**Example setting the default value** ("1m0s"): -``` -[Pool] -IntervalToRefreshWhiteAddresses="1m0s" -``` - -### 7.3. `Pool.EnableWhitelist` - -**Type:** : `boolean` - -**Default:** `false` - -**Description:** EnableWhitelist is a flag to enable/disable the whitelist - -**Example setting the default value** (false): -``` -[Pool] -EnableWhitelist=false -``` - -### 7.4. `Pool.IntervalToRefreshGasPrices` +### 7.2. `Pool.IntervalToRefreshGasPrices` **Title:** Duration @@ -809,7 +481,7 @@ EnableWhitelist=false IntervalToRefreshGasPrices="5s" ``` -### 7.5. `Pool.MaxTxBytesSize` +### 7.3. `Pool.MaxTxBytesSize` **Type:** : `integer` @@ -823,7 +495,7 @@ IntervalToRefreshGasPrices="5s" MaxTxBytesSize=100132 ``` -### 7.6. `Pool.MaxTxDataBytesSize` +### 7.4. `Pool.MaxTxDataBytesSize` **Type:** : `integer` @@ -837,7 +509,7 @@ MaxTxBytesSize=100132 MaxTxDataBytesSize=100000 ``` -### 7.7. `[Pool.DB]` +### 7.5. `[Pool.DB]` **Type:** : `object` **Description:** DB is the database configuration @@ -852,7 +524,7 @@ MaxTxDataBytesSize=100000 | - [EnableLog](#Pool_DB_EnableLog ) | No | boolean | No | - | EnableLog | | - [MaxConns](#Pool_DB_MaxConns ) | No | integer | No | - | MaxConns is the maximum number of connections in the pool. | -#### 7.7.1. `Pool.DB.Name` +#### 7.5.1. `Pool.DB.Name` **Type:** : `string` @@ -866,7 +538,7 @@ MaxTxDataBytesSize=100000 Name="pool_db" ``` -#### 7.7.2. `Pool.DB.User` +#### 7.5.2. `Pool.DB.User` **Type:** : `string` @@ -880,7 +552,7 @@ Name="pool_db" User="pool_user" ``` -#### 7.7.3. `Pool.DB.Password` +#### 7.5.3. `Pool.DB.Password` **Type:** : `string` @@ -894,21 +566,21 @@ User="pool_user" Password="pool_password" ``` -#### 7.7.4. `Pool.DB.Host` +#### 7.5.4. `Pool.DB.Host` **Type:** : `string` -**Default:** `"xlayer-pool-db"` +**Default:** `"zkevm-pool-db"` **Description:** Host address of database -**Example setting the default value** ("xlayer-pool-db"): +**Example setting the default value** ("zkevm-pool-db"): ``` [Pool.DB] -Host="xlayer-pool-db" +Host="zkevm-pool-db" ``` -#### 7.7.5. `Pool.DB.Port` +#### 7.5.5. `Pool.DB.Port` **Type:** : `string` @@ -922,7 +594,7 @@ Host="xlayer-pool-db" Port="5432" ``` -#### 7.7.6. `Pool.DB.EnableLog` +#### 7.5.6. `Pool.DB.EnableLog` **Type:** : `boolean` @@ -936,7 +608,7 @@ Port="5432" EnableLog=false ``` -#### 7.7.7. `Pool.DB.MaxConns` +#### 7.5.7. `Pool.DB.MaxConns` **Type:** : `integer` @@ -950,7 +622,7 @@ EnableLog=false MaxConns=200 ``` -### 7.8. `Pool.DefaultMinGasPriceAllowed` +### 7.6. `Pool.DefaultMinGasPriceAllowed` **Type:** : `integer` @@ -964,7 +636,7 @@ MaxConns=200 DefaultMinGasPriceAllowed=1000000000 ``` -### 7.9. `Pool.MinAllowedGasPriceInterval` +### 7.7. `Pool.MinAllowedGasPriceInterval` **Title:** Duration @@ -990,7 +662,7 @@ DefaultMinGasPriceAllowed=1000000000 MinAllowedGasPriceInterval="5m0s" ``` -### 7.10. `Pool.PollMinAllowedGasPriceInterval` +### 7.8. `Pool.PollMinAllowedGasPriceInterval` **Title:** Duration @@ -1016,7 +688,7 @@ MinAllowedGasPriceInterval="5m0s" PollMinAllowedGasPriceInterval="15s" ``` -### 7.11. `Pool.AccountQueue` +### 7.9. `Pool.AccountQueue` **Type:** : `integer` @@ -1030,7 +702,7 @@ PollMinAllowedGasPriceInterval="15s" AccountQueue=64 ``` -### 7.12. `Pool.GlobalQueue` +### 7.10. `Pool.GlobalQueue` **Type:** : `integer` @@ -1044,7 +716,7 @@ AccountQueue=64 GlobalQueue=1024 ``` -### 7.13. `[Pool.EffectiveGasPrice]` +### 7.11. `[Pool.EffectiveGasPrice]` **Type:** : `object` **Description:** EffectiveGasPrice is the config for the effective gas price calculation @@ -1062,7 +734,7 @@ GlobalQueue=1024 | - [EthTransferL1GasPriceFactor](#Pool_EffectiveGasPrice_EthTransferL1GasPriceFactor ) | No | number | No | - | EthTransferL1GasPriceFactor is the percentage of L1 gas price returned as effective gas price for txs tha are ETH transfers (0 means disabled)
Only one of EthTransferGasPrice or EthTransferL1GasPriceFactor params can be different than 0. If both params are set to 0, the sequencer will halt and log an error | | - [L2GasPriceSuggesterFactor](#Pool_EffectiveGasPrice_L2GasPriceSuggesterFactor ) | No | number | No | - | L2GasPriceSuggesterFactor is the factor to apply to L1 gas price to get the suggested L2 gas price used in the
calculations when the effective gas price is disabled (testing/metrics purposes) | -#### 7.13.1. `Pool.EffectiveGasPrice.Enabled` +#### 7.11.1. `Pool.EffectiveGasPrice.Enabled` **Type:** : `boolean` @@ -1076,7 +748,7 @@ GlobalQueue=1024 Enabled=false ``` -#### 7.13.2. `Pool.EffectiveGasPrice.L1GasPriceFactor` +#### 7.11.2. `Pool.EffectiveGasPrice.L1GasPriceFactor` **Type:** : `number` @@ -1090,7 +762,7 @@ Enabled=false L1GasPriceFactor=0.25 ``` -#### 7.13.3. `Pool.EffectiveGasPrice.ByteGasCost` +#### 7.11.3. `Pool.EffectiveGasPrice.ByteGasCost` **Type:** : `integer` @@ -1104,7 +776,7 @@ L1GasPriceFactor=0.25 ByteGasCost=16 ``` -#### 7.13.4. `Pool.EffectiveGasPrice.ZeroByteGasCost` +#### 7.11.4. `Pool.EffectiveGasPrice.ZeroByteGasCost` **Type:** : `integer` @@ -1118,7 +790,7 @@ ByteGasCost=16 ZeroByteGasCost=4 ``` -#### 7.13.5. `Pool.EffectiveGasPrice.NetProfit` +#### 7.11.5. `Pool.EffectiveGasPrice.NetProfit` **Type:** : `number` @@ -1132,7 +804,7 @@ ZeroByteGasCost=4 NetProfit=1 ``` -#### 7.13.6. `Pool.EffectiveGasPrice.BreakEvenFactor` +#### 7.11.6. `Pool.EffectiveGasPrice.BreakEvenFactor` **Type:** : `number` @@ -1146,7 +818,7 @@ NetProfit=1 BreakEvenFactor=1.1 ``` -#### 7.13.7. `Pool.EffectiveGasPrice.FinalDeviationPct` +#### 7.11.7. `Pool.EffectiveGasPrice.FinalDeviationPct` **Type:** : `integer` @@ -1160,7 +832,7 @@ BreakEvenFactor=1.1 FinalDeviationPct=10 ``` -#### 7.13.8. `Pool.EffectiveGasPrice.EthTransferGasPrice` +#### 7.11.8. `Pool.EffectiveGasPrice.EthTransferGasPrice` **Type:** : `integer` @@ -1175,7 +847,7 @@ Only one of EthTransferGasPrice or EthTransferL1GasPriceFactor params can be dif EthTransferGasPrice=0 ``` -#### 7.13.9. `Pool.EffectiveGasPrice.EthTransferL1GasPriceFactor` +#### 7.11.9. `Pool.EffectiveGasPrice.EthTransferL1GasPriceFactor` **Type:** : `number` @@ -1190,7 +862,7 @@ Only one of EthTransferGasPrice or EthTransferL1GasPriceFactor params can be dif EthTransferL1GasPriceFactor=0 ``` -#### 7.13.10. `Pool.EffectiveGasPrice.L2GasPriceSuggesterFactor` +#### 7.11.10. `Pool.EffectiveGasPrice.L2GasPriceSuggesterFactor` **Type:** : `number` @@ -1205,7 +877,7 @@ calculations when the effective gas price is disabled (testing/metrics purposes) L2GasPriceSuggesterFactor=0.5 ``` -### 7.14. `Pool.ForkID` +### 7.12. `Pool.ForkID` **Type:** : `integer` @@ -1219,163 +891,81 @@ L2GasPriceSuggesterFactor=0.5 ForkID=0 ``` -### 7.15. `Pool.BlockedList` +### 7.13. `Pool.TxFeeCap` -**Type:** : `array of string` -**Description:** XLayer config -BlockedList is the blocked address list - -### 7.16. `Pool.FreeGasAddress` - -**Type:** : `array of string` +**Type:** : `number` -**Default:** `["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]` +**Default:** `1` -**Description:** FreeGasAddress is the default free gas address +**Description:** TxFeeCap is the global transaction fee(price * gaslimit) cap for +send-transaction variants. The unit is ether. 0 means no cap. -**Example setting the default value** (["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]): +**Example setting the default value** (1): ``` [Pool] -FreeGasAddress=["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"] +TxFeeCap=1 ``` -### 7.17. `Pool.FreeClaimGasLimit` - -**Type:** : `integer` - -**Default:** `150000` - -**Description:** FreeClaimGasLimit is the max gas allowed use to do a free claim - -**Example setting the default value** (150000): -``` -[Pool] -FreeClaimGasLimit=150000 -``` +## 8. `[RPC]` -### 7.18. `Pool.BridgeClaimMethodSigs` +**Type:** : `object` +**Description:** Configuration for RPC service. THis one offers a extended Ethereum JSON-RPC API interface to interact with the node -**Type:** : `array of string` -**Description:** BridgeClaimMethodSignature for tracking BridgeClaimMethodSignature method +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ---------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| - [Host](#RPC_Host ) | No | string | No | - | Host defines the network adapter that will be used to serve the HTTP requests | +| - [Port](#RPC_Port ) | No | integer | No | - | Port defines the port to serve the endpoints via HTTP | +| - [ReadTimeout](#RPC_ReadTimeout ) | No | string | No | - | Duration | +| - [WriteTimeout](#RPC_WriteTimeout ) | No | string | No | - | Duration | +| - [MaxRequestsPerIPAndSecond](#RPC_MaxRequestsPerIPAndSecond ) | No | number | No | - | MaxRequestsPerIPAndSecond defines how much requests a single IP can
send within a single second | +| - [SequencerNodeURI](#RPC_SequencerNodeURI ) | No | string | No | - | SequencerNodeURI is used allow Non-Sequencer nodes
to relay transactions to the Sequencer node | +| - [MaxCumulativeGasUsed](#RPC_MaxCumulativeGasUsed ) | No | integer | No | - | MaxCumulativeGasUsed is the max gas allowed per batch | +| - [WebSockets](#RPC_WebSockets ) | No | object | No | - | WebSockets configuration | +| - [EnableL2SuggestedGasPricePolling](#RPC_EnableL2SuggestedGasPricePolling ) | No | boolean | No | - | EnableL2SuggestedGasPricePolling enables polling of the L2 gas price to block tx in the RPC with lower gas price. | +| - [BatchRequestsEnabled](#RPC_BatchRequestsEnabled ) | No | boolean | No | - | BatchRequestsEnabled defines if the Batch requests are enabled or disabled | +| - [BatchRequestsLimit](#RPC_BatchRequestsLimit ) | No | integer | No | - | BatchRequestsLimit defines the limit of requests that can be incorporated into each batch request | +| - [L2Coinbase](#RPC_L2Coinbase ) | No | array of integer | No | - | L2Coinbase defines which address is going to receive the fees | +| - [MaxLogsCount](#RPC_MaxLogsCount ) | No | integer | No | - | MaxLogsCount is a configuration to set the max number of logs that can be returned
in a single call to the state, if zero it means no limit | +| - [MaxLogsBlockRange](#RPC_MaxLogsBlockRange ) | No | integer | No | - | MaxLogsBlockRange is a configuration to set the max range for block number when querying TXs
logs in a single call to the state, if zero it means no limit | +| - [MaxNativeBlockHashBlockRange](#RPC_MaxNativeBlockHashBlockRange ) | No | integer | No | - | MaxNativeBlockHashBlockRange is a configuration to set the max range for block number when querying
native block hashes in a single call to the state, if zero it means no limit | +| - [EnableHttpLog](#RPC_EnableHttpLog ) | No | boolean | No | - | EnableHttpLog allows the user to enable or disable the logs related to the HTTP
requests to be captured by the server. | +| - [ZKCountersLimits](#RPC_ZKCountersLimits ) | No | object | No | - | ZKCountersLimits defines the ZK Counter limits | -### 7.19. `Pool.EnableFreeGasByNonce` +### 8.1. `RPC.Host` -**Type:** : `boolean` +**Type:** : `string` -**Default:** `false` +**Default:** `"0.0.0.0"` -**Description:** EnableFreeGasByNonce enable free gas +**Description:** Host defines the network adapter that will be used to serve the HTTP requests -**Example setting the default value** (false): +**Example setting the default value** ("0.0.0.0"): ``` -[Pool] -EnableFreeGasByNonce=false +[RPC] +Host="0.0.0.0" ``` -### 7.20. `Pool.FreeGasExAddress` - -**Type:** : `array of string` -**Description:** FreeGasExAddress is the ex address which can be free gas for the transfer receiver - -### 7.21. `Pool.FreeGasCountPerAddr` +### 8.2. `RPC.Port` **Type:** : `integer` -**Default:** `0` +**Default:** `8545` -**Description:** FreeGasCountPerAddr is the count limit of free gas tx per address +**Description:** Port defines the port to serve the endpoints via HTTP -**Example setting the default value** (0): +**Example setting the default value** (8545): ``` -[Pool] -FreeGasCountPerAddr=0 +[RPC] +Port=8545 ``` -### 7.22. `Pool.FreeGasLimit` +### 8.3. `RPC.ReadTimeout` -**Type:** : `integer` +**Title:** Duration -**Default:** `0` +**Type:** : `string` -**Description:** FreeGasLimit is the max gas allowed use to do a free gas tx - -**Example setting the default value** (0): -``` -[Pool] -FreeGasLimit=0 -``` - -## 8. `[RPC]` - -**Type:** : `object` -**Description:** Configuration for RPC service. THis one offers a extended Ethereum JSON-RPC API interface to interact with the node - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| - [Host](#RPC_Host ) | No | string | No | - | Host defines the network adapter that will be used to serve the HTTP requests | -| - [Port](#RPC_Port ) | No | integer | No | - | Port defines the port to serve the endpoints via HTTP | -| - [ReadTimeout](#RPC_ReadTimeout ) | No | string | No | - | Duration | -| - [WriteTimeout](#RPC_WriteTimeout ) | No | string | No | - | Duration | -| - [MaxRequestsPerIPAndSecond](#RPC_MaxRequestsPerIPAndSecond ) | No | number | No | - | MaxRequestsPerIPAndSecond defines how much requests a single IP can
send within a single second | -| - [SequencerNodeURI](#RPC_SequencerNodeURI ) | No | string | No | - | SequencerNodeURI is used allow Non-Sequencer nodes
to relay transactions to the Sequencer node | -| - [MaxCumulativeGasUsed](#RPC_MaxCumulativeGasUsed ) | No | integer | No | - | MaxCumulativeGasUsed is the max gas allowed per batch | -| - [WebSockets](#RPC_WebSockets ) | No | object | No | - | WebSockets configuration | -| - [EnableL2SuggestedGasPricePolling](#RPC_EnableL2SuggestedGasPricePolling ) | No | boolean | No | - | EnableL2SuggestedGasPricePolling enables polling of the L2 gas price to block tx in the RPC with lower gas price. | -| - [BatchRequestsEnabled](#RPC_BatchRequestsEnabled ) | No | boolean | No | - | BatchRequestsEnabled defines if the Batch requests are enabled or disabled | -| - [BatchRequestsLimit](#RPC_BatchRequestsLimit ) | No | integer | No | - | BatchRequestsLimit defines the limit of requests that can be incorporated into each batch request | -| - [L2Coinbase](#RPC_L2Coinbase ) | No | array of integer | No | - | L2Coinbase defines which address is going to receive the fees | -| - [MaxLogsCount](#RPC_MaxLogsCount ) | No | integer | No | - | MaxLogsCount is a configuration to set the max number of logs that can be returned
in a single call to the state, if zero it means no limit | -| - [MaxLogsBlockRange](#RPC_MaxLogsBlockRange ) | No | integer | No | - | MaxLogsBlockRange is a configuration to set the max range for block number when querying TXs
logs in a single call to the state, if zero it means no limit | -| - [MaxNativeBlockHashBlockRange](#RPC_MaxNativeBlockHashBlockRange ) | No | integer | No | - | MaxNativeBlockHashBlockRange is a configuration to set the max range for block number when querying
native block hashes in a single call to the state, if zero it means no limit | -| - [EnableHttpLog](#RPC_EnableHttpLog ) | No | boolean | No | - | EnableHttpLog allows the user to enable or disable the logs related to the HTTP
requests to be captured by the server. | -| - [ZKCountersLimits](#RPC_ZKCountersLimits ) | No | object | No | - | ZKCountersLimits defines the ZK Counter limits | -| - [EnablePendingTransactionFilter](#RPC_EnablePendingTransactionFilter ) | No | boolean | No | - | XLayer config
EnablePendingTransactionFilter enables pending transaction filter that can support query L2 pending transaction | -| - [Nacos](#RPC_Nacos ) | No | object | No | - | Nacos configuration | -| - [NacosWs](#RPC_NacosWs ) | No | object | No | - | NacosWs configuration | -| - [GasLimitFactor](#RPC_GasLimitFactor ) | No | number | No | - | GasLimitFactor is used to multiply the suggested gas provided by the network
in order to allow a enough gas to be set for all the transactions default value is 1.

ex:
suggested gas limit: 100
GasLimitFactor: 1
gas limit = 100

suggested gas limit: 100
GasLimitFactor: 1.1
gas limit = 110 | -| - [DisableAPIs](#RPC_DisableAPIs ) | No | array of string | No | - | DisableAPIs disable some API | -| - [RateLimit](#RPC_RateLimit ) | No | object | No | - | RateLimit enable rate limit | -| - [DynamicGP](#RPC_DynamicGP ) | No | object | No | - | DynamicGP defines the config of dynamic gas price | -| - [EnableInnerTxCacheDB](#RPC_EnableInnerTxCacheDB ) | No | boolean | No | - | EnableInnerTxCacheDB enables the inner tx cache db | -| - [BridgeAddress](#RPC_BridgeAddress ) | No | array of integer | No | - | BridgeAddress is the address of the bridge contract | -| - [ApiAuthentication](#RPC_ApiAuthentication ) | No | object | No | - | ApiAuthentication defines the authentication configuration for the API | -| - [ApiRelay](#RPC_ApiRelay ) | No | object | No | - | ApiRelay defines the relay configuration for the API | - -### 8.1. `RPC.Host` - -**Type:** : `string` - -**Default:** `"0.0.0.0"` - -**Description:** Host defines the network adapter that will be used to serve the HTTP requests - -**Example setting the default value** ("0.0.0.0"): -``` -[RPC] -Host="0.0.0.0" -``` - -### 8.2. `RPC.Port` - -**Type:** : `integer` - -**Default:** `8545` - -**Description:** Port defines the port to serve the endpoints via HTTP - -**Example setting the default value** (8545): -``` -[RPC] -Port=8545 -``` - -### 8.3. `RPC.ReadTimeout` - -**Title:** Duration - -**Type:** : `string` - -**Default:** `"1m0s"` +**Default:** `"1m0s"` **Description:** ReadTimeout is the HTTP server read timeout check net/http.server.ReadTimeout and net/http.server.ReadHeaderTimeout @@ -1732,618 +1322,26 @@ MaxBinaries=0 #### 8.17.7. `RPC.ZKCountersLimits.MaxSteps` -**Type:** : `integer` - -**Default:** `0` - -**Example setting the default value** (0): -``` -[RPC.ZKCountersLimits] -MaxSteps=0 -``` - -#### 8.17.8. `RPC.ZKCountersLimits.MaxSHA256Hashes` - -**Type:** : `integer` - -**Default:** `0` - -**Example setting the default value** (0): -``` -[RPC.ZKCountersLimits] -MaxSHA256Hashes=0 -``` - -### 8.18. `RPC.EnablePendingTransactionFilter` - -**Type:** : `boolean` - -**Default:** `false` - -**Description:** XLayer config -EnablePendingTransactionFilter enables pending transaction filter that can support query L2 pending transaction - -**Example setting the default value** (false): -``` -[RPC] -EnablePendingTransactionFilter=false -``` - -### 8.19. `[RPC.Nacos]` - -**Type:** : `object` -**Description:** Nacos configuration - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------ | ------- | ------ | ---------- | ---------- | ------------------------------------------------------------------------------------------ | -| - [URLs](#RPC_Nacos_URLs ) | No | string | No | - | URLs nacos server urls for discovery service of rest api, url is separated by "," | -| - [NamespaceId](#RPC_Nacos_NamespaceId ) | No | string | No | - | NamespaceId nacos namepace id for discovery service of rest api | -| - [ApplicationName](#RPC_Nacos_ApplicationName ) | No | string | No | - | ApplicationName rest application name in nacos | -| - [ExternalListenAddr](#RPC_Nacos_ExternalListenAddr ) | No | string | No | - | ExternalListenAddr Set the rest-server external ip and port, when it is launched by Docker | - -#### 8.19.1. `RPC.Nacos.URLs` - -**Type:** : `string` - -**Default:** `""` - -**Description:** URLs nacos server urls for discovery service of rest api, url is separated by "," - -**Example setting the default value** (""): -``` -[RPC.Nacos] -URLs="" -``` - -#### 8.19.2. `RPC.Nacos.NamespaceId` - -**Type:** : `string` - -**Default:** `""` - -**Description:** NamespaceId nacos namepace id for discovery service of rest api - -**Example setting the default value** (""): -``` -[RPC.Nacos] -NamespaceId="" -``` - -#### 8.19.3. `RPC.Nacos.ApplicationName` - -**Type:** : `string` - -**Default:** `""` - -**Description:** ApplicationName rest application name in nacos - -**Example setting the default value** (""): -``` -[RPC.Nacos] -ApplicationName="" -``` - -#### 8.19.4. `RPC.Nacos.ExternalListenAddr` - -**Type:** : `string` - -**Default:** `""` - -**Description:** ExternalListenAddr Set the rest-server external ip and port, when it is launched by Docker - -**Example setting the default value** (""): -``` -[RPC.Nacos] -ExternalListenAddr="" -``` - -### 8.20. `[RPC.NacosWs]` - -**Type:** : `object` -**Description:** NacosWs configuration - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------- | ------- | ------ | ---------- | ---------- | ------------------------------------------------------------------------------------------ | -| - [URLs](#RPC_NacosWs_URLs ) | No | string | No | - | URLs nacos server urls for discovery service of rest api, url is separated by "," | -| - [NamespaceId](#RPC_NacosWs_NamespaceId ) | No | string | No | - | NamespaceId nacos namepace id for discovery service of rest api | -| - [ApplicationName](#RPC_NacosWs_ApplicationName ) | No | string | No | - | ApplicationName rest application name in nacos | -| - [ExternalListenAddr](#RPC_NacosWs_ExternalListenAddr ) | No | string | No | - | ExternalListenAddr Set the rest-server external ip and port, when it is launched by Docker | - -#### 8.20.1. `RPC.NacosWs.URLs` - -**Type:** : `string` - -**Default:** `""` - -**Description:** URLs nacos server urls for discovery service of rest api, url is separated by "," - -**Example setting the default value** (""): -``` -[RPC.NacosWs] -URLs="" -``` - -#### 8.20.2. `RPC.NacosWs.NamespaceId` - -**Type:** : `string` - -**Default:** `""` - -**Description:** NamespaceId nacos namepace id for discovery service of rest api - -**Example setting the default value** (""): -``` -[RPC.NacosWs] -NamespaceId="" -``` - -#### 8.20.3. `RPC.NacosWs.ApplicationName` - -**Type:** : `string` - -**Default:** `""` - -**Description:** ApplicationName rest application name in nacos - -**Example setting the default value** (""): -``` -[RPC.NacosWs] -ApplicationName="" -``` - -#### 8.20.4. `RPC.NacosWs.ExternalListenAddr` - -**Type:** : `string` - -**Default:** `""` - -**Description:** ExternalListenAddr Set the rest-server external ip and port, when it is launched by Docker - -**Example setting the default value** (""): -``` -[RPC.NacosWs] -ExternalListenAddr="" -``` - -### 8.21. `RPC.GasLimitFactor` - -**Type:** : `number` - -**Default:** `1` - -**Description:** GasLimitFactor is used to multiply the suggested gas provided by the network -in order to allow a enough gas to be set for all the transactions default value is 1. - -ex: -suggested gas limit: 100 -GasLimitFactor: 1 -gas limit = 100 - -suggested gas limit: 100 -GasLimitFactor: 1.1 -gas limit = 110 - -**Example setting the default value** (1): -``` -[RPC] -GasLimitFactor=1 -``` - -### 8.22. `RPC.DisableAPIs` - -**Type:** : `array of string` - -**Default:** `[]` - -**Description:** DisableAPIs disable some API - -**Example setting the default value** ([]): -``` -[RPC] -DisableAPIs=[] -``` - -### 8.23. `[RPC.RateLimit]` - -**Type:** : `object` -**Description:** RateLimit enable rate limit - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------- | ------- | --------------- | ---------- | ---------- | --------------------------------------------------------------------------------- | -| - [Enabled](#RPC_RateLimit_Enabled ) | No | boolean | No | - | Enabled defines if the rate limit is enabled or disabled | -| - [RateLimitApis](#RPC_RateLimit_RateLimitApis ) | No | array of string | No | - | RateLimitApis defines the apis that need to be rate limited | -| - [RateLimitCount](#RPC_RateLimit_RateLimitCount ) | No | integer | No | - | RateLimitBurst defines the maximum burst size of requests | -| - [RateLimitDuration](#RPC_RateLimit_RateLimitDuration ) | No | integer | No | - | RateLimitDuration defines the time window for the rate limit | -| - [SpecialApis](#RPC_RateLimit_SpecialApis ) | No | array of object | No | - | SpecialApis defines the apis that need to be rate limited with special rate limit | - -#### 8.23.1. `RPC.RateLimit.Enabled` - -**Type:** : `boolean` - -**Default:** `false` - -**Description:** Enabled defines if the rate limit is enabled or disabled - -**Example setting the default value** (false): -``` -[RPC.RateLimit] -Enabled=false -``` - -#### 8.23.2. `RPC.RateLimit.RateLimitApis` - -**Type:** : `array of string` - -**Default:** `[]` - -**Description:** RateLimitApis defines the apis that need to be rate limited - -**Example setting the default value** ([]): -``` -[RPC.RateLimit] -RateLimitApis=[] -``` - -#### 8.23.3. `RPC.RateLimit.RateLimitCount` - -**Type:** : `integer` - -**Default:** `100` - -**Description:** RateLimitBurst defines the maximum burst size of requests - -**Example setting the default value** (100): -``` -[RPC.RateLimit] -RateLimitCount=100 -``` - -#### 8.23.4. `RPC.RateLimit.RateLimitDuration` - -**Type:** : `integer` - -**Default:** `1` - -**Description:** RateLimitDuration defines the time window for the rate limit - -**Example setting the default value** (1): -``` -[RPC.RateLimit] -RateLimitDuration=1 -``` - -#### 8.23.5. `RPC.RateLimit.SpecialApis` - -**Type:** : `array of object` - -**Default:** `[]` - -**Description:** SpecialApis defines the apis that need to be rate limited with special rate limit - -**Example setting the default value** ([]): -``` -[RPC.RateLimit] -SpecialApis=[] -``` - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ----------------------------------------------------- | ---------------------------------------------------------- | -| [SpecialApis items](#RPC_RateLimit_SpecialApis_items) | RateLimitItem defines the special rate limit for some apis | - -##### 8.23.5.1. [RPC.RateLimit.SpecialApis.SpecialApis items] - -**Type:** : `object` -**Description:** RateLimitItem defines the special rate limit for some apis - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------- | ------- | ------- | ---------- | ---------- | --------------------------------------------------- | -| - [Api](#RPC_RateLimit_SpecialApis_items_Api ) | No | string | No | - | Api defines the api that need to be rate limited | -| - [Count](#RPC_RateLimit_SpecialApis_items_Count ) | No | integer | No | - | Count defines the maximum burst size of requests | -| - [Duration](#RPC_RateLimit_SpecialApis_items_Duration ) | No | integer | No | - | Duration defines the time window for the rate limit | - -##### 8.23.5.1.1. `RPC.RateLimit.SpecialApis.SpecialApis items.Api` - -**Type:** : `string` -**Description:** Api defines the api that need to be rate limited - -##### 8.23.5.1.2. `RPC.RateLimit.SpecialApis.SpecialApis items.Count` - -**Type:** : `integer` -**Description:** Count defines the maximum burst size of requests - -##### 8.23.5.1.3. `RPC.RateLimit.SpecialApis.SpecialApis items.Duration` - -**Type:** : `integer` -**Description:** Duration defines the time window for the rate limit - -### 8.24. `[RPC.DynamicGP]` - -**Type:** : `object` -**Description:** DynamicGP defines the config of dynamic gas price - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ------------------------------------------------------------------------------------- | -| - [Enabled](#RPC_DynamicGP_Enabled ) | No | boolean | No | - | Enabled defines if the dynamic gas price is enabled or disabled | -| - [CongestionTxThreshold](#RPC_DynamicGP_CongestionTxThreshold ) | No | integer | No | - | CongestionTxThreshold defines the tx threshold to measure whether there is congestion | -| - [CheckBatches](#RPC_DynamicGP_CheckBatches ) | No | integer | No | - | CheckBatches defines the number of recent Batches used to sample gas price | -| - [SampleNumber](#RPC_DynamicGP_SampleNumber ) | No | integer | No | - | SampleTxNumer defines the number of sampled gas prices in each batch | -| - [Percentile](#RPC_DynamicGP_Percentile ) | No | integer | No | - | Percentile defines the sampling weight of all sampled gas prices | -| - [MaxPrice](#RPC_DynamicGP_MaxPrice ) | No | integer | No | - | MaxPrice defines the dynamic gas price upper limit | -| - [MinPrice](#RPC_DynamicGP_MinPrice ) | No | integer | No | - | MinPrice defines the dynamic gas price lower limit | -| - [UpdatePeriod](#RPC_DynamicGP_UpdatePeriod ) | No | string | No | - | Duration | - -#### 8.24.1. `RPC.DynamicGP.Enabled` - -**Type:** : `boolean` - -**Default:** `false` - -**Description:** Enabled defines if the dynamic gas price is enabled or disabled - -**Example setting the default value** (false): -``` -[RPC.DynamicGP] -Enabled=false -``` - -#### 8.24.2. `RPC.DynamicGP.CongestionTxThreshold` - -**Type:** : `integer` - -**Default:** `100` - -**Description:** CongestionTxThreshold defines the tx threshold to measure whether there is congestion - -**Example setting the default value** (100): -``` -[RPC.DynamicGP] -CongestionTxThreshold=100 -``` - -#### 8.24.3. `RPC.DynamicGP.CheckBatches` - -**Type:** : `integer` - -**Default:** `5` - -**Description:** CheckBatches defines the number of recent Batches used to sample gas price - -**Example setting the default value** (5): -``` -[RPC.DynamicGP] -CheckBatches=5 -``` - -#### 8.24.4. `RPC.DynamicGP.SampleNumber` - -**Type:** : `integer` - -**Default:** `3` - -**Description:** SampleTxNumer defines the number of sampled gas prices in each batch - -**Example setting the default value** (3): -``` -[RPC.DynamicGP] -SampleNumber=3 -``` - -#### 8.24.5. `RPC.DynamicGP.Percentile` - -**Type:** : `integer` - -**Default:** `70` - -**Description:** Percentile defines the sampling weight of all sampled gas prices - -**Example setting the default value** (70): -``` -[RPC.DynamicGP] -Percentile=70 -``` - -#### 8.24.6. `RPC.DynamicGP.MaxPrice` - -**Type:** : `integer` - -**Default:** `20000000000` - -**Description:** MaxPrice defines the dynamic gas price upper limit - -**Example setting the default value** (20000000000): -``` -[RPC.DynamicGP] -MaxPrice=20000000000 -``` - -#### 8.24.7. `RPC.DynamicGP.MinPrice` - -**Type:** : `integer` - -**Default:** `2000000000` - -**Description:** MinPrice defines the dynamic gas price lower limit - -**Example setting the default value** (2000000000): -``` -[RPC.DynamicGP] -MinPrice=2000000000 -``` - -#### 8.24.8. `RPC.DynamicGP.UpdatePeriod` - -**Title:** Duration - -**Type:** : `string` - -**Default:** `"10s"` - -**Description:** UpdatePeriod defines the time interval for updating dynamic gas price - -**Examples:** - -```json -"1m" -``` - -```json -"300ms" -``` - -**Example setting the default value** ("10s"): -``` -[RPC.DynamicGP] -UpdatePeriod="10s" -``` - -### 8.25. `RPC.EnableInnerTxCacheDB` - -**Type:** : `boolean` - -**Default:** `false` - -**Description:** EnableInnerTxCacheDB enables the inner tx cache db - -**Example setting the default value** (false): -``` -[RPC] -EnableInnerTxCacheDB=false -``` - -### 8.26. `RPC.BridgeAddress` - -**Type:** : `array of integer` -**Description:** BridgeAddress is the address of the bridge contract - -### 8.27. `[RPC.ApiAuthentication]` - -**Type:** : `object` -**Description:** ApiAuthentication defines the authentication configuration for the API - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------- | ------- | --------------- | ---------- | ---------- | ---------------------------------------------------- | -| - [Enabled](#RPC_ApiAuthentication_Enabled ) | No | boolean | No | - | Enabled defines if the api authentication is enabled | -| - [ApiKeys](#RPC_ApiAuthentication_ApiKeys ) | No | array of object | No | - | ApiKeys defines the api keys | - -#### 8.27.1. `RPC.ApiAuthentication.Enabled` - -**Type:** : `boolean` - -**Default:** `false` - -**Description:** Enabled defines if the api authentication is enabled - -**Example setting the default value** (false): -``` -[RPC.ApiAuthentication] -Enabled=false -``` - -#### 8.27.2. `RPC.ApiAuthentication.ApiKeys` - -**Type:** : `array of object` - -**Default:** `[]` - -**Description:** ApiKeys defines the api keys - -**Example setting the default value** ([]): -``` -[RPC.ApiAuthentication] -ApiKeys=[] -``` - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ----------------------------------------------------- | --------------------------- | -| [ApiKeys items](#RPC_ApiAuthentication_ApiKeys_items) | KeyItem is the api key item | - -##### 8.27.2.1. [RPC.ApiAuthentication.ApiKeys.ApiKeys items] - -**Type:** : `object` -**Description:** KeyItem is the api key item - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------------------------------- | ------- | ------ | ---------- | ---------- | -------------------------------- | -| - [Project](#RPC_ApiAuthentication_ApiKeys_items_Project ) | No | string | No | - | Name defines the name of the key | -| - [Key](#RPC_ApiAuthentication_ApiKeys_items_Key ) | No | string | No | - | Key defines the key | -| - [Timeout](#RPC_ApiAuthentication_ApiKeys_items_Timeout ) | No | string | No | - | Timeout defines the timeout | - -##### 8.27.2.1.1. `RPC.ApiAuthentication.ApiKeys.ApiKeys items.Project` - -**Type:** : `string` -**Description:** Name defines the name of the key - -##### 8.27.2.1.2. `RPC.ApiAuthentication.ApiKeys.ApiKeys items.Key` - -**Type:** : `string` -**Description:** Key defines the key - -##### 8.27.2.1.3. `RPC.ApiAuthentication.ApiKeys.ApiKeys items.Timeout` - -**Type:** : `string` -**Description:** Timeout defines the timeout - -### 8.28. `[RPC.ApiRelay]` - -**Type:** : `object` -**Description:** ApiRelay defines the relay configuration for the API - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------- | ------- | --------------- | ---------- | ---------- | ----------------- | -| - [Enabled](#RPC_ApiRelay_Enabled ) | No | boolean | No | - | - | -| - [DestURI](#RPC_ApiRelay_DestURI ) | No | string | No | - | - | -| - [RPCs](#RPC_ApiRelay_RPCs ) | No | array of string | No | - | - | - -#### 8.28.1. `RPC.ApiRelay.Enabled` - -**Type:** : `boolean` - -**Default:** `false` - -**Example setting the default value** (false): -``` -[RPC.ApiRelay] -Enabled=false -``` - -#### 8.28.2. `RPC.ApiRelay.DestURI` - -**Type:** : `string` +**Type:** : `integer` -**Default:** `""` +**Default:** `0` -**Example setting the default value** (""): +**Example setting the default value** (0): ``` -[RPC.ApiRelay] -DestURI="" +[RPC.ZKCountersLimits] +MaxSteps=0 ``` -#### 8.28.3. `RPC.ApiRelay.RPCs` +#### 8.17.8. `RPC.ZKCountersLimits.MaxSHA256Hashes` -**Type:** : `array of string` +**Type:** : `integer` -**Default:** `[]` +**Default:** `0` -**Example setting the default value** ([]): +**Example setting the default value** (0): ``` -[RPC.ApiRelay] -RPCs=[] +[RPC.ZKCountersLimits] +MaxSHA256Hashes=0 ``` ## 9. `[Synchronizer]` @@ -2468,26 +1466,26 @@ L1SyncCheckL2BlockNumberhModulus=600 | Property | Pattern | Type | Deprecated | Definition | Title/Description | | ---------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| - [Enable](#Synchronizer_L1BlockCheck_Enable ) | No | boolean | No | - | Enable if is true then the check l1 Block Hash is active | +| - [Enabled](#Synchronizer_L1BlockCheck_Enabled ) | No | boolean | No | - | If enabled then the check l1 Block Hash is active | | - [L1SafeBlockPoint](#Synchronizer_L1BlockCheck_L1SafeBlockPoint ) | No | enum (of string) | No | - | L1SafeBlockPoint is the point that a block is considered safe enough to be checked
it can be: finalized, safe,pending or latest | | - [L1SafeBlockOffset](#Synchronizer_L1BlockCheck_L1SafeBlockOffset ) | No | integer | No | - | L1SafeBlockOffset is the offset to add to L1SafeBlockPoint as a safe point
it can be positive or negative
Example: L1SafeBlockPoint= finalized, L1SafeBlockOffset= -10, then the safe block ten blocks before the finalized block | | - [ForceCheckBeforeStart](#Synchronizer_L1BlockCheck_ForceCheckBeforeStart ) | No | boolean | No | - | ForceCheckBeforeStart if is true then the first time the system is started it will force to check all pending blocks | -| - [PreCheckEnable](#Synchronizer_L1BlockCheck_PreCheckEnable ) | No | boolean | No | - | PreCheckEnable if is true then the pre-check is active, will check blocks between L1SafeBlock and L1PreSafeBlock | +| - [PreCheckEnabled](#Synchronizer_L1BlockCheck_PreCheckEnabled ) | No | boolean | No | - | If enabled then the pre-check is active, will check blocks between L1SafeBlock and L1PreSafeBlock | | - [L1PreSafeBlockPoint](#Synchronizer_L1BlockCheck_L1PreSafeBlockPoint ) | No | enum (of string) | No | - | L1PreSafeBlockPoint is the point that a block is considered safe enough to be checked
it can be: finalized, safe,pending or latest | | - [L1PreSafeBlockOffset](#Synchronizer_L1BlockCheck_L1PreSafeBlockOffset ) | No | integer | No | - | L1PreSafeBlockOffset is the offset to add to L1PreSafeBlockPoint as a safe point
it can be positive or negative
Example: L1PreSafeBlockPoint= finalized, L1PreSafeBlockOffset= -10, then the safe block ten blocks before the finalized block | -#### 9.7.1. `Synchronizer.L1BlockCheck.Enable` +#### 9.7.1. `Synchronizer.L1BlockCheck.Enabled` **Type:** : `boolean` **Default:** `true` -**Description:** Enable if is true then the check l1 Block Hash is active +**Description:** If enabled then the check l1 Block Hash is active **Example setting the default value** (true): ``` [Synchronizer.L1BlockCheck] -Enable=true +Enabled=true ``` #### 9.7.2. `Synchronizer.L1BlockCheck.L1SafeBlockPoint` @@ -2540,18 +1538,18 @@ L1SafeBlockOffset=0 ForceCheckBeforeStart=true ``` -#### 9.7.5. `Synchronizer.L1BlockCheck.PreCheckEnable` +#### 9.7.5. `Synchronizer.L1BlockCheck.PreCheckEnabled` **Type:** : `boolean` **Default:** `true` -**Description:** PreCheckEnable if is true then the pre-check is active, will check blocks between L1SafeBlock and L1PreSafeBlock +**Description:** If enabled then the pre-check is active, will check blocks between L1SafeBlock and L1PreSafeBlock **Example setting the default value** (true): ``` [Synchronizer.L1BlockCheck] -PreCheckEnable=true +PreCheckEnabled=true ``` #### 9.7.6. `Synchronizer.L1BlockCheck.L1PreSafeBlockPoint` @@ -2878,11 +1876,26 @@ FallbackToSequentialModeOnSynchronized=false | Property | Pattern | Type | Deprecated | Definition | Title/Description | | ------------------------------------------------------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| - [Enabled](#Synchronizer_L2Synchronization_Enabled ) | No | boolean | No | - | If enabled then the L2 sync process is permitted (only for permissionless) | | - [AcceptEmptyClosedBatches](#Synchronizer_L2Synchronization_AcceptEmptyClosedBatches ) | No | boolean | No | - | AcceptEmptyClosedBatches is a flag to enable or disable the acceptance of empty batches.
if true, the synchronizer will accept empty batches and process them. | | - [ReprocessFullBatchOnClose](#Synchronizer_L2Synchronization_ReprocessFullBatchOnClose ) | No | boolean | No | - | ReprocessFullBatchOnClose if is true when a batch is closed is force to reprocess again | | - [CheckLastL2BlockHashOnCloseBatch](#Synchronizer_L2Synchronization_CheckLastL2BlockHashOnCloseBatch ) | No | boolean | No | - | CheckLastL2BlockHashOnCloseBatch if is true when a batch is closed is force to check the last L2Block hash | -#### 9.10.1. `Synchronizer.L2Synchronization.AcceptEmptyClosedBatches` +#### 9.10.1. `Synchronizer.L2Synchronization.Enabled` + +**Type:** : `boolean` + +**Default:** `true` + +**Description:** If enabled then the L2 sync process is permitted (only for permissionless) + +**Example setting the default value** (true): +``` +[Synchronizer.L2Synchronization] +Enabled=true +``` + +#### 9.10.2. `Synchronizer.L2Synchronization.AcceptEmptyClosedBatches` **Type:** : `boolean` @@ -2897,7 +1910,7 @@ if true, the synchronizer will accept empty batches and process them. AcceptEmptyClosedBatches=false ``` -#### 9.10.2. `Synchronizer.L2Synchronization.ReprocessFullBatchOnClose` +#### 9.10.3. `Synchronizer.L2Synchronization.ReprocessFullBatchOnClose` **Type:** : `boolean` @@ -2911,7 +1924,7 @@ AcceptEmptyClosedBatches=false ReprocessFullBatchOnClose=false ``` -#### 9.10.3. `Synchronizer.L2Synchronization.CheckLastL2BlockHashOnCloseBatch` +#### 9.10.4. `Synchronizer.L2Synchronization.CheckLastL2BlockHashOnCloseBatch` **Type:** : `boolean` @@ -2930,20 +1943,17 @@ CheckLastL2BlockHashOnCloseBatch=true **Type:** : `object` **Description:** Configuration of the sequencer service -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------------------ | ------- | --------------- | ---------- | ---------- | --------------------------------------------------------------------------------------------------- | -| - [DeletePoolTxsL1BlockConfirmations](#Sequencer_DeletePoolTxsL1BlockConfirmations ) | No | integer | No | - | DeletePoolTxsL1BlockConfirmations is blocks amount after which txs will be deleted from the pool | -| - [DeletePoolTxsCheckInterval](#Sequencer_DeletePoolTxsCheckInterval ) | No | string | No | - | Duration | -| - [TxLifetimeCheckInterval](#Sequencer_TxLifetimeCheckInterval ) | No | string | No | - | Duration | -| - [TxLifetimeMax](#Sequencer_TxLifetimeMax ) | No | string | No | - | Duration | -| - [LoadPoolTxsCheckInterval](#Sequencer_LoadPoolTxsCheckInterval ) | No | string | No | - | Duration | -| - [StateConsistencyCheckInterval](#Sequencer_StateConsistencyCheckInterval ) | No | string | No | - | Duration | -| - [Finalizer](#Sequencer_Finalizer ) | No | object | No | - | Finalizer's specific config properties | -| - [StreamServer](#Sequencer_StreamServer ) | No | object | No | - | StreamServerCfg is the config for the stream server | -| - [PackBatchSpacialList](#Sequencer_PackBatchSpacialList ) | No | array of string | No | - | XLayer config
PackBatchSpacialList is the list of addresses that will have a special gas price | -| - [GasPriceMultiple](#Sequencer_GasPriceMultiple ) | No | number | No | - | GasPriceMultiple is the multiple of the gas price | -| - [InitGasPriceMultiple](#Sequencer_InitGasPriceMultiple ) | No | number | No | - | InitGasPriceMultiple is the multiple of the gas price for init free gas tx | -| - [QueryPendingTxsLimit](#Sequencer_QueryPendingTxsLimit ) | No | integer | No | - | QueryPendingTxsLimit is used to limit amount txs from the db | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ------------------------------------------------------------------------------------ | ------- | ---------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------- | +| - [DeletePoolTxsL1BlockConfirmations](#Sequencer_DeletePoolTxsL1BlockConfirmations ) | No | integer | No | - | DeletePoolTxsL1BlockConfirmations is blocks amount after which txs will be deleted from the pool | +| - [DeletePoolTxsCheckInterval](#Sequencer_DeletePoolTxsCheckInterval ) | No | string | No | - | Duration | +| - [TxLifetimeCheckInterval](#Sequencer_TxLifetimeCheckInterval ) | No | string | No | - | Duration | +| - [TxLifetimeMax](#Sequencer_TxLifetimeMax ) | No | string | No | - | Duration | +| - [LoadPoolTxsCheckInterval](#Sequencer_LoadPoolTxsCheckInterval ) | No | string | No | - | Duration | +| - [StateConsistencyCheckInterval](#Sequencer_StateConsistencyCheckInterval ) | No | string | No | - | Duration | +| - [L2Coinbase](#Sequencer_L2Coinbase ) | No | array of integer | No | - | L2Coinbase defines which address is going to receive the fees. It gets the config value from SequenceSender.L2Coinbase | +| - [Finalizer](#Sequencer_Finalizer ) | No | object | No | - | Finalizer's specific config properties | +| - [StreamServer](#Sequencer_StreamServer ) | No | object | No | - | StreamServerCfg is the config for the stream server | ### 10.1. `Sequencer.DeletePoolTxsL1BlockConfirmations` @@ -3089,7 +2099,12 @@ LoadPoolTxsCheckInterval="500ms" StateConsistencyCheckInterval="5s" ``` -### 10.7. `[Sequencer.Finalizer]` +### 10.7. `Sequencer.L2Coinbase` + +**Type:** : `array of integer` +**Description:** L2Coinbase defines which address is going to receive the fees. It gets the config value from SequenceSender.L2Coinbase + +### 10.8. `[Sequencer.Finalizer]` **Type:** : `object` **Description:** Finalizer's specific config properties @@ -3106,13 +2121,13 @@ StateConsistencyCheckInterval="5s" | - [BatchMaxDeltaTimestamp](#Sequencer_Finalizer_BatchMaxDeltaTimestamp ) | No | string | No | - | Duration | | - [L2BlockMaxDeltaTimestamp](#Sequencer_Finalizer_L2BlockMaxDeltaTimestamp ) | No | string | No | - | Duration | | - [StateRootSyncInterval](#Sequencer_Finalizer_StateRootSyncInterval ) | No | string | No | - | Duration | +| - [FlushIdCheckInterval](#Sequencer_Finalizer_FlushIdCheckInterval ) | No | string | No | - | Duration | | - [HaltOnBatchNumber](#Sequencer_Finalizer_HaltOnBatchNumber ) | No | integer | No | - | HaltOnBatchNumber specifies the batch number where the Sequencer will stop to process more transactions and generate new batches.
The Sequencer will halt after it closes the batch equal to this number | | - [SequentialBatchSanityCheck](#Sequencer_Finalizer_SequentialBatchSanityCheck ) | No | boolean | No | - | SequentialBatchSanityCheck indicates if the reprocess of a closed batch (sanity check) must be done in a
sequential way (instead than in parallel) | | - [SequentialProcessL2Block](#Sequencer_Finalizer_SequentialProcessL2Block ) | No | boolean | No | - | SequentialProcessL2Block indicates if the processing of a L2 Block must be done in the same finalizer go func instead
in the processPendingL2Blocks go func | -| - [FullBatchSleepDuration](#Sequencer_Finalizer_FullBatchSleepDuration ) | No | string | No | - | Duration | | - [Metrics](#Sequencer_Finalizer_Metrics ) | No | object | No | - | Metrics is the config for the sequencer metrics | -#### 10.7.1. `Sequencer.Finalizer.ForcedBatchesTimeout` +#### 10.8.1. `Sequencer.Finalizer.ForcedBatchesTimeout` **Title:** Duration @@ -3138,7 +2153,7 @@ StateConsistencyCheckInterval="5s" ForcedBatchesTimeout="1m0s" ``` -#### 10.7.2. `Sequencer.Finalizer.NewTxsWaitInterval` +#### 10.8.2. `Sequencer.Finalizer.NewTxsWaitInterval` **Title:** Duration @@ -3164,7 +2179,7 @@ ForcedBatchesTimeout="1m0s" NewTxsWaitInterval="100ms" ``` -#### 10.7.3. `Sequencer.Finalizer.ResourceExhaustedMarginPct` +#### 10.8.3. `Sequencer.Finalizer.ResourceExhaustedMarginPct` **Type:** : `integer` @@ -3178,7 +2193,7 @@ NewTxsWaitInterval="100ms" ResourceExhaustedMarginPct=10 ``` -#### 10.7.4. `Sequencer.Finalizer.ForcedBatchesL1BlockConfirmations` +#### 10.8.4. `Sequencer.Finalizer.ForcedBatchesL1BlockConfirmations` **Type:** : `integer` @@ -3192,7 +2207,7 @@ ResourceExhaustedMarginPct=10 ForcedBatchesL1BlockConfirmations=64 ``` -#### 10.7.5. `Sequencer.Finalizer.L1InfoTreeL1BlockConfirmations` +#### 10.8.5. `Sequencer.Finalizer.L1InfoTreeL1BlockConfirmations` **Type:** : `integer` @@ -3206,7 +2221,7 @@ ForcedBatchesL1BlockConfirmations=64 L1InfoTreeL1BlockConfirmations=64 ``` -#### 10.7.6. `Sequencer.Finalizer.ForcedBatchesCheckInterval` +#### 10.8.6. `Sequencer.Finalizer.ForcedBatchesCheckInterval` **Title:** Duration @@ -3232,7 +2247,7 @@ L1InfoTreeL1BlockConfirmations=64 ForcedBatchesCheckInterval="10s" ``` -#### 10.7.7. `Sequencer.Finalizer.L1InfoTreeCheckInterval` +#### 10.8.7. `Sequencer.Finalizer.L1InfoTreeCheckInterval` **Title:** Duration @@ -3258,7 +2273,7 @@ ForcedBatchesCheckInterval="10s" L1InfoTreeCheckInterval="10s" ``` -#### 10.7.8. `Sequencer.Finalizer.BatchMaxDeltaTimestamp` +#### 10.8.8. `Sequencer.Finalizer.BatchMaxDeltaTimestamp` **Title:** Duration @@ -3284,7 +2299,7 @@ L1InfoTreeCheckInterval="10s" BatchMaxDeltaTimestamp="30m0s" ``` -#### 10.7.9. `Sequencer.Finalizer.L2BlockMaxDeltaTimestamp` +#### 10.8.9. `Sequencer.Finalizer.L2BlockMaxDeltaTimestamp` **Title:** Duration @@ -3310,7 +2325,7 @@ BatchMaxDeltaTimestamp="30m0s" L2BlockMaxDeltaTimestamp="3s" ``` -#### 10.7.10. `Sequencer.Finalizer.StateRootSyncInterval` +#### 10.8.10. `Sequencer.Finalizer.StateRootSyncInterval` **Title:** Duration @@ -3337,7 +2352,33 @@ the stateroot used in the tx-by-tx execution StateRootSyncInterval="1h0m0s" ``` -#### 10.7.11. `Sequencer.Finalizer.HaltOnBatchNumber` +#### 10.8.11. `Sequencer.Finalizer.FlushIdCheckInterval` + +**Title:** Duration + +**Type:** : `string` + +**Default:** `"50ms"` + +**Description:** FlushIdCheckInterval is the time interval to get storedFlushID value from the executor/hashdb + +**Examples:** + +```json +"1m" +``` + +```json +"300ms" +``` + +**Example setting the default value** ("50ms"): +``` +[Sequencer.Finalizer] +FlushIdCheckInterval="50ms" +``` + +#### 10.8.12. `Sequencer.Finalizer.HaltOnBatchNumber` **Type:** : `integer` @@ -3352,7 +2393,7 @@ The Sequencer will halt after it closes the batch equal to this number HaltOnBatchNumber=0 ``` -#### 10.7.12. `Sequencer.Finalizer.SequentialBatchSanityCheck` +#### 10.8.13. `Sequencer.Finalizer.SequentialBatchSanityCheck` **Type:** : `boolean` @@ -3367,7 +2408,7 @@ sequential way (instead than in parallel) SequentialBatchSanityCheck=false ``` -#### 10.7.13. `Sequencer.Finalizer.SequentialProcessL2Block` +#### 10.8.14. `Sequencer.Finalizer.SequentialProcessL2Block` **Type:** : `boolean` @@ -3382,34 +2423,7 @@ in the processPendingL2Blocks go func SequentialProcessL2Block=false ``` -#### 10.7.14. `Sequencer.Finalizer.FullBatchSleepDuration` - -**Title:** Duration - -**Type:** : `string` - -**Default:** `"0s"` - -**Description:** XLayer config -FullBatchSleepDuration is the time the finalizer sleeps between each full batch iteration - -**Examples:** - -```json -"1m" -``` - -```json -"300ms" -``` - -**Example setting the default value** ("0s"): -``` -[Sequencer.Finalizer] -FullBatchSleepDuration="0s" -``` - -#### 10.7.15. `[Sequencer.Finalizer.Metrics]` +#### 10.8.15. `[Sequencer.Finalizer.Metrics]` **Type:** : `object` **Description:** Metrics is the config for the sequencer metrics @@ -3419,7 +2433,7 @@ FullBatchSleepDuration="0s" | - [Interval](#Sequencer_Finalizer_Metrics_Interval ) | No | string | No | - | Duration | | - [EnableLog](#Sequencer_Finalizer_Metrics_EnableLog ) | No | boolean | No | - | EnableLog is a flag to enable/disable metrics logs | -##### 10.7.15.1. `Sequencer.Finalizer.Metrics.Interval` +##### 10.8.15.1. `Sequencer.Finalizer.Metrics.Interval` **Title:** Duration @@ -3445,7 +2459,7 @@ FullBatchSleepDuration="0s" Interval="1h0m0s" ``` -##### 10.7.15.2. `Sequencer.Finalizer.Metrics.EnableLog` +##### 10.8.15.2. `Sequencer.Finalizer.Metrics.EnableLog` **Type:** : `boolean` @@ -3459,7 +2473,7 @@ Interval="1h0m0s" EnableLog=true ``` -### 10.8. `[Sequencer.StreamServer]` +### 10.9. `[Sequencer.StreamServer]` **Type:** : `object` **Description:** StreamServerCfg is the config for the stream server @@ -3473,8 +2487,9 @@ EnableLog=true | - [Enabled](#Sequencer_StreamServer_Enabled ) | No | boolean | No | - | Enabled is a flag to enable/disable the data streamer | | - [Log](#Sequencer_StreamServer_Log ) | No | object | No | - | Log is the log configuration | | - [UpgradeEtrogBatchNumber](#Sequencer_StreamServer_UpgradeEtrogBatchNumber ) | No | integer | No | - | UpgradeEtrogBatchNumber is the batch number of the upgrade etrog | +| - [WriteTimeout](#Sequencer_StreamServer_WriteTimeout ) | No | string | No | - | Duration | -#### 10.8.1. `Sequencer.StreamServer.Port` +#### 10.9.1. `Sequencer.StreamServer.Port` **Type:** : `integer` @@ -3488,7 +2503,7 @@ EnableLog=true Port=0 ``` -#### 10.8.2. `Sequencer.StreamServer.Filename` +#### 10.9.2. `Sequencer.StreamServer.Filename` **Type:** : `string` @@ -3502,7 +2517,7 @@ Port=0 Filename="" ``` -#### 10.8.3. `Sequencer.StreamServer.Version` +#### 10.9.3. `Sequencer.StreamServer.Version` **Type:** : `integer` @@ -3516,7 +2531,7 @@ Filename="" Version=0 ``` -#### 10.8.4. `Sequencer.StreamServer.ChainID` +#### 10.9.4. `Sequencer.StreamServer.ChainID` **Type:** : `integer` @@ -3530,7 +2545,7 @@ Version=0 ChainID=0 ``` -#### 10.8.5. `Sequencer.StreamServer.Enabled` +#### 10.9.5. `Sequencer.StreamServer.Enabled` **Type:** : `boolean` @@ -3544,7 +2559,7 @@ ChainID=0 Enabled=false ``` -#### 10.8.6. `[Sequencer.StreamServer.Log]` +#### 10.9.6. `[Sequencer.StreamServer.Log]` **Type:** : `object` **Description:** Log is the log configuration @@ -3555,7 +2570,7 @@ Enabled=false | - [Level](#Sequencer_StreamServer_Log_Level ) | No | enum (of string) | No | - | - | | - [Outputs](#Sequencer_StreamServer_Log_Outputs ) | No | array of string | No | - | - | -##### 10.8.6.1. `Sequencer.StreamServer.Log.Environment` +##### 10.9.6.1. `Sequencer.StreamServer.Log.Environment` **Type:** : `enum (of string)` @@ -3571,7 +2586,7 @@ Must be one of: * "production" * "development" -##### 10.8.6.2. `Sequencer.StreamServer.Log.Level` +##### 10.9.6.2. `Sequencer.StreamServer.Log.Level` **Type:** : `enum (of string)` @@ -3592,11 +2607,11 @@ Must be one of: * "panic" * "fatal" -##### 10.8.6.3. `Sequencer.StreamServer.Log.Outputs` +##### 10.9.6.3. `Sequencer.StreamServer.Log.Outputs` **Type:** : `array of string` -#### 10.8.7. `Sequencer.StreamServer.UpgradeEtrogBatchNumber` +#### 10.9.7. `Sequencer.StreamServer.UpgradeEtrogBatchNumber` **Type:** : `integer` @@ -3610,52 +2625,30 @@ Must be one of: UpgradeEtrogBatchNumber=0 ``` -### 10.9. `Sequencer.PackBatchSpacialList` +#### 10.9.8. `Sequencer.StreamServer.WriteTimeout` -**Type:** : `array of string` -**Description:** XLayer config -PackBatchSpacialList is the list of addresses that will have a special gas price +**Title:** Duration -### 10.10. `Sequencer.GasPriceMultiple` +**Type:** : `string` -**Type:** : `number` +**Default:** `"5s"` -**Default:** `0` +**Description:** WriteTimeout is the TCP write timeout when sending data to a datastream client -**Description:** GasPriceMultiple is the multiple of the gas price +**Examples:** -**Example setting the default value** (0): -``` -[Sequencer] -GasPriceMultiple=0 +```json +"1m" ``` -### 10.11. `Sequencer.InitGasPriceMultiple` - -**Type:** : `number` - -**Default:** `0` - -**Description:** InitGasPriceMultiple is the multiple of the gas price for init free gas tx - -**Example setting the default value** (0): -``` -[Sequencer] -InitGasPriceMultiple=0 +```json +"300ms" ``` -### 10.12. `Sequencer.QueryPendingTxsLimit` - -**Type:** : `integer` - -**Default:** `0` - -**Description:** QueryPendingTxsLimit is used to limit amount txs from the db - -**Example setting the default value** (0): +**Example setting the default value** ("5s"): ``` -[Sequencer] -QueryPendingTxsLimit=0 +[Sequencer.StreamServer] +WriteTimeout="5s" ``` ## 11. `[SequenceSender]` @@ -3674,8 +2667,7 @@ QueryPendingTxsLimit=0 | - [PrivateKey](#SequenceSender_PrivateKey ) | No | object | No | - | PrivateKey defines all the key store files that are going
to be read in order to provide the private keys to sign the L1 txs | | - [ForkUpgradeBatchNumber](#SequenceSender_ForkUpgradeBatchNumber ) | No | integer | No | - | Batch number where there is a forkid change (fork upgrade) | | - [GasOffset](#SequenceSender_GasOffset ) | No | integer | No | - | 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 | -| - [MaxBatchesForL1](#SequenceSender_MaxBatchesForL1 ) | No | integer | No | - | XLayer config
MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx | -| - [DAPermitApiPrivateKey](#SequenceSender_DAPermitApiPrivateKey ) | No | object | No | - | DAPermitApiPrivateKey defines all the key store files that are going
to sign batches for DA service | +| - [SequenceL1BlockConfirmations](#SequenceSender_SequenceL1BlockConfirmations ) | No | integer | No | - | SequenceL1BlockConfirmations is number of blocks to consider a sequence sent to L1 as final | ### 11.1. `SequenceSender.WaitPeriodSendSequence` @@ -3809,28 +2801,28 @@ to be read in order to provide the private keys to sign the L1 txs **Type:** : `string` -**Default:** `""` +**Default:** `"/pk/sequencer.keystore"` **Description:** Path is the file path for the key store file -**Example setting the default value** (""): +**Example setting the default value** ("/pk/sequencer.keystore"): ``` [SequenceSender.PrivateKey] -Path="" +Path="/pk/sequencer.keystore" ``` #### 11.7.2. `SequenceSender.PrivateKey.Password` **Type:** : `string` -**Default:** `""` +**Default:** `"testonly"` **Description:** Password is the password to decrypt the key store file -**Example setting the default value** (""): +**Example setting the default value** ("testonly"): ``` [SequenceSender.PrivateKey] -Password="" +Password="testonly" ``` ### 11.8. `SequenceSender.ForkUpgradeBatchNumber` @@ -3870,58 +2862,18 @@ final gas: 1100 GasOffset=80000 ``` -### 11.10. `SequenceSender.MaxBatchesForL1` +### 11.10. `SequenceSender.SequenceL1BlockConfirmations` **Type:** : `integer` -**Default:** `10` +**Default:** `32` -**Description:** XLayer config -MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx +**Description:** SequenceL1BlockConfirmations is number of blocks to consider a sequence sent to L1 as final -**Example setting the default value** (10): +**Example setting the default value** (32): ``` [SequenceSender] -MaxBatchesForL1=10 -``` - -### 11.11. `[SequenceSender.DAPermitApiPrivateKey]` - -**Type:** : `object` -**Description:** DAPermitApiPrivateKey defines all the key store files that are going -to sign batches for DA service - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------- | ------- | ------ | ---------- | ---------- | ------------------------------------------------------ | -| - [Path](#SequenceSender_DAPermitApiPrivateKey_Path ) | No | string | No | - | Path is the file path for the key store file | -| - [Password](#SequenceSender_DAPermitApiPrivateKey_Password ) | No | string | No | - | Password is the password to decrypt the key store file | - -#### 11.11.1. `SequenceSender.DAPermitApiPrivateKey.Path` - -**Type:** : `string` - -**Default:** `"/pk/sequencer.keystore"` - -**Description:** Path is the file path for the key store file - -**Example setting the default value** ("/pk/sequencer.keystore"): -``` -[SequenceSender.DAPermitApiPrivateKey] -Path="/pk/sequencer.keystore" -``` - -#### 11.11.2. `SequenceSender.DAPermitApiPrivateKey.Password` - -**Type:** : `string` - -**Default:** `"testonly"` - -**Description:** Password is the password to decrypt the key store file - -**Example setting the default value** ("testonly"): -``` -[SequenceSender.DAPermitApiPrivateKey] -Password="testonly" +SequenceL1BlockConfirmations=32 ``` ## 12. `[Aggregator]` @@ -3947,10 +2899,6 @@ Password="testonly" | - [GasOffset](#Aggregator_GasOffset ) | No | integer | No | - | 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 | | - [UpgradeEtrogBatchNumber](#Aggregator_UpgradeEtrogBatchNumber ) | No | integer | No | - | UpgradeEtrogBatchNumber is the number of the first batch after upgrading to etrog | | - [BatchProofL1BlockConfirmations](#Aggregator_BatchProofL1BlockConfirmations ) | No | integer | No | - | BatchProofL1BlockConfirmations is number of L1 blocks to consider we can generate the proof for a virtual batch | -| - [SettlementBackend](#Aggregator_SettlementBackend ) | No | string | No | - | SettlementBackend configuration defines how a final ZKP should be settled. Directly to L1 or over the Beethoven service. | -| - [AggLayerTxTimeout](#Aggregator_AggLayerTxTimeout ) | No | string | No | - | Duration | -| - [AggLayerURL](#Aggregator_AggLayerURL ) | No | string | No | - | AggLayerURL url of the agglayer service | -| - [SequencerPrivateKey](#Aggregator_SequencerPrivateKey ) | No | object | No | - | SequencerPrivateKey Private key of the trusted sequencer | ### 12.1. `Aggregator.Host` @@ -4138,133 +3086,26 @@ ForkId=0 **Type:** : `string` -**Default:** `""` - -**Description:** SenderAddress defines which private key the eth tx manager needs to use -to sign the L1 txs - -**Example setting the default value** (""): -``` -[Aggregator] -SenderAddress="" -``` - -### 12.12. `Aggregator.CleanupLockedProofsInterval` - -**Title:** Duration - -**Type:** : `string` - -**Default:** `"2m0s"` - -**Description:** CleanupLockedProofsInterval is the interval of time to clean up locked proofs. - -**Examples:** - -```json -"1m" -``` - -```json -"300ms" -``` - -**Example setting the default value** ("2m0s"): -``` -[Aggregator] -CleanupLockedProofsInterval="2m0s" -``` - -### 12.13. `Aggregator.GeneratingProofCleanupThreshold` - -**Type:** : `string` - -**Default:** `"10m"` - -**Description:** GeneratingProofCleanupThreshold represents the time interval after -which a proof in generating state is considered to be stuck and -allowed to be cleared. - -**Example setting the default value** ("10m"): -``` -[Aggregator] -GeneratingProofCleanupThreshold="10m" -``` - -### 12.14. `Aggregator.GasOffset` - -**Type:** : `integer` - -**Default:** `0` - -**Description:** 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 - -**Example setting the default value** (0): -``` -[Aggregator] -GasOffset=0 -``` - -### 12.15. `Aggregator.UpgradeEtrogBatchNumber` - -**Type:** : `integer` - -**Default:** `0` - -**Description:** UpgradeEtrogBatchNumber is the number of the first batch after upgrading to etrog - -**Example setting the default value** (0): -``` -[Aggregator] -UpgradeEtrogBatchNumber=0 -``` - -### 12.16. `Aggregator.BatchProofL1BlockConfirmations` - -**Type:** : `integer` - -**Default:** `2` - -**Description:** BatchProofL1BlockConfirmations is number of L1 blocks to consider we can generate the proof for a virtual batch - -**Example setting the default value** (2): -``` -[Aggregator] -BatchProofL1BlockConfirmations=2 -``` - -### 12.17. `Aggregator.SettlementBackend` - -**Type:** : `string` - -**Default:** `"l1"` +**Default:** `""` -**Description:** SettlementBackend configuration defines how a final ZKP should be settled. Directly to L1 or over the Beethoven service. +**Description:** SenderAddress defines which private key the eth tx manager needs to use +to sign the L1 txs -**Example setting the default value** ("l1"): +**Example setting the default value** (""): ``` [Aggregator] -SettlementBackend="l1" +SenderAddress="" ``` -### 12.18. `Aggregator.AggLayerTxTimeout` +### 12.12. `Aggregator.CleanupLockedProofsInterval` **Title:** Duration **Type:** : `string` -**Default:** `"5m0s"` +**Default:** `"2m0s"` -**Description:** AggLayerTxTimeout is the interval time to wait for a tx to be mined from the agglayer +**Description:** CleanupLockedProofsInterval is the interval of time to clean up locked proofs. **Examples:** @@ -4276,62 +3117,77 @@ SettlementBackend="l1" "300ms" ``` -**Example setting the default value** ("5m0s"): +**Example setting the default value** ("2m0s"): ``` [Aggregator] -AggLayerTxTimeout="5m0s" +CleanupLockedProofsInterval="2m0s" ``` -### 12.19. `Aggregator.AggLayerURL` +### 12.13. `Aggregator.GeneratingProofCleanupThreshold` **Type:** : `string` -**Default:** `""` +**Default:** `"10m"` -**Description:** AggLayerURL url of the agglayer service +**Description:** GeneratingProofCleanupThreshold represents the time interval after +which a proof in generating state is considered to be stuck and +allowed to be cleared. -**Example setting the default value** (""): +**Example setting the default value** ("10m"): ``` [Aggregator] -AggLayerURL="" +GeneratingProofCleanupThreshold="10m" ``` -### 12.20. `[Aggregator.SequencerPrivateKey]` +### 12.14. `Aggregator.GasOffset` -**Type:** : `object` -**Description:** SequencerPrivateKey Private key of the trusted sequencer +**Type:** : `integer` -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------- | ------- | ------ | ---------- | ---------- | ------------------------------------------------------ | -| - [Path](#Aggregator_SequencerPrivateKey_Path ) | No | string | No | - | Path is the file path for the key store file | -| - [Password](#Aggregator_SequencerPrivateKey_Password ) | No | string | No | - | Password is the password to decrypt the key store file | +**Default:** `0` + +**Description:** 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. -#### 12.20.1. `Aggregator.SequencerPrivateKey.Path` +ex: +gas estimation: 1000 +gas offset: 100 +final gas: 1100 -**Type:** : `string` +**Example setting the default value** (0): +``` +[Aggregator] +GasOffset=0 +``` -**Default:** `""` +### 12.15. `Aggregator.UpgradeEtrogBatchNumber` -**Description:** Path is the file path for the key store file +**Type:** : `integer` -**Example setting the default value** (""): +**Default:** `0` + +**Description:** UpgradeEtrogBatchNumber is the number of the first batch after upgrading to etrog + +**Example setting the default value** (0): ``` -[Aggregator.SequencerPrivateKey] -Path="" +[Aggregator] +UpgradeEtrogBatchNumber=0 ``` -#### 12.20.2. `Aggregator.SequencerPrivateKey.Password` +### 12.16. `Aggregator.BatchProofL1BlockConfirmations` -**Type:** : `string` +**Type:** : `integer` -**Default:** `""` +**Default:** `2` -**Description:** Password is the password to decrypt the key store file +**Description:** BatchProofL1BlockConfirmations is number of L1 blocks to consider we can generate the proof for a virtual batch -**Example setting the default value** (""): +**Example setting the default value** (2): ``` -[Aggregator.SequencerPrivateKey] -Password="" +[Aggregator] +BatchProofL1BlockConfirmations=2 ``` ## 13. `[NetworkConfig]` @@ -4339,11 +3195,10 @@ Password="" **Type:** : `object` **Description:** Configuration of the genesis of the network. This is used to known the initial state of the network -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------------------- | ------- | ---------------- | ---------- | ---------- | -------------------------------------------------------------- | -| - [l1Config](#NetworkConfig_l1Config ) | No | object | No | - | L1: Configuration related to L1 | -| - [L2BridgeAddr](#NetworkConfig_L2BridgeAddr ) | No | array of integer | No | - | L2: address of the \`PolygonZkEVMBridge proxy\` smart contract | -| - [Genesis](#NetworkConfig_Genesis ) | No | object | No | - | - | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| -------------------------------------- | ------- | ------ | ---------- | ---------- | ------------------------------------------------------ | +| - [l1Config](#NetworkConfig_l1Config ) | No | object | No | - | L1: Configuration related to L1 | +| - [Genesis](#NetworkConfig_Genesis ) | No | object | No | - | L1: Genesis of the rollup, first block number and root | ### 13.1. `[NetworkConfig.l1Config]` @@ -4392,56 +3247,37 @@ chainId=0 **Type:** : `array of integer` **Description:** GlobalExitRootManagerAddr Address of the L1 GlobalExitRootManager contract -### 13.2. `NetworkConfig.L2BridgeAddr` - -**Type:** : `array of integer` -**Description:** L2: address of the `PolygonZkEVMBridge proxy` smart contract - -### 13.3. `[NetworkConfig.Genesis]` +### 13.2. `[NetworkConfig.Genesis]` **Type:** : `object` +**Description:** L1: Genesis of the rollup, first block number and root -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------------ | ------- | ---------------- | ---------- | ---------- | ------------------------------------------------------------------------------------------- | -| - [RollupBlockNumber](#NetworkConfig_Genesis_RollupBlockNumber ) | No | integer | No | - | RollupBlockNumber is the block number where the polygonZKEVM smc was deployed on L1 | -| - [RollupManagerBlockNumber](#NetworkConfig_Genesis_RollupManagerBlockNumber ) | No | integer | No | - | RollupManagerBlockNumber is the block number where the RollupManager smc was deployed on L1 | -| - [Root](#NetworkConfig_Genesis_Root ) | No | array of integer | No | - | Root hash of the genesis block | -| - [Actions](#NetworkConfig_Genesis_Actions ) | No | array of object | No | - | Actions is the data to populate into the state trie | - -#### 13.3.1. `NetworkConfig.Genesis.RollupBlockNumber` - -**Type:** : `integer` - -**Default:** `0` - -**Description:** RollupBlockNumber is the block number where the polygonZKEVM smc was deployed on L1 - -**Example setting the default value** (0): -``` -[NetworkConfig.Genesis] -RollupBlockNumber=0 -``` +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ---------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | ----------------------------------------------------------------------------- | +| - [BlockNumber](#NetworkConfig_Genesis_BlockNumber ) | No | integer | No | - | BlockNumber is the block number where the polygonZKEVM smc was deployed on L1 | +| - [Root](#NetworkConfig_Genesis_Root ) | No | array of integer | No | - | Root hash of the genesis block | +| - [Actions](#NetworkConfig_Genesis_Actions ) | No | array of object | No | - | Actions is the data to populate into the state trie | -#### 13.3.2. `NetworkConfig.Genesis.RollupManagerBlockNumber` +#### 13.2.1. `NetworkConfig.Genesis.BlockNumber` **Type:** : `integer` **Default:** `0` -**Description:** RollupManagerBlockNumber is the block number where the RollupManager smc was deployed on L1 +**Description:** BlockNumber is the block number where the polygonZKEVM smc was deployed on L1 **Example setting the default value** (0): ``` [NetworkConfig.Genesis] -RollupManagerBlockNumber=0 +BlockNumber=0 ``` -#### 13.3.3. `NetworkConfig.Genesis.Root` +#### 13.2.2. `NetworkConfig.Genesis.Root` **Type:** : `array of integer` **Description:** Root hash of the genesis block -#### 13.3.4. `NetworkConfig.Genesis.Actions` +#### 13.2.3. `NetworkConfig.Genesis.Actions` **Type:** : `array of object` **Description:** Actions is the data to populate into the state trie @@ -4458,7 +3294,7 @@ RollupManagerBlockNumber=0 | ----------------------------------------------------- | ------------------------------------------------------------------------- | | [Actions items](#NetworkConfig_Genesis_Actions_items) | GenesisAction represents one of the values set on the SMT during genesis. | -##### 13.3.4.1. [NetworkConfig.Genesis.Actions.Actions items] +##### 13.2.3.1. [NetworkConfig.Genesis.Actions.Actions items] **Type:** : `object` **Description:** GenesisAction represents one of the values set on the SMT during genesis. @@ -4473,31 +3309,31 @@ RollupManagerBlockNumber=0 | - [value](#NetworkConfig_Genesis_Actions_items_value ) | No | string | No | - | - | | - [root](#NetworkConfig_Genesis_Actions_items_root ) | No | string | No | - | - | -##### 13.3.4.1.1. `NetworkConfig.Genesis.Actions.Actions items.address` +##### 13.2.3.1.1. `NetworkConfig.Genesis.Actions.Actions items.address` **Type:** : `string` -##### 13.3.4.1.2. `NetworkConfig.Genesis.Actions.Actions items.type` +##### 13.2.3.1.2. `NetworkConfig.Genesis.Actions.Actions items.type` **Type:** : `integer` -##### 13.3.4.1.3. `NetworkConfig.Genesis.Actions.Actions items.storagePosition` +##### 13.2.3.1.3. `NetworkConfig.Genesis.Actions.Actions items.storagePosition` **Type:** : `string` -##### 13.3.4.1.4. `NetworkConfig.Genesis.Actions.Actions items.bytecode` +##### 13.2.3.1.4. `NetworkConfig.Genesis.Actions.Actions items.bytecode` **Type:** : `string` -##### 13.3.4.1.5. `NetworkConfig.Genesis.Actions.Actions items.key` +##### 13.2.3.1.5. `NetworkConfig.Genesis.Actions.Actions items.key` **Type:** : `string` -##### 13.3.4.1.6. `NetworkConfig.Genesis.Actions.Actions items.value` +##### 13.2.3.1.6. `NetworkConfig.Genesis.Actions.Actions items.value` **Type:** : `string` -##### 13.3.4.1.7. `NetworkConfig.Genesis.Actions.Actions items.root` +##### 13.2.3.1.7. `NetworkConfig.Genesis.Actions.Actions items.root` **Type:** : `string` @@ -4506,31 +3342,19 @@ RollupManagerBlockNumber=0 **Type:** : `object` **Description:** Configuration of the gas price suggester service -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------------------------ | ------- | ------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| - [Type](#L2GasPriceSuggester_Type ) | No | string | No | - | - | -| - [DefaultGasPriceWei](#L2GasPriceSuggester_DefaultGasPriceWei ) | No | integer | No | - | DefaultGasPriceWei is used to set the gas price to be used by the default gas pricer or as minimim gas price by the follower gas pricer. | -| - [MaxGasPriceWei](#L2GasPriceSuggester_MaxGasPriceWei ) | No | integer | No | - | MaxGasPriceWei is used to limit the gas price returned by the follower gas pricer to a maximum value. It is ignored if 0. | -| - [MaxPrice](#L2GasPriceSuggester_MaxPrice ) | No | object | No | - | - | -| - [IgnorePrice](#L2GasPriceSuggester_IgnorePrice ) | No | object | No | - | - | -| - [CheckBlocks](#L2GasPriceSuggester_CheckBlocks ) | No | integer | No | - | - | -| - [Percentile](#L2GasPriceSuggester_Percentile ) | No | integer | No | - | - | -| - [UpdatePeriod](#L2GasPriceSuggester_UpdatePeriod ) | No | string | No | - | Duration | -| - [CleanHistoryPeriod](#L2GasPriceSuggester_CleanHistoryPeriod ) | No | string | No | - | Duration | -| - [CleanHistoryTimeRetention](#L2GasPriceSuggester_CleanHistoryTimeRetention ) | No | string | No | - | Duration | -| - [Factor](#L2GasPriceSuggester_Factor ) | No | number | No | - | - | -| - [KafkaURL](#L2GasPriceSuggester_KafkaURL ) | No | string | No | - | XLayer config | -| - [Topic](#L2GasPriceSuggester_Topic ) | No | string | No | - | - | -| - [GroupID](#L2GasPriceSuggester_GroupID ) | No | string | No | - | - | -| - [Username](#L2GasPriceSuggester_Username ) | No | string | No | - | - | -| - [Password](#L2GasPriceSuggester_Password ) | No | string | No | - | - | -| - [RootCAPath](#L2GasPriceSuggester_RootCAPath ) | No | string | No | - | - | -| - [L1CoinId](#L2GasPriceSuggester_L1CoinId ) | No | integer | No | - | - | -| - [L2CoinId](#L2GasPriceSuggester_L2CoinId ) | No | integer | No | - | - | -| - [DefaultL1CoinPrice](#L2GasPriceSuggester_DefaultL1CoinPrice ) | No | number | No | - | DefaultL1CoinPrice is the L1 token's coin price | -| - [DefaultL2CoinPrice](#L2GasPriceSuggester_DefaultL2CoinPrice ) | No | number | No | - | DefaultL2CoinPrice is the native token's coin price | -| - [GasPriceUsdt](#L2GasPriceSuggester_GasPriceUsdt ) | No | number | No | - | - | -| - [EnableFollowerAdjustByL2L1Price](#L2GasPriceSuggester_EnableFollowerAdjustByL2L1Price ) | No | boolean | No | - | EnableFollowerAdjustByL2L1Price is dynamic adjust the factor through the L1 and L2 coins price in follower strategy | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ------------------------------------------------------------------------------ | ------- | ------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| - [Type](#L2GasPriceSuggester_Type ) | No | string | No | - | - | +| - [DefaultGasPriceWei](#L2GasPriceSuggester_DefaultGasPriceWei ) | No | integer | No | - | DefaultGasPriceWei is used to set the gas price to be used by the default gas pricer or as minimim gas price by the follower gas pricer. | +| - [MaxGasPriceWei](#L2GasPriceSuggester_MaxGasPriceWei ) | No | integer | No | - | MaxGasPriceWei is used to limit the gas price returned by the follower gas pricer to a maximum value. It is ignored if 0. | +| - [MaxPrice](#L2GasPriceSuggester_MaxPrice ) | No | object | No | - | - | +| - [IgnorePrice](#L2GasPriceSuggester_IgnorePrice ) | No | object | No | - | - | +| - [CheckBlocks](#L2GasPriceSuggester_CheckBlocks ) | No | integer | No | - | - | +| - [Percentile](#L2GasPriceSuggester_Percentile ) | No | integer | No | - | - | +| - [UpdatePeriod](#L2GasPriceSuggester_UpdatePeriod ) | No | string | No | - | Duration | +| - [CleanHistoryPeriod](#L2GasPriceSuggester_CleanHistoryPeriod ) | No | string | No | - | Duration | +| - [CleanHistoryTimeRetention](#L2GasPriceSuggester_CleanHistoryTimeRetention ) | No | string | No | - | Duration | +| - [Factor](#L2GasPriceSuggester_Factor ) | No | number | No | - | - | ### 14.1. `L2GasPriceSuggester.Type` @@ -4688,158 +3512,6 @@ CleanHistoryTimeRetention="5m0s" Factor=0.15 ``` -### 14.12. `L2GasPriceSuggester.KafkaURL` - -**Type:** : `string` - -**Default:** `""` - -**Description:** XLayer config - -**Example setting the default value** (""): -``` -[L2GasPriceSuggester] -KafkaURL="" -``` - -### 14.13. `L2GasPriceSuggester.Topic` - -**Type:** : `string` - -**Default:** `""` - -**Example setting the default value** (""): -``` -[L2GasPriceSuggester] -Topic="" -``` - -### 14.14. `L2GasPriceSuggester.GroupID` - -**Type:** : `string` - -**Default:** `""` - -**Example setting the default value** (""): -``` -[L2GasPriceSuggester] -GroupID="" -``` - -### 14.15. `L2GasPriceSuggester.Username` - -**Type:** : `string` - -**Default:** `""` - -**Example setting the default value** (""): -``` -[L2GasPriceSuggester] -Username="" -``` - -### 14.16. `L2GasPriceSuggester.Password` - -**Type:** : `string` - -**Default:** `""` - -**Example setting the default value** (""): -``` -[L2GasPriceSuggester] -Password="" -``` - -### 14.17. `L2GasPriceSuggester.RootCAPath` - -**Type:** : `string` - -**Default:** `""` - -**Example setting the default value** (""): -``` -[L2GasPriceSuggester] -RootCAPath="" -``` - -### 14.18. `L2GasPriceSuggester.L1CoinId` - -**Type:** : `integer` - -**Default:** `0` - -**Example setting the default value** (0): -``` -[L2GasPriceSuggester] -L1CoinId=0 -``` - -### 14.19. `L2GasPriceSuggester.L2CoinId` - -**Type:** : `integer` - -**Default:** `0` - -**Example setting the default value** (0): -``` -[L2GasPriceSuggester] -L2CoinId=0 -``` - -### 14.20. `L2GasPriceSuggester.DefaultL1CoinPrice` - -**Type:** : `number` - -**Default:** `0` - -**Description:** DefaultL1CoinPrice is the L1 token's coin price - -**Example setting the default value** (0): -``` -[L2GasPriceSuggester] -DefaultL1CoinPrice=0 -``` - -### 14.21. `L2GasPriceSuggester.DefaultL2CoinPrice` - -**Type:** : `number` - -**Default:** `0` - -**Description:** DefaultL2CoinPrice is the native token's coin price - -**Example setting the default value** (0): -``` -[L2GasPriceSuggester] -DefaultL2CoinPrice=0 -``` - -### 14.22. `L2GasPriceSuggester.GasPriceUsdt` - -**Type:** : `number` - -**Default:** `0` - -**Example setting the default value** (0): -``` -[L2GasPriceSuggester] -GasPriceUsdt=0 -``` - -### 14.23. `L2GasPriceSuggester.EnableFollowerAdjustByL2L1Price` - -**Type:** : `boolean` - -**Default:** `false` - -**Description:** EnableFollowerAdjustByL2L1Price is dynamic adjust the factor through the L1 and L2 coins price in follower strategy - -**Example setting the default value** (false): -``` -[L2GasPriceSuggester] -EnableFollowerAdjustByL2L1Price=false -``` - ## 15. `[Executor]` **Type:** : `object` @@ -4856,12 +3528,12 @@ EnableFollowerAdjustByL2L1Price=false **Type:** : `string` -**Default:** `"xlayer-prover:50071"` +**Default:** `"zkevm-prover:50071"` -**Example setting the default value** ("xlayer-prover:50071"): +**Example setting the default value** ("zkevm-prover:50071"): ``` [Executor] -URI="xlayer-prover:50071" +URI="zkevm-prover:50071" ``` ### 15.2. `Executor.MaxResourceExhaustedAttempts` @@ -4929,14 +3601,14 @@ MaxGRPCMessageSize=100000000 **Type:** : `string` -**Default:** `"xlayer-prover:50061"` +**Default:** `"zkevm-prover:50061"` **Description:** URI is the server URI. -**Example setting the default value** ("xlayer-prover:50061"): +**Example setting the default value** ("zkevm-prover:50061"): ``` [MTClient] -URI="xlayer-prover:50061" +URI="zkevm-prover:50061" ``` ## 17. `[Metrics]` @@ -5220,14 +3892,14 @@ Password="prover_pass" **Type:** : `string` -**Default:** `"xlayer-state-db"` +**Default:** `"zkevm-state-db"` **Description:** Host address of database -**Example setting the default value** ("xlayer-state-db"): +**Example setting the default value** ("zkevm-state-db"): ``` [HashDB] -Host="xlayer-state-db" +Host="zkevm-state-db" ``` ### 19.5. `HashDB.Port` @@ -5338,7 +4010,7 @@ ChainID=0 | ----------------------------------------------------- | ------------------------------------ | | [ForkIDIntervals items](#State_ForkIDIntervals_items) | ForkIDInterval is a fork id interval | -#### 20.3.1. [State.ForkIDIntervals.ForkIDIntervals items] +#### 20.3.1. [State.ForkIDIntervals.ForkIDIntervals items] **Type:** : `object` **Description:** ForkIDInterval is a fork id interval @@ -5500,14 +4172,14 @@ Password="state_password" **Type:** : `string` -**Default:** `"xlayer-state-db"` +**Default:** `"zkevm-state-db"` **Description:** Host address of database -**Example setting the default value** ("xlayer-state-db"): +**Example setting the default value** ("zkevm-state-db"): ``` [State.DB] -Host="xlayer-state-db" +Host="zkevm-state-db" ``` #### 20.8.5. `State.DB.Port` @@ -5771,78 +4443,5 @@ from the DB every time it's needed AvoidForkIDInMemory=false ``` -## 21. `[Apollo]` - -**Type:** : `object` -**Description:** Apollo configuration - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- | -| - [Enable](#Apollo_Enable ) | No | boolean | No | - | - | -| - [IP](#Apollo_IP ) | No | string | No | - | - | -| - [AppID](#Apollo_AppID ) | No | string | No | - | - | -| - [NamespaceName](#Apollo_NamespaceName ) | No | string | No | - | - | - -### 21.1. `Apollo.Enable` - -**Type:** : `boolean` - -**Default:** `false` - -**Example setting the default value** (false): -``` -[Apollo] -Enable=false -``` - -### 21.2. `Apollo.IP` - -**Type:** : `string` - -**Default:** `""` - -**Example setting the default value** (""): -``` -[Apollo] -IP="" -``` - -### 21.3. `Apollo.AppID` - -**Type:** : `string` - -**Default:** `""` - -**Example setting the default value** (""): -``` -[Apollo] -AppID="" -``` - -### 21.4. `Apollo.NamespaceName` - -**Type:** : `string` - -**Default:** `""` - -**Example setting the default value** (""): -``` -[Apollo] -NamespaceName="" -``` - -## 22. `Fork9UpgradeBatch` - -**Type:** : `integer` - -**Default:** `0` - -**Description:** ForceBatchAddress Address of the L1 ForceBatch contract - -**Example setting the default value** (0): -``` -Fork9UpgradeBatch=0 -``` - ---------------------------------------------------------------------------------------------------------------------------- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) diff --git a/docs/config-file/node-config-schema.json b/docs/config-file/node-config-schema.json index 41582e91f3..7f220848ec 100644 --- a/docs/config-file/node-config-schema.json +++ b/docs/config-file/node-config-schema.json @@ -1402,6 +1402,16 @@ "type": "integer", "description": "UpgradeEtrogBatchNumber is the batch number of the upgrade etrog", "default": 0 + }, + "WriteTimeout": { + "type": "string", + "title": "Duration", + "description": "WriteTimeout is the TCP write timeout when sending data to a datastream client", + "default": "5s", + "examples": [ + "1m", + "300ms" + ] } }, "additionalProperties": false, diff --git a/go.mod b/go.mod index e465b3ebe9..27fd9fa514 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/0xPolygonHermez/zkevm-node go 1.21 require ( - github.com/0xPolygonHermez/zkevm-data-streamer v0.2.3-0.20240426122934-6f47d2485fc1 + github.com/0xPolygonHermez/zkevm-data-streamer v0.2.3-RC4 github.com/didip/tollbooth/v6 v6.1.2 github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 github.com/ethereum/go-ethereum v1.13.11 diff --git a/go.sum b/go.sum index 4be01dab15..77a22ca737 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/0xPolygon/agglayer v0.0.1 h1:J6/DUo9rNUncDifquanouRCo2g7g069yvz0aFtu7 github.com/0xPolygon/agglayer v0.0.1/go.mod h1:UYp5O8THULoXVrUfzkRjVBzxHR5DxBdUN/Iq0EgxNxM= github.com/0xPolygon/cdk-data-availability v0.0.5 h1://vg1oR/5tw2XfEIorpP+wIxLfNUmoKrdmX8YZvBKX4= github.com/0xPolygon/cdk-data-availability v0.0.5/go.mod h1:aGwqHiJhL+mJbdepl3s58wsY18EuViDa9vZCpPuIYGw= -github.com/0xPolygonHermez/zkevm-data-streamer v0.2.3-0.20240426122934-6f47d2485fc1 h1:4wbCJOGcZ8BTuOfNFrcZ1cAVfTWaX1W9EYHaDx3imLc= -github.com/0xPolygonHermez/zkevm-data-streamer v0.2.3-0.20240426122934-6f47d2485fc1/go.mod h1:0QkAXcFa92mFJrCbN3UPUJGJYes851yEgYHLONnaosE= +github.com/0xPolygonHermez/zkevm-data-streamer v0.2.3-RC4 h1:+4K+xSzv0ImbK30B/T9FauNTrTFUmWcNKYhIgwsE4C4= +github.com/0xPolygonHermez/zkevm-data-streamer v0.2.3-RC4/go.mod h1:0QkAXcFa92mFJrCbN3UPUJGJYes851yEgYHLONnaosE= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= diff --git a/sequencer/config.go b/sequencer/config.go index 5f0857232c..35af7468f2 100644 --- a/sequencer/config.go +++ b/sequencer/config.go @@ -58,6 +58,8 @@ type StreamServerCfg struct { Log log.Config `mapstructure:"Log"` // UpgradeEtrogBatchNumber is the batch number of the upgrade etrog UpgradeEtrogBatchNumber uint64 `mapstructure:"UpgradeEtrogBatchNumber"` + // WriteTimeout is the TCP write timeout when sending data to a datastream client + WriteTimeout types.Duration `mapstructure:"WriteTimeout"` } // FinalizerCfg contains the finalizer's configuration properties diff --git a/sequencer/l2block.go b/sequencer/l2block.go index 20945ea046..05aea9623b 100644 --- a/sequencer/l2block.go +++ b/sequencer/l2block.go @@ -245,7 +245,7 @@ func (f *finalizer) processL2Block(ctx context.Context, l2Block *L2Block) error if subOverflow { // Sanity check, this cannot happen as reservedZKCounters should be >= that usedZKCounters return fmt.Errorf("error subtracting L2 block %d [%d] needed resources from the batch %d, overflow resource: %s, batch bytes: %d, L2 block bytes: %d, counters: {batch: %s, used: %s, reserved: %s, needed: %s, high: %s}", blockResponse.BlockNumber, l2Block.trackingNum, l2Block.batch.batchNumber, overflowResource, l2Block.batch.finalRemainingResources.Bytes, batchL2DataSize, - f.logZKCounters(l2Block.batch.finalRemainingResources.ZKCounters), f.logZKCounters(batchResponse.UsedZkCounters), f.logZKCounters(batchResponse.ReservedZkCounters), f.logZKCounters(neededZKCounters), f.logZKCounters(l2Block.batch.imHighReservedZKCounters)) + f.logZKCounters(l2Block.batch.finalRemainingResources.ZKCounters), f.logZKCounters(batchResponse.UsedZkCounters), f.logZKCounters(batchResponse.ReservedZkCounters), f.logZKCounters(neededZKCounters), f.logZKCounters(l2Block.batch.finalHighReservedZKCounters)) } l2Block.batch.finalHighReservedZKCounters = newHighZKCounters @@ -253,7 +253,7 @@ func (f *finalizer) processL2Block(ctx context.Context, l2Block *L2Block) error } else { overflowLog := fmt.Sprintf("L2 block %d [%d] needed resources exceeds the remaining batch %d resources, overflow resource: %s, batch bytes: %d, L2 block bytes: %d, counters: {batch: %s, used: %s, reserved: %s, needed: %s, high: %s}", blockResponse.BlockNumber, l2Block.trackingNum, l2Block.batch.batchNumber, overflowResource, l2Block.batch.finalRemainingResources.Bytes, batchL2DataSize, - f.logZKCounters(l2Block.batch.finalRemainingResources.ZKCounters), f.logZKCounters(batchResponse.UsedZkCounters), f.logZKCounters(batchResponse.ReservedZkCounters), f.logZKCounters(neededZKCounters), f.logZKCounters(l2Block.batch.imHighReservedZKCounters)) + f.logZKCounters(l2Block.batch.finalRemainingResources.ZKCounters), f.logZKCounters(batchResponse.UsedZkCounters), f.logZKCounters(batchResponse.ReservedZkCounters), f.logZKCounters(neededZKCounters), f.logZKCounters(l2Block.batch.finalHighReservedZKCounters)) f.LogEvent(ctx, event.Level_Warning, event.EventID_ReservedZKCountersOverflow, overflowLog, nil) diff --git a/sequencer/sequencer.go b/sequencer/sequencer.go index f4bbd5259d..41f1be536c 100644 --- a/sequencer/sequencer.go +++ b/sequencer/sequencer.go @@ -17,7 +17,7 @@ import ( ) const ( - datastreamChannelMultiplier = 2 + datastreamChannelBufferSize = 50 ) // Sequencer represents a sequencer @@ -61,9 +61,7 @@ func New(cfg Config, batchCfg state.BatchConfig, poolCfg pool.Config, txPool txP eventLog: eventLog, } - // TODO: Make configurable - channelBufferSize := 200 * datastreamChannelMultiplier // nolint:gomnd - sequencer.dataToStream = make(chan interface{}, channelBufferSize) + sequencer.dataToStream = make(chan interface{}, datastreamChannelBufferSize) return sequencer, nil } @@ -83,7 +81,7 @@ func (s *Sequencer) Start(ctx context.Context) { // Start stream server if enabled if s.cfg.StreamServer.Enabled { - s.streamServer, err = datastreamer.NewServer(s.cfg.StreamServer.Port, s.cfg.StreamServer.Version, s.cfg.StreamServer.ChainID, state.StreamTypeSequencer, s.cfg.StreamServer.Filename, &s.cfg.StreamServer.Log) + s.streamServer, err = datastreamer.NewServer(s.cfg.StreamServer.Port, s.cfg.StreamServer.Version, s.cfg.StreamServer.ChainID, state.StreamTypeSequencer, s.cfg.StreamServer.Filename, s.cfg.StreamServer.WriteTimeout.Duration, &s.cfg.StreamServer.Log) if err != nil { log.Fatalf("failed to create stream server, error: %v", err) } diff --git a/test/config/debug.node.config.toml b/test/config/debug.node.config.toml index 6f036cefeb..8981773934 100644 --- a/test/config/debug.node.config.toml +++ b/test/config/debug.node.config.toml @@ -113,6 +113,7 @@ StateConsistencyCheckInterval = "5s" Port = 6900 Filename = "/datastreamer/datastream.bin" Version = 1 + WriteTimeout = "5s" Enabled = true [SequenceSender] diff --git a/test/config/test.node.config.toml b/test/config/test.node.config.toml index c3bfca6070..6b5e69c8d4 100644 --- a/test/config/test.node.config.toml +++ b/test/config/test.node.config.toml @@ -138,6 +138,7 @@ StateConsistencyCheckInterval = "5s" Filename = "/datastreamer/datastream.bin" Version = 1 ChainID = 195 + WriteTimeout = "5s" Enabled = true [SequenceSender] diff --git a/tools/datastreamer/config/config.go b/tools/datastreamer/config/config.go index 0acb225cf9..b6c841e591 100644 --- a/tools/datastreamer/config/config.go +++ b/tools/datastreamer/config/config.go @@ -7,6 +7,7 @@ import ( "github.com/0xPolygonHermez/zkevm-data-streamer/datastreamer" "github.com/0xPolygonHermez/zkevm-data-streamer/log" + "github.com/0xPolygonHermez/zkevm-node/config/types" "github.com/0xPolygonHermez/zkevm-node/db" "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" "github.com/mitchellh/mapstructure" @@ -48,6 +49,8 @@ type StreamServerCfg struct { Log log.Config `mapstructure:"Log"` // UpgradeEtrogBatchNumber is the batch number of the upgrade etrog UpgradeEtrogBatchNumber uint64 `mapstructure:"UpgradeEtrogBatchNumber"` + // WriteTimeout is the TCP write timeout when sending data to a datastream client + WriteTimeout types.Duration `mapstructure:"WriteTimeout"` } // Config is the configuration for the tool diff --git a/tools/datastreamer/config/tool.config.toml b/tools/datastreamer/config/tool.config.toml index c497f3362f..51976d8af8 100644 --- a/tools/datastreamer/config/tool.config.toml +++ b/tools/datastreamer/config/tool.config.toml @@ -7,6 +7,7 @@ Port = 6901 Filename = "datastream.bin" Version = 1 ChainID = 1440 +WriteTimeout = "5s" UpgradeEtrogBatchNumber = 0 [StateDB] diff --git a/tools/datastreamer/main.go b/tools/datastreamer/main.go index 975e4c7ecd..016d1834e5 100644 --- a/tools/datastreamer/main.go +++ b/tools/datastreamer/main.go @@ -159,7 +159,7 @@ func main() { func initializeStreamServer(c *config.Config) (*datastreamer.StreamServer, error) { // Create a stream server - streamServer, err := datastreamer.NewServer(c.Offline.Port, c.Offline.Version, c.Offline.ChainID, state.StreamTypeSequencer, c.Offline.Filename, &c.Log) + streamServer, err := datastreamer.NewServer(c.Offline.Port, c.Offline.Version, c.Offline.ChainID, state.StreamTypeSequencer, c.Offline.Filename, c.Offline.WriteTimeout.Duration, &c.Log) if err != nil { return nil, err }