migrations

package
v0.25.11 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: AGPL-3.0 Imports: 22 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyToRegisterID added in v0.23.2

func KeyToRegisterID(key ledger.Key) (flow.RegisterID, error)

func NewView added in v0.23.2

func NewView(payloads []ledger.Payload) *view

func NoOpMigration

func NoOpMigration(p []ledger.Payload) ([]ledger.Payload, error)

func PruneMigration added in v0.16.2

func PruneMigration(payload []ledger.Payload) ([]ledger.Payload, error)

PruneMigration removes all the payloads with empty value this prunes the trie for values that has been deleted

func StorageFeesMigration added in v0.13.0

func StorageFeesMigration(payload []ledger.Payload) ([]ledger.Payload, error)

iterates through registers keeping a map of register sizes after it has reached the end it add storage used and storage capacity for each address

Types

type AccountsAtreeLedger added in v0.23.2

type AccountsAtreeLedger struct {
	Accounts fvmState.Accounts
}

func NewAccountsAtreeLedger added in v0.23.2

func NewAccountsAtreeLedger(accounts fvmState.Accounts) *AccountsAtreeLedger

func (*AccountsAtreeLedger) AllocateStorageIndex added in v0.23.2

func (a *AccountsAtreeLedger) AllocateStorageIndex(owner []byte) (atree.StorageIndex, error)

AllocateStorageIndex allocates new storage index under the owner accounts to store a new register

func (*AccountsAtreeLedger) GetValue added in v0.23.2

func (a *AccountsAtreeLedger) GetValue(owner, key []byte) ([]byte, error)

func (*AccountsAtreeLedger) SetValue added in v0.23.2

func (a *AccountsAtreeLedger) SetValue(owner, key, value []byte) error

func (*AccountsAtreeLedger) ValueExists added in v0.23.2

func (a *AccountsAtreeLedger) ValueExists(owner, key []byte) (exists bool, err error)

type OrderedMapMigration added in v0.25.1

type OrderedMapMigration struct {
	Log       zerolog.Logger
	OutputDir string

	NewStorage  *runtime.Storage
	Interpreter *interpreter.Interpreter
	// contains filtered or unexported fields
}

func (*OrderedMapMigration) Migrate added in v0.25.1

func (m *OrderedMapMigration) Migrate(payloads []ledger.Payload) ([]ledger.Payload, error)

type Pair added in v0.25.1

type Pair = struct {
	Key   string
	Value []byte
}

type RawStorable added in v0.25.1

type RawStorable []byte

func (RawStorable) Accept added in v0.25.1

func (v RawStorable) Accept(interpreter *interpreter.Interpreter, visitor interpreter.Visitor)

func (RawStorable) ByteSize added in v0.25.1

func (r RawStorable) ByteSize() uint32

func (RawStorable) ChildStorables added in v0.25.1

func (r RawStorable) ChildStorables() []atree.Storable

func (RawStorable) Clone added in v0.25.1

func (RawStorable) ConformsToDynamicType added in v0.25.1

func (RawStorable) DeepRemove added in v0.25.1

func (RawStorable) DeepRemove(_ *interpreter.Interpreter)

func (RawStorable) DynamicType added in v0.25.1

func (RawStorable) Encode added in v0.25.1

func (r RawStorable) Encode(enc *atree.Encoder) error

func (RawStorable) Equal added in v0.25.1

func (RawStorable) IsResourceKinded added in v0.25.1

func (RawStorable) IsResourceKinded(_ *interpreter.Interpreter) bool

func (RawStorable) IsValue added in v0.25.1

func (RawStorable) IsValue()

func (RawStorable) NeedsStoreTo added in v0.25.1

func (RawStorable) NeedsStoreTo(_ atree.Address) bool

func (RawStorable) RecursiveString added in v0.25.1

func (v RawStorable) RecursiveString(_ interpreter.SeenReferences) string

func (RawStorable) StaticType added in v0.25.1

func (RawStorable) StaticType() interpreter.StaticType

func (RawStorable) Storable added in v0.25.1

func (RawStorable) StoredValue added in v0.25.1

func (r RawStorable) StoredValue(storage atree.SlabStorage) (atree.Value, error)

func (RawStorable) String added in v0.25.1

func (RawStorable) String() string

func (RawStorable) Transfer added in v0.25.1

func (v RawStorable) Transfer(
	interpreter *interpreter.Interpreter,
	_ func() interpreter.LocationRange,
	_ atree.Address,
	remove bool,
	storable atree.Storable,
) interpreter.Value

func (RawStorable) Walk added in v0.25.1

func (RawStorable) Walk(_ func(interpreter.Value))

type StorageUsedUpdateMigration added in v0.21.0

type StorageUsedUpdateMigration struct {
	Log       zerolog.Logger
	OutputDir string
}

func (*StorageUsedUpdateMigration) Migrate added in v0.21.0

func (m *StorageUsedUpdateMigration) Migrate(payload []ledger.Payload) ([]ledger.Payload, error)

iterates through registers keeping a map of register sizes after it has reached the end it add storage used and storage capacity for each address

Jump to

Keyboard shortcuts

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