vemanager

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package vemanager implements a vote extension manager, which is a way of aggregating multiple vote extensions into a single one.

In Warden, we use this to aggregate slinky and x/async vote extensions.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthVemanager        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVemanager          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVemanager = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type VoteExtensionManager

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

VoteExtensionManager wraps multiple ABCI handlers (ExtendVoteHandler, VerifyVoteExtensionHandler) and exposes a single ABCI handler that aggregates all of them.

func NewVoteExtensionManager

func NewVoteExtensionManager() *VoteExtensionManager

NewVoteExtensionManager creates a new empty VoteExtensionManager.

func (*VoteExtensionManager) ExtendVoteHandler

func (m *VoteExtensionManager) ExtendVoteHandler() sdk.ExtendVoteHandler

ExtendVoteHandler returns the ExtendVoteHandler that aggregates all the registered ExtendVoteHandlers.

func (*VoteExtensionManager) Register

func (m *VoteExtensionManager) Register(
	extendVoteHandler sdk.ExtendVoteHandler,
	verifyVoteExtensionHandler sdk.VerifyVoteExtensionHandler,
)

Register new ABCI handlers to the manager.

CONTRACT: changing the order of registration it's a consensus breaking change.

func (*VoteExtensionManager) VerifyVoteExtensionHandler

func (m *VoteExtensionManager) VerifyVoteExtensionHandler() sdk.VerifyVoteExtensionHandler

VerifyVoteExtensionHandler returns the VerifyVoteExtensionHandler that aggregates all the registered VerifyVoteExtensionHandlers.

type VoteExtensions

type VoteExtensions struct {
	Extensions [][]byte `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"`
}

ABCI treats a VoteExtensions as a byte array, but we need to distinguish between multiple extensions coming from different sources, i.e. we want an array of byte arrays, which is what this type represents.

func (*VoteExtensions) Descriptor

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

func (*VoteExtensions) GetExtensions

func (m *VoteExtensions) GetExtensions() [][]byte

func (*VoteExtensions) Marshal

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

func (*VoteExtensions) MarshalTo

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

func (*VoteExtensions) MarshalToSizedBuffer

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

func (*VoteExtensions) ProtoMessage

func (*VoteExtensions) ProtoMessage()

func (*VoteExtensions) Reset

func (m *VoteExtensions) Reset()

func (*VoteExtensions) Size

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

func (*VoteExtensions) String

func (m *VoteExtensions) String() string

func (*VoteExtensions) Unmarshal

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

func (*VoteExtensions) XXX_DiscardUnknown

func (m *VoteExtensions) XXX_DiscardUnknown()

func (*VoteExtensions) XXX_Marshal

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

func (*VoteExtensions) XXX_Merge

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

func (*VoteExtensions) XXX_Size

func (m *VoteExtensions) XXX_Size() int

func (*VoteExtensions) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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