feat(arithmetization): modify elf_to_json_gen to add ssz prefix as an independent blob at _input_start#3513
Merged
Conversation
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
lorenzogentile404
marked this pull request as draft
July 6, 2026 16:07
Signed-off-by: Lorenzo Gentile <lorenzo.gentile@consensys.net>
lorenzogentile404
marked this pull request as ready for review
July 6, 2026 16:23
…gen-to-add-ssz-prefix-as-an-independent-blob-at-_input_start
OlivierBBB
reviewed
Jul 6, 2026
|
|
||
| prefix := make([]byte, 8) | ||
| binary.LittleEndian.PutUint64(prefix, uint64(len(ssz))) | ||
| blobs := []memoryBlob{{offset: inBytesOffset, data: prefix, name: "ssz_length"}} |
Contributor
There was a problem hiding this comment.
I guess it's valid go if you were able to push it to the repo but wouldn't you wan to write
blobs := []memoryBlob{ memoryBlob{offset: inBytesOffset, data: prefix, name: "ssz_length"} }instead ?
Contributor
Author
There was a problem hiding this comment.
The 2 are equivalent. In the first case, the outer keyword already defines what comes next, so the inner keyword can be omitted @OlivierBBB.
…gen-to-add-ssz-prefix-as-an-independent-blob-at-_input_start
lorenzogentile404
deleted the
3511-featarithmetization-modify-elf_to_json_gen-to-add-ssz-prefix-as-an-independent-blob-at-_input_start
branch
July 7, 2026 12:18
This file contains hidden or 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
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.
This is the current format of the
JSONfile taken as input by the RV interpreter written in zkc:When it comes to
sszfiles as input, we pre-process them to add at the beginning a 8 bytes prefix as LE containing the byte count of thesszbody.We do not want to touch the
sszfile, but instead just add that prefix at_input_startas an independent blob.elf_to_json_genis the script that needs to be edited.