voteextension

package
v0.0.0-...-720432b Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SidecarAddressEnv    = "ATTESTATION_SIDECAR_ADDRESS"
	SidecarConfigPathEnv = "ATTESTATION_SIDECAR_CONFIG_PATH"
)
View Source
const ModuleName = "attestationvoteextension"

Variables

View Source
var (
	ErrInvalidLengthVoteextension        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVoteextension          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVoteextension = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule is the application module for the attestation vote extension module

func NewAppModule

func NewAppModule(trustedUpdateClientFunc lightclient.TrustedClientUpdateFunc, cdc codec.Codec) AppModule

NewAppModule creates a new attestation vote extension AppModule

func (AppModule) ExtendVote

func (a AppModule) ExtendVote(ctx sdk.Context, vote *abci.RequestExtendVote) (*abci.ResponseExtendVote, error)

ExtendVote asks sidecar for attestations and return vote extension

func (AppModule) GetSidecarAddress

func (a AppModule) GetSidecarAddress(ctx sdk.Context) string

func (AppModule) PreBlocker

func (a AppModule) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock, i int) error

TODO: Document Contract: We do not need to check if vote extensions are enabled as that is dealt with by the top level handler

func (AppModule) PrepareProposal

func (a AppModule) PrepareProposal(ctx sdk.Context, proposal *abci.RequestPrepareProposal, bytes []byte) (*abci.ResponsePrepareProposal, error)

TODO: Document Contract: We do not need to check if vote extensions are enabled as that is dealt with by the top level handler

func (AppModule) ProcessProposal

TODO: Document Contract: We do not need to check if vote extensions are enabled as that is dealt with by the top level handler

func (AppModule) VerifyVote

TODO: Document

type AppModuleBasic

type AppModuleBasic struct{}

func (AppModuleBasic) IsAppModule

func (AppModuleBasic) IsAppModule()

IsAppModule implements the appmodule.AppModule interface.

func (AppModuleBasic) IsOnePerModuleType

func (AppModuleBasic) IsOnePerModuleType()

IsOnePerModuleType implements the depinject.OnePerModuleType interface.

func (AppModuleBasic) Name

func (a AppModuleBasic) Name() string

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (a AppModuleBasic) RegisterGRPCGatewayRoutes(context client.Context, mux *runtime.ServeMux)

RegisterGRPCGatewayRoutes performs a no-op.

func (AppModuleBasic) RegisterInterfaces

func (a AppModuleBasic) RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers module concrete types into protobuf Any.

func (AppModuleBasic) RegisterLegacyAminoCodec

func (a AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino)

RegisterLegacyAminoCodec performs a no-op. The attestation vote extension does not support amino.

type ClientUpdate

type ClientUpdate struct {
	ClientToUpdate   string                       `protobuf:"bytes,1,opt,name=client_to_update,json=clientToUpdate,proto3" json:"client_to_update,omitempty"`
	AttestationClaim lightclient.AttestationClaim `protobuf:"bytes,2,opt,name=attestation_claim,json=attestationClaim,proto3" json:"attestation_claim"`
}

func (*ClientUpdate) Descriptor

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

func (*ClientUpdate) GetAttestationClaim

func (m *ClientUpdate) GetAttestationClaim() lightclient.AttestationClaim

func (*ClientUpdate) GetClientToUpdate

func (m *ClientUpdate) GetClientToUpdate() string

func (*ClientUpdate) Marshal

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

func (*ClientUpdate) MarshalTo

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

func (*ClientUpdate) MarshalToSizedBuffer

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

func (*ClientUpdate) ProtoMessage

func (*ClientUpdate) ProtoMessage()

func (*ClientUpdate) Reset

func (m *ClientUpdate) Reset()

func (*ClientUpdate) Size

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

func (*ClientUpdate) String

func (m *ClientUpdate) String() string

func (*ClientUpdate) Unmarshal

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

func (*ClientUpdate) XXX_DiscardUnknown

func (m *ClientUpdate) XXX_DiscardUnknown()

func (*ClientUpdate) XXX_Marshal

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

func (*ClientUpdate) XXX_Merge

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

func (*ClientUpdate) XXX_Size

func (m *ClientUpdate) XXX_Size() int

func (*ClientUpdate) XXX_Unmarshal

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

type ClientUpdates

type ClientUpdates struct {
	ClientUpdates []ClientUpdate `protobuf:"bytes,1,rep,name=client_updates,json=clientUpdates,proto3" json:"client_updates"`
}

func (*ClientUpdates) Descriptor

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

func (*ClientUpdates) GetClientUpdates

func (m *ClientUpdates) GetClientUpdates() []ClientUpdate

func (*ClientUpdates) Marshal

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

func (*ClientUpdates) MarshalTo

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

func (*ClientUpdates) MarshalToSizedBuffer

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

func (*ClientUpdates) ProtoMessage

func (*ClientUpdates) ProtoMessage()

func (*ClientUpdates) Reset

func (m *ClientUpdates) Reset()

func (*ClientUpdates) Size

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

func (*ClientUpdates) String

func (m *ClientUpdates) String() string

func (*ClientUpdates) Unmarshal

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

func (*ClientUpdates) XXX_DiscardUnknown

func (m *ClientUpdates) XXX_DiscardUnknown()

func (*ClientUpdates) XXX_Marshal

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

func (*ClientUpdates) XXX_Merge

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

func (*ClientUpdates) XXX_Size

func (m *ClientUpdates) XXX_Size() int

func (*ClientUpdates) XXX_Unmarshal

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

type SidecarConfig

type SidecarConfig struct {
	SidecarAddress string `json:"sidecar_address"`
}

type VoteExtension

type VoteExtension struct {
	// one attestation for every chain configured in the sidecar
	Attestations []types.Attestation `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations"`
}

func (*VoteExtension) Descriptor

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

func (*VoteExtension) GetAttestations

func (m *VoteExtension) GetAttestations() []types.Attestation

func (*VoteExtension) Marshal

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

func (*VoteExtension) MarshalTo

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

func (*VoteExtension) MarshalToSizedBuffer

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

func (*VoteExtension) ProtoMessage

func (*VoteExtension) ProtoMessage()

func (*VoteExtension) Reset

func (m *VoteExtension) Reset()

func (*VoteExtension) Size

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

func (*VoteExtension) String

func (m *VoteExtension) String() string

func (*VoteExtension) Unmarshal

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

func (*VoteExtension) XXX_DiscardUnknown

func (m *VoteExtension) XXX_DiscardUnknown()

func (*VoteExtension) XXX_Marshal

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

func (*VoteExtension) XXX_Merge

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

func (*VoteExtension) XXX_Size

func (m *VoteExtension) XXX_Size() int

func (*VoteExtension) XXX_Unmarshal

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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