messages

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorEvent added in v0.14.0

type ActorEvent struct {
	Height     int64  `pg:",pk,notnull,use_zero"`
	StateRoot  string `pg:",pk,notnull"`
	MessageCid string `pg:",pk,notnull"`
	EventIndex int64  `pg:",pk,notnull,use_zero"`

	Emitter    string `pg:",notnull"`
	Flags      []byte `pg:",notnull"`
	Codec      uint64 `pg:",notnull,use_zero"`
	Key        string `pg:",notnull"`
	Value      []byte `pg:",notnull"`
	EntryIndex int64  `pg:",pk,notnull,use_zero"`
	// contains filtered or unexported fields
}

func (*ActorEvent) Persist added in v0.14.0

type ActorEventList added in v0.14.0

type ActorEventList []*ActorEvent

func (ActorEventList) Persist added in v0.14.0

type BlockMessage

type BlockMessage struct {
	Height  int64  `pg:",pk,notnull,use_zero"`
	Block   string `pg:",pk,notnull"`
	Message string `pg:",pk,notnull"`
}

func (*BlockMessage) Persist

type BlockMessages

type BlockMessages []*BlockMessage

func (BlockMessages) Persist

type InternalMessage

type InternalMessage struct {
	Height        int64  `pg:",pk,notnull,use_zero"`
	Cid           string `pg:",pk,notnull"`
	StateRoot     string `pg:",notnull"`
	SourceMessage string
	From          string `pg:",notnull"`
	To            string `pg:",notnull"`
	Value         string `pg:"type:numeric,notnull"`
	Method        uint64 `pg:",use_zero"`
	ActorName     string `pg:",notnull"`
	ActorFamily   string `pg:",notnull"`
	ExitCode      int64  `pg:",use_zero"`
	GasUsed       int64  `pg:",use_zero"`
	// contains filtered or unexported fields
}

func (*InternalMessage) Persist

type InternalMessageList

type InternalMessageList []*InternalMessage

func (InternalMessageList) Persist

type InternalParsedMessage

type InternalParsedMessage struct {
	Height int64  `pg:",pk,notnull,use_zero"`
	Cid    string `pg:",pk,notnull"`
	From   string `pg:",notnull"`
	To     string `pg:",notnull"`
	Value  string `pg:"type:numeric,notnull"`
	Method string `pg:",use_zero"`
	Params string `pg:",type:jsonb"`
	// contains filtered or unexported fields
}

func (*InternalParsedMessage) Persist

type InternalParsedMessageList

type InternalParsedMessageList []*InternalParsedMessage

func (InternalParsedMessageList) Persist

type Message

type Message struct {
	Height int64  `pg:",pk,notnull,use_zero"`
	Cid    string `pg:",pk,notnull"`

	From       string `pg:",notnull"`
	To         string `pg:",notnull"`
	Value      string `pg:"type:numeric,notnull"`
	GasFeeCap  string `pg:"type:numeric,notnull"`
	GasPremium string `pg:"type:numeric,notnull"`

	GasLimit  int64  `pg:",use_zero"`
	SizeBytes int    `pg:",use_zero"`
	Nonce     uint64 `pg:",use_zero"`
	Method    uint64 `pg:",use_zero"`
}

func (*Message) AsVersion

func (m *Message) AsVersion(version model.Version) (interface{}, bool)

func (*Message) Persist

func (m *Message) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MessageGasEconomy

type MessageGasEconomy struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	StateRoot string `pg:",pk,notnull"`

	BaseFee          float64 `pg:"type:numeric,use_zero"`
	BaseFeeChangeLog float64 `pg:",use_zero"`

	GasLimitTotal       int64 `pg:"type:numeric,use_zero"`
	GasLimitUniqueTotal int64 `pg:"type:numeric,use_zero"`

	GasFillRatio     float64 `pg:",use_zero"`
	GasCapacityRatio float64 `pg:",use_zero"`
	GasWasteRatio    float64 `pg:",use_zero"`
	// contains filtered or unexported fields
}

func (*MessageGasEconomy) AsVersion

func (g *MessageGasEconomy) AsVersion(version model.Version) (interface{}, bool)

func (*MessageGasEconomy) Persist

func (g *MessageGasEconomy) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MessageGasEconomyV0

type MessageGasEconomyV0 struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	StateRoot string `pg:",pk,notnull"`

	BaseFee          float64 `pg:",use_zero"`
	BaseFeeChangeLog float64 `pg:",use_zero"`

	GasLimitTotal       int64 `pg:",use_zero"`
	GasLimitUniqueTotal int64 `pg:",use_zero"`

	GasFillRatio     float64 `pg:",use_zero"`
	GasCapacityRatio float64 `pg:",use_zero"`
	GasWasteRatio    float64 `pg:",use_zero"`
	// contains filtered or unexported fields
}

type MessageParam added in v0.14.0

type MessageParam struct {
	Cid    string `pg:",pk,notnull"`
	Params []byte
	// contains filtered or unexported fields
}

func (*MessageParam) Persist added in v0.14.0

type MessageParamList added in v0.14.0

type MessageParamList []*MessageParam

func (MessageParamList) Persist added in v0.14.0

type MessageTaskResult

type MessageTaskResult struct {
	Messages          Messages
	ParsedMessages    ParsedMessages
	BlockMessages     BlockMessages
	Receipts          Receipts
	MessageGasEconomy *MessageGasEconomy
}

func (*MessageTaskResult) Persist

func (mtr *MessageTaskResult) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MessageV0

type MessageV0 struct {
	Height int64  `pg:",pk,notnull,use_zero"`
	Cid    string `pg:",pk,notnull"`

	From       string `pg:",notnull"`
	To         string `pg:",notnull"`
	Value      string `pg:",notnull"`
	GasFeeCap  string `pg:",notnull"`
	GasPremium string `pg:",notnull"`

	GasLimit  int64  `pg:",use_zero"`
	SizeBytes int    `pg:",use_zero"`
	Nonce     uint64 `pg:",use_zero"`
	Method    uint64 `pg:",use_zero"`
	// contains filtered or unexported fields
}

type Messages

type Messages []*Message

func (Messages) Persist

func (ms Messages) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type ParsedMessage

type ParsedMessage struct {
	Height int64  `pg:",pk,notnull,use_zero"`
	Cid    string `pg:",pk,notnull"`
	From   string `pg:",notnull"`
	To     string `pg:",notnull"`
	Value  string `pg:"type:numeric,notnull"`
	Method string `pg:",notnull"`
	Params string `pg:",type:jsonb"`
}

func (*ParsedMessage) AsVersion

func (pm *ParsedMessage) AsVersion(version model.Version) (interface{}, bool)

func (*ParsedMessage) Persist

func (pm *ParsedMessage) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type ParsedMessageV0

type ParsedMessageV0 struct {
	Height int64  `pg:",pk,notnull,use_zero"`
	Cid    string `pg:",pk,notnull"`
	From   string `pg:",notnull"`
	To     string `pg:",notnull"`
	Value  string `pg:",notnull"`
	Method string `pg:",notnull"`
	Params string `pg:",type:jsonb,notnull"`
	// contains filtered or unexported fields
}

type ParsedMessages

type ParsedMessages []*ParsedMessage

func (ParsedMessages) Persist

func (pms ParsedMessages) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type Receipt

type Receipt struct {
	Height    int64  `pg:",pk,notnull,use_zero"` // note this is the height of the receipt not the message
	Message   string `pg:",pk,notnull"`
	StateRoot string `pg:",pk,notnull"`

	Idx      int   `pg:",use_zero"`
	ExitCode int64 `pg:",use_zero"`
	GasUsed  int64 `pg:",use_zero"`

	Return []byte
	// Result returned from executing a message parsed and serialized as a JSON object.
	ParsedReturn string `pg:",type:jsonb"`
}

func (*Receipt) Persist

func (r *Receipt) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error

type ReceiptReturn added in v0.14.0

type ReceiptReturn struct {
	Message string `pg:",pk,notnull"`
	Return  []byte
	// contains filtered or unexported fields
}

func (*ReceiptReturn) Persist added in v0.14.0

type ReceiptReturnList added in v0.14.0

type ReceiptReturnList []*ReceiptReturn

func (ReceiptReturnList) Persist added in v0.14.0

type Receipts

type Receipts []*Receipt

func (Receipts) Persist

func (rs Receipts) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error

type VMMessage added in v0.12.0

type VMMessage struct {

	// Height message was executed at.
	Height int64 `pg:",pk,notnull,use_zero"`
	// StateRoot message was applied to.
	StateRoot string `pg:",pk,notnull"`
	// Cid of the message.
	Cid string `pg:",pk,notnull"`
	// On-chain message triggering the message.
	Source string `pg:",pk,notnull"`

	// From sender of message.
	From string `pg:",notnull"`
	// To receiver of message.
	To string `pg:",notnull"`
	// Value attoFIL contained in message.
	Value string `pg:"type:numeric,notnull"`
	// Method called on To (receiver).
	Method uint64 `pg:",notnull,use_zero"`
	// ActorCode of To (receiver).
	ActorCode string `pg:",notnull"`
	// ExitCode of message execution.
	ExitCode int64 `pg:",notnull,use_zero"`
	// GasUsed by message.
	GasUsed int64 `pg:",notnull,use_zero"`
	// Params contained in message.
	Params string `pg:",type:jsonb"`
	// Returns value of message receipt.
	Returns string `pg:",type:jsonb"`
	// Index indicating the order of the messages execution.
	Index uint64 `pg:",pk,notnull,use_zero"`
	// contains filtered or unexported fields
}

func (*VMMessage) Persist added in v0.12.0

func (v *VMMessage) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error

type VMMessageList added in v0.12.0

type VMMessageList []*VMMessage

func (VMMessageList) Persist added in v0.12.0

Jump to

Keyboard shortcuts

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