asterisc
asterisc copied to clipboard
Binary serialization of VMState and monorepo update to 117c9a427168
Description
Adds support for binary serialization of snapshots, while preserving compatibility with JSON snapshots. We infer the type of the snapshot by looking at the file type, and dynamically choose whether to use binary representation of json representation.
Mirror of cannon PR here: https://github.com/ethereum-optimism/optimism/pull/11718. This PR uses cannon's serialize package.
Using binary snapshots are expected to improve the performance.
Tests
-
Individual tests for VMState / Memory serialization/deserialization are added here: https://github.com/ethereum-optimism/asterisc/blob/feature/mininny/binary-serialization/rvgo/fast/state_test.go, https://github.com/ethereum-optimism/asterisc/blob/585e8ff7f3a763d36c64585f9fc52385875c5fde/rvgo/fast/memory_test.go
-
Existing tests, like prestate comparison which uses json representation are confirmed as passing.
Codecov Report
Attention: Patch coverage is 20.19231% with 83 lines in your changes missing coverage. Please review.
Project coverage is 62.05%. Comparing base (
019d4b9) to head (6928d38).
:exclamation: There is a different number of reports uploaded between BASE (019d4b9) and HEAD (6928d38). Click for more details.
HEAD has 1 upload less than BASE
Flag BASE (019d4b9) HEAD (6928d38) 2 1
Additional details and impacted files
@@ Coverage Diff @@
## master #82 +/- ##
==========================================
- Coverage 71.03% 62.05% -8.98%
==========================================
Files 16 26 +10
Lines 2772 3236 +464
==========================================
+ Hits 1969 2008 +39
- Misses 719 1112 +393
- Partials 84 116 +32
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.