-
Notifications
You must be signed in to change notification settings - Fork 1
Warnet project implementation with one-tank network and attack scenario #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Warnet project implementation with one-tank network and attack scenario #2
Conversation
Add a beginner-friendly guide that teaches users how to: - Set up Warnet using standard installation workflow - Deploy Bitcoin networks with warnet new command - Run existing scenarios (miner_std, tx_flood, reconnaissance) - Monitor and interact with networks via dashboard This provides a simple entry point for new users to learn Warnet without requiring custom scripts or source installation.
- Created one-tank network (single node) - Implemented single scenario (my_first_attack_5kinv.py) - Enhanced README with comprehensive Warnet docs links - Added detailed monitoring and progress watching instructions - Provided multiple ways to monitor the tiny network - Clear step-by-step execution and observation guidance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I think this needs a lot more effort. I appreciate you taking the time to put together this demo for the BDP website, but it's disorganized and nothing works. If you still want to work on this, please proof read your work by pretending to be a beginner, and naievly following the steps you write out, to see if you get any results.
```sh | ||
# Create virtual environment | ||
python3 -m venv .venv | ||
source ./venv/bin/activate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source ./venv/bin/activate | |
source .venv/bin/activate |
- **Minikube** - Local Kubernetes cluster (recommended for beginners) | ||
- **Docker Desktop** - If you have Docker Desktop with Kubernetes enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think Docker Desktop is better for beginners because it has a GUI. I would assume Docker Desktop for mac users and minikube for linux users
This project includes a pre-configured one-node network. Deploy it with: | ||
|
||
```sh | ||
warnet deploy warnet-demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expected this to be warnet deploy networks/warnet-demo
or warnet deploy networks/94.0.0-5k-inv
. I was surprised this command worked but I realized its because your directory structure is not standard for warnet. I think it should be something like this (I created this using warnet new
and then following the inquirer prompts):
warnet-demo/
├── networks
│ └── 5k-inv-attack
│ ├── network.yaml
│ └── node-defaults.yaml
├── plugins
│ ├── __init__.py
│ ├── simln
│ │ ├── README.md
│ │ ├── charts
│ │ └── plugin.py
│ └── tor
│ ├── charts
│ └── plugin.py
└── scenarios
├── __init__.py
├── commander.py
├── ln_framework
│ ├── __init__.py
│ └── ln.py
├── ln_init.py
├── miner_std.py
├── reconnaissance.py
├── signet_miner.py
├── test_framework
│ ├── __init__.py
│ ├── ...
└── tx_flood.py
Execute the included scenario to see the network in action: | ||
|
||
```sh | ||
warnet run warnet-demo/scenarios/my_first_attack_5kinv.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warnet run warnet-demo/scenarios/my_first_attack_5kinv.py | |
warnet run warnet-demo/scenarios/my_first_attack_5kinv.py --debug |
This might be more fun to show some running-time output of the scenario, but of course it will consume the shell foreground so for other commands like warnet dashboard
we might not want to add --debug
what do you think?
- Monitor transaction propagation across the network | ||
- Show you how nodes communicate and synchronize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I thought we were going to test an attack, literally https://github.com/bitcoin-dev-project/battle-of-galen-erso/blob/main/scenarios/my_first_attack_5kinv.py
What you have here is actually very cool and totally fine - but then we mine as well add 1-2 more nodes so we can actually see actual network propogation. Then go ahead and just rename the scenario something like propogation-check
and instruct the user to do warnet dashboard
etc
and THEN....
we can still run the attack from Galen Erso and watch a node die. (if you like?)
- **[Warnet Scenarios](https://github.com/bitcoin-dev-project/warnet?tab=readme-ov-file#scenarios)** - Learn how to create custom attack scenarios | ||
- **[Warnet Networks](https://github.com/bitcoin-dev-project/warnet?tab=readme-ov-file#networks)** - Understanding network configuration | ||
- **[Bitcoin Core Test Framework](https://github.com/bitcoin/bitcoin/tree/master/test/functional)** - Framework used by Warnet scenarios | ||
- **[Bitcoin Development Guide](https://bitcoin.org/en/development)** - General Bitcoin development resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we can just drop this
|
||
- **[Warnet Documentation](https://github.com/bitcoin-dev-project/warnet)** - Complete guide to Warnet features and usage | ||
- **[Warnet Quick Start](https://github.com/bitcoin-dev-project/warnet?tab=readme-ov-file#quick-start)** - Step-by-step installation guide | ||
- **[Warnet Scenarios](https://github.com/bitcoin-dev-project/warnet?tab=readme-ov-file#scenarios)** - Learn how to create custom attack scenarios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try these links? They don't work.
use
https://github.com/bitcoin-dev-project/warnet/blob/main/docs/scenarios.md
...etc.
@@ -0,0 +1,123 @@ | |||
# SimLN Plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove the entire plugins/
directory, it's more advanced usage and not worth the confusion of including in an introductory guide.
@@ -0,0 +1,35 @@ | |||
name: "warnet-demo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this file for?
@@ -0,0 +1,132 @@ | |||
# Warnet Demo Project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this extra README for? It describes a 5-node network which we don't have.
Thank you for your feedback.. |
Overview
A complete Warnet project implementing a one-tank network with a single attack scenario for hands-on Bitcoin network analysis learning.
Implementation Details
Based on feedback from this comment
��️ Project Structure
warnet-demo/
)94.0.0-5k-inv.yaml
)my_first_attack_5kinv.py
)📚 Documentation
🎯 Key Features
What Users Can Do
warnet deploy warnet-demo
warnet run warnet-demo/scenarios/my_first_attack_5kinv.py
Testing
✅ Successfully tested deployment and scenario execution
✅ Verified monitoring capabilities work as documented
✅ Confirmed one-node network operates correctly