-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(vm): add gateway changes to fast vm #3236
Conversation
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.
Would it be possible to unit-test pubdata logic in multivm
? (I'd imagine by setting ProtocolVersionId
to the gateway version.) AFAICT, pubdata-related fields are covered by shadow VM checks, so these tests could help checking that the relevant logic works identically for vm_latest
and vm_fast
. Can be done separately, of course.
|
||
// Save the pubdata for the future initial bootloader memory building | ||
self.bootloader_state | ||
.set_pubdata_input(pubdata_input.clone()); |
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.
Nit: clone()
isn't necessary here.
Also, since pubdata_input
is almost only read from the VM, so it could be relatively straightforward to return pubdata_input
from this function (e.g., by supplying pubdata: Option<(&dyn PubdataBuilder, &mut PubdataInput)>
to it), and then use it in finish_batch()
. I'm not sure a similar transform would work for vm_latest
though, and we'd probably want to keep BootloaderState
equivalent for both (ideally, it'd make sense to share it).
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.
Removed clone.
Not sure I understood the point for returning pubdata_input
, can you elaborate on why is it better than storing and reading it from BootloaderState
?
Do you mean something particular? Rollup/Validium pubdata builders' logic is covered with tests in |
What ❔
Ports VM changes to vm_fast that are needed for gateway version. Code changes are mostly copied from vm_latest
Why ❔
vm_fast should support new protocol version
Checklist
zkstack dev fmt
andzkstack dev lint
.