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"
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 +``` + +Restore executing wallet: +``` +babylond keys add --recover +``` + +List all wallets: +``` +babylond keys list +``` + +Delete wallet: +``` +babylond keys delete +``` + +Export key (saves it to `wallet.backup`): +``` +babylond keys export +``` + +Import key (restore from wallet.backup): +``` +babylond keys import wallet.backup +``` + +### Tokens 💰 +Check balance: +``` +babylond q bank balances +``` + +Withdraw all rewards: +``` +babylond tx distribution withdraw-all-rewards --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 +``` + +Withdraw rewards and commission from your validator: +``` +babylond tx distribution withdraw-rewards $(babylond keys show --bech val -a) --from --commission --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +Delegate to your validator: +``` +babylond tx epoching delegate $(babylond keys show --bech val -a) ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +Delegate to another validator: +``` +babylond tx epoching delegate ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +Redelegate stake to another validator: +``` +babylond tx epoching redelegate ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +Unbond from your validator: +``` +babylond tx epoching unbond $(babylond keys show --bech val -a) ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +Unbond from another validator: +``` +babylond tx epoching unbond ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +Transfer funds: +``` +babylond tx bank send ubbn --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +Transfer funds to multiple accounts: +``` +babylond tx bank multi-send ubbn --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +### Governance 🗳️ +View proposals list: +``` +babylond query gov proposals +``` + +View proposal: +``` +babylond query gov proposal +``` + +Vote: +``` +babylond tx gov vote --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +### Validator Operations 👨‍💻 +Create new validator: +``` +# Create a validator.json file with validator details (replace moniker, details, etc. with your data): +echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(babylond comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"}, + \"amount\": \"1000000ubbn\", + \"moniker\": \"test\", + \"identity\": \"\", + \"website\": \"\", + \"security\": \"\", + \"details\": \"I love Babylon ❤️\", + \"commission-rate\": \"0.1\", + \"commission-max-rate\": \"0.2\", + \"commission-max-change-rate\": \"0.01\", + \"min-self-delegation\": \"1\" +}" > validator.json + +# Create a validator using JSON file +babylond tx checkpointing create-validator validator.json --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 +``` + +Edit validator (from `new-moniker`, `identity`, `details`, `commission-rate` flags, use only those you want to edit): +``` +babylond tx epoching edit-validator \ +--commission-rate 0.1 \ +--new-moniker "" \ +--identity "" \ +--details "" \ +--from \ +--chain-id bbn-1 \ +--gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 \ +-y +``` + +Unjail validator: +``` +babylond tx slashing unjail --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y +``` + +Your validator details: +``` +babylond query staking validator $(babylond keys show --bech val -a) +``` + +Another validator details: +``` +babylond query staking validator +``` + +Slashing parameters: +``` +babylond query slashing params +``` + +Signing and jailing info of your validator: +``` +babylond query slashing signing-info $(babylond tendermint show-validator) +``` + +Signing and jailing info of another validator: +``` +babylond query slashing signing-info '' +``` + +Active validators list: +``` +babylond query staking validators +``` + +*Guide provided by [ITRocket team](https://itrocket.net/).* diff --git a/docs/operators/babylon_validators/babylon_validators.mdx b/docs/operators/babylon_validators/babylon_validators.mdx index 51e04a11..ed8d5db9 100644 --- a/docs/operators/babylon_validators/babylon_validators.mdx +++ b/docs/operators/babylon_validators/babylon_validators.mdx @@ -49,18 +49,12 @@ Initialize your validator key with `babylond init` will create the BABY key you need for consensus participation and a BLS key used in checkpointing and timestamping to Bitcoin blockchain. -See [3. Key Management](/operators/babylon_validators/installation_guide/#3-key-management) -for more details. - ### 3. Create a Validator Instead of using `staking` module of Cosmos SDK, Babylon Genesis uses `checkpointing` module for validator registration and management. To create a validator, use `babylond tx checkpointing create-validator` command. -See [4. Create a Validator](/operators/babylon_validators/installation_guide/#4-create-a-validator) -for more details. - ### 4. Verify Your Validator To verify your validator, first get your validator's operator address with @@ -71,38 +65,6 @@ registration request is in the queue. Initially, your status will be `0 - BOND_STATUS_UNBONDED`. When active, your status will change to `3 - BOND_STATUS_BONDED`. -See [5. Verify Your Validator](/operators/babylon_validators/installation_guide/#51-verifying-validator-setup) -for more details and rules. - ## Communication -Join the `#finality-providers` channel in the `- tech-zone -` section of our -[Discord server](https://discord.com/invite/babylonglobal) for all communications. -Testnet announcements will also be made there. - -## CosmWasm Governance Proposals - -The Babylon Genesis chain will initially use permissioned CosmWasm. After public -launch on 10 April 2025, dApp developers are expected to submit governance proposals -for either (a) deploying CosmWasm smart contracts or (b) whitelisting addresses to -deploy such contracts. These proposals can be expedited (24-hour voting) or standard -(72-hour voting). **It is important that all validators with voting power actively -monitor on-chain proposals, review them (**[Governance guidelines](https://docs.babylonlabs.io/guides/governance/))** -, and participate in governance.** - -## Version Information - -- **Babylon Genesis node**: Version [v1.0.1](https://github.com/babylonlabs-io/babylon/releases/tag/v1.0.1)([Releases page](https://github.com/babylonlabs-io/babylon/releases)) - -## Faucets - -There are two ways to get tBABY for Phase 2 Testnet: - -1. [Babylon Labs Discord Faucet](https://discord.com/channels/1266159481218457600/1266159481218457600) -2. [Xangle Faucet](https://babylon-explorer.xangle.io/testnet/faucet) (0.01 tBABY each request) - -## Documentation - -- [Node Setup guide](https://github.com/babylonlabs-io/networks/tree/main/bbn-1/babylon-node) -- [Validator Setup Guide](https://github.com/babylonlabs-io/networks/blob/main/bbn-1/babylon-validators/README.md) -- [Governance guidelines](https://docs.babylonlabs.io/guides/governance/) \ No newline at end of file +Join the `#finality-providers` \ No newline at end of file diff --git a/docs/guides/baby_stakers/_category_.json b/docs/stakers/baby_stakers/_category_.json similarity index 82% rename from docs/guides/baby_stakers/_category_.json rename to docs/stakers/baby_stakers/_category_.json index 04897450..a82447fd 100644 --- a/docs/guides/baby_stakers/_category_.json +++ b/docs/stakers/baby_stakers/_category_.json @@ -1,7 +1,7 @@ { "position": 4.1, "label": "BABY Stakers", - "collapsible": true, + "collapsible": false, "collapsed": true, "className": "baby_stakers_sidebar_header" } \ No newline at end of file diff --git a/docs/guides/baby_stakers/baby_stakers.mdx b/docs/stakers/baby_stakers/baby_stakers.mdx similarity index 93% rename from docs/guides/baby_stakers/baby_stakers.mdx rename to docs/stakers/baby_stakers/baby_stakers.mdx index 7cb41193..10282767 100644 --- a/docs/guides/baby_stakers/baby_stakers.mdx +++ b/docs/stakers/baby_stakers/baby_stakers.mdx @@ -37,7 +37,7 @@ end. 4. **Funds Status**: Important: Your funds remain available in your wallet until the epoch ends. -*More on the staking mechanism can be found [here](/guides/baby_stakers/staking_mechanism).* +*More on the staking mechanism can be found [here](/stakers/baby_stakers/staking_mechanism).* ## Slashing Conditions @@ -58,7 +58,7 @@ delegation decisions. - **Partial Slashing**: Calibrated slashing parameters in percentage help protect delegators from catastrophic loss. -*More on the slashing conditions can be found [here](/guides/baby_stakers/staking_mechanism).* +*More on the slashing conditions can be found [here](/stakers/baby_stakers/staking_mechanism).* ## Fast Unbonding @@ -83,7 +83,7 @@ automatically released and returned to the delegator. - Released tokens become fully liquid and transferable; there are no more restrictions. -*More on fast unbonding process [here](/guides/baby_stakers/staking_mechanism).* +*More on fast unbonding process [here](/stakers/baby_stakers/staking_mechanism).* ## Relationship with Bitcoin Staking diff --git a/docs/guides/baby_stakers/baby_staking_cli.mdx b/docs/stakers/baby_stakers/baby_staking_cli.mdx similarity index 100% rename from docs/guides/baby_stakers/baby_staking_cli.mdx rename to docs/stakers/baby_stakers/baby_staking_cli.mdx diff --git a/docs/guides/baby_stakers/baby_staking_integration.mdx b/docs/stakers/baby_stakers/baby_staking_integration.mdx similarity index 100% rename from docs/guides/baby_stakers/baby_staking_integration.mdx rename to docs/stakers/baby_stakers/baby_staking_integration.mdx diff --git a/docs/guides/baby_stakers/baby_staking_tools.mdx b/docs/stakers/baby_stakers/baby_staking_tools.mdx similarity index 100% rename from docs/guides/baby_stakers/baby_staking_tools.mdx rename to docs/stakers/baby_stakers/baby_staking_tools.mdx diff --git a/docs/guides/baby_stakers/baby_staking_via_mintscan.mdx b/docs/stakers/baby_stakers/baby_staking_via_mintscan.mdx similarity index 100% rename from docs/guides/baby_stakers/baby_staking_via_mintscan.mdx rename to docs/stakers/baby_stakers/baby_staking_via_mintscan.mdx diff --git a/docs/guides/baby_stakers/staking_mechanism.mdx b/docs/stakers/baby_stakers/staking_mechanism.mdx similarity index 96% rename from docs/guides/baby_stakers/staking_mechanism.mdx rename to docs/stakers/baby_stakers/staking_mechanism.mdx index a59642e3..243fa0c4 100644 --- a/docs/guides/baby_stakers/staking_mechanism.mdx +++ b/docs/stakers/baby_stakers/staking_mechanism.mdx @@ -89,9 +89,7 @@ system will conduct the following actions: To monitor pending staking transactions that will be processed at epoch end: -- Use [Babylon Genesis Explorers](/developers/babylon_genesis_chain/#chain-explorer) that support epochised staking, or - -- Use [Babylon Node](/operators/babylon_node/installation_guide/) or [RPC Endpoints](/developers/babylon_genesis_chain/#node-information) to query the `LastEpochMsgs` endpoint in the +- Use [Babylon Node](/operators/babylon_node/installation_guide/) or RPC Endpoints to query the `LastEpochMsgs` endpoint in the `x/epoching` module. - Check with compatible wallet interfaces. diff --git a/docs/guides/btc_stakers/_category_.json b/docs/stakers/btc_stakers/_category_.json similarity index 81% rename from docs/guides/btc_stakers/_category_.json rename to docs/stakers/btc_stakers/_category_.json index 4694d039..f74b3056 100644 --- a/docs/guides/btc_stakers/_category_.json +++ b/docs/stakers/btc_stakers/_category_.json @@ -1,7 +1,7 @@ { "position": 4, "label": "BTC Stakers", - "collapsible": true, + "collapsible": false, "collapsed": true, "className": "btc_stakers_sidebar_header" } \ No newline at end of file diff --git a/docs/guides/btc_stakers/btc_stakers.mdx b/docs/stakers/btc_stakers/btc_stakers.mdx similarity index 100% rename from docs/guides/btc_stakers/btc_stakers.mdx rename to docs/stakers/btc_stakers/btc_stakers.mdx diff --git a/docs/guides/btc_stakers/btc_staking_tools.mdx b/docs/stakers/btc_stakers/btc_staking_tools.mdx similarity index 100% rename from docs/guides/btc_stakers/btc_staking_tools.mdx rename to docs/stakers/btc_stakers/btc_staking_tools.mdx diff --git a/docs/guides/btc_stakers/campaigns/_category_.json b/docs/stakers/btc_stakers/campaigns/_category_.json similarity index 100% rename from docs/guides/btc_stakers/campaigns/_category_.json rename to docs/stakers/btc_stakers/campaigns/_category_.json diff --git a/docs/guides/btc_stakers/campaigns/pioneer_nfts.mdx b/docs/stakers/btc_stakers/campaigns/pioneer_nfts.mdx similarity index 100% rename from docs/guides/btc_stakers/campaigns/pioneer_nfts.mdx rename to docs/stakers/btc_stakers/campaigns/pioneer_nfts.mdx diff --git a/docs/guides/btc_stakers/liquid_staking/_category_.json b/docs/stakers/btc_stakers/liquid_staking/_category_.json similarity index 100% rename from docs/guides/btc_stakers/liquid_staking/_category_.json rename to docs/stakers/btc_stakers/liquid_staking/_category_.json diff --git a/docs/guides/btc_stakers/liquid_staking/liquid_staking_tokens.mdx b/docs/stakers/btc_stakers/liquid_staking/liquid_staking_tokens.mdx similarity index 95% rename from docs/guides/btc_stakers/liquid_staking/liquid_staking_tokens.mdx rename to docs/stakers/btc_stakers/liquid_staking/liquid_staking_tokens.mdx index 37494b4c..b5e0f4ec 100644 --- a/docs/guides/btc_stakers/liquid_staking/liquid_staking_tokens.mdx +++ b/docs/stakers/btc_stakers/liquid_staking/liquid_staking_tokens.mdx @@ -21,4 +21,4 @@ However, it's important to understand that when using liquid staking protocols: - The protocol manages the holder's stake and receives the points/rewards - The holder is trusting the liquid staking protocol with their Bitcoin -See a list of liquid staking tokens (LSTs) protocols at [BTC Staking Tools](/guides/btc_stakers/btc_staking_tools) page. +See a list of liquid staking tokens (LSTs) protocols at [BTC Staking Tools](/stakers/btc_stakers/btc_staking_tools) page. diff --git a/docs/guides/btc_stakers/native_staking/_category_.json b/docs/stakers/btc_stakers/native_staking/_category_.json similarity index 100% rename from docs/guides/btc_stakers/native_staking/_category_.json rename to docs/stakers/btc_stakers/native_staking/_category_.json diff --git a/docs/guides/btc_stakers/native_staking/custody_support.mdx b/docs/stakers/btc_stakers/native_staking/custody_support.mdx similarity index 100% rename from docs/guides/btc_stakers/native_staking/custody_support.mdx rename to docs/stakers/btc_stakers/native_staking/custody_support.mdx diff --git a/docs/guides/btc_stakers/native_staking/geo_blocking.mdx b/docs/stakers/btc_stakers/native_staking/geo_blocking.mdx similarity index 100% rename from docs/guides/btc_stakers/native_staking/geo_blocking.mdx rename to docs/stakers/btc_stakers/native_staking/geo_blocking.mdx diff --git a/docs/guides/btc_stakers/native_staking/staking_via_cli.mdx b/docs/stakers/btc_stakers/native_staking/staking_via_cli.mdx similarity index 100% rename from docs/guides/btc_stakers/native_staking/staking_via_cli.mdx rename to docs/stakers/btc_stakers/native_staking/staking_via_cli.mdx diff --git a/docs/guides/btc_stakers/native_staking/unbonding_via_cli.mdx b/docs/stakers/btc_stakers/native_staking/unbonding_via_cli.mdx similarity index 91% rename from docs/guides/btc_stakers/native_staking/unbonding_via_cli.mdx rename to docs/stakers/btc_stakers/native_staking/unbonding_via_cli.mdx index 65836853..36d48847 100644 --- a/docs/guides/btc_stakers/native_staking/unbonding_via_cli.mdx +++ b/docs/stakers/btc_stakers/native_staking/unbonding_via_cli.mdx @@ -87,33 +87,33 @@ Prepare a ```parameters.json``` file containing global parameters. This file mus - File Structure: The file should contain a Versions field, whose value is an array. Each element in the array corresponds to the global parameters of a version, with the following format: ```json { - "Versions": [ - { - "Version": 3, - "ActivationHeight": 874088, - "StakingCap": 3, - "CapHeight": 875090, - "Tag": "bbn1", - "CovenantPks": ["d45c70d28f169e1f0c7f4a78e2bc73497afe585b70aa897955989068f3350aaa", - "4b15848e495a3a62283daaadb3f458a00859fe48e321f0121ebabbdd6698f9fa", - "23b29f89b45f4af41588dcaf0ca572ada32872a88224f311373917f1b37d08d1", - "d3c79b99ac4d265c2f97ac11e3232c07a598b020cf56c6f055472c893c0967ae", - "8242640732773249312c47ca7bdb50ca79f15f2ecc32b9c83ceebba44fb74df7", - "e36200aaa8dce9453567bba108bdc51f7f1174b97a65e4dc4402fc5de779d41c", - "cbdd028cfe32c1c1f2d84bfec71e19f92df509bba7b8ad31ca6c1a134fe09204", - "f178fcce82f95c524b53b077e6180bd2d779a9057fdff4255a0af95af918cee0", - "de13fc96ea6899acbdc5db3afaa683f62fe35b60ff6eb723dad28a11d2b12f8c"], - "CovenantQuorum": 6, - "UnbondingTime": 1008, - "UnbondingFee": 10000, - "MaxStakingAmount": 500000000000, - "MinStakingAmount": 500000, - "MaxStakingTime": 64000, - "MinStakingTime": 64000, - "ConfirmationDepth": 30 - }, - // Parameters of other versions... - ] + "version": 5, + "covenant_pks": [ + "d45c70d28f169e1f0c7f4a78e2bc73497afe585b70aa897955989068f3350aaa", + "4b15848e495a3a62283daaadb3f458a00859fe48e321f0121ebabbdd6698f9fa", + "23b29f89b45f4af41588dcaf0ca572ada32872a88224f311373917f1b37d08d1", + "d3c79b99ac4d265c2f97ac11e3232c07a598b020cf56c6f055472c893c0967ae", + "8242640732773249312c47ca7bdb50ca79f15f2ecc32b9c83ceebba44fb74df7", + "e36200aaa8dce9453567bba108bdc51f7f1174b97a65e4dc4402fc5de779d41c", + "f178fcce82f95c524b53b077e6180bd2d779a9057fdff4255a0af95af918cee0", + "de13fc96ea6899acbdc5db3afaa683f62fe35b60ff6eb723dad28a11d2b12f8c", + "cbdd028cfe32c1c1f2d84bfec71e19f92df509bba7b8ad31ca6c1a134fe09204" + ], + "covenant_quorum": 6, + "min_staking_value_sat": 500000, + "max_staking_value_sat": 500000000000, + "min_staking_time_blocks": 64000, + "max_staking_time_blocks": 64000, + "slashing_pk_script": "6a07626162796c6f6e", + "min_slashing_tx_fee_sat": 150000, + "slashing_rate": "0.001000000000000000", + "unbonding_time_blocks": 301, + "unbonding_fee_sat": 9600, + "min_commission_rate": "0.030000000000000000", + "max_active_finality_providers": 0, + "delegation_creation_base_gas_fee": 1095000, + "allow_list_expiration_height": 139920, + "btc_activation_height": 905634 } ``` - Parameter Explanation: @@ -433,7 +433,7 @@ You can use the following command to get the list of all staking transactions in stakercli daemon list -staking -transactions ``` ### Minimum Unbonding Time -There is a minimum unbonding time currently set to 1008 BTC blocks. After this period, the unbonding timelock will expire, and the staked funds will be unbonded. You can monitor the progress of the Bitcoin blocks in the `bitcoind` systemd logs using `journalctl -u bitcoind -f` or by comparing the latest block in your node with a BTC explorer like `https://mempool.space/mainnet`. +There is a minimum unbonding time currently set to 301 BTC blocks. After this period, the unbonding timelock will expire, and the staked funds will be unbonded. You can monitor the progress of the Bitcoin blocks in the `bitcoind` systemd logs using `journalctl -u bitcoind -f` or by comparing the latest block in your node with a BTC explorer like [https://mempool.space/mainnet](https://mempool.space/mainnet). ### Troubleshooting diff --git a/docs/guides/btc_stakers/native_staking/unbonding_via_web.mdx b/docs/stakers/btc_stakers/native_staking/unbonding_via_web.mdx similarity index 81% rename from docs/guides/btc_stakers/native_staking/unbonding_via_web.mdx rename to docs/stakers/btc_stakers/native_staking/unbonding_via_web.mdx index b3cba13f..8ae98cca 100644 --- a/docs/guides/btc_stakers/native_staking/unbonding_via_web.mdx +++ b/docs/stakers/btc_stakers/native_staking/unbonding_via_web.mdx @@ -9,7 +9,7 @@ import ThemedImage from '@theme/ThemedImage'; # Unbond via Web ## Step 1: Connect Your Wallet -First, connect your wallet to [Babylon Staking Dashboard](https://btcstaking.babylonlabs.io/). Once your [compatible wallet](/guides/btc_stakers/native_staking/web_staking/#compatible-wallets) is successfully connected, you will be able to view the staking history list. If there are stakes that have not been transitioned yet, they will appear in the **Pending Registration** list. On the other hand, stakes that have already been transitioned to Phase 2 Babylon Genesis will show up in the **Babylon Genesis Stakes** list. +First, connect your wallet to [Babylon Staking Dashboard](https://btcstaking.babylonlabs.io/). Once your [compatible wallet](/stakers/btc_stakers/native_staking/web_staking/#compatible-wallets) is successfully connected, you will be able to view the staking history list. If there are stakes that have not been transitioned yet, they will appear in the **Pending Registration** list. On the other hand, stakes that have already been transitioned to Phase 2 Babylon Genesis will show up in the **Babylon Genesis Stakes** list. ## Step 2: Unbond BTC Stake ### Unbonding Before Transition to Phase 2 Babylon Genesis @@ -26,7 +26,7 @@ If your stake has already been transitioned and is listed in the **Babylon Genes /> ## Step 3: Wait for the Unbonding Period and Withdraw -After you initiate the unbonding process, you need to wait for a specific period to complete the unbonding. Specifically, you must wait for 1,008 Bitcoin blocks (~7 days) to be mined, which typically takes around one week. This waiting period ensures the stability and security of the network. +After you initiate the unbonding process, you need to wait for a specific period to complete the unbonding. Specifically, you must wait for 301 Bitcoin blocks (~2 days) to be mined, which typically takes around one week. This waiting period ensures the stability and security of the network. Once the unbonding period has elapsed, return to the staking history list in your wallet. Locate the unbonded stake. For stakes that have completed the unbonding process, you will see a **Withdraw** button. Click on the **Withdraw** button to transfer the unbonded funds back to your wallet. After clicking **Withdraw**, confirm the transaction in your wallet, and the funds will be on their way to your wallet address. :::note diff --git a/docs/guides/btc_stakers/native_staking/web_staking.mdx b/docs/stakers/btc_stakers/native_staking/web_staking.mdx similarity index 97% rename from docs/guides/btc_stakers/native_staking/web_staking.mdx rename to docs/stakers/btc_stakers/native_staking/web_staking.mdx index d508ed1c..8333fd81 100644 --- a/docs/guides/btc_stakers/native_staking/web_staking.mdx +++ b/docs/stakers/btc_stakers/native_staking/web_staking.mdx @@ -33,7 +33,7 @@ Visit the [Babylon Staking](https://btcstaking.babylonlabs.io/) website. /> #### Step 2: Connect Your Wallet -Connect your [compatible wallet](/guides/btc_stakers/native_staking/web_staking/#compatible-wallets) +Connect your [compatible wallet](/stakers/btc_stakers/native_staking/web_staking/#compatible-wallets) compatible wallet to continue with the staking operation. + + + + +## Two Staking Mechanisms + +### 1. Bitcoin (BTC) Staking + +**BTC staking** enables Bitcoin holders to stake their assets directly on the Bitcoin network in a self-custodial manner without wrapping or bridging. BTC stakers delegate to **Finality Providers** who enhance the security of the Proof-of-Stake chain. + +#### Key Features: +- **Self-custodial**: Maintain direct control of your Bitcoin +- **Native operation**: No wrapped tokens or bridges required +- **Trustless execution**: No reliance on third parties +- **Slashing capability**: Protocol-enforced penalties for malicious behavior +- **Multi-staking**: Delegate across multiple Finality Providers and BSNs + +#### Benefits: +- **Earn BABY rewards**: Receive a portion of the annual inflation allocated to BTC stakers +- **Secure the network**: Contribute to Babylon Genesis chain's security +- **Maintain Bitcoin ownership**: Your BTC remains on the Bitcoin blockchain +- **Fast unbonding**: ~2 days compared to typical 21 days in most PoS chains + +### 2. BABY Token Staking + +**BABY staking** is a native staking mechanism that secures the Babylon Genesis chain. BABY token holders delegate to chain validators to accrue inflationary rewards proportional to their stake. + +#### Key Features: +- **Epoch-based staking**: Delayed execution queue for enhanced security +- **Fast unbonding**: ~2 days via Bitcoin timestamping protocol +- **Governance participation**: Voting power in chain governance +- **Partial slashing**: 5% slashing for double-signing violations + +#### Benefits: +- **Earn rewards**: Receive a portion of the annual inflation allocated to BABY stakers +- **Secure the network**: Contribute to the Babylon Genesis chain's security and decentralization +- **Governance rights**: Participate in shaping the future of the network +- **Fast unbonding**: Significantly reduced unbonding period + + +## How They Work Together + +The dual-staking model creates a robust security framework: + +### Security Model +- **BTC stakers** delegate to Finality Providers who enhance PoS security +- **BABY stakers** delegate to validators who oversee block production and consensus +- Both mechanisms contribute to securing the Babylon Genesis chain + +### Reward Distribution +The annual inflation (8%) is distributed among: +- **BTC stakers**: 4% of annual inflation +- **BABY stakers**: 4% of annual inflation + +### Governance +- **BABY stakers** participate in governance with voting power +- **BTC stakers** do not participate in governance but receive rewards + + +## Risk Considerations + +### BTC Staking Risks +- **Slashing risk**: 0.1% maximum penalty for protocol violations +- **Finality Provider risk**: Choose reliable Finality Providers +- **Market volatility**: BTC price fluctuations affect staking value + +### BABY Staking Risks +- **Slashing risk**: 5% penalty for validator double-signing +- **Validator risk**: Choose reliable validators with good track records +- **Market volatility**: BABY price fluctuations affect staking value + +## Advanced Features + +### Fast Unbonding +Both BTC and BABY staking benefit from Babylon's Bitcoin Timestamping protocol: +- **~2 days unbonding** vs typical 21 days +- **Bitcoin checkpoint verification** ensures security +- **Automatic token release** once confirmations are met + +### Multi-Staking (BTC) +BTC stakers can delegate across multiple Finality Providers and BSNs simultaneously: +- **Diversify risk** across multiple networks +- **Maximize rewards** from multiple sources +- **Maintain security isolation** between networks + +## Next Steps + +- **BTC Stakers**: Explore [BTC staking guides](/stakers/btc_stakers/) +- **BABY Stakers**: Explore [BABY staking guides](/stakers/baby_stakers/) +- **Learn more**: Read about [Babylon Genesis architecture](/guides/architecture/) +- **Get support**: Visit [community channels](https://babylonlabs.io/community) + +This dual-staking model represents the foundation of Babylon's Bitcoin Secured Network, +combining the robustness of Bitcoin with the efficiency of Proof of Stake consensus to +create a secure, decentralized, and rewarding staking ecosystem. + diff --git a/docusaurus.config.js b/docusaurus.config.js index 2d8982be..53b84017 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -186,20 +186,30 @@ const config = { }, items: [ { - label: 'Docs', + label: 'Overview', to: '/guides/overview/', className: 'guides-top-header', }, { - label: 'Operators', - to: '/operators/', - className: 'operators-top-header', + label: 'Stakers', + to: '/stakers/', + className: 'stakers-top-header', }, { label: 'Developers', to: '/developers/', className: 'developers-top-header', }, + { + label: 'Operators', + to: '/operators/', + className: 'operators-top-header', + }, + { + label: 'BSNs', + to: '/bsns/', + className: 'bsns-top-header', + }, { label: 'API', items: [ @@ -217,8 +227,8 @@ const config = { ], }, { - label: 'Participate', - to: 'https://babylonlabs.io/community', + label: 'Support', + to: 'https://discord.com/invite/babylonglobal', }, { href: 'https://discord.com/invite/babylonglobal', diff --git a/sidebars-default.js b/sidebars-default.js index 4f7f0333..f9482437 100644 --- a/sidebars-default.js +++ b/sidebars-default.js @@ -17,8 +17,10 @@ import cometBFTSidebar from './docs/api/comet-bft/sidebar' const sidebars = { // By default, Docusaurus generates a sidebar from the docs folder structure guides: [{ type: 'autogenerated', dirName: 'guides' }], - operators: [{ type: 'autogenerated', dirName: 'operators' }], + stakers: [{ type: 'autogenerated', dirName: 'stakers' }], developers: [{ type: 'autogenerated', dirName: 'developers' }], + operators: [{ type: 'autogenerated', dirName: 'operators' }], + bsns: [{ type: 'autogenerated', dirName: 'bsns' }], stakingApi: [ { type: 'category', diff --git a/src/components/homepage/BlogSection.tsx b/src/components/homepage/BlogSection.tsx index 99b6dc2d..65e4d3a6 100644 --- a/src/components/homepage/BlogSection.tsx +++ b/src/components/homepage/BlogSection.tsx @@ -11,19 +11,19 @@ interface FeaturedBlogPost { const blogPosts: FeaturedBlogPost[] = [ { title: "Bitcoin Staking 101: Part 3 - Babylon's Bitcoin Staking Contract", - image: "/img/blog/05-26-babylon-s-bitcoin-staking-contract/xangle_baby_faucet.png", + image: "/img/blog/05-26-babylon-s-bitcoin-staking-contract/img.png", link: "https://babylonlabs.io/blog/babylon-s-bitcoin-staking-contract", readTime: 14 }, { title: "Bitcoin Staking 101: Part 2 - Technical Preliminaries of Bitcoin Staking", - image: "/img/blog/05-25-technical-preliminaries-of-bitcoin-staking/xangle_baby_faucet.png", + image: "/img/blog/05-25-technical-preliminaries-of-bitcoin-staking/img.png", link: "https://babylonlabs.io/blog/technical-preliminaries-of-bitcoin-staking", readTime: 12 }, { title: "Bitcoin Staking 101: Part 1 - What is Bitcoin Staking?", - image: "/img/blog/05-24-what-is-bitcoin-staking/xangle_baby_faucet.png", + image: "/img/blog/05-24-what-is-bitcoin-staking/img.png", link: "https://babylonlabs.io/blog/what-is-bitcoin-staking", readTime: 5 } diff --git a/src/components/homepage/GuidesAndSamples.tsx b/src/components/homepage/GuidesAndSamples.tsx index 0330e6f1..8afd1b52 100644 --- a/src/components/homepage/GuidesAndSamples.tsx +++ b/src/components/homepage/GuidesAndSamples.tsx @@ -65,14 +65,14 @@ const samples: Sample[] = [ source: 'https://github.com/babylonlabs-io/babylon-integration-deployment/tree/main/deployments/btc-staking-integration-bitcoind', blog: 'https://babylonlabs.io/blog/babylon-bitcoin-security-for-cosmos-and-beyond', - demo: '/developers/bsns', + demo: '/bsns/', }, { title: 'L2 Integrations Guides', platform: 'For OP Stacks chains', - blog: '/developers/bsns/op_stack_chains', + blog: '/bsns/op_stack_chains', source: 'https://babylonlabs.io/blog/forkless-rollups-with-bitcoin-staking', - demo: '/developers/bsns/op_stack_chains', + demo: '/bsns/op_stack_chains', }, { title: 'CosmWasm Contract Deployment Guides', diff --git a/src/components/homepage/HeroSection.tsx b/src/components/homepage/HeroSection.tsx index 417b3a52..4ff7ccb5 100644 --- a/src/components/homepage/HeroSection.tsx +++ b/src/components/homepage/HeroSection.tsx @@ -12,7 +12,7 @@ import { useBaseUrlUtils } from '@docusaurus/useBaseUrl'; const PRODUCTS = [ { title: 'Stake BTC', - link: '/guides/btc_stakers', + link: '/stakers/btc_stakers', icon: WalletCreditCardRegular, lightImage: 'img/landing-page/hero/btc_stakers.png', darkImage: 'img/landing-page/hero/btc_stakers_dark.png', @@ -20,7 +20,7 @@ const PRODUCTS = [ }, { title: 'Stake BABY', - link: '/guides/baby_stakers', + link: '/stakers/baby_stakers', icon: WalletCreditCardRegular, lightImage: 'img/landing-page/hero/btc_stakers.png', darkImage: 'img/landing-page/hero/btc_stakers_dark.png', @@ -44,7 +44,7 @@ const PRODUCTS = [ }, { title: 'Build BSNs', - link: '/developers/bsns', + link: '/bsns', icon: DiversityRegular, lightImage: 'img/landing-page/hero/bsn_developers.png', darkImage: 'img/landing-page/hero/bsn_developers_dark.png', diff --git a/static/img/developers/cosmos/bsn_architecture_cosmos.png b/static/img/developers/cosmos/bsn_architecture_cosmos.png new file mode 100644 index 00000000..2317b56a Binary files /dev/null and b/static/img/developers/cosmos/bsn_architecture_cosmos.png differ diff --git a/static/img/developers/cosmos/bsn_architecture_cosmos_dark.png b/static/img/developers/cosmos/bsn_architecture_cosmos_dark.png new file mode 100644 index 00000000..97b8824a Binary files /dev/null and b/static/img/developers/cosmos/bsn_architecture_cosmos_dark.png differ diff --git a/static/img/developers/op_stack/bsn_architecture_op.png b/static/img/developers/op_stack/bsn_architecture_op.png new file mode 100644 index 00000000..0d0ad996 Binary files /dev/null and b/static/img/developers/op_stack/bsn_architecture_op.png differ diff --git a/static/img/developers/op_stack/bsn_architecture_op_dark.png b/static/img/developers/op_stack/bsn_architecture_op_dark.png new file mode 100644 index 00000000..6f5de73d Binary files /dev/null and b/static/img/developers/op_stack/bsn_architecture_op_dark.png differ diff --git a/static/remote-docs/guides/architecture/babylon_genesis_modules/btc_staking.html b/static/remote-docs/guides/architecture/babylon_genesis_modules/btc_staking.html index 7a3d0390..2537daf2 100644 --- a/static/remote-docs/guides/architecture/babylon_genesis_modules/btc_staking.html +++ b/static/remote-docs/guides/architecture/babylon_genesis_modules/btc_staking.html @@ -757,7 +757,6 @@

MsgSelectiveSlashingEvidence

Upon MsgSelectiveSlashingEvidence, a Babylon node will execute as follows:

    -
  1. Find the BTC delegation with the given staking transaction hash.
  2. Ensure the BTC delegation is active or unbonding.
  3. Ensure the given secret key corresponds to the finality provider's public key.
  4. diff --git a/static/remote-docs/guides/architecture/btc_staking_program/finality_providers.html b/static/remote-docs/guides/architecture/btc_staking_program/finality_providers.html index ca123d52..7985a1e8 100644 --- a/static/remote-docs/guides/architecture/btc_staking_program/finality_providers.html +++ b/static/remote-docs/guides/architecture/btc_staking_program/finality_providers.html @@ -55,7 +55,7 @@

    Finality Provider

    Finality Provider Architecture Diagram

    Finality Provider for Consumer Networks Specification

    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/static/remote-docs/guides/architecture/consumer_zone_programs/babylon_contracts.html b/static/remote-docs/guides/architecture/consumer_zone_programs/babylon_contracts.html index 7ae31a48..2154820e 100644 --- a/static/remote-docs/guides/architecture/consumer_zone_programs/babylon_contracts.html +++ b/static/remote-docs/guides/architecture/consumer_zone_programs/babylon_contracts.html @@ -74,6 +74,9 @@

    Integration tests the contract

    the integration tests.

    cargo run-script integration
     
    +

    E2E tests

    +
    cargo run-script e2e
    +

    Generate the schema

    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 @@

    Table of contents

  5. State

    State

    -

    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.

    Parameters

    The parameter storage maintains the Zone Concierge module's parameters. The Zone Concierge module's parameters are represented as a @@ -117,54 +115,36 @@

    Parameters

    [ (gogoproto.moretags) = "yaml:\"ibc_packet_timeout_seconds\"" ]; } -

    ChainInfo

    -

    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;
    -}
    -
    -

    EpochChainInfo

    -

    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.

    -

    CanonicalChain

    -

    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

  6. Extract the header info and the client state from the message
  7. Determine if the header is on a fork by checking if the client is frozen
  8. Call HandleHeaderWithValidCommit to process the header
  9. -
  10. If the PoS system hosting the header is not known to Babylon Genesis, -initialize ChainInfo storage for the PoS system
  11. -
  12. If the header is on a fork, insert the header to the fork storage and update -ChainInfo
  13. -
  14. If the header is canonical, insert the header to the canonical chain storage -and update ChainInfo
  15. -
  16. Unfreeze the client if it was frozen due to a fork header
  17. +
  18. Check if the BSN is registered through the btcstkconsumer module and is a Cosmos BSN; if not, ignore the header
  19. +
  20. Create an IndexedHeader with the header metadata and Babylon context
  21. +
  22. If the header is not on a fork and is newer than the existing latest header, +update the latest epoch header for the BSN
  23. +
  24. 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:

+
    +
  1. Record all current latest epoch headers as finalized headers for the completed epoch
  2. +
  3. Clear the latest epoch headers to prepare for the next epoch
  4. +

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:

    -
  1. Record epoch chain info with inclusion proofs for each BSN
  2. +
  3. Generate inclusion proofs for all finalized headers in the sealed epoch
  4. 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

  1. 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)

  2. 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.