forked from 0xPolygonHermez/zkevm-node
-
Notifications
You must be signed in to change notification settings - Fork 217
/
config.go
41 lines (39 loc) · 1.91 KB
/
config.go
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
package sequencesender
import (
"github.com/0xPolygonHermez/zkevm-node/config/types"
"github.com/ethereum/go-ethereum/common"
)
// Config represents the configuration of a sequence sender
type Config struct {
// WaitPeriodSendSequence is the time the sequencer waits until
// trying to send a sequence to L1
WaitPeriodSendSequence types.Duration `mapstructure:"WaitPeriodSendSequence"`
// LastBatchVirtualizationTimeMaxWaitPeriod is time since sequences should be sent
LastBatchVirtualizationTimeMaxWaitPeriod types.Duration `mapstructure:"LastBatchVirtualizationTimeMaxWaitPeriod"`
// 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.
MaxTxSizeForL1 uint64 `mapstructure:"MaxTxSizeForL1"`
// SenderAddress defines which private key the eth tx manager needs to use
// to sign the L1 txs
SenderAddress common.Address
// L2Coinbase defines which address is going to receive the fees
L2Coinbase common.Address `mapstructure:"L2Coinbase"`
// 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
PrivateKey types.KeystoreFileConfig `mapstructure:"PrivateKey"`
// Batch number where there is a forkid change (fork upgrade)
ForkUpgradeBatchNumber uint64
// GasOffset is the amount of gas to be added to the gas estimation in order
// to provide an amount that is higher than the estimated one. This is used
// to avoid the TX getting reverted in case something has changed in the network
// state after the estimation which can cause the TX to require more gas to be
// executed.
//
// ex:
// gas estimation: 1000
// gas offset: 100
// final gas: 1100
GasOffset uint64 `mapstructure:"GasOffset"`
}