-
Notifications
You must be signed in to change notification settings - Fork 82
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
feat(tests): Add blob gas subtraction order tests #407
feat(tests): Add blob gas subtraction order tests #407
Conversation
464b83a
to
04e4b29
Compare
I initially tried to verify the balance values stored within the post state of the This was easy without the additional parameterization of the However when it came to using the Would you like me continue and add a check for the balance? Similarly sstore the return value of the call to send funds? |
So if we try to check the stored balance, the balance should be zero only for cases where both (a) and (b) are true, because if you check the validation steps in 1559 (which are very similar to 4844) https://eips.ethereum.org/EIPS/eip-1559, the formula for the minimum balance for the transaction to be intrinsically valid takes So this is why we fund the account with the maximum amount it would have to pay in any block, because otherwise the transaction is invalid. |
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.
Looks really good, just a few comments.
To calculate the actual balance we can use a similar approach to function |
ddee4dc
to
f226e54
Compare
We now have the Within: f226e54 I removed a duplicate fixture. I am just working on adding the |
We should be a go now! |
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.
Awesome! Thanks!
🗒️ Description
Adds parameterized tests to ensure that the blob gas fee is subtracted from the sender's balance before a blob transaction is executed. Includes the case where the sender recieves funds before the blob tx is executed.
🔗 Related Issues
As requested by @marioevz: #385
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.