types

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 46 Imported by: 7

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

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

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

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_checkpointing"
)
View Source
const (
	// HashSize is the size in bytes of a hash
	HashSize   = sha256.Size
	BitmapBits = 104 // 104 bits for 104 validators at top
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

Variables

View Source
var (
	ErrInvalidLengthBlsKey        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBlsKey          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBlsKey = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthCheckpoint        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCheckpoint          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCheckpoint = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrCkptDoesNotExist       = errorsmod.Register(ModuleName, 1201, "raw checkpoint does not exist")
	ErrCkptAlreadyExist       = errorsmod.Register(ModuleName, 1202, "raw checkpoint already exists")
	ErrCkptHashNotEqual       = errorsmod.Register(ModuleName, 1203, "hash does not equal to raw checkpoint")
	ErrCkptNotAccumulating    = errorsmod.Register(ModuleName, 1204, "raw checkpoint is no longer accumulating BLS sigs")
	ErrCkptAlreadyVoted       = errorsmod.Register(ModuleName, 1205, "raw checkpoint already accumulated the validator")
	ErrInvalidRawCheckpoint   = errorsmod.Register(ModuleName, 1206, "raw checkpoint is invalid")
	ErrInvalidCkptStatus      = errorsmod.Register(ModuleName, 1207, "raw checkpoint's status is invalid")
	ErrInvalidPoP             = errorsmod.Register(ModuleName, 1208, "proof-of-possession is invalid")
	ErrBlsKeyDoesNotExist     = errorsmod.Register(ModuleName, 1209, "BLS public key does not exist")
	ErrBlsKeyAlreadyExist     = errorsmod.Register(ModuleName, 1210, "BLS public key already exists")
	ErrBlsPrivKeyDoesNotExist = errorsmod.Register(ModuleName, 1211, "BLS private key does not exist")
	ErrInvalidBlsSignature    = errorsmod.Register(ModuleName, 1212, "BLS signature is invalid")
	ErrConflictingCheckpoint  = errorsmod.Register(ModuleName, 1213, "Conflicting checkpoint is found")
	ErrInvalidLastCommitHash  = errorsmod.Register(ModuleName, 1214, "Provided last commit hash is Invalid")
)

x/checkpointing module sentinel errors

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
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 (
	CheckpointsPrefix        = []byte{0x1} // reserve this namespace for checkpoints
	RegistrationPrefix       = []byte{0x2} // reserve this namespace for BLS keys
	ValidatorBlsKeySetPrefix = []byte{0x3} // reserve this namespace for validator BLS key set

	CkptsObjectPrefix = append(CheckpointsPrefix, 0x0) // where we save the concrete BLS sig bytes

	AddrToBlsKeyPrefix = append(RegistrationPrefix, 0x0) // where we save the concrete BLS public keys
	BlsKeyToAddrPrefix = append(RegistrationPrefix, 0x1) // where we save BLS key set
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = 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 CheckpointStatus_name = map[int32]string{
	0: "CKPT_STATUS_ACCUMULATING",
	1: "CKPT_STATUS_SEALED",
	2: "CKPT_STATUS_SUBMITTED",
	3: "CKPT_STATUS_CONFIRMED",
	4: "CKPT_STATUS_FINALIZED",
}
View Source
var CheckpointStatus_value = map[string]int32{
	"CKPT_STATUS_ACCUMULATING": 0,
	"CKPT_STATUS_SEALED":       1,
	"CKPT_STATUS_SUBMITTED":    2,
	"CKPT_STATUS_CONFIRMED":    3,
	"CKPT_STATUS_FINALIZED":    4,
}

Functions

func AddrToBlsKeyKey

func AddrToBlsKeyKey(valAddr sdk.ValAddress) []byte

AddrToBlsKeyKey defines validator address

func BlsKeyToAddrKey

func BlsKeyToAddrKey(pk bls12381.PublicKey) []byte

BlsKeyToAddrKey defines BLS public key

func CkptWithMetaToBytes

func CkptWithMetaToBytes(cdc codec.BinaryCodec, ckptWithMeta *RawCheckpointWithMeta) []byte

func CkptsObjectKey

func CkptsObjectKey(epoch uint64) []byte

CkptsObjectKey defines epoch

func FromRawCkptToBTCCkpt

func FromRawCkptToBTCCkpt(rawCkpt *RawCheckpoint, address []byte) (*btctxformatter.RawBtcCheckpoint, error)

func GetSignBytes added in v0.6.0

func GetSignBytes(epoch uint64, hash []byte) []byte

func KeyPrefix

func KeyPrefix(p string) []byte

func RawCkptToBytes

func RawCkptToBytes(cdc codec.BinaryCodec, ckpt *RawCheckpoint) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidatorBlsKeySetKey

func ValidatorBlsKeySetKey(epoch uint64) []byte

ValidatorBlsKeySetKey defines epoch

func ValidatorBlsKeySetToBytes

func ValidatorBlsKeySetToBytes(cdc codec.BinaryCodec, valBlsSet *ValidatorWithBlsKeySet) []byte

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type BlsKey

type BlsKey struct {
	// pubkey is the BLS public key of a validator
	Pubkey *github_com_babylonchain_babylon_crypto_bls12381.PublicKey `` /* 134-byte string literal not displayed */
	// pop is the proof-of-possession of the BLS key
	Pop *ProofOfPossession `protobuf:"bytes,3,opt,name=pop,proto3" json:"pop,omitempty"`
}

BlsKey wraps BLS public key with PoP

func (*BlsKey) Descriptor

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

func (*BlsKey) GetPop

func (m *BlsKey) GetPop() *ProofOfPossession

func (*BlsKey) Marshal

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

func (*BlsKey) MarshalTo

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

func (*BlsKey) MarshalToSizedBuffer

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

func (*BlsKey) ProtoMessage

func (*BlsKey) ProtoMessage()

func (*BlsKey) Reset

func (m *BlsKey) Reset()

func (*BlsKey) Size

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

func (*BlsKey) String

func (m *BlsKey) String() string

func (*BlsKey) Unmarshal

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

func (*BlsKey) XXX_DiscardUnknown

func (m *BlsKey) XXX_DiscardUnknown()

func (*BlsKey) XXX_Marshal

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

func (*BlsKey) XXX_Merge

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

func (*BlsKey) XXX_Size

func (m *BlsKey) XXX_Size() int

func (*BlsKey) XXX_Unmarshal

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

type BlsSig

type BlsSig struct {
	// epoch_num defines the epoch number that the BLS sig is signed on
	EpochNum uint64 `protobuf:"varint,1,opt,name=epoch_num,json=epochNum,proto3" json:"epoch_num,omitempty"`
	// last_commit_hash defines the 'LastCommitHash' that the BLS sig is signed on
	LastCommitHash *LastCommitHash                                            `` /* 131-byte string literal not displayed */
	BlsSig         *github_com_babylonchain_babylon_crypto_bls12381.Signature `` /* 148-byte string literal not displayed */
	// can't find cosmos_proto.scalar when compiling due to cosmos v0.45.4 does
	// not support scalar string signer_address = 4 [(cosmos_proto.scalar) =
	// "cosmos.AddressString"]; the signer_address defines the address of the
	// signer
	SignerAddress string `protobuf:"bytes,4,opt,name=signer_address,json=signerAddress,proto3" json:"signer_address,omitempty"`
}

BlsSig wraps the BLS sig with meta data.

func (*BlsSig) Descriptor

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

func (*BlsSig) GetEpochNum

func (m *BlsSig) GetEpochNum() uint64

func (*BlsSig) GetSignerAddress

func (m *BlsSig) GetSignerAddress() string

func (BlsSig) Hash

func (m BlsSig) Hash() BlsSigHash

func (*BlsSig) Marshal

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

func (*BlsSig) MarshalTo

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

func (*BlsSig) MarshalToSizedBuffer

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

func (*BlsSig) ProtoMessage

func (*BlsSig) ProtoMessage()

func (*BlsSig) Reset

func (m *BlsSig) Reset()

func (*BlsSig) Size

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

func (*BlsSig) String

func (m *BlsSig) String() string

func (*BlsSig) Unmarshal

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

func (*BlsSig) XXX_DiscardUnknown

func (m *BlsSig) XXX_DiscardUnknown()

func (*BlsSig) XXX_Marshal

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

func (*BlsSig) XXX_Merge

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

func (*BlsSig) XXX_Size

func (m *BlsSig) XXX_Size() int

func (*BlsSig) XXX_Unmarshal

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

type BlsSigHash

type BlsSigHash []byte

func (BlsSigHash) Bytes

func (m BlsSigHash) Bytes() []byte

type CheckpointStateUpdate

type CheckpointStateUpdate struct {
	// state defines the event of a state transition towards this state
	State CheckpointStatus `protobuf:"varint,1,opt,name=state,proto3,enum=babylon.checkpointing.v1.CheckpointStatus" json:"state,omitempty"`
	// block_height is the height of the Babylon block that triggers the state
	// update
	BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	// block_time is the timestamp in the Babylon block that triggers the state
	// update
	BlockTime *time.Time `protobuf:"bytes,3,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time,omitempty"`
}

CheckpointStateUpdate defines a state transition on the checkpoint.

func (*CheckpointStateUpdate) Descriptor

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

func (*CheckpointStateUpdate) Equal

func (this *CheckpointStateUpdate) Equal(that interface{}) bool

func (*CheckpointStateUpdate) GetBlockHeight

func (m *CheckpointStateUpdate) GetBlockHeight() uint64

func (*CheckpointStateUpdate) GetBlockTime

func (m *CheckpointStateUpdate) GetBlockTime() *time.Time

func (*CheckpointStateUpdate) GetState

func (*CheckpointStateUpdate) Marshal

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

func (*CheckpointStateUpdate) MarshalTo

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

func (*CheckpointStateUpdate) MarshalToSizedBuffer

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

func (*CheckpointStateUpdate) ProtoMessage

func (*CheckpointStateUpdate) ProtoMessage()

func (*CheckpointStateUpdate) Reset

func (m *CheckpointStateUpdate) Reset()

func (*CheckpointStateUpdate) Size

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

func (*CheckpointStateUpdate) String

func (m *CheckpointStateUpdate) String() string

func (*CheckpointStateUpdate) Unmarshal

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

func (*CheckpointStateUpdate) XXX_DiscardUnknown

func (m *CheckpointStateUpdate) XXX_DiscardUnknown()

func (*CheckpointStateUpdate) XXX_Marshal

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

func (*CheckpointStateUpdate) XXX_Merge

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

func (*CheckpointStateUpdate) XXX_Size

func (m *CheckpointStateUpdate) XXX_Size() int

func (*CheckpointStateUpdate) XXX_Unmarshal

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

type CheckpointStatus

type CheckpointStatus int32

CheckpointStatus is the status of a checkpoint.

const (
	// ACCUMULATING defines a checkpoint that is awaiting for BLS signatures.
	Accumulating CheckpointStatus = 0
	// SEALED defines a checkpoint that has accumulated sufficient BLS signatures.
	Sealed CheckpointStatus = 1
	// SUBMITTED defines a checkpoint that is included on BTC.
	Submitted CheckpointStatus = 2
	// CONFIRMED defines a checkpoint that is k-deep on BTC.
	Confirmed CheckpointStatus = 3
	// FINALIZED defines a checkpoint that is w-deep on BTC.
	Finalized CheckpointStatus = 4
)

func (CheckpointStatus) EnumDescriptor

func (CheckpointStatus) EnumDescriptor() ([]byte, []int)

func (CheckpointStatus) String

func (x CheckpointStatus) String() string

type CheckpointingHooks

type CheckpointingHooks interface {
	AfterBlsKeyRegistered(ctx sdk.Context, valAddr sdk.ValAddress) error         // Must be called when a BLS key is registered
	AfterRawCheckpointConfirmed(ctx sdk.Context, epoch uint64) error             // Must be called when a raw checkpoint is CONFIRMED
	AfterRawCheckpointForgotten(ctx sdk.Context, ckpt *RawCheckpoint) error      // Must be called when a raw checkpoint is FORGOTTEN
	AfterRawCheckpointFinalized(ctx sdk.Context, epoch uint64) error             // Must be called when a raw checkpoint is FINALIZED
	AfterRawCheckpointBlsSigVerified(ctx sdk.Context, ckpt *RawCheckpoint) error // Must be called when a raw checkpoint's multi-sig is verified
}

CheckpointingHooks event hooks for raw checkpoint object (noalias)

type EpochingKeeper

type EpochingKeeper interface {
	GetEpoch(ctx sdk.Context) *epochingtypes.Epoch
	EnqueueMsg(ctx sdk.Context, msg epochingtypes.QueuedMessage)
	GetValidatorSet(ctx sdk.Context, epochNumer uint64) epochingtypes.ValidatorSet
	GetTotalVotingPower(ctx sdk.Context, epochNumber uint64) int64
	CheckMsgCreateValidator(ctx sdk.Context, msg *stakingtypes.MsgCreateValidator) error
}

EpochingKeeper defines the expected interface needed to retrieve epoch info

type EventCheckpointAccumulating

type EventCheckpointAccumulating struct {
	Checkpoint *RawCheckpointWithMeta `protobuf:"bytes,1,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
}

EventCheckpointAccumulating is emitted when a checkpoint reaches the `Accumulating` state.

func (*EventCheckpointAccumulating) Descriptor

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

func (*EventCheckpointAccumulating) GetCheckpoint

func (*EventCheckpointAccumulating) Marshal

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

func (*EventCheckpointAccumulating) MarshalTo

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

func (*EventCheckpointAccumulating) MarshalToSizedBuffer

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

func (*EventCheckpointAccumulating) ProtoMessage

func (*EventCheckpointAccumulating) ProtoMessage()

func (*EventCheckpointAccumulating) Reset

func (m *EventCheckpointAccumulating) Reset()

func (*EventCheckpointAccumulating) Size

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

func (*EventCheckpointAccumulating) String

func (m *EventCheckpointAccumulating) String() string

func (*EventCheckpointAccumulating) Unmarshal

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

func (*EventCheckpointAccumulating) XXX_DiscardUnknown

func (m *EventCheckpointAccumulating) XXX_DiscardUnknown()

func (*EventCheckpointAccumulating) XXX_Marshal

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

func (*EventCheckpointAccumulating) XXX_Merge

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

func (*EventCheckpointAccumulating) XXX_Size

func (m *EventCheckpointAccumulating) XXX_Size() int

func (*EventCheckpointAccumulating) XXX_Unmarshal

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

type EventCheckpointConfirmed

type EventCheckpointConfirmed struct {
	Checkpoint *RawCheckpointWithMeta `protobuf:"bytes,1,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
}

EventCheckpointConfirmed is emitted when a checkpoint reaches the `Confirmed` state.

func (*EventCheckpointConfirmed) Descriptor

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

func (*EventCheckpointConfirmed) GetCheckpoint

func (m *EventCheckpointConfirmed) GetCheckpoint() *RawCheckpointWithMeta

func (*EventCheckpointConfirmed) Marshal

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

func (*EventCheckpointConfirmed) MarshalTo

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

func (*EventCheckpointConfirmed) MarshalToSizedBuffer

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

func (*EventCheckpointConfirmed) ProtoMessage

func (*EventCheckpointConfirmed) ProtoMessage()

func (*EventCheckpointConfirmed) Reset

func (m *EventCheckpointConfirmed) Reset()

func (*EventCheckpointConfirmed) Size

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

func (*EventCheckpointConfirmed) String

func (m *EventCheckpointConfirmed) String() string

func (*EventCheckpointConfirmed) Unmarshal

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

func (*EventCheckpointConfirmed) XXX_DiscardUnknown

func (m *EventCheckpointConfirmed) XXX_DiscardUnknown()

func (*EventCheckpointConfirmed) XXX_Marshal

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

func (*EventCheckpointConfirmed) XXX_Merge

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

func (*EventCheckpointConfirmed) XXX_Size

func (m *EventCheckpointConfirmed) XXX_Size() int

func (*EventCheckpointConfirmed) XXX_Unmarshal

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

type EventCheckpointFinalized

type EventCheckpointFinalized struct {
	Checkpoint *RawCheckpointWithMeta `protobuf:"bytes,1,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
}

EventCheckpointFinalized is emitted when a checkpoint reaches the `Finalized` state.

func (*EventCheckpointFinalized) Descriptor

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

func (*EventCheckpointFinalized) GetCheckpoint

func (m *EventCheckpointFinalized) GetCheckpoint() *RawCheckpointWithMeta

func (*EventCheckpointFinalized) Marshal

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

func (*EventCheckpointFinalized) MarshalTo

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

func (*EventCheckpointFinalized) MarshalToSizedBuffer

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

func (*EventCheckpointFinalized) ProtoMessage

func (*EventCheckpointFinalized) ProtoMessage()

func (*EventCheckpointFinalized) Reset

func (m *EventCheckpointFinalized) Reset()

func (*EventCheckpointFinalized) Size

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

func (*EventCheckpointFinalized) String

func (m *EventCheckpointFinalized) String() string

func (*EventCheckpointFinalized) Unmarshal

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

func (*EventCheckpointFinalized) XXX_DiscardUnknown

func (m *EventCheckpointFinalized) XXX_DiscardUnknown()

func (*EventCheckpointFinalized) XXX_Marshal

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

func (*EventCheckpointFinalized) XXX_Merge

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

func (*EventCheckpointFinalized) XXX_Size

func (m *EventCheckpointFinalized) XXX_Size() int

func (*EventCheckpointFinalized) XXX_Unmarshal

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

type EventCheckpointForgotten

type EventCheckpointForgotten struct {
	Checkpoint *RawCheckpointWithMeta `protobuf:"bytes,1,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
}

EventCheckpointForgotten is emitted when a checkpoint switches to a `Forgotten` state.

func (*EventCheckpointForgotten) Descriptor

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

func (*EventCheckpointForgotten) GetCheckpoint

func (m *EventCheckpointForgotten) GetCheckpoint() *RawCheckpointWithMeta

func (*EventCheckpointForgotten) Marshal

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

func (*EventCheckpointForgotten) MarshalTo

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

func (*EventCheckpointForgotten) MarshalToSizedBuffer

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

func (*EventCheckpointForgotten) ProtoMessage

func (*EventCheckpointForgotten) ProtoMessage()

func (*EventCheckpointForgotten) Reset

func (m *EventCheckpointForgotten) Reset()

func (*EventCheckpointForgotten) Size

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

func (*EventCheckpointForgotten) String

func (m *EventCheckpointForgotten) String() string

func (*EventCheckpointForgotten) Unmarshal

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

func (*EventCheckpointForgotten) XXX_DiscardUnknown

func (m *EventCheckpointForgotten) XXX_DiscardUnknown()

func (*EventCheckpointForgotten) XXX_Marshal

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

func (*EventCheckpointForgotten) XXX_Merge

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

func (*EventCheckpointForgotten) XXX_Size

func (m *EventCheckpointForgotten) XXX_Size() int

func (*EventCheckpointForgotten) XXX_Unmarshal

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

type EventCheckpointSealed

type EventCheckpointSealed struct {
	Checkpoint *RawCheckpointWithMeta `protobuf:"bytes,1,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
}

EventCheckpointSealed is emitted when a checkpoint reaches the `Sealed` state.

func (*EventCheckpointSealed) Descriptor

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

func (*EventCheckpointSealed) GetCheckpoint

func (m *EventCheckpointSealed) GetCheckpoint() *RawCheckpointWithMeta

func (*EventCheckpointSealed) Marshal

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

func (*EventCheckpointSealed) MarshalTo

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

func (*EventCheckpointSealed) MarshalToSizedBuffer

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

func (*EventCheckpointSealed) ProtoMessage

func (*EventCheckpointSealed) ProtoMessage()

func (*EventCheckpointSealed) Reset

func (m *EventCheckpointSealed) Reset()

func (*EventCheckpointSealed) Size

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

func (*EventCheckpointSealed) String

func (m *EventCheckpointSealed) String() string

func (*EventCheckpointSealed) Unmarshal

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

func (*EventCheckpointSealed) XXX_DiscardUnknown

func (m *EventCheckpointSealed) XXX_DiscardUnknown()

func (*EventCheckpointSealed) XXX_Marshal

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

func (*EventCheckpointSealed) XXX_Merge

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

func (*EventCheckpointSealed) XXX_Size

func (m *EventCheckpointSealed) XXX_Size() int

func (*EventCheckpointSealed) XXX_Unmarshal

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

type EventCheckpointSubmitted

type EventCheckpointSubmitted struct {
	Checkpoint *RawCheckpointWithMeta `protobuf:"bytes,1,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
}

EventCheckpointSubmitted is emitted when a checkpoint reaches the `Submitted` state.

func (*EventCheckpointSubmitted) Descriptor

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

func (*EventCheckpointSubmitted) GetCheckpoint

func (m *EventCheckpointSubmitted) GetCheckpoint() *RawCheckpointWithMeta

func (*EventCheckpointSubmitted) Marshal

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

func (*EventCheckpointSubmitted) MarshalTo

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

func (*EventCheckpointSubmitted) MarshalToSizedBuffer

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

func (*EventCheckpointSubmitted) ProtoMessage

func (*EventCheckpointSubmitted) ProtoMessage()

func (*EventCheckpointSubmitted) Reset

func (m *EventCheckpointSubmitted) Reset()

func (*EventCheckpointSubmitted) Size

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

func (*EventCheckpointSubmitted) String

func (m *EventCheckpointSubmitted) String() string

func (*EventCheckpointSubmitted) Unmarshal

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

func (*EventCheckpointSubmitted) XXX_DiscardUnknown

func (m *EventCheckpointSubmitted) XXX_DiscardUnknown()

func (*EventCheckpointSubmitted) XXX_Marshal

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

func (*EventCheckpointSubmitted) XXX_Merge

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

func (*EventCheckpointSubmitted) XXX_Size

func (m *EventCheckpointSubmitted) XXX_Size() int

func (*EventCheckpointSubmitted) XXX_Unmarshal

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

type EventConflictingCheckpoint

type EventConflictingCheckpoint struct {
	ConflictingCheckpoint *RawCheckpoint         `protobuf:"bytes,1,opt,name=conflicting_checkpoint,json=conflictingCheckpoint,proto3" json:"conflicting_checkpoint,omitempty"`
	LocalCheckpoint       *RawCheckpointWithMeta `protobuf:"bytes,2,opt,name=local_checkpoint,json=localCheckpoint,proto3" json:"local_checkpoint,omitempty"`
}

EventConflictingCheckpoint is emitted when two conflicting checkpoints are found.

func (*EventConflictingCheckpoint) Descriptor

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

func (*EventConflictingCheckpoint) GetConflictingCheckpoint

func (m *EventConflictingCheckpoint) GetConflictingCheckpoint() *RawCheckpoint

func (*EventConflictingCheckpoint) GetLocalCheckpoint

func (m *EventConflictingCheckpoint) GetLocalCheckpoint() *RawCheckpointWithMeta

func (*EventConflictingCheckpoint) Marshal

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

func (*EventConflictingCheckpoint) MarshalTo

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

func (*EventConflictingCheckpoint) MarshalToSizedBuffer

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

func (*EventConflictingCheckpoint) ProtoMessage

func (*EventConflictingCheckpoint) ProtoMessage()

func (*EventConflictingCheckpoint) Reset

func (m *EventConflictingCheckpoint) Reset()

func (*EventConflictingCheckpoint) Size

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

func (*EventConflictingCheckpoint) String

func (m *EventConflictingCheckpoint) String() string

func (*EventConflictingCheckpoint) Unmarshal

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

func (*EventConflictingCheckpoint) XXX_DiscardUnknown

func (m *EventConflictingCheckpoint) XXX_DiscardUnknown()

func (*EventConflictingCheckpoint) XXX_Marshal

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

func (*EventConflictingCheckpoint) XXX_Merge

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

func (*EventConflictingCheckpoint) XXX_Size

func (m *EventConflictingCheckpoint) XXX_Size() int

func (*EventConflictingCheckpoint) XXX_Unmarshal

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

type GenesisKey

type GenesisKey struct {
	// validator_address is the address corresponding to a validator
	ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
	// bls_key defines the BLS key of the validator at genesis
	BlsKey *BlsKey `protobuf:"bytes,2,opt,name=bls_key,json=blsKey,proto3" json:"bls_key,omitempty"`
	// val_pubkey defines the ed25519 public key of the validator at genesis
	ValPubkey *ed25519.PubKey `protobuf:"bytes,3,opt,name=val_pubkey,json=valPubkey,proto3" json:"val_pubkey,omitempty"`
}

GenesisKey defines public key information about the genesis validators

func LoadGenesisKeyFromFile

func LoadGenesisKeyFromFile(filePath string) (*GenesisKey, error)

func NewGenesisKey

func NewGenesisKey(delAddr sdk.ValAddress, blsPubKey *bls12381.PublicKey, pop *ProofOfPossession, pubkey cryptotypes.PubKey) (*GenesisKey, error)

func (*GenesisKey) Descriptor

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

func (*GenesisKey) GetBlsKey

func (m *GenesisKey) GetBlsKey() *BlsKey

func (*GenesisKey) GetValPubkey

func (m *GenesisKey) GetValPubkey() *ed25519.PubKey

func (*GenesisKey) GetValidatorAddress

func (m *GenesisKey) GetValidatorAddress() string

func (*GenesisKey) Marshal

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

func (*GenesisKey) MarshalTo

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

func (*GenesisKey) MarshalToSizedBuffer

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

func (*GenesisKey) ProtoMessage

func (*GenesisKey) ProtoMessage()

func (*GenesisKey) Reset

func (m *GenesisKey) Reset()

func (*GenesisKey) Size

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

func (*GenesisKey) String

func (m *GenesisKey) String() string

func (*GenesisKey) Unmarshal

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

func (*GenesisKey) Validate

func (gk *GenesisKey) Validate() error

func (*GenesisKey) XXX_DiscardUnknown

func (m *GenesisKey) XXX_DiscardUnknown()

func (*GenesisKey) XXX_Marshal

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

func (*GenesisKey) XXX_Merge

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

func (*GenesisKey) XXX_Size

func (m *GenesisKey) XXX_Size() int

func (*GenesisKey) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// genesis_keys defines the public keys for the genesis validators
	GenesisKeys []*GenesisKey `protobuf:"bytes,1,rep,name=genesis_keys,json=genesisKeys,proto3" json:"genesis_keys,omitempty"`
}

GenesisState defines the checkpointing module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMessage) GenesisState

GetGenesisStateFromAppState returns x/Checkpointing GenesisState given raw application genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetGenesisKeys

func (m *GenesisState) GetGenesisKeys() []*GenesisKey

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) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 LastCommitHash

type LastCommitHash []byte

func NewLastCommitHashFromHex

func NewLastCommitHashFromHex(s string) (LastCommitHash, error)

func (*LastCommitHash) Equal

func (lch *LastCommitHash) Equal(l LastCommitHash) bool

func (*LastCommitHash) Marshal

func (lch *LastCommitHash) Marshal() ([]byte, error)

func (LastCommitHash) MarshalTo

func (lch LastCommitHash) MarshalTo(data []byte) (int, error)

func (*LastCommitHash) MustMarshal

func (lch *LastCommitHash) MustMarshal() []byte

func (*LastCommitHash) Size

func (lch *LastCommitHash) Size() (n int)

func (*LastCommitHash) String

func (lch *LastCommitHash) String() string

func (*LastCommitHash) Unmarshal

func (lch *LastCommitHash) Unmarshal(bz []byte) error

func (*LastCommitHash) ValidateBasic

func (lch *LastCommitHash) ValidateBasic() error

type MsgAddBlsSig

type MsgAddBlsSig struct {
	// signer corresponds to the submitter of the transaction
	// This might be a different entity compared to the one that created the BLS signature
	// (i.e. the validator owner of the BLS key which is specified by the `bls_sig.signer_address`)
	Signer string  `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	BlsSig *BlsSig `protobuf:"bytes,2,opt,name=bls_sig,json=blsSig,proto3" json:"bls_sig,omitempty"`
}

MsgAddBlsSig defines a message to add a bls signature from a validator

func NewMsgAddBlsSig

func NewMsgAddBlsSig(signer sdk.AccAddress, epochNum uint64, lch LastCommitHash, sig bls12381.Signature, addr sdk.ValAddress) *MsgAddBlsSig

func (*MsgAddBlsSig) Descriptor

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

func (*MsgAddBlsSig) GetSigners

func (m *MsgAddBlsSig) GetSigners() []sdk.AccAddress

func (*MsgAddBlsSig) Marshal

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

func (*MsgAddBlsSig) MarshalTo

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

func (*MsgAddBlsSig) MarshalToSizedBuffer

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

func (*MsgAddBlsSig) ProtoMessage

func (*MsgAddBlsSig) ProtoMessage()

func (*MsgAddBlsSig) Reset

func (m *MsgAddBlsSig) Reset()

func (*MsgAddBlsSig) Size

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

func (*MsgAddBlsSig) String

func (m *MsgAddBlsSig) String() string

func (*MsgAddBlsSig) Unmarshal

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

func (*MsgAddBlsSig) ValidateBasic

func (m *MsgAddBlsSig) ValidateBasic() error

ValidateBasic validates stateless message elements

func (*MsgAddBlsSig) XXX_DiscardUnknown

func (m *MsgAddBlsSig) XXX_DiscardUnknown()

func (*MsgAddBlsSig) XXX_Marshal

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

func (*MsgAddBlsSig) XXX_Merge

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

func (*MsgAddBlsSig) XXX_Size

func (m *MsgAddBlsSig) XXX_Size() int

func (*MsgAddBlsSig) XXX_Unmarshal

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

type MsgAddBlsSigResponse

type MsgAddBlsSigResponse struct {
}

MsgAddBlsSigResponse defines the MsgAddBlsSig response type.

func (*MsgAddBlsSigResponse) Descriptor

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

func (*MsgAddBlsSigResponse) Marshal

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

func (*MsgAddBlsSigResponse) MarshalTo

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

func (*MsgAddBlsSigResponse) MarshalToSizedBuffer

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

func (*MsgAddBlsSigResponse) ProtoMessage

func (*MsgAddBlsSigResponse) ProtoMessage()

func (*MsgAddBlsSigResponse) Reset

func (m *MsgAddBlsSigResponse) Reset()

func (*MsgAddBlsSigResponse) Size

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

func (*MsgAddBlsSigResponse) String

func (m *MsgAddBlsSigResponse) String() string

func (*MsgAddBlsSigResponse) Unmarshal

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

func (*MsgAddBlsSigResponse) XXX_DiscardUnknown

func (m *MsgAddBlsSigResponse) XXX_DiscardUnknown()

func (*MsgAddBlsSigResponse) XXX_Marshal

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

func (*MsgAddBlsSigResponse) XXX_Merge

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

func (*MsgAddBlsSigResponse) XXX_Size

func (m *MsgAddBlsSigResponse) XXX_Size() int

func (*MsgAddBlsSigResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// AddBlsSig defines a method for accumulating BLS signatures
	AddBlsSig(ctx context.Context, in *MsgAddBlsSig, opts ...grpc.CallOption) (*MsgAddBlsSigResponse, error)
	// WrappedCreateValidator defines a method for registering a new validator
	WrappedCreateValidator(ctx context.Context, in *MsgWrappedCreateValidator, opts ...grpc.CallOption) (*MsgWrappedCreateValidatorResponse, error)
}

MsgClient is the client API for Msg service.

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

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgServer

type MsgServer interface {
	// AddBlsSig defines a method for accumulating BLS signatures
	AddBlsSig(context.Context, *MsgAddBlsSig) (*MsgAddBlsSigResponse, error)
	// WrappedCreateValidator defines a method for registering a new validator
	WrappedCreateValidator(context.Context, *MsgWrappedCreateValidator) (*MsgWrappedCreateValidatorResponse, error)
}

MsgServer is the server API for Msg service.

type MsgWrappedCreateValidator

type MsgWrappedCreateValidator struct {
	Key                *BlsKey                   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	MsgCreateValidator *types.MsgCreateValidator `protobuf:"bytes,2,opt,name=msg_create_validator,json=msgCreateValidator,proto3" json:"msg_create_validator,omitempty"`
}

MsgWrappedCreateValidator defines a wrapped message to create a validator

func (*MsgWrappedCreateValidator) Descriptor

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

func (*MsgWrappedCreateValidator) GetSigners

func (m *MsgWrappedCreateValidator) GetSigners() []sdk.AccAddress

func (*MsgWrappedCreateValidator) Marshal

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

func (*MsgWrappedCreateValidator) MarshalTo

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

func (*MsgWrappedCreateValidator) MarshalToSizedBuffer

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

func (*MsgWrappedCreateValidator) ProtoMessage

func (*MsgWrappedCreateValidator) ProtoMessage()

func (*MsgWrappedCreateValidator) Reset

func (m *MsgWrappedCreateValidator) Reset()

func (*MsgWrappedCreateValidator) Size

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

func (*MsgWrappedCreateValidator) String

func (m *MsgWrappedCreateValidator) String() string

func (*MsgWrappedCreateValidator) Unmarshal

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

func (MsgWrappedCreateValidator) UnpackInterfaces added in v0.7.1

func (msg MsgWrappedCreateValidator) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces Needed since msg.MsgCreateValidator.Pubkey is in type Any

func (*MsgWrappedCreateValidator) ValidateBasic

func (m *MsgWrappedCreateValidator) ValidateBasic() error

ValidateBasic validates statelesss message elements

func (*MsgWrappedCreateValidator) VerifyPoP

func (m *MsgWrappedCreateValidator) VerifyPoP(valPubkey cryptotypes.PubKey) bool

func (*MsgWrappedCreateValidator) XXX_DiscardUnknown

func (m *MsgWrappedCreateValidator) XXX_DiscardUnknown()

func (*MsgWrappedCreateValidator) XXX_Marshal

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

func (*MsgWrappedCreateValidator) XXX_Merge

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

func (*MsgWrappedCreateValidator) XXX_Size

func (m *MsgWrappedCreateValidator) XXX_Size() int

func (*MsgWrappedCreateValidator) XXX_Unmarshal

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

type MsgWrappedCreateValidatorResponse

type MsgWrappedCreateValidatorResponse struct {
}

MsgWrappedCreateValidatorResponse defines the MsgWrappedCreateValidator response type

func (*MsgWrappedCreateValidatorResponse) Descriptor

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

func (*MsgWrappedCreateValidatorResponse) Marshal

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

func (*MsgWrappedCreateValidatorResponse) MarshalTo

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

func (*MsgWrappedCreateValidatorResponse) MarshalToSizedBuffer

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

func (*MsgWrappedCreateValidatorResponse) ProtoMessage

func (*MsgWrappedCreateValidatorResponse) ProtoMessage()

func (*MsgWrappedCreateValidatorResponse) Reset

func (*MsgWrappedCreateValidatorResponse) Size

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

func (*MsgWrappedCreateValidatorResponse) String

func (*MsgWrappedCreateValidatorResponse) Unmarshal

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

func (*MsgWrappedCreateValidatorResponse) XXX_DiscardUnknown

func (m *MsgWrappedCreateValidatorResponse) XXX_DiscardUnknown()

func (*MsgWrappedCreateValidatorResponse) XXX_Marshal

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

func (*MsgWrappedCreateValidatorResponse) XXX_Merge

func (*MsgWrappedCreateValidatorResponse) XXX_Size

func (m *MsgWrappedCreateValidatorResponse) XXX_Size() int

func (*MsgWrappedCreateValidatorResponse) XXX_Unmarshal

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

type MultiCheckpointingHooks

type MultiCheckpointingHooks []CheckpointingHooks

func NewMultiCheckpointingHooks

func NewMultiCheckpointingHooks(hooks ...CheckpointingHooks) MultiCheckpointingHooks

func (MultiCheckpointingHooks) AfterBlsKeyRegistered

func (h MultiCheckpointingHooks) AfterBlsKeyRegistered(ctx sdk.Context, valAddr sdk.ValAddress) error

func (MultiCheckpointingHooks) AfterRawCheckpointBlsSigVerified

func (h MultiCheckpointingHooks) AfterRawCheckpointBlsSigVerified(ctx sdk.Context, ckpt *RawCheckpoint) error

func (MultiCheckpointingHooks) AfterRawCheckpointConfirmed

func (h MultiCheckpointingHooks) AfterRawCheckpointConfirmed(ctx sdk.Context, epoch uint64) error

func (MultiCheckpointingHooks) AfterRawCheckpointFinalized

func (h MultiCheckpointingHooks) AfterRawCheckpointFinalized(ctx sdk.Context, epoch uint64) error

func (MultiCheckpointingHooks) AfterRawCheckpointForgotten

func (h MultiCheckpointingHooks) AfterRawCheckpointForgotten(ctx sdk.Context, ckpt *RawCheckpoint) error

type ProofOfPossession

type ProofOfPossession struct {
	// ed25519_sig is used for verification, ed25519_sig = sign(key = Ed25519_sk,
	// data = BLS_pk)
	Ed25519Sig []byte `protobuf:"bytes,2,opt,name=ed25519_sig,json=ed25519Sig,proto3" json:"ed25519_sig,omitempty"`
	// bls_sig is the result of PoP, bls_sig = sign(key = BLS_sk, data =
	// ed25519_sig)
	BlsSig *github_com_babylonchain_babylon_crypto_bls12381.Signature `` /* 148-byte string literal not displayed */
}

ProofOfPossession defines proof for the ownership of Ed25519 and BLS private keys

func (*ProofOfPossession) Descriptor

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

func (*ProofOfPossession) GetEd25519Sig

func (m *ProofOfPossession) GetEd25519Sig() []byte

func (ProofOfPossession) IsValid

func (pop ProofOfPossession) IsValid(blsPubkey bls12381.PublicKey, valPubkey cryptotypes.PubKey) bool

IsValid verifies the validity of PoP 1. verify(sig=bls_sig, pubkey=blsPubkey, msg=pop.ed25519_sig)? 2. verify(sig=pop.ed25519_sig, pubkey=valPubkey, msg=blsPubkey)? BLS_pk ?= decrypt(key = Ed25519_pk, data = decrypt(key = BLS_pk, data = PoP))

func (*ProofOfPossession) Marshal

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

func (*ProofOfPossession) MarshalTo

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

func (*ProofOfPossession) MarshalToSizedBuffer

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

func (*ProofOfPossession) ProtoMessage

func (*ProofOfPossession) ProtoMessage()

func (*ProofOfPossession) Reset

func (m *ProofOfPossession) Reset()

func (*ProofOfPossession) Size

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

func (*ProofOfPossession) String

func (m *ProofOfPossession) String() string

func (*ProofOfPossession) Unmarshal

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

func (*ProofOfPossession) XXX_DiscardUnknown

func (m *ProofOfPossession) XXX_DiscardUnknown()

func (*ProofOfPossession) XXX_Marshal

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

func (*ProofOfPossession) XXX_Merge

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

func (*ProofOfPossession) XXX_Size

func (m *ProofOfPossession) XXX_Size() int

func (*ProofOfPossession) XXX_Unmarshal

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

type QueryBlsPublicKeyListRequest

type QueryBlsPublicKeyListRequest struct {
	// epoch_num defines the epoch for the queried bls public keys
	EpochNum uint64 `protobuf:"varint,1,opt,name=epoch_num,json=epochNum,proto3" json:"epoch_num,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryBlsPublicKeyListRequest is the request type for the Query/BlsPublicKeys RPC method.

func (*QueryBlsPublicKeyListRequest) Descriptor

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

func (*QueryBlsPublicKeyListRequest) GetEpochNum

func (m *QueryBlsPublicKeyListRequest) GetEpochNum() uint64

func (*QueryBlsPublicKeyListRequest) GetPagination

func (m *QueryBlsPublicKeyListRequest) GetPagination() *query.PageRequest

func (*QueryBlsPublicKeyListRequest) Marshal

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

func (*QueryBlsPublicKeyListRequest) MarshalTo

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

func (*QueryBlsPublicKeyListRequest) MarshalToSizedBuffer

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

func (*QueryBlsPublicKeyListRequest) ProtoMessage

func (*QueryBlsPublicKeyListRequest) ProtoMessage()

func (*QueryBlsPublicKeyListRequest) Reset

func (m *QueryBlsPublicKeyListRequest) Reset()

func (*QueryBlsPublicKeyListRequest) Size

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

func (*QueryBlsPublicKeyListRequest) String

func (*QueryBlsPublicKeyListRequest) Unmarshal

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

func (*QueryBlsPublicKeyListRequest) XXX_DiscardUnknown

func (m *QueryBlsPublicKeyListRequest) XXX_DiscardUnknown()

func (*QueryBlsPublicKeyListRequest) XXX_Marshal

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

func (*QueryBlsPublicKeyListRequest) XXX_Merge

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

func (*QueryBlsPublicKeyListRequest) XXX_Size

func (m *QueryBlsPublicKeyListRequest) XXX_Size() int

func (*QueryBlsPublicKeyListRequest) XXX_Unmarshal

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

type QueryBlsPublicKeyListResponse

type QueryBlsPublicKeyListResponse struct {
	ValidatorWithBlsKeys []*ValidatorWithBlsKey `protobuf:"bytes,1,rep,name=validator_with_bls_keys,json=validatorWithBlsKeys,proto3" json:"validator_with_bls_keys,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryBlsPublicKeyListResponse is the response type for the Query/BlsPublicKeys RPC method.

func (*QueryBlsPublicKeyListResponse) Descriptor

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

func (*QueryBlsPublicKeyListResponse) GetPagination

func (m *QueryBlsPublicKeyListResponse) GetPagination() *query.PageResponse

func (*QueryBlsPublicKeyListResponse) GetValidatorWithBlsKeys

func (m *QueryBlsPublicKeyListResponse) GetValidatorWithBlsKeys() []*ValidatorWithBlsKey

func (*QueryBlsPublicKeyListResponse) Marshal

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

func (*QueryBlsPublicKeyListResponse) MarshalTo

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

func (*QueryBlsPublicKeyListResponse) MarshalToSizedBuffer

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

func (*QueryBlsPublicKeyListResponse) ProtoMessage

func (*QueryBlsPublicKeyListResponse) ProtoMessage()

func (*QueryBlsPublicKeyListResponse) Reset

func (m *QueryBlsPublicKeyListResponse) Reset()

func (*QueryBlsPublicKeyListResponse) Size

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

func (*QueryBlsPublicKeyListResponse) String

func (*QueryBlsPublicKeyListResponse) Unmarshal

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

func (*QueryBlsPublicKeyListResponse) XXX_DiscardUnknown

func (m *QueryBlsPublicKeyListResponse) XXX_DiscardUnknown()

func (*QueryBlsPublicKeyListResponse) XXX_Marshal

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

func (*QueryBlsPublicKeyListResponse) XXX_Merge

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

func (*QueryBlsPublicKeyListResponse) XXX_Size

func (m *QueryBlsPublicKeyListResponse) XXX_Size() int

func (*QueryBlsPublicKeyListResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// RawCheckpointList queries all checkpoints that match the given status.
	RawCheckpointList(ctx context.Context, in *QueryRawCheckpointListRequest, opts ...grpc.CallOption) (*QueryRawCheckpointListResponse, error)
	// RawCheckpoint queries a checkpoints at a given epoch number.
	RawCheckpoint(ctx context.Context, in *QueryRawCheckpointRequest, opts ...grpc.CallOption) (*QueryRawCheckpointResponse, error)
	// RawCheckpoints queries checkpoints for a epoch range specified in pagination params.
	RawCheckpoints(ctx context.Context, in *QueryRawCheckpointsRequest, opts ...grpc.CallOption) (*QueryRawCheckpointsResponse, error)
	// BlsPublicKeyList queries a list of bls public keys of the validators at a
	// given epoch number.
	BlsPublicKeyList(ctx context.Context, in *QueryBlsPublicKeyListRequest, opts ...grpc.CallOption) (*QueryBlsPublicKeyListResponse, error)
	// EpochStatus queries the status of the checkpoint at a given epoch
	EpochStatus(ctx context.Context, in *QueryEpochStatusRequest, opts ...grpc.CallOption) (*QueryEpochStatusResponse, error)
	// RecentEpochStatusCount queries the number of epochs with each status in
	// recent epochs
	RecentEpochStatusCount(ctx context.Context, in *QueryRecentEpochStatusCountRequest, opts ...grpc.CallOption) (*QueryRecentEpochStatusCountResponse, error)
	// LastCheckpointWithStatus queries the last checkpoint with a given status or
	// a more matured status
	LastCheckpointWithStatus(ctx context.Context, in *QueryLastCheckpointWithStatusRequest, opts ...grpc.CallOption) (*QueryLastCheckpointWithStatusResponse, error)
}

QueryClient is the client API for Query service.

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

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryEpochStatusRequest

type QueryEpochStatusRequest struct {
	EpochNum uint64 `protobuf:"varint,1,opt,name=epoch_num,json=epochNum,proto3" json:"epoch_num,omitempty"`
}

QueryEpochStatusRequest is the request type for the Query/EpochStatus RPC method.

func NewQueryEpochStatusRequest

func NewQueryEpochStatusRequest(epochNum uint64) *QueryEpochStatusRequest

func (*QueryEpochStatusRequest) Descriptor

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

func (*QueryEpochStatusRequest) GetEpochNum

func (m *QueryEpochStatusRequest) GetEpochNum() uint64

func (*QueryEpochStatusRequest) Marshal

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

func (*QueryEpochStatusRequest) MarshalTo

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

func (*QueryEpochStatusRequest) MarshalToSizedBuffer

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

func (*QueryEpochStatusRequest) ProtoMessage

func (*QueryEpochStatusRequest) ProtoMessage()

func (*QueryEpochStatusRequest) Reset

func (m *QueryEpochStatusRequest) Reset()

func (*QueryEpochStatusRequest) Size

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

func (*QueryEpochStatusRequest) String

func (m *QueryEpochStatusRequest) String() string

func (*QueryEpochStatusRequest) Unmarshal

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

func (*QueryEpochStatusRequest) XXX_DiscardUnknown

func (m *QueryEpochStatusRequest) XXX_DiscardUnknown()

func (*QueryEpochStatusRequest) XXX_Marshal

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

func (*QueryEpochStatusRequest) XXX_Merge

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

func (*QueryEpochStatusRequest) XXX_Size

func (m *QueryEpochStatusRequest) XXX_Size() int

func (*QueryEpochStatusRequest) XXX_Unmarshal

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

type QueryEpochStatusResponse

type QueryEpochStatusResponse struct {
	Status CheckpointStatus `protobuf:"varint,1,opt,name=status,proto3,enum=babylon.checkpointing.v1.CheckpointStatus" json:"status,omitempty"`
}

QueryEpochStatusResponse is the response type for the Query/EpochStatus RPC method.

func (*QueryEpochStatusResponse) Descriptor

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

func (*QueryEpochStatusResponse) GetStatus

func (*QueryEpochStatusResponse) Marshal

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

func (*QueryEpochStatusResponse) MarshalTo

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

func (*QueryEpochStatusResponse) MarshalToSizedBuffer

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

func (*QueryEpochStatusResponse) ProtoMessage

func (*QueryEpochStatusResponse) ProtoMessage()

func (*QueryEpochStatusResponse) Reset

func (m *QueryEpochStatusResponse) Reset()

func (*QueryEpochStatusResponse) Size

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

func (*QueryEpochStatusResponse) String

func (m *QueryEpochStatusResponse) String() string

func (*QueryEpochStatusResponse) Unmarshal

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

func (*QueryEpochStatusResponse) XXX_DiscardUnknown

func (m *QueryEpochStatusResponse) XXX_DiscardUnknown()

func (*QueryEpochStatusResponse) XXX_Marshal

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

func (*QueryEpochStatusResponse) XXX_Merge

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

func (*QueryEpochStatusResponse) XXX_Size

func (m *QueryEpochStatusResponse) XXX_Size() int

func (*QueryEpochStatusResponse) XXX_Unmarshal

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

type QueryLastCheckpointWithStatusRequest

type QueryLastCheckpointWithStatusRequest struct {
	Status CheckpointStatus `protobuf:"varint,1,opt,name=status,proto3,enum=babylon.checkpointing.v1.CheckpointStatus" json:"status,omitempty"`
}

QueryLastCheckpointWithStatusRequest is the request type for the Query/LastCheckpointWithStatus RPC method.

func (*QueryLastCheckpointWithStatusRequest) Descriptor

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

func (*QueryLastCheckpointWithStatusRequest) GetStatus

func (*QueryLastCheckpointWithStatusRequest) Marshal

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

func (*QueryLastCheckpointWithStatusRequest) MarshalTo

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

func (*QueryLastCheckpointWithStatusRequest) MarshalToSizedBuffer

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

func (*QueryLastCheckpointWithStatusRequest) ProtoMessage

func (*QueryLastCheckpointWithStatusRequest) ProtoMessage()

func (*QueryLastCheckpointWithStatusRequest) Reset

func (*QueryLastCheckpointWithStatusRequest) Size

func (*QueryLastCheckpointWithStatusRequest) String

func (*QueryLastCheckpointWithStatusRequest) Unmarshal

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

func (*QueryLastCheckpointWithStatusRequest) XXX_DiscardUnknown

func (m *QueryLastCheckpointWithStatusRequest) XXX_DiscardUnknown()

func (*QueryLastCheckpointWithStatusRequest) XXX_Marshal

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

func (*QueryLastCheckpointWithStatusRequest) XXX_Merge

func (*QueryLastCheckpointWithStatusRequest) XXX_Size

func (*QueryLastCheckpointWithStatusRequest) XXX_Unmarshal

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

type QueryLastCheckpointWithStatusResponse

type QueryLastCheckpointWithStatusResponse struct {
	RawCheckpoint *RawCheckpoint `protobuf:"bytes,1,opt,name=raw_checkpoint,json=rawCheckpoint,proto3" json:"raw_checkpoint,omitempty"`
}

QueryLastCheckpointWithStatusResponse is the response type for the Query/LastCheckpointWithStatus RPC method.

func (*QueryLastCheckpointWithStatusResponse) Descriptor

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

func (*QueryLastCheckpointWithStatusResponse) GetRawCheckpoint

func (*QueryLastCheckpointWithStatusResponse) Marshal

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

func (*QueryLastCheckpointWithStatusResponse) MarshalTo

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

func (*QueryLastCheckpointWithStatusResponse) MarshalToSizedBuffer

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

func (*QueryLastCheckpointWithStatusResponse) ProtoMessage

func (*QueryLastCheckpointWithStatusResponse) ProtoMessage()

func (*QueryLastCheckpointWithStatusResponse) Reset

func (*QueryLastCheckpointWithStatusResponse) Size

func (*QueryLastCheckpointWithStatusResponse) String

func (*QueryLastCheckpointWithStatusResponse) Unmarshal

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

func (*QueryLastCheckpointWithStatusResponse) XXX_DiscardUnknown

func (m *QueryLastCheckpointWithStatusResponse) XXX_DiscardUnknown()

func (*QueryLastCheckpointWithStatusResponse) XXX_Marshal

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

func (*QueryLastCheckpointWithStatusResponse) XXX_Merge

func (*QueryLastCheckpointWithStatusResponse) XXX_Size

func (*QueryLastCheckpointWithStatusResponse) XXX_Unmarshal

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

type QueryRawCheckpointListRequest

type QueryRawCheckpointListRequest struct {
	// status defines the status of the raw checkpoints of the query
	Status CheckpointStatus `protobuf:"varint,1,opt,name=status,proto3,enum=babylon.checkpointing.v1.CheckpointStatus" json:"status,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRawCheckpointListRequest is the request type for the Query/RawCheckpoints RPC method.

func NewQueryRawCheckpointListRequest

func NewQueryRawCheckpointListRequest(req *query.PageRequest, status CheckpointStatus) *QueryRawCheckpointListRequest

NewQueryRawCheckpointListRequest creates a new instance of QueryRawCheckpointListRequest.

func (*QueryRawCheckpointListRequest) Descriptor

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

func (*QueryRawCheckpointListRequest) GetPagination

func (m *QueryRawCheckpointListRequest) GetPagination() *query.PageRequest

func (*QueryRawCheckpointListRequest) GetStatus

func (*QueryRawCheckpointListRequest) Marshal

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

func (*QueryRawCheckpointListRequest) MarshalTo

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

func (*QueryRawCheckpointListRequest) MarshalToSizedBuffer

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

func (*QueryRawCheckpointListRequest) ProtoMessage

func (*QueryRawCheckpointListRequest) ProtoMessage()

func (*QueryRawCheckpointListRequest) Reset

func (m *QueryRawCheckpointListRequest) Reset()

func (*QueryRawCheckpointListRequest) Size

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

func (*QueryRawCheckpointListRequest) String

func (*QueryRawCheckpointListRequest) Unmarshal

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

func (*QueryRawCheckpointListRequest) XXX_DiscardUnknown

func (m *QueryRawCheckpointListRequest) XXX_DiscardUnknown()

func (*QueryRawCheckpointListRequest) XXX_Marshal

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

func (*QueryRawCheckpointListRequest) XXX_Merge

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

func (*QueryRawCheckpointListRequest) XXX_Size

func (m *QueryRawCheckpointListRequest) XXX_Size() int

func (*QueryRawCheckpointListRequest) XXX_Unmarshal

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

type QueryRawCheckpointListResponse

type QueryRawCheckpointListResponse struct {
	// the order is going from the newest to oldest based on the epoch number
	RawCheckpoints []*RawCheckpointWithMeta `protobuf:"bytes,1,rep,name=raw_checkpoints,json=rawCheckpoints,proto3" json:"raw_checkpoints,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRawCheckpointListResponse is the response type for the Query/RawCheckpoints RPC method.

func (*QueryRawCheckpointListResponse) Descriptor

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

func (*QueryRawCheckpointListResponse) GetPagination

func (*QueryRawCheckpointListResponse) GetRawCheckpoints

func (m *QueryRawCheckpointListResponse) GetRawCheckpoints() []*RawCheckpointWithMeta

func (*QueryRawCheckpointListResponse) Marshal

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

func (*QueryRawCheckpointListResponse) MarshalTo

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

func (*QueryRawCheckpointListResponse) MarshalToSizedBuffer

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

func (*QueryRawCheckpointListResponse) ProtoMessage

func (*QueryRawCheckpointListResponse) ProtoMessage()

func (*QueryRawCheckpointListResponse) Reset

func (m *QueryRawCheckpointListResponse) Reset()

func (*QueryRawCheckpointListResponse) Size

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

func (*QueryRawCheckpointListResponse) String

func (*QueryRawCheckpointListResponse) Unmarshal

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

func (*QueryRawCheckpointListResponse) XXX_DiscardUnknown

func (m *QueryRawCheckpointListResponse) XXX_DiscardUnknown()

func (*QueryRawCheckpointListResponse) XXX_Marshal

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

func (*QueryRawCheckpointListResponse) XXX_Merge

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

func (*QueryRawCheckpointListResponse) XXX_Size

func (m *QueryRawCheckpointListResponse) XXX_Size() int

func (*QueryRawCheckpointListResponse) XXX_Unmarshal

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

type QueryRawCheckpointRequest

type QueryRawCheckpointRequest struct {
	// epoch_num defines the epoch for the queried checkpoint
	EpochNum uint64 `protobuf:"varint,1,opt,name=epoch_num,json=epochNum,proto3" json:"epoch_num,omitempty"`
}

QueryRawCheckpointRequest is the request type for the Query/RawCheckpoint RPC method.

func NewQueryRawCheckpointRequest

func NewQueryRawCheckpointRequest(epochNum uint64) *QueryRawCheckpointRequest

NewQueryRawCheckpointRequest creates a new instance of QueryRawCheckpointRequest.

func (*QueryRawCheckpointRequest) Descriptor

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

func (*QueryRawCheckpointRequest) GetEpochNum

func (m *QueryRawCheckpointRequest) GetEpochNum() uint64

func (*QueryRawCheckpointRequest) Marshal

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

func (*QueryRawCheckpointRequest) MarshalTo

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

func (*QueryRawCheckpointRequest) MarshalToSizedBuffer

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

func (*QueryRawCheckpointRequest) ProtoMessage

func (*QueryRawCheckpointRequest) ProtoMessage()

func (*QueryRawCheckpointRequest) Reset

func (m *QueryRawCheckpointRequest) Reset()

func (*QueryRawCheckpointRequest) Size

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

func (*QueryRawCheckpointRequest) String

func (m *QueryRawCheckpointRequest) String() string

func (*QueryRawCheckpointRequest) Unmarshal

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

func (*QueryRawCheckpointRequest) XXX_DiscardUnknown

func (m *QueryRawCheckpointRequest) XXX_DiscardUnknown()

func (*QueryRawCheckpointRequest) XXX_Marshal

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

func (*QueryRawCheckpointRequest) XXX_Merge

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

func (*QueryRawCheckpointRequest) XXX_Size

func (m *QueryRawCheckpointRequest) XXX_Size() int

func (*QueryRawCheckpointRequest) XXX_Unmarshal

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

type QueryRawCheckpointResponse

type QueryRawCheckpointResponse struct {
	RawCheckpoint *RawCheckpointWithMeta `protobuf:"bytes,1,opt,name=raw_checkpoint,json=rawCheckpoint,proto3" json:"raw_checkpoint,omitempty"`
}

QueryRawCheckpointResponse is the response type for the Query/RawCheckpoint RPC method.

func (*QueryRawCheckpointResponse) Descriptor

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

func (*QueryRawCheckpointResponse) GetRawCheckpoint

func (m *QueryRawCheckpointResponse) GetRawCheckpoint() *RawCheckpointWithMeta

func (*QueryRawCheckpointResponse) Marshal

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

func (*QueryRawCheckpointResponse) MarshalTo

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

func (*QueryRawCheckpointResponse) MarshalToSizedBuffer

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

func (*QueryRawCheckpointResponse) ProtoMessage

func (*QueryRawCheckpointResponse) ProtoMessage()

func (*QueryRawCheckpointResponse) Reset

func (m *QueryRawCheckpointResponse) Reset()

func (*QueryRawCheckpointResponse) Size

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

func (*QueryRawCheckpointResponse) String

func (m *QueryRawCheckpointResponse) String() string

func (*QueryRawCheckpointResponse) Unmarshal

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

func (*QueryRawCheckpointResponse) XXX_DiscardUnknown

func (m *QueryRawCheckpointResponse) XXX_DiscardUnknown()

func (*QueryRawCheckpointResponse) XXX_Marshal

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

func (*QueryRawCheckpointResponse) XXX_Merge

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

func (*QueryRawCheckpointResponse) XXX_Size

func (m *QueryRawCheckpointResponse) XXX_Size() int

func (*QueryRawCheckpointResponse) XXX_Unmarshal

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

type QueryRawCheckpointsRequest added in v0.6.0

type QueryRawCheckpointsRequest struct {
	// pagination defines whether to have the pagination in the request
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRawCheckpointsRequest is the request type for the Query/RawCheckpoints RPC method.

func (*QueryRawCheckpointsRequest) Descriptor added in v0.6.0

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

func (*QueryRawCheckpointsRequest) GetPagination added in v0.6.0

func (m *QueryRawCheckpointsRequest) GetPagination() *query.PageRequest

func (*QueryRawCheckpointsRequest) Marshal added in v0.6.0

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

func (*QueryRawCheckpointsRequest) MarshalTo added in v0.6.0

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

func (*QueryRawCheckpointsRequest) MarshalToSizedBuffer added in v0.6.0

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

func (*QueryRawCheckpointsRequest) ProtoMessage added in v0.6.0

func (*QueryRawCheckpointsRequest) ProtoMessage()

func (*QueryRawCheckpointsRequest) Reset added in v0.6.0

func (m *QueryRawCheckpointsRequest) Reset()

func (*QueryRawCheckpointsRequest) Size added in v0.6.0

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

func (*QueryRawCheckpointsRequest) String added in v0.6.0

func (m *QueryRawCheckpointsRequest) String() string

func (*QueryRawCheckpointsRequest) Unmarshal added in v0.6.0

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

func (*QueryRawCheckpointsRequest) XXX_DiscardUnknown added in v0.6.0

func (m *QueryRawCheckpointsRequest) XXX_DiscardUnknown()

func (*QueryRawCheckpointsRequest) XXX_Marshal added in v0.6.0

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

func (*QueryRawCheckpointsRequest) XXX_Merge added in v0.6.0

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

func (*QueryRawCheckpointsRequest) XXX_Size added in v0.6.0

func (m *QueryRawCheckpointsRequest) XXX_Size() int

func (*QueryRawCheckpointsRequest) XXX_Unmarshal added in v0.6.0

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

type QueryRawCheckpointsResponse added in v0.6.0

type QueryRawCheckpointsResponse struct {
	// the order is going from the newest to oldest based on the epoch number
	RawCheckpoints []*RawCheckpointWithMeta `protobuf:"bytes,1,rep,name=raw_checkpoints,json=rawCheckpoints,proto3" json:"raw_checkpoints,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRawCheckpointsResponse is the response type for the Query/RawCheckpoints RPC method.

func (*QueryRawCheckpointsResponse) Descriptor added in v0.6.0

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

func (*QueryRawCheckpointsResponse) GetPagination added in v0.6.0

func (m *QueryRawCheckpointsResponse) GetPagination() *query.PageResponse

func (*QueryRawCheckpointsResponse) GetRawCheckpoints added in v0.6.0

func (m *QueryRawCheckpointsResponse) GetRawCheckpoints() []*RawCheckpointWithMeta

func (*QueryRawCheckpointsResponse) Marshal added in v0.6.0

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

func (*QueryRawCheckpointsResponse) MarshalTo added in v0.6.0

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

func (*QueryRawCheckpointsResponse) MarshalToSizedBuffer added in v0.6.0

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

func (*QueryRawCheckpointsResponse) ProtoMessage added in v0.6.0

func (*QueryRawCheckpointsResponse) ProtoMessage()

func (*QueryRawCheckpointsResponse) Reset added in v0.6.0

func (m *QueryRawCheckpointsResponse) Reset()

func (*QueryRawCheckpointsResponse) Size added in v0.6.0

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

func (*QueryRawCheckpointsResponse) String added in v0.6.0

func (m *QueryRawCheckpointsResponse) String() string

func (*QueryRawCheckpointsResponse) Unmarshal added in v0.6.0

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

func (*QueryRawCheckpointsResponse) XXX_DiscardUnknown added in v0.6.0

func (m *QueryRawCheckpointsResponse) XXX_DiscardUnknown()

func (*QueryRawCheckpointsResponse) XXX_Marshal added in v0.6.0

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

func (*QueryRawCheckpointsResponse) XXX_Merge added in v0.6.0

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

func (*QueryRawCheckpointsResponse) XXX_Size added in v0.6.0

func (m *QueryRawCheckpointsResponse) XXX_Size() int

func (*QueryRawCheckpointsResponse) XXX_Unmarshal added in v0.6.0

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

type QueryRecentEpochStatusCountRequest

type QueryRecentEpochStatusCountRequest struct {
	// epoch_count is the number of the most recent epochs to include in the
	// aggregation
	EpochCount uint64 `protobuf:"varint,1,opt,name=epoch_count,json=epochCount,proto3" json:"epoch_count,omitempty"`
}

QueryRecentEpochStatusCountRequest is the request type for the Query/EpochStatusCount RPC method.

func NewQueryRecentEpochStatusCountRequest

func NewQueryRecentEpochStatusCountRequest(epochNum uint64) *QueryRecentEpochStatusCountRequest

func (*QueryRecentEpochStatusCountRequest) Descriptor

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

func (*QueryRecentEpochStatusCountRequest) GetEpochCount

func (m *QueryRecentEpochStatusCountRequest) GetEpochCount() uint64

func (*QueryRecentEpochStatusCountRequest) Marshal

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

func (*QueryRecentEpochStatusCountRequest) MarshalTo

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

func (*QueryRecentEpochStatusCountRequest) MarshalToSizedBuffer

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

func (*QueryRecentEpochStatusCountRequest) ProtoMessage

func (*QueryRecentEpochStatusCountRequest) ProtoMessage()

func (*QueryRecentEpochStatusCountRequest) Reset

func (*QueryRecentEpochStatusCountRequest) Size

func (*QueryRecentEpochStatusCountRequest) String

func (*QueryRecentEpochStatusCountRequest) Unmarshal

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

func (*QueryRecentEpochStatusCountRequest) XXX_DiscardUnknown

func (m *QueryRecentEpochStatusCountRequest) XXX_DiscardUnknown()

func (*QueryRecentEpochStatusCountRequest) XXX_Marshal

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

func (*QueryRecentEpochStatusCountRequest) XXX_Merge

func (*QueryRecentEpochStatusCountRequest) XXX_Size

func (*QueryRecentEpochStatusCountRequest) XXX_Unmarshal

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

type QueryRecentEpochStatusCountResponse

type QueryRecentEpochStatusCountResponse struct {
	TipEpoch    uint64            `protobuf:"varint,1,opt,name=tip_epoch,json=tipEpoch,proto3" json:"tip_epoch,omitempty"`
	EpochCount  uint64            `protobuf:"varint,2,opt,name=epoch_count,json=epochCount,proto3" json:"epoch_count,omitempty"`
	StatusCount map[string]uint64 `` /* 183-byte string literal not displayed */
}

QueryRecentEpochStatusCountResponse is the response type for the Query/EpochStatusCount RPC method.

func (*QueryRecentEpochStatusCountResponse) Descriptor

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

func (*QueryRecentEpochStatusCountResponse) GetEpochCount

func (m *QueryRecentEpochStatusCountResponse) GetEpochCount() uint64

func (*QueryRecentEpochStatusCountResponse) GetStatusCount

func (m *QueryRecentEpochStatusCountResponse) GetStatusCount() map[string]uint64

func (*QueryRecentEpochStatusCountResponse) GetTipEpoch

func (*QueryRecentEpochStatusCountResponse) Marshal

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

func (*QueryRecentEpochStatusCountResponse) MarshalTo

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

func (*QueryRecentEpochStatusCountResponse) MarshalToSizedBuffer

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

func (*QueryRecentEpochStatusCountResponse) ProtoMessage

func (*QueryRecentEpochStatusCountResponse) ProtoMessage()

func (*QueryRecentEpochStatusCountResponse) Reset

func (*QueryRecentEpochStatusCountResponse) Size

func (*QueryRecentEpochStatusCountResponse) String

func (*QueryRecentEpochStatusCountResponse) Unmarshal

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

func (*QueryRecentEpochStatusCountResponse) XXX_DiscardUnknown

func (m *QueryRecentEpochStatusCountResponse) XXX_DiscardUnknown()

func (*QueryRecentEpochStatusCountResponse) XXX_Marshal

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

func (*QueryRecentEpochStatusCountResponse) XXX_Merge

func (*QueryRecentEpochStatusCountResponse) XXX_Size

func (*QueryRecentEpochStatusCountResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// RawCheckpointList queries all checkpoints that match the given status.
	RawCheckpointList(context.Context, *QueryRawCheckpointListRequest) (*QueryRawCheckpointListResponse, error)
	// RawCheckpoint queries a checkpoints at a given epoch number.
	RawCheckpoint(context.Context, *QueryRawCheckpointRequest) (*QueryRawCheckpointResponse, error)
	// RawCheckpoints queries checkpoints for a epoch range specified in pagination params.
	RawCheckpoints(context.Context, *QueryRawCheckpointsRequest) (*QueryRawCheckpointsResponse, error)
	// BlsPublicKeyList queries a list of bls public keys of the validators at a
	// given epoch number.
	BlsPublicKeyList(context.Context, *QueryBlsPublicKeyListRequest) (*QueryBlsPublicKeyListResponse, error)
	// EpochStatus queries the status of the checkpoint at a given epoch
	EpochStatus(context.Context, *QueryEpochStatusRequest) (*QueryEpochStatusResponse, error)
	// RecentEpochStatusCount queries the number of epochs with each status in
	// recent epochs
	RecentEpochStatusCount(context.Context, *QueryRecentEpochStatusCountRequest) (*QueryRecentEpochStatusCountResponse, error)
	// LastCheckpointWithStatus queries the last checkpoint with a given status or
	// a more matured status
	LastCheckpointWithStatus(context.Context, *QueryLastCheckpointWithStatusRequest) (*QueryLastCheckpointWithStatusResponse, error)
}

QueryServer is the server API for Query service.

type RawCheckpoint

type RawCheckpoint struct {
	// epoch_num defines the epoch number the raw checkpoint is for
	EpochNum uint64 `protobuf:"varint,1,opt,name=epoch_num,json=epochNum,proto3" json:"epoch_num,omitempty"`
	// last_commit_hash defines the 'LastCommitHash' that individual BLS sigs are
	// signed on
	LastCommitHash *LastCommitHash `` /* 131-byte string literal not displayed */
	// bitmap defines the bitmap that indicates the signers of the BLS multi sig
	Bitmap []byte `protobuf:"bytes,3,opt,name=bitmap,proto3" json:"bitmap,omitempty"`
	// bls_multi_sig defines the multi sig that is aggregated from individual BLS
	// sigs
	BlsMultiSig *github_com_babylonchain_babylon_crypto_bls12381.Signature `` /* 165-byte string literal not displayed */
}

RawCheckpoint wraps the BLS multi sig with meta data

func FromBTCCkptBytesToRawCkpt

func FromBTCCkptBytesToRawCkpt(btcCkptBytes []byte) (*RawCheckpoint, error)

func FromBTCCkptToRawCkpt

func FromBTCCkptToRawCkpt(btcCkpt *btctxformatter.RawBtcCheckpoint) (*RawCheckpoint, error)

func NewCheckpoint

func NewCheckpoint(epochNum uint64, lch LastCommitHash) *RawCheckpoint

func (*RawCheckpoint) Descriptor

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

func (*RawCheckpoint) Equal

func (this *RawCheckpoint) Equal(that interface{}) bool

func (*RawCheckpoint) GetBitmap

func (m *RawCheckpoint) GetBitmap() []byte

func (*RawCheckpoint) GetEpochNum

func (m *RawCheckpoint) GetEpochNum() uint64

func (RawCheckpoint) Hash

func (m RawCheckpoint) Hash() RawCkptHash

func (RawCheckpoint) HashStr

func (m RawCheckpoint) HashStr() string

func (*RawCheckpoint) Marshal

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

func (*RawCheckpoint) MarshalTo

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

func (*RawCheckpoint) MarshalToSizedBuffer

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

func (*RawCheckpoint) ProtoMessage

func (*RawCheckpoint) ProtoMessage()

func (*RawCheckpoint) Reset

func (m *RawCheckpoint) Reset()

func (RawCheckpoint) SignedMsg

func (m RawCheckpoint) SignedMsg() []byte

SignedMsg is the message corresponding to the BLS sig in this raw checkpoint Its value should be (epoch_number || last_commit_hash)

func (*RawCheckpoint) Size

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

func (*RawCheckpoint) String

func (m *RawCheckpoint) String() string

func (*RawCheckpoint) Unmarshal

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

func (RawCheckpoint) ValidateBasic

func (ckpt RawCheckpoint) ValidateBasic() error

ValidateBasic does sanity checks on a raw checkpoint

func (*RawCheckpoint) XXX_DiscardUnknown

func (m *RawCheckpoint) XXX_DiscardUnknown()

func (*RawCheckpoint) XXX_Marshal

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

func (*RawCheckpoint) XXX_Merge

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

func (*RawCheckpoint) XXX_Size

func (m *RawCheckpoint) XXX_Size() int

func (*RawCheckpoint) XXX_Unmarshal

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

type RawCheckpointWithMeta

type RawCheckpointWithMeta struct {
	Ckpt *RawCheckpoint `protobuf:"bytes,1,opt,name=ckpt,proto3" json:"ckpt,omitempty"`
	// status defines the status of the checkpoint
	Status CheckpointStatus `protobuf:"varint,2,opt,name=status,proto3,enum=babylon.checkpointing.v1.CheckpointStatus" json:"status,omitempty"`
	// bls_aggr_pk defines the aggregated BLS public key
	BlsAggrPk *github_com_babylonchain_babylon_crypto_bls12381.PublicKey `` /* 159-byte string literal not displayed */
	// power_sum defines the accumulated voting power for the checkpoint
	PowerSum uint64 `protobuf:"varint,4,opt,name=power_sum,json=powerSum,proto3" json:"power_sum,omitempty"`
	// lifecycle defines the lifecycle of this checkpoint, i.e., each state
	// transition and the time (in both timestamp and block height) of this
	// transition.
	Lifecycle []*CheckpointStateUpdate `protobuf:"bytes,5,rep,name=lifecycle,proto3" json:"lifecycle,omitempty"`
}

RawCheckpointWithMeta wraps the raw checkpoint with meta data.

func BytesToCkptWithMeta

func BytesToCkptWithMeta(cdc codec.BinaryCodec, bz []byte) (*RawCheckpointWithMeta, error)

func NewCheckpointWithMeta

func NewCheckpointWithMeta(ckpt *RawCheckpoint, status CheckpointStatus) *RawCheckpointWithMeta

func (*RawCheckpointWithMeta) Accumulate

func (cm *RawCheckpointWithMeta) Accumulate(
	vals epochingtypes.ValidatorSet,
	signerAddr sdk.ValAddress,
	signerBlsKey bls12381.PublicKey,
	sig bls12381.Signature,
	totalPower int64) error

Accumulate does the following things 1. aggregates the BLS signature 2. aggregates the BLS public key 3. updates Bitmap 4. accumulates voting power it returns nil if the checkpoint is updated, otherwise it returns an error

func (*RawCheckpointWithMeta) Descriptor

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

func (*RawCheckpointWithMeta) Equal

func (this *RawCheckpointWithMeta) Equal(that interface{}) bool

func (*RawCheckpointWithMeta) GetCkpt

func (m *RawCheckpointWithMeta) GetCkpt() *RawCheckpoint

func (*RawCheckpointWithMeta) GetLifecycle

func (m *RawCheckpointWithMeta) GetLifecycle() []*CheckpointStateUpdate

func (*RawCheckpointWithMeta) GetPowerSum

func (m *RawCheckpointWithMeta) GetPowerSum() uint64

func (*RawCheckpointWithMeta) GetStatus

func (m *RawCheckpointWithMeta) GetStatus() CheckpointStatus

func (*RawCheckpointWithMeta) IsMoreMatureThanStatus

func (cm *RawCheckpointWithMeta) IsMoreMatureThanStatus(status CheckpointStatus) bool

func (*RawCheckpointWithMeta) Marshal

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

func (*RawCheckpointWithMeta) MarshalTo

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

func (*RawCheckpointWithMeta) MarshalToSizedBuffer

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

func (*RawCheckpointWithMeta) ProtoMessage

func (*RawCheckpointWithMeta) ProtoMessage()

func (*RawCheckpointWithMeta) RecordStateUpdate

func (cm *RawCheckpointWithMeta) RecordStateUpdate(ctx sdk.Context, status CheckpointStatus)

RecordStateUpdate appends a new state update to the raw ckpt with meta where the time/height are captured by the current ctx

func (*RawCheckpointWithMeta) Reset

func (m *RawCheckpointWithMeta) Reset()

func (*RawCheckpointWithMeta) Size

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

func (*RawCheckpointWithMeta) String

func (m *RawCheckpointWithMeta) String() string

func (*RawCheckpointWithMeta) Unmarshal

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

func (*RawCheckpointWithMeta) XXX_DiscardUnknown

func (m *RawCheckpointWithMeta) XXX_DiscardUnknown()

func (*RawCheckpointWithMeta) XXX_Marshal

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

func (*RawCheckpointWithMeta) XXX_Merge

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

func (*RawCheckpointWithMeta) XXX_Size

func (m *RawCheckpointWithMeta) XXX_Size() int

func (*RawCheckpointWithMeta) XXX_Unmarshal

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

type RawCkptHash

type RawCkptHash []byte

func FromStringToCkptHash

func FromStringToCkptHash(s string) (RawCkptHash, error)

func (RawCkptHash) Bytes

func (m RawCkptHash) Bytes() []byte

func (RawCkptHash) Equals

func (m RawCkptHash) Equals(h RawCkptHash) bool

func (RawCkptHash) String

func (m RawCkptHash) String() string

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AddBlsSig

func (*UnimplementedMsgServer) WrappedCreateValidator

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) BlsPublicKeyList

func (*UnimplementedQueryServer) EpochStatus

func (*UnimplementedQueryServer) RawCheckpoint

func (*UnimplementedQueryServer) RawCheckpointList

func (*UnimplementedQueryServer) RawCheckpoints added in v0.6.0

type ValidatorWithBlsKey

type ValidatorWithBlsKey struct {
	ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
	BlsPubKey        []byte `protobuf:"bytes,2,opt,name=bls_pub_key,json=blsPubKey,proto3" json:"bls_pub_key,omitempty"`
	VotingPower      uint64 `protobuf:"varint,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"`
}

ValidatorWithBlsKey couples validator address, voting power, and its bls public key

func (*ValidatorWithBlsKey) Descriptor

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

func (*ValidatorWithBlsKey) GetBlsPubKey

func (m *ValidatorWithBlsKey) GetBlsPubKey() []byte

func (*ValidatorWithBlsKey) GetValidatorAddress

func (m *ValidatorWithBlsKey) GetValidatorAddress() string

func (*ValidatorWithBlsKey) GetVotingPower

func (m *ValidatorWithBlsKey) GetVotingPower() uint64

func (*ValidatorWithBlsKey) Marshal

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

func (*ValidatorWithBlsKey) MarshalTo

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

func (*ValidatorWithBlsKey) MarshalToSizedBuffer

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

func (*ValidatorWithBlsKey) ProtoMessage

func (*ValidatorWithBlsKey) ProtoMessage()

func (*ValidatorWithBlsKey) Reset

func (m *ValidatorWithBlsKey) Reset()

func (*ValidatorWithBlsKey) Size

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

func (*ValidatorWithBlsKey) String

func (m *ValidatorWithBlsKey) String() string

func (*ValidatorWithBlsKey) Unmarshal

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

func (*ValidatorWithBlsKey) XXX_DiscardUnknown

func (m *ValidatorWithBlsKey) XXX_DiscardUnknown()

func (*ValidatorWithBlsKey) XXX_Marshal

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

func (*ValidatorWithBlsKey) XXX_Merge

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

func (*ValidatorWithBlsKey) XXX_Size

func (m *ValidatorWithBlsKey) XXX_Size() int

func (*ValidatorWithBlsKey) XXX_Unmarshal

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

type ValidatorWithBlsKeySet

type ValidatorWithBlsKeySet struct {
	ValSet []*ValidatorWithBlsKey `protobuf:"bytes,1,rep,name=val_set,json=valSet,proto3" json:"val_set,omitempty"`
}

ValidatorWithBLSSet defines a set of validators with their BLS public keys

func BytesToValidatorBlsKeySet

func BytesToValidatorBlsKeySet(cdc codec.BinaryCodec, bz []byte) (*ValidatorWithBlsKeySet, error)

func (*ValidatorWithBlsKeySet) Descriptor

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

func (*ValidatorWithBlsKeySet) FindSubsetWithPowerSum

func (ks *ValidatorWithBlsKeySet) FindSubsetWithPowerSum(bm bitmap.Bitmap) (*ValidatorWithBlsKeySet, uint64, error)

FindSubsetWithPowerSum returns a subset and the sum of the voting Power based on the given bitmap

func (*ValidatorWithBlsKeySet) GetBLSKeySet

func (ks *ValidatorWithBlsKeySet) GetBLSKeySet() []bls12381.PublicKey

func (*ValidatorWithBlsKeySet) GetTotalPower

func (ks *ValidatorWithBlsKeySet) GetTotalPower() uint64

func (*ValidatorWithBlsKeySet) GetValSet

func (m *ValidatorWithBlsKeySet) GetValSet() []*ValidatorWithBlsKey

func (*ValidatorWithBlsKeySet) Marshal

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

func (*ValidatorWithBlsKeySet) MarshalTo

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

func (*ValidatorWithBlsKeySet) MarshalToSizedBuffer

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

func (*ValidatorWithBlsKeySet) ProtoMessage

func (*ValidatorWithBlsKeySet) ProtoMessage()

func (*ValidatorWithBlsKeySet) Reset

func (m *ValidatorWithBlsKeySet) Reset()

func (*ValidatorWithBlsKeySet) Size

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

func (*ValidatorWithBlsKeySet) String

func (m *ValidatorWithBlsKeySet) String() string

func (*ValidatorWithBlsKeySet) Unmarshal

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

func (*ValidatorWithBlsKeySet) XXX_DiscardUnknown

func (m *ValidatorWithBlsKeySet) XXX_DiscardUnknown()

func (*ValidatorWithBlsKeySet) XXX_Marshal

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

func (*ValidatorWithBlsKeySet) XXX_Merge

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

func (*ValidatorWithBlsKeySet) XXX_Size

func (m *ValidatorWithBlsKeySet) XXX_Size() int

func (*ValidatorWithBlsKeySet) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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