Skip to content

Commit

Permalink
add cardona testnet (#2909)
Browse files Browse the repository at this point in the history
  • Loading branch information
tclemos authored and joanestebanr committed Jan 26, 2024
1 parent 8f79b21 commit e9a240b
Show file tree
Hide file tree
Showing 12 changed files with 1,154 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var (
networkFlag = cli.StringFlag{
Name: config.FlagNetwork,
Aliases: []string{"net"},
Usage: "Load default network configuration. Supported values: [`mainnet`, `testnet`, `custom`]",
Usage: "Load default network configuration. Supported values: [`mainnet`, `testnet`, `cardona`, `custom`]",
Required: true,
}
customNetworkFlag = cli.StringFlag{
Expand Down
107 changes: 107 additions & 0 deletions config/cardonagenesis.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
FlagYes = "yes"
// FlagCfg is the flag for cfg.
FlagCfg = "cfg"
// FlagNetwork is the flag for the network name. Valid values: ["testnet", "mainnet", "custom"].
// FlagNetwork is the flag for the network name. Valid values: ["testnet", "mainnet", "cardona", "custom"].
FlagNetwork = "network"
// FlagCustomNetwork is the flag for the custom network file. This is required if --network=custom
FlagCustomNetwork = "custom-network-file"
Expand Down
9 changes: 9 additions & 0 deletions config/environments/cardona/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ZKEVM_NETWORK = "cardona"
# 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"
# 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
# ZKEVM_ADVANCED_CONFIG_DIR = "/should/be/same/path/as/ZKEVM_CONFIG_DIR"
93 changes: 93 additions & 0 deletions config/environments/cardona/node.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[Log]
Environment = "development" # "production" or "development"
Level = "info"
Outputs = ["stderr"]

[State]
[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

[Pool]
IntervalToRefreshBlockedAddresses = "5m"
IntervalToRefreshGasPrices = "5s"
MaxTxBytesSize=100132
MaxTxDataBytesSize=100000
DefaultMinGasPriceAllowed = 1000000000
MinAllowedGasPriceInterval = "5m"
PollMinAllowedGasPriceInterval = "15s"
AccountQueue = 64
GlobalQueue = 1024
[Pool.DB]
User = "pool_user"
Password = "pool_password"
Name = "pool_db"
Host = "zkevm-pool-db"
Port = "5432"
EnableLog = false
MaxConns = 200

[Etherman]
URL = "http://your.L1node.url"
ForkIDChunkSize = 20000
MultiGasProvider = false
[Etherman.Etherscan]
ApiKey = ""

[RPC]
Host = "0.0.0.0"
Port = 8545
ReadTimeout = "60s"
WriteTimeout = "60s"
MaxRequestsPerIPAndSecond = 5000
EnableL2SuggestedGasPricePolling = false
[RPC.WebSockets]
Enabled = true
Port = 8546

[Synchronizer]
SyncInterval = "2s"
SyncChunkSize = 100

[MTClient]
URI = "zkevm-prover:50061"

[Executor]
URI = "zkevm-prover:50071"
MaxResourceExhaustedAttempts = 3
WaitOnResourceExhaustion = "1s"
MaxGRPCMessageSize = 100000000

[Metrics]
Host = "0.0.0.0"
Port = 9091
Enabled = false
ProfilingHost = "0.0.0.0"
ProfilingPort = 6060
ProfilingEnabled = false

[HashDB]
User = "prover_user"
Password = "prover_pass"
Name = "prover_db"
Host = "zkevm-state-db"
Port = "5432"
EnableLog = false
MaxConns = 200
Loading

0 comments on commit e9a240b

Please sign in to comment.