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!: add log_step and verify_step #297

Merged
merged 1 commit into from
Dec 20, 2024
Merged

feat!: add log_step and verify_step #297

merged 1 commit into from
Dec 20, 2024

Conversation

mpernambuco
Copy link
Collaborator

@mpernambuco mpernambuco commented Dec 17, 2024

This branch adds the ability to record and verify a step log file of a given number of mcycles.
New API methods:

  • log_step(mcycle_count, filename)
  • verify_step(hash_before, filename, mcycle_count, hash_after)

CLI

$ cartesi-machine  --max-mcycle=0 --log-step=10,/tmp/step2.bin 
Logging step of 10 cycles to /tmp/step2.bin
0: 6eb4c70488042d71abb54b7be683385359474f7adc50a4cc4dc12d62ae182491
10: 07d65b0492a159005829b9feb17a26be1623b9124fa5c478c828fd038cff6c36

@mpernambuco mpernambuco force-pushed the feature/log-step-b branch 5 times, most recently from 1a75c06 to 9b8e9fc Compare December 17, 2024 14:51
@edubart edubart added the enhancement New feature or request label Dec 17, 2024
@edubart edubart added this to the v0.19.0 milestone Dec 17, 2024
src/machine-merkle-tree.cpp Outdated Show resolved Hide resolved
src/replay-step-state-access.h Outdated Show resolved Hide resolved
src/machine-c-api.h Show resolved Hide resolved
src/cartesi-machine.lua Outdated Show resolved Hide resolved
src/machine-c-api.cpp Outdated Show resolved Hide resolved
src/cartesi-machine.lua Outdated Show resolved Hide resolved
src/machine-c-api.h Outdated Show resolved Hide resolved
tests/lua/machine-bind.lua Outdated Show resolved Hide resolved
tests/lua/machine-bind.lua Outdated Show resolved Hide resolved
src/machine-c-api.cpp Show resolved Hide resolved
src/machine-merkle-tree.cpp Outdated Show resolved Hide resolved
src/replay-step-state-access-interop.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@diegonehab diegonehab left a comment

Choose a reason for hiding this comment

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

See comments.

tests/lua/cartesi-machine-tests.lua Outdated Show resolved Hide resolved
src/machine.cpp Outdated Show resolved Hide resolved
@mpernambuco mpernambuco force-pushed the feature/log-step-b branch 3 times, most recently from bae6a46 to 80e8942 Compare December 18, 2024 13:52
@mpernambuco mpernambuco force-pushed the feature/log-step-b branch 4 times, most recently from 7920f80 to af965ed Compare December 19, 2024 12:17
@edubart edubart merged commit b4a2907 into main Dec 20, 2024
8 checks passed
@edubart edubart deleted the feature/log-step-b branch December 20, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants