From 935668bdae79ae648222866bd1d6c3a33ed1660d Mon Sep 17 00:00:00 2001 From: Rafael Tenfen Date: Wed, 9 Oct 2024 09:07:39 -0300 Subject: [PATCH 1/4] chore: remove signed finality provider (#142) Finality providers will register themselfs after the chain is public launched, so the signed msgs can be removed from the upgrade handler Should be reviewed after #132 is merged --- CHANGELOG.md | 2 + app/include_upgrade_mainnet.go | 1 - app/include_upgrade_testnet.go | 1 - app/upgrades/v1/README.md | 29 +---- app/upgrades/v1/data_signed_fps_test.go | 116 ----------------- app/upgrades/v1/mainnet/signed_fps.go | 122 ------------------ app/upgrades/v1/testnet/signed_fps.go | 122 ------------------ app/upgrades/v1/types.go | 5 - app/upgrades/v1/upgrades.go | 88 +------------ app/upgrades/v1/upgrades_test.go | 28 ---- ...software_upgrade_e2e_signet_launch_test.go | 22 ---- 11 files changed, 10 insertions(+), 526 deletions(-) delete mode 100644 app/upgrades/v1/data_signed_fps_test.go delete mode 100644 app/upgrades/v1/mainnet/signed_fps.go delete mode 100644 app/upgrades/v1/testnet/signed_fps.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 8425796a9..36489b07e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ and add `verified` to delegation status parse `NewBTCDelegationStatusFromString` * [#132](https://github.com/babylonlabs-io/babylon/pull/132) Add CosmWasm parameters update during v1 upgrade handler. +* [#142](https://github.com/babylonlabs-io/babylon/pull/142) Remove signed finality providers +insert from the v1 upgrade handler. ### Misc Improvements diff --git a/app/include_upgrade_mainnet.go b/app/include_upgrade_mainnet.go index f31eb44bf..25fd217e9 100644 --- a/app/include_upgrade_mainnet.go +++ b/app/include_upgrade_mainnet.go @@ -15,7 +15,6 @@ func init() { FinalityParamStr: mainnet.FinalityParamStr, CosmWasmParamStr: mainnet.CosmWasmParamStr, NewBtcHeadersStr: mainnet.NewBtcHeadersStr, - SignedFPsStr: mainnet.SignedFPsStr, TokensDistributionStr: mainnet.TokensDistributionStr, })} } diff --git a/app/include_upgrade_testnet.go b/app/include_upgrade_testnet.go index 16eff01ff..85329019a 100644 --- a/app/include_upgrade_testnet.go +++ b/app/include_upgrade_testnet.go @@ -16,7 +16,6 @@ func init() { FinalityParamStr: testnet.FinalityParamStr, CosmWasmParamStr: testnet.CosmWasmParamStr, NewBtcHeadersStr: testnet.NewBtcHeadersStr, - SignedFPsStr: testnet.SignedFPsStr, TokensDistributionStr: testnet.TokensDistributionStr, })} } diff --git a/app/upgrades/v1/README.md b/app/upgrades/v1/README.md index 1e8ab7aa8..1323039be 100644 --- a/app/upgrades/v1/README.md +++ b/app/upgrades/v1/README.md @@ -4,18 +4,14 @@ Babylon launched as Phase-1 without a cosmos chain running to collect BTC staking prior to decentralize the finality provider set of operators. The first upgrade of Babylon chain to start receiving BTC delegations will include the BTC headers created -during Phase-1 and upgrade, finality providers registered in the -dashboard, tokens distribution for the active users and operators -that participated and need to finish their actions and update of -parameters for `x/finality` and `x/btcstaking` modules. +during Phase-1 and upgrade, tokens distribution for the active users +and operators that participated and need to finish their actions and +update of parameters for `x/finality` and `x/btcstaking` modules. ## Testnet vs Mainnet Babylon upgrade data will be different for mainnet and testnet, -finality providers should not use the same keys for mainnet and testnet. -So to register himself and test, the finality providers will use two -different registrations one for mainnet and another for testnet. The -BTC Headers also are different as the Bitcoin mainnet and signet produces +The BTC Headers are different as the Bitcoin mainnet and signet produces different block headers. So, the upgrade data will be divided into 2 `app/upgrades/v1`: @@ -34,10 +30,9 @@ The upgrade data was left as string to make it easier for `devnet` testing where it is needed to replace the data files, and would be harder to create the data files if it used actual go structures to generate the data. -This upgrade loads 6 JSONs from strings in different files. +This upgrade loads 5 JSONs from strings in different files. - BTC Headers at `./data_btc_headers.go` -- Finality Providers signed messages at`./data_signed_fps.go` - Tokens distribution at `./data_token_distribution.go` - BTC Staking Parameters `./btcstaking_params.go` - Finality Parameters `./finality_params.go` @@ -75,20 +70,6 @@ echo "package signetlaunch const NewBtcHeadersStr = \`$btcHeadersJson\`" > $GO_BTC_HEADERS_PATH ``` -### Signed Create Finality Provider - -For BTC stakers to stake during Phase-1 it is needed to have finality -providers. Babylon created a repository to publicly store this information -inside [networks](https://github.com/babylonlabs-io/networks) repository. -Inside the bbn-1 mainnet all the finality providers that wanted to be available -for BTC staking since the beginning would need to -[register](https://github.com/babylonlabs-io/networks/blob/main/bbn-1/finality-providers/README.md) -theirselves in the registry. -For the transition from Phase-1 to Phase-2, registered finality providers in -Phase-1 will need to provider a signed -[MsgCreateFinalityProvider](../../../x/btcstaking/types/tx.pb.go#38) as a -json file message inside the networks repository registry. - ### Tokens distribution During the upgrade, some tokens will be distributed so users and operators can diff --git a/app/upgrades/v1/data_signed_fps_test.go b/app/upgrades/v1/data_signed_fps_test.go deleted file mode 100644 index 9b1b4235f..000000000 --- a/app/upgrades/v1/data_signed_fps_test.go +++ /dev/null @@ -1,116 +0,0 @@ -package v1_test - -import ( - "bytes" - "encoding/json" - "testing" - "time" - - "github.com/babylonlabs-io/babylon/app" - v1 "github.com/babylonlabs-io/babylon/app/upgrades/v1" - btcstktypes "github.com/babylonlabs-io/babylon/x/btcstaking/types" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/ante" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" - "github.com/stretchr/testify/require" -) - -func TestValidateSignatureSignedFPsFromData(t *testing.T) { - for _, upgradeData := range UpgradeV1Data { - bbnApp := app.NewTmpBabylonApp() - cdc := bbnApp.AppCodec() - // the chain ID in context needs to match the one used when creating the tx signature. - chainID := "bbn-1" - - ctx := bbnApp.BaseApp.NewContextLegacy(true, tmproto.Header{Height: 1, ChainID: chainID, Time: time.Now().UTC()}) - buff := bytes.NewBufferString(upgradeData.SignedFPsStr) - simulateTx := false - - var d v1.DataSignedFps - err := json.Unmarshal(buff.Bytes(), &d) - require.NoError(t, err) - - antehandlerSigVerifier := buildAnteHandlerSigVerifier(t, bbnApp) - - fpAddrs := make(map[string]interface{}, len(d.SignedTxsFP)) - for _, txAny := range d.SignedTxsFP { - txBytes, err := json.Marshal(txAny) - require.NoError(t, err) - - // decodes the transaction - tx, err := bbnApp.TxConfig().TxJSONDecoder()(txBytes) - require.NoError(t, err) - - msgs := tx.GetMsgs() - require.Len(t, msgs, 1) - - msg, ok := msgs[0].(*btcstktypes.MsgCreateFinalityProvider) - require.True(t, ok) - - _, exist := fpAddrs[msg.Addr] - require.False(t, exist) - fpAddrs[msg.Addr] = nil - - require.NoError(t, msg.ValidateBasic()) - - // loads messages from the tx, only one message per tx is allowed. - msgsV2, err := tx.GetMsgsV2() - require.NoError(t, err) - require.Len(t, msgsV2, 1) - - msgV2 := msgsV2[0] - signers, err := cdc.GetMsgV2Signers(msgV2) - require.NoError(t, err) - require.Len(t, signers, 1) - - // checks that the signer_infos corresponding address in the transaction - // matches the FP address defined. - signerAddrStr, err := cdc.InterfaceRegistry().SigningContext().AddressCodec().BytesToString(signers[0]) - require.NoError(t, err) - - signerBbnAddr, err := sdk.AccAddressFromBech32(signerAddrStr) - require.NoError(t, err) - - require.Equal(t, msg.Addr, signerAddrStr) - // Proof of Possession check only for type BIP340 as expected in the networks registry instructions - require.NoError(t, msg.Pop.VerifyBIP340(signerBbnAddr, msg.BtcPk)) - - // creates the account with the signer address and sets the - // sequence and acc number to zero every time, for this reason - // it needs to remove account right after, otherwise new accounts - // would have account number +1 and the signature verification would fail. - acc := bbnApp.AccountKeeper.NewAccountWithAddress(ctx, signerBbnAddr) - require.NoError(t, acc.SetSequence(0)) - require.NoError(t, acc.SetAccountNumber(0)) - bbnApp.AccountKeeper.SetAccount(ctx, acc) - - _, err = antehandlerSigVerifier(ctx, tx, simulateTx) - require.NoError(t, err) - - bbnApp.AccountKeeper.RemoveAccount(ctx, acc) - } - } - -} - -func buildAnteHandlerSigVerifier(t *testing.T, bbnApp *app.BabylonApp) sdk.AnteHandler { - cdc := bbnApp.AppCodec() - - txConfigOpts := authtx.ConfigOptions{ - TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(bbnApp.GetBankKeeper()), - EnabledSignModes: []signing.SignMode{signing.SignMode_SIGN_MODE_DIRECT}, - } - anteTxConfig, err := authtx.NewTxConfigWithOptions( - codec.NewProtoCodec(cdc.InterfaceRegistry()), - txConfigOpts, - ) - require.NoError(t, err) - - svd := ante.NewSigVerificationDecorator(bbnApp.AppKeepers.AccountKeeper, anteTxConfig.SignModeHandler()) - spkd := ante.NewSetPubKeyDecorator(bbnApp.AppKeepers.AccountKeeper) - return sdk.ChainAnteDecorators(spkd, svd) -} diff --git a/app/upgrades/v1/mainnet/signed_fps.go b/app/upgrades/v1/mainnet/signed_fps.go deleted file mode 100644 index 4bde06b51..000000000 --- a/app/upgrades/v1/mainnet/signed_fps.go +++ /dev/null @@ -1,122 +0,0 @@ -package mainnet - -const SignedFPsStr = `{ - "signed_txs_create_fp": [ - { - "body": { - "messages": [ - { - "@type": "/babylon.btcstaking.v1.MsgCreateFinalityProvider", - "addr": "bbn1gwecky0m842kvjg7mcvt9z330rz96948aplqlm", - "description": { - "moniker": "fp-1", - "identity": "", - "website": "fp1.com.br", - "security_contact": "fp.1@email.com", - "details": "best-fp-1" - }, - "commission": "0.050000000000000000", - "btc_pk": "a94eef36ea7c596ba01b2018d55c202ebd8a82a0baf1a435818bc524bfd4e10a", - "pop": { - "btc_sig_type": "BIP340", - "btc_sig": "q5aykrV4imao9kiIVvWhBf8hPbIQW7GbdnDDCAZQRyCm4ZBaUiAGO3oFbEgVeLKNAd0xGmcCAJSbXu0OrpcQkQ==" - } - } - ], - "memo": "", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [ - { - "public_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A9XXtGMjEFgavPv7GHo5rbI/XulwA0Hn2xlzsdCRDCTl" - }, - "mode_info": { - "single": { - "mode": "SIGN_MODE_DIRECT" - } - }, - "sequence": "0" - } - ], - "fee": { - "amount": [ - { - "denom": "ubbn", - "amount": "2000000" - } - ], - "gas_limit": "200000", - "payer": "", - "granter": "" - }, - "tip": null - }, - "signatures": [ - "8wQGbPM5Xc5PmrynGmxbslqSA6tFW/5Vgg9sVZZ1WWsRTR5m040t2wgR+BjUrLNnO+JtrDlb38Su4XFSR76b9Q==" - ] - }, - { - "body": { - "messages": [ - { - "@type": "/babylon.btcstaking.v1.MsgCreateFinalityProvider", - "addr": "bbn1mwwywrmynkf0n5maps6yrtvgx2qqh3mlccdg6g", - "description": { - "moniker": "fp-2", - "identity": "", - "website": "fp2.com.br", - "security_contact": "fp.2@email.com", - "details": "best-fp-2" - }, - "commission": "0.100000000000000000", - "btc_pk": "bae0f3bfedc4de9e776fcbbb4b1dbae2641193fc20527ffc0a728968ebcd2d95", - "pop": { - "btc_sig_type": "BIP340", - "btc_sig": "IFU+77I8e7VOGudJdN5kk/8Hs2Biqiiw+sejBbYrtPRSNhFRhFrxhOru5kYHPxZ2XwadlfZfZjmXB8Uvj/hb5w==" - } - } - ], - "memo": "", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [ - { - "public_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A3XkUtvcp3DnAvDKN4zYkES3xc6wi83LQBeAAlNG3Ebl" - }, - "mode_info": { - "single": { - "mode": "SIGN_MODE_DIRECT" - } - }, - "sequence": "0" - } - ], - "fee": { - "amount": [ - { - "denom": "ubbn", - "amount": "2000000" - } - ], - "gas_limit": "200000", - "payer": "", - "granter": "" - }, - "tip": null - }, - "signatures": [ - "QMpALwCa+mHtKRv9Jg9RyHg/lOnFNa5i09tHgHgSuwh8JbNalYy4v2bTZ2PGDUh0JZCPUMeO487WacZofVhl9g==" - ] - } - ] -}` diff --git a/app/upgrades/v1/testnet/signed_fps.go b/app/upgrades/v1/testnet/signed_fps.go deleted file mode 100644 index 547f77798..000000000 --- a/app/upgrades/v1/testnet/signed_fps.go +++ /dev/null @@ -1,122 +0,0 @@ -package testnet - -const SignedFPsStr = `{ - "signed_txs_create_fp": [ - { - "body": { - "messages": [ - { - "@type": "/babylon.btcstaking.v1.MsgCreateFinalityProvider", - "addr": "bbn1gwecky0m842kvjg7mcvt9z330rz96948aplqlm", - "description": { - "moniker": "fp-1", - "identity": "", - "website": "fp1.com.br", - "security_contact": "fp.1@email.com", - "details": "best-fp-1" - }, - "commission": "0.050000000000000000", - "btc_pk": "a94eef36ea7c596ba01b2018d55c202ebd8a82a0baf1a435818bc524bfd4e10a", - "pop": { - "btc_sig_type": "BIP340", - "btc_sig": "q5aykrV4imao9kiIVvWhBf8hPbIQW7GbdnDDCAZQRyCm4ZBaUiAGO3oFbEgVeLKNAd0xGmcCAJSbXu0OrpcQkQ==" - } - } - ], - "memo": "", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [ - { - "public_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A9XXtGMjEFgavPv7GHo5rbI/XulwA0Hn2xlzsdCRDCTl" - }, - "mode_info": { - "single": { - "mode": "SIGN_MODE_DIRECT" - } - }, - "sequence": "0" - } - ], - "fee": { - "amount": [ - { - "denom": "ubbn", - "amount": "2000000" - } - ], - "gas_limit": "200000", - "payer": "", - "granter": "" - }, - "tip": null - }, - "signatures": [ - "8wQGbPM5Xc5PmrynGmxbslqSA6tFW/5Vgg9sVZZ1WWsRTR5m040t2wgR+BjUrLNnO+JtrDlb38Su4XFSR76b9Q==" - ] - }, - { - "body": { - "messages": [ - { - "@type": "/babylon.btcstaking.v1.MsgCreateFinalityProvider", - "addr": "bbn1mwwywrmynkf0n5maps6yrtvgx2qqh3mlccdg6g", - "description": { - "moniker": "fp-2", - "identity": "", - "website": "fp2.com.br", - "security_contact": "fp.2@email.com", - "details": "best-fp-2" - }, - "commission": "0.100000000000000000", - "btc_pk": "bae0f3bfedc4de9e776fcbbb4b1dbae2641193fc20527ffc0a728968ebcd2d95", - "pop": { - "btc_sig_type": "BIP340", - "btc_sig": "IFU+77I8e7VOGudJdN5kk/8Hs2Biqiiw+sejBbYrtPRSNhFRhFrxhOru5kYHPxZ2XwadlfZfZjmXB8Uvj/hb5w==" - } - } - ], - "memo": "", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [ - { - "public_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A3XkUtvcp3DnAvDKN4zYkES3xc6wi83LQBeAAlNG3Ebl" - }, - "mode_info": { - "single": { - "mode": "SIGN_MODE_DIRECT" - } - }, - "sequence": "0" - } - ], - "fee": { - "amount": [ - { - "denom": "ubbn", - "amount": "2000000" - } - ], - "gas_limit": "200000", - "payer": "", - "granter": "" - }, - "tip": null - }, - "signatures": [ - "QMpALwCa+mHtKRv9Jg9RyHg/lOnFNa5i09tHgHgSuwh8JbNalYy4v2bTZ2PGDUh0JZCPUMeO487WacZofVhl9g==" - ] - } - ] -}` diff --git a/app/upgrades/v1/types.go b/app/upgrades/v1/types.go index ea933b111..72773bd23 100644 --- a/app/upgrades/v1/types.go +++ b/app/upgrades/v1/types.go @@ -5,14 +5,9 @@ type UpgradeDataString struct { FinalityParamStr string CosmWasmParamStr string NewBtcHeadersStr string - SignedFPsStr string TokensDistributionStr string } -type DataSignedFps struct { - SignedTxsFP []any `json:"signed_txs_create_fp"` -} - type DataTokenDistribution struct { TokenDistribution []struct { AddressSender string `json:"address_sender"` diff --git a/app/upgrades/v1/upgrades.go b/app/upgrades/v1/upgrades.go index 5c021de8e..77f0d49eb 100644 --- a/app/upgrades/v1/upgrades.go +++ b/app/upgrades/v1/upgrades.go @@ -9,7 +9,6 @@ import ( "encoding/json" "errors" "fmt" - "sort" sdkmath "cosmossdk.io/math" store "cosmossdk.io/store/types" @@ -70,7 +69,7 @@ func CreateUpgradeHandler(upgradeDataStr UpgradeDataString) upgrades.UpgradeHand return nil, err } - if err := upgradeLaunch(ctx, keepers.EncCfg, &keepers.BTCLightClientKeeper, &keepers.BTCStakingKeeper, keepers.BankKeeper, upgradeDataStr.NewBtcHeadersStr, upgradeDataStr.SignedFPsStr, upgradeDataStr.TokensDistributionStr); err != nil { + if err := upgradeLaunch(ctx, keepers.EncCfg, &keepers.BTCLightClientKeeper, keepers.BankKeeper, upgradeDataStr.NewBtcHeadersStr, upgradeDataStr.TokensDistributionStr); err != nil { return nil, err } @@ -145,24 +144,18 @@ func upgradeFinalityParameters( // upgradeLaunch runs the upgrade: // - Transfer ubbn funds for token distribution // - Insert new BTC Headers -// - Insert new finality providers func upgradeLaunch( ctx sdk.Context, encCfg *appparams.EncodingConfig, btcLigthK *btclightkeeper.Keeper, - btcStkK *btcstkkeeper.Keeper, bankK bankkeeper.SendKeeper, - btcHeaders, fps, tokensDistribution string, + btcHeaders, tokensDistribution string, ) error { if err := upgradeTokensDistribution(ctx, bankK, tokensDistribution); err != nil { return err } - if err := upgradeBTCHeaders(ctx, encCfg.Codec, btcLigthK, btcHeaders); err != nil { - return err - } - - return upgradeSignedFPs(ctx, encCfg, btcStkK, fps) + return upgradeBTCHeaders(ctx, encCfg.Codec, btcLigthK, btcHeaders) } func upgradeTokensDistribution(ctx sdk.Context, bankK bankkeeper.SendKeeper, tokensDistribution string) error { @@ -200,15 +193,6 @@ func upgradeBTCHeaders(ctx sdk.Context, cdc codec.Codec, btcLigthK *btclightkeep return insertBtcHeaders(ctx, btcLigthK, newHeaders) } -func upgradeSignedFPs(ctx sdk.Context, encCfg *appparams.EncodingConfig, btcStkK *btcstkkeeper.Keeper, fps string) error { - msgCreateFps, err := LoadSignedFPsFromData(encCfg.Codec, encCfg.TxConfig.TxJSONDecoder(), fps) - if err != nil { - return err - } - - return insertFPs(ctx, btcStkK, msgCreateFps) -} - func LoadBtcStakingParamsFromData(cdc codec.Codec, data string) (btcstktypes.Params, error) { buff := bytes.NewBufferString(data) @@ -258,44 +242,6 @@ func LoadBTCHeadersFromData(cdc codec.Codec, data string) ([]*btclighttypes.BTCH return gs.BtcHeaders, nil } -// LoadSignedFPsFromData returns the finality providers from the json string. -func LoadSignedFPsFromData(cdc codec.Codec, txJSONDecoder sdk.TxDecoder, data string) ([]*btcstktypes.MsgCreateFinalityProvider, error) { - buff := bytes.NewBufferString(data) - - var d DataSignedFps - err := json.Unmarshal(buff.Bytes(), &d) - if err != nil { - return nil, err - } - - fps := make([]*btcstktypes.MsgCreateFinalityProvider, len(d.SignedTxsFP)) - for i, txAny := range d.SignedTxsFP { - txBytes, err := json.Marshal(txAny) - if err != nil { - return nil, err - } - - tx, err := txJSONDecoder(txBytes) - if err != nil { - return nil, err - } - - fp, err := parseCreateFPFromSignedTx(cdc, tx) - if err != nil { - return nil, err - } - - fps[i] = fp - } - - // sorts all the FPs by their addresses - sort.Slice(fps, func(i, j int) bool { - return fps[i].Addr > fps[j].Addr - }) - - return fps, nil -} - // LoadTokenDistributionFromData returns the tokens to be distributed from the json string. func LoadTokenDistributionFromData(data string) (DataTokenDistribution, error) { buff := bytes.NewBufferString(data) @@ -309,34 +255,6 @@ func LoadTokenDistributionFromData(data string) (DataTokenDistribution, error) { return d, nil } -func parseCreateFPFromSignedTx(cdc codec.Codec, tx sdk.Tx) (*btcstktypes.MsgCreateFinalityProvider, error) { - msgs := tx.GetMsgs() - if len(msgs) != 1 { - return nil, fmt.Errorf("each tx should contain only one message, invalid tx %+v", tx) - } - - msg, ok := msgs[0].(*btcstktypes.MsgCreateFinalityProvider) - if !ok { - return nil, fmt.Errorf("unable to parse %+v to MsgCreateFinalityProvider", msg) - } - - return msg, nil -} - -func insertFPs( - ctx sdk.Context, - k *btcstkkeeper.Keeper, - fps []*btcstktypes.MsgCreateFinalityProvider, -) error { - for _, fp := range fps { - if err := k.AddFinalityProvider(ctx, fp); err != nil { - return err - } - } - - return nil -} - func insertBtcHeaders( ctx sdk.Context, k *btclightkeeper.Keeper, diff --git a/app/upgrades/v1/upgrades_test.go b/app/upgrades/v1/upgrades_test.go index 8f66b5aa1..e812c6c14 100644 --- a/app/upgrades/v1/upgrades_test.go +++ b/app/upgrades/v1/upgrades_test.go @@ -34,7 +34,6 @@ import ( testnetdata "github.com/babylonlabs-io/babylon/app/upgrades/v1/testnet" "github.com/babylonlabs-io/babylon/x/btclightclient" btclighttypes "github.com/babylonlabs-io/babylon/x/btclightclient/types" - "github.com/babylonlabs-io/babylon/x/btcstaking/types" ) const ( @@ -50,7 +49,6 @@ var ( FinalityParamStr: testnetdata.FinalityParamStr, CosmWasmParamStr: testnetdata.CosmWasmParamStr, NewBtcHeadersStr: testnetdata.NewBtcHeadersStr, - SignedFPsStr: testnetdata.SignedFPsStr, TokensDistributionStr: testnetdata.TokensDistributionStr, } UpgradeV1DataMainnet = v1.UpgradeDataString{ @@ -58,7 +56,6 @@ var ( FinalityParamStr: mainnetdata.FinalityParamStr, CosmWasmParamStr: mainnetdata.CosmWasmParamStr, NewBtcHeadersStr: mainnetdata.NewBtcHeadersStr, - SignedFPsStr: mainnetdata.SignedFPsStr, TokensDistributionStr: mainnetdata.TokensDistributionStr, } UpgradeV1Data = []v1.UpgradeDataString{UpgradeV1DataTestnet, UpgradeV1DataMainnet} @@ -74,8 +71,6 @@ type UpgradeTestSuite struct { upgradeDataStr v1.UpgradeDataString // BTC Header checker btcHeadersLenPreUpgrade int - // FPs checker - finalityProvidersLenPreUpgrade int // TokenDistribution checker balanceDiffByAddr map[string]int64 balancesBeforeUpgrade map[string]sdk.Coin @@ -86,7 +81,6 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *UpgradeTestSuite) TestUpgrade() { - stakingWasmChecksum, err := wasmvm.CreateChecksum(wasmContract) s.NoError(err) @@ -203,10 +197,6 @@ func (s *UpgradeTestSuite) PreUpgrade() { allBtcHeaders := s.app.BTCLightClientKeeper.GetMainChainFrom(s.ctx, 0) s.btcHeadersLenPreUpgrade = len(allBtcHeaders) - resp, err := s.app.BTCStakingKeeper.FinalityProviders(s.ctx, &types.QueryFinalityProvidersRequest{}) - s.NoError(err) - s.finalityProvidersLenPreUpgrade = len(resp.FinalityProviders) - // Before upgrade, the params should be different bsParamsFromUpgrade, err := v1.LoadBtcStakingParamsFromData(s.app.AppCodec(), s.upgradeDataStr.BtcStakingParamStr) s.NoError(err) @@ -275,24 +265,6 @@ func (s *UpgradeTestSuite) PostUpgrade() { s.EqualValues(btcHeaderInserted.Header.MarshalHex(), btcHeaderInState.Header.MarshalHex()) } - resp, err := s.app.BTCStakingKeeper.FinalityProviders(s.ctx, &types.QueryFinalityProvidersRequest{}) - s.NoError(err) - newFPsLen := len(resp.FinalityProviders) - - fpsInserted, err := v1.LoadSignedFPsFromData(s.app.AppCodec(), s.app.TxConfig().TxJSONDecoder(), s.upgradeDataStr.SignedFPsStr) - s.NoError(err) - - s.Equal(newFPsLen, s.finalityProvidersLenPreUpgrade+len(fpsInserted)) - for _, fpInserted := range fpsInserted { - fpFromKeeper, err := s.app.BTCStakingKeeper.GetFinalityProvider(s.ctx, *fpInserted.BtcPk) - s.NoError(err) - - s.EqualValues(fpFromKeeper.Addr, fpInserted.Addr) - s.EqualValues(fpFromKeeper.Description, fpInserted.Description) - s.EqualValues(fpFromKeeper.Commission.String(), fpInserted.Commission.String()) - s.EqualValues(fpFromKeeper.Pop.String(), fpInserted.Pop.String()) - } - // After upgrade, the params should be the same bsParamsFromUpgrade, err := v1.LoadBtcStakingParamsFromData(s.app.AppCodec(), s.upgradeDataStr.BtcStakingParamStr) s.NoError(err) diff --git a/test/e2e/software_upgrade_e2e_signet_launch_test.go b/test/e2e/software_upgrade_e2e_signet_launch_test.go index 0ae2f860d..a19018fe2 100644 --- a/test/e2e/software_upgrade_e2e_signet_launch_test.go +++ b/test/e2e/software_upgrade_e2e_signet_launch_test.go @@ -1,8 +1,6 @@ package e2e import ( - "sort" - sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" @@ -130,26 +128,6 @@ func (s *SoftwareUpgradeV1TestnetTestSuite) TestUpgradeSignetLaunch() { s.EqualValues(headerInserted.Header.MarshalHex(), headerStoredResp.HeaderHex) } - oldFPsLen := 0 // it should not have any FP - fpsFromNode := n.QueryFinalityProviders() - - fpsInserted, err := v1.LoadSignedFPsFromData(bbnApp.AppCodec(), bbnApp.TxConfig().TxJSONDecoder(), testnet.SignedFPsStr) - s.NoError(err) - s.Equal(len(fpsInserted), len(fpsFromNode)+oldFPsLen) - - // sorts all the FPs from node to match the ones from loaded string json - sort.Slice(fpsFromNode, func(i, j int) bool { - return fpsFromNode[i].Addr > fpsFromNode[j].Addr - }) - - for i, fpInserted := range fpsInserted { - fpFromKeeper := fpsFromNode[i] - s.EqualValues(fpFromKeeper.Addr, fpInserted.Addr) - s.EqualValues(fpFromKeeper.Description, fpInserted.Description) - s.EqualValues(fpFromKeeper.Commission.String(), fpInserted.Commission.String()) - s.EqualValues(fpFromKeeper.Pop.String(), fpInserted.Pop.String()) - } - // check that staking params correctly deserialize and that they are the same // as the one from the data stakingParams := n.QueryBTCStakingParams() From e1b085bf6adaa0a89210a6b4344bee37efe02721 Mon Sep 17 00:00:00 2001 From: Rafael Tenfen Date: Wed, 9 Oct 2024 09:30:52 -0300 Subject: [PATCH 2/4] chore: add status to btc delegation rest (#146) - Removed ZoneConcierge params from swagger docs - Add status to `QueryBTCDelegationsRequest` - Moved from `/babylon/btcstaking/v1/btc_delegations/{staking_tx_hash_hex}` to `/babylon/btcstaking/v1/btc_delegation/{staking_tx_hash_hex}` in `QueryBTCDelegationRequest` --- CHANGELOG.md | 9 +- client/docs/config.json | 8 - client/docs/swagger-ui/swagger.yaml | 11211 +++------------- proto/babylon/btcstaking/v1/query.proto | 4 +- .../configurer/chain/queries_btcstaking.go | 40 +- x/btcstaking/README.md | 6 +- x/btcstaking/types/query.pb.go | 239 +- x/btcstaking/types/query.pb.gw.go | 48 +- 8 files changed, 2352 insertions(+), 9213 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36489b07e..311d4ef0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,11 +37,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## Unreleased -### Bug Fixes - -* [#140](https://github.com/babylonlabs-io/babylon/pull/140) Removed `unbonding` -and add `verified` to delegation status parse `NewBTCDelegationStatusFromString`. - ### State Machine Breaking * [#132](https://github.com/babylonlabs-io/babylon/pull/132) Add CosmWasm parameters @@ -59,6 +54,8 @@ refund transaction fee for certain transactions from protocol stakeholders pre-approval flow. * [#138](https://github.com/babylonlabs-io/babylon/pull/138) Intercept staking module messages inside `authz.MsgExec`. +* [#146](https://github.com/babylonlabs-io/babylon/pull/146) Add property status as a filter +to BTC delegations rest request `QueryBTCDelegationsRequest`. ### Improvements @@ -71,6 +68,8 @@ for upgrade handler `testnet` and `mainnet`. * [#141](https://github.com/babylonlabs-io/babylon/pull/141) Generate voting power events only once when reaching covenant committee quorum +* [#140](https://github.com/babylonlabs-io/babylon/pull/140) Removed `unbonding` +and add `verified` to delegation status parse `NewBTCDelegationStatusFromString`. ## v0.11.0 diff --git a/client/docs/config.json b/client/docs/config.json index ece266f16..83337a2aa 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -37,14 +37,6 @@ "Params": "CheckpointingParams" } } - }, - { - "url": "./tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json", - "operationIds": { - "rename": { - "Params": "ZoneConciergeParams" - } - } } ] } diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index bd3ccacb8..a41de9c5e 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -4738,7304 +4738,1025 @@ paths: type: boolean tags: - Query - /babylon/zoneconcierge/v1/chain_info/{consumer_id}/header/{height}: - get: - summary: Header queries the CZ header and fork headers at a given height. - operationId: Header - responses: - '200': - description: A successful response. - schema: - type: object - properties: - header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header - on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations +definitions: + babylon.btccheckpoint.v1.BTCCheckpointInfoResponse: + type: object + properties: + epoch_number: + type: string + format: uint64 + description: EpochNumber of this checkpoint. + best_submission_btc_block_height: + type: string + format: uint64 + title: btc height of the best submission of the epoch + best_submission_btc_block_hash: + type: string + title: >- + hash of the btc block which determines checkpoint btc block height + i.e. - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ + youngest block of best submission Hexadecimal + best_submission_transactions: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + description: Index Bitcoin Transaction index in block. + hash: + type: string + description: Hash BTC Header hash as hex. + transaction: + type: string + description: transaction is the full transaction data as str hex. + proof: + type: string + title: >- + proof is the Merkle proof that this tx is included in the + position in `key` + title: |- + TransactionInfoResponse is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: the BTC checkpoint transactions of the best submission + best_submission_vigilante_address_list: + type: array + items: + type: object + properties: + submitter: + type: string + description: >- + submitter is the address of the checkpoint submitter to BTC, + extracted from - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block - that includes this CZ + the checkpoint itself. + reporter: + type: string + title: >- + reporter is the address of the reporter who reported the + submissions, - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header + calculated from submission message MsgInsertBTCSpvProof itself + title: >- + CheckpointAddressesResponse contains the addresses of the submitter + and reporter of a - (babylon_block_height, babylon_tx_hash) jointly provides - the position of + given checkpoint + title: list of vigilantes' addresses of the best submission + description: >- + BTCCheckpointInfoResponse contains all data about best submission of + checkpoint for - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - fork_headers: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger + given epoch. Best submission is the submission which is deeper in btc + ledger. + babylon.btccheckpoint.v1.CheckpointAddressesResponse: + type: object + properties: + submitter: + type: string + description: >- + submitter is the address of the checkpoint submitter to BTC, extracted + from - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger + the checkpoint itself. + reporter: + type: string + title: |- + reporter is the address of the reporter who reported the submissions, + calculated from submission message MsgInsertBTCSpvProof itself + title: >- + CheckpointAddressesResponse contains the addresses of the submitter and + reporter of a - it is needed for CZ to unbond all mature - validators/delegations + given checkpoint + babylon.btccheckpoint.v1.Params: + type: object + properties: + btc_confirmation_depth: + type: string + format: uint64 + title: >- + btc_confirmation_depth is the confirmation depth in BTC. - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ + A block is considered irreversible only when it is at least k-deep in + BTC - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon - block that includes this CZ + (k in research paper) + checkpoint_finalization_timeout: + type: string + format: uint64 + title: >- + checkpoint_finalization_timeout is the maximum time window (measured + in BTC - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes - this header + blocks) between a checkpoint - (babylon_block_height, babylon_tx_hash) jointly - provides the position of + - being submitted to BTC, and - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers at the - same height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the same - height. + - being reported back to BBN - For example, assuming the following blockchain + If a checkpoint has not been reported back within w BTC blocks, then + BBN - ``` + has dishonest majority and is stalling checkpoints (w in research + paper) + checkpoint_tag: + type: string + title: >- + 4byte tag in hex format, required to be present in the OP_RETURN + transaction - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` + related to babylon + description: Params defines the parameters for the module. + babylon.btccheckpoint.v1.QueryBtcCheckpointInfoResponse: + type: object + properties: + info: + type: object + properties: + epoch_number: + type: string + format: uint64 + description: EpochNumber of this checkpoint. + best_submission_btc_block_height: + type: string + format: uint64 + title: btc height of the best submission of the epoch + best_submission_btc_block_hash: + type: string + title: >- + hash of the btc block which determines checkpoint btc block height + i.e. - Then the fork will be {[D1, D2]} where each item is in struct - `IndexedBlock`. + youngest block of best submission Hexadecimal + best_submission_transactions: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + description: Index Bitcoin Transaction index in block. + hash: + type: string + description: Hash BTC Header hash as hex. + transaction: + type: string + description: transaction is the full transaction data as str hex. + proof: + type: string + title: >- + proof is the Merkle proof that this tx is included in the + position in `key` + title: |- + TransactionInfoResponse is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: the BTC checkpoint transactions of the best submission + best_submission_vigilante_address_list: + type: array + items: + type: object + properties: + submitter: + type: string + description: >- + submitter is the address of the checkpoint submitter to BTC, + extracted from + the checkpoint itself. + reporter: + type: string + title: >- + reporter is the address of the reporter who reported the + submissions, - Note that each `IndexedHeader` in the fork should have a valid - quorum + calculated from submission message MsgInsertBTCSpvProof + itself + title: >- + CheckpointAddressesResponse contains the addresses of the + submitter and reporter of a - certificate. Such forks exist since Babylon considers CZs - might have - - dishonest majority. Also note that the IBC-Go implementation - will only - - consider the first header in a fork valid, since the - subsequent headers - - cannot be verified without knowing the validator set in the - previous header. - description: >- - QueryHeaderResponse is response type for the Query/Header RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + given checkpoint + title: list of vigilantes' addresses of the best submission + description: >- + BTCCheckpointInfoResponse contains all data about best submission of + checkpoint for - protocol buffer message. This string must contain at - least + given epoch. Best submission is the submission which is deeper in btc + ledger. + title: |- + QueryBtcCheckpointInfoResponse is response type for the + Query/BtcCheckpointInfo RPC method + babylon.btccheckpoint.v1.QueryBtcCheckpointsInfoResponse: + type: object + properties: + info_list: + type: array + items: + type: object + properties: + epoch_number: + type: string + format: uint64 + description: EpochNumber of this checkpoint. + best_submission_btc_block_height: + type: string + format: uint64 + title: btc height of the best submission of the epoch + best_submission_btc_block_hash: + type: string + title: >- + hash of the btc block which determines checkpoint btc block + height i.e. - one "/" character. The last segment of the URL's path - must represent + youngest block of best submission Hexadecimal + best_submission_transactions: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + description: Index Bitcoin Transaction index in block. + hash: + type: string + description: Hash BTC Header hash as hex. + transaction: + type: string + description: transaction is the full transaction data as str hex. + proof: + type: string + title: >- + proof is the Merkle proof that this tx is included in the + position in `key` + title: |- + TransactionInfoResponse is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: the BTC checkpoint transactions of the best submission + best_submission_vigilante_address_list: + type: array + items: + type: object + properties: + submitter: + type: string + description: >- + submitter is the address of the checkpoint submitter to + BTC, extracted from - the fully qualified name of the type (as in + the checkpoint itself. + reporter: + type: string + title: >- + reporter is the address of the reporter who reported the + submissions, - `path/google.protobuf.Duration`). The name should be in - a canonical form + calculated from submission message MsgInsertBTCSpvProof + itself + title: >- + CheckpointAddressesResponse contains the addresses of the + submitter and reporter of a - (e.g., leading "." is not accepted). + given checkpoint + title: list of vigilantes' addresses of the best submission + description: >- + BTCCheckpointInfoResponse contains all data about best submission of + checkpoint for + given epoch. Best submission is the submission which is deeper in + btc ledger. + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - In practice, teams usually precompile into the binary - all types that they + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - expect it to use in the context of Any. However, for - URLs which use the + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: |- + QueryBtcCheckpointsInfoResponse is response type for the + Query/BtcCheckpointsInfo RPC method + babylon.btccheckpoint.v1.QueryEpochSubmissionsResponse: + type: object + properties: + keys: + type: array + items: + type: object + properties: + first_tx_block_hash: + type: string + description: FirstTxBlockHash is the BTCHeaderHashBytes in hex. + first_tx_index: + type: integer + format: int64 + second_tx_block_hash: + type: string + description: SecondBlockHash is the BTCHeaderHashBytes in hex. + second_tx_index: + type: integer + format: int64 + title: >- + SubmissionKeyResponse Checkpoint can be composed from multiple + transactions, - scheme `http`, `https`, or no scheme, one can optionally - set up a type + so to identify whole submission we need list of transaction keys. - server that maps type URLs to message definitions as - follows: + Each submission can generally be identified by this list of (txIdx, + blockHash) tuples. Note: this could possibly be optimized as if + transactions - * If no scheme is provided, `https` is assumed. + were in one block they would have the same block hash and different + indexes, - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + but each blockhash is only 33 (1 byte for prefix encoding and 32 + byte hash), - Note: this functionality is not currently available in - the official + so there should be other strong arguments for this optimization + description: Keys All submissions transactions key saved during an epoch. + title: |- + QueryEpochSubmissionsResponse defines a response to get all submissions in + given epoch (QueryEpochSubmissionsRequest) + babylon.btccheckpoint.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + btc_confirmation_depth: + type: string + format: uint64 + title: >- + btc_confirmation_depth is the confirmation depth in BTC. - protobuf release, and it is not used for type URLs - beginning with + A block is considered irreversible only when it is at least k-deep + in BTC - type.googleapis.com. + (k in research paper) + checkpoint_finalization_timeout: + type: string + format: uint64 + title: >- + checkpoint_finalization_timeout is the maximum time window + (measured in BTC + blocks) between a checkpoint - Schemes other than `http`, `https` (or the empty scheme) - might be + - being submitted to BTC, and - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + - being reported back to BBN - URL that describes the type of the serialized message. + If a checkpoint has not been reported back within w BTC blocks, + then BBN + has dishonest majority and is stalling checkpoints (w in research + paper) + checkpoint_tag: + type: string + title: >- + 4byte tag in hex format, required to be present in the OP_RETURN + transaction - Protobuf library provides support to pack/unpack Any values - in the form + related to babylon + description: QueryParamsResponse is response type for the Query/Params RPC method. + babylon.btccheckpoint.v1.SubmissionKeyResponse: + type: object + properties: + first_tx_block_hash: + type: string + description: FirstTxBlockHash is the BTCHeaderHashBytes in hex. + first_tx_index: + type: integer + format: int64 + second_tx_block_hash: + type: string + description: SecondBlockHash is the BTCHeaderHashBytes in hex. + second_tx_index: + type: integer + format: int64 + title: >- + SubmissionKeyResponse Checkpoint can be composed from multiple + transactions, - of utility functions or additional generated methods of the - Any type. + so to identify whole submission we need list of transaction keys. + Each submission can generally be identified by this list of (txIdx, - Example 1: Pack and unpack a message in C++. + blockHash) tuples. Note: this could possibly be optimized as if + transactions - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + were in one block they would have the same block hash and different + indexes, - Example 2: Pack and unpack a message in Java. + but each blockhash is only 33 (1 byte for prefix encoding and 32 byte + hash), - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } + so there should be other strong arguments for this optimization + babylon.btccheckpoint.v1.TransactionInfoResponse: + type: object + properties: + index: + type: integer + format: int64 + description: Index Bitcoin Transaction index in block. + hash: + type: string + description: Hash BTC Header hash as hex. + transaction: + type: string + description: transaction is the full transaction data as str hex. + proof: + type: string + title: >- + proof is the Merkle proof that this tx is included in the position in + `key` + title: |- + TransactionInfoResponse is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + cosmos.base.query.v1beta1.PageRequest: + type: object + properties: + key: + type: string + format: byte + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + offset: + type: string + format: uint64 + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + limit: + type: string + format: uint64 + description: >- + limit is the total number of results to be returned in the result + page. - Example 3: Pack and unpack a message in Python. + If left empty it will default to a value to be set by each app. + count_total: + type: boolean + description: >- + count_total is set to true to indicate that the result set should + include - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + a count of the total number of items available for pagination in UIs. - Example 4: Pack and unpack a message in Go + count_total is only respected when offset is used. It is ignored when + key - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + is set. + reverse: + type: boolean + description: >- + reverse is set to true if results are to be returned in the descending + order. - The pack methods provided by protobuf library will by - default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + Since: cosmos-sdk 0.43 + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + cosmos.base.query.v1beta1.PageResponse: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - methods only use the fully qualified type name after the - last '/' + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + google.protobuf.Any: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + protocol buffer message. This string must contain at least - name "y.z". + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in - JSON + `path/google.protobuf.Duration`). The name should be in a canonical + form + (e.g., leading "." is not accepted). - The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with - an + In practice, teams usually precompile into the binary all types that + they - additional field `@type` which contains the type URL. - Example: + expect it to use in the context of Any. However, for URLs which use + the - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + scheme `http`, `https`, or no scheme, one can optionally set up a type - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + server that maps type URLs to message definitions as follows: - If the embedded message type is well-known and has a custom - JSON - representation, that representation will be embedded adding - a field + * If no scheme is provided, `https` is assumed. - `value` which holds the custom JSON in addition to the - `@type` + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - field. Example (for message [google.protobuf.Duration][]): + Note: this functionality is not currently available in the official - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: consumer_id - in: path - required: true - type: string - - name: height - in: path - required: true - type: string - format: uint64 - tags: - - Query - /babylon/zoneconcierge/v1/chains: - get: - summary: ChainList queries the list of chains that checkpoint to Babylon - operationId: ChainList - responses: - '200': - description: A successful response. - schema: - type: object - properties: - consumer_ids: - type: array - items: - type: string - title: >- - consumer_ids are IDs of the chains in ascending alphabetical - order - pagination: - title: pagination defines the pagination in the response - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + protobuf release, and it is not used for type URLs beginning with - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the + type.googleapis.com. - corresponding request message has used PageRequest. - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: >- - QueryChainListResponse is response type for the Query/ChainList - RPC method - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + Schemes other than `http`, `https` (or the empty scheme) might be - protocol buffer message. This string must contain at - least + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along with + a - one "/" character. The last segment of the URL's path - must represent + URL that describes the type of the serialized message. - the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + Protobuf library provides support to pack/unpack Any values in the form - (e.g., leading "." is not accepted). + of utility functions or additional generated methods of the Any type. - In practice, teams usually precompile into the binary - all types that they + Example 1: Pack and unpack a message in C++. - expect it to use in the context of Any. However, for - URLs which use the + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - scheme `http`, `https`, or no scheme, one can optionally - set up a type + Example 2: Pack and unpack a message in Java. - server that maps type URLs to message definitions as - follows: + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + Example 3: Pack and unpack a message in Python. - * If no scheme is provided, `https` is assumed. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Example 4: Pack and unpack a message in Go - Note: this functionality is not currently available in - the official + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - protobuf release, and it is not used for type URLs - beginning with + The pack methods provided by protobuf library will by default use - type.googleapis.com. + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' - Schemes other than `http`, `https` (or the empty scheme) - might be + in the type URL, for example "foo.bar.com/x/y.z" will yield type - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + name "y.z". - URL that describes the type of the serialized message. + JSON - Protobuf library provides support to pack/unpack Any values - in the form - of utility functions or additional generated methods of the - Any type. + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an - Example 1: Pack and unpack a message in C++. + additional field `@type` which contains the type URL. Example: - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Example 2: Pack and unpack a message in Java. + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } + If the embedded message type is well-known and has a custom JSON - Example 3: Pack and unpack a message in Python. + representation, that representation will be embedded adding a field - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + `value` which holds the custom JSON in addition to the `@type` - Example 4: Pack and unpack a message in Go + field. Example (for message [google.protobuf.Duration][]): - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + grpc.gateway.runtime.Error: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - The pack methods provided by protobuf library will by - default use + protocol buffer message. This string must contain at least - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + one "/" character. The last segment of the URL's path must + represent - methods only use the fully qualified type name after the - last '/' + the fully qualified name of the type (as in - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + `path/google.protobuf.Duration`). The name should be in a + canonical form - name "y.z". + (e.g., leading "." is not accepted). - JSON + In practice, teams usually precompile into the binary all types + that they + expect it to use in the context of Any. However, for URLs which + use the - The JSON representation of an `Any` value uses the regular + scheme `http`, `https`, or no scheme, one can optionally set up + a type - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field + server that maps type URLs to message definitions as follows: - `value` which holds the custom JSON in addition to the - `@type` - field. Example (for message [google.protobuf.Duration][]): + * If no scheme is provided, `https` is assumed. - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - It is less efficient than using key. Only one of offset or key - should + Note: this functionality is not currently available in the + official - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. + protobuf release, and it is not used for type URLs beginning + with - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include + type.googleapis.com. - a count of the total number of items available for pagination in - UIs. - count_total is only respected when offset is used. It is ignored - when key + Schemes other than `http`, `https` (or the empty scheme) might + be - is set. - in: query - required: false - type: boolean - - name: pagination.reverse + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - tags: - - Query - /babylon/zoneconcierge/v1/chains_info: - get: - summary: >- - ChainsInfo queries the latest info for a given list of chains in - Babylon's view - operationId: ChainsInfo - responses: - '200': - description: A successful response. - schema: - type: object - properties: - chains_info: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger + `Any` contains an arbitrary serialized protocol buffer message along + with a - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger + URL that describes the type of the serialized message. - it is needed for CZ to unbond all mature - validators/delegations - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ + Protobuf library provides support to pack/unpack Any values in the + form - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon - block that includes this CZ + of utility functions or additional generated methods of the Any + type. - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes - this header - (babylon_block_height, babylon_tx_hash) jointly - provides the position of + Example 1: Pack and unpack a message in C++. - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ - ledger - - (hash, height) jointly provides the position - of the header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ - ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon - block that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the - babylon block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on - Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that - includes this header - - (babylon_block_height, babylon_tx_hash) - jointly provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers - at the same height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the - same height. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - For example, assuming the following blockchain + Example 2: Pack and unpack a message in Java. - ``` + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` + Example 3: Pack and unpack a message in Python. - Then the fork will be {[D1, D2]} where each item is in - struct `IndexedBlock`. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + Example 4: Pack and unpack a message in Go - Note that each `IndexedHeader` in the fork should have a - valid quorum + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - certificate. Such forks exist since Babylon considers - CZs might have + The pack methods provided by protobuf library will by default use - dishonest majority. Also note that the IBC-Go - implementation will only + 'type.googleapis.com/full.type.name' as the type URL and the unpack - consider the first header in a fork valid, since the - subsequent headers + methods only use the fully qualified type name after the last '/' - cannot be verified without knowing the validator set in - the previous header. - title: >- - latest_forks is the latest forks, formed as a series of - IndexedHeader (from + in the type URL, for example "foo.bar.com/x/y.z" will yield type - low to high) - timestamped_headers_count: - type: string - format: uint64 - title: >- - timestamped_headers_count is the number of timestamped - headers in CZ's + name "y.z". - canonical chain - title: ChainInfo is the information of a CZ - description: >- - QueryChainsInfoResponse is response type for the Query/ChainsInfo - RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - protocol buffer message. This string must contain at - least + JSON - one "/" character. The last segment of the URL's path - must represent - the fully qualified name of the type (as in + The JSON representation of an `Any` value uses the regular - `path/google.protobuf.Duration`). The name should be in - a canonical form + representation of the deserialized, embedded message, with an - (e.g., leading "." is not accepted). + additional field `@type` which contains the type URL. Example: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - In practice, teams usually precompile into the binary - all types that they + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - expect it to use in the context of Any. However, for - URLs which use the + If the embedded message type is well-known and has a custom JSON - scheme `http`, `https`, or no scheme, one can optionally - set up a type + representation, that representation will be embedded adding a field - server that maps type URLs to message definitions as - follows: + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: consumer_ids - in: query - required: false - type: array - items: - type: string - collectionFormat: multi - tags: - - Query - /babylon/zoneconcierge/v1/epoch_chains_info: - get: - summary: |- - EpochChainsInfo queries the latest info for a list of chains - in a given epoch in Babylon's view - operationId: EpochChainsInfo - responses: - '200': - description: A successful response. - schema: - type: object - properties: - chains_info: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon - block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes - this header - - (babylon_block_height, babylon_tx_hash) jointly - provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ - ledger - - (hash, height) jointly provides the position - of the header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ - ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon - block that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the - babylon block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on - Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that - includes this header - - (babylon_block_height, babylon_tx_hash) - jointly provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers - at the same height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the - same height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in - struct `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should have a - valid quorum - - certificate. Such forks exist since Babylon considers - CZs might have - - dishonest majority. Also note that the IBC-Go - implementation will only - - consider the first header in a fork valid, since the - subsequent headers - - cannot be verified without knowing the validator set in - the previous header. - title: >- - latest_forks is the latest forks, formed as a series of - IndexedHeader (from - - low to high) - timestamped_headers_count: - type: string - format: uint64 - title: >- - timestamped_headers_count is the number of timestamped - headers in CZ's - - canonical chain - title: ChainInfo is the information of a CZ - title: chain_info is the info of the CZ - description: >- - QueryEpochChainsInfoResponse is response type for the - Query/EpochChainsInfo RPC - - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: epoch_num - in: query - required: false - type: string - format: uint64 - - name: consumer_ids - in: query - required: false - type: array - items: - type: string - collectionFormat: multi - tags: - - Query - /babylon/zoneconcierge/v1/finalized_chain_info/{consumer_id}/height/{height}: - get: - summary: >- - FinalizedChainInfoUntilHeight queries the BTC-finalised info no later - than - - the provided CZ height, with proofs - operationId: FinalizedChainInfoUntilHeight - responses: - '200': - description: A successful response. - schema: - type: object - properties: - finalized_chain_info: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon - block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes - this header - - (babylon_block_height, babylon_tx_hash) jointly - provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of - the header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ - ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon - block that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the - babylon block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on - Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that - includes this header - - (babylon_block_height, babylon_tx_hash) jointly - provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers at - the same height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the - same height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in - struct `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should have a - valid quorum - - certificate. Such forks exist since Babylon considers CZs - might have - - dishonest majority. Also note that the IBC-Go - implementation will only - - consider the first header in a fork valid, since the - subsequent headers - - cannot be verified without knowing the validator set in - the previous header. - title: >- - latest_forks is the latest forks, formed as a series of - IndexedHeader (from - - low to high) - timestamped_headers_count: - type: string - format: uint64 - title: >- - timestamped_headers_count is the number of timestamped - headers in CZ's - - canonical chain - title: ChainInfo is the information of a CZ - epoch_info: - title: epoch_info is the metadata of the last BTC-finalised epoch - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: >- - current_epoch_interval is the epoch interval at the time - of this epoch - first_block_height: - type: string - format: uint64 - title: >- - first_block_height is the height of the first block in - this epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this - epoch. - - Babylon needs to remember the last header's time of each - epoch to complete - - unbonding validators/delegations when a previous epoch's - checkpoint is - - finalised. The last_block_time field is nil in the epoch's - beginning, and - - is set upon the end of this epoch. - sealer_app_hash: - type: string - format: byte - title: >- - sealer is the last block of the sealed epoch - - sealer_app_hash points to the sealer but stored in the 1st - header - - of the next epoch - sealer_block_hash: - type: string - format: byte - title: >- - sealer_block_hash is the hash of the sealer - - the validator set has generated a BLS multisig on the - hash, - - i.e., hash of the last block in the epoch - raw_checkpoint: - title: raw_checkpoint is the raw checkpoint of this epoch - type: object - properties: - epoch_num: - type: string - format: uint64 - title: >- - epoch_num defines the epoch number the raw checkpoint is - for - block_hash: - type: string - format: byte - title: >- - block_hash defines the 'BlockID.Hash', which is the hash - of - - the block that individual BLS sigs are signed on - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of - the BLS multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated - from individual BLS - - sigs - btc_submission_key: - title: >- - btc_submission_key is position of two BTC txs that include the - raw - - checkpoint of this epoch - type: object - properties: - key: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be identified by - hash of block in - - which transaction was included and transaction index in - the block - proof: - title: proof is the proof that the chain info is finalized - type: object - properties: - proof_cz_header_in_epoch: - title: >- - proof_cz_header_in_epoch is the proof that the CZ header - is timestamped - - within a certain epoch - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating - Merkle root - - The data could be arbitrary format, providing - necessary data - - for example neighbouring node hash - proof_epoch_sealed: - title: proof_epoch_sealed is the proof that the epoch is sealed - type: object - properties: - validator_set: - type: array - items: - type: object - properties: - validator_address: - type: string - title: >- - validator_address is the address of the - validator - bls_pub_key: - type: string - format: byte - title: >- - bls_pub_key is the BLS public key of the - validator - voting_power: - type: string - format: uint64 - title: >- - voting_power is the voting power of the - validator at the given epoch - title: >- - ValidatorWithBlsKey couples validator address, - voting power, and its bls - - public key - title: >- - validator_set is the validator set of the sealed epoch - - This validator set has generated a BLS multisig on - `app_hash` of - - the sealer header - proof_epoch_info: - title: >- - proof_epoch_info is the Merkle proof that the epoch's - metadata is committed - - to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for - calculating Merkle root - - The data could be arbitrary format, providing - necessary data - - for example neighbouring node hash - proof_epoch_val_set: - title: >- - proof_epoch_info is the Merkle proof that the epoch's - validator set is - - committed to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for - calculating Merkle root - - The data could be arbitrary format, providing - necessary data - - for example neighbouring node hash - proof_epoch_submitted: - type: array - items: - type: object - properties: - key: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be - identified by hash of block in - - which transaction was included and transaction index - in the block - description: >- - key is the position (txIdx, blockHash) of this tx on - BTC blockchain - - Although it is already a part of SubmissionKey, we - store it here again - - to make TransactionInfo self-contained. - - For example, storing the key allows TransactionInfo - to not relay on - - the fact that TransactionInfo will be ordered in the - same order as - - TransactionKeys in SubmissionKey. - transaction: - type: string - format: byte - title: transaction is the full transaction in bytes - proof: - type: string - format: byte - title: >- - proof is the Merkle proof that this tx is included - in the position in `key` - - TODO: maybe it could use here better format as we - already processed and - - validated the proof? - title: |- - TransactionInfo is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: >- - proof_epoch_submitted is the proof that the epoch's - checkpoint is included - - in BTC ledger It is the two TransactionInfo in the best - (i.e., earliest) - - checkpoint submission - description: >- - QueryFinalizedChainInfoUntilHeightResponse is response type for - the - - Query/FinalizedChainInfoUntilHeight RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: consumer_id - description: consumer_id is the ID of the CZ - in: path - required: true - type: string - - name: height - description: >- - height is the height of the CZ chain - - such that the returned finalised chain info will be no later than - this - - height - in: path - required: true - type: string - format: uint64 - - name: prove - description: >- - prove indicates whether the querier wants to get proofs of this - timestamp. - in: query - required: false - type: boolean - tags: - - Query - /babylon/zoneconcierge/v1/finalized_chains_info: - get: - summary: >- - FinalizedChainsInfo queries the BTC-finalised info of chains with given - IDs, with proofs - operationId: FinalizedChainsInfo - responses: - '200': - description: A successful response. - schema: - type: object - properties: - finalized_chains_info: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the ID of the consumer - finalized_chain_info: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of - the header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ - ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon - block that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the - babylon block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on - Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that - includes this header - - (babylon_block_height, babylon_tx_hash) jointly - provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: >- - consumer_id is the unique ID of the - consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ - ledger - - (hash, height) jointly provides the - position of the header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ - ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the - babylon block that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the - babylon block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header - on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that - includes this header - - (babylon_block_height, babylon_tx_hash) - jointly provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed - headers at the same height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at - the same height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is - in struct `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should - have a valid quorum - - certificate. Such forks exist since Babylon - considers CZs might have - - dishonest majority. Also note that the IBC-Go - implementation will only - - consider the first header in a fork valid, since the - subsequent headers - - cannot be verified without knowing the validator set - in the previous header. - title: >- - latest_forks is the latest forks, formed as a series - of IndexedHeader (from - - low to high) - timestamped_headers_count: - type: string - format: uint64 - title: >- - timestamped_headers_count is the number of - timestamped headers in CZ's - - canonical chain - title: ChainInfo is the information of a CZ - epoch_info: - title: >- - epoch_info is the metadata of the last BTC-finalised - epoch - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: >- - current_epoch_interval is the epoch interval at the - time of this epoch - first_block_height: - type: string - format: uint64 - title: >- - first_block_height is the height of the first block - in this epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in - this epoch. - - Babylon needs to remember the last header's time of - each epoch to complete - - unbonding validators/delegations when a previous - epoch's checkpoint is - - finalised. The last_block_time field is nil in the - epoch's beginning, and - - is set upon the end of this epoch. - sealer_app_hash: - type: string - format: byte - title: >- - sealer is the last block of the sealed epoch - - sealer_app_hash points to the sealer but stored in - the 1st header - - of the next epoch - sealer_block_hash: - type: string - format: byte - title: >- - sealer_block_hash is the hash of the sealer - - the validator set has generated a BLS multisig on - the hash, - - i.e., hash of the last block in the epoch - raw_checkpoint: - title: raw_checkpoint is the raw checkpoint of this epoch - type: object - properties: - epoch_num: - type: string - format: uint64 - title: >- - epoch_num defines the epoch number the raw - checkpoint is for - block_hash: - type: string - format: byte - title: >- - block_hash defines the 'BlockID.Hash', which is the - hash of - - the block that individual BLS sigs are signed on - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers - of the BLS multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is - aggregated from individual BLS - - sigs - btc_submission_key: - title: >- - btc_submission_key is position of two BTC txs that - include the raw - - checkpoint of this epoch - type: object - properties: - key: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be - identified by hash of block in - - which transaction was included and transaction - index in the block - proof: - title: proof is the proof that the chain info is finalized - type: object - properties: - proof_cz_header_in_epoch: - title: >- - proof_cz_header_in_epoch is the proof that the CZ - header is timestamped - - within a certain epoch - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for - calculating Merkle root - - The data could be arbitrary format, providing - necessary data - - for example neighbouring node hash - proof_epoch_sealed: - title: >- - proof_epoch_sealed is the proof that the epoch is - sealed - type: object - properties: - validator_set: - type: array - items: - type: object - properties: - validator_address: - type: string - title: >- - validator_address is the address of the - validator - bls_pub_key: - type: string - format: byte - title: >- - bls_pub_key is the BLS public key of the - validator - voting_power: - type: string - format: uint64 - title: >- - voting_power is the voting power of the - validator at the given epoch - title: >- - ValidatorWithBlsKey couples validator address, - voting power, and its bls - - public key - title: >- - validator_set is the validator set of the sealed - epoch - - This validator set has generated a BLS multisig - on `app_hash` of - - the sealer header - proof_epoch_info: - title: >- - proof_epoch_info is the Merkle proof that the - epoch's metadata is committed - - to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for - calculating Merkle root - - The data could be arbitrary format, - providing necessary data - - for example neighbouring node hash - proof_epoch_val_set: - title: >- - proof_epoch_info is the Merkle proof that the - epoch's validator set is - - committed to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for - calculating Merkle root - - The data could be arbitrary format, - providing necessary data - - for example neighbouring node hash - proof_epoch_submitted: - type: array - items: - type: object - properties: - key: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be - identified by hash of block in - - which transaction was included and transaction - index in the block - description: >- - key is the position (txIdx, blockHash) of this - tx on BTC blockchain - - Although it is already a part of - SubmissionKey, we store it here again - - to make TransactionInfo self-contained. - - For example, storing the key allows - TransactionInfo to not relay on - - the fact that TransactionInfo will be ordered - in the same order as - - TransactionKeys in SubmissionKey. - transaction: - type: string - format: byte - title: transaction is the full transaction in bytes - proof: - type: string - format: byte - title: >- - proof is the Merkle proof that this tx is - included in the position in `key` - - TODO: maybe it could use here better format as - we already processed and - - validated the proof? - title: >- - TransactionInfo is the info of a tx on Bitcoin, - - including - - - the position of the tx on BTC blockchain - - - the full tx content - - - the Merkle proof that this tx is on the above - position - title: >- - proof_epoch_submitted is the proof that the epoch's - checkpoint is included - - in BTC ledger It is the two TransactionInfo in the - best (i.e., earliest) - - checkpoint submission - title: >- - FinalizedChainInfo is the information of a CZ that is - BTC-finalised - description: |- - QueryFinalizedChainsInfoResponse is response type for the - Query/FinalizedChainsInfo RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: consumer_ids - description: consumer_ids is the list of ids of CZs. - in: query - required: false - type: array - items: - type: string - collectionFormat: multi - - name: prove - description: >- - prove indicates whether the querier wants to get proofs of this - timestamp. - in: query - required: false - type: boolean - tags: - - Query - /babylon/zoneconcierge/v1/headers/{consumer_id}: - get: - summary: |- - ListHeaders queries the headers of a chain in Babylon's view, with - pagination support - operationId: ListHeaders - responses: - '200': - description: A successful response. - schema: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block - that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides - the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: headers is the list of headers - pagination: - title: pagination defines the pagination in the response - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - description: >- - QueryListHeadersResponse is response type for the - Query/ListHeaders RPC - - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: consumer_id - in: path - required: true - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - tags: - - Query - /babylon/zoneconcierge/v1/headers/{consumer_id}/epochs/{epoch_num}: - get: - summary: |- - ListEpochHeaders queries the headers of a chain timestamped in a given - epoch of Babylon, with pagination support - operationId: ListEpochHeaders - responses: - '200': - description: A successful response. - schema: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block - that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides - the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: headers is the list of headers - description: >- - QueryListEpochHeadersResponse is response type for the - Query/ListEpochHeaders - - RPC method. - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: consumer_id - in: path - required: true - type: string - - name: epoch_num - in: path - required: true - type: string - format: uint64 - tags: - - Query - /babylon/zoneconcierge/v1/params: - get: - summary: Params queries the parameters of the module. - operationId: ZoneConciergeParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - ibc_packet_timeout_seconds: - type: integer - format: int64 - title: >- - ibc_packet_timeout_seconds is the time period after which - an unrelayed - - IBC packet becomes timeout, measured in seconds - description: >- - QueryParamsResponse is the response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - tags: - - Query -definitions: - babylon.btccheckpoint.v1.BTCCheckpointInfoResponse: - type: object - properties: - epoch_number: - type: string - format: uint64 - description: EpochNumber of this checkpoint. - best_submission_btc_block_height: - type: string - format: uint64 - title: btc height of the best submission of the epoch - best_submission_btc_block_hash: - type: string - title: >- - hash of the btc block which determines checkpoint btc block height - i.e. - - youngest block of best submission Hexadecimal - best_submission_transactions: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - description: Index Bitcoin Transaction index in block. - hash: - type: string - description: Hash BTC Header hash as hex. - transaction: - type: string - description: transaction is the full transaction data as str hex. - proof: - type: string - title: >- - proof is the Merkle proof that this tx is included in the - position in `key` - title: |- - TransactionInfoResponse is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: the BTC checkpoint transactions of the best submission - best_submission_vigilante_address_list: - type: array - items: - type: object - properties: - submitter: - type: string - description: >- - submitter is the address of the checkpoint submitter to BTC, - extracted from - - the checkpoint itself. - reporter: - type: string - title: >- - reporter is the address of the reporter who reported the - submissions, - - calculated from submission message MsgInsertBTCSpvProof itself - title: >- - CheckpointAddressesResponse contains the addresses of the submitter - and reporter of a - - given checkpoint - title: list of vigilantes' addresses of the best submission - description: >- - BTCCheckpointInfoResponse contains all data about best submission of - checkpoint for - - given epoch. Best submission is the submission which is deeper in btc - ledger. - babylon.btccheckpoint.v1.CheckpointAddressesResponse: - type: object - properties: - submitter: - type: string - description: >- - submitter is the address of the checkpoint submitter to BTC, extracted - from - - the checkpoint itself. - reporter: - type: string - title: |- - reporter is the address of the reporter who reported the submissions, - calculated from submission message MsgInsertBTCSpvProof itself - title: >- - CheckpointAddressesResponse contains the addresses of the submitter and - reporter of a - - given checkpoint - babylon.btccheckpoint.v1.Params: - type: object - properties: - btc_confirmation_depth: - type: string - format: uint64 - title: >- - btc_confirmation_depth is the confirmation depth in BTC. - - A block is considered irreversible only when it is at least k-deep in - BTC - - (k in research paper) - checkpoint_finalization_timeout: - type: string - format: uint64 - title: >- - checkpoint_finalization_timeout is the maximum time window (measured - in BTC - - blocks) between a checkpoint - - - being submitted to BTC, and - - - being reported back to BBN - - If a checkpoint has not been reported back within w BTC blocks, then - BBN - - has dishonest majority and is stalling checkpoints (w in research - paper) - checkpoint_tag: - type: string - title: >- - 4byte tag in hex format, required to be present in the OP_RETURN - transaction - - related to babylon - description: Params defines the parameters for the module. - babylon.btccheckpoint.v1.QueryBtcCheckpointInfoResponse: - type: object - properties: - info: - type: object - properties: - epoch_number: - type: string - format: uint64 - description: EpochNumber of this checkpoint. - best_submission_btc_block_height: - type: string - format: uint64 - title: btc height of the best submission of the epoch - best_submission_btc_block_hash: - type: string - title: >- - hash of the btc block which determines checkpoint btc block height - i.e. - - youngest block of best submission Hexadecimal - best_submission_transactions: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - description: Index Bitcoin Transaction index in block. - hash: - type: string - description: Hash BTC Header hash as hex. - transaction: - type: string - description: transaction is the full transaction data as str hex. - proof: - type: string - title: >- - proof is the Merkle proof that this tx is included in the - position in `key` - title: |- - TransactionInfoResponse is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: the BTC checkpoint transactions of the best submission - best_submission_vigilante_address_list: - type: array - items: - type: object - properties: - submitter: - type: string - description: >- - submitter is the address of the checkpoint submitter to BTC, - extracted from - - the checkpoint itself. - reporter: - type: string - title: >- - reporter is the address of the reporter who reported the - submissions, - - calculated from submission message MsgInsertBTCSpvProof - itself - title: >- - CheckpointAddressesResponse contains the addresses of the - submitter and reporter of a - - given checkpoint - title: list of vigilantes' addresses of the best submission - description: >- - BTCCheckpointInfoResponse contains all data about best submission of - checkpoint for - - given epoch. Best submission is the submission which is deeper in btc - ledger. - title: |- - QueryBtcCheckpointInfoResponse is response type for the - Query/BtcCheckpointInfo RPC method - babylon.btccheckpoint.v1.QueryBtcCheckpointsInfoResponse: - type: object - properties: - info_list: - type: array - items: - type: object - properties: - epoch_number: - type: string - format: uint64 - description: EpochNumber of this checkpoint. - best_submission_btc_block_height: - type: string - format: uint64 - title: btc height of the best submission of the epoch - best_submission_btc_block_hash: - type: string - title: >- - hash of the btc block which determines checkpoint btc block - height i.e. - - youngest block of best submission Hexadecimal - best_submission_transactions: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - description: Index Bitcoin Transaction index in block. - hash: - type: string - description: Hash BTC Header hash as hex. - transaction: - type: string - description: transaction is the full transaction data as str hex. - proof: - type: string - title: >- - proof is the Merkle proof that this tx is included in the - position in `key` - title: |- - TransactionInfoResponse is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: the BTC checkpoint transactions of the best submission - best_submission_vigilante_address_list: - type: array - items: - type: object - properties: - submitter: - type: string - description: >- - submitter is the address of the checkpoint submitter to - BTC, extracted from - - the checkpoint itself. - reporter: - type: string - title: >- - reporter is the address of the reporter who reported the - submissions, - - calculated from submission message MsgInsertBTCSpvProof - itself - title: >- - CheckpointAddressesResponse contains the addresses of the - submitter and reporter of a - - given checkpoint - title: list of vigilantes' addresses of the best submission - description: >- - BTCCheckpointInfoResponse contains all data about best submission of - checkpoint for - - given epoch. Best submission is the submission which is deeper in - btc ledger. - pagination: - title: pagination defines the pagination in the response - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: |- - QueryBtcCheckpointsInfoResponse is response type for the - Query/BtcCheckpointsInfo RPC method - babylon.btccheckpoint.v1.QueryEpochSubmissionsResponse: - type: object - properties: - keys: - type: array - items: - type: object - properties: - first_tx_block_hash: - type: string - description: FirstTxBlockHash is the BTCHeaderHashBytes in hex. - first_tx_index: - type: integer - format: int64 - second_tx_block_hash: - type: string - description: SecondBlockHash is the BTCHeaderHashBytes in hex. - second_tx_index: - type: integer - format: int64 - title: >- - SubmissionKeyResponse Checkpoint can be composed from multiple - transactions, - - so to identify whole submission we need list of transaction keys. - - Each submission can generally be identified by this list of (txIdx, - - blockHash) tuples. Note: this could possibly be optimized as if - transactions - - were in one block they would have the same block hash and different - indexes, - - but each blockhash is only 33 (1 byte for prefix encoding and 32 - byte hash), - - so there should be other strong arguments for this optimization - description: Keys All submissions transactions key saved during an epoch. - title: |- - QueryEpochSubmissionsResponse defines a response to get all submissions in - given epoch (QueryEpochSubmissionsRequest) - babylon.btccheckpoint.v1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - btc_confirmation_depth: - type: string - format: uint64 - title: >- - btc_confirmation_depth is the confirmation depth in BTC. - - A block is considered irreversible only when it is at least k-deep - in BTC - - (k in research paper) - checkpoint_finalization_timeout: - type: string - format: uint64 - title: >- - checkpoint_finalization_timeout is the maximum time window - (measured in BTC - - blocks) between a checkpoint - - - being submitted to BTC, and - - - being reported back to BBN - - If a checkpoint has not been reported back within w BTC blocks, - then BBN - - has dishonest majority and is stalling checkpoints (w in research - paper) - checkpoint_tag: - type: string - title: >- - 4byte tag in hex format, required to be present in the OP_RETURN - transaction - - related to babylon - description: QueryParamsResponse is response type for the Query/Params RPC method. - babylon.btccheckpoint.v1.SubmissionKeyResponse: - type: object - properties: - first_tx_block_hash: - type: string - description: FirstTxBlockHash is the BTCHeaderHashBytes in hex. - first_tx_index: - type: integer - format: int64 - second_tx_block_hash: - type: string - description: SecondBlockHash is the BTCHeaderHashBytes in hex. - second_tx_index: - type: integer - format: int64 - title: >- - SubmissionKeyResponse Checkpoint can be composed from multiple - transactions, - - so to identify whole submission we need list of transaction keys. - - Each submission can generally be identified by this list of (txIdx, - - blockHash) tuples. Note: this could possibly be optimized as if - transactions - - were in one block they would have the same block hash and different - indexes, - - but each blockhash is only 33 (1 byte for prefix encoding and 32 byte - hash), - - so there should be other strong arguments for this optimization - babylon.btccheckpoint.v1.TransactionInfoResponse: - type: object - properties: - index: - type: integer - format: int64 - description: Index Bitcoin Transaction index in block. - hash: - type: string - description: Hash BTC Header hash as hex. - transaction: - type: string - description: transaction is the full transaction data as str hex. - proof: - type: string - title: >- - proof is the Merkle proof that this tx is included in the position in - `key` - title: |- - TransactionInfoResponse is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - cosmos.base.query.v1beta1.PageRequest: - type: object - properties: - key: - type: string - format: byte - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - offset: - type: string - format: uint64 - description: |- - offset is a numeric offset that can be used when key is unavailable. - It is less efficient than using key. Only one of offset or key should - be set. - limit: - type: string - format: uint64 - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - count_total: - type: boolean - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in UIs. - - count_total is only respected when offset is used. It is ignored when - key - - is set. - reverse: - type: boolean - description: >- - reverse is set to true if results are to be returned in the descending - order. - - - Since: cosmos-sdk 0.43 - description: |- - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } - title: |- - PageRequest is to be embedded in gRPC request messages for efficient - pagination. Ex: - cosmos.base.query.v1beta1.PageResponse: - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: |- - total is total number of results available if PageRequest.count_total - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - google.protobuf.Any: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a canonical - form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types that - they - - expect it to use in the context of Any. However, for URLs which use - the - - scheme `http`, `https`, or no scheme, one can optionally set up a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along with - a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - grpc.gateway.runtime.Error: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up - a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - babylon.btclightclient.v1.BTCHeaderInfoResponse: - type: object - properties: - header_hex: - type: string - hash_hex: - type: string - height: - type: string - format: uint64 - work: - type: string - description: Work is the sdkmath.Uint as string. - description: >- - BTCHeaderInfoResponse is a structure that contains all relevant - information about a - - BTC header response - - Full header as string hex. - - Header hash for easy retrieval as string hex. - - Height of the header in the BTC chain. - - Total work spent on the header. This is the sum of the work corresponding - to the header Bits field - and the total work of the header. - babylon.btclightclient.v1.Params: - type: object - properties: - insert_headers_allow_list: - type: array - items: - type: string - title: >- - List of addresses which are allowed to insert headers to btc light - client - - if the list is empty, any address can insert headers - description: Params defines the parameters for the module. - babylon.btclightclient.v1.QueryBaseHeaderResponse: - type: object - properties: - header: - type: object - properties: - header_hex: - type: string - hash_hex: - type: string - height: - type: string - format: uint64 - work: - type: string - description: Work is the sdkmath.Uint as string. - description: >- - BTCHeaderInfoResponse is a structure that contains all relevant - information about a - - BTC header response - - Full header as string hex. - - Header hash for easy retrieval as string hex. - - Height of the header in the BTC chain. - - Total work spent on the header. This is the sum of the work corresponding - to the header Bits field - and the total work of the header. - description: |- - QueryBaseHeaderResponse is the response type for the Query/BaseHeader RPC - method. - babylon.btclightclient.v1.QueryContainsBytesResponse: - type: object - properties: - contains: - type: boolean - description: >- - QueryContainsResponse is response type for the temporary - Query/ContainsBytes - - RPC method. - babylon.btclightclient.v1.QueryContainsResponse: - type: object - properties: - contains: - type: boolean - description: QueryContainsResponse is response type for the Query/Contains RPC method. - babylon.btclightclient.v1.QueryHashesResponse: - type: object - properties: - hashes: - type: array - items: - type: string - format: byte - pagination: - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - description: QueryHashesResponse is response type for the Query/Hashes RPC method. - babylon.btclightclient.v1.QueryHeaderDepthResponse: - type: object - properties: - depth: - type: string - format: uint64 - title: >- - QueryMainChainDepthResponse is the response type for the - Query/MainChainDepth RPC - - it contains depth of the block in main chain - babylon.btclightclient.v1.QueryMainChainResponse: - type: object - properties: - headers: - type: array - items: - type: object - properties: - header_hex: - type: string - hash_hex: - type: string - height: - type: string - format: uint64 - work: - type: string - description: Work is the sdkmath.Uint as string. - description: >- - BTCHeaderInfoResponse is a structure that contains all relevant - information about a - - BTC header response - - Full header as string hex. - - Header hash for easy retrieval as string hex. - - Height of the header in the BTC chain. - - Total work spent on the header. This is the sum of the work corresponding - to the header Bits field - and the total work of the header. - pagination: - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - description: >- - QueryMainChainResponse is response type for the Query/MainChain RPC - method. - babylon.btclightclient.v1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - insert_headers_allow_list: - type: array - items: - type: string - title: >- - List of addresses which are allowed to insert headers to btc light - client - - if the list is empty, any address can insert headers - description: QueryParamsResponse is the response type for the Query/Params RPC method. - babylon.btclightclient.v1.QueryTipResponse: - type: object - properties: - header: - type: object - properties: - header_hex: - type: string - hash_hex: - type: string - height: - type: string - format: uint64 - work: - type: string - description: Work is the sdkmath.Uint as string. - description: >- - BTCHeaderInfoResponse is a structure that contains all relevant - information about a - - BTC header response - - Full header as string hex. - - Header hash for easy retrieval as string hex. - - Height of the header in the BTC chain. - - Total work spent on the header. This is the sum of the work corresponding - to the header Bits field - and the total work of the header. - description: QueryTipResponse is the response type for the Query/Tip RPC method. - babylon.epoching.v1.BondState: - type: string - enum: - - CREATED - - BONDED - - UNBONDING - - UNBONDED - - REMOVED - default: CREATED - description: |- - - CREATED: CREATED is when the validator/delegation has been created - - BONDED: CREATED is when the validator/delegation has become bonded - - UNBONDING: CREATED is when the validator/delegation has become unbonding - - UNBONDED: CREATED is when the validator/delegation has become unbonded - - REMOVED: CREATED is when the validator/delegation has been removed - title: BondState is the bond state of a validator or delegation - babylon.epoching.v1.DelegationLifecycle: - type: object - properties: - del_addr: - type: string - del_life: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CREATED - - BONDED - - UNBONDING - - UNBONDED - - REMOVED - default: CREATED - description: >- - - CREATED: CREATED is when the validator/delegation has been - created - - BONDED: CREATED is when the validator/delegation has become bonded - - UNBONDING: CREATED is when the validator/delegation has become unbonding - - UNBONDED: CREATED is when the validator/delegation has become unbonded - - REMOVED: CREATED is when the validator/delegation has been removed - title: BondState is the bond state of a validator or delegation - val_addr: - type: string - amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time - title: >- - DelegationStateUpdate is the message that records a state update of - a - - delegation - title: |- - ValidatorLifecycle is a message that records the lifecycle of - a delegation - babylon.epoching.v1.DelegationStateUpdate: - type: object - properties: - state: - type: string - enum: - - CREATED - - BONDED - - UNBONDING - - UNBONDED - - REMOVED - default: CREATED - description: |- - - CREATED: CREATED is when the validator/delegation has been created - - BONDED: CREATED is when the validator/delegation has become bonded - - UNBONDING: CREATED is when the validator/delegation has become unbonding - - UNBONDED: CREATED is when the validator/delegation has become unbonded - - REMOVED: CREATED is when the validator/delegation has been removed - title: BondState is the bond state of a validator or delegation - val_addr: - type: string - amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time - title: |- - DelegationStateUpdate is the message that records a state update of a - delegation - babylon.epoching.v1.EpochResponse: - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: current_epoch_interval is the epoch interval at the time of this epoch - first_block_height: - type: string - format: uint64 - title: first_block_height is the height of the first block in this epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. - - Babylon needs to remember the last header's time of each epoch to - complete - - unbonding validators/delegations when a previous epoch's checkpoint is - - finalised. The last_block_time field is nil in the epoch's beginning, - and - - is set upon the end of this epoch. - sealer_app_hash_hex: - type: string - description: |- - sealer is the last block of the sealed epoch - sealer_app_hash points to the sealer but stored in the 1st header - of the next epoch as hex string. - sealer_block_hash: - type: string - description: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch as hex string. - title: EpochResponse is a structure that contains the metadata of an epoch - babylon.epoching.v1.Params: - type: object - properties: - epoch_interval: - type: string - format: uint64 - title: epoch_interval is the number of consecutive blocks to form an epoch - description: Params defines the parameters for the module. - babylon.epoching.v1.QueryCurrentEpochResponse: - type: object - properties: - current_epoch: - type: string - format: uint64 - title: current_epoch is the current epoch number - epoch_boundary: - type: string - format: uint64 - title: epoch_boundary is the height of this epoch's last block - title: >- - QueryCurrentEpochResponse is the response type for the Query/CurrentEpoch - RPC - - method - babylon.epoching.v1.QueryDelegationLifecycleResponse: - type: object - properties: - del_life: - type: object - properties: - del_addr: - type: string - del_life: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CREATED - - BONDED - - UNBONDING - - UNBONDED - - REMOVED - default: CREATED - description: >- - - CREATED: CREATED is when the validator/delegation has been - created - - BONDED: CREATED is when the validator/delegation has become bonded - - UNBONDING: CREATED is when the validator/delegation has become unbonding - - UNBONDED: CREATED is when the validator/delegation has become unbonded - - REMOVED: CREATED is when the validator/delegation has been removed - title: BondState is the bond state of a validator or delegation - val_addr: - type: string - amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time - title: >- - DelegationStateUpdate is the message that records a state update - of a - - delegation - title: |- - ValidatorLifecycle is a message that records the lifecycle of - a delegation - title: |- - QueryDelegationLifecycleRequest is the response type for the - Query/DelegationLifecycle RPC method - babylon.epoching.v1.QueryEpochInfoResponse: - type: object - properties: - epoch: - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: >- - current_epoch_interval is the epoch interval at the time of this - epoch - first_block_height: - type: string - format: uint64 - title: first_block_height is the height of the first block in this epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. - - Babylon needs to remember the last header's time of each epoch to - complete - - unbonding validators/delegations when a previous epoch's - checkpoint is - - finalised. The last_block_time field is nil in the epoch's - beginning, and - - is set upon the end of this epoch. - sealer_app_hash_hex: - type: string - description: |- - sealer is the last block of the sealed epoch - sealer_app_hash points to the sealer but stored in the 1st header - of the next epoch as hex string. - sealer_block_hash: - type: string - description: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch as hex string. - title: EpochResponse is a structure that contains the metadata of an epoch - title: QueryEpochInfoRequest is the response type for the Query/EpochInfo method - babylon.epoching.v1.QueryEpochMsgsResponse: - type: object - properties: - msgs: - type: array - items: - type: object - properties: - tx_id: - type: string - description: tx_id is the ID of the tx that contains the message as hex. - msg_id: - type: string - description: >- - msg_id is the original message ID, i.e., hash of the marshaled - message as hex. - block_height: - type: string - format: uint64 - title: block_height is the height when this msg is submitted to Babylon - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp when this msg is submitted to - Babylon - msg: - type: string - description: >- - msg is the actual message that is sent by a user and is queued - by the - - epoching module as string. - title: >- - QueuedMessageResponse is a message that can change the validator set - and is delayed - - to the end of an epoch - title: msgs is the list of messages queued in the current epoch - pagination: - title: pagination defines the pagination in the response - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: |- - QueryEpochMsgsResponse is the response type for the Query/EpochMsgs RPC - method - babylon.epoching.v1.QueryEpochValSetResponse: - type: object - properties: - validators: - type: array - items: - type: object - properties: - addr: - type: string - format: byte - title: addr is the validator's address (in sdk.ValAddress) - power: - type: string - format: int64 - title: power is the validator's voting power - title: Validator is a message that denotes a validator - total_voting_power: - type: string - format: int64 - pagination: - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: |- - QueryEpochValSetRequest is the response type for the Query/EpochValSet RPC - method - babylon.epoching.v1.QueryEpochsInfoResponse: - type: object - properties: - epochs: - type: array - items: - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: >- - current_epoch_interval is the epoch interval at the time of this - epoch - first_block_height: - type: string - format: uint64 - title: >- - first_block_height is the height of the first block in this - epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. - - Babylon needs to remember the last header's time of each epoch - to complete - - unbonding validators/delegations when a previous epoch's - checkpoint is - - finalised. The last_block_time field is nil in the epoch's - beginning, and - - is set upon the end of this epoch. - sealer_app_hash_hex: - type: string - description: >- - sealer is the last block of the sealed epoch - - sealer_app_hash points to the sealer but stored in the 1st - header - - of the next epoch as hex string. - sealer_block_hash: - type: string - description: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch as hex string. - title: EpochResponse is a structure that contains the metadata of an epoch - pagination: - title: pagination defines the pagination in the response - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: >- - QueryEpochsInfoResponse is the response type for the Query/EpochInfos - method - babylon.epoching.v1.QueryLatestEpochMsgsResponse: - type: object - properties: - latest_epoch_msgs: - type: array - items: - type: object - properties: - epoch_number: - type: string - format: uint64 - msgs: - type: array - items: - type: object - properties: - tx_id: - type: string - description: >- - tx_id is the ID of the tx that contains the message as - hex. - msg_id: - type: string - description: >- - msg_id is the original message ID, i.e., hash of the - marshaled message as hex. - block_height: - type: string - format: uint64 - title: >- - block_height is the height when this msg is submitted to - Babylon - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp when this msg is submitted to - Babylon - msg: - type: string - description: >- - msg is the actual message that is sent by a user and is - queued by the - - epoching module as string. - title: >- - QueuedMessageResponse is a message that can change the - validator set and is delayed - - to the end of an epoch - title: >- - QueuedMessageList is a message that contains a list of - staking-related - - messages queued for an epoch - title: |- - latest_epoch_msgs is a list of QueuedMessageList - each QueuedMessageList has a field identifying the epoch number - pagination: - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: |- - QueryLatestEpochMsgsResponse is the response type for the - Query/LatestEpochMsgs RPC method - babylon.epoching.v1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - epoch_interval: - type: string - format: uint64 - title: >- - epoch_interval is the number of consecutive blocks to form an - epoch - description: QueryParamsResponse is the response type for the Query/Params RPC method. - babylon.epoching.v1.QueryValidatorLifecycleResponse: - type: object - properties: - val_addr: - type: string - val_life: - type: array - items: - type: object - properties: - state_desc: - type: string - description: StateDesc defines the descriptive state. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time - description: >- - ValStateUpdateResponse is a message response that records a state - update of a validator. - title: |- - QueryValidatorLifecycleResponse is the response type for the - Query/ValidatorLifecycle RPC method - babylon.epoching.v1.QueuedMessageList: - type: object - properties: - epoch_number: - type: string - format: uint64 - msgs: - type: array - items: - type: object - properties: - tx_id: - type: string - description: tx_id is the ID of the tx that contains the message as hex. - msg_id: - type: string - description: >- - msg_id is the original message ID, i.e., hash of the marshaled - message as hex. - block_height: - type: string - format: uint64 - title: block_height is the height when this msg is submitted to Babylon - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp when this msg is submitted to - Babylon - msg: - type: string - description: >- - msg is the actual message that is sent by a user and is queued - by the - - epoching module as string. - title: >- - QueuedMessageResponse is a message that can change the validator set - and is delayed - - to the end of an epoch - title: |- - QueuedMessageList is a message that contains a list of staking-related - messages queued for an epoch - babylon.epoching.v1.QueuedMessageResponse: - type: object - properties: - tx_id: - type: string - description: tx_id is the ID of the tx that contains the message as hex. - msg_id: - type: string - description: >- - msg_id is the original message ID, i.e., hash of the marshaled message - as hex. - block_height: - type: string - format: uint64 - title: block_height is the height when this msg is submitted to Babylon - block_time: - type: string - format: date-time - title: block_time is the timestamp when this msg is submitted to Babylon - msg: - type: string - description: |- - msg is the actual message that is sent by a user and is queued by the - epoching module as string. - title: >- - QueuedMessageResponse is a message that can change the validator set and - is delayed - - to the end of an epoch - babylon.epoching.v1.ValStateUpdateResponse: - type: object - properties: - state_desc: - type: string - description: StateDesc defines the descriptive state. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time - description: >- - ValStateUpdateResponse is a message response that records a state update - of a validator. - babylon.epoching.v1.Validator: - type: object - properties: - addr: - type: string - format: byte - title: addr is the validator's address (in sdk.ValAddress) - power: - type: string - format: int64 - title: power is the validator's voting power - title: Validator is a message that denotes a validator - cosmos.base.v1beta1.Coin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - babylon.checkpointing.v1.CheckpointStateUpdateResponse: - type: object - properties: - state: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: state defines the event of a state transition towards this state - status_desc: - type: string - description: status_desc represents the description of status enum. - block_height: - type: string - format: uint64 - title: >- - block_height is the height of the Babylon block that triggers the - state - - update - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp in the Babylon block that triggers the - state - - update - description: >- - CheckpointStateUpdateResponse defines a state transition on the - checkpoint. - babylon.checkpointing.v1.CheckpointStatus: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - babylon.checkpointing.v1.QueryBlsPublicKeyListResponse: - type: object - properties: - validator_with_bls_keys: - type: array - items: - type: object - properties: - validator_address: - type: string - title: validator_address is the address of the validator - bls_pub_key: - type: string - format: byte - title: bls_pub_key is the BLS public key of the validator - voting_power: - type: string - format: uint64 - title: >- - voting_power is the voting power of the validator at the given - epoch - title: >- - ValidatorWithBlsKey couples validator address, voting power, and its - bls - - public key - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryBlsPublicKeyListResponse is the response type for the - Query/BlsPublicKeys RPC method. - babylon.checkpointing.v1.QueryEpochStatusResponse: - type: object - properties: - status: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - description: |- - QueryEpochStatusResponse is the response type for the Query/EpochStatus - RPC method. - babylon.checkpointing.v1.QueryLastCheckpointWithStatusResponse: - type: object - properties: - raw_checkpoint: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: |- - block_hash_hex defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on as hex string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the BLS - multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS - - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - description: |- - QueryLastCheckpointWithStatusResponse is the response type for the - Query/LastCheckpointWithStatus RPC method. - babylon.checkpointing.v1.QueryRawCheckpointListResponse: - type: object - properties: - raw_checkpoints: - type: array - items: - type: object - properties: - ckpt: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: >- - block_hash_hex defines the 'BlockID.Hash', which is the hash - of - - the block that individual BLS sigs are signed on as hex - string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the - BLS multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS - - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - status: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: status defines the status of the checkpoint - status_desc: - type: string - description: status_desc represents the description of status enum. - bls_aggr_pk: - type: string - format: byte - title: bls_aggr_pk defines the aggregated BLS public key - power_sum: - type: string - format: uint64 - title: >- - power_sum defines the accumulated voting power for the - checkpoint - lifecycle: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: >- - state defines the event of a state transition towards this - state - status_desc: - type: string - description: status_desc represents the description of status enum. - block_height: - type: string - format: uint64 - title: >- - block_height is the height of the Babylon block that - triggers the state - - update - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp in the Babylon block that - triggers the state - - update - description: >- - CheckpointStateUpdateResponse defines a state transition on - the checkpoint. - description: >- - lifecycle defines the lifecycle of this checkpoint, i.e., each - state - - transition and the time (in both timestamp and block height) of - this - - transition. - description: >- - RawCheckpointWithMetaResponse wraps the raw checkpoint with - metadata. - title: the order is going from the newest to oldest based on the epoch number - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryRawCheckpointListResponse is the response type for the - Query/RawCheckpoints RPC method. - babylon.checkpointing.v1.QueryRawCheckpointResponse: - type: object - properties: - raw_checkpoint: - type: object - properties: - ckpt: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: >- - block_hash_hex defines the 'BlockID.Hash', which is the hash - of - - the block that individual BLS sigs are signed on as hex string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the - BLS multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS - - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - status: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: status defines the status of the checkpoint - status_desc: - type: string - description: status_desc represents the description of status enum. - bls_aggr_pk: - type: string - format: byte - title: bls_aggr_pk defines the aggregated BLS public key - power_sum: - type: string - format: uint64 - title: power_sum defines the accumulated voting power for the checkpoint - lifecycle: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: >- - state defines the event of a state transition towards this - state - status_desc: - type: string - description: status_desc represents the description of status enum. - block_height: - type: string - format: uint64 - title: >- - block_height is the height of the Babylon block that - triggers the state - - update - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp in the Babylon block that - triggers the state - - update - description: >- - CheckpointStateUpdateResponse defines a state transition on the - checkpoint. - description: >- - lifecycle defines the lifecycle of this checkpoint, i.e., each - state - - transition and the time (in both timestamp and block height) of - this - - transition. - description: RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata. - description: >- - QueryRawCheckpointResponse is the response type for the - Query/RawCheckpoint - - RPC method. - babylon.checkpointing.v1.QueryRawCheckpointsResponse: - type: object - properties: - raw_checkpoints: - type: array - items: - type: object - properties: - ckpt: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: >- - block_hash_hex defines the 'BlockID.Hash', which is the hash - of - - the block that individual BLS sigs are signed on as hex - string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the - BLS multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS - - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - status: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: status defines the status of the checkpoint - status_desc: - type: string - description: status_desc represents the description of status enum. - bls_aggr_pk: - type: string - format: byte - title: bls_aggr_pk defines the aggregated BLS public key - power_sum: - type: string - format: uint64 - title: >- - power_sum defines the accumulated voting power for the - checkpoint - lifecycle: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: >- - state defines the event of a state transition towards this - state - status_desc: - type: string - description: status_desc represents the description of status enum. - block_height: - type: string - format: uint64 - title: >- - block_height is the height of the Babylon block that - triggers the state - - update - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp in the Babylon block that - triggers the state - - update - description: >- - CheckpointStateUpdateResponse defines a state transition on - the checkpoint. - description: >- - lifecycle defines the lifecycle of this checkpoint, i.e., each - state - - transition and the time (in both timestamp and block height) of - this - - transition. - description: >- - RawCheckpointWithMetaResponse wraps the raw checkpoint with - metadata. - title: the order is going from the newest to oldest based on the epoch number - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - description: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently. It will be empty if - there are no more results. - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryRawCheckpointsResponse is the response type for the - Query/RawCheckpoints - - RPC method. - babylon.checkpointing.v1.QueryRecentEpochStatusCountResponse: - type: object - properties: - tip_epoch: - type: string - format: uint64 - epoch_count: - type: string - format: uint64 - status_count: - type: object - additionalProperties: - type: string - format: uint64 - description: |- - QueryRecentEpochStatusCountResponse is the response type for the - Query/EpochStatusCount RPC method. - babylon.checkpointing.v1.RawCheckpointResponse: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: |- - block_hash_hex defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on as hex string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the BLS multi - sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from individual - BLS - - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - babylon.checkpointing.v1.RawCheckpointWithMetaResponse: - type: object - properties: - ckpt: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: |- - block_hash_hex defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on as hex string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the BLS - multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS - - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - status: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: status defines the status of the checkpoint - status_desc: - type: string - description: status_desc represents the description of status enum. - bls_aggr_pk: - type: string - format: byte - title: bls_aggr_pk defines the aggregated BLS public key - power_sum: - type: string - format: uint64 - title: power_sum defines the accumulated voting power for the checkpoint - lifecycle: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: state defines the event of a state transition towards this state - status_desc: - type: string - description: status_desc represents the description of status enum. - block_height: - type: string - format: uint64 - title: >- - block_height is the height of the Babylon block that triggers - the state - - update - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp in the Babylon block that triggers - the state - - update - description: >- - CheckpointStateUpdateResponse defines a state transition on the - checkpoint. - description: |- - lifecycle defines the lifecycle of this checkpoint, i.e., each state - transition and the time (in both timestamp and block height) of this - transition. - description: RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata. - babylon.checkpointing.v1.ValidatorWithBlsKey: - type: object - properties: - validator_address: - type: string - title: validator_address is the address of the validator - bls_pub_key: - type: string - format: byte - title: bls_pub_key is the BLS public key of the validator - voting_power: - type: string - format: uint64 - title: voting_power is the voting power of the validator at the given epoch - title: |- - ValidatorWithBlsKey couples validator address, voting power, and its bls - public key - babylon.btccheckpoint.v1.SubmissionKey: - type: object - properties: - key: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be identified by hash of - block in - - which transaction was included and transaction index in the block - title: >- - Checkpoint can be composed from multiple transactions, so to identify - whole - - submission we need list of transaction keys. - - Each submission can generally be identified by this list of (txIdx, - - blockHash) tuples. Note: this could possibly be optimized as if - transactions - - were in one block they would have the same block hash and different - indexes, - - but each blockhash is only 33 (1 byte for prefix encoding and 32 byte - hash), - - so there should be other strong arguments for this optimization - babylon.btccheckpoint.v1.TransactionInfo: - type: object - properties: - key: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be identified by hash of block - in - - which transaction was included and transaction index in the block - description: |- - key is the position (txIdx, blockHash) of this tx on BTC blockchain - Although it is already a part of SubmissionKey, we store it here again - to make TransactionInfo self-contained. - For example, storing the key allows TransactionInfo to not relay on - the fact that TransactionInfo will be ordered in the same order as - TransactionKeys in SubmissionKey. - transaction: - type: string - format: byte - title: transaction is the full transaction in bytes - proof: - type: string - format: byte - title: >- - proof is the Merkle proof that this tx is included in the position in - `key` - - TODO: maybe it could use here better format as we already processed - and - - validated the proof? - title: |- - TransactionInfo is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - babylon.btccheckpoint.v1.TransactionKey: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: |- - Each provided OP_RETURN transaction can be identified by hash of block in - which transaction was included and transaction index in the block - babylon.checkpointing.v1.RawCheckpoint: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash: - type: string - format: byte - title: |- - block_hash defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the BLS multi - sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from individual - BLS - - sigs - title: RawCheckpoint wraps the BLS multi sig with metadata - babylon.epoching.v1.Epoch: - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: current_epoch_interval is the epoch interval at the time of this epoch - first_block_height: - type: string - format: uint64 - title: first_block_height is the height of the first block in this epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. - - Babylon needs to remember the last header's time of each epoch to - complete - - unbonding validators/delegations when a previous epoch's checkpoint is - - finalised. The last_block_time field is nil in the epoch's beginning, - and - - is set upon the end of this epoch. - sealer_app_hash: - type: string - format: byte - title: |- - sealer is the last block of the sealed epoch - sealer_app_hash points to the sealer but stored in the 1st header - of the next epoch - sealer_block_hash: - type: string - format: byte - title: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch - title: Epoch is a structure that contains the metadata of an epoch - babylon.zoneconcierge.v1.ChainInfo: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header on CZ - ledger - time: - type: string - format: date-time - title: |- - time is the timestamp of this header on CZ ledger - it is needed for CZ to unbond all mature validators/delegations - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that includes - this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block that - includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this header - - (babylon_block_height, babylon_tx_hash) jointly provides the - position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header - on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block - that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides the - position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers at the same - height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the same height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in struct - `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should have a valid quorum - - certificate. Such forks exist since Babylon considers CZs might have - - dishonest majority. Also note that the IBC-Go implementation will only - - consider the first header in a fork valid, since the subsequent - headers - - cannot be verified without knowing the validator set in the previous - header. - title: >- - latest_forks is the latest forks, formed as a series of IndexedHeader - (from - - low to high) - timestamped_headers_count: - type: string - format: uint64 - title: |- - timestamped_headers_count is the number of timestamped headers in CZ's - canonical chain - title: ChainInfo is the information of a CZ - babylon.zoneconcierge.v1.FinalizedChainInfo: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the ID of the consumer - finalized_chain_info: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header on - CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block that - includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides the - position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block - that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides - the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers at the - same height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the same - height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in struct - `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should have a valid - quorum - - certificate. Such forks exist since Babylon considers CZs might - have - - dishonest majority. Also note that the IBC-Go implementation will - only - - consider the first header in a fork valid, since the subsequent - headers - - cannot be verified without knowing the validator set in the - previous header. - title: >- - latest_forks is the latest forks, formed as a series of - IndexedHeader (from - - low to high) - timestamped_headers_count: - type: string - format: uint64 - title: >- - timestamped_headers_count is the number of timestamped headers in - CZ's - - canonical chain - title: ChainInfo is the information of a CZ - epoch_info: - title: epoch_info is the metadata of the last BTC-finalised epoch - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: >- - current_epoch_interval is the epoch interval at the time of this - epoch - first_block_height: - type: string - format: uint64 - title: first_block_height is the height of the first block in this epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. - - Babylon needs to remember the last header's time of each epoch to - complete - - unbonding validators/delegations when a previous epoch's - checkpoint is - - finalised. The last_block_time field is nil in the epoch's - beginning, and - - is set upon the end of this epoch. - sealer_app_hash: - type: string - format: byte - title: |- - sealer is the last block of the sealed epoch - sealer_app_hash points to the sealer but stored in the 1st header - of the next epoch - sealer_block_hash: - type: string - format: byte - title: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch - raw_checkpoint: - title: raw_checkpoint is the raw checkpoint of this epoch - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash: - type: string - format: byte - title: |- - block_hash defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the BLS - multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS - - sigs - btc_submission_key: - title: |- - btc_submission_key is position of two BTC txs that include the raw - checkpoint of this epoch - type: object - properties: - key: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be identified by hash of - block in - - which transaction was included and transaction index in the - block - proof: - title: proof is the proof that the chain info is finalized - type: object - properties: - proof_cz_header_in_epoch: - title: >- - proof_cz_header_in_epoch is the proof that the CZ header is - timestamped - - within a certain epoch - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating Merkle - root - - The data could be arbitrary format, providing necessary data - - for example neighbouring node hash - proof_epoch_sealed: - title: proof_epoch_sealed is the proof that the epoch is sealed - type: object - properties: - validator_set: - type: array - items: - type: object - properties: - validator_address: - type: string - title: validator_address is the address of the validator - bls_pub_key: - type: string - format: byte - title: bls_pub_key is the BLS public key of the validator - voting_power: - type: string - format: uint64 - title: >- - voting_power is the voting power of the validator at the - given epoch - title: >- - ValidatorWithBlsKey couples validator address, voting power, - and its bls - - public key - title: >- - validator_set is the validator set of the sealed epoch - - This validator set has generated a BLS multisig on `app_hash` - of - - the sealer header - proof_epoch_info: - title: >- - proof_epoch_info is the Merkle proof that the epoch's metadata - is committed - - to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating Merkle - root - - The data could be arbitrary format, providing necessary - data - - for example neighbouring node hash - proof_epoch_val_set: - title: >- - proof_epoch_info is the Merkle proof that the epoch's - validator set is - - committed to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating Merkle - root - - The data could be arbitrary format, providing necessary - data - - for example neighbouring node hash - proof_epoch_submitted: - type: array - items: - type: object - properties: - key: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be identified by - hash of block in - - which transaction was included and transaction index in the - block - description: >- - key is the position (txIdx, blockHash) of this tx on BTC - blockchain - - Although it is already a part of SubmissionKey, we store it - here again - - to make TransactionInfo self-contained. - - For example, storing the key allows TransactionInfo to not - relay on + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + babylon.btclightclient.v1.BTCHeaderInfoResponse: + type: object + properties: + header_hex: + type: string + hash_hex: + type: string + height: + type: string + format: uint64 + work: + type: string + description: Work is the sdkmath.Uint as string. + description: >- + BTCHeaderInfoResponse is a structure that contains all relevant + information about a - the fact that TransactionInfo will be ordered in the same - order as + BTC header response + - Full header as string hex. + - Header hash for easy retrieval as string hex. + - Height of the header in the BTC chain. + - Total work spent on the header. This is the sum of the work corresponding + to the header Bits field + and the total work of the header. + babylon.btclightclient.v1.Params: + type: object + properties: + insert_headers_allow_list: + type: array + items: + type: string + title: >- + List of addresses which are allowed to insert headers to btc light + client - TransactionKeys in SubmissionKey. - transaction: - type: string - format: byte - title: transaction is the full transaction in bytes - proof: - type: string - format: byte - title: >- - proof is the Merkle proof that this tx is included in the - position in `key` + if the list is empty, any address can insert headers + description: Params defines the parameters for the module. + babylon.btclightclient.v1.QueryBaseHeaderResponse: + type: object + properties: + header: + type: object + properties: + header_hex: + type: string + hash_hex: + type: string + height: + type: string + format: uint64 + work: + type: string + description: Work is the sdkmath.Uint as string. + description: >- + BTCHeaderInfoResponse is a structure that contains all relevant + information about a - TODO: maybe it could use here better format as we already - processed and + BTC header response + - Full header as string hex. + - Header hash for easy retrieval as string hex. + - Height of the header in the BTC chain. + - Total work spent on the header. This is the sum of the work corresponding + to the header Bits field + and the total work of the header. + description: |- + QueryBaseHeaderResponse is the response type for the Query/BaseHeader RPC + method. + babylon.btclightclient.v1.QueryContainsBytesResponse: + type: object + properties: + contains: + type: boolean + description: >- + QueryContainsResponse is response type for the temporary + Query/ContainsBytes - validated the proof? - title: |- - TransactionInfo is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position + RPC method. + babylon.btclightclient.v1.QueryContainsResponse: + type: object + properties: + contains: + type: boolean + description: QueryContainsResponse is response type for the Query/Contains RPC method. + babylon.btclightclient.v1.QueryHashesResponse: + type: object + properties: + hashes: + type: array + items: + type: string + format: byte + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 title: >- - proof_epoch_submitted is the proof that the epoch's checkpoint is - included + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - in BTC ledger It is the two TransactionInfo in the best (i.e., - earliest) + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + description: QueryHashesResponse is response type for the Query/Hashes RPC method. + babylon.btclightclient.v1.QueryHeaderDepthResponse: + type: object + properties: + depth: + type: string + format: uint64 + title: >- + QueryMainChainDepthResponse is the response type for the + Query/MainChainDepth RPC - checkpoint submission - title: FinalizedChainInfo is the information of a CZ that is BTC-finalised - babylon.zoneconcierge.v1.Forks: + it contains depth of the block in main chain + babylon.btclightclient.v1.QueryMainChainResponse: type: object properties: headers: @@ -12043,446 +5764,488 @@ definitions: items: type: object properties: - consumer_id: + header_hex: type: string - title: consumer_id is the unique ID of the consumer - hash: + hash_hex: type: string - format: byte - title: hash is the hash of this header height: type: string format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header on CZ - ledger - time: - type: string - format: date-time - title: |- - time is the timestamp of this header on CZ ledger - it is needed for CZ to unbond all mature validators/delegations - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ - - header - babylon_header_height: + work: type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block that - includes this CZ + description: Work is the sdkmath.Uint as string. + description: >- + BTCHeaderInfoResponse is a structure that contains all relevant + information about a - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this header + BTC header response + - Full header as string hex. + - Header hash for easy retrieval as string hex. + - Height of the header in the BTC chain. + - Total work spent on the header. This is the sum of the work corresponding + to the header Bits field + and the total work of the header. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - (babylon_block_height, babylon_tx_hash) jointly provides the - position of + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: blocks is the list of non-canonical indexed headers at the same height + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } description: >- - Forks is a list of non-canonical `IndexedHeader`s at the same height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in struct - `IndexedBlock`. + QueryMainChainResponse is response type for the Query/MainChain RPC + method. + babylon.btclightclient.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + insert_headers_allow_list: + type: array + items: + type: string + title: >- + List of addresses which are allowed to insert headers to btc light + client + if the list is empty, any address can insert headers + description: QueryParamsResponse is the response type for the Query/Params RPC method. + babylon.btclightclient.v1.QueryTipResponse: + type: object + properties: + header: + type: object + properties: + header_hex: + type: string + hash_hex: + type: string + height: + type: string + format: uint64 + work: + type: string + description: Work is the sdkmath.Uint as string. + description: >- + BTCHeaderInfoResponse is a structure that contains all relevant + information about a - Note that each `IndexedHeader` in the fork should have a valid quorum + BTC header response + - Full header as string hex. + - Header hash for easy retrieval as string hex. + - Height of the header in the BTC chain. + - Total work spent on the header. This is the sum of the work corresponding + to the header Bits field + and the total work of the header. + description: QueryTipResponse is the response type for the Query/Tip RPC method. + babylon.epoching.v1.BondState: + type: string + enum: + - CREATED + - BONDED + - UNBONDING + - UNBONDED + - REMOVED + default: CREATED + description: |- + - CREATED: CREATED is when the validator/delegation has been created + - BONDED: CREATED is when the validator/delegation has become bonded + - UNBONDING: CREATED is when the validator/delegation has become unbonding + - UNBONDED: CREATED is when the validator/delegation has become unbonded + - REMOVED: CREATED is when the validator/delegation has been removed + title: BondState is the bond state of a validator or delegation + babylon.epoching.v1.DelegationLifecycle: + type: object + properties: + del_addr: + type: string + del_life: + type: array + items: + type: object + properties: + state: + type: string + enum: + - CREATED + - BONDED + - UNBONDING + - UNBONDED + - REMOVED + default: CREATED + description: >- + - CREATED: CREATED is when the validator/delegation has been + created + - BONDED: CREATED is when the validator/delegation has become bonded + - UNBONDING: CREATED is when the validator/delegation has become unbonding + - UNBONDED: CREATED is when the validator/delegation has become unbonded + - REMOVED: CREATED is when the validator/delegation has been removed + title: BondState is the bond state of a validator or delegation + val_addr: + type: string + amount: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - certificate. Such forks exist since Babylon considers CZs might have - dishonest majority. Also note that the IBC-Go implementation will only + NOTE: The amount field is an Int which implements the custom + method - consider the first header in a fork valid, since the subsequent headers + signatures required by gogoproto. + block_height: + type: string + format: uint64 + block_time: + type: string + format: date-time + title: >- + DelegationStateUpdate is the message that records a state update of + a - cannot be verified without knowing the validator set in the previous - header. - babylon.zoneconcierge.v1.IndexedHeader: + delegation + title: |- + ValidatorLifecycle is a message that records the lifecycle of + a delegation + babylon.epoching.v1.DelegationStateUpdate: type: object properties: - consumer_id: + state: type: string - title: consumer_id is the unique ID of the consumer - hash: + enum: + - CREATED + - BONDED + - UNBONDING + - UNBONDED + - REMOVED + default: CREATED + description: |- + - CREATED: CREATED is when the validator/delegation has been created + - BONDED: CREATED is when the validator/delegation has become bonded + - UNBONDING: CREATED is when the validator/delegation has become unbonding + - UNBONDED: CREATED is when the validator/delegation has become unbonded + - REMOVED: CREATED is when the validator/delegation has been removed + title: BondState is the bond state of a validator or delegation + val_addr: type: string - format: byte - title: hash is the hash of this header - height: + amount: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + block_height: type: string format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header on CZ - ledger - time: + block_time: type: string format: date-time - title: |- - time is the timestamp of this header on CZ ledger - it is needed for CZ to unbond all mature validators/delegations - before this timestamp when this header is BTC-finalised - babylon_header_hash: + title: |- + DelegationStateUpdate is the message that records a state update of a + delegation + babylon.epoching.v1.EpochResponse: + type: object + properties: + epoch_number: type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that includes - this CZ - - header - babylon_header_height: + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: type: string format: uint64 - title: >- - babylon_header_height is the height of the babylon block that includes - this CZ - - header - babylon_epoch: + title: current_epoch_interval is the epoch interval at the time of this epoch + first_block_height: type: string format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: + title: first_block_height is the height of the first block in this epoch + last_block_time: type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this header + format: date-time + description: >- + last_block_time is the time of the last block in this epoch. + + Babylon needs to remember the last header's time of each epoch to + complete + + unbonding validators/delegations when a previous epoch's checkpoint is - (babylon_block_height, babylon_tx_hash) jointly provides the position - of + finalised. The last_block_time field is nil in the epoch's beginning, + and - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - babylon.zoneconcierge.v1.Params: + is set upon the end of this epoch. + sealer_app_hash_hex: + type: string + description: |- + sealer is the last block of the sealed epoch + sealer_app_hash points to the sealer but stored in the 1st header + of the next epoch as hex string. + sealer_block_hash: + type: string + description: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch as hex string. + title: EpochResponse is a structure that contains the metadata of an epoch + babylon.epoching.v1.Params: type: object properties: - ibc_packet_timeout_seconds: - type: integer - format: int64 - title: >- - ibc_packet_timeout_seconds is the time period after which an - unrelayed - - IBC packet becomes timeout, measured in seconds + epoch_interval: + type: string + format: uint64 + title: epoch_interval is the number of consecutive blocks to form an epoch description: Params defines the parameters for the module. - babylon.zoneconcierge.v1.ProofEpochSealed: + babylon.epoching.v1.QueryCurrentEpochResponse: type: object properties: - validator_set: - type: array - items: - type: object - properties: - validator_address: - type: string - title: validator_address is the address of the validator - bls_pub_key: - type: string - format: byte - title: bls_pub_key is the BLS public key of the validator - voting_power: - type: string - format: uint64 - title: >- - voting_power is the voting power of the validator at the given - epoch - title: >- - ValidatorWithBlsKey couples validator address, voting power, and its - bls - - public key - title: |- - validator_set is the validator set of the sealed epoch - This validator set has generated a BLS multisig on `app_hash` of - the sealer header - proof_epoch_info: - title: >- - proof_epoch_info is the Merkle proof that the epoch's metadata is - committed - - to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: |- - ProofOp defines an operation used for calculating Merkle root - The data could be arbitrary format, providing necessary data - for example neighbouring node hash - proof_epoch_val_set: - title: |- - proof_epoch_info is the Merkle proof that the epoch's validator set is - committed to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: |- - ProofOp defines an operation used for calculating Merkle root - The data could be arbitrary format, providing necessary data - for example neighbouring node hash + current_epoch: + type: string + format: uint64 + title: current_epoch is the current epoch number + epoch_boundary: + type: string + format: uint64 + title: epoch_boundary is the height of this epoch's last block title: >- - ProofEpochSealed is the proof that an epoch is sealed by the sealer - header, - - i.e., the 2nd header of the next epoch With the access of metadata - - - Metadata of this epoch, which includes the sealer header - - - Raw checkpoint of this epoch - - The verifier can perform the following verification rules: - - - The raw checkpoint's `app_hash` is same as in the sealer header - - - More than 2/3 (in voting power) validators in the validator set of this - - epoch have signed `app_hash` of the sealer header - - - The epoch metadata is committed to the `app_hash` of the sealer header + QueryCurrentEpochResponse is the response type for the Query/CurrentEpoch + RPC - - The validator set is committed to the `app_hash` of the sealer header - babylon.zoneconcierge.v1.ProofFinalizedChainInfo: + method + babylon.epoching.v1.QueryDelegationLifecycleResponse: type: object properties: - proof_cz_header_in_epoch: - title: >- - proof_cz_header_in_epoch is the proof that the CZ header is - timestamped - - within a certain epoch - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: |- - ProofOp defines an operation used for calculating Merkle root - The data could be arbitrary format, providing necessary data - for example neighbouring node hash - proof_epoch_sealed: - title: proof_epoch_sealed is the proof that the epoch is sealed + del_life: type: object properties: - validator_set: + del_addr: + type: string + del_life: type: array items: type: object properties: - validator_address: - type: string - title: validator_address is the address of the validator - bls_pub_key: + state: type: string - format: byte - title: bls_pub_key is the BLS public key of the validator - voting_power: + enum: + - CREATED + - BONDED + - UNBONDING + - UNBONDED + - REMOVED + default: CREATED + description: >- + - CREATED: CREATED is when the validator/delegation has been + created + - BONDED: CREATED is when the validator/delegation has become bonded + - UNBONDING: CREATED is when the validator/delegation has become unbonding + - UNBONDED: CREATED is when the validator/delegation has become unbonded + - REMOVED: CREATED is when the validator/delegation has been removed + title: BondState is the bond state of a validator or delegation + val_addr: type: string - format: uint64 - title: >- - voting_power is the voting power of the validator at the - given epoch - title: >- - ValidatorWithBlsKey couples validator address, voting power, and - its bls - - public key - title: |- - validator_set is the validator set of the sealed epoch - This validator set has generated a BLS multisig on `app_hash` of - the sealer header - proof_epoch_info: - title: >- - proof_epoch_info is the Merkle proof that the epoch's metadata is - committed - - to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating Merkle - root - - The data could be arbitrary format, providing necessary data - - for example neighbouring node hash - proof_epoch_val_set: - title: >- - proof_epoch_info is the Merkle proof that the epoch's validator - set is - - committed to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: + amount: type: object properties: - type: - type: string - key: + denom: type: string - format: byte - data: + amount: type: string - format: byte - title: >- - ProofOp defines an operation used for calculating Merkle - root + description: >- + Coin defines a token with a denomination and an amount. - The data could be arbitrary format, providing necessary data - for example neighbouring node hash - proof_epoch_submitted: - type: array - items: - type: object - properties: - key: - type: object - properties: - index: - type: integer - format: int64 - hash: + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + block_height: type: string - format: byte + format: uint64 + block_time: + type: string + format: date-time title: >- - Each provided OP_RETURN transaction can be identified by hash of - block in - - which transaction was included and transaction index in the - block - description: >- - key is the position (txIdx, blockHash) of this tx on BTC - blockchain + DelegationStateUpdate is the message that records a state update + of a - Although it is already a part of SubmissionKey, we store it here - again + delegation + title: |- + ValidatorLifecycle is a message that records the lifecycle of + a delegation + title: |- + QueryDelegationLifecycleRequest is the response type for the + Query/DelegationLifecycle RPC method + babylon.epoching.v1.QueryEpochInfoResponse: + type: object + properties: + epoch: + type: object + properties: + epoch_number: + type: string + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: + type: string + format: uint64 + title: >- + current_epoch_interval is the epoch interval at the time of this + epoch + first_block_height: + type: string + format: uint64 + title: first_block_height is the height of the first block in this epoch + last_block_time: + type: string + format: date-time + description: >- + last_block_time is the time of the last block in this epoch. - to make TransactionInfo self-contained. + Babylon needs to remember the last header's time of each epoch to + complete - For example, storing the key allows TransactionInfo to not relay - on + unbonding validators/delegations when a previous epoch's + checkpoint is - the fact that TransactionInfo will be ordered in the same order - as + finalised. The last_block_time field is nil in the epoch's + beginning, and - TransactionKeys in SubmissionKey. - transaction: + is set upon the end of this epoch. + sealer_app_hash_hex: + type: string + description: |- + sealer is the last block of the sealed epoch + sealer_app_hash points to the sealer but stored in the 1st header + of the next epoch as hex string. + sealer_block_hash: + type: string + description: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch as hex string. + title: EpochResponse is a structure that contains the metadata of an epoch + title: QueryEpochInfoRequest is the response type for the Query/EpochInfo method + babylon.epoching.v1.QueryEpochMsgsResponse: + type: object + properties: + msgs: + type: array + items: + type: object + properties: + tx_id: type: string - format: byte - title: transaction is the full transaction in bytes - proof: + description: tx_id is the ID of the tx that contains the message as hex. + msg_id: type: string - format: byte + description: >- + msg_id is the original message ID, i.e., hash of the marshaled + message as hex. + block_height: + type: string + format: uint64 + title: block_height is the height when this msg is submitted to Babylon + block_time: + type: string + format: date-time title: >- - proof is the Merkle proof that this tx is included in the - position in `key` + block_time is the timestamp when this msg is submitted to + Babylon + msg: + type: string + description: >- + msg is the actual message that is sent by a user and is queued + by the - TODO: maybe it could use here better format as we already - processed and + epoching module as string. + title: >- + QueuedMessageResponse is a message that can change the validator set + and is delayed - validated the proof? - title: |- - TransactionInfo is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: >- - proof_epoch_submitted is the proof that the epoch's checkpoint is - included + to the end of an epoch + title: msgs is the list of messages queued in the current epoch + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - in BTC ledger It is the two TransactionInfo in the best (i.e., - earliest) + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - checkpoint submission + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } title: |- - ProofFinalizedChainInfo is a set of proofs that attest a chain info is - BTC-finalised - babylon.zoneconcierge.v1.QueryChainListResponse: + QueryEpochMsgsResponse is the response type for the Query/EpochMsgs RPC + method + babylon.epoching.v1.QueryEpochValSetResponse: type: object properties: - consumer_ids: + validators: type: array items: - type: string - title: consumer_ids are IDs of the chains in ascending alphabetical order + type: object + properties: + addr: + type: string + format: byte + title: addr is the validator's address (in sdk.ValAddress) + power: + type: string + format: int64 + title: power is the validator's voting power + title: Validator is a message that denotes a validator + total_voting_power: + type: string + format: int64 pagination: - title: pagination defines the pagination in the response type: object properties: next_key: @@ -12508,1127 +6271,520 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } - title: QueryChainListResponse is response type for the Query/ChainList RPC method - babylon.zoneconcierge.v1.QueryChainsInfoResponse: + title: |- + QueryEpochValSetRequest is the response type for the Query/EpochValSet RPC + method + babylon.epoching.v1.QueryEpochsInfoResponse: type: object properties: - chains_info: + epochs: type: array items: type: object properties: - consumer_id: + epoch_number: type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header - on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block - that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides the - position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon - block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes - this header - - (babylon_block_height, babylon_tx_hash) jointly - provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers at the - same height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the same - height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in struct - `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should have a valid - quorum - - certificate. Such forks exist since Babylon considers CZs might - have - - dishonest majority. Also note that the IBC-Go implementation - will only - - consider the first header in a fork valid, since the subsequent - headers - - cannot be verified without knowing the validator set in the - previous header. + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: + type: string + format: uint64 title: >- - latest_forks is the latest forks, formed as a series of - IndexedHeader (from - - low to high) - timestamped_headers_count: + current_epoch_interval is the epoch interval at the time of this + epoch + first_block_height: type: string format: uint64 title: >- - timestamped_headers_count is the number of timestamped headers - in CZ's - - canonical chain - title: ChainInfo is the information of a CZ - description: >- - QueryChainsInfoResponse is response type for the Query/ChainsInfo RPC - method. - babylon.zoneconcierge.v1.QueryEpochChainsInfoResponse: - type: object - properties: - chains_info: - type: array - items: - type: object - properties: - consumer_id: + first_block_height is the height of the first block in this + epoch + last_block_time: type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header - on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block - that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides the - position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon - block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes - this header - - (babylon_block_height, babylon_tx_hash) jointly - provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers at the - same height + format: date-time description: >- - Forks is a list of non-canonical `IndexedHeader`s at the same - height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in struct - `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should have a valid - quorum - - certificate. Such forks exist since Babylon considers CZs might - have + last_block_time is the time of the last block in this epoch. - dishonest majority. Also note that the IBC-Go implementation - will only + Babylon needs to remember the last header's time of each epoch + to complete - consider the first header in a fork valid, since the subsequent - headers + unbonding validators/delegations when a previous epoch's + checkpoint is - cannot be verified without knowing the validator set in the - previous header. - title: >- - latest_forks is the latest forks, formed as a series of - IndexedHeader (from + finalised. The last_block_time field is nil in the epoch's + beginning, and - low to high) - timestamped_headers_count: + is set upon the end of this epoch. + sealer_app_hash_hex: type: string - format: uint64 - title: >- - timestamped_headers_count is the number of timestamped headers - in CZ's + description: >- + sealer is the last block of the sealed epoch - canonical chain - title: ChainInfo is the information of a CZ - title: chain_info is the info of the CZ - description: >- - QueryEpochChainsInfoResponse is response type for the - Query/EpochChainsInfo RPC + sealer_app_hash points to the sealer but stored in the 1st + header - method. - babylon.zoneconcierge.v1.QueryFinalizedChainInfoUntilHeightResponse: - type: object - properties: - finalized_chain_info: + of the next epoch as hex string. + sealer_block_hash: + type: string + description: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch as hex string. + title: EpochResponse is a structure that contains the metadata of an epoch + pagination: + title: pagination defines the pagination in the response type: object properties: - consumer_id: + next_key: type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header on - CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block that - includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides the - position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block - that includes this CZ + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - (babylon_block_height, babylon_tx_hash) jointly provides - the position of + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: >- + QueryEpochsInfoResponse is the response type for the Query/EpochInfos + method + babylon.epoching.v1.QueryLatestEpochMsgsResponse: + type: object + properties: + latest_epoch_msgs: + type: array + items: + type: object + properties: + epoch_number: + type: string + format: uint64 + msgs: + type: array + items: + type: object + properties: + tx_id: + type: string + description: >- + tx_id is the ID of the tx that contains the message as + hex. + msg_id: + type: string + description: >- + msg_id is the original message ID, i.e., hash of the + marshaled message as hex. + block_height: + type: string + format: uint64 + title: >- + block_height is the height when this msg is submitted to + Babylon + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp when this msg is submitted to + Babylon + msg: + type: string + description: >- + msg is the actual message that is sent by a user and is + queued by the - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header + epoching module as string. title: >- - blocks is the list of non-canonical indexed headers at the - same height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the same - height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in struct - `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should have a valid - quorum - - certificate. Such forks exist since Babylon considers CZs might - have - - dishonest majority. Also note that the IBC-Go implementation will - only - - consider the first header in a fork valid, since the subsequent - headers - - cannot be verified without knowing the validator set in the - previous header. - title: >- - latest_forks is the latest forks, formed as a series of - IndexedHeader (from + QueuedMessageResponse is a message that can change the + validator set and is delayed - low to high) - timestamped_headers_count: - type: string - format: uint64 - title: >- - timestamped_headers_count is the number of timestamped headers in - CZ's + to the end of an epoch + title: >- + QueuedMessageList is a message that contains a list of + staking-related - canonical chain - title: ChainInfo is the information of a CZ - epoch_info: - title: epoch_info is the metadata of the last BTC-finalised epoch + messages queued for an epoch + title: |- + latest_epoch_msgs is a list of QueuedMessageList + each QueuedMessageList has a field identifying the epoch number + pagination: type: object properties: - epoch_number: + next_key: type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string format: uint64 title: >- - current_epoch_interval is the epoch interval at the time of this - epoch - first_block_height: - type: string - format: uint64 - title: first_block_height is the height of the first block in this epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. - - Babylon needs to remember the last header's time of each epoch to - complete - - unbonding validators/delegations when a previous epoch's - checkpoint is + total is total number of results available if + PageRequest.count_total - finalised. The last_block_time field is nil in the epoch's - beginning, and + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - is set upon the end of this epoch. - sealer_app_hash: - type: string - format: byte - title: |- - sealer is the last block of the sealed epoch - sealer_app_hash points to the sealer but stored in the 1st header - of the next epoch - sealer_block_hash: - type: string - format: byte - title: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch - raw_checkpoint: - title: raw_checkpoint is the raw checkpoint of this epoch + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: |- + QueryLatestEpochMsgsResponse is the response type for the + Query/LatestEpochMsgs RPC method + babylon.epoching.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. type: object properties: - epoch_num: + epoch_interval: type: string format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash: - type: string - format: byte - title: |- - block_hash defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the BLS - multi sig - bls_multi_sig: - type: string - format: byte title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS - - sigs - btc_submission_key: - title: |- - btc_submission_key is position of two BTC txs that include the raw - checkpoint of this epoch - type: object - properties: - key: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte + epoch_interval is the number of consecutive blocks to form an + epoch + description: QueryParamsResponse is the response type for the Query/Params RPC method. + babylon.epoching.v1.QueryValidatorLifecycleResponse: + type: object + properties: + val_addr: + type: string + val_life: + type: array + items: + type: object + properties: + state_desc: + type: string + description: StateDesc defines the descriptive state. + block_height: + type: string + format: uint64 + block_time: + type: string + format: date-time + description: >- + ValStateUpdateResponse is a message response that records a state + update of a validator. + title: |- + QueryValidatorLifecycleResponse is the response type for the + Query/ValidatorLifecycle RPC method + babylon.epoching.v1.QueuedMessageList: + type: object + properties: + epoch_number: + type: string + format: uint64 + msgs: + type: array + items: + type: object + properties: + tx_id: + type: string + description: tx_id is the ID of the tx that contains the message as hex. + msg_id: + type: string + description: >- + msg_id is the original message ID, i.e., hash of the marshaled + message as hex. + block_height: + type: string + format: uint64 + title: block_height is the height when this msg is submitted to Babylon + block_time: + type: string + format: date-time title: >- - Each provided OP_RETURN transaction can be identified by hash of - block in - - which transaction was included and transaction index in the - block - proof: - title: proof is the proof that the chain info is finalized - type: object - properties: - proof_cz_header_in_epoch: - title: >- - proof_cz_header_in_epoch is the proof that the CZ header is - timestamped - - within a certain epoch - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating Merkle - root - - The data could be arbitrary format, providing necessary data - - for example neighbouring node hash - proof_epoch_sealed: - title: proof_epoch_sealed is the proof that the epoch is sealed - type: object - properties: - validator_set: - type: array - items: - type: object - properties: - validator_address: - type: string - title: validator_address is the address of the validator - bls_pub_key: - type: string - format: byte - title: bls_pub_key is the BLS public key of the validator - voting_power: - type: string - format: uint64 - title: >- - voting_power is the voting power of the validator at the - given epoch - title: >- - ValidatorWithBlsKey couples validator address, voting power, - and its bls - - public key - title: >- - validator_set is the validator set of the sealed epoch - - This validator set has generated a BLS multisig on `app_hash` - of - - the sealer header - proof_epoch_info: - title: >- - proof_epoch_info is the Merkle proof that the epoch's metadata - is committed - - to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating Merkle - root - - The data could be arbitrary format, providing necessary - data - - for example neighbouring node hash - proof_epoch_val_set: - title: >- - proof_epoch_info is the Merkle proof that the epoch's - validator set is - - committed to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating Merkle - root - - The data could be arbitrary format, providing necessary - data - - for example neighbouring node hash - proof_epoch_submitted: - type: array - items: - type: object - properties: - key: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be identified by - hash of block in - - which transaction was included and transaction index in the - block - description: >- - key is the position (txIdx, blockHash) of this tx on BTC - blockchain - - Although it is already a part of SubmissionKey, we store it - here again - - to make TransactionInfo self-contained. + block_time is the timestamp when this msg is submitted to + Babylon + msg: + type: string + description: >- + msg is the actual message that is sent by a user and is queued + by the - For example, storing the key allows TransactionInfo to not - relay on + epoching module as string. + title: >- + QueuedMessageResponse is a message that can change the validator set + and is delayed - the fact that TransactionInfo will be ordered in the same - order as + to the end of an epoch + title: |- + QueuedMessageList is a message that contains a list of staking-related + messages queued for an epoch + babylon.epoching.v1.QueuedMessageResponse: + type: object + properties: + tx_id: + type: string + description: tx_id is the ID of the tx that contains the message as hex. + msg_id: + type: string + description: >- + msg_id is the original message ID, i.e., hash of the marshaled message + as hex. + block_height: + type: string + format: uint64 + title: block_height is the height when this msg is submitted to Babylon + block_time: + type: string + format: date-time + title: block_time is the timestamp when this msg is submitted to Babylon + msg: + type: string + description: |- + msg is the actual message that is sent by a user and is queued by the + epoching module as string. + title: >- + QueuedMessageResponse is a message that can change the validator set and + is delayed - TransactionKeys in SubmissionKey. - transaction: - type: string - format: byte - title: transaction is the full transaction in bytes - proof: - type: string - format: byte - title: >- - proof is the Merkle proof that this tx is included in the - position in `key` + to the end of an epoch + babylon.epoching.v1.ValStateUpdateResponse: + type: object + properties: + state_desc: + type: string + description: StateDesc defines the descriptive state. + block_height: + type: string + format: uint64 + block_time: + type: string + format: date-time + description: >- + ValStateUpdateResponse is a message response that records a state update + of a validator. + babylon.epoching.v1.Validator: + type: object + properties: + addr: + type: string + format: byte + title: addr is the validator's address (in sdk.ValAddress) + power: + type: string + format: int64 + title: power is the validator's voting power + title: Validator is a message that denotes a validator + cosmos.base.v1beta1.Coin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - TODO: maybe it could use here better format as we already - processed and + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + babylon.checkpointing.v1.CheckpointStateUpdateResponse: + type: object + properties: + state: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - validated the proof? - title: |- - TransactionInfo is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: >- - proof_epoch_submitted is the proof that the epoch's checkpoint is - included + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: state defines the event of a state transition towards this state + status_desc: + type: string + description: status_desc represents the description of status enum. + block_height: + type: string + format: uint64 + title: >- + block_height is the height of the Babylon block that triggers the + state - in BTC ledger It is the two TransactionInfo in the best (i.e., - earliest) + update + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp in the Babylon block that triggers the + state - checkpoint submission + update + description: >- + CheckpointStateUpdateResponse defines a state transition on the + checkpoint. + babylon.checkpointing.v1.CheckpointStatus: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING description: |- - QueryFinalizedChainInfoUntilHeightResponse is response type for the - Query/FinalizedChainInfoUntilHeight RPC method. - babylon.zoneconcierge.v1.QueryFinalizedChainsInfoResponse: + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + babylon.checkpointing.v1.QueryBlsPublicKeyListResponse: type: object properties: - finalized_chains_info: + validator_with_bls_keys: type: array items: type: object properties: - consumer_id: + validator_address: type: string - title: consumer_id is the ID of the consumer - finalized_chain_info: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the ID of the consumer - latest_header: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the - header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block - that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block - that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on Babylon - ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides - the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - latest_forks: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of - the header on CZ ledger - time: - type: string - format: date-time - title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is - BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon - block that includes this CZ - - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon - block that includes this CZ - - header - babylon_epoch: - type: string - format: uint64 - title: >- - epoch is the epoch number of this header on - Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that - includes this header - - (babylon_block_height, babylon_tx_hash) jointly - provides the position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers at - the same height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the - same height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in - struct `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should have a - valid quorum - - certificate. Such forks exist since Babylon considers CZs - might have - - dishonest majority. Also note that the IBC-Go implementation - will only - - consider the first header in a fork valid, since the - subsequent headers - - cannot be verified without knowing the validator set in the - previous header. - title: >- - latest_forks is the latest forks, formed as a series of - IndexedHeader (from - - low to high) - timestamped_headers_count: - type: string - format: uint64 - title: >- - timestamped_headers_count is the number of timestamped - headers in CZ's - - canonical chain - title: ChainInfo is the information of a CZ - epoch_info: - title: epoch_info is the metadata of the last BTC-finalised epoch - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: >- - current_epoch_interval is the epoch interval at the time of - this epoch - first_block_height: - type: string - format: uint64 - title: >- - first_block_height is the height of the first block in this - epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. - - Babylon needs to remember the last header's time of each - epoch to complete - - unbonding validators/delegations when a previous epoch's - checkpoint is + title: validator_address is the address of the validator + bls_pub_key: + type: string + format: byte + title: bls_pub_key is the BLS public key of the validator + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of the validator at the given + epoch + title: >- + ValidatorWithBlsKey couples validator address, voting power, and its + bls - finalised. The last_block_time field is nil in the epoch's - beginning, and + public key + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - is set upon the end of this epoch. - sealer_app_hash: - type: string - format: byte - title: >- - sealer is the last block of the sealed epoch + was set, its value is undefined otherwise + description: |- + QueryBlsPublicKeyListResponse is the response type for the + Query/BlsPublicKeys RPC method. + babylon.checkpointing.v1.QueryEpochStatusResponse: + type: object + properties: + status: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - sealer_app_hash points to the sealer but stored in the 1st - header + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + description: |- + QueryEpochStatusResponse is the response type for the Query/EpochStatus + RPC method. + babylon.checkpointing.v1.QueryLastCheckpointWithStatusResponse: + type: object + properties: + raw_checkpoint: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: |- + block_hash_hex defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on as hex string + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the BLS + multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS - of the next epoch - sealer_block_hash: - type: string - format: byte - title: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch - raw_checkpoint: - title: raw_checkpoint is the raw checkpoint of this epoch + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + description: |- + QueryLastCheckpointWithStatusResponse is the response type for the + Query/LastCheckpointWithStatus RPC method. + babylon.checkpointing.v1.QueryRawCheckpointListResponse: + type: object + properties: + raw_checkpoints: + type: array + items: + type: object + properties: + ckpt: type: object properties: epoch_num: type: string format: uint64 title: epoch_num defines the epoch number the raw checkpoint is for - block_hash: + block_hash_hex: type: string - format: byte - title: |- - block_hash defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on + title: >- + block_hash_hex defines the 'BlockID.Hash', which is the hash + of + + the block that individual BLS sigs are signed on as hex + string bitmap: type: string format: byte @@ -13643,511 +6799,374 @@ definitions: individual BLS sigs - btc_submission_key: + title: RawCheckpointResponse wraps the BLS multi sig with metadata + status: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: status defines the status of the checkpoint + status_desc: + type: string + description: status_desc represents the description of status enum. + bls_aggr_pk: + type: string + format: byte + title: bls_aggr_pk defines the aggregated BLS public key + power_sum: + type: string + format: uint64 title: >- - btc_submission_key is position of two BTC txs that include the - raw + power_sum defines the accumulated voting power for the + checkpoint + lifecycle: + type: array + items: + type: object + properties: + state: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - checkpoint of this epoch - type: object - properties: - key: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. title: >- - Each provided OP_RETURN transaction can be identified by - hash of block in - - which transaction was included and transaction index in - the block - proof: - title: proof is the proof that the chain info is finalized - type: object - properties: - proof_cz_header_in_epoch: - title: >- - proof_cz_header_in_epoch is the proof that the CZ header is - timestamped - - within a certain epoch - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating - Merkle root - - The data could be arbitrary format, providing - necessary data - - for example neighbouring node hash - proof_epoch_sealed: - title: proof_epoch_sealed is the proof that the epoch is sealed - type: object - properties: - validator_set: - type: array - items: - type: object - properties: - validator_address: - type: string - title: validator_address is the address of the validator - bls_pub_key: - type: string - format: byte - title: bls_pub_key is the BLS public key of the validator - voting_power: - type: string - format: uint64 - title: >- - voting_power is the voting power of the validator - at the given epoch - title: >- - ValidatorWithBlsKey couples validator address, voting - power, and its bls - - public key - title: >- - validator_set is the validator set of the sealed epoch - - This validator set has generated a BLS multisig on - `app_hash` of - - the sealer header - proof_epoch_info: - title: >- - proof_epoch_info is the Merkle proof that the epoch's - metadata is committed - - to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating - Merkle root - - The data could be arbitrary format, providing - necessary data - - for example neighbouring node hash - proof_epoch_val_set: - title: >- - proof_epoch_info is the Merkle proof that the epoch's - validator set is - - committed to `app_hash` of the sealer header - type: object - properties: - ops: - type: array - items: - type: object - properties: - type: - type: string - key: - type: string - format: byte - data: - type: string - format: byte - title: >- - ProofOp defines an operation used for calculating - Merkle root - - The data could be arbitrary format, providing - necessary data - - for example neighbouring node hash - proof_epoch_submitted: - type: array - items: - type: object - properties: - key: - type: object - properties: - index: - type: integer - format: int64 - hash: - type: string - format: byte - title: >- - Each provided OP_RETURN transaction can be identified - by hash of block in - - which transaction was included and transaction index - in the block - description: >- - key is the position (txIdx, blockHash) of this tx on - BTC blockchain - - Although it is already a part of SubmissionKey, we - store it here again - - to make TransactionInfo self-contained. - - For example, storing the key allows TransactionInfo to - not relay on + state defines the event of a state transition towards this + state + status_desc: + type: string + description: status_desc represents the description of status enum. + block_height: + type: string + format: uint64 + title: >- + block_height is the height of the Babylon block that + triggers the state - the fact that TransactionInfo will be ordered in the - same order as + update + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp in the Babylon block that + triggers the state - TransactionKeys in SubmissionKey. - transaction: - type: string - format: byte - title: transaction is the full transaction in bytes - proof: - type: string - format: byte - title: >- - proof is the Merkle proof that this tx is included in - the position in `key` - - TODO: maybe it could use here better format as we - already processed and - - validated the proof? - title: |- - TransactionInfo is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: >- - proof_epoch_submitted is the proof that the epoch's - checkpoint is included + update + description: >- + CheckpointStateUpdateResponse defines a state transition on + the checkpoint. + description: >- + lifecycle defines the lifecycle of this checkpoint, i.e., each + state - in BTC ledger It is the two TransactionInfo in the best - (i.e., earliest) + transition and the time (in both timestamp and block height) of + this - checkpoint submission - title: FinalizedChainInfo is the information of a CZ that is BTC-finalised - description: |- - QueryFinalizedChainsInfoResponse is response type for the - Query/FinalizedChainsInfo RPC method. - babylon.zoneconcierge.v1.QueryHeaderResponse: - type: object - properties: - header: + transition. + description: >- + RawCheckpointWithMetaResponse wraps the raw checkpoint with + metadata. + title: the order is going from the newest to oldest based on the epoch number + pagination: + description: pagination defines the pagination in the response. type: object properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: + next_key: type: string format: byte - title: hash is the hash of this header - height: + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string format: uint64 title: >- - height is the height of this header on CZ ledger + total is total number of results available if + PageRequest.count_total - (hash, height) jointly provides the position of the header on CZ - ledger - time: - type: string - format: date-time - title: |- - time is the timestamp of this header on CZ ledger - it is needed for CZ to unbond all mature validators/delegations - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that includes - this CZ + was set, its value is undefined otherwise + description: |- + QueryRawCheckpointListResponse is the response type for the + Query/RawCheckpoints RPC method. + babylon.checkpointing.v1.QueryRawCheckpointResponse: + type: object + properties: + raw_checkpoint: + type: object + properties: + ckpt: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: >- + block_hash_hex defines the 'BlockID.Hash', which is the hash + of + + the block that individual BLS sigs are signed on as hex string + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the + BLS multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS - header - babylon_header_height: + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + status: type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block that - includes this CZ + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - header - babylon_epoch: + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: status defines the status of the checkpoint + status_desc: type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: + description: status_desc represents the description of status enum. + bls_aggr_pk: type: string format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this header - - (babylon_block_height, babylon_tx_hash) jointly provides the - position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - fork_headers: - type: object - properties: - headers: + title: bls_aggr_pk defines the aggregated BLS public key + power_sum: + type: string + format: uint64 + title: power_sum defines the accumulated voting power for the checkpoint + lifecycle: type: array items: type: object properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: + state: type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - (hash, height) jointly provides the position of the header - on CZ ledger - time: - type: string - format: date-time + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. title: >- - time is the timestamp of this header on CZ ledger - - it is needed for CZ to unbond all mature - validators/delegations - - before this timestamp when this header is BTC-finalised - babylon_header_hash: + state defines the event of a state transition towards this + state + status_desc: type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ - - header - babylon_header_height: + description: status_desc represents the description of status enum. + block_height: type: string format: uint64 title: >- - babylon_header_height is the height of the babylon block - that includes this CZ + block_height is the height of the Babylon block that + triggers the state - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: + update + block_time: type: string - format: byte + format: date-time title: >- - babylon_tx_hash is the hash of the tx that includes this - header - - (babylon_block_height, babylon_tx_hash) jointly provides the - position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: >- - blocks is the list of non-canonical indexed headers at the same - height - description: >- - Forks is a list of non-canonical `IndexedHeader`s at the same height. - - For example, assuming the following blockchain - - ``` - - A <- B <- C <- D <- E - \ -- D1 - \ -- D2 - ``` - - Then the fork will be {[D1, D2]} where each item is in struct - `IndexedBlock`. - - - Note that each `IndexedHeader` in the fork should have a valid quorum + block_time is the timestamp in the Babylon block that + triggers the state - certificate. Such forks exist since Babylon considers CZs might have + update + description: >- + CheckpointStateUpdateResponse defines a state transition on the + checkpoint. + description: >- + lifecycle defines the lifecycle of this checkpoint, i.e., each + state - dishonest majority. Also note that the IBC-Go implementation will only + transition and the time (in both timestamp and block height) of + this - consider the first header in a fork valid, since the subsequent - headers + transition. + description: RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata. + description: >- + QueryRawCheckpointResponse is the response type for the + Query/RawCheckpoint - cannot be verified without knowing the validator set in the previous - header. - description: QueryHeaderResponse is response type for the Query/Header RPC method. - babylon.zoneconcierge.v1.QueryListEpochHeadersResponse: + RPC method. + babylon.checkpointing.v1.QueryRawCheckpointsResponse: type: object properties: - headers: + raw_checkpoints: type: array items: type: object properties: - consumer_id: - type: string - title: consumer_id is the unique ID of the consumer - hash: - type: string - format: byte - title: hash is the hash of this header - height: - type: string - format: uint64 - title: >- - height is the height of this header on CZ ledger - - (hash, height) jointly provides the position of the header on CZ - ledger - time: - type: string - format: date-time - title: |- - time is the timestamp of this header on CZ ledger - it is needed for CZ to unbond all mature validators/delegations - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ + ckpt: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: >- + block_hash_hex defines the 'BlockID.Hash', which is the hash + of - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block that - includes this CZ + the block that individual BLS sigs are signed on as hex + string + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the + BLS multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + status: type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this header - - (babylon_block_height, babylon_tx_hash) jointly provides the - position of - - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: headers is the list of headers - description: >- - QueryListEpochHeadersResponse is response type for the - Query/ListEpochHeaders + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - RPC method. - babylon.zoneconcierge.v1.QueryListHeadersResponse: - type: object - properties: - headers: - type: array - items: - type: object - properties: - consumer_id: + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: status defines the status of the checkpoint + status_desc: type: string - title: consumer_id is the unique ID of the consumer - hash: + description: status_desc represents the description of status enum. + bls_aggr_pk: type: string format: byte - title: hash is the hash of this header - height: + title: bls_aggr_pk defines the aggregated BLS public key + power_sum: type: string format: uint64 title: >- - height is the height of this header on CZ ledger + power_sum defines the accumulated voting power for the + checkpoint + lifecycle: + type: array + items: + type: object + properties: + state: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - (hash, height) jointly provides the position of the header on CZ - ledger - time: - type: string - format: date-time - title: |- - time is the timestamp of this header on CZ ledger - it is needed for CZ to unbond all mature validators/delegations - before this timestamp when this header is BTC-finalised - babylon_header_hash: - type: string - format: byte - title: >- - babylon_header_hash is the hash of the babylon block that - includes this CZ + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: >- + state defines the event of a state transition towards this + state + status_desc: + type: string + description: status_desc represents the description of status enum. + block_height: + type: string + format: uint64 + title: >- + block_height is the height of the Babylon block that + triggers the state - header - babylon_header_height: - type: string - format: uint64 - title: >- - babylon_header_height is the height of the babylon block that - includes this CZ + update + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp in the Babylon block that + triggers the state - header - babylon_epoch: - type: string - format: uint64 - title: epoch is the epoch number of this header on Babylon ledger - babylon_tx_hash: - type: string - format: byte - title: >- - babylon_tx_hash is the hash of the tx that includes this header + update + description: >- + CheckpointStateUpdateResponse defines a state transition on + the checkpoint. + description: >- + lifecycle defines the lifecycle of this checkpoint, i.e., each + state - (babylon_block_height, babylon_tx_hash) jointly provides the - position of + transition and the time (in both timestamp and block height) of + this - the header on Babylon ledger - title: IndexedHeader is the metadata of a CZ header - title: headers is the list of headers + transition. + description: >- + RawCheckpointWithMetaResponse wraps the raw checkpoint with + metadata. + title: the order is going from the newest to oldest based on the epoch number pagination: - title: pagination defines the pagination in the response + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -14165,66 +7184,178 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + description: >- + QueryRawCheckpointsResponse is the response type for the + Query/RawCheckpoints - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - description: |- - QueryListHeadersResponse is response type for the Query/ListHeaders RPC - method. - babylon.zoneconcierge.v1.QueryParamsResponse: + RPC method. + babylon.checkpointing.v1.QueryRecentEpochStatusCountResponse: type: object properties: - params: - description: params holds all the parameters of this module. + tip_epoch: + type: string + format: uint64 + epoch_count: + type: string + format: uint64 + status_count: type: object - properties: - ibc_packet_timeout_seconds: - type: integer - format: int64 - title: >- - ibc_packet_timeout_seconds is the time period after which an - unrelayed - - IBC packet becomes timeout, measured in seconds - description: QueryParamsResponse is the response type for the Query/Params RPC method. - tendermint.crypto.ProofOp: + additionalProperties: + type: string + format: uint64 + description: |- + QueryRecentEpochStatusCountResponse is the response type for the + Query/EpochStatusCount RPC method. + babylon.checkpointing.v1.RawCheckpointResponse: type: object properties: - type: + epoch_num: type: string - key: + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: |- + block_hash_hex defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on as hex string + bitmap: type: string format: byte - data: + title: >- + bitmap defines the bitmap that indicates the signers of the BLS multi + sig + bls_multi_sig: type: string format: byte - title: |- - ProofOp defines an operation used for calculating Merkle root - The data could be arbitrary format, providing necessary data - for example neighbouring node hash - tendermint.crypto.ProofOps: + title: >- + bls_multi_sig defines the multi sig that is aggregated from individual + BLS + + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + babylon.checkpointing.v1.RawCheckpointWithMetaResponse: type: object properties: - ops: + ckpt: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: |- + block_hash_hex defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on as hex string + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the BLS + multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS + + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + status: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: status defines the status of the checkpoint + status_desc: + type: string + description: status_desc represents the description of status enum. + bls_aggr_pk: + type: string + format: byte + title: bls_aggr_pk defines the aggregated BLS public key + power_sum: + type: string + format: uint64 + title: power_sum defines the accumulated voting power for the checkpoint + lifecycle: type: array items: type: object properties: - type: + state: type: string - key: + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: state defines the event of a state transition towards this state + status_desc: type: string - format: byte - data: + description: status_desc represents the description of status enum. + block_height: type: string - format: byte - title: |- - ProofOp defines an operation used for calculating Merkle root - The data could be arbitrary format, providing necessary data - for example neighbouring node hash - title: ProofOps is Merkle proof defined by the list of ProofOps + format: uint64 + title: >- + block_height is the height of the Babylon block that triggers + the state + + update + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp in the Babylon block that triggers + the state + + update + description: >- + CheckpointStateUpdateResponse defines a state transition on the + checkpoint. + description: |- + lifecycle defines the lifecycle of this checkpoint, i.e., each state + transition and the time (in both timestamp and block height) of this + transition. + description: RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata. + babylon.checkpointing.v1.ValidatorWithBlsKey: + type: object + properties: + validator_address: + type: string + title: validator_address is the address of the validator + bls_pub_key: + type: string + format: byte + title: bls_pub_key is the BLS public key of the validator + voting_power: + type: string + format: uint64 + title: voting_power is the voting power of the validator at the given epoch + title: |- + ValidatorWithBlsKey couples validator address, voting power, and its bls + public key diff --git a/proto/babylon/btcstaking/v1/query.proto b/proto/babylon/btcstaking/v1/query.proto index f2464f54b..95ce627dd 100644 --- a/proto/babylon/btcstaking/v1/query.proto +++ b/proto/babylon/btcstaking/v1/query.proto @@ -35,7 +35,7 @@ service Query { // BTCDelegations queries all BTC delegations under a given status rpc BTCDelegations(QueryBTCDelegationsRequest) returns (QueryBTCDelegationsResponse) { - option (google.api.http).get = "/babylon/btcstaking/v1/btc_delegations"; + option (google.api.http).get = "/babylon/btcstaking/v1/btc_delegations/{status}"; } // ActiveFinalityProvidersAtHeight queries finality providers with non zero voting power at given height. @@ -66,7 +66,7 @@ service Query { // BTCDelegation retrieves delegation by corresponding staking tx hash rpc BTCDelegation(QueryBTCDelegationRequest) returns (QueryBTCDelegationResponse) { - option (google.api.http).get = "/babylon/btcstaking/v1/btc_delegations/{staking_tx_hash_hex}"; + option (google.api.http).get = "/babylon/btcstaking/v1/btc_delegation/{staking_tx_hash_hex}"; } } diff --git a/test/e2e/configurer/chain/queries_btcstaking.go b/test/e2e/configurer/chain/queries_btcstaking.go index e2aea8773..861302692 100644 --- a/test/e2e/configurer/chain/queries_btcstaking.go +++ b/test/e2e/configurer/chain/queries_btcstaking.go @@ -70,7 +70,7 @@ func (n *NodeConfig) QueryFinalityProviderDelegations(fpBTCPK string) []*bstypes } func (n *NodeConfig) QueryBtcDelegation(stakingTxHash string) *bstypes.QueryBTCDelegationResponse { - path := fmt.Sprintf("/babylon/btcstaking/v1/btc_delegations/%s", stakingTxHash) + path := fmt.Sprintf("/babylon/btcstaking/v1/btc_delegation/%s", stakingTxHash) bz, err := n.QueryGRPCGateway(path, url.Values{}) require.NoError(n.t, err) @@ -81,8 +81,9 @@ func (n *NodeConfig) QueryBtcDelegation(stakingTxHash string) *bstypes.QueryBTCD return &resp } -func (n *NodeConfig) QueryBtcDelegations() *bstypes.QueryBTCDelegationsResponse { - bz, err := n.QueryGRPCGateway("/babylon/btcstaking/v1/btc_delegations", url.Values{}) +func (n *NodeConfig) QueryBtcDelegations(status bstypes.BTCDelegationStatus) *bstypes.QueryBTCDelegationsResponse { + path := fmt.Sprintf("/babylon/btcstaking/v1/btc_delegations/%d", status) + bz, err := n.QueryGRPCGateway(path, url.Values{}) require.NoError(n.t, err) var resp bstypes.QueryBTCDelegationsResponse @@ -93,42 +94,15 @@ func (n *NodeConfig) QueryBtcDelegations() *bstypes.QueryBTCDelegationsResponse } func (n *NodeConfig) QueryUnbondedDelegations() []*bstypes.BTCDelegationResponse { - queryParams := url.Values{} - queryParams.Add("status", fmt.Sprintf("%d", bstypes.BTCDelegationStatus_UNBONDED)) - bz, err := n.QueryGRPCGateway("/babylon/btcstaking/v1/btc_delegations", queryParams) - require.NoError(n.t, err) - - var resp bstypes.QueryBTCDelegationsResponse - err = util.Cdc.UnmarshalJSON(bz, &resp) - require.NoError(n.t, err) - - return resp.BtcDelegations + return n.QueryBtcDelegations(bstypes.BTCDelegationStatus_UNBONDED).BtcDelegations } func (n *NodeConfig) QueryVerifiedDelegations() []*bstypes.BTCDelegationResponse { - queryParams := url.Values{} - queryParams.Add("status", fmt.Sprintf("%d", bstypes.BTCDelegationStatus_VERIFIED)) - bz, err := n.QueryGRPCGateway("/babylon/btcstaking/v1/btc_delegations", queryParams) - require.NoError(n.t, err) - - var resp bstypes.QueryBTCDelegationsResponse - err = util.Cdc.UnmarshalJSON(bz, &resp) - require.NoError(n.t, err) - - return resp.BtcDelegations + return n.QueryBtcDelegations(bstypes.BTCDelegationStatus_VERIFIED).BtcDelegations } func (n *NodeConfig) QueryActiveDelegations() []*bstypes.BTCDelegationResponse { - queryParams := url.Values{} - queryParams.Add("status", fmt.Sprintf("%d", bstypes.BTCDelegationStatus_ACTIVE)) - bz, err := n.QueryGRPCGateway("/babylon/btcstaking/v1/btc_delegations", queryParams) - require.NoError(n.t, err) - - var resp bstypes.QueryBTCDelegationsResponse - err = util.Cdc.UnmarshalJSON(bz, &resp) - require.NoError(n.t, err) - - return resp.BtcDelegations + return n.QueryBtcDelegations(bstypes.BTCDelegationStatus_ACTIVE).BtcDelegations } func (n *NodeConfig) QueryActivatedHeight() (uint64, error) { diff --git a/x/btcstaking/README.md b/x/btcstaking/README.md index a9753665c..0e515f95d 100644 --- a/x/btcstaking/README.md +++ b/x/btcstaking/README.md @@ -349,7 +349,7 @@ BTC stakers (aka delegators), and covenant emulators. The message formats are defined at [proto/babylon/btcstaking/v1/tx.proto](../../proto/babylon/btcstaking/v1/tx.proto). The message handlers are defined at -[x/btcstaking/keeper/msg_server.go](./keeper/msg_server.go). For more information on the SDK messages, refer to the [Cosmos SDK documentation on messages and queries](https://docs.cosmos.network/main/build/building-modules/messages-and-queries) +[x/btcstaking/keeper/msg_server.go](./keeper/msg_server.go). For more information on the SDK messages, refer to the [Cosmos SDK documentation on messages and queries](https://docs.cosmos.network/main/build/building-modules/messages-and-queries) ### MsgCreateFinalityProvider @@ -785,7 +785,7 @@ Endpoint: `/babylon/btcstaking/v1/finality_providers/{fp_btc_pk_hex}/finality_pr Description: Retrieves information about a specific finality provider by its Bitcoin public key (in BIP-340 format). BTC Delegations by Status -Endpoint: `/babylon/btcstaking/v1/btc_delegations` +Endpoint: `/babylon/btcstaking/v1/btc_delegations/{status}` Description: Queries all BTC delegations under a given status. Active Finality Providers at Height @@ -809,7 +809,7 @@ Endpoint: `/babylon/btcstaking/v1/finality_providers/{fp_btc_pk_hex}/delegations Description: Queries all BTC delegations under a specific finality provider. BTC Delegation by Staking Transaction Hash -Endpoint: `/babylon/btcstaking/v1/btc_delegations/{staking_tx_hash_hex}` +Endpoint: `/babylon/btcstaking/v1/btc_delegation/{staking_tx_hash_hex}` Description: Retrieves a specific BTC delegation by its corresponding staking transaction hash. Additional Information: diff --git a/x/btcstaking/types/query.pb.go b/x/btcstaking/types/query.pb.go index 91b814236..0a3c690df 100644 --- a/x/btcstaking/types/query.pb.go +++ b/x/btcstaking/types/query.pb.go @@ -1629,125 +1629,126 @@ func init() { func init() { proto.RegisterFile("babylon/btcstaking/v1/query.proto", fileDescriptor_74d49d26f7429697) } var fileDescriptor_74d49d26f7429697 = []byte{ - // 1887 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4b, 0x6c, 0xdb, 0xc8, - 0x19, 0x0e, 0x6d, 0x45, 0x89, 0x7f, 0xd9, 0x8e, 0x33, 0xeb, 0x24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x67, 0xb9, 0x8b, 0x99, 0xee, 0xea, 0x23, 0xb7, 0x89, 0x91, 0x05, 0x67, 0xda, 0x5e, 0xd4, - 0x20, 0x15, 0x5f, 0x82, 0x59, 0x3d, 0xc5, 0x3b, 0xa5, 0x90, 0xde, 0x29, 0x8f, 0x63, 0x6a, 0xdd, - 0x5e, 0x99, 0x6f, 0x27, 0xac, 0x06, 0xb1, 0x88, 0xf7, 0x40, 0x25, 0x7c, 0x83, 0xcc, 0x89, 0x58, - 0xc4, 0xaa, 0x7c, 0x71, 0x68, 0xcf, 0x27, 0xe1, 0x5c, 0x8a, 0x61, 0xb4, 0x02, 0x73, 0xb1, 0x74, - 0x3a, 0x31, 0x52, 0x88, 0xd2, 0x14, 0xa7, 0xfd, 0x3e, 0x2c, 0x44, 0xa7, 0x1d, 0xe9, 0x84, 0x27, - 0x3e, 0xc1, 0x95, 0xd4, 0xae, 0xc8, 0xe3, 0x50, 0x42, 0x9e, 0xba, 0x05, 0x0b, 0xdd, 0x53, 0xef, - 0xd5, 0xee, 0x76, 0x51, 0xae, 0x78, 0x39, 0xa5, 0x2c, 0xdd, 0x43, 0x7f, 0xe0, 0xd5, 0x88, 0xa1, - 0x86, 0x86, 0xe2, 0x3e, 0x78, 0xfb, 0x24, 0x20, 0x37, 0x93, 0x84, 0xdc, 0xf7, 0x20, 0xdf, 0x87, - 0xdc, 0x78, 0x2a, 0xc7, 0xb9, 0xca, 0xb9, 0x5e, 0xf0, 0x46, 0x99, 0xd4, 0xe0, 0x6c, 0x84, 0xdf, - 0x98, 0x2e, 0x55, 0xb3, 0x87, 0x04, 0xf2, 0x7c, 0x17, 0xc8, 0x91, 0x27, 0xaa, 0x59, 0xb0, 0x7c, - 0xc0, 0xa5, 0x82, 0xee, 0x42, 0xc6, 0xc6, 0x8d, 0xc3, 0x7d, 0x39, 0x73, 0x4d, 0xed, 0x77, 0x19, - 0x50, 0x53, 0x1f, 0x33, 0x1f, 0x42, 0x2e, 0xe8, 0x02, 0xdf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0x5e, 0x3a, 0xf6, 0xf7, 0xd7, 0x4b, - 0xc7, 0x7e, 0x30, 0xc2, 0xc7, 0x5e, 0x27, 0xee, 0x92, 0x7f, 0xf9, 0x55, 0xb3, 0xfc, 0xff, 0x4c, - 0xb7, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xfa, 0xfe, 0xb7, 0xb1, 0x1b, 0x00, 0x00, + // 1893 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcb, 0x6f, 0xdb, 0xc8, + 0x19, 0x0f, 0x6d, 0x45, 0x89, 0x3f, 0xd9, 0x8e, 0x33, 0xeb, 0x24, 0x8c, 0x1c, 0xdb, 0x09, 0x9b, + 0x4d, 0x9c, 0x87, 0xc5, 0x58, 0xf1, 0xee, 0xb6, 0x0d, 0xd2, 0xc4, 0xb2, 0x77, 0x93, 0xec, 0xae, + 0x1b, 0x95, 0x4e, 0x5a, 0xa0, 0x2f, 0x81, 0x22, 0x47, 0x14, 0x1b, 0x99, 0xa3, 0x70, 0x46, 0xae, + 0x8c, 0xc0, 0x97, 0x1e, 0x7a, 0x2b, 0x50, 0xa0, 0xfd, 0x17, 0x16, 0x28, 0xd0, 0x4b, 0x81, 0xe6, + 0xd2, 0x43, 0xef, 0xdb, 0xdb, 0x22, 0x3d, 0x6c, 0x91, 0x43, 0x50, 0x24, 0x45, 0x0b, 0x14, 0xe8, + 0xb5, 0xe7, 0x82, 0x33, 0x43, 0x91, 0x92, 0x48, 0x59, 0xb2, 0xdd, 0x9b, 0x38, 0xf3, 0xbd, 0xe7, + 0xf7, 0xfd, 0xe6, 0x21, 0xb8, 0x54, 0x35, 0xab, 0xbb, 0x0d, 0xe2, 0xe9, 0x55, 0x66, 0x51, 0x66, + 0x3e, 0x73, 0x3d, 0x47, 0xdf, 0x59, 0xd1, 0x9f, 0xb7, 0xb0, 0xbf, 0x5b, 0x68, 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x93, 0xdc, 0x3b, 0xb0, 0xbe, 0xcc, 0x68, 0x93, + 0x67, 0xf4, 0x00, 0x7d, 0x7c, 0xf0, 0x75, 0x89, 0xb1, 0x0e, 0xfa, 0x93, 0x02, 0x53, 0x5d, 0x04, + 0x86, 0x6e, 0x0d, 0xcd, 0x75, 0x61, 0x4e, 0x2b, 0x23, 0x68, 0xc8, 0x2c, 0xd6, 0x79, 0x16, 0x77, + 0xd1, 0x9d, 0xa1, 0xc8, 0x91, 0x73, 0x63, 0xef, 0x7b, 0xc6, 0x5e, 0xe9, 0xbb, 0x5f, 0xbe, 0x5d, + 0x50, 0xbe, 0x7a, 0xbb, 0xa0, 0xfc, 0xfd, 0xed, 0x82, 0xf2, 0xeb, 0x77, 0x0b, 0xc7, 0xbe, 0x7a, + 0xb7, 0x70, 0xec, 0x6f, 0xef, 0x16, 0x8e, 0xfd, 0x70, 0x88, 0x43, 0x5f, 0x3b, 0xee, 0x91, 0x9f, + 0x00, 0xab, 0x59, 0xfe, 0x7f, 0xd3, 0xed, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x90, 0x06, 0xa8, + 0x5f, 0xb9, 0x1b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/btcstaking/types/query.pb.gw.go b/x/btcstaking/types/query.pb.gw.go index 532fbec7f..4cd302b72 100644 --- a/x/btcstaking/types/query.pb.gw.go +++ b/x/btcstaking/types/query.pb.gw.go @@ -196,13 +196,34 @@ func local_request_Query_FinalityProvider_0(ctx context.Context, marshaler runti } var ( - filter_Query_BTCDelegations_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_BTCDelegations_0 = &utilities.DoubleArray{Encoding: map[string]int{"status": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_BTCDelegations_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryBTCDelegationsRequest var metadata runtime.ServerMetadata + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["status"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") + } + + e, err = runtime.Enum(val, BTCDelegationStatus_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) + } + + protoReq.Status = BTCDelegationStatus(e) + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -219,6 +240,27 @@ func local_request_Query_BTCDelegations_0(ctx context.Context, marshaler runtime var protoReq QueryBTCDelegationsRequest var metadata runtime.ServerMetadata + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["status"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") + } + + e, err = runtime.Enum(val, BTCDelegationStatus_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) + } + + protoReq.Status = BTCDelegationStatus(e) + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -1109,7 +1151,7 @@ var ( pattern_Query_FinalityProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"babylon", "btcstaking", "v1", "finality_providers", "fp_btc_pk_hex", "finality_provider"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BTCDelegations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"babylon", "btcstaking", "v1", "btc_delegations"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_BTCDelegations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"babylon", "btcstaking", "v1", "btc_delegations", "status"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ActiveFinalityProvidersAtHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"babylon", "btcstaking", "v1", "finality_providers", "height"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1121,7 +1163,7 @@ var ( pattern_Query_FinalityProviderDelegations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"babylon", "btcstaking", "v1", "finality_providers", "fp_btc_pk_hex", "delegations"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BTCDelegation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"babylon", "btcstaking", "v1", "btc_delegations", "staking_tx_hash_hex"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_BTCDelegation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"babylon", "btcstaking", "v1", "btc_delegation", "staking_tx_hash_hex"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( From 2d00e8cf1b28e6632e5b6e41913ab1a0e83c6189 Mon Sep 17 00:00:00 2001 From: KonradStaniec Date: Wed, 9 Oct 2024 16:56:06 +0200 Subject: [PATCH 3/4] backport changelog changes (#153) --- CHANGELOG.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 311d4ef0e..c11bed963 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## Unreleased +## v0.12.0 + ### State Machine Breaking * [#132](https://github.com/babylonlabs-io/babylon/pull/132) Add CosmWasm parameters @@ -44,7 +46,7 @@ update during v1 upgrade handler. * [#142](https://github.com/babylonlabs-io/babylon/pull/142) Remove signed finality providers insert from the v1 upgrade handler. -### Misc Improvements +### Improvements * [#130](https://github.com/babylonlabs-io/babylon/pull/130) Fix bugs in the transaction fee refunding mechanism for covenant signatures and finality signatures @@ -56,9 +58,6 @@ pre-approval flow. messages inside `authz.MsgExec`. * [#146](https://github.com/babylonlabs-io/babylon/pull/146) Add property status as a filter to BTC delegations rest request `QueryBTCDelegationsRequest`. - -### Improvements - * [#144](https://github.com/babylonlabs-io/babylon/pull/144) Add new finality provider events * [#131](https://github.com/babylonlabs-io/babylon/pull/131) Add new staking events * [#113](https://github.com/babylonlabs-io/babylon/pull/113) Add multibuild binary From 0b203a6dcd48b6a49bb80c51bcb5774473da1eaa Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Thu, 10 Oct 2024 10:10:18 +1100 Subject: [PATCH 4/4] chore: backport github action (#149) Part of https://github.com/babylonlabs-io/babylon/issues/110 This PR introduces the backport Github action. One can label a hotfix PR to `main` with `backport release/0.Y.x`, and this GH action will open a backport PR automatically. --- .github/workflows/backport.yml | 38 ++++++++++++++++++++++++++++++++++ RELEASE_PROCESS.md | 24 +++++++++++---------- 2 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/backport.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 000000000..47c9985f6 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,38 @@ +# Adapted from https://github.com/marketplace/actions/backporting +# +# Usage: +# - Let's say you want to backport a pull request on a branch named `production`. +# - Then label it with `backport production`. +# - That's it! When the pull request gets merged, it will be backported to +# the `production` branch. If the pull request cannot be backported, a comment +# explaining why will automatically be posted. +# +# Note: multiple backport labels can be added. For example, if a pull request +# has the labels `backport staging` and `backport production` it will be +# backported to both branches: `staging` and `production`. +name: Backport +on: + pull_request_target: + types: + - closed + - labeled + +jobs: + backport: + name: Backport + runs-on: ubuntu-latest + # Only react to merged PRs for security reasons. + # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. + if: > + github.event.pull_request.merged + && ( + github.event.action == 'closed' + || ( + github.event.action == 'labeled' + && contains(github.event.label.name, 'backport') + ) + ) + steps: + - uses: tibdex/backport@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index eb58482c5..a1a846d09 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -1,12 +1,11 @@ # Release Process -- [Release Process](#release-process) - - [Breaking Changes](#breaking-changes) - - [Release Procedure](#release-procedure) - - [Creating a new release branch](#creating-a-new-release-branch) - - [Cutting a new release](#cutting-a-new-release) - - [Tagging Procedure](#tagging-procedure) - - [Patch release Procedure](#patch-release-procedure) +- [Breaking Changes](#breaking-changes) +- [Release Procedure](#release-procedure) + - [Creating a new release branch](#creating-a-new-release-branch) + - [Cutting a new release](#cutting-a-new-release) + - [Tagging Procedure](#tagging-procedure) +- [Patch Release Procedure](#patch-release-procedure) This document outlines the release process for the Babylon node (babylond) @@ -119,10 +118,13 @@ A _patch release_ is an increment of the patch number (eg: `v10.0.0` → `v10.0. circumstances .**_ Updates to the release branch should come from `main` by backporting PRs -(usually done by automatic cherry pick followed by a PRs to the release branch). -The backports must be marked using `backport/Y` label in PR for main. -It is the PR author's responsibility to fix merge conflicts and -ensure CI passes. +(usually done by automatic cherry pick followed by a PR to the release branch). +The backports must be marked using `backport release/v0.Y.x` label in PR for +`main`, where `release/v0.Y.x` is the name of the release branch. It is the PR +author's responsibility to fix merge conflicts, update changelog entries, and +ensure CI passes. If a PR originates from an external contributor, a member of +the stewarding team assumes responsibility to perform this process instead of +the original author. After the release branch has all commits required for the next patch release: * Create a new annotated git tag in the release