Uses the cardano mini-protocols to receive every block and transaction, and save them to a configurable destination

Overview

cardano-slurp

Connects to one or more cardano-node's, streams all available transactions, and saves them to disk (or to S3) in raw cbor format.

Usage

Aims to have sensible defaults; Running cardano-slurp without arguments will connect to an IOHK relay and save blocks to the blocks directory

cardano-slurp

You can specify custom values via command line or environment variable:

$ cardano-slurp --help

Connect to cardano nodes and download all blocks and transactions without processing them

Usage: cardano-slurp [OPTIONS]

Options:
  -r, --relay <RELAY>
          The cardano relay node to connect to [default: relays-new.cardano-mainnet.iohk.io:3001]
  -t, --topology-file <TOPOLOGY_FILE>
          A topology file to read for relays to connect to
  -f, --fallback-point <FALLBACK_POINT>
          
  -d, --directory <DIRECTORY>
          The directory to save blocks into [default: db]
      --testnet-magic <TESTNET_MAGIC>
          The network magic to use when communicating with nodes
  -h, --help
          Print help
  -V, --version
          Print version

cardano-slurp --relay relays.cardano-mainnet.iohk.io:3001 --directory db --fallback-point 78416/f85c52e97c6ec4e171d92789e32331e624ee7a0c7ba18b578062727edb7d61f7

RELAY=relays-new.cardano-mainnet.iohk.io:3001 cargo-slurp

Rather than specifying relays individually, you can specify a topology.json file in the same format that the cardano-node reads:

cardano-slurp --topology-file topology.json

Format

The file structure after running (assuming default parameters) should look like this:

 - db                    | Contains all persisted data
   - headers             | All downloaded headers
     - {large-bucket}    | See note on bucketing below
       - {small-bucket}  |
         - {slot}-{hash} | The header we observed at {slot} with the given {hash}; there may be multiples in the case of rollbacks or different blocks received from different relays
   - bodies              | All downloaded block bodies 
     - {large-bucket}    | See note on bucketing below
       - {small-bucket}  |
         - {slot}-{hash} | The block body we observed at {slot} with the given {hash}; there may be multiples in the case of rollbacks or different blocks received from different relays
   - cursors             | Cursors, tracking how far we've sync'd with any given relay
    - {relay}            | The cursor file, serialized as CBOR

NOTE: Common wisdom seems to indicate that you should keep directories to around 10k entries so as not to destroy performance of directory scan operations. Thus, we introduce two layers of nesting, called buckets, to occasionally roll over to an empty directory and keep the sizes small. Each bucket represents the starting slot of a range which contains all the blocks in that subdirectory. The large bucket rolls over ever 20 million slots, and the small bucket rolls over every 200 thousand slots. This ensures that each large-bucket directory has no more than 1000 entries, and each small-bucket directory has no more than 10,000 entries. One large-bucket represnets roughly 230 days of blocks in the shelley era.

You might also like...
Monorepo for dprint—a pluggable and configurable code formatting platform

dprint Monorepo for dprint—a pluggable and configurable code formatting platform. This project is under active early development. I recommend you chec

Configurable, extensible, interactive line reader

linefeed linefeed is a configurable, concurrent, extensible, interactive input reader for Unix terminals and Windows console. API Documentation linefe

Easy configurable tmux display-menu
Easy configurable tmux display-menu

tmux-easy-menu Easy configurable tmux display-menu Setup cargo build And run with ./target/debug/tmux-menu show --menu {path-to-your-config} Configu

A minimalist tool for managing block-lists from the terminal.
A minimalist tool for managing block-lists from the terminal.

Block List A minimalist hosts-based tool for managing block lists and ad-blocking. This project uses the excellent and regularly updated Unified Hosts

🤖 just is a handy way to save and run project-specific commands.

just just is a handy way to save and run project-specific commands. (非官方中文文档,这里,快看过来!) Commands, called recipes, are stored in a file called justfile

Create tasks and save notes offline from your terminal

Create tasks and save notes offline from your terminal

Save decryption/encryption and transfer utility for Automachef

automachef-save Automachef by HermesInteractive encrypts it's save files with the user's account ID (Steam, Epic) or a static key (GOG, Twitch). The I

Quickly save and retrieve values for shell scripts.

Quickly save and retrieve values for shell scripts.

Start and stop system for applications to save your budget on hourly billing VPS.

Start and stop system (STT) Start and stop system for applications to save your budget on hourly billing VPS. Service A service consists of start/stop

Owner
Pi Lanningham
Pi Lanningham
Save cli commands and fuzzy find them later

crow - cli command memorizer What is crow? | Installation | Usage | FAQ What is crow? crow (command row) is a CLI tool to help you memorize CLI comman

sandstorm 7 Feb 17, 2022
(Pre-Release Software) Secure, Encrypted, P2P chat written atop Warp, IPFS, LibP2P, Dioxus and many more awesome projects and protocols.

Uplink Privacy First, Modular, P2P messaging client built atop Warp. Uplink is written in pure Rust with a UI in Dioxus (which is also written in Rust

Satellite 13 Jan 25, 2023
A mini paste bin and url shortener written in rust without databases.

pb Build $ cargo build --release Environment Variables PB_DATA: /some/path (Default: ./pb_data) PB_SITE: Url of your site. (Default: http://localhost:

Edward P 5 Jul 26, 2022
Mini Rust CLI to deploy sites to Netlify using their API

This is a Rust CLI that uses the Netlify API to deploy sites.

Benjamin Lannon 10 May 12, 2022
Crunch is a command-line interface (CLI) to claim staking rewards every X hours for Substrate-based chains

crunch · crunch is a command-line interface (CLI) to claim staking rewards every X hours for Substrate-based chains. Why use crunch To automate payout

null 39 Dec 8, 2022
A Rust CLI that makes mechanical keyboard sound effects on every key press

Rustyvibes A Rust CLI that makes mechanical keyboard sound effects on every key press Rustyvibes.mp4 Installation macOS: brew install kb24x7/rustyvibe

Kunal Bagaria 95 Dec 14, 2022
Rust-advent - Learning Rust by solving advent of code challenges (Streaming live on Twitch every Monday)

Rust advent ?? ?? Learning Rust by implementing solutions for Advent of Code problems. ?? HEY, we are live-streaming our attempts to solve the exercis

Luciano Mammino 20 Nov 11, 2022
A Rust-based shell script to create a folder structure to use for a single class every semester. Mostly an excuse to use Rust.

A Rust Course Folder Shell Script PROJECT IN PROGRESS (Spring 2022) When completed, script will create a folder structure of the following schema: [ro

Sebastián Romero Cruz 1 Apr 10, 2022
CIEBII - Check if every bit is intact

CIEBII Checks If Every Byte Is Intact CIEBII is an image file format that checks if every single byte is intact. What does it do if it finds that a by

Codingsquirrel 2 Oct 7, 2022
Same procedure as every year… right?

Advent of Code 2022 solutions What this repository is This repository contains solutions to Eric Wastls Advent of Code 2022. Thank you, Eric! While th

Patrick 3 Dec 15, 2022