* 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
* wip
* 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>
* Report benign misbehaviour iff currently a validator
* Report malicious behaviour iff we're a validator
* Escalate to warning and fix wording
* Test reporting behaviour
Don't require node to be part of the validator set to report malicious behaviour
* Include missing parent hash in MissingParent error
* Update ethcore/src/engines/validator_set/simple_list.rs
Co-Authored-By: Luke Schoen <ltfschoen@users.noreply.github.com>
* docs
* remove unneeded into()
Move check for parent_step == step for clarity&efficiency
Remove dead code for Seal::Proposal
* typo
* Wording
* naming
* WIP
* cleanup
* cosmetics
* cosmetics and one less lvar
* spelling
* Better loggin when a block is already in chain
* More logging
* On second thought non-validators are allowed to report
* cleanup
* remove dead code
* Keep track of the hash of the last imported block
* Let it lock
* Serialize access to block sealing
* Take a lock while sealing a block
* Cleanup
* whitespace
* 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
* get node IP address and udp port from Socket, if not included in PING packet
* prevent bootnodes from being added to host nodes
* code corrections
* code corrections
* code corrections
* code corrections
* docs
* code corrections
* code corrections
* Apply suggestions from code review
Co-Authored-By: David <dvdplm@gmail.com>
* [whisper] Move needed aes_gcm crypto in-crate
In the latest `parity-crypto` release (upcoming 0.4), the aes GCM features were removed (done to remove the dependency on `ring`).
This PR adds the bare minimum crypto needed for Whisper directly to the crate itself and as those were the only features needed from `parity-crypto`, removes the dependency on that crate altogether.
* Upgrade to parity-crypto 0.4
Reverts using NonZeroU32 (introduced [here](b347599cf7)).
* Check for 0 in `args.arg_keys_iteration`
* Use beta.4
* parity-crypto 0.4.0 is released
* Fix nasty typo in NodeTable::update (add ;)
* Add limiting for NodeTable
* Add cache for NodeFilter
* Use expect instead of unwrap
* Move node in ordered_ids if it exists there in note_failure and note_success + fix expect msg
* Add comment
* Improve code style
* DRY in note_failure and note_success
* Fix nodes ordering
* Simplify match expression
* Add tests for get_index_to_insert
* Remove get_mut method from NodeTable, Add get method to NodeTable
* Fix table_last_contact_order for macos failing because of lost nanosecond precision
* 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
* Don't add discovery initiators to the node table
* Use enums for tracking state of the nodes in discovery
* Dont try to ping ourselves
* Fix minor nits
* Update timeouts when observing an outdated node
* Extracted update_bucket_record from update_node
* Fixed typo
* Fix two final nits from @todr
* Increase the number of block bodies requested during Sync.
* Increase the number of block bodies requested during Sync.
* Check if our peer is an older parity client with the bug
of not handling large requests properly
* Add a ClientVersion struct and a ClientCapabilites trait
* Make ClientVersion its own module
* Refactor and extend use of ClientVersion
* Replace strings with ClientVersion in PeerInfo
* Group further functionality in ClientCapabilities
* Move parity client version data from tuple to its own struct.
* Implement accessor methods for ParityClientData and remove them
from ClientVersion.
* Minor fixes
* Make functions specific to parity return types specific to parity.
* Test for shorter ID strings
* Fix formatting and remove unneeded dependencies.
* Roll back Cargo.lock
* Commit last Cargo.lock
* Convert from string to ClientVersion
* * When checking if peer accepts service transactions just check
if it's parity, remove version check.
* Remove dependency on semver in ethcore-sync
* Remove unnecessary String instantiation
* Rename peer_info to peer_version
* Update RPC test helpers
* Simplify From<String>
* Parse static version string only once
* Update RPC tests to new ClientVersion struct
* Document public members
* More robust parsing of ID string
* Minor changes.
* Update version in which large block bodies requests appear.
* Update ethcore/sync/src/block_sync.rs
Co-Authored-By: elferdo <elferdo@gmail.com>
* Update util/network/src/client_version.rs
Co-Authored-By: elferdo <elferdo@gmail.com>
* Update util/network/src/client_version.rs
Co-Authored-By: elferdo <elferdo@gmail.com>
* Update tests.
* Minor fixes.
* fix(ManageNetwork): replace Range -> RangeIncls
Fixes `TODO: Range should be changed to RangeInclusive once stable (https://github.com/rust-lang/rust/pull/50758)`
* fix(tests)
* fix(grumbles): off-by-one error in debug_asserts
* RangeInclusive::end() is inclusive which means that if start and end is equal the `debug_assert(range.end() >
range.start()` will fail which is shouldn't
* Replace ethcore-logger with env-logger.
* Fix logger initialization in WASM tests.
* uncomment logger initialization in secret store
* Don't use ethcore-logger in whisper.
* Move ethcore-logger within parity dir.
* Uncomment rest from secret-store.
* Use `let _ =` in private_contract for consistency
* `ok()` to `let _ =` fix in service
* Use `let _ = ` for state_db
- Refactor (and rename crate) and implement RwLock len cache.
- improve docs
- update ethcore verification queue to new version
- Implement Default, From, also derive Debug
- update: parking_lot to 0.7
New util LenCachingMutex can be used in place of a Mutex, when working
with collections, or other types with a len() method. When
the Guard is dropped, the value returned from len() is stored
into an AtomicUsize and can be queried using load_len() without
needing to lock the Mutex. Implementations for ```Vec``` and
```VecDeque```.
Now used in [Verification](4ded4181a6/ethcore/src/verification/queue/mod.rs (L196)) so that calls to ```VerificationQueue.queue_info()```
no longer require locks.