types

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

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 (
	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 MsgService_serviceDesc = _MsgService_serviceDesc

Functions

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServiceServer

func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer)

Types

type AddressProvider

type AddressProvider interface {
	// LocalAddress returns the local validator's ethereum address.
	LocalAddress() common.Address
}

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

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 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 FeeRecipientProvider

type FeeRecipientProvider interface {
	// LocalFeeRecipient returns the local validator's fee recipient address.
	LocalFeeRecipient() common.Address
	// VerifyFeeRecipient returns true if the given address is a valid fee recipient
	VerifyFeeRecipient(proposedFeeRecipient common.Address) error
}

type GenesisState

type GenesisState struct {
	ExecutionBlockHash []byte `protobuf:"bytes,1,opt,name=execution_block_hash,json=executionBlockHash,proto3" json:"execution_block_hash,omitempty"`
}

GenesisState is an empty genesis state required to trigger valsync genesis logic only.

func NewGenesisState

func NewGenesisState(executionBlockHash common.Hash) *GenesisState

NewGenesisState creates a new GenesisState instance.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetExecutionBlockHash

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

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 InjectedEventProc

type InjectedEventProc struct {
	EvmEventProcessor
}

InjectedEventProc wraps an EvmEventProcessor such that many instances can be injected during app wiring.

func InjectEventProc

func InjectEventProc(proc EvmEventProcessor) InjectedEventProc

InjectEventProc returns an InjectedEventProc that wraps the given EvmEventProcessor.

func (InjectedEventProc) IsManyPerContainerType

func (InjectedEventProc) IsManyPerContainerType()

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 OmniEVM.
	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 OmniEVM.
	ExecutionPayload(context.Context, *MsgExecutionPayload) (*ExecutionPayloadResponse, error)
}

MsgServiceServer is the server API for MsgService service.

type UnimplementedMsgServiceServer

type UnimplementedMsgServiceServer struct {
}

UnimplementedMsgServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServiceServer) ExecutionPayload

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