Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ralexstokes/stoken
some blockchain
https://github.com/ralexstokes/stoken
Last synced: 25 days ago
JSON representation
some blockchain
- Host: GitHub
- URL: https://github.com/ralexstokes/stoken
- Owner: ralexstokes
- License: mit
- Created: 2017-12-31T00:06:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-04T22:59:55.000Z (over 6 years ago)
- Last Synced: 2024-10-03T13:22:02.673Z (about 1 month ago)
- Language: Clojure
- Size: 128 KB
- Stars: 20
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# stoken
A proof-of-work blockchain that maintains a ledger of coin balances like Bitcoin.
This repository contains the software to run a `stoken` node which runs the proof-of-work (PoW) algorithm, participates in a peer-to-peer gossip protocol and offers RPC endpoints to inspect the node's state.
# NOTICE
This blockchain is **NOT** secure. Use at your own peril! If you would like to learn the fundamentals of how you might build a blockchain, study this repo. The core functionality of something like Bitcoin exists but finer details around security, in particular around block and transaction validation, are not implemented so if this chain is used at scale it is likely to be attacked profitably.
Block and transaction data is currently not persisted; you will have to sync the chain from scratch when you boot.
There is an option to persist keys -- refer to the `key-store` code in `dev/dev.clj`. Public/private key pairs are stored in the given filename encrypted with some secret you choose. Note the default password in `dev/dev.clj` is just `password` so you will want to change that.
## About
The node software is organized as a series of components that primarily communicate via a system `queue`. A `scheduler` runs a series of workers that process messages on the `queue`. The `p2p` and `rpc` components can submit work to the queue in response to external events.
The node state contains a transaction pool of outstanding transactions submitted to the network, a ledger reflecting a summary of all transaction history maintained on the chain and a collection of all blocks submitted to the network organized as the central chain data structure.
## Development
This software uses the [Component framework](https://github.com/stuartsierra/component) to take advantage of the [reloaded](https://github.com/stuartsierra/reloaded) workflow. See [http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded](http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded) for details.
To begin an instance of the development system described in `dev/dev.clj`, open a REPL and call `(reset)`.
## Copyright and License
Copyright © 2018 ralexstokes
MIT License. Refer to `LICENSE` in this repository for license info.