* Stop breaking out of loop if a non-canonical hash is found
* include expected hash in log msg
* More logging
* Scope
* Syntax
* Log in blank RollingFinality
Escalate bad proposer to warning
* Check validator set size: warn if 1 or even number
* More readable code
* Use SimpleList::new
* Extensive logging on unexpected non-canonical hash
* Wording
* Update ethcore/blockchain/src/blockchain.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Improved logging, address grumbles
* Update ethcore/src/engines/validator_set/simple_list.rs
Co-Authored-By: Luke Schoen <ltfschoen@users.noreply.github.com>
This commit does the following:
- Prevent overflow in `verify_timestamp()` by not adding `now` to found faulty timestamp
- Use explicit `CheckedSystemTime::checked_add` to prevent potential consensus issues because SystemTime is platform
depedent
- remove `#[cfg(not(time_checked_add))]` conditional compilation
* Add a way to signal shutdown to snapshotting threads
* Pass Progress to fat_rlps() so we can abort from there too.
* Checking for abort in a single spot
* Remove nightly-only weak/strong counts
* fix warning
* Fix tests
* Add dummy impl to abort snapshots
* Add another dummy impl for TestSnapshotService
* Remove debugging code
* Return error instead of the odd Ok(())
Switch to AtomicU64
* Use fewer threads for snapshotting
When taking a snapshot the current default number of threads is equal to half the number of **logical** CPUs in the system. On HT enabled CPUs this value seems a bit high, e.g. 6 snapshotting threads on a 6/12 core/hyperthread CPU. Maybe a better default value is half the number of physical cores?
* fix test
* Replace error chain for network error
* Fix usages and add manual From impls
* OnDemand Error and remove remaining dependencies
* Die error_chain, die.
* DIE
* Hasta la vista, baby
* Stop breaking out of loop if a non-canonical hash is found
* include expected hash in log msg
* More logging
* Scope
* Syntax
* Log in blank RollingFinality
Escalate bad proposer to warning
* More readable code
* Extensive logging on unexpected non-canonical hash
* Wording
* Use Drop to shutdown stepper thread
Make period == 0 an error and remove the Option from step_service
* Remove StepService
Remove StepService and spawn the stepping thread in `Clique::new()`. Don't store the thread handle and instead trust the `AtomicBool` to signal shutdown time.
Don't check for `period > 0`: we assume a valid chainspec file.
* Don't shutdown the stepper thread at all, just let it run until exit
Also: fix a few warnings and tests
* Put kvdb_memorydb back
* Warn&exit when engine is dropped
Don't sleep too long!
* Don't delay stepping thread
* Better formatting
* Remove annoying compiler warnings
* Fix compiler warning (that will become an error)
Fixes https://github.com/paritytech/parity-ethereum/issues/10648
I'm not sure this fix is Good™ but rustc seems happy enough.
There's a deeper issue which may or may not be related to this: the Engine is not shutdown properly and the `StepService` thread keeps running indefinitely after Ctrl-C (so `update_sealing()` is called repeatedly for 300sec). I don't think this is related to Clique as I've seen this happen on mainnet as well, but I wonder if the effects of it are worse for a PoA network where the node can create new blocks all on its own?
* Use saturating_sub
* WIP
* Fix warning, second attempt
The idea here is to avoid using `Arc::get_mut()` (which does not work: fails every time here) and instead trust `drop()` to do the right thing.
This is a conservative change. I think this can be reformed further, e.g. by `impl Drop for StepService` and halt the thread there, or even skip `join()`ing the thread entirely and trust the `AtomicBool` to signal shutdown. I also have doubts abut the `Option<StepService>`: seems a bit much to have an `Option` there and it makes things cumbersome.
* Don't panic if extra_data is longer than VANITY_LENGTH
Seems like `extra_data().len()` can be longer than 32 (was 39 here) so this fixes that panic.
* Update ethcore/src/engines/clique/mod.rs
* Tx permission contract improvement
* Take in account zero gas price certification when doing transact_contract
* DRY in ServiceTransactionChecker
* Fix typos and regroup mod
* Introduce CertifiedAddressesCache
* Introduce refresh_cache for CertifiedAddressesCache
* Add CertifiedAddressesCache read and write on checking
* Refresh CertifiedAddressesCache on new imported block
* Separate ChainInfo trait and fix errors after merge
* Do not fire an error when service txes contract does not exist
* WIP: Shared certified addresses cache between miner and client + use HashMap instead of BTreeMap
* Refactor refresh_cache for ServiceTransactionChecker
* Refresh cache fixes
* Add cache read in check_address + log when cache is used + improve code
* Remove ChainInfo from ServiceTransaction dependencies
* DRY ServiceTransactionChecker
* Fix Client and Miner in tests
* Fix node_filter test
* Fix Client::new in add_peer_with_private_config
* WIP: Separated ChainNotify from ethcore trait and implemented ChainNotify for ServiceTransactionChecker
* Fix watcher test
* Revert "Merge branch 'master' into master"
This reverts commit 4e7371dc109d022efe3087defc33d827998ce648, reversing
changes made to bffd73e5fd58a516bbf404281b51cf26422e181e.
* Revert "Fix watcher test"
This reverts commit bffd73e5fd58a516bbf404281b51cf26422e181e.
* Revert "WIP: Separated ChainNotify from ethcore trait and implemented ChainNotify for ServiceTransactionChecker"
This reverts commit 6e73d1e61fa15dc10ffd4fab63df29eabe9c3b3a.
* Revert "Fix Client::new in add_peer_with_private_config"
This reverts commit ec610a30bee95588d58b79edcc9e43c2ff90f1ad.
* Revert "Fix node_filter test"
This reverts commit 06a4b2de86317c902f579e912b40de0b0fbf6d78.
* Revert "Fix Client and Miner in tests"
This reverts commit 51bbad330ea6e7bdfc1516208cc8705d5d11516d.
* Implement ServiceTransactionChecker in miner and delegate it to client + revert unnecessary changes
* Merge master
* Code improvements
* Merge branch 'master' of https://github.com/paritytech/parity-ethereum
# Conflicts:
# Cargo.lock
# ethcore/private-tx/src/lib.rs
# ethcore/src/miner/miner.rs
# ethcore/src/miner/pool_client.rs
* Add trace information to eth_estimateGas
* replace unwrap better version
* change vm::Error formatter to more user-friendly
* remove extra error format
* use map_or instead sequence of map/unwrap_or
* fix(extract `timestamp_checked_add` as lib)
* fix(whisper types): remove unused `EmptyTopics`
* fix(time-lib): feature-flag to use time-lib or std
This commit adds conditional compilation checks that falls back to `our time-lib` when
`time_checked_add` is not available in the standard library
Note, `time_checked_add` covers both `checked_add` and `checked_sub`
* fix(grumble): use cfg_attr to define rustc feature
* ethash: initial implementation of progpow
* progpow: use wrapping arithmetic
* progpow: cleanup comments
* progpow: fix keccak_f800
* progpow: reorder definitions
* progpow: general fixing
* progpow: add basic tests from geth
* progpow: generate c_dag and add test
* progpow: fix progpow_init and progpow_loop
* progpow: fix and add new test
* progpow: tabify
* progpow: add shared testvectors from geth and aleth
* progpow: add benchmarks
* progpow: don't read bytes from dag
* ethash: use criterion for progpow benchmarks
* progpow: dont borrow hash on fnv1a_hash
* progpow: don't borrow operand on progpow merge
* progpow: hardcode dag lookup function
we only support light verification anyway
* progpow: read double words directly from the dag
* progpow: inline some small functions
* progpow: remove some bounds checking from the main loop
* progpow: remove unreachable match cases
* progpow: remove bounds check in keccak_f800_round
* progpow: fix ptr::swap
* progpow: force loop unroll in keccak_f800_round
* progpow: remove unnecessary branching in progpow_loop
* progpow: force loop unroll in fill_mix
* progpow: silence unused warning
* progpow: dont run last keccak_f800_round out of the loop
rustc generates the same assembly, it unrolls the loop
* progpow: fix output of keccak_f800_short
* ethcore: support progpow in ethash engine
* ethash: fix typo
* ethcore, ethash: fix tests
* json: fix ethash spec tests
* ethash: update quick_get_difficulty for progpow
* ethash: drop light cache on progpow transition block
* ethash: fix quick_get_difficulty tests
* progpow: update to spec v0.9.0
* progpow: update to spec v0.9.1
* progpow: update to spec v0.9.2
* ethash: rename progpow benchmarks
* fix Cargo.lock bad merge
* ethash: only export modules for benchmarks
* ethash: progpow: remove unsafe unchecked indexing
* ethash: create enum for pow algorithm
* ethash: box the progpow cdag
* ethash: skip slow progpow test vectors on ci
* ethash: don't skip progpow test vectors
they don't take too long when running in release mode which is the case
for CI.
* ethash: progpow: update copyright date
Co-Authored-By: andresilva <andre.beat@gmail.com>
* ethcore: remove verification of ci-skip-tests on non-test builds