-
Notifications
You must be signed in to change notification settings - Fork 709
Hooking before the first IO instruction in replay.wasm
#4283
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4283 +/- ##
==========================================
+ Coverage 34.58% 34.65% +0.06%
==========================================
Files 475 475
Lines 56720 56722 +2
==========================================
+ Hits 19619 19655 +36
+ Misses 33633 33603 -30
+ Partials 3468 3464 -4 |
❌ 4 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
bragaigor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| "keccak256" => func!(arbkeccak::keccak256), | ||
| }, | ||
| "hooks" => { | ||
| "beforeFirstIO" => func!(|_: WasmEnvMut|{}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implementation will be done in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JIT and Arbitrator provers have noop implementations.
that's why
| func validateCertificate(ty uint32, hash unsafe.Pointer) uint32 | ||
|
|
||
| //go:wasmimport hooks beforeFirstIO | ||
| func beforeFirstIO() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: maybe actionBeforeFirstIO but that doesn't make that much difference. beforeFirstIO already implies action.
replay.wasmwe call a hook. For native compilation, it's a noop. For wasm, we expect that the execution environment will provide a module calledhookswith a methodbeforeFirstIO.sp1__dumpElf(as in Add a new Succinct SP1 based arbitrator-like runner #4170)wavmio/stub.gotowavmio/native.go(it's not about stubbing, but runningreplay.wasmas a native binary instead).StubInitandStubFinaltoOnInitandOnFinal, so that together with the newOnReady, they compose a triple ofwavmiolifecycle hooks called directly fromreplay.wasm.closes NIT-4401