ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

BLOCK_gasUsed_GivenAsList_Frontier: test passes but for the wrong reason

Open jochem-brouwer opened this issue 5 years ago • 4 comments

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).

jochem-brouwer avatar Oct 30 '20 17:10 jochem-brouwer

What is the status of this?

holgerd77 avatar Jun 01 '21 11:06 holgerd77

What is the status of this?

holgerd77 avatar Aug 10 '21 12:08 holgerd77

At the risk of repeating myself: is this still an issue? 😋

holgerd77 avatar Jan 13 '22 18:01 holgerd77

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.

jochem-brouwer avatar Jan 13 '22 18:01 jochem-brouwer

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.

holgerd77 avatar Aug 01 '23 10:08 holgerd77

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)

jochem-brouwer avatar Aug 01 '23 14:08 jochem-brouwer

No follow-up, will close. Generally outdated and - somewhat - likely solved or not relevant anymore.

holgerd77 avatar Feb 20 '24 11:02 holgerd77