Documentation
¶
Index ¶
Constants ¶
const ( // EventTypeKey is a reserved composite key for event name. // Used as a standard key in event attribute maps to identify event types EventTypeKey = "dvs.event" // DVSHashKey is a reserved key, used to specify DVS request's hash. // Critical for indexing and retrieving DVS requests by their unique hash DVSHashKey = "dvs.hash" // DVSHeightKey is a reserved key, used to specify DVS request block's height. // Enables filtering and retrieving DVS requests by blockchain height DVSHeightKey = "dvs.height" // DVSChainID identifies which blockchain the DVS request belongs to // Important for multi-chain environments to route requests properly DVSChainID = "dvs.chainid" )
Event and index key constants used throughout the system for consistent event handling and data retrieval
const DvsRequestKeySize = sha256.Size
DvsRequestKeySize is the size of the DVS request key index Using SHA-256 hash size as the standard key size for indexing requests
Variables ¶
var ErroringMockPVErr = errors.New("erroringMockPV always returns an error")
var ( // MaxSignatureSize is a maximum allowed signature size for the Proposal // and Vote. // XXX: secp256k1 does not have Size nor MaxSize defined. MaxSignatureSize = cmtmath.MaxInt(ed25519.SignatureSize, 64) )
var (
PeerStateKey = "ConsensusReactor.peerState"
)
UNSTABLE PeerStateKey represents the key used to store peer state information in the consensus reactor's data structures
Functions ¶
This section is empty.
Types ¶
type ErrInvalidCommitHeight ¶
type ErrInvalidCommitHeight struct { Expected int64 // The height we expected to see Actual int64 // The height we actually saw }
ErrInvalidCommitHeight is returned when we encounter a commit with an unexpected height.
func NewErrInvalidCommitHeight ¶
func NewErrInvalidCommitHeight(expected, actual int64) ErrInvalidCommitHeight
NewErrInvalidCommitHeight creates a new error for cases when the commit height doesn't match the expected height in the consensus process
func (ErrInvalidCommitHeight) Error ¶
func (e ErrInvalidCommitHeight) Error() string
Error implements the error interface for ErrInvalidCommitHeight providing a descriptive error message about the height mismatch
type ErrInvalidCommitSignatures ¶
type ErrInvalidCommitSignatures struct { Expected int // The number of signatures we expected Actual int // The number of signatures we actually got }
ErrInvalidCommitSignatures is returned when we encounter a commit where the number of signatures doesn't match the number of validators.
func NewErrInvalidCommitSignatures ¶
func NewErrInvalidCommitSignatures(expected, actual int) ErrInvalidCommitSignatures
NewErrInvalidCommitSignatures creates a new error for cases when the number of signatures in a commit doesn't match the expected validator set size
func (ErrInvalidCommitSignatures) Error ¶
func (e ErrInvalidCommitSignatures) Error() string
Error implements the error interface for ErrInvalidCommitSignatures providing a descriptive error message about the signature count mismatch
type ErroringMockPV ¶
type ErroringMockPV struct {
MockPV
}
func NewErroringMockPV ¶
func NewErroringMockPV() *ErroringMockPV
type MockPV ¶
MockPV implements PrivValidator without any safety or persistence. Only use it for testing.
func NewMockPVWithParams ¶
func NewMockPVWithParams(privKey crypto.PrivKey, breakProposalSigning, breakVoteSigning bool) MockPV
NewMockPVWithParams allows one to create a MockPV instance, but with finer grained control over the operation of the mock validator. This is useful for mocking test failures.
type OperatorID ¶
type OperatorID [32]byte
OperatorID uniquely identifies an operator in the distributed validation system Represented as a 32-byte array derived from either a BLS public key or Ethereum address
func OperatorIDFromAddress ¶ added in v0.3.1
func OperatorIDFromAddress(address common.Address) OperatorID
OperatorIDFromAddress generates an OperatorID from an Ethereum address Provides a way to identify operators based on their blockchain identity
func OperatorIDFromBLSKey ¶ added in v0.3.1
func OperatorIDFromBLSKey(pubkey *bls.G1Point) OperatorID
OperatorIDFromBLSKey generates an OperatorID from a BLS public key Used for off-chain identification of operators based on their cryptographic credentials
func (*OperatorID) LogValue ¶
func (o *OperatorID) LogValue() slog.Value
LogValue implements slog.LogValuer interface to provide a human-readable string representation of the OperatorID for logging purposes
type PrivValidator ¶
type PrivValidator interface { GetPubKey() (*bls.G1Point, error) SignBytes(bytes []byte) (*bls.Signature, error) }
PrivValidator defines the functionality of a local PellDVS validator that signs votes and proposals, and never double signs.
type ReactorEvent ¶ added in v0.3.1
type ReactorEvent struct { Type ReactorEventType Payload any }
ReactorEvent is a struct that represents an event that can be published to the ReactorEventBus.
type ReactorEventBus ¶ added in v0.3.1
type ReactorEventBus struct {
// contains filtered or unexported fields
}
ReactorEventBus is a struct that manages event subscriptions and publications.
func NewReactorEventBus ¶ added in v0.3.1
func NewReactorEventBus() *ReactorEventBus
NewReactorEventBus creates a new ReactorEventBus.
func (*ReactorEventBus) Pub ¶ added in v0.3.1
func (eb *ReactorEventBus) Pub(eventType ReactorEventType, payload any)
Pub publishes a ReactorEvent to all subscribers of the given ReactorEventType.
func (*ReactorEventBus) Sub ¶ added in v0.3.1
func (eb *ReactorEventBus) Sub(eventType ReactorEventType) <-chan ReactorEvent
Sub subscribes to a ReactorEventType and returns a channel that will receive ReactorEvents.
type ReactorEventType ¶ added in v0.3.1
type ReactorEventType string
const ( CollectResponseSignatureRequest ReactorEventType = "CollectResponseSignatureRequest" CollectResponseSignatureDone ReactorEventType = "CollectResponseSignatureDone" )