Skip to content

Commit

Permalink
chore: rename header-accumulator to headacc
Browse files Browse the repository at this point in the history
  • Loading branch information
suchapalaver committed Oct 21, 2024
1 parent 1d51e16 commit 976c8c5
Show file tree
Hide file tree
Showing 181 changed files with 44 additions and 48 deletions.
2 changes: 1 addition & 1 deletion crates/flat-head/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ decoder = { path = "../flat-files-decoder" }
dotenv.workspace = true
env_logger.workspace = true
futures.workspace = true
header_accumulator = { path = "../header-accumulator" }
header_accumulator = { path = "../headacc" }
log.workspace = true
object_store.workspace = true
sf-protos = { path = "../sf-protos" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "header_accumulator"
name = "headacc"
version = "0.1.0"
edition = "2021"

Expand Down
42 changes: 42 additions & 0 deletions crates/headacc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# `headacc`

The `headacc` crate is designed to accumulate and verify block headers by comparing them against header accumulators. This verification process ensures the authenticity of blocks and the integrity of blockchain data.

While `headacc` is primarily intended to be used as a library, it requires pre-parsed blocks to function. It integrates seamlessly with other tools like StreamingFast's Firehose and flat file decoders for complete blockchain verification workflows.

## Getting Started

### Prerequisites
To get started, ensure you have the following installed:

- [Rust (stable)](https://www.rust-lang.org/tools/install) and Cargo (bundled with Rust)
- [protoc](https://grpc.io/docs/protoc-installation/) for protobuf support

## Features

- **`era_validate`**: Validates entire eras of flat files against Header Accumulators. Use this feature to verify the integrity of data across multiple eras.

- **`generate_inclusion_proof`**: Generates inclusion proofs for a range of blocks. This helps confirm that specific blocks exist within a given dataset.

- **`verify_inclusion_proof`**: Verifies inclusion proofs for a specified range of blocks, ensuring the accuracy of inclusion proofs.

## Command-Line Options

- `-h, --help`: Displays detailed help information, including usage instructions, commands, and available options.

## Goals

The primary goal of `headacc` is to provide a reliable tool for block verification within the [StreamingFast Firehose](https://firehose.streamingfast.io/) ecosystem. It works alongside the [flat-files-decoder](https://github.com/semiotic-ai/flat-files-decoder) library and integrates into [flat_head](https://github.com/semiotic-ai/flat_head) to deliver a verification solution.

## Testing

Some tests in this crate rely on the [flat-files-decoder](https://github.com/semiotic-ai/flat-files-decoder), which is included as a development dependency.

To run tests, use:
```bash
cargo test
```

### Coverage

Generate code coverage reports with `cargo llvm-cov --html` and open them with `open ./target/llvm-cov/html/index.html`.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 0 additions & 46 deletions crates/header-accumulator/Readme.md

This file was deleted.

0 comments on commit 976c8c5

Please sign in to comment.