From 317c08308cfe38881049a2bea5be55ce77dba625 Mon Sep 17 00:00:00 2001 From: Nick Gheorghita Date: Tue, 19 Mar 2019 15:40:13 +0100 Subject: [PATCH] Update parity version to 2.3.5 for integration tests --- .circleci/config.yml | 24 ++-- .travis.yml | 134 ------------------ docker-compose.yml | 2 +- tests/integration/generate_fixtures/common.py | 13 +- .../generate_fixtures/go_ethereum.py | 2 +- tests/integration/generate_fixtures/parity.py | 28 ++-- .../parity-187-fixture/blocks_export.rlp | Bin 5496 -> 0 bytes .../parity-187-fixture/chain_config.json | 1 - .../parity-187-fixture/network/key | 1 - .../parity-188-fixture/blocks_export.rlp | Bin 5496 -> 0 bytes ...--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd | 1 - .../keys/CrossClient/address_book.json | 1 - .../parity-188-fixture/network/key | 1 - .../parity-235-fixture/blocks_export.rlp | Bin 0 -> 4967 bytes .../chain_config.json | 2 +- ...--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd | 0 .../keys/CrossClient/address_book.json | 0 .../parity-235-fixture/network/key | 1 + tests/integration/parity/common.py | 43 +++++- tests/integration/parity/conftest.py | 40 ++---- tests/integration/parity/install_parity.py | 11 +- tox.ini | 1 - 22 files changed, 95 insertions(+), 211 deletions(-) delete mode 100644 .travis.yml delete mode 100644 tests/integration/parity-187-fixture/blocks_export.rlp delete mode 100644 tests/integration/parity-187-fixture/chain_config.json delete mode 100644 tests/integration/parity-187-fixture/network/key delete mode 100644 tests/integration/parity-188-fixture/blocks_export.rlp delete mode 100644 tests/integration/parity-188-fixture/keys/CrossClient/UTC--2017-08-24T19-42-47.517572178Z--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd delete mode 100644 tests/integration/parity-188-fixture/keys/CrossClient/address_book.json delete mode 100644 tests/integration/parity-188-fixture/network/key create mode 100644 tests/integration/parity-235-fixture/blocks_export.rlp rename tests/integration/{parity-188-fixture => parity-235-fixture}/chain_config.json (80%) rename tests/integration/{parity-187-fixture => parity-235-fixture}/keys/CrossClient/UTC--2017-08-24T19-42-47.517572178Z--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd (100%) rename tests/integration/{parity-187-fixture => parity-235-fixture}/keys/CrossClient/address_book.json (100%) create mode 100644 tests/integration/parity-235-fixture/network/key diff --git a/.circleci/config.yml b/.circleci/config.yml index c32b23cc5f..0d67ad645c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -193,8 +193,8 @@ jobs: - image: circleci/python:3.6-stretch environment: TOXENV: py36-integration-parity-ipc - PARITY_VERSION: v1.11.11 - PARITY_OS: debian + PARITY_VERSION: v2.3.5 + PARITY_OS: linux py36-integration-parity-http: <<: *parity_steps @@ -202,8 +202,8 @@ jobs: - image: circleci/python:3.6-stretch environment: TOXENV: py36-integration-parity-http - PARITY_VERSION: v1.11.11 - PARITY_OS: debian + PARITY_VERSION: v2.3.5 + PARITY_OS: linux py36-integration-parity-ws: <<: *parity_steps @@ -211,8 +211,8 @@ jobs: - image: circleci/python:3.6-stretch environment: TOXENV: py36-integration-parity-ws - PARITY_VERSION: v1.11.11 - PARITY_OS: debian + PARITY_VERSION: v2.3.5 + PARITY_OS: linux py36-integration-ethtester-pyevm: <<: *common @@ -292,8 +292,8 @@ jobs: - image: circleci/python:3.7-stretch environment: TOXENV: py37-integration-parity-ipc - PARITY_VERSION: v1.11.11 - PARITY_OS: debian + PARITY_VERSION: v2.3.5 + PARITY_OS: linux py37-integration-parity-http: <<: *parity_steps @@ -301,8 +301,8 @@ jobs: - image: circleci/python:3.7-stretch environment: TOXENV: py37-integration-parity-http - PARITY_VERSION: v1.11.11 - PARITY_OS: debian + PARITY_VERSION: v2.3.5 + PARITY_OS: linux py37-integration-parity-ws: <<: *parity_steps @@ -310,8 +310,8 @@ jobs: - image: circleci/python:3.7-stretch environment: TOXENV: py37-integration-parity-ws - PARITY_VERSION: v1.11.11 - PARITY_OS: debian + PARITY_VERSION: v2.3.5 + PARITY_OS: linux py37-integration-ethtester-pyevm: <<: *common diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 913e54e869..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,134 +0,0 @@ -sudo: required -language: python -dist: trusty -env: - global: - - GETH_BASE_INSTALL_PATH=$TRAVIS_BUILD_DIR/gethbin - - PARITY_BASE_INSTALL_PATH=$TRAVIS_BUILD_DIR/paritybin -matrix: - include: - # - # Python 3.5 testing - # - # go-ethereum-ipc v1.7.2 - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-goethereum-ipc" GETH_VERSION=v1.7.2 - # go-ethereum-http v1.7.2 - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-goethereum-http" GETH_VERSION=v1.7.2 - # go-ethereum-ws v1.7.2 - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-goethereum-ws" GETH_VERSION=v1.7.2 - # go-ethereum-ipc v1.8.1 - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-goethereum-ipc" GETH_VERSION=v1.8.1 - # go-ethereum-http v1.8.1 - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-goethereum-http" GETH_VERSION=v1.8.1 - # go-ethereum-ws v1.8.1 - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-goethereum-ws" GETH_VERSION=v1.8.1 - # parity-ipc - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-parity-ipc" PARITY_VERSION=v1.10.4 PARITY_OS=debian - # parity-http - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-parity-http" PARITY_VERSION=v1.10.4 PARITY_OS=debian - # parity-ws - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-parity-ws" PARITY_VERSION=v1.10.4 PARITY_OS=debian - # ENS - - python: "3.5" - env: TOX_POSARGS="-e py35-ens" - # core - - python: "3.5" - env: TOX_POSARGS="-e py35-core" - # eth-tester-pyethereum16 - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-ethtester" ETHEREUM_TESTER_CHAIN_BACKEND=eth_tester.backends.PyEthereum16Backend - # eth-tester-pyevm - - python: "3.5" - env: TOX_POSARGS="-e py35-integration-ethtester" ETHEREUM_TESTER_CHAIN_BACKEND=eth_tester.backends.PyEVMBackend - # - # Python 3.6 testing - # - # go-ethereum-ipc v1.7.2 - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-goethereum-ipc" GETH_VERSION=v1.7.2 - # go-ethereum-http v1.7.2 - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-goethereum-http" GETH_VERSION=v1.7.2 - # go-ethereum-ws v1.7.2 - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-goethereum-ws" GETH_VERSION=v1.7.2 - # go-ethereum-ipc v1.8.1 - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-goethereum-ipc" GETH_VERSION=v1.8.1 - # go-ethereum-http v1.8.1 - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-goethereum-http" GETH_VERSION=v1.8.1 - # go-ethereum-ws v1.8.1 - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-goethereum-ws" GETH_VERSION=v1.8.1 - # parity-ipc - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-parity-ipc" PARITY_VERSION=v1.10.4 PARITY_OS=debian - # parity-http - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-parity-http" PARITY_VERSION=v1.10.4 PARITY_OS=debian - # parity-ws - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-parity-ws" PARITY_VERSION=v1.10.4 PARITY_OS=debian - # ENS - - python: "3.6" - env: TOX_POSARGS="-e py36-ens" - # lint - - python: "3.6" - env: TOX_POSARGS="-e lint" - # doctest - - python: "3.6" - env: TOX_POSARGS="-e doctest" - # core - - python: "3.6" - env: TOX_POSARGS="-e py36-core" - # eth-tester-pyethereum16 - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-ethtester" ETHEREUM_TESTER_CHAIN_BACKEND=eth_tester.backends.PyEthereum16Backend - # eth-tester-pyevm - - python: "3.6" - env: TOX_POSARGS="-e py36-integration-ethtester" ETHEREUM_TESTER_CHAIN_BACKEND=eth_tester.backends.PyEVMBackend -cache: - - pip: true - - directories: - - $HOME/.ethash/ - - $GETH_BASE_INSTALL_PATH/ - - $PARITY_BASE_INSTALL_PATH/ -before_install: - - if [ -n "$GETH_VERSION" ]; then mkdir -p $HOME/.ethash; fi -install: - - travis_retry pip install pip setuptools --upgrade - - travis_retry pip install tox - - if [ -n "$PARITY_VERSION" ]; then travis_retry pip install eth_utils tqdm requests eth-hash[pycryptodome]; fi -before_script: - - python --version - - pip --version - - if [ -n "$GETH_VERSION" ]; then travis_retry pip install py-geth>=1.10.1; fi - - if [ -n "$GETH_VERSION" ]; then export GOROOT=/usr/lib/go-1.7; fi - - if [ -n "$GETH_VERSION" ]; then export GETH_BINARY="$GETH_BASE_INSTALL_PATH/geth-$GETH_VERSION/bin/geth"; fi - - if [ -n "$GETH_VERSION" ] && [ ! -e "$GETH_BINARY" ]; then travis_retry sudo add-apt-repository -y ppa:gophers/archive; fi - - if [ -n "$GETH_VERSION" ] && [ ! -e "$GETH_BINARY" ]; then travis_retry sudo apt-get update; fi - - if [ -n "$GETH_VERSION" ] && [ ! -e "$GETH_BINARY" ]; then travis_retry sudo apt-get install -y golang-1.7 build-essential; fi - - if [ -n "$GETH_VERSION" ] && [ ! -e "$GETH_BINARY" ]; then python -m geth.install $GETH_VERSION; fi - - if [ -n "$GETH_VERSION" ]; then $GETH_BINARY version; fi - - if [ -n "$GETH_VERSION" ]; then $GETH_BINARY makedag 0 $HOME/.ethash; fi - - if [ -n "$PARITY_VERSION" ]; then python tests/integration/parity/install_parity.py $PARITY_VERSION; fi - - pip freeze -script: - - tox $TOX_POSARGS -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/8210e0e2df3ad138a505 - on_success: change - on_failure: never - on_cancel: never diff --git a/docker-compose.yml b/docker-compose.yml index 55eac8ea98..c130de201a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: build: context: . environment: - PARITY_VERSION: v1.11.7 + PARITY_VERSION: v2.3.5 volumes: - .:/code command: tail -f /dev/null diff --git a/tests/integration/generate_fixtures/common.py b/tests/integration/generate_fixtures/common.py index 689a37a2c0..4a1e490f80 100644 --- a/tests/integration/generate_fixtures/common.py +++ b/tests/integration/generate_fixtures/common.py @@ -12,6 +12,10 @@ to_text, ) +from web3.exceptions import ( + TransactionNotFound, +) + COINBASE = '0xdc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd' COINBASE_PK = '0x58d23b55bc9cdce1f18c2500f40ff4ab7245df9a89505e9b1fa4851f623d241d' @@ -33,7 +37,7 @@ "eip150Block": 0, "eip155Block": 10, "eip158Block": 10, - "eip160Block": 10 + "eip160Block": 10, }, "nonce": "0x0000000000000042", "alloc": { @@ -210,7 +214,10 @@ def mine_transaction_hash(web3, txn_hash): start_time = time.time() web3.geth.miner.start(1) while time.time() < start_time + 120: - receipt = web3.eth.getTransactionReceipt(txn_hash) + try: + receipt = web3.eth.getTransactionReceipt(txn_hash) + except TransactionNotFound: + continue if receipt is not None: web3.geth.miner.stop() return receipt @@ -221,7 +228,7 @@ def mine_transaction_hash(web3, txn_hash): def deploy_contract(web3, name, factory): - web3.personal.unlockAccount(web3.eth.coinbase, KEYFILE_PW) + web3.geth.personal.unlockAccount(web3.eth.coinbase, KEYFILE_PW) deploy_txn_hash = factory.constructor().transact({'from': web3.eth.coinbase}) print('{0}_CONTRACT_DEPLOY_HASH: '.format(name.upper()), deploy_txn_hash) deploy_receipt = mine_transaction_hash(web3, deploy_txn_hash) diff --git a/tests/integration/generate_fixtures/go_ethereum.py b/tests/integration/generate_fixtures/go_ethereum.py index 0e691565b6..7ae49321d8 100644 --- a/tests/integration/generate_fixtures/go_ethereum.py +++ b/tests/integration/generate_fixtures/go_ethereum.py @@ -117,7 +117,7 @@ def setup_chain_state(web3): # # Block with Transaction # - web3.personal.unlockAccount(coinbase, common.KEYFILE_PW) + web3.geth.personal.unlockAccount(coinbase, common.KEYFILE_PW) web3.geth.miner.start(1) mined_txn_hash = web3.eth.sendTransaction({ 'from': coinbase, diff --git a/tests/integration/generate_fixtures/parity.py b/tests/integration/generate_fixtures/parity.py index 594dde778c..ffb6d6eab4 100644 --- a/tests/integration/generate_fixtures/parity.py +++ b/tests/integration/generate_fixtures/parity.py @@ -31,22 +31,22 @@ "durationLimit": "0x0d", "blockReward": "0x4563918244F40000", "homesteadTransition": 0, - "eip150Transition": 0, - "eip160Transition": 10, - "eip161abcTransition": 10, - "eip161dTransition": 10 } } }, "params": { "gasLimitBoundDivisor": "0x0400", "registrar": "0x81a4b044831c4f12ba601adb9274516939e9b8a2", + "eip150Transition": 0, "eip155Transition": 10, + "eip160Transition": 10, + "eip161abcTransition": 10, + "eip161dTransition": 10, "accountStartNonce": "0x0", "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", "networkID": "0x539", - "eip98Transition": "0x7fffffffffffffff" + "eip98Transition": "0x7fffffffffffffff", }, "genesis": { "seal": { @@ -107,13 +107,12 @@ def get_parity_process( '--base-path', datadir, '--ipc-path', ipc_path, '--no-ws', - '--no-ui', '--no-warp', '--chain', chain_config_file_path, '--keys-path', keys_path, - '--rpcapi', 'all', - '--rpcport', parity_port, - # '--author', common.COINBASE[2:], + '--jsonrpc-apis', 'all', + '--jsonrpc-port', parity_port, + '--fat-db', 'on', ) print(' '.join(run_command)) try: @@ -145,18 +144,18 @@ def parity_export_blocks_process( 'blocks', os.path.join(datadir, 'blocks_export.rlp'), '--base-path', datadir, '--no-ws', - '--no-ui', '--no-warp', '--chain', chain_config_file_path, - '--rpcapi', 'all', - '--rpcport', parity_port, - # '--author', common.COINBASE[2:], + '--jsonrpc-apis', 'all', + '--jsonrpc-port', parity_port, + '--fat-db', 'on', ) print(' '.join(run_command)) try: proc = common.get_process(run_command) yield proc finally: + time.sleep(10) common.kill_proc_gracefully(proc) output, errors = proc.communicate() print( @@ -241,6 +240,7 @@ def generate_parity_fixture(destination_dir): time.sleep(10) connect_nodes(web3, web3_geth) + time.sleep(10) wait_for_chain_sync(web3, fixture_block_count) static_data = { @@ -262,7 +262,7 @@ def generate_parity_fixture(destination_dir): def connect_nodes(w3_parity, w3_secondary): parity_peers = w3_parity.parity.netPeers() parity_enode = w3_parity.parity.enode() - secondary_node_info = w3_secondary.geth.admin.nodeInfo + secondary_node_info = w3_secondary.geth.admin.nodeInfo() if secondary_node_info['id'] not in (node.get('id', tuple()) for node in parity_peers['peers']): w3_secondary.geth.admin.addPeer(parity_enode) diff --git a/tests/integration/parity-187-fixture/blocks_export.rlp b/tests/integration/parity-187-fixture/blocks_export.rlp deleted file mode 100644 index 02d12ccd4e342df08d5f46bd441541108f5057a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5496 zcmeHLdpuO>8=rG#tk`mkh{`2|Rutn_G3laG8ACHlbWRwQkSNOL%nUWL)p6NeDxC^R zS4=Le)+}1Pt#qRl8w$|{(Pd`a@_WxvpKU*>&!_$T{`vj({mdWFdEe*xzRx`G_x(O+ zMoK#?h1Cew7`&#`j&_Snmv%E1Iu;b@R%N&chRMZvT&hX0C}<%j*Dde9SL?IwWWxEt zlDY=%n`#Sn(h?)b_aAY7!)Qo#No(<3uARS6QgLJ8Os!|(vz}}%wKqg&YW+lRzqvZp z>0)N5enhv^$77Qb^KwX9^u+3@19PkhgGbRBl?euCO}J-ORoBMDIZvLp;Nw<1=(^gh zc)R|hfZ*0OmT*tgHac>!=5u4p8XbBI$Jy8~nP)oZPqPe#wZD}^l>hf3fGHG6FeHWq zRAs05)mwiOW!x4(^3?difXJX-fnhUe*w2`m5E2|36-@}d9IPu2F1j9B_ zNNG!^&X>f*=eQ3eUh$ ziW)+(M<|1`85<3h63Ia*^w>|H22R8LCg_LRtD}@H9Lx{BV4w}mOkl>oxO)zm7l4^N zST!4%-N3wds4Y<)g(d^D<%Mk_Fc}=M5!;*MjZy>%4P!D(#$xJ5s zkW9q~flJm}aDig-k}Q779Q)JC?00D8auYqoa^C^tEc!s8G~ zRyvRuto|-9c|QEk8#W!r&>;fu)a*4!@rX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ngq* zr@9ha^V++tSX=gthyreCM0F<+%PK>2Fln%^hfH_E|qqx3!a%54R)Ec2Qrp#Oy11Nk*CMg zYqd{3re`&YnnaE8yLJiPr=~jQ35n=EEyvfG*nTlmTy>4Rp z>GhWRQ;A4+$K6tcY~toO15)4ncxl`>e;Ga20j+s{`GSdxbM;xmCNYJxdUoDZdgX5l z>E0c>f$I|YvwGwpRUt*-kfhCK{G$^*gjyyH0iqMvqidlw}FG2RiE7O>6VV z_{)2fYed2B4tKRPgO1lgn~f{(dzH`lY`}Y!fBLNcr&oc>nKb?wwHYHdo;R_^pNfQr zCHrt4(M(9Wc->{ro9wpYBIP>sX|x2j-Z|Ol<6Y?^X>_iAbj^ENELw14cgve_8SU;@ zTb8{siZaYnt+zS1&^6Md{o!ynjr)bN=(jjCs=1=IxcBs6+#yltNxVb0boFy@g+s;V zL2Bz#?|t^xKO69mEXY3>Fe(1qI(dmKj!rC#5_6sH`Lt5UcB`0|>XEP74z5=8T00pN zob#Pt>KInFJ${K2yU?Y5b}T82f0I4&)X1g5MQT0j9jnfl@tAx2dgLrqlTKS}YK|Pd zJ>{pb=YOFr*5^gukuyHr_2P-A&ZB6#ulH=;SAF}}7k2~bE9-vtn<+)C@zfiLGSb%z z5NhmyTp0IYjjM@6mUYZhE5V$F8jcnViSO-Ah_iDy(bstzw>+(++AbY_MITPywYt8w z?5&qDJL?}=kg}-x7yqqb6OTQK^oxRth4C`+=T>7aov$EUZ@C?it+tzo%%f?|PYp+^ z@=C8H1}4RujM@>-cu=9pSL96{?}>o*qyN-|u&G49;!9f3!zY|y@rvR(Aw6peg~UA`-8UJ=$iikCz_53 diff --git a/tests/integration/parity-188-fixture/keys/CrossClient/UTC--2017-08-24T19-42-47.517572178Z--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd b/tests/integration/parity-188-fixture/keys/CrossClient/UTC--2017-08-24T19-42-47.517572178Z--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd deleted file mode 100644 index 30f8e999e4..0000000000 --- a/tests/integration/parity-188-fixture/keys/CrossClient/UTC--2017-08-24T19-42-47.517572178Z--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd +++ /dev/null @@ -1 +0,0 @@ -{"address":"dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd","crypto":{"cipher":"aes-128-ctr","ciphertext":"52e06bc9397ea9fa2f0dae8de2b3e8116e92a2ecca9ad5ff0061d1c449704e98","cipherparams":{"iv":"aa5d0a5370ef65395c1a6607af857124"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"9fdf0764eb3645ffc184e166537f6fe70516bf0e34dc7311dea21f100f0c9263"},"mac":"4e0b51f42b865c15c485f4faefdd1f01a38637e5247f8c75ffe6a8c0eba856f6"},"id":"5a6124e0-10f1-4c1c-ae3e-d903eacb740a","version":3} \ No newline at end of file diff --git a/tests/integration/parity-188-fixture/keys/CrossClient/address_book.json b/tests/integration/parity-188-fixture/keys/CrossClient/address_book.json deleted file mode 100644 index 9e26dfeeb6..0000000000 --- a/tests/integration/parity-188-fixture/keys/CrossClient/address_book.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/integration/parity-188-fixture/network/key b/tests/integration/parity-188-fixture/network/key deleted file mode 100644 index 15c3a3440a..0000000000 --- a/tests/integration/parity-188-fixture/network/key +++ /dev/null @@ -1 +0,0 @@ -cd6bb75fd99adf58a04b71afcf8b588469a6068cee7779592dcd81c13b709749 \ No newline at end of file diff --git a/tests/integration/parity-235-fixture/blocks_export.rlp b/tests/integration/parity-235-fixture/blocks_export.rlp new file mode 100644 index 0000000000000000000000000000000000000000..dcafdbd22ada79058e5617351d3506b9c42636be GIT binary patch literal 4967 zcmeHLdpMM7AAaB0%sMQR94ZPGVZT%~O2SmDR-!Quvk|>-BSSgVc5?d6J2UKxuX-KI zakm$d6*h%bmgyjc>?W+_b10M!P9>%-zULja*S1&L>uRs>pYPk}^2a^T^ZVV;&+oaP z`xzv((-K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(B^J3;WXl>91!Ka5^F*NwK3v1P$uJEd@FkB@y)=%yDSNtoX=qhv| zv4-k$CWfehR5__|sLg?J1k(0TE+|kMpsJ-bAT4OfKPAoC%%{d_#V?1WTAeVJgE#4W zkINtOpXa%;(WLhYm7Ikk7+{r^9(pPV=Z{Y7J$R33ssGG)Ma<Hs7Nu>7PVMN>ib8vOu^slt7(f8o%6eyUi4bW4yKB#p6=bac?V z6vXX~QfP2jW$WY_o@#L9&8S3V{pR@YKjfv^ocNqQ>oobD|32AIuQ0d;$_~{%l9WG z%TK+&#A538#-&>1KNmhO%AdJ}z4jM3#XXA*`tMl>o9BrKkM~T=O0jYs;*p!jFImJp zs}|Vk+&8&1z~(bl$O4tjC!-FE53h}eci#ds*N`C7$*;{COY9=tBLocp3L6ExQkye~ zQhVw3%VG8PRjcXlmLDl|rOjB2?>{!TneSrT-wuy8ESlZ-MN_4VqH`dYRSL~eAl)A7 zXlm8D=1hoed*j7pfgWFUYNhxWh~aIEOYU=v_5L*At<0zH)&KM=kU35hO+el_C32Uk zMDAl5v-SS2RmUT_mFcJTwFR+{mZd%I^5^Oy>w11jJBdYWTD8Zn(b3u>2EvG-{O_ti z;@+c>M3XyVl%07YXDfY&rp-`mXH9W2(a@i`+U6sL!S-_GR+w8lpWJzP@d#sXZr0r| zkzjc4(7rG^`^(o`oXKJLb+r-~epF1BKvb3(Ute02-iTe#F-nlXv#M3r?g-gDk=49i zZx7QGUzxD`aT?FPHAHS!&@%-idtH9q*{u103xoQTK};8oi?fAnIZ7IwsidL3wQY81 zzVoFuOO$(G{Gg~itz5?clVi)CnFL?&Na|O1mzWE8NXLn0l+P WMs~%*Fjhf8tm017o9Rur#s2{;ZwJQ! literal 0 HcmV?d00001 diff --git a/tests/integration/parity-188-fixture/chain_config.json b/tests/integration/parity-235-fixture/chain_config.json similarity index 80% rename from tests/integration/parity-188-fixture/chain_config.json rename to tests/integration/parity-235-fixture/chain_config.json index 61351ae8b7..bfbdfbf61c 100644 --- a/tests/integration/parity-188-fixture/chain_config.json +++ b/tests/integration/parity-235-fixture/chain_config.json @@ -1 +1 @@ -{"name": "CrossClient", "dataDir": "CrossClient", "engine": {"Ethash": {"params": {"minimumDifficulty": "0x020000", "difficultyBoundDivisor": "0x0800", "durationLimit": "0x0d", "blockReward": "0x4563918244F40000", "homesteadTransition": 0, "eip150Transition": 0, "eip160Transition": 10, "eip161abcTransition": 10, "eip161dTransition": 10}}}, "params": {"gasLimitBoundDivisor": "0x0400", "registrar": "0x81a4b044831c4f12ba601adb9274516939e9b8a2", "eip155Transition": 10, "accountStartNonce": "0x0", "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", "networkID": "0x539", "eip98Transition": "0x7fffffffffffffff"}, "genesis": {"seal": {"ethereum": {"nonce": "0x0000000000000042", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"}}, "difficulty": "0x10000", "author": "0xdc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd", "timestamp": "0x00", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x3535353535353535353535353535353535353535353535353535353535353535", "gasLimit": "0x1000000"}, "accounts": {"0xdc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd": {"balance": "1000000000000000000000000000", "nonce": "0", "builtin": {"name": "ecrecover", "pricing": {"linear": {"base": 3000, "word": 0}}}}, "0x12efdc31b1a8fa1a1e756dfd8a1601055c971e13": {"balance": "1000000000000000000000000000", "nonce": "0", "builtin": {"name": "sha256", "pricing": {"linear": {"base": 60, "word": 12}}}}, "0x39EEed73fb1D3855E90Cbd42f348b3D7b340aAA6": {"balance": "1000000000000000000000000000", "nonce": "0", "builtin": {"name": "ripemd160", "pricing": {"linear": {"base": 600, "word": 120}}}}}} \ No newline at end of file +{"name": "CrossClient", "dataDir": "CrossClient", "engine": {"Ethash": {"params": {"minimumDifficulty": "0x020000", "difficultyBoundDivisor": "0x0800", "durationLimit": "0x0d", "blockReward": "0x4563918244F40000", "homesteadTransition": 0}}}, "params": {"gasLimitBoundDivisor": "0x0400", "registrar": "0x81a4b044831c4f12ba601adb9274516939e9b8a2", "eip150Transition": 0, "eip155Transition": 10, "eip160Transition": 10, "eip161abcTransition": 10, "eip161dTransition": 10, "accountStartNonce": "0x0", "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", "networkID": "0x539", "eip98Transition": "0x7fffffffffffffff"}, "genesis": {"seal": {"ethereum": {"nonce": "0x0000000000000042", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"}}, "difficulty": "0x10000", "author": "0xdc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd", "timestamp": "0x00", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x3535353535353535353535353535353535353535353535353535353535353535", "gasLimit": "0x1000000"}, "accounts": {"0xdc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd": {"balance": "1000000000000000000000000000", "nonce": "0", "builtin": {"name": "ecrecover", "pricing": {"linear": {"base": 3000, "word": 0}}}}, "0x12efdc31b1a8fa1a1e756dfd8a1601055c971e13": {"balance": "1000000000000000000000000000", "nonce": "0", "builtin": {"name": "sha256", "pricing": {"linear": {"base": 60, "word": 12}}}}, "0x39EEed73fb1D3855E90Cbd42f348b3D7b340aAA6": {"balance": "1000000000000000000000000000", "nonce": "0", "builtin": {"name": "ripemd160", "pricing": {"linear": {"base": 600, "word": 120}}}}}} \ No newline at end of file diff --git a/tests/integration/parity-187-fixture/keys/CrossClient/UTC--2017-08-24T19-42-47.517572178Z--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd b/tests/integration/parity-235-fixture/keys/CrossClient/UTC--2017-08-24T19-42-47.517572178Z--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd similarity index 100% rename from tests/integration/parity-187-fixture/keys/CrossClient/UTC--2017-08-24T19-42-47.517572178Z--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd rename to tests/integration/parity-235-fixture/keys/CrossClient/UTC--2017-08-24T19-42-47.517572178Z--dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd diff --git a/tests/integration/parity-187-fixture/keys/CrossClient/address_book.json b/tests/integration/parity-235-fixture/keys/CrossClient/address_book.json similarity index 100% rename from tests/integration/parity-187-fixture/keys/CrossClient/address_book.json rename to tests/integration/parity-235-fixture/keys/CrossClient/address_book.json diff --git a/tests/integration/parity-235-fixture/network/key b/tests/integration/parity-235-fixture/network/key new file mode 100644 index 0000000000..11c0558bb3 --- /dev/null +++ b/tests/integration/parity-235-fixture/network/key @@ -0,0 +1 @@ +9cf55e75533a2380bcb2fbb4ff6f5ae86e7d303a331caf099946207bbe53fb21 \ No newline at end of file diff --git a/tests/integration/parity/common.py b/tests/integration/parity/common.py index 3612d3a32e..5cf5848df7 100644 --- a/tests/integration/parity/common.py +++ b/tests/integration/parity/common.py @@ -10,6 +10,9 @@ ParityPersonalModuleTest, Web3ModuleTest, ) +from web3._utils.module_testing.eth_module import ( + UNKNOWN_ADDRESS, +) # some tests appear flaky with Parity v1.10.x MAX_FLAKY_RUNS = 3 @@ -17,7 +20,7 @@ class ParityWeb3ModuleTest(Web3ModuleTest): def _check_web3_clientVersion(self, client_version): - assert client_version.startswith('Parity/') + assert client_version.startswith('Parity-Ethereum/') class ParityEthModuleTest(EthModuleTest): @@ -119,6 +122,44 @@ def test_eth_call_old_contract_state(self, web3, math_contract, unlocked_account if pending_call_result not in range(1, MAX_FLAKY_RUNS + 1): raise AssertionError("pending call result was %d!" % pending_call_result) + def test_eth_getLogs_without_logs(self, web3, block_with_txn_with_log): + # Test with block range + + filter_params = { + "fromBlock": 0, + "toBlock": block_with_txn_with_log['number'] - 1, + } + result = web3.eth.getLogs(filter_params) + assert len(result) == 0 + + # the range is wrong, parity returns error message + filter_params = { + "fromBlock": block_with_txn_with_log['number'], + "toBlock": block_with_txn_with_log['number'] - 1, + } + with pytest.raises(ValueError): + web3.eth.getLogs(filter_params) + + # Test with `address` + + # filter with other address + filter_params = { + "fromBlock": 0, + "address": UNKNOWN_ADDRESS, + } + result = web3.eth.getLogs(filter_params) + assert len(result) == 0 + + # Test with multiple `address` + + # filter with other address + filter_params = { + "fromBlock": 0, + "address": [UNKNOWN_ADDRESS, UNKNOWN_ADDRESS], + } + result = web3.eth.getLogs(filter_params) + assert len(result) == 0 + class ParityTraceModuleTest(TraceModuleTest): def test_list_storage_keys_no_support(self, web3, emitter_contract_address): diff --git a/tests/integration/parity/conftest.py b/tests/integration/parity/conftest.py index 8db497ba3e..c5fbdb6d39 100644 --- a/tests/integration/parity/conftest.py +++ b/tests/integration/parity/conftest.py @@ -18,36 +18,21 @@ KEYFILE_PW = 'web3py-test' -PARITY_1_8_8_FIXTURE = { - 'datadir': 'parity-188-fixture', - 'coinbase': 'dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd', - 'block_hash_with_log': '0xf9aea1029be4b93e30313814d297a2da0c5b204856c4de16c21b87ebaf8f20c5', - 'block_with_txn_hash': '0xf460bffb4ea46c5ec26e2062911f24af3349cd1c895fdb009b4d544569d22a49', - 'emitter_address': '0x4aA591a07989b4F810E2F5cE97e769D60710f168', - 'emitter_deploy_txn_hash': '0xa81e903e9953758c8da5aaae66451ff909edd7bd6aefc3ebeab1e709e3229bcc', - 'empty_block_hash': '0x3b32b087d4fc72091be4fa6b44fc2a78289a15c53fba3454755dd9eaf39f0481', - 'keyfile_pw': 'web3py-test', - 'math_address': '0xd794C821fCCFF5D96F5Db44af7e29977630A9dc2', - 'math_deploy_txn_hash': '0x03cc47c8f58608576187825aed01c4fc64786f1172d182d432336881a75a0fa3', - 'mined_txn_hash': '0x9839fde5fce7f0ed29b49a687d4f7630076069e65c2e1df87ffab9b2844d3899', - 'raw_txn_account': '0x39EEed73fb1D3855E90Cbd42f348b3D7b340aAA6', - 'txn_hash_with_log': '0x26bad3318b3466833f96d04ac9ba46fbbce11c15be2f83c9fe0b5dc15b2646cd' -} -PARITY_1_8_7_FIXTURE = { - 'datadir': 'parity-187-fixture', +PARITY_2_3_5_FIXTURE = { + 'datadir': 'parity-235-fixture', 'coinbase': 'dc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd', - 'block_hash_with_log': '0x342e12ab6d24d7fb1d774a6b47cd2cc04430a3295bee5662d5a1a0b766480031', - 'block_with_txn_hash': '0xa866266a5a348948c38855cc6e990093b35a3d2c43fdddfe3b1259c9c3fc7404', + 'block_hash_with_log': '0x8633d4b5497e5a7e81356cbe3f0a49b63fb2020ddeb6c8c27bcecec541055a3b', + 'block_with_txn_hash': '0xf474a7b80cb6cb2b728b290ce6a0893f5f85d2998c4b252d73300da56de205de', 'emitter_address': '0x4aA591a07989b4F810E2F5cE97e769D60710f168', - 'emitter_deploy_txn_hash': '0xa81e903e9953758c8da5aaae66451ff909edd7bd6aefc3ebeab1e709e3229bcc', - 'empty_block_hash': '0xbcb2826e4376c23e66750607af72965f177f93b39e5024be259e6b0ff4f95e9d', + 'emitter_deploy_txn_hash': '0xa3e3838c01e73dafc7fc9d7e4e6c97523445006ae125ad1085abcf065feed382', + 'empty_block_hash': '0xc46c025ae50a970408a429a5a2baa65f056a173ff1dae0cab4b490d2ee94413f', 'keyfile_pw': 'web3py-test', 'math_address': '0xd794C821fCCFF5D96F5Db44af7e29977630A9dc2', - 'math_deploy_txn_hash': '0x03cc47c8f58608576187825aed01c4fc64786f1172d182d432336881a75a0fa3', - 'mined_txn_hash': '0x9839fde5fce7f0ed29b49a687d4f7630076069e65c2e1df87ffab9b2844d3899', + 'math_deploy_txn_hash': '0xb680f86c00d69484ce68b4d3932c27c4e858c91d6ba8a27f8c499006fe4ced4a', + 'mined_txn_hash': '0x6401f455c01f9eb79fa672a4d24cc7cbbe3891e89eea8db8be39969dc9c480bc', 'raw_txn_account': '0x39EEed73fb1D3855E90Cbd42f348b3D7b340aAA6', - 'txn_hash_with_log': '0x26bad3318b3466833f96d04ac9ba46fbbce11c15be2f83c9fe0b5dc15b2646cd' + 'txn_hash_with_log': '0xf6ffb7387cd0288cd1db1b1e368e7d4a21bc6e70fd2ef0e9af41f6c32b9e2cc7' } @@ -72,12 +57,7 @@ def get_parity_version(parity_binary): @pytest.fixture(scope="module") def parity_fixture_data(parity_binary): - if os.path.basename(parity_binary) == 'parity-1_8_7': - return PARITY_1_8_7_FIXTURE - elif os.path.basename(parity_binary) == 'parity-1_8_8': - return PARITY_1_8_8_FIXTURE - else: - return PARITY_1_8_7_FIXTURE + return PARITY_2_3_5_FIXTURE @pytest.fixture(scope='module') diff --git a/tests/integration/parity/install_parity.py b/tests/integration/parity/install_parity.py index 9eda35e01e..f223303396 100644 --- a/tests/integration/parity/install_parity.py +++ b/tests/integration/parity/install_parity.py @@ -16,14 +16,10 @@ URI_QUERY_URL = "https://vanity-service.parity.io/parity-binaries" BASE_BIN_PATH = "~/.parity-bin" VERSION_STRINGS = { - "v1.8.7": "1_8_7", - "v1.8.8": "1_8_8", - "v1.9.1": "1_9_1", - "v1.10.4": "1_10_4", - "v1.11.11": "1_11_11", + "v2.3.5": "2_3_5", } ARCHITECTURE = 'x86_64' -OS = os.getenv('PARITY_OS', 'debian') +OS = os.getenv('PARITY_OS', 'linux') @toolz.curry @@ -57,7 +53,7 @@ def get_binary_uri(releases_json): def get_executable_path(version_string): identifier = VERSION_STRINGS[version_string] base_path = os.environ.get('PARITY_BASE_INSTALL_PATH', BASE_BIN_PATH) - path = os.path.join(base_path, 'parity-{0}'.format(identifier)) + path = os.path.join(base_path, f'parity-{identifier}') return os.path.expanduser(path) @@ -66,7 +62,6 @@ def install_parity(version_string): raise ValueError("{0} is not an accepted version identifier.") path = get_executable_path(version_string) - get_uri = toolz.functoolz.compose( get_binary_uri, get_parity_release_json) diff --git a/tox.ini b/tox.ini index f032666338..d368a5adf8 100644 --- a/tox.ini +++ b/tox.ini @@ -46,7 +46,6 @@ passenv = PARITY_BINARY PARITY_VERSION PARITY_OS - TRAVIS_BUILD_DIR GOROOT GOPATH basepython =