EIP1559 blockchain tests#837
Conversation
This comment has been minimized.
This comment has been minimized.
|
I think we can remove the python sanitizer scripts and json schemas from here [in a separate PR]. as retesteth checks structures validity upon test generation. and also checks that tests are updated in automatition. |
winsvega
left a comment
There was a problem hiding this comment.
very cool!
lets see if we have to rename gasTarget in our structures too. this will need some modification
|
need to review |
winsvega
left a comment
There was a problem hiding this comment.
please make sure that geth and retesteth are at latest
fix the exception names.
address the comments
and regenerate the tests
|
what happened with the branch. why changes from another branch here ? |
|
Congrats to the merge here! 🎉 😀 |
|
Hi there, Just noted that the base fee is still called Is this due to an outdated Geth version and will be updated? //cc @holiman |
|
Yeah, we have several PRs in the pipeline, and I think rpc naming is that last one, so we're definitely not up to spec at the moment |
|
@holiman ah ok, thanks, I've temporarily added a hot fix on our side. |
|
We've just run the tests from here, current failures on our side (see ethereumjs/ethereumjs-monorepo#1269): State Tests2 failures (total 150)
Blockchain Tests10 failures (total 1275)
Haven't gone into any analysis, so totally open if (more likely) things are wrong on our side or if there might be some test bugs, just dropping here for reference and for others to compare if they also stumble upon things. |
|
Update from EthereumJS: state tests are now passing (it was within our own code) For the Blockchain Tests, I think these failures are due to outdated versions of the spec that test The test comments for Block gasLimit: 1072693248 For Block gasLimit: 20019531 Same with Block gasLimit: 39960938 |
Good. That means the tests were useful.
The tests look at exactly the border line between permitted and not permitted (for example, fail at ...247, succeed at ...248): If the borderline was different, even by one gas to either direction, the To verify I downloaded the latest geth and tried badBlocks on it. It still works. Can you run the test with verbose output, and see on which block it has an error? Thanks, |
|
yes they look good! I quoted the suspect blocks in my above comment, let me know if there is a better way to identify them |
OK, sorry I didn't realize that. This block is supposed to be accepted (that's why it doesn't have an It's possible that the only problem is that retesteth doesn't recognize the exception. |
|
np, yes it's failing with our internal validation of |
InvalidBlocks
badBlocks, checks for blocks with invalid values in the headerfeeCap, checks that the fee cap is implemented correctlygasLimit20mand 4.gasLimit40m, tests cases from the geth tests https://github.com/ethereum/go-ethereum/blob/c9116a7c19301d6906c1aff87085c2fa345a84bf/consensus/misc/eip1559_test.go#L78ValidBlocks
lowDemand, checks that when gasUsed << gasTarget baseFee <- baseFee*(7/8)medDemand, checks that when gasUsed = gasTarget baseFee does not changehighDemand, checks that when gasUsed = 2gasTarget baseFee <- baseFee(9/8)checkGasLimit, check that transactions that causegasUsedto exceedgasLimitare invalidtips, check that the tipped amount given to the miner is correcttransTypes, check that all three transaction types (original, type 1 (EIP 2930), and type 2 (EIP 1559)) work.baseFee, check the behavior of basefee and selfbalance when called in multiple transactions in multiple blocks.burnVerify, verify the correct amount of wei is burnedNote: The tests needed are at https://hackmd.io/NNforJS7SMmjJ1t6jA8pgQ