You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
1.1 KiB

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