https://github.com/tbrand/byzan
Distributed blockchain KVS with high availability written in Rust
https://github.com/tbrand/byzan
blockchain kvs rust
Last synced: 5 months ago
JSON representation
Distributed blockchain KVS with high availability written in Rust
- Host: GitHub
- URL: https://github.com/tbrand/byzan
- Owner: tbrand
- Created: 2018-09-15T13:08:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-28T05:28:59.000Z (about 7 years ago)
- Last Synced: 2025-04-01T04:32:37.637Z (7 months ago)
- Topics: blockchain, kvs, rust
- Language: Rust
- Size: 49.8 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
Distributed blockchain KVS with high availability written in Rust.## Quick start
You need rust (cargo) environment for building.
After cloning this repo, build it by below.
```bash
cargo build --release
```Launch a node with binding a gPRC port on 8000 and websocket port on 8001.
```bash
./target/release/byzd --bind_port=8000 --peer_port=8001
```Upsert data and get it from it.
```bash
# Upsert data
./target/release/byz --connect_port=8000 upsert -k mykey -v myvalue# Get it from the node
./target/release/byz --connect_port=8000 get -k mykey
```## How to use blockchain?
Core technology of blockchain is not for the currency but for the consensus algorithm.
Byzan uses the blockchain feature for keeping data consisntency between distributed nodes.### Why no miners?
Because Byzan is assumed to be used in system internally. (not publically.)
So it's not needed to make some intervals but just verifying the block hash is enough for the purpose.## API
All APIs are defined as gRPC. You can find the definition at [/proto](https://github.com/tbrand/byzan/tree/master/proto) directory.
## Development
### Build
```bash
cargo build --release
```### Test
```bash
cargo test
```### Benchmark (nightly only)
```bash
cargo bench
```### Generate gRPC fines
Byzan uses [pingcap/grpc-rs](https://github.com/pingcap/grpc-rs) as a gRPC library.
Follow the instraction on it to make a required environment.```bash
protoc --rust_out=./src/proto/ --grpc_out=./src/proto/ --plugin=protoc-gen-grpc=`which grpc_rust_plugin` proto/byzan.proto
```## Contributors
- [tbrand](https://github.com/tbrand) Taichiro Suzuki - creator, maintainer