Skip to content

Commit 9eef32a

Browse files
committed
Add separate Backwards Compatiblity section
1 parent 1be5a30 commit 9eef32a

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

spec/eofv0_verkle.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ An alternative to the existing method of executing
77

88
## Goal
99

10-
1. Provide the result of the jumpdest analysis of a deployed code as the EOF section.
10+
Provide the result of the jumpdest analysis of a deployed code as the EOF section.
1111
During code execution the jumpdest analysis is already available
1212
and the answer to the question "is this jump target valid?" can be looked up
1313
in the section. This allows using 32-byte Verkle Tree code chunks
1414
(instead of 31-byte of code + 1 byte of metadata).
15-
2. EOF-packaged code execution if fully compatible with the legacy code execution.
1615

1716
## Specification Draft
1817

@@ -30,6 +29,21 @@ in the section. This allows using 32-byte Verkle Tree code chunks
3029
and also for every contract creation later
3130
(i.e. becomes the part of the consensus forever).
3231

32+
## Backwards Compatibility
33+
34+
EOF-packaged code execution if fully compatible with the legacy code execution.
35+
This is achieved by prepending the legacy code with EOF header and the section containing
36+
jumpdest metadata. The contents of the code section is identical to the lagacy code.
37+
38+
Moreover, the wrapping process is bidirectional: wrapping can be created from the legacy code
39+
and legacy code extracted from the wrapping without any information loss.
40+
Implementations may consider keeping the legacy code in the database without modifications
41+
and only construct the EOF wrapping when loading the code from the database.
42+
43+
It also can be noted that information in the *jumpdest* section is redundant to the `JUMPDEST`
44+
instructions. However, we cannot remove these instructions from the code because
45+
this would break at least *dynamic* jumps (where we will not be able to adjust their jump targets).
46+
3347
## Rationale
3448

3549
### Jumpdests encoding

0 commit comments

Comments
 (0)