arnaucube
arnaucube/hermez-nodePublic Self-hosted repository
hermez-node/common/rollupstate.go
common/rollupstate.goRaw
 1package common
 2
 3import (
 4	"math/big"
 5
 6	eth "github.com/ethereum/go-ethereum/common"
 7)
 8
 9// RollupState give information about the rollup, and the synchronization status between the coordinator and the smart contract
10type RollupState struct {
11	IsSynched        bool        // true if the coordinator is fully synched with the rollup smart contract
12	SyncProgress     float32     // percentage of synced progress with the rollup smart contract
13	LastBlockSynched uint64      // last Etherum block synchronized by the coordinator
14	LastBatchSynched BatchNum    // last batch synchronized by the coordinator
15	FeeDeposit       *big.Int    // amount of eth (in wei) that has to be payed to do a deposit
16	FeeL1Tx          *big.Int    // amount of eth (in wei) that has to be payed to do a L1 tx
17	ContractAddr     eth.Address // Etherum address of the rollup smart contract
18	MaxTx            uint16      // Max amount of txs that can be added in a batch, either L1 or L2
19	MaxL1Tx          uint16      // Max amount of L1 txs that can be added in a batch
20	NLevels          uint16      // Heigth of the SMT. This will determine the maximum number of accounts that can coexist in the Hermez network by 2^nLevels
21}