Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Nov 19, 2023
1 parent d85a7fd commit eb4f6d3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [Sync](./running/sync.md)
- [Serve](./running/serve.md)
- [Daemon](./running/daemon.md)
- [Eval](./running/eval.md)
- [API](./api/README.md)
- [gRPC](./api/grpc.md)
- [Ouroboros](./api/ouroboros.md)
Expand Down
18 changes: 18 additions & 0 deletions book/src/running/eval.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# `eval` command

The `eval` is an utility for evaluating transactions. It takes tx data from an external source and uses the current ledger state to evaluate phase-1 validation rules.

## Usage

To execute the evaluation, run the following command from your terminal:

```bash
dolos eval --file <FILE> --era <ERA> --magic <MAGIC> --slot <SLOT>
```

The args should be interpreted as:

- `--file <FILE>`: the path to the file containing the tx data as hex-encoded cbor.
- `--era <ERA>`: the id of the era that should be used to interpret the transaction data.
- `--magic <MAGIC>`: the protocol magic of the network.
- `--slot <SLOT>`: the slot that should be used for retrieving protocol parameters.
6 changes: 2 additions & 4 deletions src/bin/dolos/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ use std::path::Path;

use miette::IntoDiagnostic;

use pallas::{
ledger::traverse::{tx, MultiEraBlock},
storage::rolldb::chain,
};
use pallas::{ledger::traverse::MultiEraBlock, storage::rolldb::chain};

#[allow(dead_code)]
fn dump_txs(chain: &chain::Store) -> miette::Result<()> {
for header in chain.crawl() {
let (slot, hash) = header.into_diagnostic()?;
Expand Down

0 comments on commit eb4f6d3

Please sign in to comment.