Commit Graph

3601 Commits

Author SHA1 Message Date
Niklas Adolfsson
283d0773fe
update hardcoded headers: mainnet and ropsten (#11414)
mainnet: #9361409
ropsten: #7202817
2020-01-28 14:43:16 +01:00
Andreas Fackler
e69539357f AuthorityEngine: Minor cleanups. (#11408) 2020-01-27 14:30:42 +01:00
varasev
6ab7789604 Update POA bootnodes (#11411) 2020-01-27 12:50:04 +01:00
EtherCore Contributor
33bfcec4ab Add EtherCore support (#11402)
* support ethercore mainnet with basic token metrics and ProgPoW support, ecip1017, bomb defuse & istanbul
2020-01-24 23:33:42 -08:00
Niklas Adolfsson
a47a5b1992 verification: fix race same block + misc (#11400)
* ethcore: fix race in verification

* verification: fix some nits

* verification: refactor err type `Kind::create`

* fix: tests

* address grumbles

* address grumbles: don't panic
2020-01-24 16:51:11 +01:00
Talha Cross
b69a33b3ab update classic testnet bootnodes (#11398)
* update classic testnet bootnodes

* Update kotti.json

* Update kotti.json

* Update kotti.json

* Update mordor.json
2020-01-24 15:03:00 +01:00
Niklas Adolfsson
a9d337f7f3 dependencies: bump derive_more v0.99 (#11405)
* engine error: remove faulty/unused `From`

* dependencies: bump `derive_more v0.99`

The primilary motivation behind this is to have hard errors on `From` conversions that are ignored by
duplicated `variants` with the same value type
2020-01-24 14:52:50 +01:00
Niklas Adolfsson
bbc6fb5db6 engine error: remove faulty/unused From (#11404) 2020-01-24 14:52:12 +01:00
/raw PONG _GHMoaCXLT
171526c1a1 ethcore/res: fix ethereum classic chainspec blake2_f activation block num (#11391) 2020-01-20 16:20:38 +01:00
s3krit
77643c13e8
Update copyright notice 2020 (#11386)
* Update copyright noticed 2020

* Update copyright in two overlooked files
2020-01-17 14:27:28 +01:00
Akihito Nakano
d3b4898339 json-tests: Fix compile error (#11384) 2020-01-16 10:15:22 +01:00
Wei Tang
d8a0d38229 Fix Aztlan hard fork issues (#11347)
* Fix Aztlan hard fork issues

* Fix mordor block number

* Fix classic block number

* Add missing precompiles

* Make EIP-1283's comments reflact the current spec

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2020-01-13 22:54:00 +01:00
Andreas Fackler
ea8e7fcf73 authority_round: Fix next_step_time_duration. (#11379)
It's supposed to find the first step at or after `time`.
To compute that step's timestamp, it needs to add the total length
of all steps since the previous transitions to the timestamp of the
previous transition, not to `time`.
2020-01-13 22:42:14 +01:00
Vladimir Komendantskiy
73354d8d93 Set the block gas limit to the value returned by a contract call (#10928)
* Block gas limit contract

Lower gas limit if TxPermission.limitBlockGas.

Call blockGasLimit before every block.

Make the block gas limit contract a separate config option.

Add `info` level logging of block gas limit switching

block-gas-limit subcrate and responses to review comments

simplified call_contract_before

moved block_gas_limit_contract_transitions to AuRa params

removed call_contract_before

Update and fix test_verify_block.

Remove some unused imports and functions.

* Move gas limit override check to verify_block_basic.

Co-authored-by: Andreas Fackler <afck@users.noreply.github.com>
2020-01-13 11:27:03 +01:00
Felix Leupold
87e1080581 [Trace] Distinguish between create and create2 (#11311)
* adding a CreateType to ActionParams

* rename calltype to action type

* comments & line lengths

* rebame ActionParams.call_type

* Making call/create type optional

* Moving strict create/call type into trace package instead of storing loosely typed action type

* fix build

* Deriving ActionType from address_scheme in ext.create

* trigger build

* more detailed comments

* Change actions_type to call in vmtests

* skipping serialization for Option::None and using TryFrom instead of maybe_new

* retrigger build

* trigger build
2020-01-13 11:10:24 +01:00
meowsbits
b6afc81d69 Fix esoteric test config variable (#11292)
* Fix esoteric test config variable

EIP155 canonically (on Ethereum mainnet, for which these test were developed)
happens simultaneously with EIP158/161 and other "Spurious Dragon" upgrades.

This test is intended to test the transition from the EIP158/161 era (Spurious Dragon)
to the Byzantium era, with Byzantium changes happening at 5.

* Add missing 'modexp' precompiled contract

modexp was introduced via EIP198 as a part of the Byzantium fork,
which this test should be testing against.
2020-01-10 15:12:32 +01:00
David
5bd6b208af Forward-port #11356 (#11359) 2020-01-06 10:46:05 +03:00
RJ
280894691e Replace stale boot nodes with latest list (#11351) 2019-12-30 08:01:00 -08:00
David
b9f9d11929
Update to latest kvdb-*: no default column, DBValue is Vec (#11312)
* Only use kvdb "column families"

This PR contains the changes necessary to use the `kvdb-*` crates from https://github.com/paritytech/parity-common/pull/278 (so a synchronized merge is required) which drops support for the old-style rocksdb "default" column to get a smaller and less complex API.

As it stands this PR is working correctly except for secret-store; we need to migrate it to use a new column family.

* Fix secretstore build

* Fix secretstore build: include ethkey when building with the "accounts" feature

* typos

* Restore state test commit

* Override all of parity-common from git

* Be precise about version requirement to migrate secretstore code

* Update ethcore/db/src/db.rs

Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Address review grumbles

* Review grumbles

* Cleanup

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2019-12-20 12:27:38 +01:00
Cho
e14d68e559 Add Nat PMP method to P2P module (#11210)
* Add Nat PMP method to P2P module

* Add test fn

* Use closure

* print richer error messages.

* reformat long code line

* remove closures
2019-12-19 09:01:39 +01:00
Andreas Fackler
2b1d148ceb Add randomness contract support to AuthorityRound. (#10946)
* Add randomness contract support to Authority Round.

Changes have been cherry-picked from poanetwork's aura-pos branch.
Most of the work has been done by @mbr.

* Address review comments for randomness contract.

Co-Authored-By: David <dvdplm@gmail.com>

* Rename revealSecret to revealNumber

* Update Randomness contract bytecode

* Use H256, rename secret to random number.

* Use get_commit_and_cipher

* Clean up Miner::prepare_block.

* Remove is_reveal_phase call.

* Add more comments, require randomness contract map.

* Simplify run_randomness_phase

* Address review comments.

* Remove Client::transact_contract.
2019-12-17 11:34:14 +01:00
Talha Cross
f6909d8243 ethcore/res: activate ecip-1061 on kotti and mordor (#11338)
* ethcore/res: activate ecip-1061 on kotti and mordor

* ethcore/res: update bootnodes for mordor
2019-12-16 07:32:12 +01:00
Andronik Ordian
fd29926a21
tx-q: enable basic verification of local transactions (#11332)
* tx-q: basic verification of local transactions

* miner: basic test for local import

* miner: info log when rejecting local txn

* Hernandofmt

Co-Authored-By: Hernando Castano <HCastano@users.noreply.github.com>

* miner: assert in a test with the concrete error type

* tx-q: info! -> warn! on local tx rejection
2019-12-13 20:25:51 +01:00
Andronik Ordian
63535860bc remove null signatures (#11335)
* tx: clean up legacy eip-86 based null signature

* tx: add a test for null signature rejection

* tx: revert json txn changes

* fix evmbin bench build

* tx: put UNSIGNED_SENDER behind 'test-helpers' feature

* Revert "tx: put UNSIGNED_SENDER behind 'test-helpers' feature"

This reverts commit 1dde47831e4dc5098d064e6022ead43512c31efb.

* tx: add comment for null_sign

* even more cleanup

* Revert "even more cleanup"

This reverts commit be29f032415c53d4d40842f93f1fd1fb6f9cc6bd.
2019-12-13 18:12:22 +01:00
Talha Cross
6e76be7fad ethcore/res: activate agharta on classic 9573000 (#11331) 2019-12-13 12:07:29 +01:00
Wei Tang
4fa78e0537
Enable EIP-2384 for ice age hard fork (#11281)
* Enable EIP-2384 for Istanbul hard fork

* Update bomb delay block number

* Update ropsten.json
2019-12-11 22:32:20 +01:00
varasev
4c6b282bee Istanbul activation on xDai (#11299) 2019-12-09 14:36:16 +01:00
varasev
07e3a7f3d4 Istanbul activation on POA Core (#11298) 2019-12-09 14:36:06 +01:00
Andronik Ordian
36c917eb7a
validate-chainspecs: check istanbul eips are in the foundation spec (#11305)
* validate-chainspecs: check istanbul eips are in foundation spec

* foundation: specify 1283 disable/reenable transitions
2019-12-06 13:12:08 +01:00
Niklas Adolfsson
cfe57633fa
[chainspec]: add eip1344_transition for istanbul (#11301) 2019-12-05 12:58:01 +01:00
David
f6c3d4c695 Use upstream rocksdb (#11248)
* Use upstream rocksdb

…by way of https://github.com/paritytech/parity-common/pull/257 by @ordian.

* Hint at how `parity db reset` works in the error message

* migration-rocksdb: fix build

* Cargo.toml: use git dependency instead of path

* update to latest kvdb-rocksdb

* fix tests

* saner default for light client

* rename open_db to open_db_light

* update to latest kvdb-rocksdb

* moar update to latest kvdb-rocksdb

* even moar update to latest kvdb-rocksdb

* use kvdb-rocksdb from crates.io

* Update parity/db/rocksdb/helpers.rs

* add docs to memory_budget division
2019-12-03 16:59:11 +01:00
Anton Gavrilov
2895e3b2ab Treat only blocks in queue as synced (#11264) 2019-12-03 15:59:15 +01:00
Sebastian Dechant
f2f4217e3c add support for evan.network chains (#11289)
* add support for evan.network chains

* fix chainspec parsing errror

* add missing core param

* missing colon
2019-12-03 15:00:29 +01:00
varasev
cf2cb58e1d Istanbul HF on POA Sokol (#11282) 2019-11-25 23:10:55 +01:00
Niklas Adolfsson
dcb69ba353 [ethcore]: apply filter when PendingSet::AlwaysQueue in ready_transactions_filtered (#11227)
* [ethcore]: apply filter when `from_queue`

In `ready_transactions_filtered` the filter were never applied when
the options PendingSet::AlwaysQueue` was configured which this fixes

It also adds a two tests for it

* [ethcore test-helpers]: stray printlns

* docs(ethcore filter options): more generic desc

* tests(ethcore miner): simply filter tests

* [ethcore filter_options]: fix nits

* doc: nit

Co-Authored-By: David <dvdplm@gmail.com>

* doc: nit

Co-Authored-By: David <dvdplm@gmail.com>

* doc: nit

Co-Authored-By: David <dvdplm@gmail.com>

* doc: nit

Co-Authored-By: David <dvdplm@gmail.com>

* doc: nit

Co-Authored-By: David <dvdplm@gmail.com>

* doc(miner filter): simplify documentation

* [rpc]: make tests compile
2019-11-25 12:03:50 +01:00
David
6e34ee6837 Don't prune ancient state when instantiating a Client (#11270) 2019-11-22 12:18:24 +01:00
Marek Kotewicz
1986c4ee79 fixed verify_uncles error type (#11276)
* fixed verify_uncles error type

* cleanup and document fn verify_uncles bounds checking

* find_uncle_headers and find_uncle_hashes take u64 instead of u32 as an input param

* Update ethcore/verification/src/verification.rs

Co-Authored-By: David <dvdplm@gmail.com>
2019-11-22 10:26:50 +01:00
Andronik Ordian
df1c5ac616 ethcore: fix rlp deprecation warnings (#11280) 2019-11-21 17:23:49 +01:00
Jim Posen
c7219aae30
Upgrade trie-db to 0.16.0. (#11274)
* Upgrade trie-db to 0.16.0.

* Respond to review comments.
2019-11-21 11:08:49 +01:00
David
ee01612768 Clarify what first_block None means (#11269) 2019-11-20 11:26:47 +08:00
Marek Kotewicz
e0091c672a
removed redundant VMType enum with one variant (#11266) 2019-11-20 11:11:36 +08:00
David
eb565a7e2b
Add a benchmark for snapshot::account::to_fat_rlps() (#11185)
* Add a benchmark for snapshot::account::to_fat_rlps()

`to_fat_rlps()` is a hot call during snapshots. I don't think it has a perf problem per se, but better to have benchmark for it.

The data used is a piece of Ropsten data sized to the ~95% percentile of account size on that network.

* Benchmark with more chunks, including mainnet data

* whitespace

* Move `used_code` inside the benchmark iteration

* Revert "Move `used_code` inside the benchmark iteration"

This reverts commit cff33ab30acbd1c009e745f646f1cc655ee01d8c.
2019-11-15 12:27:24 +01:00
David
e194a2c6e3 Fix misc compile warnings (#11258) 2019-11-14 00:01:21 +01:00
Marek Kotewicz
db1ea1dcd8 simplify verification (#11249)
* simplify verifier, remove NoopVerifier

* simplify verifier by removing Verifier trait and its only implementation

* remove unused imports

* fixed verification test failing to compile
2019-11-12 15:05:49 +01:00
joshua-mir
9d55f0b4ab
update ropsten forkCanonHash, forkBlock (#11247)
value taken from https://ropsten.etherscan.io/block/6485847
2019-11-11 12:38:32 +01:00
Seun LanLege
887aa62fdb Make InstantSeal Instant again (#11186)
* Make InstantSeal Instant again

* update_sealing if there are transactions in pool after impoerting a block, some line formatting

* Apply suggestions from code review

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* InstantSeal specific behaviour

* introduce engine.should_reseal_on_update, remove InstantSealService

* remove unused code

* add force param to update_sealing

* better docc

* even better docs

* revert code changes, doc corrections, sort dep

* code optimization

* fix test

* fix bench
2019-11-10 11:41:31 +01:00
Thibaut Sardan
8adde605e9 ropsten #6631425 foundation #8798209 (#11201) 2019-11-05 12:15:24 +01:00
phahulin
5fdf6be798 Update list of bootnodes for xDai chain (#11236)
Reference PR in POA repository: https://github.com/poanetwork/poa-chain-spec/pull/127
2019-11-05 12:07:52 +01:00
Talha Cross
1b4d23fd20
ethcore/res: add mordor testnet configuration (#11200)
* ethcore/res: add mordor testnet configuration

* ethcore/spec: add mordor testnet configuration

* parity/cli: add mordor testnet configuration

* parity/config: fix tests

* ethcore/res: update mordor spec with agharta hardfork block 301243

*  ethcore/res: update kotti with agharta block 1705549

* ethcore/res: update morden with agharta block 5000381

* ethcore/res: multiple prices and activations for mordor testnet

* fix mordor spec json

* fix mordor spec json
2019-11-02 12:26:38 +01:00
Niklas Adolfsson
43dc9af03b [chain specs]: activate Istanbul on mainnet (#11228)
* [chains spec]: activate istanbul at mainnet

* Activate `Block >= 9,069,000` on the Ethereum mainnet
* Enable Blake2 compression function `F` precompile

* [chain specs]: add comments for EIP1108 activation

* [chainspec mainnet]: enable Istanbul transitions

* [chainspec mainnet]: simply configuration
2019-11-01 20:27:14 +01:00