Disclaimer
All claims, content, designs, algorithms, estimates, roadmaps, specifications, and performance measurements described in this project are done with the author's best effort. It is up to the reader to check and validate their accuracy and truthfulness. Furthermore nothing in this project constitutes a solicitation for investment.
Silk, a silky smooth implementation of the Loom specification
Loomâ„¢ is a new architecture for a high performance blockchain. Its white paper boasts a theoretical
throughput of 710k transactions per second on a 1 gbps network. The specification is implemented
in two git repositories. Research is performed in the loom repository. That work drives the
Loom specification forward. This repository, on the other hand, aims to implement the specification
as-is. We care a great deal about quality, clarity and short learning curve. We avoid the use
of unsafe
Rust and write tests for everything. Optimizations are only added when
corresponding benchmarks are also added that demonstrate real performance boosts. We expect the
feature set here will always be a ways behind the loom repo, but that this is an implementation
you can take to the bank, literally.
Running the demo
First, install Rust's package manager Cargo.
|
Install the silk executables:
The testnode server is initialized with a transaction log from stdin and generates new log entries on stdout. To create the input log, we'll need to create the mint and use it to generate a genesis log. It's done in two steps because the mint.json file contains a private key that will be used later in this demo.
|
|
Now you can start the server:
|
Then, in a separate shell, let's execute some transactions. Note we pass in the JSON configuration file here, not the genesis log.
|
Now kill the server with Ctrl-C, and take a look at the transaction log. You should see something similar to:
Now restart the server from where we left off. Pass it both the genesis log, and the transaction 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.
|
Stop the server again, and verify there are only Tick entries, and no Transaction entries.
Developing
Building
Install rustc, cargo and rustfmt:
|
Download the source code:
Testing
Run the test suite:
Benchmarking
First install the nightly build of rustc. cargo bench
requires unstable features:
Run the benchmarks: