Documentation
¶
Index ¶
Constants ¶
const Protocol0 = 0
Protocol0 is the first protocol version
const TEST = "gfctest"
TEST is the network name for internal tests
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProtocolVersionTable ¶
type ProtocolVersionTable struct {
// contains filtered or unexported fields
}
ProtocolVersionTable is a data structure capable of specifying which protocol versions are active at which block heights. It must be constructed with the ProtocolVersionTableBuilder which enforces that the table has at least one entry at block height zero and that all the versions are sorted.
func ConfigureProtocolVersions ¶
func ConfigureProtocolVersions(network string) (*ProtocolVersionTable, error)
ConfigureProtocolVersions configures all protocol upgrades for all known networks. TODO: support arbitrary network names at "latest" protocol version so that only coordinated network upgrades need to be represented here. See #3491.
func (*ProtocolVersionTable) VersionAt ¶
func (pvt *ProtocolVersionTable) VersionAt(height abi.ChainEpoch) (uint64, error)
VersionAt returns the protocol versions at the given block height for this PVT's network.
type ProtocolVersionTableBuilder ¶
type ProtocolVersionTableBuilder struct {
// contains filtered or unexported fields
}
ProtocolVersionTableBuilder constructs a protocol version table
func NewProtocolVersionTableBuilder ¶
func NewProtocolVersionTableBuilder(network string) *ProtocolVersionTableBuilder
NewProtocolVersionTableBuilder creates a new ProtocolVersionTable that only tracks versions for the given network
func (*ProtocolVersionTableBuilder) Add ¶
func (pvtb *ProtocolVersionTableBuilder) Add(network string, version uint64, effectiveAt abi.ChainEpoch) *ProtocolVersionTableBuilder
Add configures an version for a network. If the network doesn't match the current network, this version will be ignored.
func (*ProtocolVersionTableBuilder) Build ¶
func (pvtb *ProtocolVersionTableBuilder) Build() (*ProtocolVersionTable, error)
Build constructs a protocol version table populated with properly sorted versions. It is an error to build whose first version is not at block height 0.