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: Stable tracer interface #46

Merged
merged 63 commits into from
Aug 28, 2024
Merged

feat: Stable tracer interface #46

merged 63 commits into from
Aug 28, 2024

Conversation

joonazan
Copy link
Contributor

No description provided.

@joonazan joonazan force-pushed the stable-tracer-interface branch from 2a8ae8e to 0ef5c9b Compare July 22, 2024 14:58
@joonazan joonazan force-pushed the stable-tracer-interface branch 3 times, most recently from 621df5a to 29a6ad7 Compare August 1, 2024 10:56
eravm-stable-interface/src/lib.rs Outdated Show resolved Hide resolved
eravm-stable-interface/src/lib.rs Outdated Show resolved Hide resolved
src/instruction.rs Outdated Show resolved Hide resolved
src/tracing.rs Show resolved Hide resolved
eravm-stable-interface/src/lib.rs Outdated Show resolved Hide resolved
@joonazan joonazan force-pushed the stable-tracer-interface branch from cc4021b to 12835e0 Compare August 5, 2024 18:19
joonazan added 13 commits August 6, 2024 12:57
This way there is no need for the integration to juggle it when
the VM is suspended. It also enables tracers to manipulate it.

This also changes the pc storage format of previous frames and
near calls from u16 to *const Instruction, which increases memory
use and may hurt performance, so may need to be changed.
Tracers add code to instructions directly, so the performance impact is minimized.

Introduces a lot of ugliness that needs to be addressed:
 - World is now World<T> because otherwise it isn't object safe
 - &PANIC is now &*vm.panic because panic's code depends on the tracer
 - UNIMPLEMENTED_INSTRUCTION isn't quite as bad because of questionable
   unsafe code
@joonazan joonazan force-pushed the stable-tracer-interface branch from 12835e0 to a03ac29 Compare August 6, 2024 10:59
@joonazan
Copy link
Contributor Author

joonazan commented Aug 6, 2024

I wrote tests and found out that the type system construction that I did doesn't actually work. The generic parameter and autoref specialization don't work together. I think there is some alternative formulation that does work but I haven't found it yet.

eravm-stable-interface/src/lib.rs Show resolved Hide resolved
eravm-stable-interface/src/lib.rs Outdated Show resolved Hide resolved
eravm-stable-interface/Cargo.toml Outdated Show resolved Hide resolved
eravm-stable-interface/src/state_interface.rs Outdated Show resolved Hide resolved
eravm-stable-interface/src/state_interface.rs Outdated Show resolved Hide resolved
src/tracing.rs Outdated Show resolved Hide resolved
src/tracing.rs Outdated Show resolved Hide resolved
src/tracing.rs Outdated Show resolved Hide resolved
src/tracing.rs Outdated Show resolved Hide resolved
src/tracing.rs Outdated Show resolved Hide resolved
@joonazan joonazan merged commit dc73bb4 into master Aug 28, 2024
7 checks passed
@joonazan joonazan deleted the stable-tracer-interface branch August 28, 2024 16:37
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants