diff --git a/docs/developers/bsns/_category_.json b/docs/bsns/_category_.json
similarity index 77%
rename from docs/developers/bsns/_category_.json
rename to docs/bsns/_category_.json
index a1f51657..dd5561b7 100644
--- a/docs/developers/bsns/_category_.json
+++ b/docs/bsns/_category_.json
@@ -1,6 +1,6 @@
{
"position": 2,
"label": "Bitcoin Supercharged Networks",
- "collapsible": true,
+ "collapsible": false,
"collapsed": true
}
diff --git a/docs/developers/bsns/bsns.mdx b/docs/bsns/bsns.mdx
similarity index 96%
rename from docs/developers/bsns/bsns.mdx
rename to docs/bsns/bsns.mdx
index ec422523..112ca77a 100644
--- a/docs/developers/bsns/bsns.mdx
+++ b/docs/bsns/bsns.mdx
@@ -22,7 +22,7 @@ BTC-backed Finality Providers are held accountable, even
when equivocating Finality Providers constitute a majority.
Cosmos Chain Integration Guide
@@ -51,7 +51,7 @@ The [Forkless Rollups with Bitcoin staking](https://babylonchain.io/blog/forkles
blog post provides more details.
OP-stack L2 Chain Integration Guide
diff --git a/docs/developers/bsns/cosmos_chains/_category_.json b/docs/bsns/cosmos_chains/_category_.json
similarity index 100%
rename from docs/developers/bsns/cosmos_chains/_category_.json
rename to docs/bsns/cosmos_chains/_category_.json
diff --git a/docs/developers/bsns/cosmos_chains/babylon_sdk.mdx b/docs/bsns/cosmos_chains/babylon_sdk.mdx
similarity index 100%
rename from docs/developers/bsns/cosmos_chains/babylon_sdk.mdx
rename to docs/bsns/cosmos_chains/babylon_sdk.mdx
diff --git a/docs/developers/bsns/cosmos_chains/cosmos_chains.mdx b/docs/bsns/cosmos_chains/cosmos_chains.mdx
similarity index 96%
rename from docs/developers/bsns/cosmos_chains/cosmos_chains.mdx
rename to docs/bsns/cosmos_chains/cosmos_chains.mdx
index cbc4f31f..c2afb6ed 100644
--- a/docs/developers/bsns/cosmos_chains/cosmos_chains.mdx
+++ b/docs/bsns/cosmos_chains/cosmos_chains.mdx
@@ -18,8 +18,8 @@ for example, X→ Y means "Y queries data from X and the data flows from X to Y"
Upon For detailed technical specifications and requirements of the finality provider
-program for Consumer networks, please see SPEC-CONSUMER.md.
+program for Consumer networks, please see ./docs/SPEC-CONSUMER.md.
The spec document outlines the Consumer's interfaces, message handlers and
queries.
It also provides guidance for integrators.
diff --git a/docs/developers/bsns/cosmos_chains/integrating_as_cosmos_chain.mdx b/docs/bsns/cosmos_chains/integrating_as_cosmos_chain.mdx
similarity index 100%
rename from docs/developers/bsns/cosmos_chains/integrating_as_cosmos_chain.mdx
rename to docs/bsns/cosmos_chains/integrating_as_cosmos_chain.mdx
diff --git a/docs/developers/bsns/cosmos_chains/running_btc_staker.mdx b/docs/bsns/cosmos_chains/running_btc_staker.mdx
similarity index 100%
rename from docs/developers/bsns/cosmos_chains/running_btc_staker.mdx
rename to docs/bsns/cosmos_chains/running_btc_staker.mdx
diff --git a/docs/developers/bsns/cosmos_chains/running_finality_provider.mdx b/docs/bsns/cosmos_chains/running_finality_provider.mdx
similarity index 100%
rename from docs/developers/bsns/cosmos_chains/running_finality_provider.mdx
rename to docs/bsns/cosmos_chains/running_finality_provider.mdx
diff --git a/docs/developers/bsns/op_stack_chains/op_stack_chains.mdx b/docs/bsns/op_stack_chains/op_stack_chains.mdx
similarity index 96%
rename from docs/developers/bsns/op_stack_chains/op_stack_chains.mdx
rename to docs/bsns/op_stack_chains/op_stack_chains.mdx
index 361f3309..556438d6 100644
--- a/docs/developers/bsns/op_stack_chains/op_stack_chains.mdx
+++ b/docs/bsns/op_stack_chains/op_stack_chains.mdx
@@ -18,8 +18,8 @@ The design involves the following main components:
@@ -94,4 +94,4 @@ We have developed local deployment scripts for the OP stack integration.
- https://github.com/Snapchain/babylon-deployment for spinning up an OP stack chain integrating with Babylon Edge devnet
- https://github.com/Snapchain/op-chain-deployment for spinning up the entire stack (OP stack chain + ETH L1 + Babylon Genesis + Bitcoin)
----
+---
\ No newline at end of file
diff --git a/docs/developers/babylon_genesis_chain/explorers/explorers.mdx b/docs/developers/babylon_genesis_chain/explorers/explorers.mdx
index d37e0154..e5fd45c7 100644
--- a/docs/developers/babylon_genesis_chain/explorers/explorers.mdx
+++ b/docs/developers/babylon_genesis_chain/explorers/explorers.mdx
@@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem';
# Chain Explorers
-## Babylon Genesis Mainnet
+### Babylon Genesis Mainnet
Block scanners for Phase 2 Babylon Genesis Mainnet (`bbn-1`).
@@ -21,7 +21,7 @@ Block scanners for Phase 2 Babylon Genesis Mainnet (`bbn-1`).
| [Xangle](https://babylon-explorer.xangle.io/mainnet/home) | `https://babylon-explorer.xangle.io/mainnet/home` |
-## Babylon Genesis Testnet
+### Babylon Genesis Testnet
Block scanners for Phase 2 Babylon Genesis Testnet (`bbn-test-5`).
@@ -33,7 +33,7 @@ Block scanners for Phase 2 Babylon Genesis Testnet (`bbn-test-5`).
| [Xangle](https://babylon-explorer.xangle.io/testnet/home) | `https://babylon-explorer.xangle.io/testnet/home` |
-## Babylon Genesis Devnet
+### Babylon Genesis Devnet
| Service | URL |
|---------|-----|
diff --git a/docs/developers/babylon_genesis_chain/node_information.mdx b/docs/developers/babylon_genesis_chain/node_information.mdx
index 0166e550..3ef3a2e2 100644
--- a/docs/developers/babylon_genesis_chain/node_information.mdx
+++ b/docs/developers/babylon_genesis_chain/node_information.mdx
@@ -7,7 +7,7 @@ sidebar_position: 1
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-## Nodes and Endpoints Information for Babylon Genesis Chain
+## Endpoints Information
### Babylon Genesis Mainnet
diff --git a/docs/developers/developers.mdx b/docs/developers/developers.mdx
index 60a080f0..651cb405 100644
--- a/docs/developers/developers.mdx
+++ b/docs/developers/developers.mdx
@@ -24,6 +24,8 @@ offers unique opportunities in the shared-security space.
- IBC-enabled communication
- Native Bitcoin staking protocols
+Read more on [Bitcoin Supercharged Network](/bsns/).
+
#### 2. Smart Contract Development
**Utilize the extremely programmable Babylon Genesis**
- Deploy CosmWasm smart contracts
@@ -34,6 +36,8 @@ offers unique opportunities in the shared-security space.
- Rust-based smart contract development (CosmWasm)
- Partner oracles that work with Babylon Genesis
+Read more on [dApp deployments](/developers/dapps/smart_contract_deployment).
+
#### 3. Infrastructure and Tooling
**Develop Critical Network Components**
- Build monitoring and validation tools (e.g. via Vigilantes)
@@ -62,8 +66,8 @@ offers unique opportunities in the shared-security space.
3. **Check out BSN reference implementations**
- - [Babylon SDK](/developers/bsns/cosmos_chains/babylon_sdk)
- - [BSN integrations guide](/developers/bsns/)
+ - [Babylon SDK](/bsns/cosmos_chains/babylon_sdk)
+ - [BSN integrations guide](/bsns/)
---
diff --git a/docs/developers/staking_backend/services/global_config.mdx b/docs/developers/staking_backend/services/global_config.mdx
deleted file mode 100644
index 736e8c11..00000000
--- a/docs/developers/staking_backend/services/global_config.mdx
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: Global Configuration
-sidebar_label: Global Configuration
-sidebar_position: 4
----
-
-# Global Configuration
-
-{/* TODO */}
\ No newline at end of file
diff --git a/docs/developers/staking_backend/staking_backend.mdx b/docs/developers/staking_backend/staking_backend.mdx
index d4451e3e..44e34871 100644
--- a/docs/developers/staking_backend/staking_backend.mdx
+++ b/docs/developers/staking_backend/staking_backend.mdx
@@ -49,7 +49,7 @@ properly set up:
- **RabbitMQ** - [Setup Guide](https://www.rabbitmq.com/download.html)
_Handles message queuing between system components_
-- **Global Configuration** - [Setup Guide](./services/global_config)
+- **Global Configuration** - Setup guide will be available soon.
_Defines system-wide parameters for all services_
{/* Database Migration (Optional) - Clone Phase-1 database snapshot, apply snapshot to new MongoDB clusters.
diff --git a/docs/guides/architecture/_category_.json b/docs/guides/architecture/_category_.json
index 7a8b152f..7797249a 100644
--- a/docs/guides/architecture/_category_.json
+++ b/docs/guides/architecture/_category_.json
@@ -1,7 +1,7 @@
{
"position": 2,
"label": "Architecture",
- "collapsible": true,
- "collapsed": true,
+ "collapsible": false,
+ "collapsed": false,
"className": "architecture_sidebar_header"
}
\ No newline at end of file
diff --git a/docs/guides/governance/governance.mdx b/docs/guides/governance/governance.mdx
index a323cf81..4886eb54 100644
--- a/docs/guides/governance/governance.mdx
+++ b/docs/guides/governance/governance.mdx
@@ -73,7 +73,6 @@ Babylon's governance supports several types of proposals:
- **Text Proposals**: Proposals for signaling community sentiment or discussing ideas.
- **Parameter Change Proposals**: Modify specific blockchain parameters without changing underlying code.
-- **Community Spend Proposals**: Request funds from the community pool for projects, initiatives, or development.
- **Software Upgrade Proposals**: Coordinate chain-wide software upgrades with specific upgrade heights or times.
Each type of proposal has two urgency levels: standard or expedited.
diff --git a/docs/guides/governance/submit_proposals/submit_proposals.mdx b/docs/guides/governance/submit_proposals/submit_proposals.mdx
index b7dff58c..8a8e2606 100644
--- a/docs/guides/governance/submit_proposals/submit_proposals.mdx
+++ b/docs/guides/governance/submit_proposals/submit_proposals.mdx
@@ -8,7 +8,7 @@ keywords: [governance, proposals, submission, Babylon, Genesis]
# Submit Proposals
-This guide provides detailed instructions for preparing and submitting governance proposals in the Babylon Genesis ecosystem. Whether you're creating text proposals for signaling, parameter changes, community pool funding, or software upgrades, this guide will help you navigate the process with ease.
+This guide provides detailed instructions for preparing and submitting governance proposals in the Babylon Genesis ecosystem. Whether you're creating text proposals for signaling, parameter changes, or software upgrades, this guide will help you navigate the process with ease.
## Choose Proposal Types
diff --git a/docs/guides/governance/submit_proposals/submit_via_web.mdx b/docs/guides/governance/submit_proposals/submit_via_web.mdx
index 25d04ca3..48686437 100644
--- a/docs/guides/governance/submit_proposals/submit_via_web.mdx
+++ b/docs/guides/governance/submit_proposals/submit_via_web.mdx
@@ -26,7 +26,6 @@ Click on "New Proposal". Select the proposal type from the available options:
- Text Proposal
- Parameter Change
- Software Upgrade
-- Community Pool Spend
### Step 3: Fill in Proposal Details
diff --git a/docs/guides/overview/_category_.json b/docs/guides/overview/_category_.json
index d50cab7f..b0bd8a95 100644
--- a/docs/guides/overview/_category_.json
+++ b/docs/guides/overview/_category_.json
@@ -1,7 +1,7 @@
{
"position": 1,
"label": "Overview",
- "collapsible": true,
+ "collapsible": false,
"collapsed": false,
"className": "overview_sidebar_header",
"link": {
diff --git a/docs/guides/overview/overview.mdx b/docs/guides/overview/overview.mdx
index c4ec0e37..280d0904 100644
--- a/docs/guides/overview/overview.mdx
+++ b/docs/guides/overview/overview.mdx
@@ -108,7 +108,7 @@ provide a comprehensive set of tools and documentation to help you get started.
* [Babylon node](/operators/babylon_node/installation_guide)
* [Babylon RPC](/api/babylon-gRPC/babylon-grpc-api-docs)
-* [Babylon SDK (Cosmos SDK reference smart contracts)](/developers/bsns/cosmos_chains/babylon_sdk)
+* [Babylon SDK (Cosmos SDK reference smart contracts)](/bsns/cosmos_chains/babylon_sdk)
Interchain communication is handled through [IBC protocol](https://tutorials.cosmos.network/academy/3-ibc/).
diff --git a/docs/guides/overview/phases_of_the_launch/phase-3/phase-3.mdx b/docs/guides/overview/phases_of_the_launch/phase-3/phase-3.mdx
index fd94a57b..345351b9 100644
--- a/docs/guides/overview/phases_of_the_launch/phase-3/phase-3.mdx
+++ b/docs/guides/overview/phases_of_the_launch/phase-3/phase-3.mdx
@@ -14,7 +14,7 @@ Sophisticated cross-chain communication and time synchronization are required fo
The final phase establishes Babylon as a marketplace for shared security. Babylon Genesis will be the control plane to coordinate security arrangements between stakers and BSNs.
-
Read more on BSNs
diff --git a/docs/operators/babylon_node/babylon_cli/create_bls_key.mdx b/docs/operators/babylon_node/babylon_cli/create_bls_key.mdx
index 9d3d48e5..ebcec070 100644
--- a/docs/operators/babylon_node/babylon_cli/create_bls_key.mdx
+++ b/docs/operators/babylon_node/babylon_cli/create_bls_key.mdx
@@ -299,4 +299,16 @@ systemctl start babylond
### Node Operations
- [`babylond start`](./start.mdx) - Start the validator node
- [`babylond status`](./status.mdx) - Check validator status
+- [`babylond init`](./init.mdx) - Initialize node (required prerequisite)
+- [`babylond testnet`](./testnet.mdx) - Initialize testnet configuration
+- [`babylond gentx`](./gen_tx.mdx) - Generate validator genesis transaction
+- [`babylond add-genesis-account`](./add_genesis_account.mdx) - Add validator account to genesis
+
+### Key Management
+- [`babylond keys`](./keys.mdx) - Manage keyring keys
+- [`babylond comet show-validator`](./comet.mdx#show-validator) - Show validator public key
+
+### Node Operations
+- [`babylond start`](./start.mdx) - Start the validator node
+- [`babylond status`](./status.mdx) - Check validator status
diff --git a/docs/operators/babylon_node/babylon_cli/generate_bls_pop.mdx b/docs/operators/babylon_node/babylon_cli/generate_bls_pop.mdx
index 5b66efd8..666a44b1 100644
--- a/docs/operators/babylon_node/babylon_cli/generate_bls_pop.mdx
+++ b/docs/operators/babylon_node/babylon_cli/generate_bls_pop.mdx
@@ -23,8 +23,8 @@ Before using this command, ensure you have:
- Initialized your Babylon node with [`babylond init`](./init.mdx)
- Created BLS keys with [`babylond create-bls-key`](./create_bls_key.mdx)
- Confirmed that both key files exist:
- - `priv_validator_key.json` (contains Ed25519 keys)
- - `bls_key.json` or BLS keys embedded in `priv_validator_key.json`
+- `priv_validator_key.json` (contains Ed25519 keys)
+- `bls_key.json` or BLS keys embedded in `priv_validator_key.json`
## Arguments
diff --git a/docs/operators/babylon_node/babylon_cli/keys.mdx b/docs/operators/babylon_node/babylon_cli/keys.mdx
index a1123c43..33d7f734 100644
--- a/docs/operators/babylon_node/babylon_cli/keys.mdx
+++ b/docs/operators/babylon_node/babylon_cli/keys.mdx
@@ -686,4 +686,3 @@ echo "✅ Validator keys created and added to genesis"
### Address Operations
- [`babylond debug addr`](./debug.mdx#addr) - Convert address formats
- [`babylond debug pubkey`](./debug.mdx#pubkey) - Debug public key formats
-
diff --git a/docs/operators/babylon_node/babylon_cli/query.mdx b/docs/operators/babylon_node/babylon_cli/query.mdx
index ca33b8dd..88cafa59 100644
--- a/docs/operators/babylon_node/babylon_cli/query.mdx
+++ b/docs/operators/babylon_node/babylon_cli/query.mdx
@@ -27,7 +27,7 @@ babylond query [module] [subcommand] [flags]
| **auth** | Account authentication and management | accounts, account info, module accounts |
| **bank** | Token balances and transfers | balances, total supply, denomination metadata |
| **staking** | Validator bonding and delegations | validators, delegations, staking pool |
-| **distribution** | Staking reward distribution | rewards, commission, community pool |
+| **distribution** | Staking reward distribution | rewards, commission |
| **gov** | Governance proposals and voting | proposals, votes, governance parameters |
| **slashing** | Validator penalty tracking | signing info, slashing parameters |
diff --git a/docs/operators/babylon_node/babylon_usage_guide.mdx b/docs/operators/babylon_node/babylon_usage_guide.mdx
index 5bdf7880..0d11184b 100644
--- a/docs/operators/babylon_node/babylon_usage_guide.mdx
+++ b/docs/operators/babylon_node/babylon_usage_guide.mdx
@@ -3,4 +3,173 @@ sidebar_class_name: node_operators_installation_guide_sidebar
sidebar_label: Usage Guide
sidebar_position: 1
---
-//ITRocket guide
\ No newline at end of file
+# CLI Usage Guide
+
+### Key Management 🔑
+Add new wallet:
+```
+babylond keys add MsgSelectiveSlashingEvidence
MsgSelectiveSlashingEvidence
, a Babylon node will execute as follows:
-
Finality Provider
Finality Provider for Consumer Networks Specification
Integration tests the contract
the integration tests.
cargo run-script integration
+cargo run-script e2e
+
cargo run-script gen-schema
diff --git a/static/remote-docs/guides/architecture/consumer_zone_programs/zone_concierge.html b/static/remote-docs/guides/architecture/consumer_zone_programs/zone_concierge.html
index 581c4bee..6a5b09c9 100644
--- a/static/remote-docs/guides/architecture/consumer_zone_programs/zone_concierge.html
+++ b/static/remote-docs/guides/architecture/consumer_zone_programs/zone_concierge.html
@@ -59,10 +59,9 @@ The Zone Concierge module keeps handling IBC headers of PoS systems, and -maintains the following KV stores.
+The Zone Concierge module maintains a simplified header indexing system with the following KV stores. Consumer registration is handled by the btcstkconsumer
module.
The parameter storage maintains the Zone Concierge module's parameters. The Zone Concierge module's parameters are represented as a @@ -117,54 +115,36 @@
The chain info storage maintains ChainInfo
-for each PoS system. The key is the PoS system's ConsumerID
, which is the ID
-of the IBC light client. The value is a ChainInfo
object. The ChainInfo
is a
-structure storing the information of a PoS system that checkpoints to Babylon
-Genesis.
// ChainInfo is the information of a Consumer
-message ChainInfo {
- // consumer_id is the ID of the consumer
- string consumer_id = 1;
- // latest_header is the latest header in the Consumer's canonical chain
- IndexedHeader latest_header = 2;
- // latest_forks is the latest forks, formed as a series of IndexedHeader (from
- // low to high)
- Forks latest_forks = 3;
- // timestamped_headers_count is the number of timestamped headers in the Consumer's
- // canonical chain
- uint64 timestamped_headers_count = 4;
-}
-
-The epoch chain info storage maintains
-ChainInfo
at the end of each Babylon epoch for each PoS system. The key is the
-PoS system's ConsumerID
plus the epoch number, and the value is a ChainInfo
-object.
The canonical chain storage maintains the
-metadata of canonical IBC headers of a PoS system. The key is the BSN's
-ConsumerID
plus the height, and the value is a IndexedHeader
object.
-IndexedHeader
is a structure storing IBC header's metadata.
// IndexedHeader is the metadata of a Consumer header
+LatestEpochHeaders
+The latest epoch headers storage maintains
+the most recent header received from each BSN during the current epoch. The
+key is the BSN's ConsumerID
, and the value is an IndexedHeader
object.
+This storage is cleared at the end of each epoch when headers are moved to the
+finalized storage.
+FinalizedEpochHeaders
+The finalized epoch headers storage
+maintains headers that have been finalized for each BSN and epoch. The key
+is the epoch number plus the BSN's ConsumerID
, and the value is an
+IndexedHeaderWithProof
object. The IndexedHeaderWithProof
contains both the
+header metadata and the inclusion proof.
+// IndexedHeader is the metadata of a BSN header
message IndexedHeader {
- // consumer_id is the unique ID of the consumer
+ // consumer_id is the unique ID of the BSN
string consumer_id = 1;
// hash is the hash of this header
bytes hash = 2;
- // height is the height of this header on the Consumer's ledger
- // (hash, height) jointly provides the position of the header on the Consumer's ledger
+ // height is the height of this header on the BSN's ledger.
+ // (hash, height) jointly provide the position of the header on the BSN ledger
uint64 height = 3;
- // time is the timestamp of this header on the Consumer's ledger.
- // It is needed for the Consumer to unbond all mature validators/delegations
- // before this timestamp when this header is BTC-finalised
+ // time is the timestamp of this header on the BSN's ledger.
+ // It is needed for a BSN to unbond all mature validators/delegations before
+ // this timestamp, when this header is BTC-finalised
google.protobuf.Timestamp time = 4 [ (gogoproto.stdtime) = true ];
- // babylon_header_hash is the hash of the babylon block that includes this
- // Consumer header
+ // babylon_header_hash is the hash of the babylon block that includes this BSN
+ // header
bytes babylon_header_hash = 5;
// babylon_header_height is the height of the babylon block that includes this
- // Consumer header
+ // BSN header
uint64 babylon_header_height = 6;
// epoch is the epoch number of this header on Babylon ledger
uint64 babylon_epoch = 7;
@@ -173,12 +153,32 @@ CanonicalChain
// the header on Babylon ledger
bytes babylon_tx_hash = 8;
}
+
+// IndexedHeaderWithProof is an indexed header with a proof that the header is
+// included in the epoch
+message IndexedHeaderWithProof {
+ IndexedHeader header = 1;
+ // proof is an inclusion proof that the header
+ // is committed to the `app_hash` of the sealer header of header.babylon_epoch
+ tendermint.crypto.ProofOps proof = 2;
+}
+
+BSNBTCState
+The BSN BTC state storage maintains
+unified BTC synchronization state for each BSN. The key is the BSN's
+ConsumerID
, and the value is a BSNBTCState
object that tracks the base
+BTC header and last sent BTC header segment for each BSN.
+// BSNBTCState stores per-BSN BTC synchronization state
+// This includes both the base header and the last sent segment
+message BSNBTCState {
+ // base_header is the base BTC header for this BSN
+ // This represents the starting point from which BTC headers are synchronized
+ babylon.btclightclient.v1.BTCHeaderInfo base_header = 1;
+ // last_sent_segment is the last segment of BTC headers sent to this BSN
+ // This is used to determine the next headers to send and handle reorgs
+ BTCChainSegment last_sent_segment = 2;
+}
-Fork
-The fork storage maintains the metadata of canonical
-IBC headers of a PoS system. The key is the PoS system's ConsumerID
plus the
-height, and the value is a list of IndexedHeader
objects, which represent fork
-headers at that height.
Params
The parameter storage maintains the parameters for the
Zone Concierge module.
@@ -222,32 +222,33 @@ PostHandler for intercepting IBC headers
Extract the header info and the client state from the message
Determine if the header is on a fork by checking if the client is frozen
Call HandleHeaderWithValidCommit
to process the header
-If the PoS system hosting the header is not known to Babylon Genesis,
-initialize ChainInfo
storage for the PoS system
-If the header is on a fork, insert the header to the fork storage and update
-ChainInfo
-If the header is canonical, insert the header to the canonical chain storage
-and update ChainInfo
-Unfreeze the client if it was frozen due to a fork header
+Check if the BSN is registered through the btcstkconsumer
module and is a Cosmos BSN; if not, ignore the header
+Create an IndexedHeader
with the header metadata and Babylon context
+If the header is not on a fork and is newer than the existing latest header,
+update the latest epoch header for the BSN
+Log fork events for monitoring and debugging purposes
Hooks
The Zone Concierge module subscribes to the Epoching module's AfterEpochEnds
-hook for indexing the epochs when receiving
-headers from BSNs, the Checkpointing module's AfterRawCheckpointSealed
-hook for recording epoch chain info proofs,
-and the Checkpointing module's AfterRawCheckpointFinalized
+hook for recording epoch headers, the
+Checkpointing module's AfterRawCheckpointSealed
+hook for recording epoch header proofs, and
+the Checkpointing module's AfterRawCheckpointFinalized
hook for sending BTC timestamps to BSNs.
Indexing headers upon AfterEpochEnds
The AfterEpochEnds
hook is triggered when an epoch is ended, i.e., the last
block in this epoch has been committed by CometBFT. Upon AfterEpochEnds
, the
-Zone Concierge will save the current ChainInfo
to the EpochChainInfo
storage
-for each BSN.
+Zone Concierge will:
+
+- Record all current latest epoch headers as finalized headers for the completed epoch
+- Clear the latest epoch headers to prepare for the next epoch
+
Recording proofs upon AfterRawCheckpointSealed
The AfterRawCheckpointSealed
hook is triggered when an epoch's raw checkpoint
is sealed by validator signatures. Upon AfterRawCheckpointSealed
, the Zone
Concierge will:
-- Record epoch chain info with inclusion proofs for each BSN
+- Generate inclusion proofs for all finalized headers in the sealed epoch
- Generate and store the proof that the epoch is sealed
Sending BTC timestamps upon AfterRawCheckpointFinalized
@@ -261,11 +262,11 @@ Sending BTC timestamps upon AfterRawCheckpointFinalized
Bitcoin.
// BTCTimestamp is a BTC timestamp that carries information of a BTC-finalized epoch
// It includes a number of BTC headers, a raw checkpoint, an epoch metadata, and
-// a Consumer header if there exists Consumer headers checkpointed to this epoch.
+// a BSN header if there exists BSN headers checkpointed to this epoch.
// Upon a newly finalized epoch in Babylon, Babylon will send a BTC timestamp to each
-// PoS blockchain that has phase-2 integration with Babylon via IBC.
+// BSN via IBC.
message BTCTimestamp {
- // header is the last Consumer header in the finalized Babylon epoch
+ // header is the last BSN header in the finalized Babylon epoch
babylon.zoneconcierge.v1.IndexedHeader header = 1;
/*
@@ -290,25 +291,24 @@ Sending BTC timestamps upon AfterRawCheckpointFinalized
/*
Proofs that the header is finalized
*/
- babylon.zoneconcierge.v1.ProofFinalizedChainInfo proof = 6;
+ babylon.zoneconcierge.v1.ProofFinalizedHeader proof = 6;
}
-// ProofFinalizedChainInfo is a set of proofs that attest a chain info is
+// ProofFinalizedHeader is a set of proofs that attest a header is
// BTC-finalized
-message ProofFinalizedChainInfo {
+message ProofFinalizedHeader {
/*
- The following fields include proofs that attest the chain info is
+ The following fields include proofs that attest the header is
BTC-finalized
*/
- // proof_consumer_header_in_epoch is the proof that the Consumer header is timestamped
- // within a certain epoch
- tendermint.crypto.ProofOps proof_consumer_header_in_epoch = 1;
// proof_epoch_sealed is the proof that the epoch is sealed
- babylon.zoneconcierge.v1.ProofEpochSealed proof_epoch_sealed = 2;
+ babylon.zoneconcierge.v1.ProofEpochSealed proof_epoch_sealed = 1;
// 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
- repeated babylon.btccheckpoint.v1.TransactionInfo proof_epoch_submitted = 3;
+ repeated babylon.btccheckpoint.v1.TransactionInfo proof_epoch_submitted = 2;
+ // proof_consumer_header_in_epoch is the proof that the BSN header is included in the epoch
+ tendermint.crypto.ProofOps proof_consumer_header_in_epoch = 3;
}
When AfterRawCheckpointFinalized
is triggered, the Zone Concierge module will
@@ -317,18 +317,8 @@
Sending BTC timestamps upon AfterRawCheckpointFinalized
-
Determine BTC headers to broadcast: Get all BTC headers to be sent in BTC
-timestamps by:
-
-- Finding the segment of BTC headers sent upon the last time
-
AfterRawCheckpointFinalized
was triggered
-- If all BTC headers in the segment are no longer canonical (due to a Bitcoin
-reorg), send the last
w+1
BTC headers from the current tip, where w
is
-the checkpoint_finalization_timeout
-parameter in the
-BTCCheckpoint module
-- Otherwise, send BTC headers from the latest header that is still canonical
-in the segment to the current tip of the BTC light client
-
+timestamps using the global broadcast strategy (fallback to the last w+1
+BTC headers from the current tip for compatibility)
-
Broadcast BTC timestamps to all open channels: For each open IBC channel
@@ -336,7 +326,7 @@
Sending BTC timestamps upon AfterRawCheckpointFinalized
- Find the
ConsumerID
of the counterparty chain (i.e., the PoS system) in
the IBC channel
-- Get the
ChainInfo
of the ConsumerID
at the last finalised epoch
+- Get the finalized header for the
ConsumerID
at the last finalised epoch
- Get the metadata of the last finalised epoch and its corresponding raw
checkpoint
- Generate the proof that the last PoS system's canonical header is committed
@@ -364,20 +354,23 @@
Broadcasting BTC Headers
The EndBlocker
calls BroadcastBTCHeaders
to send BTC headers to all open IBC
channels with BSNs. This ensures that BSNs' BTC light clients stay synchronized
with Babylon Genesis' BTC light client.
-The header selection logic follows the same rules as described in the Hooks
-section:
+The header selection logic now uses per-BSN BTC state tracking with the
+following enhanced rules:
-- If no headers have been sent previously: Send the last
w+1
BTC headers from
-the tip
-- If headers have been sent previously:
-
-- If the last sent segment is still valid (no Bitcoin reorg): Send headers
-from the last sent header to the current tip
-- If the last sent segment is invalid (Bitcoin reorg occurred): Send the last
-
w+1
headers from the current tip
-
-
+- BSN-specific BTC state: Each BSN has its own
BSNBTCState
+that tracks the base BTC header and last sent segment
+- No BSN base header: Falls back to sending the last
w+1
BTC headers
+from the tip (where w
is the confirmation depth parameter)
+- BSN base header exists but no headers sent: Send headers from the
+BSN's base header to the current tip
+- Headers previously sent: Send headers from the child of the most recent
+valid header in the last sent segment to the current tip
+- Reorg detection: If no header from the last sent segment is still valid
+(indicating a Bitcoin reorg), fall back to sending from the BSN's base
+header to the current tip
+This per-BSN approach provides better efficiency and reorg handling
+compared to the previous global broadcast strategy.
Broadcasting BTC Staking Events
After broadcasting BTC headers, the EndBlocker
calls
BroadcastBTCStakingConsumerEvents
to propagate BTC staking events to relevant
@@ -429,21 +422,21 @@
Handling Inbound IBC Packets
Inbound IBC Packets
The inbound packet structure is
defined as follows. Currently, the Zone Concierge module handles one type of
-incoming packet: ConsumerSlashingIBCPacket
. This packet type allows BSNs to
+incoming packet: BSNSlashingIBCPacket
. This packet type allows BSNs to
report slashing evidence for finality providers.
// InboundPacket represents packets received by Babylon from other chains
message InboundPacket {
// packet is the actual message carried in the IBC packet
oneof packet {
- ConsumerSlashingIBCPacket consumer_slashing = 1;
+ BSNSlashingIBCPacket bsn_slashing = 1;
}
}
-// ConsumerSlashingIBCPacket defines the slashing information that a Consumer sends to Babylon's ZoneConcierge upon a
-// Consumer slashing event.
-// It includes the FP public key, the Consumer block height at the slashing event, and the double sign evidence.
-message ConsumerSlashingIBCPacket {
- /// evidence is the FP slashing evidence that the Consumer sends to Babylon
+// BSNSlashingIBCPacket defines the slashing information that a BSN sends to Babylon's ZoneConcierge upon a
+// BSN slashing event.
+// It includes the FP public key, the BSN block height at the slashing event, and the double sign evidence.
+message BSNSlashingIBCPacket {
+ /// evidence is the FP slashing evidence that the BSN sends to Babylon
babylon.finality.v1.Evidence evidence = 1;
}
@@ -500,7 +493,7 @@ IBC Communication Protocol
| Packet Direction | Types |
|-----------------|-------|
| Outbound | BTCHeaders
, BTCTimestamp
, BTCStakingConsumerEvent
|
-| Inbound | ConsumerSlashingIBCPacket
|
+| Inbound | BSNSlashingIBCPacket
|
Relaying BTC Headers
Zone Concierge relays BTC headers from Babylon Genesis' BTC light client to BSNs
in two scenarios:
@@ -513,7 +506,8 @@ Relaying BTC Headers
This ensures BSNs can keep their BTC light clients synchronized with Bitcoin's
canonical chain. The headers are sent through IBC packets to all open channels
-between Babylon and the BSNs.
+between Babylon and the BSNs, with enhanced per-consumer tracking for improved
+efficiency and reorg handling.
Relaying BTC Timestamps
Zone Concierge sends BTC timestamps to BSNs when a Babylon epoch becomes
BTC-finalised. The AfterRawCheckpointFinalized
hook is triggered when an
diff --git a/static/remote-docs/guides/overview/phases_of_the_launch/phase-2/registration.html b/static/remote-docs/guides/overview/phases_of_the_launch/phase-2/registration.html
index 25fbe6d3..00109bad 100644
--- a/static/remote-docs/guides/overview/phases_of_the_launch/phase-2/registration.html
+++ b/static/remote-docs/guides/overview/phases_of_the_launch/phase-2/registration.html
@@ -499,7 +499,7 @@
Explanation of Fields
Specifying more than one finality provider constitutes multi-staking,
i.e delegating across multiple BSNs. The system enforces the following constraints:
-- At least one finality provider must be securing the Babylon Genesis chain.
+- Exactly one finality provider must be securing the Babylon Genesis chain.
- At most one finality provider may be selected per consumer BSN.
- The total number of finality providers must not exceed the
max_multi_staked_fps limit
, which can be queried from the registered BSN.