types

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeUpgradeFailure   = "upgrade_failure"
	EventTypeUpdateUbiFailure = "update_ubi_failure"

	AttributeKeyStatusCode    = "status_code"
	AttributeKeyBlockHeight   = "block_height"
	AttributeKeyUpgradeName   = "upgrade_name"
	AttributeKeyUpgradeHeight = "upgrade_height"
	AttributeKeyUpgradeInfo   = "upgrade_info"
	AttributeKeyUbiPercentage = "ubi_percentage"
)

evmstaking module event types.

View Source
const (
	// ModuleName defines the module name.
	ModuleName = "evmengine"

	// StoreKey defines the primary module store key.
	StoreKey = ModuleName

	// MemStoreKey defines the in-memory store key.
	MemStoreKey = "mem_evmengine"
)

Variables

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ParamsKey = collections.NewPrefix(0)
)

KVStore key prefixes.

View Source
var (
	SoftwareUpgradeEvent = mustGetEvent(upgradeEntrypointABI, "SoftwareUpgrade")
)
View Source
var (
	UBIPercentageSetEvent = mustGetEvent(ubiPoolABI, "UBIPercentageSet")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServiceServer

func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer)

func ValidateExecutionBlockHash

func ValidateExecutionBlockHash(executionBlockHash []byte) error

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(moduleName string) sdk.AccAddress
}

type DistrKeeper added in v0.12.0

type DistrKeeper interface {
	SetUbi(ctx context.Context, newUbi math.LegacyDec) error
}

type EVMEvent

type EVMEvent struct {
	Address []byte   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Topics  [][]byte `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"`
	Data    []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}

EVMEvent represents a contract log event. Derived fields are not included in the protobuf.

func (*EVMEvent) Descriptor

func (*EVMEvent) Descriptor() ([]byte, []int)

func (*EVMEvent) GetAddress

func (m *EVMEvent) GetAddress() []byte

func (*EVMEvent) GetData

func (m *EVMEvent) GetData() []byte

func (*EVMEvent) GetTopics

func (m *EVMEvent) GetTopics() [][]byte

func (*EVMEvent) Marshal

func (m *EVMEvent) Marshal() (dAtA []byte, err error)

func (*EVMEvent) MarshalTo

func (m *EVMEvent) MarshalTo(dAtA []byte) (int, error)

func (*EVMEvent) MarshalToSizedBuffer

func (m *EVMEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EVMEvent) ProtoMessage

func (*EVMEvent) ProtoMessage()

func (*EVMEvent) Reset

func (m *EVMEvent) Reset()

func (*EVMEvent) Size

func (m *EVMEvent) Size() (n int)

func (*EVMEvent) String

func (m *EVMEvent) String() string

func (*EVMEvent) ToEthLog

func (l *EVMEvent) ToEthLog() (ethtypes.Log, error)

ToEthLog converts an EVMEvent to an Ethereum Log. Note it assumes that Verify has been called before.

func (*EVMEvent) Unmarshal

func (m *EVMEvent) Unmarshal(dAtA []byte) error

func (*EVMEvent) Verify

func (l *EVMEvent) Verify() error

func (*EVMEvent) XXX_DiscardUnknown

func (m *EVMEvent) XXX_DiscardUnknown()

func (*EVMEvent) XXX_Marshal

func (m *EVMEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EVMEvent) XXX_Merge

func (m *EVMEvent) XXX_Merge(src proto.Message)

func (*EVMEvent) XXX_Size

func (m *EVMEvent) XXX_Size() int

func (*EVMEvent) XXX_Unmarshal

func (m *EVMEvent) XXX_Unmarshal(b []byte) error

type EvmEventProcessor

type EvmEventProcessor interface {
	Name() string
	Prepare(ctx context.Context, blockHash common.Hash) ([]*EVMEvent, error)
	Addresses() []common.Address
	Deliver(ctx context.Context, blockHash common.Hash, log *EVMEvent) error
}

EvmEventProcessor abstracts logic that processes EVM log events of the previous execution payload (current head) identified by the provided block hash.

EVMEngine calls this during PreparePayload to collect all EVM-log-events to include in the consensus block. It is also called during ProcessPayload to verify the proposed EVM events.

type EvmStakingKeeper

type EvmStakingKeeper interface {
	ParseDepositLog(ethlog ethtypes.Log) (*bindings.IPTokenStakingDeposit, error)
	ParseWithdrawLog(ethlog ethtypes.Log) (*bindings.IPTokenStakingWithdraw, error)
	ProcessStakingEvents(ctx context.Context, height uint64, logs []*EVMEvent) error
	MaxWithdrawalPerBlock(ctx context.Context) (uint32, error)
	DequeueEligibleWithdrawals(ctx context.Context, maxDequeue uint32) (withdrawals ethtypes.Withdrawals, err error)
	PeekEligibleWithdrawals(ctx context.Context, maxPeek uint32) (withdrawals ethtypes.Withdrawals, err error)
	DequeueEligibleRewardWithdrawals(ctx context.Context, maxDequeue uint32) (withdrawals ethtypes.Withdrawals, err error)
	PeekEligibleRewardWithdrawals(ctx context.Context, maxPeek uint32) (withdrawals ethtypes.Withdrawals, err error)
}

type ExecutionPayloadResponse

type ExecutionPayloadResponse struct {
}

func (*ExecutionPayloadResponse) Descriptor

func (*ExecutionPayloadResponse) Descriptor() ([]byte, []int)

func (*ExecutionPayloadResponse) Marshal

func (m *ExecutionPayloadResponse) Marshal() (dAtA []byte, err error)

func (*ExecutionPayloadResponse) MarshalTo

func (m *ExecutionPayloadResponse) MarshalTo(dAtA []byte) (int, error)

func (*ExecutionPayloadResponse) MarshalToSizedBuffer

func (m *ExecutionPayloadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExecutionPayloadResponse) ProtoMessage

func (*ExecutionPayloadResponse) ProtoMessage()

func (*ExecutionPayloadResponse) Reset

func (m *ExecutionPayloadResponse) Reset()

func (*ExecutionPayloadResponse) Size

func (m *ExecutionPayloadResponse) Size() (n int)

func (*ExecutionPayloadResponse) String

func (m *ExecutionPayloadResponse) String() string

func (*ExecutionPayloadResponse) Unmarshal

func (m *ExecutionPayloadResponse) Unmarshal(dAtA []byte) error

func (*ExecutionPayloadResponse) XXX_DiscardUnknown

func (m *ExecutionPayloadResponse) XXX_DiscardUnknown()

func (*ExecutionPayloadResponse) XXX_Marshal

func (m *ExecutionPayloadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecutionPayloadResponse) XXX_Merge

func (m *ExecutionPayloadResponse) XXX_Merge(src proto.Message)

func (*ExecutionPayloadResponse) XXX_Size

func (m *ExecutionPayloadResponse) XXX_Size() int

func (*ExecutionPayloadResponse) XXX_Unmarshal

func (m *ExecutionPayloadResponse) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

func NewGenesisState

func NewGenesisState(params Params) *GenesisState

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgExecutionPayload

type MsgExecutionPayload struct {
	Authority         string      `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	ExecutionPayload  []byte      `protobuf:"bytes,2,opt,name=execution_payload,json=executionPayload,proto3" json:"execution_payload,omitempty"`
	PrevPayloadEvents []*EVMEvent `protobuf:"bytes,3,rep,name=prev_payload_events,json=prevPayloadEvents,proto3" json:"prev_payload_events,omitempty"`
}

MsgExecutionPayload defines the next EVM execution payload and the logs from previous execution payload.

func (*MsgExecutionPayload) Descriptor

func (*MsgExecutionPayload) Descriptor() ([]byte, []int)

func (*MsgExecutionPayload) GetAuthority

func (m *MsgExecutionPayload) GetAuthority() string

func (*MsgExecutionPayload) GetExecutionPayload

func (m *MsgExecutionPayload) GetExecutionPayload() []byte

func (*MsgExecutionPayload) GetPrevPayloadEvents

func (m *MsgExecutionPayload) GetPrevPayloadEvents() []*EVMEvent

func (*MsgExecutionPayload) Marshal

func (m *MsgExecutionPayload) Marshal() (dAtA []byte, err error)

func (*MsgExecutionPayload) MarshalTo

func (m *MsgExecutionPayload) MarshalTo(dAtA []byte) (int, error)

func (*MsgExecutionPayload) MarshalToSizedBuffer

func (m *MsgExecutionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgExecutionPayload) ProtoMessage

func (*MsgExecutionPayload) ProtoMessage()

func (*MsgExecutionPayload) Reset

func (m *MsgExecutionPayload) Reset()

func (*MsgExecutionPayload) Size

func (m *MsgExecutionPayload) Size() (n int)

func (*MsgExecutionPayload) String

func (m *MsgExecutionPayload) String() string

func (*MsgExecutionPayload) Unmarshal

func (m *MsgExecutionPayload) Unmarshal(dAtA []byte) error

func (*MsgExecutionPayload) XXX_DiscardUnknown

func (m *MsgExecutionPayload) XXX_DiscardUnknown()

func (*MsgExecutionPayload) XXX_Marshal

func (m *MsgExecutionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgExecutionPayload) XXX_Merge

func (m *MsgExecutionPayload) XXX_Merge(src proto.Message)

func (*MsgExecutionPayload) XXX_Size

func (m *MsgExecutionPayload) XXX_Size() int

func (*MsgExecutionPayload) XXX_Unmarshal

func (m *MsgExecutionPayload) XXX_Unmarshal(b []byte) error

type MsgServiceClient

type MsgServiceClient interface {
	// ExecutionPayload submits a new execution payload from consensus to the StoryEVM.
	ExecutionPayload(ctx context.Context, in *MsgExecutionPayload, opts ...grpc.CallOption) (*ExecutionPayloadResponse, error)
}

MsgServiceClient is the client API for MsgService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgServiceClient

func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient

type MsgServiceServer

type MsgServiceServer interface {
	// ExecutionPayload submits a new execution payload from consensus to the StoryEVM.
	ExecutionPayload(context.Context, *MsgExecutionPayload) (*ExecutionPayloadResponse, error)
}

MsgServiceServer is the server API for MsgService service.

type Params

type Params struct {
	ExecutionBlockHash []byte `` /* 145-byte string literal not displayed */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams(executionBlockHash []byte) Params

NewParams creates a new Params instance.

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) GetExecutionBlockHash

func (m *Params) GetExecutionBlockHash() []byte

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type UnimplementedMsgServiceServer

type UnimplementedMsgServiceServer struct {
}

UnimplementedMsgServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServiceServer) ExecutionPayload

type UpgradeKeeper

type UpgradeKeeper interface {
	ScheduleUpgrade(ctx context.Context, plan upgradetypes.Plan) error
}

type VoteExtensionProvider

type VoteExtensionProvider interface {
	PrepareVotes(ctx context.Context, commit abci.ExtendedCommitInfo) ([]sdk.Msg, error)
}

VoteExtensionProvider abstracts logic that provides consensus payload messages from the last commits vote extensions.

EVMEngine calls this during PreparePayload to collect all vote extensions msgs to include in the consensus block.

Jump to

Keyboard shortcuts

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