Skip to content

Commit 752235f

Browse files
stevenjMr-Leshiy
andauthored
feat(rust/cardano-chain-follower): Test mode for chain follower to dump transactions. (#458)
* feat(rust/cardano-chain-follower): Add mode to chain follower example to dump requested transactions, and start searching from known slot. * feat(rust/cardano-chain-follower): Allow json logging, and add more data to the logged output/ * feat(rust/cardano-chain-follower): Add a new utility to allow easier diagnostic reporting of registration errors reported in the database. * make uv project * wip * fix * fix fmt * fix md * fix python fmt --------- Co-authored-by: Mr-Leshiy <[email protected]>
1 parent 21a9a72 commit 752235f

File tree

5 files changed

+517
-23
lines changed

5 files changed

+517
-23
lines changed

rust/Justfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ pre-push: sync-cfg code-format code-lint
3636
earthly +check
3737
earthly +build
3838

39+
build-follow_chains: code-format code-lint
40+
cargo build --release --package cardano-chain-follower --example follow_chains --features mimalloc
41+
3942
# Run long running developer test for mithril downloading.
4043
run-mithril-download-example-preprod: code-format code-lint
4144
cargo build -r --package cardano-chain-follower --example follow_chains --features mimalloc
@@ -68,3 +71,16 @@ debug-heap-mithril-download-example: code-format code-lint
6871
cargo build --package cardano-chain-follower --example follow_chains
6972
RUST_LOG="error,follow_chains=debug,cardano_chain_follower=debug,mithril-client=debug" \
7073
heaptrack ./target/debug/examples/follow_chains --preprod
74+
75+
# Dump a set of transactions to aid with development and debugging.
76+
# Example: `dump-txn-preprod 91972303 7558ca3658d6c5`
77+
dump-txn-preprod START_SLOT TXN_HASH:
78+
echo Starting at {{START_SLOT}} Look for Transaction Hash {{TXN_HASH}}
79+
# RUST_LOG="error,follow_chains=debug,cardano_chain_follower=debug,mithril-client=debug" \#
80+
./target/release/examples/follow_chains --inhibit-stats --preprod --mithril-sync-workers 64 --mithril-sync-chunk-size 16 --mithril-sync-queue-ahead=6 --start-at-slot {{START_SLOT}} --dump-transaction {{TXN_HASH}}
81+
82+
# Dump a set of transactions to aid with development and debugging.
83+
dump-txn-mainnet START_SLOT TXN_HASH:
84+
echo Starting at {{START_SLOT}} Look for Transaction Hash {{TXN_HASH}}
85+
# RUST_LOG="error,follow_chains=debug,cardano_chain_follower=debug,mithril-client=debug" \#
86+
./target/release/examples/follow_chains --inhibit-stats --mainnet --mithril-sync-workers 64 --mithril-sync-chunk-size 16 --mithril-sync-queue-ahead=6 --start-at-slot {{START_SLOT}} --dump-transaction {{TXN_HASH}}

rust/cardano-chain-follower/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ moka = { version = "0.12.9", features = ["sync"] }
6060
cpu-time = "1.0.0"
6161

6262
[dev-dependencies]
63-
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
63+
tracing-subscriber = { version = "0.3.19", features = ["env-filter","json"] }
6464
test-log = { version = "0.2.16", default-features = false, features = [
6565
"trace",
6666
] }
6767
clap = "4.5.23"
68-
rbac-registration = { version = "0.0.6", path = "../rbac-registration" }
68+
rbac-registration = { version = "0.0.6", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "rbac-registration-v0.0.6" }
69+
minicbor = { version = "2.0.0", features = ["alloc","half"]}
6970

7071
# Note, these features are for support of features exposed by dependencies.
7172
[features]

0 commit comments

Comments
 (0)