diff --git a/README.md b/README.md index bb4ab3d..4219160 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,7 @@ This repository is a collection of crates related to a SwiftSync node implementation. Some crates will be SwiftSync-specific, while others may have broader use cases. -`accumulator`: A hash-based SwiftSync accumulator used to add and subtrack elements from a set. -`network`: Tools to find Bitcoin peers +- `accumulator`: A hash-based SwiftSync accumulator used to add and subtrack elements from a set. +- `hintfile`: Generate a SwiftSync hintfile as the role of a server. +- `node`: Perform fast IBD using a SwiftSync hints file. +- `network`: Tools to find Bitcoin peers. diff --git a/hintfile/README.md b/hintfile/README.md new file mode 100644 index 0000000..a04a2cb --- /dev/null +++ b/hintfile/README.md @@ -0,0 +1,3 @@ +# SwiftSync hint file + +This crate is capable of generating a `.hints` file to use as a SwiftSync client. You will need to have Bitcoin Core synced to a recent block or either mainnet or Signet. diff --git a/node/README.md b/node/README.md new file mode 100644 index 0000000..3442a3b --- /dev/null +++ b/node/README.md @@ -0,0 +1,29 @@ +# SwiftSync fast IBD + +This binary implements a SwiftSync client that downloads blocks in parallel from multiple peers, references a hint file, and updates an accumulator. Once the client has reached the stop hash specified in the hint file, the accumulator state is reported as verified or false. For more information, read the [SwiftSync specification](https://gist.github.com/RubenSomsen/a61a37d14182ccd78760e477c78133cd). + +You will need a `.hints` file locally to run this binary. See the `hintfile` create in this workspace to generate one from Bitcoin Core. + +To start fast IBD: +``` +cargo run --bin ibd --release -- +``` + + +``` +Arguments: + --hintfile The path to your `bitcoin.hints` file that will be + used for IBD + --blocks-dir Directory where you would like to store the bitcoin + blocks + --network The bitcoin network to operate on. Options are ` + bitcoin` or `signet` + --ping-timeout The time a peer has to respond to a `ping` message. + Pings are sent aggressively throughout IBD to find + slow peers. + --tcp-timeout The maximum time to establish a connection + --read-timeout The maximum time to read from a TCP stream until the + connection is killed. + --write-timeout The maximum time to write to a TCP stream until the + connection is killed. +```