span

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BorDevnetChainVals = []*valset.Validator{
	{
		ID:               1,
		Address:          common.HexToAddress("0x67b1d87101671b127f5f8714789C7192f7ad340e"),
		VotingPower:      1000,
		ProposerPriority: 1,
	},
}

Validator set for bor devnet-chain with 1 validator configuration

View Source
var BorE2ETestChain2Valset = []*valset.Validator{
	{
		ID:               1,
		Address:          common.HexToAddress("71562b71999873DB5b286dF957af199Ec94617F7"),
		VotingPower:      1000,
		ProposerPriority: 1,
	},
	{
		ID:               2,
		Address:          common.HexToAddress("9fB29AAc15b9A4B7F17c3385939b007540f4d791"),
		VotingPower:      1000,
		ProposerPriority: 2,
	},
}

Validator set for bor e2e test chain with 2 validator configuration

View Source
var NetworkNameVals = make(map[string][]*valset.Validator)

NetworkNameVals is a map of network name to validator set for tests/devnets

Functions

This section is empty.

Types

type ChainSpanner

type ChainSpanner struct {
	// contains filtered or unexported fields
}

func NewChainSpanner

func NewChainSpanner(validatorSet abi.ABI, chainConfig *chain.Config, withoutHeimdall bool, logger log.Logger) *ChainSpanner

func (*ChainSpanner) CommitSpan

func (c *ChainSpanner) CommitSpan(heimdallSpan HeimdallSpan, syscall consensus.SystemCall) error

func (*ChainSpanner) GetCurrentProducers

func (c *ChainSpanner) GetCurrentProducers(spanId uint64, signer libcommon.Address, chain consensus.ChainHeaderReader) ([]*valset.Validator, error)

func (*ChainSpanner) GetCurrentSpan

func (c *ChainSpanner) GetCurrentSpan(syscall consensus.SystemCall) (*Span, error)

GetCurrentSpan get current span from contract

func (*ChainSpanner) GetCurrentValidators

func (c *ChainSpanner) GetCurrentValidators(spanId uint64, signer libcommon.Address, chain consensus.ChainHeaderReader) ([]*valset.Validator, error)

type HeimdallSpan

type HeimdallSpan struct {
	Span
	ValidatorSet      valset.ValidatorSet `json:"validator_set" yaml:"validator_set"`
	SelectedProducers []valset.Validator  `json:"selected_producers" yaml:"selected_producers"`
	ChainID           string              `json:"bor_chain_id" yaml:"bor_chain_id"`
}

HeimdallSpan represents span from heimdall APIs

func (*HeimdallSpan) Less

func (hs *HeimdallSpan) Less(other btree.Item) bool

type Span

type Span struct {
	ID         uint64 `json:"span_id" yaml:"span_id"`
	StartBlock uint64 `json:"start_block" yaml:"start_block"`
	EndBlock   uint64 `json:"end_block" yaml:"end_block"`
}

Span represents a current bor span

Jump to

Keyboard shortcuts

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