From e276113836397d16faaa3ae4be77da5e001eb34a Mon Sep 17 00:00:00 2001 From: samricotta <37125168+samricotta@users.noreply.github.com> Date: Tue, 15 Oct 2024 19:50:19 +0300 Subject: [PATCH] chore: update exposed db objects in `x/checkpointing` module (#201) Part closes: https://github.com/babylonlabs-io/pm/issues/72 Currently some of the objects in the babylon apis are exposed and need to be handled correctly seen in https://github.com/babylonlabs-io/pm/issues/72 This PR handles the exposed objects in `x/checkpointing` --- x/finality/types/query.pb.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/x/finality/types/query.pb.go b/x/finality/types/query.pb.go index d12c7aad2..18df8c26d 100644 --- a/x/finality/types/query.pb.go +++ b/x/finality/types/query.pb.go @@ -986,10 +986,15 @@ func (m *QuerySigningInfoRequest) GetFpBtcPkHex() string { // SigningInfoResponse defines the API response containing a finality provider's signing info // for monitoring their liveness activity. type SigningInfoResponse struct { - FpBtcPkHex string `protobuf:"bytes,1,opt,name=fp_btc_pk_hex,json=fpBtcPkHex,proto3" json:"fp_btc_pk_hex,omitempty"` - StartHeight int64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` - MissedBlocksCounter int64 `protobuf:"varint,3,opt,name=missed_blocks_counter,json=missedBlocksCounter,proto3" json:"missed_blocks_counter,omitempty"` - JailedUntil time.Time `protobuf:"bytes,4,opt,name=jailed_until,json=jailedUntil,proto3,stdtime" json:"jailed_until"` + // fp_btc_pk is the BTC PK of the finality provider that casts this vote + FpBtcPkHex string `protobuf:"bytes,1,opt,name=fp_btc_pk_hex,json=fpBtcPkHex,proto3" json:"fp_btc_pk_hex,omitempty"` + // start_height is the block height at which finality provider become active + StartHeight int64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` + // missed_blocks_counter defines a counter to avoid unnecessary array reads. + // Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. + MissedBlocksCounter int64 `protobuf:"varint,3,opt,name=missed_blocks_counter,json=missedBlocksCounter,proto3" json:"missed_blocks_counter,omitempty"` + // Timestamp until which the validator is jailed due to liveness downtime. + JailedUntil time.Time `protobuf:"bytes,4,opt,name=jailed_until,json=jailedUntil,proto3,stdtime" json:"jailed_until"` } func (m *SigningInfoResponse) Reset() { *m = SigningInfoResponse{} }