Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bstnbuck/proof-of-work-using-vlang
A very simple Proof-of-Work implementation in Vlang
https://github.com/bstnbuck/proof-of-work-using-vlang
blockchain cryptocurrency proof-of-work v vlang vlang-crypto
Last synced: about 1 month ago
JSON representation
A very simple Proof-of-Work implementation in Vlang
- Host: GitHub
- URL: https://github.com/bstnbuck/proof-of-work-using-vlang
- Owner: bstnbuck
- License: mit
- Created: 2020-04-13T20:37:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T20:51:23.000Z (8 months ago)
- Last Synced: 2024-05-03T21:55:51.758Z (8 months ago)
- Topics: blockchain, cryptocurrency, proof-of-work, v, vlang, vlang-crypto
- Language: V
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Proof-of-Work implementation in Vlang
![PoW using Vlang](https://github.com/bstnbuck/Proof-of-Work-using-Vlang/workflows/PoW%20using%20Vlang/badge.svg?branch=master)
>**This program should only show the principle of Proof-of-Work and Blockchains.**
The Blockchain is programmed in [V](https://github.com/vlang/v). As hash algorithm SHA256 is used.## Requirements
- Installed [V-Compiler](https://github.com/vlang/v)## Usage & Build
* Clone the Repo: `git clone https://github.com/bstnbuck/Proof-of-Work-using-Vlang.git`
* Build: ``` v -prod -cc {gcc, msvc, tcc} . ```##### Execute:
* If you want to execute the Proof-of-Work run the program in console.
* After that enter the leading hex-nulls the hash should have. Should like this: **5** => 00000##### Example output:
```
Enter number of leading hex-nulls: 5
Random Nonce: 4028111107
Started: 2022-12-05 12:44:54Hash found!: 00000768f7cf74053c2d7420efa0594e99906bc012c399c40e94a8bc66878b33
Text+Nonce: HelloWorld4028323042 Count: 211935Stopped: 2022-12-05 12:44:54
Duration: 472ms => 0sec
```### Information
* The Proof-of-Work function uses a string with a incremented Nonce as hash operators.