Commit Graph

12281 Commits

Author SHA1 Message Date
Reyk Floeter
c0952ba44b Unbreak build on rust -stable (#9934) 2018-11-17 23:51:35 +00:00
Nicolas Gotchac
9475a2e474 Keep existing blocks when restoring a Snapshot (#8643)
* Rename db_restore => client

* First step: make it compile!

* Second step: working implementation!

* Refactoring

* Fix tests

* PR Grumbles

* PR Grumbles WIP

* Migrate ancient blocks interating backward

* Early return in block migration if snapshot is aborted

* Remove RwLock getter (PR Grumble I)

* Remove dependency on `Client`: only used Traits

* Add test for recovering aborted snapshot recovery

* Add test for migrating old blocks

* Fix build

* PR Grumble I

* PR Grumble II

* PR Grumble III

* PR Grumble IV

* PR Grumble V

* PR Grumble VI

* Fix one test

* Fix test

* PR Grumble

* PR Grumbles

* PR Grumbles II

* Fix tests

* Release RwLock earlier

* Revert Cargo.lock

* Update _update ancient block_ logic: set local in `commit`

* Update typo in ethcore/src/snapshot/service.rs

Co-Authored-By: ngotchac <ngotchac@gmail.com>
2018-11-18 00:06:34 +01:00
Tomasz Drwięga
5baed0c158 Add experimental RPCs flag (#9928)
* WiP

* Enable experimental RPCs.
2018-11-16 14:00:34 +01:00
Tomasz Drwięga
97c259858c Clarify poll lifetime (#9922)
* Clarify poll filter.

* Fix RPC test.
2018-11-16 11:39:29 +00:00
Niklas Adolfsson
0f90696528 docs(require rust 1.30) (#9923)
* docs(require rust 1.30)

* Update README.md

Co-Authored-By: niklasad1 <niklasadolfsson1@gmail.com>
2018-11-15 12:53:11 +01:00
Nicolas Gotchac
ac974a180d Use block header for building finality (#9914) 2018-11-14 13:05:49 +01:00
TriplEight
052380b8de
simplify cargo audit (#9918) 2018-11-14 11:46:10 +01:00
Niklas Adolfsson
23a29439c0 light-fetch: Differentiate between out-of-gas/manual throw and use required gas from response on failure (#9824)
* fix start_gas, handle OOG exceptions & NotEnoughGas

* Change START_GAS: 50_000 -> 60_000
* When the `OutOfGas exception` is received then try to double the gas until it succeeds or block gas limit is reached
* When `NotEnoughBasGas error` is received then use the required gas provided in the response

* fix(light-fetch): ensure block_gas_limit is tried

Try the `block_gas_limit` before regard the execution as an error

* Update rpc/src/v1/helpers/light_fetch.rs

Co-Authored-By: niklasad1 <niklasadolfsson1@gmail.com>
2018-11-14 13:04:33 +03:00
Seun LanLege
a8617e2862
EIP 191 (#9701)
* added sign_191 rpc method

* fixed hash_structured_data return type

* added ConfirmationPayload::SignMessage for non-prefixed signatures, added tests for sign191

* renamed WithValidator -> PresignedTransaction

* rename applicationData to data in test

* adds docs for EIP191Version, renamed SignRequest to EIP191SignRequest
2018-11-14 09:02:40 +01:00
Niklas Adolfsson
6945a6b320 fix(logger): reqwest no longer a dependency (#9908) 2018-11-13 16:19:58 +00:00
Pierre Krieger
b375c9adbf Remove rust-toolchain file (#9906) 2018-11-13 18:23:17 +03:00
Thibaut Sardan
88a727739b
foundation: #6692865, ropsten: #4417537, kovan: #9363457 (#9907) 2018-11-13 14:48:23 +01:00
André Silva
5f3ae4dee3 ethcore: use Machine::verify_transaction on parent block (#9900)
* ethcore: use Machine::verify_transaction on parent block

also fixes off-by-one activation of transaction permission contract

* ethcore: clarify call to verify_transaction
2018-11-13 14:58:53 +03:00
Niklas Adolfsson
5cbe834024 chore(rpc-tests): remove unused rand (#9896) 2018-11-12 13:41:05 +03:00
mattrutherford
eea5b86cc4 fix: Intermittent failing CI due to addr in use (#9885)
Allow OS to set port at runtime
2018-11-11 11:20:04 +01:00
Niklas Adolfsson
09c512abaa chore(bump docopt): 0.8 -> 1.0 (#9889) 2018-11-11 11:19:44 +01:00
zhangyaning
d42d816e7f Use expect (#9883) 2018-11-09 14:54:23 +03:00
Nicolas Gotchac
17effd15ab Use Weak reference in PubSubClient (#9886) 2018-11-09 11:51:49 +00:00
Afri Schoedon
9982eba188 ci: nuke the gitlab caches (#9855)
Will go without cache. Meanwhile have to investigate what was wrong and how to use it effectively.
2018-11-08 19:37:12 +01:00
zhangyaning
aafe527d4a Remove unused code (#9884) 2018-11-08 13:20:02 +01:00
Wei Tang
e4c53a460e
Fix json tracer overflow (#9873)
* Fix json tracer overflow

* Replace trace_executed with a direct trace push

* Remove unused variable

* Add test for 5a51

* Remove duplicate json!
2018-11-08 03:04:36 +08:00
cheme
ca01596a65 Allow to seal work on latest block (#9876)
* Allow to seal work on latest block.

* Test from @todr to check sealing conditions.
2018-11-07 17:59:08 +00:00
Afri Schoedon
4f2415b483 Fix docker script (#9854)
* Dockerfile: change source path of the newly added check_sync.sh (#9869)
2018-11-07 15:53:22 +01:00
Tomasz Drwięga
f680eacdf2 Health endpoint (#9847)
* Health endpoint.

* Fix chain handling.

* Update to latest json-rpc.

* Change dev chain detection.

* Fix test.
2018-11-07 09:30:34 +01:00
gabriel klawitter
f6dcca3ebb
gitlab-ci: make android release build succeed (#9743)
* use docker cargo config file for android builds

* make android build succeed
2018-11-06 20:26:05 +01:00
Wei Tang
1a642fc624
Clean up existing benchmarks (#9839)
* Add FIXME link for a state mod statement

* Remove unused benches feature in ethcore

* Fix evm benches compile

* Fix ethash benches compile

* Switch to criterion
2018-11-06 21:22:44 +08:00
Yohan Graterol
c4469514db Update Callisto block reward code to support HF1 (#9811)
* Add Callisto Mainnet support

* Remove merge failure

* EIP-649 removed

* Remove eip649Reward

* Modify difficultyBombDelays

* Callisto reward smart contract

* Remove ethash params

* Fix merge

* Update bootnodes

* Update block reward to support HF1
2018-11-06 14:07:59 +08:00
Tomasz Drwięga
59daf95859 Option to disable keep alive for JSON-RPC http transport (#9848)
* Keep alive jsonrpc CLI option.

* Update to latest json-rpc.

* Keep alive flag.
2018-11-05 22:39:51 +08:00
Yaz Khoury
3a6e04ba15 Classic.json Bootnode Update (#9828)
* fix: Update bootnodes list to only responsive nodes

* feat: Add more bootnodes to classic.json list

* feat: Add retested bootnodes
2018-11-01 11:30:34 +01:00
Jonathan Brown
b26f86d6ff Support MIX. (#9767)
* Support MIX.

* Re-arrange mix.json so tests pass.

* Add MIX hardfork.

* Fix MIX chain specification.

* Use original MIX datadir.

* Fix MIX Newark enode.
2018-11-01 11:06:53 +01:00
Afri Schoedon
570215acae
ci: remove failing tests for android, windows, and macos (#9788)
* ci: remove failing tests for android, windows, and macos

* ci: restore android build jobs
2018-11-01 11:06:24 +01:00
cheme
a511264433 Implement NoProof for json tests and update tests reference (replaces #9744) (#9814)
* Update test reference.
Block test are really not working so I disabled a few by commenting
directly in source.

* Move ethtest commit cursor.

* Implements 'NoProof' engine from https://github.com/ethereum/tests/issues/464 .

Since tests has been regenerated those one were failing on block
difficulty check.

Update ethereum/tests, waiting for cost fix (block test are still
commented).

* Update tests submodule reference to latest (all test passing except an
identified case).
Fix block reward of constantinople json.

* Restore broken test by using old json tests files.

* Use CanonNoSeal instead of a custom engine, still have to include some
additional tests code.

* Gas upper limit check in json_chain test was bad, moving the test to
verification, the test is running in `verify_header_param`.
Note that test was previously only for ethash, and now for any engine.

* Restore old behavior (gas uper limit only for ethash engine), at the
cost of an additional trait method.

* Proper rpc test fix.

* Update tests submodule, add SStore bug tests.

* Fix json issue tabulation.
Update tests submodule to latest master (lot of new sstore tests
passing)

* Switch ethereum/tests to tag 6.0.0-beta.1 (no tests changes from latest
synch).

* Display hex with separator, use indirection instead of clone for copy
types.
2018-11-01 11:04:32 +01:00
Niklas Adolfsson
06f25d2b27 chore(bump regex) (#9842) 2018-11-01 13:16:02 +08:00
Anton Gavrilov
a3bd355b16 Ignore global cache for patched accounts (#9752)
* Ignore global cache for patched accounts

* Rollback patched account flag

* Store root in checkpoint storage
2018-10-31 15:55:11 +00:00
Wei Tang
1c1cd8b164
Move state root verification before gas used (#9841) 2018-10-31 22:44:46 +08:00
Niklas Adolfsson
a898109522 fix(docker-aarch64) : cross-compile config (#9798) 2018-10-31 12:39:18 +00:00
Afri Schoedon
3694b10e22 version: bump nightly to 2.3.0 (#9819)
* version: bump nightly to 2.3.0

* Revert Cargo.lock
2018-10-31 12:38:47 +00:00
cheme
39f25d20a8 Tests modification for windows CI (#9671)
* Fixing and disabling some tests for windows 10 compatibility.

* Few adjustment for windows in tests (eg bigger timeout for keyserver tests)

* Spaces and temporary single thread ci (to be able to spot the error).
2018-10-31 11:50:38 +01:00
Seun LanLege
61c1646b43 EIP-712 implementation (#9631)
* EIP-712 impl

* added more tests

* removed size parsing unwrap

* corrected TYPE_REGEX to disallow zero sized fixed length arrays, replaced LinkedHashSet with IndexSet, added API spec to docs, fixed Type::Byte encoding branch

* use Option<u64> instead of u64 for Type::Array::Length

* replace `.iter()` with  `.values()`

Co-Authored-By: seunlanlege <seunlanlege@gmail.com>

* tabify eip712.rs

* use proper comments for docs

* Cargo.lock: revert unrelated changes

* tabify encode.rs
2018-10-31 00:12:42 +03:00
Niklas Adolfsson
1b9396dcbb Fix typo (#9826) 2018-10-29 21:41:54 +01:00
Wei Tang
05be4b5b0e
Clean up serde rename and use rename_all = camelCase when possible (#9823)
* Clean up serde rename and use rename_all = camelCase when possible

* snake_case for pricing

* Use camelcase for engine

* Use camel case for seal

* Use camel case for validator set

* Use camel case for confirmation payload

* Use camel case for consensus status

* Use camel case for nodekind

* Use kebab case for provenance

* Use camel case for pubsub

* Use lowercase and camelcase for trace

* Use camel case for whisper

* rename Ethash as irregular name
2018-10-29 23:49:04 +08:00
Kirill Fomichev
f8f8bf0fea RPC: parity_allTransactionHashes (#9745)
* rpc: add parity_allTransactionHashes

* Add light_all_transactionst to helpers

* Remove extra parentheses

* Move light_all_transactions to light_fetch

* Remove LightDispatcher import in light_fetch
2018-10-27 09:38:35 +02:00
Andronik Ordian
6643b6a306 Revert "prevent zero networkID (#9763)" (#9815)
This reverts commit 73f08b376f.
2018-10-27 02:53:19 +08:00
Wei Tang
7036ab26d7
Allow zero chain id in EIP155 signing process (#9792)
* Allow zero chain id in EIP155 signing process

* Rename test

* Fix test failure
2018-10-26 22:44:02 +08:00
Azamat M
9b55169251 Add readiness check for docker container (#9804)
* Update Dockerfile

Since parity is built for "mission critical use", I thought other operators may see the need for this.

Adding the `curl` and `jq` commands allows for an extremely simple health check to be usable in container orchestrators.

For example. Here is a health check for a parity docker container running in Kubernetes.

This can be setup as a readiness Probe that would prevent clustered nodes that aren't ready from serving traffic.

```bash
#!/bin/bash

ETH_SYNCING=$(curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://localhost:8545 -H 'Content-Type: application/json')
RESULT=$(echo "$ETH_SYNCING | jq -r .result)

if [ "$RESULT" == "false" ]; then
  echo "Parity is ready to start accepting traffic"
  exit 0
else
  echo "Parity is still syncing the blockchain"
  exit 1
fi
```

* add sync check script
2018-10-26 13:51:08 +02:00
Wei Tang
ff13c9c186
Insert dev account before unlocking (#9813) 2018-10-26 19:44:53 +08:00
felix
879e7305ca removed "rustup" & added new runner tag (#9731)
* removed "rustup" & added new runner tag

* exchanged tag "rust-windows" with "windows"

* revert windows tag change
2018-10-26 13:39:44 +02:00
Wei Tang
1ff827b2ea Expose config max-round-blocks-to-import (#9439)
* Expose config max-round-blocks-to-import

* Fix test
2018-10-26 13:21:36 +02:00
André Silva
e7f1204fa4 aura: finalize blocks (#9692)
* aura: emit ancestry actions for finalizing blocks

* aura: refactor is_epoch_end to get finalized blocks as argument

* ethcore: add is_epoch_end_light method to Engine

The full client now tracks finality by querying the engine on each block import,
and it also persists the finalization state to the DB. For the light client
current it doesn't persist finality information and only keeps track of finality
for epoch signals, by calling `is_epoch_end_light`. This method implements the
previously existing logic of building finality for all the blocks in the current
epoch and then checking the finalized blocks against the transition store.

* ethcore: allow finalizing current block

* aura: fix construction of finality proof

* aura: fix warnings

- missing docs for is_epoch_end_light
- unused method unfinalized_hashes in RollingFinality

* aura: fix clone on copy types
2018-10-25 17:33:41 +02:00
Andrew Jones
9a2c4a34ee
sync: retry different peer after empty subchain heads response (#9753)
* If no subchain heads then try a different peer

* Add log when useless chain head

* Restrict ChainHead useless peer to ancient blocks

* sync: replace `limit_reorg` with `block_set` condition
2018-10-25 16:56:59 +02:00