With v0.3.1 published to crates.io, you can now run silk without git
This commit is contained in:
parent
a86be9ebf2
commit
9930a2e167
24
README.md
24
README.md
|
@ -24,11 +24,17 @@ you can take to the bank, literally.
|
|||
Running the demo
|
||||
===
|
||||
|
||||
First, build the demo executables in release mode (optimized for performance):
|
||||
First, install Rust's package manager Cargo.
|
||||
|
||||
```bash
|
||||
$ cargo build --release
|
||||
$ cd target/release
|
||||
$ curl https://sh.rustup.rs -sSf | sh
|
||||
$ source $HOME/.cargo/env
|
||||
```
|
||||
|
||||
Install the silk executables:
|
||||
|
||||
```bash
|
||||
$ cargo install silk
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
```bash
|
||||
$ echo 500 | ./silk-mint > mint.json
|
||||
$ cat mint.json | ./silk-genesis > genesis.log
|
||||
$ echo 500 | silk-mint > mint.json
|
||||
$ cat mint.json | silk-genesis > genesis.log
|
||||
```
|
||||
|
||||
Now you can start the server:
|
||||
|
||||
```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
|
||||
the JSON configuration file here, not the genesis log.
|
||||
|
||||
```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
|
||||
|
@ -68,14 +74,14 @@ Now restart the server from where we left off. Pass it both the genesis log, and
|
|||
the transaction log.
|
||||
|
||||
```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
|
||||
previous round, and so no additional transactions are added.
|
||||
|
||||
```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.
|
||||
|
|
Loading…
Reference in New Issue