This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathcfg.builder.toml
216 lines (195 loc) · 10.5 KB
/
cfg.builder.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#[Log]
### Levels: info, debug, warn, error, fatal
#Level = "info"
### Out where logs are going to be stored or showed: ["stdout", "filepath.log"]
#Out = ["stdout"]
#[API]
### Url and port where the API will listen
#Address = "0.0.0.0:8086"
### Enables the Explorer API endpoints
#Explorer = true
### Interval between updates of the API metrics
#UpdateMetricsInterval = "10s"
### Interval between updates of the recommended fees
#UpdateRecommendedFeeInterval = "15s"
### Maximum concurrent connections allowed between API and SQL
#MaxSQLConnections = 100
### Maximum amount of time that an API request can wait to establish a SQL connection
#SQLConnectionTimeout = "2s"
#[Debug]
### If it is set, the debug api will listen in this address and port
#APIAddress = "0.0.0.0:12345"
### Enables meddler debug mode, where unused columns and struct fields will be logged
#MeddlerLogs = true
### Sets the web framework Gin-Gonic to run in debug mode
#GinDebugMode = false
#[StateDB]
### Path where the synchronizer StateDB is stored
#Path = "/var/hermez/statedb"
### Number of checkpoints to keep
#Keep = 256
[PostgreSQL]
## Port of the PostgreSQL write server
PortWrite = 5432
## Host of the PostgreSQL write server
HostWrite = "localhost"
## User of the PostgreSQL write server
UserWrite = "hermez"
## Password of the PostgreSQL write server
PasswordWrite = "yourpasswordhere"
## Name of the PostgreSQL write server database
NameWrite = "hermez"
## Port of the PostgreSQL read server. If it is not set, the hermez node will use the postgresql write server configuration
# PortRead = 5432
## Host of the PostgreSQL read server. If it is not set, the hermez node will use the postgresql write server configuration
# HostRead = "localhost"
## User of the PostgreSQL read server. If it is not set, the hermez node will use the postgresql write server configuration
# UserRead = "hermez"
## Password of the PostgreSQL read server. If it is not set, the hermez node will use the postgresql write server configuration
# PasswordRead = "yourpasswordhere"
## Name of the PostgreSQL read server database. If it is not set, the hermez node will use the postgresql write server configuration
# NameRead = "hermez"
[Web3]
## Url of the web3 ethereum-node RPC server. Only geth is officially supported
URL = "http://localhost:8545"
#[Synchronizer]
### Interval between attempts to synchronize a new block from an ethereum node
#SyncLoopInterval = "1s"
### Threshold of a number of Ethereum blocks left to synchronize, such that if there are more blocks to sync than the defined value synchronizer can aggressively skip calling UpdateEth to save network bandwidth and time. After reaching the threshold UpdateEth is called on each block. This value only affects the reported % of synchronization of blocks and batches, nothing else.
#StatsUpdateBlockNumDiffThreshold = 100
### While having more blocks to sync than updateEthBlockNumThreshold, UpdateEth will be called once in a defined number of blocks. This value only affects the reported % of synchronization of blocks and batches, nothing else
#StatsUpdateFrequencyDivider = 100
[SmartContracts]
## Smart contract address of the rollup Hermez.sol
Rollup = "0xA68D85dF56E733A06443306A095646317B5Fa633"
[Coordinator]
## Ethereum address that the coordinator is using to forge batches
ForgerAddress = "0x05c23b938a85ab26A36E6314a0D02080E9ca6BeD"
### Minimum balance the forger address needs to start the coordinator in wei. If It is set to 0, the coordinator will not check the balance
#MinimumForgeAddressBalance = "0"
### Number of confirmation blocks to be sure that the tx has been mined correctly
#ConfirmBlocks = 5
### Portion of the range before the L1Batch timeout that will trigger a schedule to forge an L1Batch
#L1BatchTimeoutPerc = 0.00001
### Number of delay blocks to wait before starting the pipeline when a slot in which the coordinator can forge is reached
#StartSlotBlocksDelay = 0
### Number of blocks ahead used to decide when to stop scheduling new batches
#ScheduleBatchBlocksAheadCheck = 0
### Number of marging blocks used to decide when to stop sending batches to the smart contract
#SendBatchBlocksMarginCheck = 0
### Interval between calls to the ProofServer to check the status
#ProofServerPollInterval = "1s"
### Interval between forge retries after an error
#ForgeRetryInterval = "10s"
### Interval between calls to the main handler of a synced block after an error
#SyncRetryInterval = "1s"
#Delay after which a batch is forged if the slot is already committed. If It is set to "0s", the coordinator will continuously forge at the maximum rate
#ForgeDelay = "600s"
### Delay after a forged batch if there are no txs to forge. If It is set to 0s, the coordinator will continuously forge even if the batches are empty
#ForgeNoTxsDelay = "86400s"
### Interval between calls to the PurgeByExternalDelete function of the l2db which deletes pending txs externally marked by the column `external_delete`
#PurgeByExtDelInterval = "1m"
### Enables the coordinator to forge in slots if the empty slots reach the slot deadline
#MustForgeAtSlotDeadline = true
### It will make the coordinator forge at most one batch per slot, only if there are included txs in that batch, or pending l1UserTxs in the smart contract. Setting this parameter overrides `ForgeDelay`, `ForgeNoTxsDelay`, `MustForgeAtSlotDeadline` and `IgnoreSlotCommitment`.
#IgnoreSlotCommitment = true
### This parameter will make the coordinator forge at most one batch per slot, only if there are included txs in that batch, or pending l1UserTxs in the smart contract. Setting this parameter overrides `ForgeDelay`, `ForgeNoTxsDelay`, `MustForgeAtSlotDeadline` and `IgnoreSlotCommitment`.
#ForgeOncePerSlotIfTxs = false
[Coordinator.FeeAccount]
## Ethereum address of the account that will receive the fees
Address = "0x56232B1c5B10038125Bc7345664B4AFD745bcF8E"
## BJJ is the baby jub jub public key of the account that will receive the fees
BJJ = "0x130c5c7f294792559f469220274f3d3b2dca6e89f4c5ec88d3a08bf73262171b"
#[Coordinator.L2DB]
### Number of batches after which non-pending L2Txs are deleted from the pool
#SafetyPeriod = 10
### Maximum number of pending L2Txs that can be stored in the pool
#MaxTxs = 1000000
### Minimum fee in USD that a tx must pay in order to be accepted into the pool
#MinFeeUSD = 0.10
### Maximum fee in USD that a tx must pay in order to be accepted into the pool
#MaxFeeUSD = 10.00
### Time To Live for L2Txs in the pool. L2Txs older than TTL will be deleted.
#TTL = "24h"
### Delay between batches to purge outdated transactions. Outdated L2Txs are those that have been forged or marked as invalid for longer than the SafetyPeriod and pending L2Txs that have been in the pool for longer than TTL once there are MaxTxs
#PurgeBatchDelay = 10
### Delay between batches to mark invalid transactions due to nonce lower than the account nonce
#InvalidateBatchDelay = 20
### Delay between blocks to purge outdated transactions. Outdated L2Txs are those that have been forged or marked as invalid for longer than the SafetyPeriod and pending L2Txs that have been in the pool for longer than TTL once there are MaxTxs.
#PurgeBlockDelay = 10
### Delay between blocks to mark invalid transactions due to nonce lower than the account nonce
#InvalidateBlockDelay = 20
#[Coordinator.TxSelector]
### Path where the TxSelector StateDB is stored
#Path = "/var/hermez/txselector"
#[Coordinator.BatchBuilder]
### Path where the BatchBuilder StateDB is stored
#Path = "/var/hermez/batchbuilder"
[Coordinator.ServerProofs]
## Server proof API URLs
URLs = ["http://localhost:3000"]
[Coordinator.Circuit]
## Maximum number of txs supported by the circuit
MaxTx = 2048
## Maximum number of merkle tree levels supported by the circuit
NLevels = 32
#[Coordinator.EthClient]
### Interval between receipt checks of ethereum transactions in the TxManager
#CheckLoopInterval = "500ms"
### Number of attempts to do an eth client RPC call before giving up
#Attempts = 4
### Delay between attempts do do an eth client RPC call
#AttemptsDelay = "500ms"
### Timeout after which a non-mined ethereum transaction will be resent (reusing the nonce) with a newly calculated gas price
#TxResendTimeout = "2m"
### Disables reusing nonces of pending transactions for new replacement transactions
#NoReuseNonce = false
### Maximum gas price allowed for ethereum transactions in gwei
#MaxGasPrice = 500
### Minimum gas price allowed for ethereum transactions in gwei
#MinGasPrice = 5
### Percentage increased of gas price set in an ethereum transaction from the suggested gas price by the ethereum node
#GasPriceIncPerc = 5
[Coordinator.EthClient.Keystore]
### Path where the keystore is stored
#Path = "/var/hermez/ethkeystore"
## Password used to decrypt the keys in the keystore
Password = "yourpasswordhere"
#[Coordinator.EthClient.ForgeBatchGasCost]
### Gas needed to forge an empty batch
#Fixed = 900000
### Gas needed per L1 tx
#L1UserTx = 15000
### Gas needed for a coordinator L1 tx
#L1CoordTx = 7000
### Gas needed for an L2 tx
#L2Tx = 600
#[Coordinator.API]
### Enables coordinator API endpoints
#Coordinator = true
#[Coordinator.Debug]
### If this parameter is set, specifies the path where batchInfo is stored in JSON in every step/update of the pipeline
#BatchPath = "/var/hermez/batchesdebug"
### If lightScrypt is set, uses light parameters for the ethereum keystore encryption algorithm
#LightScrypt = false
### RollupVerifierIndex is the index of the verifier to use in the Rollup smart contract. The verifier chosen by index must match with the Circuit parameters
#RollupVerifierIndex = 0
#[Coordinator.Etherscan]
### If this parameter is set, specifies the etherscan endpoint to get the gas estimations for that momment
#URL = "https://api.etherscan.io"
### APIKey parameter allows access to etherscan services
#APIKey = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
#[RecommendedFeePolicy]
### Strategy used to calculate the recommended fee that the API will expose.
### Available options:
### - Static: always return the same value (StaticValue) in USD
### - AvgLastHour: calculate using the average fee of the forged transactions during the last hour
### - DynamicFee: calculated taking in account the gas used in L1, the gasPrice and the ether price in the last batches.
### Selects the mode. "Static", "AvgLastHour" or "DynamicFee"
#PolicyType = "Static"
### If PolicyType is "static" defines the recommended fee value
#StaticValue = 0.10
### If PolicyType is "DynamicFee" defines the break threshold parameter
#BreakThreshold = 50
### If PolicyType is "DynamicFee" defines the number of batches to calculate the average cost
#NumLastBatchAvg = 10