Skip to content

Commit

Permalink
refactor(header-accumulator): clean up README
Browse files Browse the repository at this point in the history
  • Loading branch information
suchapalaver committed Nov 6, 2024
1 parent 7e8c6c3 commit 5d4a99d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 22 deletions.
9 changes: 9 additions & 0 deletions crates/flat-files-decoder/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Flat Files Decoder

## Overview

Check out the crate documentation in your browser by running, from
the root of the `veemon` workspace:

```terminal
cd crates/flat-files-decoder && cargo doc --open
```

## Running CLI Example

### Commands
Expand Down
55 changes: 33 additions & 22 deletions crates/header-accumulator/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,57 @@
# Header accumulator
# Header Accumulator

This crate is used to accumulate block headers and compare them
against header accumulators. This process is used to verify the authenticity of these blocks.
`header_accumulator` is a Rust library used to accumulate and verify
block headers by comparing them against header accumulators, helping
to ensure the authenticity of blockchain data. This crate is designed
primarily for use as a library, requiring parsed blocks as input.

the header_accumulator is more intended to be used as a library, since it needs to be fed blocks that have to be parsed first.
## Overview

Check out the crate documentation in your browser by running, from
the root of the `veemon` workspace:

```terminal
cd crates/header-accumulator && cargo doc --open
```

## Getting Started

### Prerequisites

- [Rust (stable)](https://www.rust-lang.org/tools/install)
- Cargo (Comes with Rust by default)
- Cargo (included with Rust by default)
- [protoc](https://grpc.io/docs/protoc-installation/)

## Features

- `era_validate`: Validates entire ERAs of flat files against Header Accumulators. Use this command to ensure data integrity across different ERAs.

- `generate_inclusion_proof`: Generates inclusion proofs for a range of blocks. This is useful for verifying the presence of specific blocks within a dataset.

- `verify_inclusion_proof`: Verifies inclusion proofs for a range of blocks. Use it to confirm the accuracy of inclusion proofs you have.
- **`era_validate`**: Validates entire ERAs of flat files against
Header Accumulators. Use this command to ensure data integrity across
multiple ERAs.
- **`generate_inclusion_proof`**: Generates inclusion proofs for a
specified range of blocks, useful for verifying the presence of
specific blocks within a dataset.
- **`verify_inclusion_proof`**: Verifies inclusion proofs for a
specified range of blocks. Use this to confirm the accuracy of
inclusion proofs.

### Options

- `-h, --help`: Display a help message that includes usage, commands, and options.

- `-h, --help`: Displays a help message that includes usage
information, commands, and options.

## Goals

Our goal is to provide a tool that can be used to verify blocks from [StreamingFast's Firehose](https://firehose.streamingfast.io/).
It is used in unity with flat [flat-files-decoder](https://github.com/semiotic-ai/flat-files-decoder) in [flat_head](https://github.com/semiotic-ai/flat_head) to achieve a solution.




The main objective of this library is to provide a tool for verifying
blocks from [StreamingFast Firehose](https://firehose.streamingfast.io/).
It works in conjunction with [flat-files-decoder](https://github.com/semiotic-ai/flat-files-decoder)
to offer a comprehensive solution.

## Testing
Some tests depend on [flat-files-decoder](https://github.com/semiotic-ai/flat-files-decoder) to work, so it is used as a development dependency.

Run `cargo test` to test all functionalities.
Some tests depend on [flat-files-decoder](https://github.com/semiotic-ai/flat-files-decoder) as a development dependency.

### Coverage
Run all tests with:

Generate code coverage reports with `cargo llvm-cov --html` and open them with `open ./target/llvm-cov/html/index.html`.
```terminal
cargo test
```

0 comments on commit 5d4a99d

Please sign in to comment.