genesis

package
v0.0.0-...-3423c7d Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountEntry

type AccountEntry struct {
	Pubkey [32]byte
	runtime.Account
}

func (*AccountEntry) MarshalWihEncoder

func (a *AccountEntry) MarshalWihEncoder(encoder *bin.Encoder) (err error)

func (*AccountEntry) UnmarshalWithDecoder

func (a *AccountEntry) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)

type BuiltinProgram

type BuiltinProgram struct {
	Key    string
	Pubkey [32]byte
}

func (*BuiltinProgram) MarshalWihEncoder

func (*BuiltinProgram) MarshalWihEncoder(_ *bin.Encoder) (err error)

func (*BuiltinProgram) UnmarshalWithDecoder

func (b *BuiltinProgram) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)

type Genesis

type Genesis struct {
	CreationTime  time.Time
	Accounts      []AccountEntry
	Builtins      []BuiltinProgram
	RewardPools   []AccountEntry
	TicksPerSlot  uint64
	PohParams     runtime.PohParams
	Fees          runtime.FeeParams
	Rent          runtime.RentParams
	Inflation     runtime.InflationParams
	EpochSchedule runtime.EpochSchedule
	ClusterID     uint32
}

Genesis contains the genesis state of a Solana ledger.

func ReadGenesisFromArchive

func ReadGenesisFromArchive(archive io.Reader) (genesis *Genesis, hash *[32]byte, err error)

ReadGenesisFromArchive reads a `genesis.tar.bz2` file.

func ReadGenesisFromFile

func ReadGenesisFromFile(fpath string) (genesis *Genesis, hash *[32]byte, err error)

ReadGenesisFromFile is a convenience wrapper for ReadGenesisFromArchive.

func (*Genesis) FillAccounts

func (g *Genesis) FillAccounts(state runtime.Accounts)

func (*Genesis) MarshalWithEncoder

func (g *Genesis) MarshalWithEncoder(_ *bin.Encoder) (err error)

func (*Genesis) UnmarshalWithDecoder

func (g *Genesis) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)

Jump to

Keyboard shortcuts

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