https://github.com/hvuhsg/yoyocoin
PoS blockchain in python (but a bit different)
https://github.com/hvuhsg/yoyocoin
blockchain cryptocurrency proof-of-stake python wallet
Last synced: 6 months ago
JSON representation
PoS blockchain in python (but a bit different)
- Host: GitHub
- URL: https://github.com/hvuhsg/yoyocoin
- Owner: hvuhsg
- License: mit
- Created: 2021-05-24T17:23:26.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T15:51:46.000Z (over 1 year ago)
- Last Synced: 2025-03-26T00:51:14.487Z (7 months ago)
- Topics: blockchain, cryptocurrency, proof-of-stake, python, wallet
- Language: Python
- Homepage:
- Size: 214 KB
- Stars: 13
- Watchers: 3
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# yoyocoin
PoS blockchain python (but a bit different)[](https://travis-ci.com/hvuhsg/yoyocoin)
[](https://www.standwithus.com/)### New refactored repo [HERE](https://github.com/yoyocoin/yoyocoin)
#### Explanation
This coin will use PoS to determine which wallet has won and can forge the next block (incentive: get the fee's, block creation is free...)#### Running a Node
###### requirements
- docker installed
- docker-composed installed
- GIT installed
- 1 Gig RAM minimum###### Deploying
Make sure that your docker instance is running
```shell script
sudo systemctl enable docker # Auto-start on boot
sudo systemctl start docker # Start right now
``````shell script
git clone https://github.com/hvuhsg/yoyocoin.git
cd yoyocoin
docker-compose up -d
```
The node will need to download all the history and create summary. It will take some time (depends on length and network speed)###### Access node API
The node exposing port 6001 by default -> http://localhost:6001/docs#### PoS mechanism
**The wallet with the most score win and can forge the next block**,
in the time period of the block creation every wallet can forge a block, every node select's the one block with the highest score.
every block have specific time frame for creation.##### Lottery system
1. Sorted list of all the wallets is created and every wallet have a power (based on it balance and last transaction block index)
2. the node is creating sum tree from all the sorted wallets
3. random number in range of 0 - 1 is created (Working on this part)
4. the random number is multiplied with the sum tree root (sum of all)
5. the sum tree is finding the winner wallet with O(log n) time
6. the wallet score is 100 - the distance from the winner wallet (Will be changed later)#### code parts
| Name | Description |
| ------------- | ---------------------------------------------------- |
| node | coin p2p network client and server |
| blockchain | manage chain + block foreign + maintaining consensus |
| ipfs | IPFS go node with pubsub enabled |