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...
CIEBII - Check if every bit is intact
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

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

This library contains collection of all sorts of useful information for every country.

Keshvar This library contains collection of all sorts of useful information for every country. Package | Documentation | Repository Demo use keshvar::

Generate perfect Vyper compatible code headers every time.

headers-vy Generate perfect Vyper-compatible code headers every time. Build You need Rust and Cargo installed on your machine. See the installation gu

👀Little program I made in 🦀Rust that reminds me every 20 minutes to look away from my computer 🖥screen.
👀Little program I made in 🦀Rust that reminds me every 20 minutes to look away from my computer 🖥screen.

👀 eye break Little program I made in 🦀 Rust that reminds me every 20 minutes to look away from my computer 🖥 screen. I stay way too long on the com

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

A command-line utility which aligns a block of text within the terminal (or a specified number of columns), written in Rust.
A command-line utility which aligns a block of text within the terminal (or a specified number of columns), written in Rust.

align: a command line utility for aligning text. ⭐ Overview Aligns text within the terminal (or a specified number of columns). The text is treated as

Log-structured, transactional virtual block device backed by S3

mvps Log-structured, transactional virtual block device compatible with the NBD protocol. mvps stands for "multi-versioned page store". MVPS can store

Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.
Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.

UEFI Variable Tool (UVT) UEFI Variable Tool (UVT) is a command-line application that runs from the UEFI shell. It can be launched in seconds from any

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
Ethereum transaction simulator leveraging Foundry's codebase

Enso Transaction ?? Simulator ?? A simple API which simulates a given transaction request. ?? API ?? POST /api/v1/simulate Simulates a single transact

null 162 Jun 4, 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
(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
Holo is a suite of routing protocols designed to support high-scale and automation-driven networks.

Holo is a suite of routing protocols designed to support high-scale and automation-driven networks. For a description of what a routing protocol is, p

Renato Westphal 42 Apr 16, 2023
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