With v0.3.1 published to crates.io, you can now run silk without git

This commit is contained in:
Greg Fitzgerald 2018-03-08 11:40:42 -07:00
parent a86be9ebf2
commit 9930a2e167
1 changed files with 15 additions and 9 deletions

View File

@ -24,11 +24,17 @@ you can take to the bank, literally.
Running the demo Running the demo
=== ===
First, build the demo executables in release mode (optimized for performance): First, install Rust's package manager Cargo.
```bash ```bash
$ cargo build --release $ curl https://sh.rustup.rs -sSf | sh
$ cd target/release $ source $HOME/.cargo/env
```
Install the silk executables:
```bash
$ cargo install silk
``` ```
The testnode server is initialized with a transaction log from stdin and The testnode server is initialized with a transaction log from stdin and
@ -38,21 +44,21 @@ two steps because the mint.json file contains a private key that will be
used later in this demo. used later in this demo.
```bash ```bash
$ echo 500 | ./silk-mint > mint.json $ echo 500 | silk-mint > mint.json
$ cat mint.json | ./silk-genesis > genesis.log $ cat mint.json | silk-genesis > genesis.log
``` ```
Now you can start the server: Now you can start the server:
```bash ```bash
$ cat genesis.log | ./silk-testnode > transactions0.log $ cat genesis.log | silk-testnode > transactions0.log
``` ```
Then, in a separate shell, let's execute some transactions. Note we pass in Then, in a separate shell, let's execute some transactions. Note we pass in
the JSON configuration file here, not the genesis log. the JSON configuration file here, not the genesis log.
```bash ```bash
$ cat mint.json | ./silk-client-demo $ cat mint.json | silk-client-demo
``` ```
Now kill the server with Ctrl-C, and take a look at the transaction log. You should Now kill the server with Ctrl-C, and take a look at the transaction log. You should
@ -68,14 +74,14 @@ Now restart the server from where we left off. Pass it both the genesis log, and
the transaction log. the transaction log.
```bash ```bash
$ cat genesis.log transactions0.log | ./silk-testnode > transactions1.log $ cat genesis.log transactions0.log | silk-testnode > transactions1.log
``` ```
Lastly, run the client demo again, and verify that all funds were spent in the Lastly, run the client demo again, and verify that all funds were spent in the
previous round, and so no additional transactions are added. previous round, and so no additional transactions are added.
```bash ```bash
$ cat mint.json | ./silk-client-demo $ cat mint.json | silk-client-demo
``` ```
Stop the server again, and verify there are only Tick entries, and no Transaction entries. Stop the server again, and verify there are only Tick entries, and no Transaction entries.