ethereumjs-monorepo
ethereumjs-monorepo copied to clipboard
BLOCK_gasUsed_GivenAsList_Frontier: test passes but for the wrong reason
I thought we had fixed the problem where the gasUsed is a list, since the test passes. However, it passes because Block thinks gasUsed is 0, while the block which runs has a nonzero gas usage if you execute it (so blockchain throws here, not block). In the constructor, Block should throw if you try to instantiate any of the values which is not a Buffer.
I would also assume that TS would throw if you try to call it with Buffer[] instead of Buffer but that does not seem to be the case.
Relevant test: BLOCK_gasUsed_GivenAsList_Frontier, run this with npm run test:blockchain -- --test=BLOCK_gasUsed_GivenAsList_Frontier --fork=Chainstart
Also check any other value which could be a list and immediately throw. We might want to update toBuffer here or create a proxy function which handles this problem (throw if the input is a list).
What is the status of this?
What is the status of this?
At the risk of repeating myself: is this still an issue? 😋
Wow I'm sorry about not responding here. I will check, but am fairly sure that this is still an issue.
In fact this issue might be expanded a bit broader: for each ethereum/test which reports failing blocks/txs, check if the error is indeed the expected error and not caused by something else.
I would really appreciate if we can check here if the smaller issue is addressed (the gasUsed thing), and then close the issue here.
In case there is a broader issue with expected errors (see last comment) which we want to tackle it would be good if this then gets a new separate issue, not suggesting this though, this is just one possibility.
This one can be integrated along with checking the skipped tests I think. The goal is to verify for each test which should fail, that the reason it fails is right and not some weird other error. (So #2929)
No follow-up, will close. Generally outdated and - somewhat - likely solved or not relevant anymore.