diff --git a/cmd/dumpstate.go b/cmd/dumpstate.go index 05b0bbea4e..6fc3b3156c 100644 --- a/cmd/dumpstate.go +++ b/cmd/dumpstate.go @@ -109,7 +109,7 @@ func dumpState(ctx *cli.Context) error { } // Connect to SQL - stateSqlDB, err := db.NewSQLDB(c.StateDB) + stateSqlDB, err := db.NewSQLDB(c.State.DB) if err != nil { return err } diff --git a/cmd/restore.go b/cmd/restore.go index 10e364338c..b31abbdf9a 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -46,25 +46,25 @@ func restore(ctx *cli.Context) error { } // Run migrations to create schemas and tables - runStateMigrations(c.StateDB) + runStateMigrations(c.State.DB) - port, err := strconv.Atoi(c.StateDB.Port) + port, err := strconv.Atoi(c.State.DB.Port) if err != nil { log.Error("error converting port to int. Error: ", err) return err } restore, err := pg.NewRestore(&pg.Postgres{ - Host: c.StateDB.Host, + Host: c.State.DB.Host, Port: port, - DB: c.StateDB.Name, - Username: c.StateDB.User, - Password: c.StateDB.Password, + DB: c.State.DB.Name, + Username: c.State.DB.User, + Password: c.State.DB.Password, }) if err != nil { log.Error("error: ", err) return err } - restore.Role = c.StateDB.User + restore.Role = c.State.DB.User restore.Schemas = append(restore.Schemas, "state") log.Info("Restore stateDB snapshot started, please wait...") restoreExec := restore.Exec(inputFileStateDB, pg.ExecOptions{StreamPrint: false}) diff --git a/cmd/run.go b/cmd/run.go index fd184cc665..0261335ea2 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -61,11 +61,11 @@ func start(cliCtx *cli.Context) error { if !cliCtx.Bool(config.FlagMigrations) { for _, comp := range components { if comp == SYNCHRONIZER { - runStateMigrations(c.StateDB) + runStateMigrations(c.State.DB) } } } - checkStateMigrations(c.StateDB) + checkStateMigrations(c.State.DB) // Decide if this node instance needs an executor and/or a state tree var needsExecutor, needsStateTree bool @@ -96,7 +96,7 @@ func start(cliCtx *cli.Context) error { eventLog = event.NewEventLog(c.EventLog, eventStorage) // Core State DB - stateSqlDB, err := db.NewSQLDB(c.StateDB) + stateSqlDB, err := db.NewSQLDB(c.State.DB) if err != nil { log.Fatal(err) } @@ -133,7 +133,7 @@ func start(cliCtx *cli.Context) error { ctx := context.Background() st := newState(ctx, c, l2ChainID, forkIDIntervals, stateSqlDB, eventLog, needsExecutor, needsStateTree) - ethTxManagerStorage, err := ethtxmanager.NewPostgresStorage(c.StateDB) + ethTxManagerStorage, err := ethtxmanager.NewPostgresStorage(c.State.DB) if err != nil { log.Fatal(err) } @@ -170,7 +170,7 @@ func start(cliCtx *cli.Context) error { log.Fatal(err) } if poolInstance == nil { - poolInstance = createPool(c.Pool, l2ChainID, st, eventLog) + poolInstance = createPool(c.Pool, c.State.Batch.Constraints, l2ChainID, st, eventLog) } seq := createSequencer(*c, poolInstance, ethTxManagerStorage, st, eventLog) go seq.Start(ctx) @@ -182,7 +182,7 @@ func start(cliCtx *cli.Context) error { log.Fatal(err) } if poolInstance == nil { - poolInstance = createPool(c.Pool, l2ChainID, st, eventLog) + poolInstance = createPool(c.Pool, c.State.Batch.Constraints, l2ChainID, st, eventLog) } seqSender := createSequenceSender(*c, poolInstance, ethTxManagerStorage, st, eventLog) go seqSender.Start(ctx) @@ -194,7 +194,7 @@ func start(cliCtx *cli.Context) error { log.Fatal(err) } if poolInstance == nil { - poolInstance = createPool(c.Pool, l2ChainID, st, eventLog) + poolInstance = createPool(c.Pool, c.State.Batch.Constraints, l2ChainID, st, eventLog) } if c.RPC.EnableL2SuggestedGasPricePolling { // Needed for rejecting transactions with too low gas price @@ -213,7 +213,7 @@ func start(cliCtx *cli.Context) error { log.Fatal(err) } if poolInstance == nil { - poolInstance = createPool(c.Pool, l2ChainID, st, eventLog) + poolInstance = createPool(c.Pool, c.State.Batch.Constraints, l2ChainID, st, eventLog) } go runSynchronizer(*c, etherman, etm, st, poolInstance, eventLog) case ETHTXMANAGER: @@ -233,7 +233,7 @@ func start(cliCtx *cli.Context) error { log.Fatal(err) } if poolInstance == nil { - poolInstance = createPool(c.Pool, l2ChainID, st, eventLog) + poolInstance = createPool(c.Pool, c.State.Batch.Constraints, l2ChainID, st, eventLog) } go runL2GasPriceSuggester(c.L2GasPriceSuggester, st, poolInstance, etherman) } @@ -315,7 +315,7 @@ func runSynchronizer(cfg config.Config, etherman *etherman.Client, ethTxManager func runJSONRPCServer(c config.Config, etherman *etherman.Client, chainID uint64, pool *pool.Pool, st *state.State, apis map[string]bool) { var err error storage := jsonrpc.NewStorage() - c.RPC.MaxCumulativeGasUsed = c.Sequencer.MaxCumulativeGasUsed + c.RPC.MaxCumulativeGasUsed = c.State.Batch.Constraints.MaxCumulativeGasUsed if !c.IsTrustedSequencer { if c.RPC.SequencerNodeURI == "" { log.Debug("getting trusted sequencer URL from smc") @@ -383,7 +383,7 @@ func createSequencer(cfg config.Config, pool *pool.Pool, etmStorage *ethtxmanage ethTxManager := ethtxmanager.New(cfg.EthTxManager, etherman, etmStorage, st) - seq, err := sequencer.New(cfg.Sequencer, pool, st, etherman, ethTxManager, eventLog) + seq, err := sequencer.New(cfg.Sequencer, cfg.State.Batch, pool, st, etherman, ethTxManager, eventLog) if err != nil { log.Fatal(err) } @@ -466,7 +466,7 @@ func newState(ctx context.Context, c *config.Config, l2ChainID uint64, forkIDInt } stateCfg := state.Config{ - MaxCumulativeGasUsed: c.Sequencer.MaxCumulativeGasUsed, + MaxCumulativeGasUsed: c.State.Batch.Constraints.MaxCumulativeGasUsed, ChainID: l2ChainID, ForkIDIntervals: forkIDIntervals, MaxResourceExhaustedAttempts: c.Executor.MaxResourceExhaustedAttempts, @@ -479,13 +479,13 @@ func newState(ctx context.Context, c *config.Config, l2ChainID uint64, forkIDInt return st } -func createPool(cfgPool pool.Config, l2ChainID uint64, st *state.State, eventLog *event.EventLog) *pool.Pool { +func createPool(cfgPool pool.Config, constraintsCfg state.BatchConstraintsCfg, l2ChainID uint64, st *state.State, eventLog *event.EventLog) *pool.Pool { runPoolMigrations(cfgPool.DB) poolStorage, err := pgpoolstorage.NewPostgresPoolStorage(cfgPool.DB) if err != nil { log.Fatal(err) } - poolInstance := pool.NewPool(cfgPool, poolStorage, st, l2ChainID, eventLog) + poolInstance := pool.NewPool(cfgPool, constraintsCfg, poolStorage, st, l2ChainID, eventLog) return poolInstance } diff --git a/cmd/snapshot.go b/cmd/snapshot.go index 4605772e12..01d7562654 100644 --- a/cmd/snapshot.go +++ b/cmd/snapshot.go @@ -25,17 +25,17 @@ func snapshot(ctx *cli.Context) error { } setupLog(c.Log) - port, err := strconv.Atoi(c.StateDB.Port) + port, err := strconv.Atoi(c.State.DB.Port) if err != nil { log.Error("error converting port to int. Error: ", err) return err } dump, err := pg.NewDump(&pg.Postgres{ - Host: c.StateDB.Host, + Host: c.State.DB.Host, Port: port, - DB: c.StateDB.Name, - Username: c.StateDB.User, - Password: c.StateDB.Password, + DB: c.State.DB.Name, + Username: c.State.DB.User, + Password: c.State.DB.Password, }) if err != nil { log.Error("error: ", err) diff --git a/config/config.go b/config/config.go index 9660faac75..acfb2186f8 100644 --- a/config/config.go +++ b/config/config.go @@ -18,6 +18,7 @@ import ( "github.com/0xPolygonHermez/zkevm-node/pool" "github.com/0xPolygonHermez/zkevm-node/sequencer" "github.com/0xPolygonHermez/zkevm-node/sequencesender" + "github.com/0xPolygonHermez/zkevm-node/state" "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" "github.com/0xPolygonHermez/zkevm-node/synchronizer" "github.com/mitchellh/mapstructure" @@ -108,14 +109,14 @@ type Config struct { Executor executor.Config // Configuration of the merkle tree client service. Not use in the node, only for testing MTClient merkletree.Config - // Configuration of the state database connection - StateDB db.Config // Configuration of the metrics service, basically is where is going to publish the metrics Metrics metrics.Config // Configuration of the event database connection EventLog event.Config // Configuration of the hash database connection HashDB db.Config + // State service configuration + State state.Config } // Default parses the default configuration values. diff --git a/config/config_test.go b/config/config_test.go index 58f0a8dfb5..46e84d4a42 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -44,14 +44,6 @@ func Test_Defaults(t *testing.T) { path: "Sequencer.WaitPeriodPoolIsEmpty", expectedValue: types.NewDuration(1 * time.Second), }, - { - path: "Sequencer.MaxTxsPerBatch", - expectedValue: uint64(300), - }, - { - path: "Sequencer.MaxBatchBytesSize", - expectedValue: uint64(120000), - }, { path: "Sequencer.BlocksAmountForTxsToBeDeleted", expectedValue: uint64(100), @@ -60,38 +52,6 @@ func Test_Defaults(t *testing.T) { path: "Sequencer.FrequencyToCheckTxsForDelete", expectedValue: types.NewDuration(12 * time.Hour), }, - { - path: "Sequencer.MaxCumulativeGasUsed", - expectedValue: uint64(30000000), - }, - { - path: "Sequencer.MaxKeccakHashes", - expectedValue: uint32(2145), - }, - { - path: "Sequencer.MaxPoseidonHashes", - expectedValue: uint32(252357), - }, - { - path: "Sequencer.MaxPoseidonPaddings", - expectedValue: uint32(135191), - }, - { - path: "Sequencer.MaxMemAligns", - expectedValue: uint32(236585), - }, - { - path: "Sequencer.MaxArithmetics", - expectedValue: uint32(236585), - }, - { - path: "Sequencer.MaxBinaries", - expectedValue: uint32(473170), - }, - { - path: "Sequencer.MaxSteps", - expectedValue: uint32(7570538), - }, { path: "Sequencer.TxLifetimeCheckTimeout", expectedValue: types.NewDuration(10 * time.Minute), @@ -245,31 +205,31 @@ func Test_Defaults(t *testing.T) { expectedValue: "zkevm-prover:50061", }, { - path: "StateDB.User", + path: "State.DB.User", expectedValue: "state_user", }, { - path: "StateDB.Password", + path: "State.DB.Password", expectedValue: "state_password", }, { - path: "StateDB.Name", + path: "State.DB.Name", expectedValue: "state_db", }, { - path: "StateDB.Host", + path: "State.DB.Host", expectedValue: "zkevm-state-db", }, { - path: "StateDB.Port", + path: "State.DB.Port", expectedValue: "5432", }, { - path: "StateDB.EnableLog", + path: "State.DB.EnableLog", expectedValue: false, }, { - path: "StateDB.MaxConns", + path: "State.DB.MaxConns", expectedValue: 200, }, { @@ -437,6 +397,83 @@ func Test_Defaults(t *testing.T) { path: "Aggregator.GeneratingProofCleanupThreshold", expectedValue: "10m", }, + + { + path: "State.Batch.Constraints.MaxTxsPerBatch", + expectedValue: uint64(300), + }, + { + path: "State.Batch.Constraints.MaxBatchBytesSize", + expectedValue: uint64(120000), + }, + { + path: "State.Batch.Constraints.MaxCumulativeGasUsed", + expectedValue: uint64(30000000), + }, + { + path: "State.Batch.Constraints.MaxKeccakHashes", + expectedValue: uint32(2145), + }, + { + path: "State.Batch.Constraints.MaxPoseidonHashes", + expectedValue: uint32(252357), + }, + { + path: "State.Batch.Constraints.MaxPoseidonPaddings", + expectedValue: uint32(135191), + }, + { + path: "State.Batch.Constraints.MaxMemAligns", + expectedValue: uint32(236585), + }, + { + path: "State.Batch.Constraints.MaxArithmetics", + expectedValue: uint32(236585), + }, + { + path: "State.Batch.Constraints.MaxBinaries", + expectedValue: uint32(473170), + }, + { + path: "State.Batch.Constraints.MaxSteps", + expectedValue: uint32(7570538), + }, + { + path: "State.Batch.ResourceWeights.WeightBatchBytesSize", + expectedValue: 1, + }, + { + path: "State.Batch.ResourceWeights.WeightCumulativeGasUsed", + expectedValue: 1, + }, + { + path: "State.Batch.ResourceWeights.WeightKeccakHashes", + expectedValue: 1, + }, + { + path: "State.Batch.ResourceWeights.WeightPoseidonHashes", + expectedValue: 1, + }, + { + path: "State.Batch.ResourceWeights.WeightPoseidonPaddings", + expectedValue: 1, + }, + { + path: "State.Batch.ResourceWeights.WeightMemAligns", + expectedValue: 1, + }, + { + path: "State.Batch.ResourceWeights.WeightArithmetics", + expectedValue: 1, + }, + { + path: "State.Batch.ResourceWeights.WeightBinaries", + expectedValue: 1, + }, + { + path: "State.Batch.ResourceWeights.WeightSteps", + expectedValue: 1, + }, } file, err := os.CreateTemp("", "genesisConfig") require.NoError(t, err) diff --git a/config/default.go b/config/default.go index d4a23b00d1..b20c379a80 100644 --- a/config/default.go +++ b/config/default.go @@ -11,14 +11,38 @@ Environment = "development" # "production" or "development" Level = "info" Outputs = ["stderr"] -[StateDB] -User = "state_user" -Password = "state_password" -Name = "state_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 +[State] +AccountQueue = 64 + [State.DB] + User = "state_user" + Password = "state_password" + Name = "state_db" + Host = "zkevm-state-db" + Port = "5432" + EnableLog = false + MaxConns = 200 + [State.Batch] + [State.Batch.Constraints] + MaxTxsPerBatch = 300 + MaxBatchBytesSize = 120000 + MaxCumulativeGasUsed = 30000000 + MaxKeccakHashes = 2145 + MaxPoseidonHashes = 252357 + MaxPoseidonPaddings = 135191 + MaxMemAligns = 236585 + MaxArithmetics = 236585 + MaxBinaries = 473170 + MaxSteps = 7570538 + [State.Batch.ResourceWeights] + WeightBatchBytesSize = 1 + WeightCumulativeGasUsed = 1 + WeightKeccakHashes = 1 + WeightPoseidonHashes = 1 + WeightPoseidonPaddings = 1 + WeightMemAligns = 1 + WeightArithmetics = 1 + WeightBinaries = 1 + WeightSteps = 1 [Pool] IntervalToRefreshBlockedAddresses = "5m" @@ -75,16 +99,6 @@ TrustedSequencerURL = "" # If it is empty or not specified, then the value is re WaitPeriodPoolIsEmpty = "1s" BlocksAmountForTxsToBeDeleted = 100 FrequencyToCheckTxsForDelete = "12h" -MaxTxsPerBatch = 300 -MaxBatchBytesSize = 120000 -MaxCumulativeGasUsed = 30000000 -MaxKeccakHashes = 2145 -MaxPoseidonHashes = 252357 -MaxPoseidonPaddings = 135191 -MaxMemAligns = 236585 -MaxArithmetics = 236585 -MaxBinaries = 473170 -MaxSteps = 7570538 TxLifetimeCheckTimeout = "10m" MaxTxLifetime = "3h" [Sequencer.Finalizer] diff --git a/config/environments/local/local.node.config.toml b/config/environments/local/local.node.config.toml index 3e0112cab5..34e3b12f60 100644 --- a/config/environments/local/local.node.config.toml +++ b/config/environments/local/local.node.config.toml @@ -6,15 +6,6 @@ Environment = "development" # "production" or "development" Level = "debug" Outputs = ["stderr"] -[StateDB] -User = "state_user" -Password = "state_password" -Name = "state_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 - [Pool] IntervalToRefreshBlockedAddresses = "5m" IntervalToRefreshGasPrices = "5s" @@ -59,16 +50,6 @@ TrustedSequencerURL = "" # If it is empty or not specified, then the value is re WaitPeriodPoolIsEmpty = "1s" BlocksAmountForTxsToBeDeleted = 100 FrequencyToCheckTxsForDelete = "12h" -MaxTxsPerBatch = 300 -MaxBatchBytesSize = 120000 -MaxCumulativeGasUsed = 30000000 -MaxKeccakHashes = 2145 -MaxPoseidonHashes = 252357 -MaxPoseidonPaddings = 135191 -MaxMemAligns = 236585 -MaxArithmetics = 236585 -MaxBinaries = 473170 -MaxSteps = 7570538 TxLifetimeCheckTimeout = "10m" MaxTxLifetime = "3h" [Sequencer.Finalizer] diff --git a/config/environments/mainnet/example.env b/config/environments/mainnet/example.env index 95557a442c..05b13e5e79 100644 --- a/config/environments/mainnet/example.env +++ b/config/environments/mainnet/example.env @@ -2,7 +2,7 @@ ZKEVM_NETWORK = "mainnet" # URL of a JSON RPC for Ethereum mainnet ZKEVM_NODE_ETHERMAN_URL = "http://your.L1node.url" # PATH WHERE THE STATEDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_STATEDB_DATA_DIR = "/path/to/persistent/data/statedb" +ZKEVM_NODE_STATE_DB_DATA_DIR = "/path/to/persistent/data/statedb" # PATH WHERE THE POOLDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA ZKEVM_NODE_POOLDB_DATA_DIR = "/path/to/persistent/data/pooldb" # OPTIONAL, UNCOMENT IF YOU WANT TO DO ADVANCED CONFIG diff --git a/config/environments/mainnet/node.config.toml b/config/environments/mainnet/node.config.toml index 145a433ecb..ab12e064ac 100644 --- a/config/environments/mainnet/node.config.toml +++ b/config/environments/mainnet/node.config.toml @@ -3,15 +3,6 @@ Environment = "development" # "production" or "development" Level = "info" Outputs = ["stderr"] -[StateDB] -User = "state_user" -Password = "state_password" -Name = "state_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 - [Pool] MaxTxBytesSize=100132 MaxTxDataBytesSize=100000 diff --git a/config/environments/testnet/example.env b/config/environments/testnet/example.env index bf0db2e035..fe13decc82 100644 --- a/config/environments/testnet/example.env +++ b/config/environments/testnet/example.env @@ -2,7 +2,7 @@ ZKEVM_NETWORK = "testnet" # URL of a JSON RPC for Goerli ZKEVM_NODE_ETHERMAN_URL = "http://your.L1node.url" # PATH WHERE THE STATEDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_STATEDB_DATA_DIR = "/path/to/persistent/data/statedb" +ZKEVM_NODE_STATE_DB_DATA_DIR = "/path/to/persistent/data/statedb" # PATH WHERE THE POOLDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA ZKEVM_NODE_POOLDB_DATA_DIR = "/path/to/persistent/data/pooldb" # OPTIONAL, UNCOMENT IF YOU WANT TO DO ADVANCED CONFIG diff --git a/config/environments/testnet/node.config.toml b/config/environments/testnet/node.config.toml index 4566baa5f6..25c2028b4a 100644 --- a/config/environments/testnet/node.config.toml +++ b/config/environments/testnet/node.config.toml @@ -3,15 +3,6 @@ Environment = "development" # "production" or "development" Level = "info" Outputs = ["stderr"] -[StateDB] -User = "state_user" -Password = "state_password" -Name = "state_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 - [Pool] IntervalToRefreshBlockedAddresses = "5m" IntervalToRefreshGasPrices = "5s" diff --git a/docker-compose.yml b/docker-compose.yml index d3e6d17ffe..6b0693d65a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,7 +69,7 @@ services: - 5432:5432 volumes: - ./db/scripts/init_prover_db.sql:/docker-entrypoint-initdb.d/init.sql - - ${ZKEVM_NODE_STATEDB_DATA_DIR}:/var/lib/postgresql/data + - ${ZKEVM_NODE_STATE_DB_DATA_DIR}:/var/lib/postgresql/data - ${ZKEVM_ADVANCED_CONFIG_DIR:-./config/environments/testnet}/postgresql.conf:/etc/postgresql.conf environment: - POSTGRES_USER=state_user diff --git a/docs/components/aggregator.md b/docs/components/aggregator.md index a1c314a22e..35b4031c49 100644 --- a/docs/components/aggregator.md +++ b/docs/components/aggregator.md @@ -38,7 +38,7 @@ The container alone needs some parameters configured, access to certain configur - `your genesis.json file`: /app/genesis.json - environment: Env variables that supersede the config file - - `ZKEVM_NODE_STATEDB_HOST`: Name of StateDB Database Host + - `ZKEVM_NODE_STATE_DB_HOST`: Name of StateDB Database Host ### The Account Keystore file: diff --git a/docs/components/rpc.md b/docs/components/rpc.md index 3725ed0436..60e2f2aac7 100644 --- a/docs/components/rpc.md +++ b/docs/components/rpc.md @@ -37,7 +37,7 @@ The container alone needs some parameters configured, access to certain configur - `8545:8545`: RPC Port - `9091:9091`: Needed if Prometheus metrics are enabled - environment: Env variables that supersede the config file - - `ZKEVM_NODE_STATEDB_HOST`: Name of StateDB Database Host + - `ZKEVM_NODE_STATE_DB_HOST`: Name of StateDB Database Host - `ZKEVM_NODE_POOL_HOST`: Name of PoolDB Database Host - `ZKEVM_NODE_RPC_DB_HOST`: Name of RPCDB Database Host - volumes: diff --git a/docs/components/sequencer.md b/docs/components/sequencer.md index 3490494de7..4a434a591c 100644 --- a/docs/components/sequencer.md +++ b/docs/components/sequencer.md @@ -28,7 +28,7 @@ The container alone needs some parameters configured, access to certain configur - environment: Env variables that supersede the config file - `ZKEVM_NODE_POOLDB_HOST`: Name of PoolDB Database Host - - `ZKEVM_NODE_STATEDB_HOST`: Name of StateDB Database Host + - `ZKEVM_NODE_STATE_DB_HOST`: Name of StateDB Database Host - volumes: - `your Account Keystore file`: /pk/keystore (note, this `/pk/keystore` value is the default path that's written in the Public Configuration files on this repo, meant to expedite deployments, it can be superseded via an env flag `ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH`.) - `your config.toml file`: /app/config.toml diff --git a/docs/components/synchronizer.md b/docs/components/synchronizer.md index 0e79e52a37..1f289c208b 100644 --- a/docs/components/synchronizer.md +++ b/docs/components/synchronizer.md @@ -31,7 +31,7 @@ To orchestrate multiple deployments of the different ZKEVM Node components, a `d The container alone needs some parameters configured, access to certain configuration files and the appropriate ports exposed. - environment: Env variables that supersede the config file - - `ZKEVM_NODE_STATEDB_HOST`: Name of StateDB Database Host + - `ZKEVM_NODE_STATE_DB_HOST`: Name of StateDB Database Host - volumes: - `your config.toml file`: /app/config.toml - `your genesis.json file`: /app/genesis.json diff --git a/docs/config-file/node-config-doc.html b/docs/config-file/node-config-doc.html index 2d45fdecc2..3bad482c56 100644 --- a/docs/config-file/node-config-doc.html +++ b/docs/config-file/node-config-doc.html @@ -20,7 +20,7 @@
"300ms"
BlocksAmountForTxsToBeDeleted is blocks amount after which txs will be deleted from the pool
FrequencyToCheckTxsForDelete is frequency with which txs will be checked for deleting
"1m"
"300ms"
-
MaxTxsPerBatch is the maximum amount of transactions in the batch
MaxBatchBytesSize is the maximum batch size in bytes
(subtracted bits of all types.Sequence fields excluding BatchL2Data from MaxTxSizeForL1)
MaxCumulativeGasUsed is max gas amount used by batch
MaxKeccakHashes is max keccak hashes used by batch
MaxPoseidonHashes is max poseidon hashes batch can handle
MaxPoseidonPaddings is max poseidon paddings batch can handle
MaxMemAligns is max mem aligns batch can handle
MaxArithmetics is max arithmetics batch can handle
MaxBinaries is max binaries batch can handle
MaxSteps is max steps batch can handle
TxLifetimeCheckTimeout is the time the sequencer waits to check txs lifetime
"1m"
+
TxLifetimeCheckTimeout is the time the sequencer waits to check txs lifetime
"1m"
"300ms"
MaxTxLifetime is the time a tx can be in the sequencer memory
"1m"
"300ms"
@@ -64,4 +64,6 @@
"300ms"
MaxResourceExhaustedAttempts is the max number of attempts to make a transaction succeed because of resource exhaustion
WaitOnResourceExhaustion is the time to wait before retrying a transaction because of resource exhaustion
"1m"
"300ms"
-
URI is the server URI.
Database name
Database User name
Database Password of the user
Host address of database
Port Number of database
EnableLog
MaxConns is the maximum number of connections in the pool.
Host is the address to bind the metrics server
Port is the port to bind the metrics server
Enabled is the flag to enable/disable the metrics server
ProfilingHost is the address to bind the profiling server
ProfilingPort is the port to bind the profiling server
ProfilingEnabled is the flag to enable/disable the profiling server
Database name
Database User name
Database Password of the user
Host address of database
Port Number of database
EnableLog
MaxConns is the maximum number of connections in the pool.
Database name
Database User name
Database Password of the user
Host address of database
Port Number of database
EnableLog
MaxConns is the maximum number of connections in the pool.