x 5ce5bf4416 chore: Update halo2 crates 2 месяцев назад
..
src eec7de2ecd refactor: move compute_fee from validator to sdk/blockchain and remove drk dependency on validator feature due to validator feature's deploy_native_contracts function 4 месяцев назад
.gitignore ff477eb2f0 script/research/tx-replayer: a tool to replay a transaction by resetting the blockchain database to a height before the transaction was added at 7 месяцев назад
Cargo.toml 5ce5bf4416 chore: Update halo2 crates 2 месяцев назад
Makefile ff477eb2f0 script/research/tx-replayer: a tool to replay a transaction by resetting the blockchain database to a height before the transaction was added at 7 месяцев назад
README.md d43a456f7b script/research/tx-replayer: add wasm, zkp and sig command line flags inorder to verify either wasm runtime, zkp or signature part of the transaction inorder to see resources usage for each parts of a tx verification 7 месяцев назад

README.md

Tx-Replayer

A lightweight transaction replay tool for debugging and analyzing transactions, as well as measuring resource usage during transaction verification with profiler tools such as heaptrack and samply.

Disclaimer: Use this tool only on a copy of your database. Running it on a live database may cause data loss or corruption.

Usage

Build

% make

To replay the whole transaction verification step.

% ./tx-replayer --database-path [DATABASE_PATH] --tx-hash [TX_HASH]

To replay only the Zk proof verification part.

% ./tx-replayer --zkp --database-path [DATABASE_PATH] --tx-hash [TX_HASH]

To replay only the wasm Runtime verification part.

% ./tx-replayer --wasm --database-path [DATABASE_PATH] --tx-hash [TX_HASH]

To replay only the signature verification part.

% ./tx-replayer --sig --database-path [DATABASE_PATH] --tx-hash [TX_HASH]

You can run samply to see the CPU usage of the transaction verification.

% samply record ./tx-replayer --database-path [DATABASE_PATH] --tx-hash [TX_HASH]