-
Notifications
You must be signed in to change notification settings - Fork 11
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: implement kernel mode #42
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Returning your calldata is allowed in kernel mode. I should see if the fuzzer can catch this mistake in vm2. |
Stipend and extra costs require kernel mode and system call |
Most of the fields are meaningless in case of panic but no reason to be too heavy-handed here.
This is necessary for zk_evm compatibility.
The heap is always grown accoring to the last 32 bits of the index, even if the index is huge.
# What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`.
montekki
approved these changes
Jul 22, 2024
joonazan
pushed a commit
that referenced
this pull request
Sep 24, 2024
🤖 I have created a release *beep* *boop* --- ## [0.2.0](v0.1.0...v0.2.0) (2024-09-23) ### Features * Brush up repo for publishing ([#58](#58)) ([69ac5ed](69ac5ed)) * exposes necessary methods on heap newtype ([#43](#43)) ([9342db7](9342db7)) * implement kernel mode ([#42](#42)) ([2407d39](2407d39)) * Stable tracer interface ([#46](#46)) ([dc73bb4](dc73bb4)) * Track `storage_refunds` and `pubdata_costs` stats ([#48](#48)) ([2882a12](2882a12)) ### Bug Fixes * base being in the kernel on address, not code address ([#31](#31)) ([d9cb911](d9cb911)) * bugs in initial writes change ([#36](#36)) ([8defb4a](8defb4a)) * don't repeatedly get initial values ([#35](#35)) ([50fdbfa](50fdbfa)) * filter out initial writes of zero ([#39](#39)) ([a291c24](a291c24)) * Fix `Heap` equality comparison ([#51](#51)) ([a0cf04b](a0cf04b)) * Fix decommit opcode semantics ([2882a12](2882a12)) * Fix decommitment cost divergence ([#57](#57)) ([d385127](d385127)) * Fix decommitment logic on out-of-gas ([#56](#56)) ([2276b7b](2276b7b)) * fuzz test ([#30](#30)) ([d516967](d516967)) * fuzz.sh ([#64](#64)) ([e8e72b5](e8e72b5)) * fuzzer now makes short programs; fix crash in near call ([#52](#52)) ([985a778](985a778)) * infinite test ([#34](#34)) ([81185a5](81185a5)) * invalid instruction unsoundness ([#61](#61)) ([74577d9](74577d9)) * record history for aux heap as well ([#49](#49)) ([2877059](2877059)) * record pubdata used by precompiles ([#27](#27)) ([a7de066](a7de066)) * report correct heap sizes in ContextMeta ([#26](#26)) ([493fcec](493fcec)) * revert pubdata on failed near call, too ([#28](#28)) ([fabc553](fabc553)) * StateInterface::current_frame did not work with near calls ([#65](#65)) ([53f8f88](53f8f88)) * track transaction number in changes ([#33](#33)) ([e683ae8](e683ae8)) ### Performance Improvements * Implement segmented heap ([#53](#53)) ([d2405bc](d2405bc)) * optimize external snapshots ([#47](#47)) ([952ecd4](952ecd4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: zksync-era-bot <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because I wanted to use the fuzzer to test this feature and it is tricky to test, I ended up fixing all other discrepancies wrt. zk_evm as well.