Debot is a decentralized system leveraging libp2p for networking, Raft for consensus, and Telegram bots for interactive communication. It enables fault-tolerant messaging and state synchronization across distributed nodes, making it ideal for scalable and resilient applications.
🔗 GitHub Repository: scriptkid23/debot
✅ Decentralized Networking: Built using libp2p for peer-to-peer communication.
✅ Consensus Algorithm: Uses Raft to achieve distributed consensus among nodes.
✅ Interactive Communication: Supports Telegram Bots for real-time user interaction.
✅ Scalable & Fault-Tolerant: Ensures system reliability in distributed environments.
Ensure you have the following installed on your system:
- Rust (Latest stable version)
- Cargo (Rust’s package manager)
- Git (For version control)
If Rust is not installed, run:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env # Ensure Rust is available in your shellVerify installation:
rustc --version # Should output Rust version
cargo --version # Should output Cargo versiongit clone https://github.com/scriptkid23/debot.git
cd debotcargo build --releaseRun without Telegram bot:
cargo runor in release mode (optimized for performance):
cargo run --releaseRun with Telegram bot (each node needs its own bot token):
cargo run -- --token=<YOUR_BOT_TOKEN>Example with multiple nodes:
# Terminal 1 - First node with bot
cargo run -- --token=<BOT_TOKEN_1>
# Terminal 2 - Second node with bot
cargo run -- --token=<BOT_TOKEN_2>
# Terminal 3 - Third node with bot
cargo run -- --token=<BOT_TOKEN_3>cargo testOnce the node is running with a bot token, you can interact with it via Telegram:
/test- Check if the node is a leader or follower- Leader response: "I am leader" (broadcasts to all followers)
- Follower response: "I am follower"
- Each node runs its own Telegram bot (unique token per node)
- When you send
/testto any bot:- The receiving node checks its role and replies immediately
- If it's the leader, it broadcasts the test to all other nodes
- All follower nodes then send "I am follower" to the same chat
This demonstrates the distributed consensus mechanism where:
- The leader coordinates actions across the cluster
- All nodes can respond independently but in coordination
To create Telegram bot tokens:
- Open Telegram and search for @BotFather
- Send
/newbotand follow the instructions - Copy the token provided
- Repeat for each node you want to run
To deploy Debot efficiently, run it in release mode to optimize performance:
cargo build --release
./target/release/debotTo monitor logs, run:
RUST_LOG=info ./target/release/debotFor background execution, use:
nohup ./target/release/debot &> debot.log &- Check the Documentation: Debot Docs
- Join the Community: Debot Forum
- Discord Support: Join Discord
- Email Us: support@1hoodlabs.com
We appreciate your interest in Debot. Your contributions and feedback help us improve. Happy coding! 💻✨