Documentation ¶
Index ¶
- Constants
- Variables
- func GetCanonicalHeight(native *native.NativeService, chainID uint64) (height uint64, err error)
- func ParseValidators(validatorsBytes []byte) ([]ecommon.Address, error)
- func SealHash(header *eth.Header, chainID *big.Int) (hash ecommon.Hash)
- func VerifyGaslimit(parentGasLimit, headerGasLimit uint64) error
- type Context
- type ExtraInfo
- type GenesisHeader
- type Handler
- type HeaderWithChainID
- type HeaderWithDifficultySum
- type HeightAndValidators
Constants ¶
View Source
const (
GasLimitMax = uint64(0x7fffffffffffffff) // GasLimit maximum ( GasLimit <= 2^63-1)
)
Variables ¶
View Source
var TestFlagNoCheckPixieHeaderSig bool
TestFlagNoCheckPixieHeaderSig only for testing purpose to check if Pixie Chain can be normal back after fork happens
Functions ¶
func GetCanonicalHeight ¶
func GetCanonicalHeight(native *native.NativeService, chainID uint64) (height uint64, err error)
GetCanonicalHeight ...
func ParseValidators ¶
ParseValidators ...
func VerifyGaslimit ¶
VerifyGaslimit verifies the header gas limit according increase/decrease in relation to the parent gas limit.
Types ¶
type ExtraInfo ¶
type ExtraInfo struct { ChainID *big.Int // chainId of pixie chain. mainnet: 6626, testnet: 666 Period uint64 }
ExtraInfo ...
type GenesisHeader ¶
type GenesisHeader struct { Header eth.Header PrevValidators []HeightAndValidators }
GenesisHeader ...
type Handler ¶
type Handler struct { }
Handler ...
func (*Handler) SyncBlockHeader ¶
func (h *Handler) SyncBlockHeader(native *native.NativeService) error
SyncBlockHeader ... Will verify header coming from congress consensus
func (*Handler) SyncCrossChainMsg ¶
func (h *Handler) SyncCrossChainMsg(native *native.NativeService) error
SyncCrossChainMsg ...
func (*Handler) SyncGenesisHeader ¶
func (h *Handler) SyncGenesisHeader(native *native.NativeService) (err error)
type HeaderWithChainID ¶
type HeaderWithChainID struct { Header *HeaderWithDifficultySum ChainID uint64 }
HeaderWithChainID ...
type HeaderWithDifficultySum ¶
type HeaderWithDifficultySum struct { Header *eth.Header `json:"header"` DifficultySum *big.Int `json:"difficultySum"` EpochParentHash *ecommon.Hash `json:"epochParentHash"` }
HeaderWithDifficultySum ...
func GetCanonicalHeader ¶
func GetCanonicalHeader(native *native.NativeService, chainID uint64, height uint64) (headerWithSum *HeaderWithDifficultySum, err error)
GetCanonicalHeader ...
Click to show internal directories.
Click to hide internal directories.