https://github.com/rustaceanrob/swiftsync-research
Research for the SwiftSync protocol
https://github.com/rustaceanrob/swiftsync-research
Last synced: 3 months ago
JSON representation
Research for the SwiftSync protocol
- Host: GitHub
- URL: https://github.com/rustaceanrob/swiftsync-research
- Owner: rustaceanrob
- License: cc0-1.0
- Created: 2026-02-04T13:44:56.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2026-03-05T16:06:06.000Z (3 months ago)
- Last Synced: 2026-03-05T16:21:33.467Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftSync Protocol Research
Collection of statistics to drive _SwiftSync_ protocol decisions.
## Background
_SwiftSync_ requires the inputs of a block be served by peers. To minimize the bandwidth required to for clients to perform _SwiftSync_, compression techniques are used on each field of the input coins. Further reduction can be achieved with caching strategies.
A concise representation of the UTXO set must also be shared to use _SwiftSync_. Encoding of this file depends largely on the distribution of these coins within historical blocks.
## Binaries
Set your `BITCOIN_DIR` environment variable to an absolute path to your Bitcoin data directory.
- Analyze the different techniques of encoding hints, which requires a bitmap to UTXOs in blocks:
```
curl -o bitcoin.hints https://utxohints.store/hints/bitcoin # Set HINTS_FILE to the absolute path
```
```
export HINTS_FILE=/path/to/bitcoin.hints && cargo run --bin compare_hints --release
```
- Show the savings due to the `ReconstructableScript` format:
```
export BITCOIN_DIR=/path/to/bitcoin/datadir && cargo run --bin reconstructable_script_savings --release
```
- Show the savings due to the amount compression format:
```
export BITCOIN_DIR=/path/to/bitcoin/datadir && cargo run --bin compressed_amount_savings --release
```
- Count P2PK outputs that are uncompressed:
```
export BITCOIN_DIR=/path/to/bitcoin/datadir && cargo run --bin count_p2pk --release
```
- Analyze the lifetime (age), of a coin follows an empirical distribution. To build the `csv` table of coin age to number of occurrences:
```
export BITCOIN_DIR=/path/to/bitcoin/datadir && cargo run --bin compute_coin_ages --release
```
- Plot the results to `plot.png` with an optional upper bound on age.
```
cargo run --bin plot --release 10000 #filter coins with ages older than 10000
```