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: mechanics to capture conflations & replay them as test cases #561

Merged
merged 8 commits into from
Jan 24, 2024

Conversation

delehef
Copy link
Contributor

@delehef delehef commented Jan 22, 2024

This PR adds two feature:

  • an RPC endpoint available under rollup_captureConflation, accepting a first and last block as params, and returning a JSON-encoded representation of the minimal set of information required to replay the given block range without requiring a fully-synchronized blockchain state, e.g.:
curl -X POST 'http://localhost:8545'
--data '{
   "jsonrpc":"2.0",
   "method":"rollup_captureConflation",
   "params":["296519", "296521"], "id":"1"
 }'
| jq '.result.capture' -r 
| gzip > arithmetization/src/test/resources/replays/my-test-case.json.gz
  • an extension of the test framework to load a minimal state as defined above, and replay it as a unit test without requiring access to an archive of the blockchain state, through the use of the ReplaysTests.replay(String fileName) static method.

@delehef delehef force-pushed the feat/block-capture branch 3 times, most recently from f2cc8e4 to 7350c60 Compare January 22, 2024 19:14
@delehef delehef changed the title feat: mechanices to capture conflations & replay them as test cases feat: mechanics to capture conflations & replay them as test cases Jan 22, 2024
@delehef delehef force-pushed the feat/block-capture branch 2 times, most recently from 42c2ef7 to 40893ef Compare January 23, 2024 09:19
Copy link
Collaborator

@letypequividelespoubelles letypequividelespoubelles left a comment

Choose a reason for hiding this comment

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

LGTM

@delehef delehef force-pushed the feat/block-capture branch from 40893ef to 2a32fb3 Compare January 24, 2024 08:37
@delehef delehef force-pushed the feat/block-capture branch from 29df20d to 7c8f889 Compare January 24, 2024 09:59
@delehef delehef force-pushed the feat/block-capture branch from 7c8f889 to 6a7c356 Compare January 24, 2024 10:01
@delehef delehef merged commit e02540b into main Jan 24, 2024
6 checks passed
@delehef delehef deleted the feat/block-capture branch January 24, 2024 10:47
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.

3 participants