hermez-node/common/pohstate.go
common/pohstate.goRaw
1package common
2
3import (
4 "math/big"
5
6 eth "github.com/ethereum/go-ethereum/common"
7)
8
9// PoHState give information about the forging mechanism of the Hermez network, and the synchronization status between the operator and the smart contract
10// WARNING: this is strongly based on the previous implementation, once the new spec is done, this may change a lot.
11type PoHState struct {
12 IsSynched bool // true if the operator is fully synched with the ¿PoH? smart contract
13 SyncProgress float32 // percentage of synced progress with the ¿PoH? smart contract
14 CurrentSlot SlotNum // slot in which batches are being forged at the current time
15 ContractAddr eth.Address // Etherum address of the ¿PoH? smart contract
16 BlocksPerSlot uint16 // Slot duration measured in Etherum blocks
17 SlotDeadline uint16 // Time of the slot in which another operator can forge if the operator winner has not forge any block before
18 GenesisBlock uint64 // uint64 is a guess, Etherum block in which the ¿PoH? contract was deployed
19 MinBid *big.Int // Minimum amount that an operator has to bid to participate in a slot auction
20}