diff --git a/.gitignore b/.gitignore index 03cf22d0..07922dac 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,6 @@ dist .pnp.* .idea + +# ignore temporary files +tmp/ \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..ba2861b8 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,313 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +This is the official Babylon Labs documentation site built with Docusaurus 3.7. The site provides comprehensive documentation for Babylon Labs' Bitcoin staking protocol, including guides for stakers, developers, operators, and Bitcoin Secured Networks (BSNs). + +**Site Launched**: March 21, 2025 + +### Purpose and Goals + +This documentation site serves as a single source of truth for: +- Protocol overview and core concepts (Bitcoin staking, BSNs, Finality Providers) +- Reliable product information and use cases +- Standardized installation, setup, deployment and maintenance procedures +- Accurate technical specifications, integration guides and chain information +- User-focused guides for stakers, operators, and developers + +The site aims to: +- Improve user experience and reduce educational efforts by staff +- Communicate project planning and roadmap +- Make staking, running nodes, and building on Babylon chain faster +- Uplift Babylon's technical branding in the industry + +## Tech Stack + +- **Framework**: Docusaurus 3.7 (React-based static site generator) +- **Language**: TypeScript/JavaScript with React 18 +- **Styling**: Tailwind CSS + Custom CSS +- **Content**: MDX (Markdown with JSX) +- **API Docs**: OpenAPI (via `docusaurus-plugin-openapi-docs`) +- **Build Tool**: SWC (Speedy Web Compiler) + +## Development Commands + +### Start Development Server +```bash +npm run dev +# or +npm start +``` +Server runs at `http://localhost:3000` + +### Build Production Site +```bash +npm run build +``` +**IMPORTANT**: The build process: +1. Runs `npm run fetch` to fetch remote documentation +2. Builds the static site +3. **Throws errors on broken links** (`onBrokenLinks: 'throw'` in config) +4. Always run before committing to catch broken links - deployments will fail if broken links exist + +### Linting and Formatting +```bash +npm run lint # Check for lint errors +npm run lint:fix # Auto-fix lint errors +npm run format # Format all source and docs +npm run format:docs # Format only docs +npm run typecheck # Run TypeScript type checking +npm run spell-check # Check spelling in docs +``` + +### Other Commands +```bash +npm run serve # Preview production build locally +npm run clear # Clear Docusaurus cache +npm run fetch # Manually fetch remote docs (runs automatically on build) +npm run genmd # Generate OpenAPI markdown docs +``` + +## Repository Structure + +``` +docs/ # Main documentation content (MDX files) +├── guides/ # Overview, architecture, networks, governance +├── stakers/ # BTC stakers and BABY stakers docs +├── developers/ # Developer guides and integration docs +├── operators/ # Node operators, validators, finality providers +├── bsns/ # Bitcoin Secured Networks documentation +└── api/ # Auto-generated API docs (from OpenAPI specs) + +src/ +├── components/ # React components +│ ├── RemoteMD.jsx # Component for fetching/rendering remote GitHub markdown +│ ├── ApiVersionSelector.tsx +│ └── homepage/ # Homepage components +├── theme/ # Docusaurus theme customizations +├── css/ # Custom CSS and Tailwind +└── pages/ # Custom pages (non-doc content) + +static/ +├── swagger/ # OpenAPI spec files (YAML) +├── remote-docs/ # Fetched remote documentation (generated) +├── logo/ # Site logos +└── img/ # Images + +plugins/ +├── fetch-remote-docs.cjs # Fetches docs from GitHub repos +└── tailwind-plugin.cjs # Tailwind CSS integration + +docusaurus.config.js # Main Docusaurus configuration +sidebars-default.js # Sidebar navigation structure +``` + +## Key Architecture Concepts + +### Remote Documentation System + +This site uses a custom system to fetch and display documentation from external GitHub repositories: + +1. **RemoteMD Component** (`src/components/RemoteMD.jsx`): + - React component that fetches markdown from GitHub raw URLs + - Supports multi-version documentation with release tag selector + - Handles relative links and images + - Auto-generates heading IDs for anchor links + +2. **Build-time Fetching** (`plugins/fetch-remote-docs.cjs`): + - Scans all MDX files for `` components + - Downloads remote markdown files during build + - Converts to HTML and stores in `static/remote-docs/` + - Generates sitemap for remote docs + - **Runs automatically during `npm run build`** + +3. **Usage in MDX files**: + ```jsx + + ``` + +### Sidebar Configuration + +- **Auto-generated sidebars**: Most sections use `{ type: 'autogenerated', dirName: 'section-name' }` in `sidebars-default.js` +- **API sidebars**: Auto-generated from OpenAPI specs and imported +- Sidebars support auto-collapsing categories and are hideable + +### OpenAPI Integration + +Three API documentation sources are configured in `docusaurus.config.js`: +1. **Staking API**: `static/swagger/babylon-staking-api-openapi3.yaml` +2. **Babylon gRPC**: `static/swagger/babylon-grpc-openapi3.yaml` +3. **CometBFT**: `static/swagger/comet-bft-rpc-openapi3.yaml` + +Generated docs appear in `docs/api/` directories. + +### Environment Variables + +Required variables (see `.env-example`): +- `ALGOLIA_APP_ID`: Algolia search app ID +- `ALGOLIA_API_KEY_READONLY`: Algolia read-only API key +- `TRACKING_ID`: Google Analytics tracking ID (optional) +- `BRANCH_NAME`: Determines which Algolia index to use (main vs dev) + +### Webpack Configuration + +- Uses SWC loader instead of Babel for faster builds +- Custom polyfills for Node.js modules (path, buffer, stream, url) for browser compatibility + +## Git Workflow and Branching Strategy + +This project uses **GitFlow with staging** (different from most Babylon repos which use trunk-based flow). + +### Branch Structure + +- **`main`** - Production branch (deploys to https://docs.babylonlabs.io) +- **`dev`** - Development/testing branch (deploys to https://docs-dev.babylonlabs.io) + +### Normal Development Flow + +1. Create feature branch from `dev` with format: `your-name/description` +2. Make changes and test locally with `npm run dev` +3. **Run `npm run build`** to check for broken links - this is critical +4. Submit PR to `dev` branch with clear title and description +5. Test thoroughly on dev environment (https://docs-dev.babylonlabs.io) +6. When ready for production, merge `dev` → `main` +7. Deployment will fail if broken links exist + +### Emergency Deployment Flow + +For urgent production fixes: +1. Create feature branch from `main` directly +2. Submit PR to `main` +3. After merge, sync changes back: merge `main` → `dev` to keep environments aligned + +## Content Guidelines + +- Documentation uses MDX format (Markdown + JSX) +- Supports Mermaid diagrams (enabled in config) +- Supports live code blocks via `@docusaurus/theme-live-codeblock` +- Code syntax highlighting for: JavaScript, TypeScript, Rust, Swift, Objective-C, JSON, Bash + +## CI/CD and Deployment Architecture + +### Deployment Pipeline + +The deployment system uses a separate GitHub Actions repository and AWS S3 for hosting: + +``` +┌─────────────────┐ +│ This Repo │ +│ (babylonlabs. │ +│ github.io) │ +└────────┬────────┘ + │ Push to branch + ▼ +┌─────────────────────────────────────┐ +│ GitHub Actions (separate repo) │ +│ babylonlabs.github.io-actions │ +├─────────────────────────────────────┤ +│ • Triggers on push to main/dev │ +│ • Runs npm run build │ +│ • Uploads artifacts to S3 │ +└────────┬───────────────────┬────────┘ + │ │ + │ dev branch │ main branch + ▼ ▼ +┌──────────────────┐ ┌──────────────────┐ +│ S3 Bucket │ │ S3 Bucket │ +│ babylon-dev- │ │ babylon-prod- │ +│ docs-website │ │ docs-website │ +└────────┬─────────┘ └────────┬─────────┘ + │ │ + ▼ ▼ + docs-dev. docs.babylonlabs.io + babylonlabs.io (via CloudFlare DNS) +``` + +### S3 Buckets + +**Build Artifacts Storage**: +- `devnet-build-artifacts` - Dev build artifacts +- `mainnet-build-artifacts` - Production build artifacts + +**Website Hosting**: +- `babylon-dev-docs-website` - Dev site (https://docs-dev.babylonlabs.io) +- `babylon-prod-docs-website` - Production site (https://docs.babylonlabs.io) + +### Deployment Repositories + +- **Source Code**: `babylonlabs-io/babylonlabs.github.io` (this repo) +- **CI/CD Workflows**: `babylonlabs-io/babylonlabs.github.io-actions` (restricted access) + +### DNS Configuration + +DNS records managed via CloudFlare and Terraform: +- Located in: `mainnet-k8s/terraform/docs-website` +- Production domain: `docs.babylonlabs.io` +- Dev domain: `docs-dev.babylonlabs.io` + +### Manual Deployment Procedure (Production Transition) + +When transitioning to a new production release: + +1. Ensure release version is ready on `main` branch +2. Verify GitHub Actions has built artifacts and pushed to S3 +3. Trigger deployment: https://github.com/babylonlabs-io/babylonlabs.github.io-actions/actions/workflows/deploy-main.yml +4. Verify content exists in target S3 bucket (`babylon-prod-docs-website`) +5. Run Terraform to import DNS record (in `mainnet-k8s/terraform/docs-website`): + ```bash + terraform import docs.babylonlabs.io + ``` +6. Run Terraform apply to update DNS record: + ```bash + terraform apply + ``` +7. Verify new website is live at https://docs.babylonlabs.io + +### Key Points + +- Build errors or broken links will prevent deployment +- Dev environment auto-deploys when PRs merge to `dev` +- Production deploys when changes merge to `main` +- DNS changes require Terraform operations + +## Documentation Structure Overview + +The site is organized into distinct sections for different audiences: + +- **Overview** - Protocol core concepts (staking, BSNs, Finality Providers) +- **Architecture** - Technical overview with infographics explaining Babylon's architecture +- **Phases of Launch** - Explains different project phases (Phase 1, 2, 3) +- **Stakers** - User guides for staking, building LSTs, wallet integrations +- **Operators** - Guides for Finality Providers, nodes, Vigilantes +- **Developers** - BSN development guides and smart contract development +- **Specifications** - Bitcoin script, transactions, APIs, CLIs +- **Research** - Bitcoin staking and timestamping research papers +- **Security** - Audit reports and bug bounty program +- **Support** - Discord community links and FAQ + +## Project Team + +- **Project Lead**: Jenks Guo +- **Developers**: Kevin Liu, Daria Agadzhanova +- **Content Writers**: Jenks Guo, Daria Agadzhanova +- **Designer**: Lex +- **Stakeholders**: Xinshu Dong, Vitalis Salis, Fisher Yu + +## Important Notes + +- **Broken Links**: The build process throws errors on broken links. Always run `npm run build` locally before pushing. +- **Node Version**: Requires Node.js >= 18.0 +- **Remote Docs**: Changes to `` components require a full rebuild to refetch content +- **Trailing Slashes**: Site uses trailing slashes (`trailingSlash: true`) +- **Base Path**: Docs are served from root path (`routeBasePath: '/'`) +- **Different Workflow**: This repo uses GitFlow (main/dev branches), unlike most Babylon repos which use trunk-based flow diff --git a/docs/bsns/bsns.mdx b/docs/bsns/bsns.mdx index 112ca77a..c3578ee3 100644 --- a/docs/bsns/bsns.mdx +++ b/docs/bsns/bsns.mdx @@ -3,55 +3,208 @@ title: Bitcoin Supercharged Networks sidebar_class_name: bitcoin_self_custodial_staking_sidebar sidebar_label: Bitcoin Supercharged Networks sidebar_position: 1 +keywords: + - Bitcoin Supercharged Networks integration + - Shared security for consumer chains + - Finality provider marketplace + - CosmWasm contracts for BSN + - IBC channel setup for BSN + - Reorg resilience with Bitcoin + - Checkpoint verification for BSN + - Zone concierge metadata --- import Link from '@docusaurus/Link'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import ThemedImage from '@theme/ThemedImage'; -# Building Bitcoin Supercharged Networks +# What is a BSN? -Bitcoin Supercharged Networks (BSNs) are a type of blockchain that uses Bitcoin as the -underlying security layer or additional security layer. +Bitcoin Supercharged Networks (BSNs) are blockchain networks that leverage +Bitcoin's security and liquidity through Babylon's native Bitcoin staking +protocol. In addition to traditional Proof-of-Stake security mechanisms, +BSNs ensure its blocks are final and unchangeable using Bitcoin as stake. +BSNs utilize multi-staking architecture that enables secure Bitcoin staking +across multiple networks simultaneously. The technical foundation centers on +three key aspects: -## Cosmos Chains +**Extractable One-Time Signatures (EOTS)** form the cryptographic backbone +of BSNs. Built on Bitcoin's native Schnorr signature algorithm, EOTS +enables slashing through cryptographic key extraction. When finality +providers generate EOTS key pairs for each block height, any double-signing +at the same height exposes their private key, enabling automatic slashing +enforcement without requiring social consensus. -Cosmos chains can integrate with Babylon to get security from BTC stake. This is made more -important for new Cosmos chains with less staking TVL. In addition, the staked BTC -achieves *slashable safety*, a strong security property that the equivocations by -BTC-backed Finality Providers are held accountable, even -when equivocating Finality Providers constitute a majority. +**Bitcoin Staking Contracts** operate directly on Bitcoin's blockchain +using native UTXO scripting. These contracts have two spending conditions: +a timelock condition allowing stakers to withdraw after a specified +period, and a slashing condition that enables a covenant committee to +burn staked Bitcoin if protocol violations are detected. This design +maintains self-custody while ensuring cryptographic security guarantees. - - Cosmos Chain Integration Guide +**Babylon Genesis** serves as the control plane and first BSN +implementation, orchestrating security and liquidity across the entire +ecosystem. Built on Cosmos SDK with CosmWasm support, it provides the +coordination layer for Bitcoin staking rewards distribution and +cross-chain communication via IBC (Inter-Blockchain Communication) +protocol. + + + +## BSN Integration Explained + +BSNs emerge from Babylon Labs' three-phase development strategy. Phase 1 +established native Bitcoin staking on Bitcoin mainnet. Phase 2 launched +Babylon Genesis as the first BSN and control plane, implementing a dual +security model combining Bitcoin staking with BABY token validation. +Phase 3 enables the broader ecosystem expansion where L1s and L2s +integrate the Babylon Bitcoin staking protocol. + +The integration framework supports multiple blockchain architectures +including Cosmos SDK chains through native IBC protocol support, OP Stack +compatibility for Optimistic rollups, Arbitrum Stack integration for +Layer 2 solutions. + +BSNs gain access to Bitcoin's security through finality providers - +delegated validators that sign blocks using EOTS signatures. When more +than 2/3 of the Bitcoin stake signs a block, it achieves finality with +Bitcoin-level security guarantees. This process happens independently of +the base consensus mechanism, making BSNs compatible with any existing +Proof-of-Stake implementation. + +## Key Benefits of BSN Architecture + +BSNs offer developers several compelling advantages over traditional +blockchain networks: + +- **Bitcoin-level security** provides unprecedented protection backed by + 15+ years of proven network security and the world's largest + cryptocurrency market capitalization +- **Fast finality** combines Proof-of-Stake efficiency with Bitcoin + security, enabling quick transaction confirmation while maintaining + robust security guarantees +- **Trustless operation** eliminates the need for wrapped tokens, + bridges, or custodial solutions +- **Capital efficiency** allows a single Bitcoin stake to secure + multiple networks simultaneously +- **Modular integration** enables BSNs to work with any Proof-of-Stake + consensus mechanism without requiring changes to existing blockchain + architectures +- **Liquid staking tokens (LSTs)** provide liquidity while maintaining + staking benefits, enabling DeFi participation and yield optimization + strategies + +## Differences from Traditional Blockchains + +Traditional blockchain networks face the cold-start problem where new +networks struggle to attract sufficient validators and stake to ensure +security. BSNs solve this by providing immediate access to Bitcoin's +established security model. + +### Security Model +While traditional networks depend on their native token's value and +validator set size, BSNs inherit Bitcoin's proven security backed by the +world's most secure blockchain. This provides stronger guarantees against +attacks and reduces the risk of security failures during network growth +phases. + +### Liquidity Access +Traditional networks are limited to their native token holders and +ecosystem participants, while BSNs can tap into Bitcoin's massive +liquidity pool. This enables deeper markets, more stable economics, and +broader participation from Bitcoin holders who previously couldn't +participate in staking. + +### Decentralization +BSNs benefit from Bitcoin's globally distributed mining network and +established validator ecosystem. Rather than building validator networks +from scratch, BSNs leverage Bitcoin's existing decentralization, +providing stronger censorship resistance and geographic distribution. + +## Unique Features + +- **Better economic security**: Native BTC staked to protect the rollup + and improve its economic security, especially important for new + OP-stack chains with fewer adoption. The staked BTC achieves slashable + safety, where equivocations by L2 sequencers are held accountable and + the BTC stake is slashable, even when equivocating L2 sequencers + constitute a majority. + +- **Fast finality**: Improved economic security benefits OP stack + chains for fast finality. If users trust votes backed by BTC stake, + they can confirm transactions without waiting for the lengthy + challenging period in optimistic rollups. + +- **Reorg resilience of L2 transactions**: Once a transaction is + included in an L2 block signed by the majority of BTC-backed + Finality Providers, the sequencer cannot publish a different L2 block + at the same height on L1. + +## Bitcoin Staking Security Model for BSNs + +The security model combines Bitcoin's proven Proof-of-Work foundation +with efficient Proof-of-Stake consensus: + +- **Slashing mechanisms** ensure that any safety violations by finality + providers result in automatic penalties through the EOTS signature + system +- **Timestamping security** anchors BSN events to Bitcoin's blockchain, + providing immutable checkpoints that prevent long-range attacks +- **Economic security** scales with Bitcoin's market capitalization, + providing substantial economic barriers to attacks +- **Isolation boundaries** prevent security issues in one BSN from + affecting others +- **Chain-specific parameters** allow customization of slashing + conditions and security requirements + +## BSN Integration Support + +Babylon provides everything a BSN needs to integrate quickly, from +ready-made modules to hands-on development and business support. + +### Developer Tools +- **Babylon SDK** – Reference Cosmos SDK modules for BSN integration +- **babylond CLI** – Command-line tools for node operations and + network interaction +- **EOTS Manager** – Secure cryptographic key management +- **Finality Provider Daemon (fpd)** – Validator operations and block + signing +- **Testing & Deployment** – Edge Devnet, Bitcoin Signet testnet, + token faucets, and Docker-based local environments + +### Reference Implementation +- **Existing Standards** – Integration follows established Cosmos SDK, + CosmWasm, and Bitcoin staking standards +- **Ready-to-Use Contracts** – Deploy `babylon_contract.wasm`, + `btc_staking.wasm`, and `btc_finality.wasm` +- **Bridge Module** – `x/babylon` connects Cosmos SDK and CosmWasm + contracts +- **IBC Support** – Preconfigured for Babylon network communication + +With these tools and reference modules, BSNs avoid building from scratch +and can focus on network features instead of foundational infrastructure. + +### Development & BD Support +Our team provides: +- Technical guidance for integration and testing +- Business development support to connect BSNs with partners, stakers, + and ecosystem programs + +Contact our BD team to discuss BSN integration. + +## Integration Guides + + + Cosmos Chain Integration Guide -## OP-stack Chains - -OP-stack chains can integrate with the Babylon BTC staking protocol to get Bitcoin -security. - -This has a few benefits: - -- **Better economic security:** There is native BTC staked to protect the rollup and -improve its economic security. This is made more important for new OP-stack chains with -fewer adoption. In addition, the staked BTC achieves *slashable safety*, a strong -security property that equivocations by L2 sequencers are held accountable and the BTC -stake is slashable, even when equivocating L2 sequencers constitute a majority. -- **Fast finality:** The improved economic security will benefit the OP stack chains for -fast finality. If the user is willing to trust the votes backed by the BTC stake, then -the user can confirm transactions and make decisions without waiting for the lengthy -challenging period in optimistic rollups. -- **Reorg resilience of L2 transactions:** Once a transaction is included in an L2 block -signed by the majority of BTC-backed Finality Providers, the sequencer cannot publish a -different L2 block at the same height on L1. - -The [Forkless Rollups with Bitcoin staking](https://babylonchain.io/blog/forkless-rollups-with-bitcoin-staking) -blog post provides more details. - - - OP-stack L2 Chain Integration Guide + + OP-stack L2 Chain Integration Guide diff --git a/docs/developers/babylon_genesis_chain/chain_information.mdx b/docs/developers/babylon_genesis_chain/chain_information.mdx index 7539f011..40d87a9e 100644 --- a/docs/developers/babylon_genesis_chain/chain_information.mdx +++ b/docs/developers/babylon_genesis_chain/chain_information.mdx @@ -28,15 +28,15 @@ import TabItem from '@theme/TabItem'; | Property | Value | |----------|-------| -| Chain ID | `bbn-test-5` | +| Chain ID | `bbn-test-6` | | Chain Name | `Babylon Testnet` | | Binary Name | `babylond` | -| Version | `v0.5.0` | -| Genesis Date | `2025-01-09` | -| Genesis File | [Babylon Github](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-5/network-artifacts/genesis.json) [NodeStake](https://ss.babylon.nodestake.org/genesis.json)| -| State Snapshot | [Babylon Github](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-5/network-artifacts/bbn-test-5.tar.gz) [NodeStake](https://nodestake.org/babylon) | -| Seed Nodes | [Babylon Github](https://github.com/babylonlabs-io/networks/tree/main/bbn-test-5/network-artifacts/seeds.txt) | -| Peers | [Babylon Github](https://github.com/babylonlabs-io/networks/tree/main/bbn-test-5/network-artifacts/peers.txt) | +| Version | `v2.3.1` | +| Genesis Date | `2025-10-12` | +| Genesis File | [Babylon Github](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-6/network-artifacts/genesis.json) [NodeStake](https://ss.babylon.nodestake.org/genesis.json)| +| State Snapshot | [Babylon Github](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-6/network-artifacts/bbn-test-6.tar.gz) [NodeStake](https://nodestake.org/babylon) | +| Seed Nodes | [Babylon Github](https://github.com/babylonlabs-io/networks/tree/main/bbn-test-6/network-artifacts/seeds.txt) | +| Peers | [Babylon Github](https://github.com/babylonlabs-io/networks/tree/main/bbn-test-6/network-artifacts/peers.txt) | ### Babylon Genesis Devnet diff --git a/docs/developers/babylon_genesis_chain/explorers/explorers.mdx b/docs/developers/babylon_genesis_chain/explorers/explorers.mdx index e5fd45c7..e54bbcbe 100644 --- a/docs/developers/babylon_genesis_chain/explorers/explorers.mdx +++ b/docs/developers/babylon_genesis_chain/explorers/explorers.mdx @@ -21,9 +21,9 @@ 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`). +Block scanners for Phase 2 Babylon Genesis Testnet (`bbn-test-6`). | Service | URL | |---------|-----| diff --git a/docs/developers/babylon_genesis_chain/node_information.mdx b/docs/developers/babylon_genesis_chain/node_information.mdx index 3ef3a2e2..5b12b401 100644 --- a/docs/developers/babylon_genesis_chain/node_information.mdx +++ b/docs/developers/babylon_genesis_chain/node_information.mdx @@ -41,7 +41,7 @@ Endpoints for Phase 2 Babylon Genesis Mainnet (`bbn-1`). ### Babylon Genesis Testnet -Endpoints for Phase 2 Babylon Genesis Testnet (`bbn-test-5`). +Endpoints for Phase 2 Babylon Genesis Testnet (`bbn-test-6`). **Nodes Guru** @@ -60,26 +60,6 @@ Endpoints for Phase 2 Babylon Genesis Testnet (`bbn-test-5`). | LCD | `https://babylon-testnet-api.polkachu.com` | | gRPC | `http://babylon-testnet-grpc.polkachu.com:20690` | -**Imperator** -| Endpoint Type | URL | -|-------------|----------| -| RPC | `https://rpc-babylon-testnet.imperator.co` | -| LCD | `https://lcd-babylon-testnet.imperator.co` | -| gRPC | `grpc-babylon-testnet.imperator.co:443` | - -**ContributionDAO** -| Endpoint Type | URL | -|-------------|----------| -| RPC | `https://babylon-testnet-rpc.contributiondao.com` | -| LCD | `https://babylon-testnet-api.contributiondao.com` | - -**NodeStake** -| Endpoint Type | URL | -|-------------|----------| -| RPC | `https://rpc-t.babylon.nodestake.org` | -| LCD | `https://api-t.babylon.nodestake.org` | -| gRPC | `https://grpc-t.babylon.nodestake.org:443` | - ### Babylon Genesis Devnet Endpoints for Phase 3 Babylon Genesis Devnet (`edge-devnet-1`). diff --git a/docs/developers/dapps/simple_staking_dapp.mdx b/docs/developers/dapps/simple_staking_dapp.mdx index 4b9d05aa..7c5f5845 100644 --- a/docs/developers/dapps/simple_staking_dapp.mdx +++ b/docs/developers/dapps/simple_staking_dapp.mdx @@ -19,7 +19,7 @@ Babylon Labs hosts a version of this dApp for the convenience of users. ## Source Code -The source code of the dApp is open source and can be found [here](https://github.com/babylonlabs-io/simple-staking). +The source code of the dApp is open source and can be found [here](https://github.com/babylonlabs-io/babylon-toolkit/tree/main/services/simple-staking). ## Key Features diff --git a/docs/developers/dapps/smart_contract_deployment.mdx b/docs/developers/dapps/smart_contract_deployment.mdx index 51f0c9dc..93b0efc2 100644 --- a/docs/developers/dapps/smart_contract_deployment.mdx +++ b/docs/developers/dapps/smart_contract_deployment.mdx @@ -72,7 +72,7 @@ Verify the configuration: echo $homeDir, $chainId, $feeToken, $key, $nodeUrl, $apiUrl # Expected output: -/Users//.babylond, bbn-test-5, ubbn, test-key, https://babylon-testnet-rpc.nodes.guru, https://babylon-testnet-api.nodes.guru +/Users//.babylond, bbn-test-6, ubbn, test-key, https://babylon-testnet-rpc.nodes.guru, https://babylon-testnet-api.nodes.guru ``` diff --git a/docs/developers/developers.mdx b/docs/developers/developers.mdx index 651cb405..1236ff63 100644 --- a/docs/developers/developers.mdx +++ b/docs/developers/developers.mdx @@ -1,6 +1,16 @@ --- +title: "Developers" sidebar_label: "Developers" sidebar_position: 0 +keywords: + - Cosmos SDK developer docs + - CosmWasm dApp development + - Babylon RPC and gRPC endpoints + - Wallet integration guide + - Wallet setup Keplr and CLI + - Staking backend architecture + - IBC relayer setup Hermes + - Developer FAQs Babylon --- # Babylon Developers diff --git a/docs/developers/wallet_setup/wallet_setup.mdx b/docs/developers/wallet_setup/wallet_setup.mdx index df11016e..a25984c8 100644 --- a/docs/developers/wallet_setup/wallet_setup.mdx +++ b/docs/developers/wallet_setup/wallet_setup.mdx @@ -69,7 +69,7 @@ babylond keys add my-babylon-key \ - [Xangle Testnet Faucet](https://babylon-explorer.xangle.io/testnet/faucet) ## Testnet Details -- **Chain ID:** `bbn-test-5` +- **Chain ID:** `bbn-test-6` - **Token Symbol:** BABY - **Token Denom:** ubbn - **Network Type:** Cosmos SDK-based diff --git a/docs/guides/governance/submit_proposals/submit_via_cli.mdx b/docs/guides/governance/submit_proposals/submit_via_cli.mdx index 8457b277..09a54ece 100644 --- a/docs/guides/governance/submit_proposals/submit_via_cli.mdx +++ b/docs/guides/governance/submit_proposals/submit_via_cli.mdx @@ -7,7 +7,7 @@ sidebar_position: 2 # Submit Proposals via CLI -[Babylond](https://github.com/babylonlabs-io/babylon) (install instructions [here](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-5/babylon-node/README.md)) provides various commands that assist you to draft and submit your on-chain proposal. This guide will walk through step by step how to create a proposal. +[Babylond](https://github.com/babylonlabs-io/babylon) (install instructions [here](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-6/babylon-node/README.md)) provides various commands that assist you to draft and submit your on-chain proposal. This guide will walk through step by step how to create a proposal. ## Step 1: Create a BABY wallet @@ -111,7 +111,7 @@ If everything appears correct, you can submit your proposal using the submit-pro babylond tx gov submit-proposal draft_proposal.json \ --from=your-proposer-baby-key \ --deposit="50000bbn" \ - --chain-id=bbn-test-5 \ + --chain-id=bbn-test-6 \ --gas=auto \ --fees=2000ubbn ``` @@ -124,7 +124,7 @@ draft_proposal.json: The JSON file containing your proposal details, created ear --deposit="50000000000ubbn": The amount you are depositing with the proposal. This must meet or exceed the minimum deposit required to enter the voting period. If specified in your JSON file, this flag may be redundant or could override what's in the file. Default amount is also 500000000000ubbn. ---chain-id=bbn-test-5: Specifies the blockchain network to which you are submitting. +--chain-id=bbn-test-6: Specifies the blockchain network to which you are submitting. --gas=auto: Automatically estimates the gas required for the transaction. The CLI will calculate how much gas your transaction needs, rather than you specifying a fixed amount. diff --git a/docs/guides/networks/phase-2/testnet/testnet.mdx b/docs/guides/networks/phase-2/testnet/testnet.mdx index cc766070..be9d6195 100644 --- a/docs/guides/networks/phase-2/testnet/testnet.mdx +++ b/docs/guides/networks/phase-2/testnet/testnet.mdx @@ -10,7 +10,7 @@ sidebar_position: 1 import RemoteMD from '@site/src/components/RemoteMD'; -export const rawUrl="https://raw.githubusercontent.com/babylonlabs-io/networks/refs/heads/main/bbn-test-5/README.md"; +export const rawUrl="https://raw.githubusercontent.com/babylonlabs-io/networks/refs/heads/main/bbn-test-6/README.md"; Become a Validator diff --git a/docs/guides/overview/overview.mdx b/docs/guides/overview/overview.mdx index 280d0904..dd758bb7 100644 --- a/docs/guides/overview/overview.mdx +++ b/docs/guides/overview/overview.mdx @@ -1,6 +1,16 @@ --- +title: "Guide" sidebar_class_name: guide_sidebar_index sidebar_label: Overview +keywords: + - Babylon protocol overview + - Native Bitcoin staking architecture + - Babylon Genesis features + - Bitcoin light client guide + - Bitcoin checkpointing guide + - Epoching module guide + - Incentive and rewards module + - Governance parameters guide --- # Babylon Bitcoin Staking Protocol Overview diff --git a/docs/guides/overview/phases_of_the_launch/phases_of_the_launch.mdx b/docs/guides/overview/phases_of_the_launch/phases_of_the_launch.mdx index 71011150..b4b41e41 100644 --- a/docs/guides/overview/phases_of_the_launch/phases_of_the_launch.mdx +++ b/docs/guides/overview/phases_of_the_launch/phases_of_the_launch.mdx @@ -9,7 +9,7 @@ import DocCardList from '@theme/DocCardList'; # Phases of The Launch :::info -Babylon is launching Phase 2 with a stable testnet (bbn-test-5) released on Jan 8, 2025. +The current Phase 2 testnet is Testnet 6 (bbn-test-6). ::: Babylon network is launching in three strategic phases. diff --git a/docs/operators/babylon_node/installation_guide.mdx b/docs/operators/babylon_node/installation_guide.mdx index d94ca4e3..b772a094 100644 --- a/docs/operators/babylon_node/installation_guide.mdx +++ b/docs/operators/babylon_node/installation_guide.mdx @@ -7,7 +7,7 @@ sidebar_position: 0 import RemoteMD from '@site/src/components/RemoteMD'; -export const testnetUrl="https://raw.githubusercontent.com/babylonlabs-io/networks/refs/heads/main/bbn-test-5/babylon-node/README.md"; +export const testnetUrl="https://raw.githubusercontent.com/babylonlabs-io/networks/refs/heads/main/bbn-test-6/babylon-node/README.md"; export const rawUrl="https://raw.githubusercontent.com/babylonlabs-io/networks/refs/heads/main/bbn-1/babylon-node/README.md"; +hermes keys add --chain bbn-test-6 --mnemonic-file hermes keys add --chain mocha-4 --mnemonic-file ``` @@ -241,12 +241,12 @@ SUCCESS "configuration is valid" First, verify that the chains do not have existing clients: ```bash -hermes query clients --host-chain mocha-4 --reference-chain bbn-test-5 +hermes query clients --host-chain mocha-4 --reference-chain bbn-test-6 ``` To create a new client, use the [`create-client`](https://hermes.informal.systems/documentation/commands/path-setup/clients.html#create-client) command: ```bash -hermes create client --host-chain mocha-4 --reference-chain bbn-test-5 +hermes create client --host-chain mocha-4 --reference-chain bbn-test-6 ``` You should see output like: @@ -279,7 +279,7 @@ ERROR foreign client error: error raised while creating client for chain mocha-4 Create a second client: ```bash -hermes create client --host-chain bbn-test-5 --reference-chain mocha-4 +hermes create client --host-chain bbn-test-6 --reference-chain mocha-4 ``` ### Create a connection @@ -287,7 +287,7 @@ hermes create client --host-chain bbn-test-5 --reference-chain mocha-4 To create a connection between the two clients run: ```bash -hermes create connection --host-chain mocha-4 --reference-chain bbn-test-5 +hermes create connection --host-chain mocha-4 --reference-chain bbn-test-6 ``` You should see output like: @@ -315,8 +315,8 @@ SUCCESS Connection { b_side: ConnectionSide { chain: BaseChainHandle { chain_id: ChainId { - id: "bbn-test-5", - version: 5, + id: "bbn-test-6", + version: 6, }, runtime_sender: Sender { .. }, }, @@ -369,8 +369,8 @@ SUCCESS Channel { b_side: ChannelSide { chain: BaseChainHandle { chain_id: ChainId { - id: "bbn-test-5", - version: 5, + id: "bbn-test-6", + version: 6, }, runtime_sender: Sender { .. }, }, @@ -403,7 +403,7 @@ policy = "allow" list = [["transfer", "channel-389"]] ``` -For bbn-test-5 add: +For bbn-test-6 add: ```toml [chains.packet_filter] diff --git a/docs/operators/faqs.mdx b/docs/operators/faqs.mdx index 2a2e7196..a1fbbbd9 100644 --- a/docs/operators/faqs.mdx +++ b/docs/operators/faqs.mdx @@ -19,7 +19,7 @@ sidebar_position: 9 #### Q: How can I retrieve the correct genesis file? **A:** You can download the genesis file from -[Babylon Labs' networks repository](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-5/network-artifacts/genesis.json). +[Babylon Labs' networks repository](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-6/network-artifacts/genesis.json). Ensure you're using the correct version of the Babylon binary specified in the documentation. #### Q: What are the hardware requirements for running Babylon nodes and a Finality Provider? @@ -35,7 +35,7 @@ Follow these steps: - Download and install the necessary Babylon binary (`babylond`). Ensure you obtain it from the official and reliable sources provided by the Babylon project. This binary serves as the core tool for interacting with the Babylon network as a validator. 2. **Initialize Your Node** - Run the command `babylond init`. During this process, you'll need to provide a unique moniker for your validator node. This moniker will help identify your node within the network. - For example: ``` language="bash">babylond init "YourUniqueValidatorMoniker" --chain - id ```, where `` corresponds to the specific chain ID of the Babylon network you're participating in (such as `bbn - test - 5` for the testnet). + For example: ``` language="bash">babylond init "YourUniqueValidatorMoniker" --chain - id ```, where `` corresponds to the specific chain ID of the Babylon network you're participating in (such as `bbn-test-6` for the testnet). 3. **Sync Your Node** - **Using Genesis File** - Download the official genesis file from the Babylon project's official repository or the designated location for your network version. Place the `genesis.json` file in the appropriate directory (usually `~/.babylond/config` if you haven't customized the `--home` flag). This file contains the initial state of the network, which your node needs to sync with. @@ -67,7 +67,7 @@ Follow these steps: ``` language="bash">babylond tx checkpointing create - validator [path/to/validator.json] [flags]```. Replace `[path/to/validator.json]` with the actual path to the `validator.json` file you created. The `[flags]` may include options such as `--chain - id` to specify the network chain ID, `--from` to indicate the wallet from which you'll sign the transaction (ensure this wallet has enough tokens to cover staking and transaction fees), `--gas` to set the gas limit for the transaction (you can use `auto` to let the system calculate it), `--gas - adjustment` to adjust the calculated gas amount, and `--fees` to specify the transaction fees you're willing to pay. -For more in - depth and detailed information, including specific parameter values, troubleshooting tips, and security best practices, please refer to the [official setup guide](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-5/babylon-node/README.md). This guide is regularly updated to reflect the latest changes and requirements of the Babylon network, ensuring you have the most accurate and useful information for setting up your validator successfully. +For more in - depth and detailed information, including specific parameter values, troubleshooting tips, and security best practices, please refer to the [official setup guide](https://github.com/babylonlabs-io/networks/blob/main/bbn-test-6/babylon-node/README.md). This guide is regularly updated to reflect the latest changes and requirements of the Babylon network, ensuring you have the most accurate and useful information for setting up your validator successfully. #### Q: What ports should I open for my Babylon node? **A:** diff --git a/docs/operators/finality_providers/finality_provider_simple_guide.mdx b/docs/operators/finality_providers/finality_provider_simple_guide.mdx index a96f3043..7be7b99b 100644 --- a/docs/operators/finality_providers/finality_provider_simple_guide.mdx +++ b/docs/operators/finality_providers/finality_provider_simple_guide.mdx @@ -71,7 +71,7 @@ EOTSManagerAddress = "127.0.0.1:12582" # EOTS service address RPCListener = "127.0.0.1:12581" # FPD service address [babylon] Key = "fp-key-1" # Key name from Step 4 -ChainID = "bbn-test-5" # Testnet chain ID +ChainID = "bbn-test-6" # Testnet chain ID RPCAddr = "https://babylon-testnet-rpc.nodes.guru" # Public RPC node KeyDirectory = "~/.fpd" # Key directory ``` @@ -89,7 +89,7 @@ tail -f ~/.fpd/logs/fpd.log ```bash # Execute registration command (replace parameters) fpd create-finality-provider \ ---chain-id bbn-test-5 \ +--chain-id bbn-test-6 \ --eots-pk \ --commission-rate 0.05 \ --commission-max-rate 0.05 \ @@ -124,7 +124,8 @@ Cause: The account from Step 4 has insufficient test tokens Solution: Obtain more test tokens from the Faucet - Service fails to start -Check logs: `tail -f ~/.eotsd/logs/eotsd.log or tail -f ~/.fpd/logs/fpd.log` +Check logs: `tail -f ~/.eotsd/logs/eotsd.log` or `tail -f ~/.fpd/logs/fpd.log` + Ensure ports are not occupied (default EOTS: 12582, FPD: 12581) ### Next Steps @@ -264,7 +265,7 @@ RPCListener = 0.0.0.0:12581 [babylon] Key = fp-key-1 -ChainID = bbn-test-5 +ChainID = bbn-test-6 RPCAddr = https://babylon-testnet-rpc.nodes.guru KeyringBackend = test ``` @@ -283,7 +284,7 @@ docker-compose logs -f Run the following command to register (replace `` with the `pubkey_hex` recorded in Step 4): ```bash docker exec -it finality-provider fpd create-finality-provider \ - --chain-id bbn-test-5 \ + --chain-id bbn-test-6 \ --eots-pk \ --commission-rate 0.05 \ --commission-max-rate 0.05 \ diff --git a/docs/operators/operators.mdx b/docs/operators/operators.mdx index 18c9b85f..ee471bc8 100644 --- a/docs/operators/operators.mdx +++ b/docs/operators/operators.mdx @@ -1,6 +1,16 @@ --- +title: "Operators" sidebar_label: "Overview" sidebar_position: 0 +keywords: + - Babylon validator setup + - Finality provider setup guide + - babylond CLI commands + - Node monitoring and key management + - Slashing and commission parameters + - Min gas prices and pruning + - Network upgrade procedure + - Snapshot and archive node setup --- # Babylon Operators diff --git a/docs/stakers/baby_stakers/baby_staking_cli.mdx b/docs/stakers/baby_stakers/baby_staking_cli.mdx index 84b7f2eb..0c181316 100644 --- a/docs/stakers/baby_stakers/baby_staking_cli.mdx +++ b/docs/stakers/baby_stakers/baby_staking_cli.mdx @@ -37,14 +37,14 @@ babylond tx epoching delegate [validator-addr] [amount] --from [wallet-name] --c - `[validator-addr]`: The address of the validator node to which you are staking tokens. - `[amount]`: The number of tokens you want to stake, in the unit of `ubbn`. For example, if you want to stake 1 $bbn$, you should enter `1000000ubbn`. - `[wallet-name]`: The name of the wallet used to sign the transaction. -- `[chain-id]`: The chain ID of the Babylon network, such as `bbn-test-5`. +- `[chain-id]`: The chain ID of the Babylon network, such as `bbn-test-6`. - `[node-url]`: The URL of the connected node, such as `https://babylon-testnet-rpc.nodes.guru`. - `[fee-amount]`: The transaction fee, for example, `100ubbn`. ### Example Command -Suppose you want to stake 1 $bbn$ to the validator `bbnvaloper1fa0c7df8v25mv926wey4m9kunhhm7svnp6tezt`, using the wallet `test - staking`, with a chain ID of `bbn-test-5` and a node address of `https://babylon-testnet-rpc.nodes.guru` and a fee of `1000ubbn`. You can use the following command: +Suppose you want to stake 1 $bbn$ to the validator `bbnvaloper1fa0c7df8v25mv926wey4m9kunhhm7svnp6tezt`, using the wallet `test - staking`, with a chain ID of `bbn-test-6` and a node address of `https://babylon-testnet-rpc.nodes.guru` and a fee of `1000ubbn`. You can use the following command: ```bash -babylond tx epoching delegate bbnvaloper1fa0c7df8v25mv926wey4m9kunhhm7svnp6tezt 1000000ubbn --from test-staking --chain-id bbn-test-5 --node https://babylon-testnet-rpc.nodes.guru --gas auto --gas-adjustment 1.2 --fees 1000ubbn -y +babylond tx epoching delegate bbnvaloper1fa0c7df8v25mv926wey4m9kunhhm7svnp6tezt 1000000ubbn --from test-staking --chain-id bbn-test-6 --node https://babylon-testnet-rpc.nodes.guru --gas auto --gas-adjustment 1.2 --fees 1000ubbn -y ``` ## Step 3: Unbond Tokens @@ -57,9 +57,9 @@ babylond tx epoching unbond [validator-addr] [amount] --from [wallet-name] --cha The parameters are the same as those in the staking command. ### Example Command -Suppose you want to unbond 1 $bbn$ from the validator `bbnvaloper1fa0c7df8v25mv926wey4m9kunhhm7svnp6tezt`, using the wallet `test - staking`, with a chain ID of `bbn-test-5` and a node address of `https://babylon-testnet-rpc.nodes.guru` and a fee of `1000ubbn`. You can use the following command: +Suppose you want to unbond 1 $bbn$ from the validator `bbnvaloper1fa0c7df8v25mv926wey4m9kunhhm7svnp6tezt`, using the wallet `test - staking`, with a chain ID of `bbn-test-6` and a node address of `https://babylon-testnet-rpc.nodes.guru` and a fee of `1000ubbn`. You can use the following command: ```bash -babylond tx epoching unbond bbnvaloper1fa0c7df8v25mv926wey4m9kunhhm7svnp6tezt 1000000ubbn --from test-staking --chain-id bbn-test-5 --node https://babylon-testnet-rpc.nodes.guru --gas auto --gas-adjustment 1.2 --fees 1000ubbn -y +babylond tx epoching unbond bbnvaloper1fa0c7df8v25mv926wey4m9kunhhm7svnp6tezt 1000000ubbn --from test-staking --chain-id bbn-test-6 --node https://babylon-testnet-rpc.nodes.guru --gas auto --gas-adjustment 1.2 --fees 1000ubbn -y ``` ## Precautions diff --git a/docs/stakers/stakers.mdx b/docs/stakers/stakers.mdx index 3a79a9e3..afc5ad5c 100644 --- a/docs/stakers/stakers.mdx +++ b/docs/stakers/stakers.mdx @@ -1,6 +1,16 @@ --- +title: "Stakers" sidebar_label: "Stakers" sidebar_position: 0 +keywords: + - Register Bitcoin stake + - Staking eligibility Babylon + - Claim staking rewards + - Unbonding process Bitcoin staking + - Fast unbonding Babylon + - EOTS slashing protection + - How Bitcoin staking works + - Staker FAQs --- import useBaseUrl from '@docusaurus/useBaseUrl'; diff --git a/src/components/RemoteMD.jsx b/src/components/RemoteMD.jsx index 6734e3ca..e32f0130 100644 --- a/src/components/RemoteMD.jsx +++ b/src/components/RemoteMD.jsx @@ -134,7 +134,7 @@ export default function RemoteMD({ if (rawUrl.includes('release/')) { url = rawUrl.replace(/release\/v[\d.]+\w*/, `${release.tag_name}`); } else { - url = rawUrl.replace(/refs\/heads\/[^/]+/, release.tag_name) + url = rawUrl.replace(/refs\/heads\/[^/]+/, release.tag_name); } return { key: release.tag_name, diff --git a/src/components/homepage/ToolsAndInfra.tsx b/src/components/homepage/ToolsAndInfra.tsx index 3d6c14f8..c3efefe5 100644 --- a/src/components/homepage/ToolsAndInfra.tsx +++ b/src/components/homepage/ToolsAndInfra.tsx @@ -105,15 +105,6 @@ export default function ToolsAndInfra() { } ], dexes: [ - { - name: 'Tower', - icon: '/img/landing-page/tools-and-infra/tower.jpg', - tileLink: 'https://app.tower.fi/swap', - socialLinks: { - twitter: 'https://twitter.com/towerprotocol', - website: 'https://app.tower.fi/swap' - } - }, { name: 'Persistence', icon: '/img/landing-page/tools-and-infra/persistence.jpg',