BounceBit Documentation
HomepagePortalBounceClub
  • 🔳Welcome to BounceBit
    • BounceBit's Philosophy
    • Challenges Addressed By BounceBit
    • BounceClub: Build on BounceBit
  • CeDeFi
    • 🏦BounceBit CeFi + DeFi
      • Infrastructure
      • Yield Structure
    • 📊CeDeFi Yield
      • Funding Rate Arbitrage
      • Fixed
      • Auto
      • Manual
      • Integration of Node Staking Rewards
      • Rebasing Mechanism
      • Asset Manager Directory
    • 🌎RWA (Real World Assets)
      • RWA in Yield Generation
      • RWA on BounceBit Chain
    • Subscription & Redemption Rules
      • Auto & Manual
      • Fixed
    • Security Risk Management
    • dApp
      • ⚡Superfast
      • Ethena <> BounceBit
      • Convert
  • Infrastructure
    • ⛓️BounceBit PoS Chain
      • Dual-Token Staking Consensus
      • EVM Compatibility and Developer Support
    • 🔐Shared Security Clients
    • 🌉BTC Bridge
    • 🔮Oracle
      • Price Feed On-chain
      • Price Feed Off-chain
      • Data Feed Addresses
    • 💽Ecosystem Integrations
  • ♣️BounceClub
    • Intro
    • 🫂BounceClub Membership
    • MEME
    • Quanto
    • AI Agents
  • Token
    • 🏦BounceBit Tokenomics
      • Key Terms
      • 🪙BB Coin
      • Liquid Staking Token (stBBTC & stBB)
      • Bitcoin on BounceBit (BBTC)
      • Stablecoins on BounceBit (BBUSD)
    • 🧱Staking Delegation
    • 💧Liquid Staking
    • 📤Liquid Custody
    • 🍞Bread and Butter (BB Cross-chain Liquidity)
  • User Guides
    • General
      • How to Get BTCB from Binance
        • How to Transfer BTCB to your Binance Web3 Wallet
      • How to Use the Testnet Faucet
      • How to Add BounceBit Network to Your Wallet
    • 🌉Bridging
      • Portal Bridge
      • MultiBit Bridge
    • BounceClub V2
      • How to Launch a Memecoin
      • Arcade
      • DeFi
        • Quanto
        • Stablecoin
      • AI Agents
    • 📊CeDeFi
      • How to Withdraw/Redeem Your LCT
      • How to Subscribe to CeDeFi (V2)
      • How to Unsubscribe from CeDeFi (V2)
      • How to Wrap / How to get BBTC, BBUSD
      • Ethena <> BounceBit
      • Superfast Trading Guide
    • 💠Node Staking and Delegation
      • How to Stake/Unstake on Portal
      • How to Stake/Unstake BB and BBTC (Delegation)
  • Assets
    • 🪪Brand Guidelines
      • 🎨Logo Kit
    • ✅BounceBit's TVL
    • ✅Smart Contract Audit Report
    • First BounceBit's BTC TVL Audit Report
  • Developer Resources
    • BounceBit Mainnet Node Setup
      • Cosmovisor
    • Chain Info
    • RPC Support
    • How to Verify Smart Contracts
    • How to Withdraw Validator Commission
  • OTHER
    • 🌐BounceBit Official Social Media Channels
    • Terms of Use
    • Privacy Policy
Powered by GitBook
On this page
  1. Developer Resources
  2. BounceBit Mainnet Node Setup

Cosmovisor

PreviousBounceBit Mainnet Node SetupNextChain Info

Last updated 4 months ago

Cosmovisor

Please refer to the Cosmovisor documentation for further information.

cosmovisor is a process manager for Cosmos SDK application binaries that automates application binary switch at chain upgrades. It polls the upgrade-info.json file that is created by the x/upgrade module at upgrade height, and then can automatically download the new binary, stop the current binary, switch from the old binary to the new one, and finally restart the node with the new binary.

‼️

If you have been running without using Cosmovisor for a while and are now preparing to use Cosmovisor, please note that you need to check if upgrade-info.json file exists under WORKSPACE/data/ Please remove it during the initial run Cosmovisor.

To Install the latest version.

go  install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

Setup

cd $WORKSPACE
mkdir -p cosmovisor/genesis/bin
mkdir -p cosmovisor/upgrades

cp bbcored cosmovisor/genesis/bin/  # copy current version of bbcored

Systemd update -> /etc/systemd/system/bouncebit.service

[Unit]
Description=Bouncebit Mainnet
After=network-online.target
[Service]
Type=simple
User=bouncebit 
ExecStart=cosmovisor run start --log_level info --home <WORKSPACE> --chain-id bouncebit_6001-1 --moniker <YOUR_NODE_NAME>
KillMode=process
Restart=on-failure
RestartSec=3
Environment="DAEMON_HOME=<WORKSPACE>" # replace!
Environment="DAEMON_NAME=bbcored"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl start bouncebit.service
systemctl enable bouncebit.service

When requested to upgrade to the new version.

cd $WORKSPACE

# download the new bbcored (v1.5.0)
 
mkdir -p cosmovisor/upgrades/v1.5.0/bin  # replace version
cp bbcored cosmovisor/upgrades/v1.5.0/bin/  

<aside> ‼️ Please ensure to use StateSync or Archive Snapshot to synchronize the mainnet node.

</aside>

StateSync

With state sync, your node will download and verify data only related to the head or near the head of the chain.

Fetch the latest block height.

curl -s <http://34.126.185.25:26657/block> | jq -r '.result.block.header.height'

224136

Fetch the trust hash of the latest block height.

curl -s "<http://34.126.185.25:26657/block?height=224136>" | jq -r '.result.block_id.hash'

FC1E650D149713BF9AB0072C084CE4B7CAD0ABA503C32CD64F759651BB66A7C2

Enable state-sync, add RPC servers

config.toml

[statesync]

enable = true
rpc_servers = "34.126.185.25:26657,35.247.178.93:26657"
trust_height = 224136
trust_hash = "FC1E650D149713BF9AB0072C084CE4B7CAD0ABA503C32CD64F759651BB66A7C2"

app.toml

[rosetta]

enable = false

Archive Snapshot (pruning nothing)

✅ bouncebit_archive_snapshot_2024_12_06.lz4

curl -o - -sL [<https://bouncebit-snapshot.s3.ap-southeast-1.amazonaws.com/>](<https://bouncebit-snapshot.s3.ap-southeast-1.amazonaws.com/bouncebit_archive_snapshot_2024-08-25.lz4>){{snapshot_file}} | lz4 -c -d - | tar -x -C  $HOME 

https://docs.cosmos.network/main/build/tooling/cosmovisor