asterisc icon indicating copy to clipboard operation
asterisc copied to clipboard

Binary serialization of VMState and monorepo update to 117c9a427168

Open mininny opened this issue 1 year ago • 1 comments

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.

mininny avatar Oct 01 '24 18:10 mininny

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).

Files with missing lines Patch % Lines
rvgo/fast/state.go 18.46% 27 Missing and 26 partials :warning:
rvgo/cmd/witness.go 0.00% 14 Missing :warning:
rvgo/fast/memory.go 42.85% 6 Missing and 6 partials :warning:
rvgo/cmd/run.go 0.00% 3 Missing :warning:
rvgo/cmd/load_elf.go 0.00% 1 Missing :warning:

: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.

codecov-commenter avatar Oct 01 '24 19:10 codecov-commenter