nearcore icon indicating copy to clipboard operation
nearcore copied to clipboard

Transaction replay testing tool

Open ilblackdragon opened this issue 4 years ago • 4 comments

Tool, that allows to:

  • Read out chain history
  • Recreate transactions, where all keys are replaced with new keys this tool created.
  • Replay all of these transaction on the initial state.
  • Validate that state outside of keys matches.
  • Validate that performance is within expected bounds

Additional considerations, that transactions relaying on randomness output or transaction hash, hence this can only be done within runtime-standalone where a context can be provided.

Performance changes of runtime can be tracked using this tool.

PS. Ethereum transaction replay can be cool as well, but may be even harder to orchestrate as there will be context.

ilblackdragon avatar May 05 '20 21:05 ilblackdragon

Do you want to have a tool that will re-submit all the transactions to a regularly running network or use runtime-standalone and only check the state?

FYI, some preliminary infrastructure of runtime-standalone is getting closer: https://github.com/nearprotocol/nearcore/blob/97ac8315e275f594090cc8fd6698a17b29707fe3/runtime/runtime-standalone/src/lib.rs#L261-L314

frol avatar May 05 '20 21:05 frol

We can do both, and start with runtime-standalone as it is going to be easier. Having both will allow us to immediately find whether the source of regression is in the runtime or inside the chain, e.g. p2p network.

maxzaver avatar May 05 '20 21:05 maxzaver

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 01 '21 10:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 30 '21 18:09 stale[bot]