migrations

package
v0.23.6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: AGPL-3.0 Imports: 30 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPrimitiveStaticType added in v0.22.2

func ConvertPrimitiveStaticType(staticType oldInter.PrimitiveStaticType) newInter.PrimitiveStaticType

func ConvertStaticType added in v0.22.2

func ConvertStaticType(staticType oldInter.StaticType) newInter.StaticType

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 StorageFormatV6Migration added in v0.22.2

type StorageFormatV6Migration struct {
	Log       zerolog.Logger
	OutputDir string
	// contains filtered or unexported fields
}

func (*StorageFormatV6Migration) Migrate added in v0.22.2

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

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

type ValueConverter added in v0.22.2

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

ValueConverter converts old cadence interpreter values to new cadence interpreter values.

func NewValueConverter added in v0.22.2

func NewValueConverter(
	migration *StorageFormatV6Migration,
) *ValueConverter

func (*ValueConverter) Convert added in v0.22.2

func (c *ValueConverter) Convert(value oldInter.Value, expectedType newInter.StaticType) (result newInter.Value)

func (*ValueConverter) VisitAddressValue added in v0.22.2

func (c *ValueConverter) VisitAddressValue(_ *oldInter.Interpreter, value oldInter.AddressValue)

func (*ValueConverter) VisitArrayValue added in v0.22.2

func (c *ValueConverter) VisitArrayValue(_ *oldInter.Interpreter, value *oldInter.ArrayValue) bool

func (*ValueConverter) VisitBoolValue added in v0.22.2

func (c *ValueConverter) VisitBoolValue(_ *oldInter.Interpreter, value oldInter.BoolValue)

func (*ValueConverter) VisitBoundFunctionValue added in v0.22.2

func (c *ValueConverter) VisitBoundFunctionValue(_ *oldInter.Interpreter, _ oldInter.BoundFunctionValue)

func (*ValueConverter) VisitCapabilityValue added in v0.22.2

func (c *ValueConverter) VisitCapabilityValue(_ *oldInter.Interpreter, value oldInter.CapabilityValue)

func (*ValueConverter) VisitCompositeValue added in v0.22.2

func (c *ValueConverter) VisitCompositeValue(_ *oldInter.Interpreter, value *oldInter.CompositeValue) bool

func (*ValueConverter) VisitDeployedContractValue added in v0.22.2

func (c *ValueConverter) VisitDeployedContractValue(_ *oldInter.Interpreter, _ oldInter.DeployedContractValue)

func (*ValueConverter) VisitDictionaryValue added in v0.22.2

func (c *ValueConverter) VisitDictionaryValue(inter *oldInter.Interpreter, value *oldInter.DictionaryValue) bool

func (*ValueConverter) VisitEphemeralReferenceValue added in v0.22.2

func (c *ValueConverter) VisitEphemeralReferenceValue(_ *oldInter.Interpreter, _ *oldInter.EphemeralReferenceValue)

func (*ValueConverter) VisitFix64Value added in v0.22.2

func (c *ValueConverter) VisitFix64Value(_ *oldInter.Interpreter, value oldInter.Fix64Value)

func (*ValueConverter) VisitHostFunctionValue added in v0.22.2

func (c *ValueConverter) VisitHostFunctionValue(_ *oldInter.Interpreter, _ *oldInter.HostFunctionValue)

func (*ValueConverter) VisitInt128Value added in v0.22.2

func (c *ValueConverter) VisitInt128Value(_ *oldInter.Interpreter, value oldInter.Int128Value)

func (*ValueConverter) VisitInt16Value added in v0.22.2

func (c *ValueConverter) VisitInt16Value(_ *oldInter.Interpreter, value oldInter.Int16Value)

func (*ValueConverter) VisitInt256Value added in v0.22.2

func (c *ValueConverter) VisitInt256Value(_ *oldInter.Interpreter, value oldInter.Int256Value)

func (*ValueConverter) VisitInt32Value added in v0.22.2

func (c *ValueConverter) VisitInt32Value(_ *oldInter.Interpreter, value oldInter.Int32Value)

func (*ValueConverter) VisitInt64Value added in v0.22.2

func (c *ValueConverter) VisitInt64Value(_ *oldInter.Interpreter, value oldInter.Int64Value)

func (*ValueConverter) VisitInt8Value added in v0.22.2

func (c *ValueConverter) VisitInt8Value(_ *oldInter.Interpreter, value oldInter.Int8Value)

func (*ValueConverter) VisitIntValue added in v0.22.2

func (c *ValueConverter) VisitIntValue(_ *oldInter.Interpreter, value oldInter.IntValue)

func (*ValueConverter) VisitInterpretedFunctionValue added in v0.22.2

func (c *ValueConverter) VisitInterpretedFunctionValue(_ *oldInter.Interpreter, _ *oldInter.InterpretedFunctionValue)

func (*ValueConverter) VisitLinkValue added in v0.22.2

func (c *ValueConverter) VisitLinkValue(_ *oldInter.Interpreter, value oldInter.LinkValue)

func (*ValueConverter) VisitNilValue added in v0.22.2

func (c *ValueConverter) VisitNilValue(_ *oldInter.Interpreter, _ oldInter.NilValue)

func (*ValueConverter) VisitPathValue added in v0.22.2

func (c *ValueConverter) VisitPathValue(_ *oldInter.Interpreter, value oldInter.PathValue)

func (*ValueConverter) VisitSomeValue added in v0.22.2

func (c *ValueConverter) VisitSomeValue(_ *oldInter.Interpreter, value *oldInter.SomeValue) bool

func (*ValueConverter) VisitStorageReferenceValue added in v0.22.2

func (c *ValueConverter) VisitStorageReferenceValue(_ *oldInter.Interpreter, _ *oldInter.StorageReferenceValue)

func (*ValueConverter) VisitStringValue added in v0.22.2

func (c *ValueConverter) VisitStringValue(_ *oldInter.Interpreter, value *oldInter.StringValue)

func (*ValueConverter) VisitTypeValue added in v0.22.2

func (c *ValueConverter) VisitTypeValue(_ *oldInter.Interpreter, value oldInter.TypeValue)

func (*ValueConverter) VisitUFix64Value added in v0.22.2

func (c *ValueConverter) VisitUFix64Value(_ *oldInter.Interpreter, value oldInter.UFix64Value)

func (*ValueConverter) VisitUInt128Value added in v0.22.2

func (c *ValueConverter) VisitUInt128Value(_ *oldInter.Interpreter, value oldInter.UInt128Value)

func (*ValueConverter) VisitUInt16Value added in v0.22.2

func (c *ValueConverter) VisitUInt16Value(_ *oldInter.Interpreter, value oldInter.UInt16Value)

func (*ValueConverter) VisitUInt256Value added in v0.22.2

func (c *ValueConverter) VisitUInt256Value(_ *oldInter.Interpreter, value oldInter.UInt256Value)

func (*ValueConverter) VisitUInt32Value added in v0.22.2

func (c *ValueConverter) VisitUInt32Value(_ *oldInter.Interpreter, value oldInter.UInt32Value)

func (*ValueConverter) VisitUInt64Value added in v0.22.2

func (c *ValueConverter) VisitUInt64Value(_ *oldInter.Interpreter, value oldInter.UInt64Value)

func (*ValueConverter) VisitUInt8Value added in v0.22.2

func (c *ValueConverter) VisitUInt8Value(_ *oldInter.Interpreter, value oldInter.UInt8Value)

func (*ValueConverter) VisitUIntValue added in v0.22.2

func (c *ValueConverter) VisitUIntValue(_ *oldInter.Interpreter, value oldInter.UIntValue)

func (*ValueConverter) VisitValue added in v0.22.2

func (c *ValueConverter) VisitValue(_ *oldInter.Interpreter, _ oldInter.Value)

func (*ValueConverter) VisitVoidValue added in v0.22.2

func (c *ValueConverter) VisitVoidValue(_ *oldInter.Interpreter, _ oldInter.VoidValue)

func (*ValueConverter) VisitWord16Value added in v0.22.2

func (c *ValueConverter) VisitWord16Value(_ *oldInter.Interpreter, value oldInter.Word16Value)

func (*ValueConverter) VisitWord32Value added in v0.22.2

func (c *ValueConverter) VisitWord32Value(_ *oldInter.Interpreter, value oldInter.Word32Value)

func (*ValueConverter) VisitWord64Value added in v0.22.2

func (c *ValueConverter) VisitWord64Value(_ *oldInter.Interpreter, value oldInter.Word64Value)

func (*ValueConverter) VisitWord8Value added in v0.22.2

func (c *ValueConverter) VisitWord8Value(_ *oldInter.Interpreter, value oldInter.Word8Value)

type ValueNotFoundError added in v0.22.2

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

func (*ValueNotFoundError) Error added in v0.22.2

func (e *ValueNotFoundError) Error() string

Jump to

Keyboard shortcuts

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