Skip to content

Commit 96830b6

Browse files
committed
Update parity version to 2.3.5 for integration tests
1 parent a22c6cc commit 96830b6

File tree

22 files changed

+98
-120
lines changed

22 files changed

+98
-120
lines changed

.circleci/config.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,26 +193,26 @@ jobs:
193193
- image: circleci/python:3.6-stretch
194194
environment:
195195
TOXENV: py36-integration-parity-ipc
196-
PARITY_VERSION: v1.11.11
197-
PARITY_OS: debian
196+
PARITY_VERSION: v2.3.5
197+
PARITY_OS: linux
198198

199199
py36-integration-parity-http:
200200
<<: *parity_steps
201201
docker:
202202
- image: circleci/python:3.6-stretch
203203
environment:
204204
TOXENV: py36-integration-parity-http
205-
PARITY_VERSION: v1.11.11
206-
PARITY_OS: debian
205+
PARITY_VERSION: v2.3.5
206+
PARITY_OS: linux
207207

208208
py36-integration-parity-ws:
209209
<<: *parity_steps
210210
docker:
211211
- image: circleci/python:3.6-stretch
212212
environment:
213213
TOXENV: py36-integration-parity-ws
214-
PARITY_VERSION: v1.11.11
215-
PARITY_OS: debian
214+
PARITY_VERSION: v2.3.5
215+
PARITY_OS: linux
216216

217217
py36-integration-ethtester-pyevm:
218218
<<: *common
@@ -292,26 +292,26 @@ jobs:
292292
- image: circleci/python:3.7-stretch
293293
environment:
294294
TOXENV: py37-integration-parity-ipc
295-
PARITY_VERSION: v1.11.11
296-
PARITY_OS: debian
295+
PARITY_VERSION: v2.3.5
296+
PARITY_OS: linux
297297

298298
py37-integration-parity-http:
299299
<<: *parity_steps
300300
docker:
301301
- image: circleci/python:3.7-stretch
302302
environment:
303303
TOXENV: py37-integration-parity-http
304-
PARITY_VERSION: v1.11.11
305-
PARITY_OS: debian
304+
PARITY_VERSION: v2.3.5
305+
PARITY_OS: linux
306306

307307
py37-integration-parity-ws:
308308
<<: *parity_steps
309309
docker:
310310
- image: circleci/python:3.7-stretch
311311
environment:
312312
TOXENV: py37-integration-parity-ws
313-
PARITY_VERSION: v1.11.11
314-
PARITY_OS: debian
313+
PARITY_VERSION: v2.3.5
314+
PARITY_OS: linux
315315

316316
py37-integration-ethtester-pyevm:
317317
<<: *common

.travis.yml

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,6 @@ env:
88
matrix:
99
include:
1010
#
11-
# Python 3.5 testing
12-
#
13-
# go-ethereum-ipc v1.7.2
14-
- python: "3.5"
15-
env: TOX_POSARGS="-e py35-integration-goethereum-ipc" GETH_VERSION=v1.7.2
16-
# go-ethereum-http v1.7.2
17-
- python: "3.5"
18-
env: TOX_POSARGS="-e py35-integration-goethereum-http" GETH_VERSION=v1.7.2
19-
# go-ethereum-ws v1.7.2
20-
- python: "3.5"
21-
env: TOX_POSARGS="-e py35-integration-goethereum-ws" GETH_VERSION=v1.7.2
22-
# go-ethereum-ipc v1.8.1
23-
- python: "3.5"
24-
env: TOX_POSARGS="-e py35-integration-goethereum-ipc" GETH_VERSION=v1.8.1
25-
# go-ethereum-http v1.8.1
26-
- python: "3.5"
27-
env: TOX_POSARGS="-e py35-integration-goethereum-http" GETH_VERSION=v1.8.1
28-
# go-ethereum-ws v1.8.1
29-
- python: "3.5"
30-
env: TOX_POSARGS="-e py35-integration-goethereum-ws" GETH_VERSION=v1.8.1
31-
# parity-ipc
32-
- python: "3.5"
33-
env: TOX_POSARGS="-e py35-integration-parity-ipc" PARITY_VERSION=v1.10.4 PARITY_OS=debian
34-
# parity-http
35-
- python: "3.5"
36-
env: TOX_POSARGS="-e py35-integration-parity-http" PARITY_VERSION=v1.10.4 PARITY_OS=debian
37-
# parity-ws
38-
- python: "3.5"
39-
env: TOX_POSARGS="-e py35-integration-parity-ws" PARITY_VERSION=v1.10.4 PARITY_OS=debian
40-
# ENS
41-
- python: "3.5"
42-
env: TOX_POSARGS="-e py35-ens"
43-
# core
44-
- python: "3.5"
45-
env: TOX_POSARGS="-e py35-core"
46-
# eth-tester-pyethereum16
47-
- python: "3.5"
48-
env: TOX_POSARGS="-e py35-integration-ethtester" ETHEREUM_TESTER_CHAIN_BACKEND=eth_tester.backends.PyEthereum16Backend
49-
# eth-tester-pyevm
50-
- python: "3.5"
51-
env: TOX_POSARGS="-e py35-integration-ethtester" ETHEREUM_TESTER_CHAIN_BACKEND=eth_tester.backends.PyEVMBackend
52-
#
5311
# Python 3.6 testing
5412
#
5513
# go-ethereum-ipc v1.7.2
@@ -72,13 +30,13 @@ matrix:
7230
env: TOX_POSARGS="-e py36-integration-goethereum-ws" GETH_VERSION=v1.8.1
7331
# parity-ipc
7432
- python: "3.6"
75-
env: TOX_POSARGS="-e py36-integration-parity-ipc" PARITY_VERSION=v1.10.4 PARITY_OS=debian
33+
env: TOX_POSARGS="-e py36-integration-parity-ipc" PARITY_VERSION=v2.3.5 PARITY_OS=linux
7634
# parity-http
7735
- python: "3.6"
78-
env: TOX_POSARGS="-e py36-integration-parity-http" PARITY_VERSION=v1.10.4 PARITY_OS=debian
36+
env: TOX_POSARGS="-e py36-integration-parity-http" PARITY_VERSION=v2.3.5 PARITY_OS=linux
7937
# parity-ws
8038
- python: "3.6"
81-
env: TOX_POSARGS="-e py36-integration-parity-ws" PARITY_VERSION=v1.10.4 PARITY_OS=debian
39+
env: TOX_POSARGS="-e py36-integration-parity-ws" PARITY_VERSION=v2.3.5 PARITY_OS=linux
8240
# ENS
8341
- python: "3.6"
8442
env: TOX_POSARGS="-e py36-ens"

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
build:
55
context: .
66
environment:
7-
PARITY_VERSION: v1.11.7
7+
PARITY_VERSION: v2.3.5
88
volumes:
99
- .:/code
1010
command: tail -f /dev/null

tests/integration/generate_fixtures/common.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
to_text,
1313
)
1414

15+
from web3.exceptions import (
16+
TransactionNotFound,
17+
)
18+
1519
COINBASE = '0xdc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd'
1620
COINBASE_PK = '0x58d23b55bc9cdce1f18c2500f40ff4ab7245df9a89505e9b1fa4851f623d241d'
1721

@@ -33,7 +37,7 @@
3337
"eip150Block": 0,
3438
"eip155Block": 10,
3539
"eip158Block": 10,
36-
"eip160Block": 10
40+
"eip160Block": 10,
3741
},
3842
"nonce": "0x0000000000000042",
3943
"alloc": {
@@ -210,7 +214,10 @@ def mine_transaction_hash(web3, txn_hash):
210214
start_time = time.time()
211215
web3.geth.miner.start(1)
212216
while time.time() < start_time + 120:
213-
receipt = web3.eth.getTransactionReceipt(txn_hash)
217+
try:
218+
receipt = web3.eth.getTransactionReceipt(txn_hash)
219+
except TransactionNotFound:
220+
continue
214221
if receipt is not None:
215222
web3.geth.miner.stop()
216223
return receipt
@@ -221,7 +228,7 @@ def mine_transaction_hash(web3, txn_hash):
221228

222229

223230
def deploy_contract(web3, name, factory):
224-
web3.personal.unlockAccount(web3.eth.coinbase, KEYFILE_PW)
231+
web3.geth.personal.unlockAccount(web3.eth.coinbase, KEYFILE_PW)
225232
deploy_txn_hash = factory.constructor().transact({'from': web3.eth.coinbase})
226233
print('{0}_CONTRACT_DEPLOY_HASH: '.format(name.upper()), deploy_txn_hash)
227234
deploy_receipt = mine_transaction_hash(web3, deploy_txn_hash)

tests/integration/generate_fixtures/go_ethereum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def setup_chain_state(web3):
117117
#
118118
# Block with Transaction
119119
#
120-
web3.personal.unlockAccount(coinbase, common.KEYFILE_PW)
120+
web3.geth.personal.unlockAccount(coinbase, common.KEYFILE_PW)
121121
web3.geth.miner.start(1)
122122
mined_txn_hash = web3.eth.sendTransaction({
123123
'from': coinbase,

tests/integration/generate_fixtures/parity.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@
3131
"durationLimit": "0x0d",
3232
"blockReward": "0x4563918244F40000",
3333
"homesteadTransition": 0,
34-
"eip150Transition": 0,
35-
"eip160Transition": 10,
36-
"eip161abcTransition": 10,
37-
"eip161dTransition": 10
3834
}
3935
}
4036
},
4137
"params": {
4238
"gasLimitBoundDivisor": "0x0400",
4339
"registrar": "0x81a4b044831c4f12ba601adb9274516939e9b8a2",
40+
"eip150Transition": 0,
4441
"eip155Transition": 10,
42+
"eip160Transition": 10,
43+
"eip161abcTransition": 10,
44+
"eip161dTransition": 10,
4545
"accountStartNonce": "0x0",
4646
"maximumExtraDataSize": "0x20",
4747
"minGasLimit": "0x1388",
4848
"networkID": "0x539",
49-
"eip98Transition": "0x7fffffffffffffff"
49+
"eip98Transition": "0x7fffffffffffffff",
5050
},
5151
"genesis": {
5252
"seal": {
@@ -107,12 +107,12 @@ def get_parity_process(
107107
'--base-path', datadir,
108108
'--ipc-path', ipc_path,
109109
'--no-ws',
110-
'--no-ui',
111110
'--no-warp',
112111
'--chain', chain_config_file_path,
113112
'--keys-path', keys_path,
114-
'--rpcapi', 'all',
115-
'--rpcport', parity_port,
113+
'--jsonrpc-apis', 'all',
114+
'--jsonrpc-port', parity_port,
115+
'--fat-db', 'on',
116116
# '--author', common.COINBASE[2:],
117117
)
118118
print(' '.join(run_command))
@@ -145,18 +145,19 @@ def parity_export_blocks_process(
145145
'blocks', os.path.join(datadir, 'blocks_export.rlp'),
146146
'--base-path', datadir,
147147
'--no-ws',
148-
'--no-ui',
149148
'--no-warp',
150149
'--chain', chain_config_file_path,
151-
'--rpcapi', 'all',
152-
'--rpcport', parity_port,
150+
'--jsonrpc-apis', 'all',
151+
'--jsonrpc-port', parity_port,
152+
'--fat-db', 'on',
153153
# '--author', common.COINBASE[2:],
154154
)
155155
print(' '.join(run_command))
156156
try:
157157
proc = common.get_process(run_command)
158158
yield proc
159159
finally:
160+
time.sleep(10)
160161
common.kill_proc_gracefully(proc)
161162
output, errors = proc.communicate()
162163
print(
@@ -241,6 +242,7 @@ def generate_parity_fixture(destination_dir):
241242

242243
time.sleep(10)
243244
connect_nodes(web3, web3_geth)
245+
time.sleep(10)
244246
wait_for_chain_sync(web3, fixture_block_count)
245247

246248
static_data = {
@@ -262,7 +264,7 @@ def generate_parity_fixture(destination_dir):
262264
def connect_nodes(w3_parity, w3_secondary):
263265
parity_peers = w3_parity.parity.netPeers()
264266
parity_enode = w3_parity.parity.enode()
265-
secondary_node_info = w3_secondary.geth.admin.nodeInfo
267+
secondary_node_info = w3_secondary.geth.admin.nodeInfo()
266268
if secondary_node_info['id'] not in (node.get('id', tuple()) for node in parity_peers['peers']):
267269
w3_secondary.geth.admin.addPeer(parity_enode)
268270

-5.37 KB
Binary file not shown.

tests/integration/parity-187-fixture/chain_config.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/integration/parity-187-fixture/network/key

Lines changed: 0 additions & 1 deletion
This file was deleted.
-5.37 KB
Binary file not shown.

0 commit comments

Comments
 (0)