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

Update EOF validation test for top-level containers #1381

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

chfast
Copy link
Member

@chfast chfast commented Jun 6, 2024

  • Update tests because of the validation rule change: top-level
    containers must not have truncated data.
  • Fix some expected error messages.
  • Change ">=Prague" to "Prague" because not supported in retesteth.

@@ -92,6 +92,8 @@ validInvalid:
00 # 3 STOP
# Data segment
0bad # 2 bytes instead of four
expectException:
"Prague" : "err: toplevel_container_truncated"
Copy link
Collaborator

@winsvega winsvega Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use pyspec exception style now
EOFException.TOPLEVEL_CONTAINER_TRUNCATED

@@ -116,7 +118,7 @@ validInvalid:
# Data segment
0bad60A70BAD # 6 bytes instead of four
expectException:
">=Prague" : "EOF_InvalidSectionBodiesSize"
"Prague" : "EOF_InvalidSectionBodiesSize"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but legacy exceptions are also fine. we are planning to convert json tests into .py eventually anyway

}
}
},
"EOF1_truncated_section_4": {
"code": "0xef000101000402000100010400020000800000feaa",
"results": {
"Prague": {
"result": true
"exception": "err: toplevel_container_truncated",
Copy link
Collaborator

@winsvega winsvega Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use the error code. EOFException.TOPLEVEL_CONTAINER_TRUNCATED or retetesteth style

@winsvega
Copy link
Collaborator

winsvega commented Jul 8, 2024

Test Case "efValidation": (3 of 9)
Error: Test /home/travis/build/ethereum/tests/EOFTests/efValidation/EOF1_undefined_opcodes_.json is outdated. Filler hash is different! ('1c79' != '1d40')  (EOFTests/efValidation/EOF1_undefined_opcodes_Copier, step: CheckFiller)
Error: Tests are not generated (forgot --filltests?): 
 /home/travis/build/ethereum/tests/src/EOFTestsFiller/efValidation/EOF1_undefined_opcodes_Copier.json => /home/travis/build/ethereum/tests/EOFTests/efValidation/EOF1_undefined_opcodes_.json

chfast added a commit to ethereum/evmone that referenced this pull request Aug 8, 2024
Switch to the updated `eof-toplevel` branch of ipsilon/tests.
After rebasing the number of changes is smaller than it was.
The ethereum/tests PR: ethereum/tests#1381.
chfast added a commit to ethereum/evmone that referenced this pull request Aug 8, 2024
Switch to the updated `eof-toplevel` branch of ipsilon/tests.
After rebasing the number of changes is smaller than it was.
The ethereum/tests PR: ethereum/tests#1381.

Also run the EOF tests from upstream ethereum/tests v14.0
with longer exclusion list.
chfast added a commit to ethereum/evmone that referenced this pull request Aug 8, 2024
Switch to the updated `eof-toplevel` branch of ipsilon/tests.
After rebasing the number of changes is smaller than it was.
The ethereum/tests PR: ethereum/tests#1381.

Also run the EOF tests from upstream ethereum/tests v14.0
with longer exclusion list.
chfast added a commit to ethereum/evmone that referenced this pull request Aug 8, 2024
Switch to the updated `eof-toplevel` branch of ipsilon/tests.
After rebasing the number of changes is smaller than it was.
The ethereum/tests PR: ethereum/tests#1381.

Also run the EOF tests from upstream ethereum/tests v14.0
with longer exclusion list.
- EOFTests/EIP3540/validInvalid.json: ethereum/execution-spec-tests#598
- EOFTests/efValidation/EOF1_truncated_section_.json: ethereum/execution-spec-tests#740
- EOFTests/efValidation/EOF1_eofcreate_valid_.json: ethereum/execution-spec-tests#738
- Update tests because of the validation rule change: top-level
  containers must not have truncated data.
- Fix some expected error messages.
- Change ">=Prague" to "Prague" because not supported in retesteth.
@winsvega winsvega merged commit fd26aad into ethereum:develop Aug 20, 2024
2 checks passed
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.

2 participants