Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ravindramohith/cyptonite
Cyptonite is a blockchain simulation project using Python, designed to model and analyze different mining strategies, including stubborn and selfish mining, in a decentralized network
https://github.com/ravindramohith/cyptonite
blockchain-technology proof-of-work python selfish-mining stubborn-mining
Last synced: about 1 month ago
JSON representation
Cyptonite is a blockchain simulation project using Python, designed to model and analyze different mining strategies, including stubborn and selfish mining, in a decentralized network
- Host: GitHub
- URL: https://github.com/ravindramohith/cyptonite
- Owner: ravindramohith
- Created: 2024-03-19T14:08:50.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-30T16:01:17.000Z (9 months ago)
- Last Synced: 2024-11-11T19:04:08.451Z (about 1 month ago)
- Topics: blockchain-technology, proof-of-work, python, selfish-mining, stubborn-mining
- Language: Python
- Homepage:
- Size: 1.27 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CS 765 Assigment-2
## **Environment:**
Make sure python v3 is installed on your system.## **Running instructions:**
- Navigate to code directory:`$ cd code/`
### **For stuborn mining without any attacker:** navigate to `stubborn_mining` directory.
### **For mining with attackers:** navigate to `selfish_mining` directory.- basic command to run event simulator:
`$ python3 main.py --peers [PEERS] --z0 [Z0] --z1 [Z1] --transaction-mean-gap [TRANSATIONMEANGAP] --att1 [ATT1] --att2 [ATT2]`
- for printing blockchain:
`$ python3 main.py --peers [PEERS] --z0 [Z0] --z1 [Z1] --transaction-mean-gap [TRANSATIONMEANGAP] --att1 [ATT1] --att2 [ATT2] --print-blockchain`
- for visualizing the blockchain:
`$ python3 main.py --peers [PEERS] --z0 [Z0] --z1 [Z1] --transaction-mean-gap [TRANSATIONMEANGAP] --att1 [ATT1] --att2 [ATT2] --visualize-blockchain`
**Note: If u want to print and visualize, add both `--print-blockchain` and `--visualize-blockchain` flags to the basic command (order dosen't matter).
PEERS - No.of peers
Z0 - z0 fraction of low speed distribution
Z1 - z1 fraction of low CPU speed distribution
TRANSACTIONMEANGAP - transaction mean time.
ATT1 - attacker 1's hashing power
ATT2 - attacker 2's hashing power- to visualize graph of nodes:
`$ python3 graph.py --generate`