-
Notifications
You must be signed in to change notification settings - Fork 375
refactor(tests-types): Refactor test types, always validating t8n BAL if present #1742
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
refactor(tests-types): Refactor test types, always validating t8n BAL if present #1742
Conversation
5d1606d to
640348d
Compare
70a7786 to
be41913
Compare
640348d to
b1d7cd9
Compare
be41913 to
20db73a
Compare
b1d7cd9 to
5b3d50f
Compare
* feat(zkevm): create pure ether transfer worst case * fix(tests): update iteration and transfer amount config * refactor: add iterator for the sender and receiver list * doc: update changelog * refactor(tests): simplify sender and receiver list generation * refactor(tests): streamline ether transfer case handling
4388bef to
0395133
Compare
- Validate static checks on the t8n BAL if it exists - IF the expectation also exists, validate against the expectation Keep these checks separate as this helps validation now that we fill for all tests, regardless if they have an expectation or not.
5b3d50f to
874ab91
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## eips/amsterdam/eip-7928 #1742 +/- ##
========================================================
Coverage 82.67% 82.67%
========================================================
Files 797 797
Lines 47864 47864
Branches 4308 4308
========================================================
Hits 39571 39571
Misses 7807 7807
Partials 486 486
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
spencer-tb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks.
| # Always validate BAL structural integrity (ordering, duplicates) if present | ||
| if t8n_bal is not None: | ||
| t8n_bal.validate_structure() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell this is the only new code and the rest is refactored?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep!
|
Feel free to merge from my end. |
🗒️ Description
We were writing tests specific to BALs but now that we turned on all tests, some of the ordering checks from the specs were not getting caught. We should separate the static validation checks on the t8n BAL coming from the specs (
BlockAccessList) from the validation that happens against a definedBlockAccessListExpectationin a BAL-specific test.This PR moves the ordering and validation checks for the t8n BAL over to that class, as it should've probably been from the start. This way we always perform this validation on the BAL coming from t8n and IF we also define an expectation we only validate against the expectation in this second step.
This correctly catches duplicate entries from this report while filling tests: https://discord.com/channels/595666850260713488/1434985857823146059/1434999311812530176
✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx tox -e statictype(scope):.Cute Animal Picture