-
Notifications
You must be signed in to change notification settings - Fork 659
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
[WIP] Update upstream tests for Istanbul #1852
Conversation
Test failures are related to this issue: ethereum/tests#637. |
Tests are crashing on CircleCi. I ssh'd into the machine and monitored the memory usage using htop. When the tests are about to crash the memory usage shoots to 4gb. CircleCI by default allocates 4gb of RAM which is the reason for the crash IMO. I tried increasing the machine size but currently, the paid tier doesn't support large instances (d7bd8c1). |
62c1fa4
to
d7bd8c1
Compare
@@ -43,8 +43,8 @@ | |||
) | |||
|
|||
FIRST_TX_GAS_LIMIT = 367724 | |||
SECOND_TX_GAS_LIMIT = 62050 | |||
THIRD_TX_GAS_LIMIT = 104789 | |||
SECOND_TX_GAS_LIMIT = 63042 |
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.
Had to increase gas price(+992
) here in order to get the tests passing. Don't know how updating upstream tests affects benchmark tests. Is this expected or should I dig into this? cc @cburgdorf
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.
Istanbul reprices some opcodes so I'm relatively sure that this change in the tx gas limit is legit. 👍
b142505
to
4b96de7
Compare
UPDATE: I got tests to turn green by marking the tests slow that were consuming a lot of memory. |
fix copy/paste
e864aee
to
0d0c58c
Compare
upstream tests now include blockchain tests for Istanbul. 11 tests are failing at the moment. I will look at these test failures later. |
Semi-OT: may I also note that in the test durations, there's
Perhaps these should be marked OTOH, the entire "run tox" section is 02:26, so maybe that's fine. |
…ost_stae` to handle this case. renamed existing method `normalize_post_state` to `normalize_post_state_hash`
Yeah CI runs them in parallel. @veox I could borrow a little help from you. This is regarding the failing tests in Istanbul. I did not get time to look closely into the issue but I thought that I'd gather some information before I'd start digging. Until now I have figured out that the |
@voith I don't remember the specifics (poor memory). I think it was Trinity not applying new EIP-1283 gas refund rules to pre-compiles (as it rightfully shouldn't); but again, not even sure on that.
This can happen for any reason. Different gas use/stipend if storage is empty, or a different value being written to storage ( Copy-paste from gitter: Sorry I can't help better with [this PR] ATM. I made some bad choices y-day, and ended up with a hangover. But from the failing test names, it looks like the same bunch as already in There's still the disconnect between The particular issue is not covered in any EIP, and is about a "synthetic" state of a contract that can't be arrived to by regular EVM operation. So, perhaps add the |
@@ -156,7 +161,7 @@ def chain_vm_configuration(fixture: Dict[str, Any]) -> Iterable[Tuple[int, Type[ | |||
(0, SpuriousDragonVM), | |||
(5, ByzantiumVM), | |||
) | |||
elif network == 'ByzantiumToConstantinopleAt5': | |||
elif network == 'ByzantiumToConstantinopleFixAt5': |
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.
This looks suspicious, the previous name ByzantiumToConstantinopleAt5
was correctly reflected with the selected VMs ByzantiumVM
and ConstantinopleVM
. But now the transition seems to go from Byzantium
to ConstantinopleFix
where ConstantinopleFix
is the ethereum/test
way to refer to PetersburgVM
.
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.
Thanks for catching this. I need to verify this again. But this was something that I had changed just to get the tests passing. Since the tests didn't complain, I didn't forget to verify this change. If the tests have in fact been renamed then I need to change line 167 to PetersburgVM
👍 . I will verify this and make sure that I haven't missed any case(since tests didn't raise ValueError, I assume I didn't).
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.
I've grepped fixtures
, and there are no longer instances of string ByzantiumToConstantinopleAt5
there.
The upstream test checks for main-net transition from ByzantiumVM
to PetersburgVM
, it seems. These two files (just one generated test file):
fixtures/BlockchainTests/TransitionTests/bcByzantiumToConstantinopleFix/ConstantinopleFixTransition.json: "network" : "ByzantiumToConstantinopleFixAt5",
fixtures/src/BlockchainTestsFiller/TransitionTests/bcByzantiumToConstantinopleFix/ConstantinopleFixTransitionFiller.json: "network" : "ByzantiumToConstantinopleFixAt5",
@voith You pinged me for a review. I skimmed over this and left a view comments. I noticed the failing tests but didn't get into debugging those. Do you need help debugging them? Do you know anything about the failures yet? I know upgrading these tests is more like an art than a craft so I'm trying to gather as much info from you as I can before I start diving in ;) |
@cburgdorf I triggered the review button by mistake. I've been meaning to sit and debug these tests but haven't got time.
Actually, I wanted to do this by myself. On Saturday I tried debugging for a while and I ended up learning a lot about the VM. But I only ended up learning about the VM, didn't debug anything. But I will be unable to get back to this anytime soon.
So I didn't get too far with debugging this. But here are a few pointers:
|
Ah, no problem!
To be honest, I'm not sure if I could complete it any earlier. I'm knee deep in adding Görli support and would rather like to avoid the context switch if I can 😅 So, carry on and if it's helpful we can also stick heads together at devcon or the days right after 👍 |
FTR, I started looking into this, too. Failing locally:
Those look suspiciously like the existing cases where "synthetic" state stays cleared even after a I vaguely remember someone from (EDIT: I did see how that can be seen as "valid logic", based on which order the rules are applied in: first the "clear on touch", or first the "no change on revert". I'll still maintain that Or maybe that's just a faulty memory chip. Anyway, I hope to look into EVM stack traces tomorrow, see if it's "same old" or a genuine new bug. |
superseded by #1858. |
What was wrong?
Please ignore this for now. I'm just experimenting. I will ping the team once it's ready or if I need help
How was it fixed?
not fixed yet.
TODO:
To-Do
Cute Animal Picture