Skip to content

Commit

Permalink
chore: exclude heavy features from Pallas (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored May 28, 2024
1 parent 6d8fc90 commit 4565d7a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 156 deletions.
159 changes: 13 additions & 146 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ authors = ["Santiago Carmuega <[email protected]>"]


[dependencies]
pallas = { git = "https://github.com/txpipe/pallas.git", features = ["unstable"] }
# pallas = { version = "^0.25", features = ["unstable"] }
# pallas = { path = "../pallas/pallas", features = ["unstable"] }
pallas = { git = "https://github.com/txpipe/pallas.git", features = ["hardano", "applying"] }
# pallas = { version = "^0.25", features = ["hardano", "applying"] }
# pallas = { path = "../pallas/pallas", features = ["hardano", "applying"] }

gasket = { git = "https://github.com/construkts/gasket-rs.git", features = ["derive"] }
# gasket = { version = "^0.8", features = ["derive"] }
Expand Down
24 changes: 17 additions & 7 deletions src/bin/dolos/data/summary.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
use miette::IntoDiagnostic;
use pallas::{ledger::traverse::MultiEraBlock, storage::rolldb::chain};
use pallas::ledger::traverse::MultiEraBlock;
use std::path::Path;

use dolos::{ledger::ChainPoint, wal::WalReader as _};
use dolos::{
ledger::ChainPoint,
wal::{redb::WalStore, RawBlock, ReadUtils, WalReader as _},
};

#[allow(dead_code)]
fn dump_txs(chain: &chain::Store) -> miette::Result<()> {
for header in chain.crawl() {
let (slot, hash) = header.into_diagnostic()?;
fn dump_txs(chain: &WalStore) -> miette::Result<()> {
let blocks = chain
.crawl_from(None)
.into_diagnostic()?
.filter_forward()
.into_blocks()
.flatten();

for block in blocks {
let RawBlock { slot, body, .. } = block;

println!("dumping {slot}");

let block = chain.get_block(hash).into_diagnostic()?.unwrap();
let block = MultiEraBlock::decode(&block).into_diagnostic()?;
let block = MultiEraBlock::decode(&body).into_diagnostic()?;

for tx in block.txs() {
let cbor = hex::encode(tx.encode());
Expand Down

0 comments on commit 4565d7a

Please sign in to comment.