pixiechain

package
v1.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2022 License: LGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

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

func ParseValidators(validatorsBytes []byte) ([]ecommon.Address, error)

ParseValidators ...

func SealHash

func SealHash(header *eth.Header, chainID *big.Int) (hash ecommon.Hash)

SealHash returns the hash of a block prior to it being sealed.

func VerifyGaslimit

func VerifyGaslimit(parentGasLimit, headerGasLimit uint64) error

VerifyGaslimit verifies the header gas limit according increase/decrease in relation to the parent gas limit.

Types

type Context

type Context struct {
	ExtraInfo ExtraInfo
	ChainID   uint64
}

Context ...

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 NewPixieHandler

func NewPixieHandler() *Handler

NewPixieHandler ...

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 ...

type HeightAndValidators

type HeightAndValidators struct {
	Height     *big.Int
	Validators []ecommon.Address
	Hash       *ecommon.Hash
}

HeightAndValidators ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL