borcfg

package
v1.9.7-0...-42bb602 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BorConfig

type BorConfig struct {
	Period                map[string]uint64 `json:"period"`                // Number of seconds between blocks to enforce
	ProducerDelay         map[string]uint64 `json:"producerDelay"`         // Number of seconds delay between two producer interval
	Sprint                map[string]uint64 `json:"sprint"`                // Epoch length to proposer
	BackupMultiplier      map[string]uint64 `json:"backupMultiplier"`      // Backup multiplier to determine the wiggle time
	ValidatorContract     string            `json:"validatorContract"`     // Validator set contract
	StateReceiverContract string            `json:"stateReceiverContract"` // State receiver contract

	OverrideStateSyncRecords map[string]int         `json:"overrideStateSyncRecords"` // override state records count
	BlockAlloc               map[string]interface{} `json:"blockAlloc"`

	JaipurBlock                *big.Int          `json:"jaipurBlock"`                // Jaipur switch block (nil = no fork, 0 = already on Jaipur)
	DelhiBlock                 *big.Int          `json:"delhiBlock"`                 // Delhi switch block (nil = no fork, 0 = already on Delhi)
	IndoreBlock                *big.Int          `json:"indoreBlock"`                // Indore switch block (nil = no fork, 0 = already on Indore)
	AgraBlock                  *big.Int          `json:"agraBlock"`                  // Agra switch block (nil = no fork, 0 = already on Agra)
	NapoliBlock                *big.Int          `json:"napoliBlock"`                // Napoli switch block (nil = no fork, 0 = already on Napoli)
	AhmedabadBlock             *big.Int          `json:"ahmedabadBlock"`             // Ahmedabad switch block (nil = no fork, 0 = already on Ahmedabad)
	StateSyncConfirmationDelay map[string]uint64 `json:"stateSyncConfirmationDelay"` // StateSync Confirmation Delay, in seconds, to calculate `to`
	// contains filtered or unexported fields
}

BorConfig is the consensus engine configs for Matic bor based sealing.

func (*BorConfig) CalculateBackupMultiplier

func (c *BorConfig) CalculateBackupMultiplier(number uint64) uint64

func (*BorConfig) CalculatePeriod

func (c *BorConfig) CalculatePeriod(number uint64) uint64

func (*BorConfig) CalculateProducerDelay

func (c *BorConfig) CalculateProducerDelay(number uint64) uint64

func (*BorConfig) CalculateSprintLength

func (c *BorConfig) CalculateSprintLength(number uint64) uint64

func (*BorConfig) CalculateSprintNumber

func (c *BorConfig) CalculateSprintNumber(number uint64) uint64

func (*BorConfig) CalculateStateSyncDelay

func (c *BorConfig) CalculateStateSyncDelay(number uint64) uint64

func (*BorConfig) GetAgraBlock

func (c *BorConfig) GetAgraBlock() *big.Int

func (*BorConfig) GetAhmedabadBlock

func (c *BorConfig) GetAhmedabadBlock() *big.Int

func (*BorConfig) GetNapoliBlock

func (c *BorConfig) GetNapoliBlock() *big.Int

func (*BorConfig) IsAgra

func (c *BorConfig) IsAgra(num uint64) bool

IsAgra returns whether num is either equal to the Agra fork block or greater. The Agra hard fork is based on the Shanghai hard fork, but it doesn't include withdrawals. Also Agra is activated based on the block number rather than the timestamp. Refer to https://forum.polygon.technology/t/pip-28-agra-hardfork

func (*BorConfig) IsAhmedabad

func (c *BorConfig) IsAhmedabad(number uint64) bool

func (*BorConfig) IsDelhi

func (c *BorConfig) IsDelhi(number uint64) bool

func (*BorConfig) IsIndore

func (c *BorConfig) IsIndore(number uint64) bool

func (*BorConfig) IsJaipur

func (c *BorConfig) IsJaipur(number uint64) bool

func (*BorConfig) IsNapoli

func (c *BorConfig) IsNapoli(num uint64) bool

Refer to https://forum.polygon.technology/t/pip-33-napoli-upgrade

func (*BorConfig) IsSprintEnd

func (c *BorConfig) IsSprintEnd(number uint64) bool

func (*BorConfig) IsSprintStart

func (c *BorConfig) IsSprintStart(number uint64) bool

func (*BorConfig) StateReceiverContractAddress

func (c *BorConfig) StateReceiverContractAddress() common.Address

func (*BorConfig) String

func (c *BorConfig) String() string

String implements the stringer interface, returning the consensus engine details.

Jump to

Keyboard shortcuts

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