Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cosmic-swingset): chain-level transcripts #6931

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mhofman
Copy link
Member

@mhofman mhofman commented Feb 6, 2023

refs: #6920, #6929

Description

This introduces a chain-level transcript, and a "basic" tool to replay from that transcript, currently only enforcing that "bank" outbound bridge messages match (ignoring storage bridge sends).

This allows to verify that a different version of XS didn't change so dramatically that the JavaScript did different observable things. It should also allow to observe the impact of internal improvements to liveslots / swingset. Finally it may allow to observe the impact of contract changes, if their overall behavior doesn't change dramatically (same set of wallet actions results in same set of chain changes)

Security Considerations

None

Scaling Considerations

None

Documentation Considerations

Internal tooling

Testing Considerations

This is not tested per se, as most cosmic-swingset tools, but enables a variety of new testing, which we expect to make more use of, like for #6929, or future performance improvements.

//
// The first 3 are sinks only. bridgeOutbound returns a result (for now)
// The actionQueue is used as a synchronous iterator drained at once
const recordChainActionWrap =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like a name that better conveyed Wrap and Record being a verb, if either or both of them are. wrapWithChainActionRecorder? makeChainActionRecordWrapper? makeChainActionRecorder?

I'm not sure but am open to your suggestion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah naming is hard. wrapWithChainActionRecorder seems like a better fit.

@mhofman mhofman force-pushed the mhofman/chain-transcript-replay-tool branch from d65aba1 to 5332018 Compare February 28, 2023 21:17
Default for wrapWithChainActionRecorder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants