Update readme for new demo

Need to create a bunch of unrelated accounts to the genesis block
so that transactions can be processed in parallel without waiting
on write-locks. And then stuff the private keys of those accounts
into mint.json so that the client-demo can send the tokens from
those accounts.
This commit is contained in:
Greg Fitzgerald 2018-04-16 16:44:24 -04:00
parent 38fdd17067
commit 3215dcff78
1 changed files with 7 additions and 7 deletions

View File

@ -39,25 +39,25 @@ $ cd solana
The testnode server is initialized with a ledger from stdin and The testnode server is initialized with a ledger from stdin and
generates new ledger entries on stdout. To create the input ledger, we'll need generates new ledger entries on stdout. To create the input ledger, we'll need
to create *the mint* and use it to generate a *genesis ledger*. It's done in to create *the mint* and use it to generate a *genesis ledger*. It's done in
two steps because the mint.json file contains a private key that will be two steps because the mint-demo.json file contains private keys that will be
used later in this demo. used later in this demo.
```bash ```bash
$ echo 1000000000 | cargo run --release --bin solana-mint | tee mint.json $ echo 1000000000 | cargo run --release --bin solana-mint-demo > mint-demo.json
$ cat mint.json | cargo run --release --bin solana-genesis | tee genesis.log $ cat mint-demo.json | cargo run --release --bin solana-genesis-demo > genesis.log
``` ```
Now you can start the server: Now you can start the server:
```bash ```bash
$ cat genesis.log | cargo run --release --bin solana-testnode | tee transactions0.log $ cat genesis.log | cargo run --release --bin solana-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 ledger. the JSON configuration file here, not the genesis ledger.
```bash ```bash
$ cat mint.json | cargo run --release --bin solana-client-demo $ cat mint-demo.json | cargo run --release --bin solana-client-demo
``` ```
Now kill the server with Ctrl-C, and take a look at the ledger. You should Now kill the server with Ctrl-C, and take a look at the ledger. You should
@ -73,14 +73,14 @@ Now restart the server from where we left off. Pass it both the genesis ledger,
the transaction ledger. the transaction ledger.
```bash ```bash
$ cat genesis.log transactions0.log | cargo run --release --bin solana-testnode | tee transactions1.log $ cat genesis.log transactions0.log | cargo run --release --bin solana-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 | cargo run --release --bin solana-client-demo $ cat mint-demo.json | cargo run --release --bin solana-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.