-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Parity Integration Testing #381
Comments
We also need some way to install a specific version of parity which should likely be done with a small shell script to start off with until we can iterate towards a generic solution. |
Great point. For determining which versions to test against, I could see which versions are used in the nodes on https://ethstats.net/ Any other ideas? How did you decide for geth? |
I would suggest only the latest point releases excluding any with known bugs, starting with whatever the current latest is.
Whatever was newest at the time. |
@dylanjw here's the parity integration test issue. Here's an example integration "setup" file: https://github.com/ethereum/web3.py/blob/master/tests/integration/test_goethereum.py It ultimately calls all these tests against the fixtures for geth: https://github.com/ethereum/web3.py/tree/master/web3/utils/module_testing For example: https://github.com/ethereum/web3.py/blob/master/web3/utils/module_testing/eth_module.py So one way to set up the parity integration tests would be to:
I didn't set up the geth integration tests, so it's totally possible that I'm missing some things in this high-level approach, but the above steps should be a good place to start. |
See here for documentation on the necessary fixtures for the intergration tests: https://github.com/ethereum/web3.py/blob/master/tests/integration/README.md |
I have created fixtures for parity. Because parity does not have mining functionality, I used the following method to in the generation script:
A big challenge was creating matching genesis files. Parity requires that you configure the starting block number for various EIPs. Some of these are configurable in the geth genesis file and others are not. The majority of the tests that depend on the fixtures are currently failing. Tomorrow I will dig into the tests themselves and do some clean up of the fixture generation scripts. |
Feel free to post a list of the failing tests, along with the ones you think make sense to focus on, and others that make sense to punt. |
Note, Parity does not have a mining functionality for Ethash, but it provides other engines of sealing blogs for AuRa, Tendermint, "Instant Seal" (Dev mode). If a PoW environment causes you headache, you can just switch the engine. |
Thanks @5chdn, I'll take a look at the other engines. |
@carver Running tests on my system (Im still working on the travis CI config), I get 10 failed, 87 passed. Here is a summary of the failing tests:
Im going to start with looking into 1 & 2. For the failures due to missing methods, I will probably drop all of these. I will also look at adding a |
Sounds totally reasonable. Looking pretty close! One approach to dropping the class TestParityPersonalModule...
def test_personal_listAccounts(self):
pytest.xfail('this non-standard json-rpc method is not implemented on parity')` Plus, adding a Then we get notified if any of them start working. |
I will add TestParityEthModule.test_eth_uninstallFilter to the xfail tests. Parity returns true for any filter id parameter I enter, so I raised this issue: openethereum/parity-ethereum#7783 |
For the test_eth_newBlockFilter failure, on the first poll parity returns the latest block hash, instead of none. Subsequent polls return the expected empty list
|
I marked test_eth_newBlockFilter as xfail as well. |
Awesome 👍
Interesting find. Did you file an issue for that as well? |
I did not. Will do. |
What was wrong?
We don't have any integration tests for parity.
It's very difficult to test code like #366
How can it be fixed?
Generate some data in a parity fixture database (similar to how the geth one works) and build the integration conftest file.
The text was updated successfully, but these errors were encountered: