-
Notifications
You must be signed in to change notification settings - Fork 146
tests: update to match py-evm
: don't skip Constantinople, add Petersburg, use --fork
; break out long-running categories
#608
tests: update to match py-evm
: don't skip Constantinople, add Petersburg, use --fork
; break out long-running categories
#608
Conversation
Failure is in the usual "incorrect upstream" disagreement. |
dfd036b
to
4addf50
Compare
Enabled EDIT: Oh, wait; we're pinned to a version of |
4addf50
to
c7cc127
Compare
@@ -115,6 +115,24 @@ | |||
# The result is in conflict with the yellow-paper: | |||
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418800369 | |||
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Byzantium'), # noqa: E501 | |||
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Constantinople'), # noqa: E501 |
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 INCORRECT_UPSTREAM_TESTS
blob is the same as the one in py-evm
. It matches 1:1 the particular py-evm
version that trinity
is pinned to.
Wonder if we should make it more accessible in py-evm
so it can be imported here instead of copy-pasting.
Added a TODO comment so this is not forgotten.
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.
Are you up for making the changes and/or making an issue in py-evm to expose this API?
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'll make issues, as you outlined in:
Yeah, to avoid committing the TODO's to master, how about an issue in trinity that links to an issue in py-evm which lists the methods to expose in the API.
Wait, shouldn't we be running |
We've not even pinned the The latest state of this PR skips Updated PR summary with current state of affairs. |
py-evm
(don't skip fixtures for Constantinople, add fixtures for Petersburg)
c49dfe1
to
56ea99f
Compare
845cd46
to
eb5220a
Compare
Constantinople and Petersburg CI runs take >30 minutes on my free CircleCI account. Adding entries to |
'Call1024PreCalls_d0g0v0_EIP150', | ||
'Call1024PreCalls_d0g0v0_Byzantium', | ||
'Call1024PreCalls_d0g0v0_EIP150', | ||
'Call1024PreCalls_d0g0v0_EIP158', |
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.
The above six lines are duplicates of the first three lines in the list: therefore removed.
260613c
to
75aa66c
Compare
'ForkStressTest_Byzantium', | ||
'Create2Recursive_d0g0v0', | ||
'Create2Recursive_d0g1v0', | ||
'ForkStressTest', |
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 test is slow across all forks - however, removal of fork qualifier means that any fixture that has this string will be marked SLOW
.
Is this acceptable?
PR ready for review, I guess. (Test runs might still take very long, though.) |
py-evm
(don't skip fixtures for Constantinople, add fixtures for Petersburg)py-evm
(don't skip fixtures for Constantinople, add fixtures for Petersburg)
Hm, yeah, 30min is pretty long. Byzantium only takes 6min:
Constantinople:
I just checked the native runs in py-evm, and the total test counts look about right. (wow 2x more tests!) Interestingly, Constantinople is less than 2x slower in native, but >5x slower over RPC. There aren't anymore really long individual tests left, so I don't see an obvious way to quickly shorten the long run. :( It should help a bit when we release & import the latest py-evm. But since most of the time seems to be RPC overhead, I guess it won't help that much. |
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.
Yeah, to avoid committing the TODO's to master, how about an issue in trinity that links to an issue in py-evm which lists the methods to expose in the API.
30+ minute test jobs make me sad, but I'm not sure where to start on optimizing those yet. My first guess is that it's somewhere in lahja, since I don't remember RPC adding that much overhead before it was handled by events. cc @cburgdorf @lithp
@@ -115,6 +115,24 @@ | |||
# The result is in conflict with the yellow-paper: | |||
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418800369 | |||
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Byzantium'), # noqa: E501 | |||
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Constantinople'), # noqa: E501 |
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.
Are you up for making the changes and/or making an issue in py-evm to expose this API?
@carver If I'm not mistaken, the only thing that the JSON-RPC server uses the event bus for is to make requests to the PeerPool (e.g. to get the current peer count) but that shouldn't come into play here I guess. Worth taking a closer look into this. |
Yeah, you're right I was conflating two things: the event bus, and rpc running as an isolated plugin. I should have said the latter. So the overhead would be about sending the chain requests over multiprocessing. |
Mmh..that should not have changed the tests. It's always been that way that the RPC tests would connect via IPC and make the request. In fact, the RPC tests do not even know about the plugin. They just spin up the Lines 298 to 320 in a37f26c
|
I'm talking about the time before RPCServer was moved to a Edit: last Aug according to ethereum/py-evm@1006923 Edit 2: Okay, so not as big effect as I expected from ethereum/py-evm#1212 -- the previous PR to merge was ethereum/py-evm#1297
So something is still missing about why the rpc gap widened from 3x to 5x since then... |
Yes, but what I mean is: From the perspective of these tests, nothing has changed when the |
Ah right, which also explains why there wasn't much of a hit from ethereum/py-evm#1212 |
We could switch those CI jobs to run on Python 3.7 instead of 3.6... That said, it might not be that big of a deal for someone not using CircleCI's free tier. Another approach is to run some classes of tests separately, similar to how
I've made a separate branch to test out the latter hypothesis. EDIT:
So, a matching reduction from the previous 30+ minutes. It's a viable strategy... A yet another approach would be to avoid BTW, could it be that Testing hypothesis as separate PR #623. |
👍
Eh,
Yeah, I'm definitely in favor of this direction. |
py-evm
(don't skip fixtures for Constantinople, add fixtures for Petersburg)py-evm
(don't skip Constantinople, add Petersburg)
0c27da1
to
f516371
Compare
Identified Breaking them out further reduced Petersburg job run time to 04:10 (4:41 job total). ... But now the PR #623 is extremely likely to help with this: setting up the tests also takes very long:
Didn't check (yet) the test fixtures themselves as to why. |
265723b
to
3f5514d
Compare
Rebased on
After switching break-out categories to Python 3.7,
I'm out of good ideas, but maybe that's fast enough?.. EDIT: |
…TS and `xfail`s. The `xfail`s are a 1:1 copy of what's in py-evm's pinned commit; SLOW_TESTS are also very similar...
Mostly a copy-paste from `py-evm` codebase; relevant PRs that introduced the functionality there: ethereum/py-evm#1470 ethereum/py-evm#1577
6eec26c
to
61a25fc
Compare
Cleaned up commits; unmarking WIP; ready for review. |
py-evm
(don't skip Constantinople, add Petersburg)py-evm
: don't skip Constantinople, add Petersburg, use --fork
, break out long-running categories
py-evm
: don't skip Constantinople, add Petersburg, use --fork
, break out long-running categoriespy-evm
: don't skip Constantinople, add Petersburg, use --fork
, break out long-running categories
py-evm
: don't skip Constantinople, add Petersburg, use --fork
, break out long-running categoriespy-evm
: don't skip Constantinople, add Petersburg, use --fork
; break out long-running categories
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.
👍 to
Thanks for the cleanup
@@ -188,13 +205,33 @@ def blockchain_fixture_mark_fn(fixture_path, fixture_name): | |||
return pytest.mark.xfail(reason="Listed in INCORRECT_UPSTREAM_TESTS.") | |||
|
|||
|
|||
def generate_ignore_fn_for_fork(passed_fork): | |||
if passed_fork: | |||
passed_fork = passed_fork.lower() |
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.
nit we'd normally do this as normalized_fork = passed_fork.lower()
to avoid destroying the initial data.
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'll fix that up real quick; but note it's a copy-paste from https://github.com/ethereum/py-evm/blob/ddefa2fbad378aad6562239eb087e8eb27794fc1/tests/json-fixtures/test_blockchain.py#L231.
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'll admit we aren't always perfectly consistent about these things. Thanks for the cleanup.
will merge when green. Thanks a bunch. |
What was wrong?
Tests for
network=='Constantinople'
are being skipped.The pinned git submodule is for https://github.com/ethereum/tests/tree/420f443477caa8516f1f9ee8122fafc3415c0f34 (same as tag
v6.0.0-beta.2
, which is not even latest), whereaspy-evm
has https://github.com/ethereum/tests/tree/6b85703b568f4456582a00665d8a3e5c3b20b484 (untagged commit slightly afterv6.0.0-beta.3
, which itself does not includeConstantinopleFix
- which why we're using something "slightly after").How was it fixed?
network=='Istanbul'
(leave placeholder).fixtures
commit aspy-evm
.petersburg
jobs to CI.pytest --fork
arg (copy-paste! frompy-evm
).SSTORE
;To-Do
Cute Animal Picture
Source: Felicia the ferret of Fermilab; via Atlas Obscura