* updater: apply exponential backoff after download failure (#8059)
* updater: apply exponential backoff after download failure
* updater: reset backoff on new release
* Limit incoming connections. (#8060)
* Limit ingress connections
* Optimized handshakes logging
* Max code size on Kovan (#8067)
* Enable code size limit on kovan
* Fix formatting.
* add some dos protection (#8084)
* more dos protection (#8104)
* Const time comparison (#8113)
* Use `subtle::slices_equal` for constant time comparison.
Also update the existing version of subtle in `ethcrypto` from
0.1 to 0.5
* Test specifically for InvalidPassword error.
* revert removing blooms (#8066)
* Revert "fix traces, removed bloomchain crate, closes#7228, closes#7167"
This reverts commit 1bf62038678295e5586f02a38a0c5aab9a9efe62.
* Revert "fixed broken logs (#7934)"
This reverts commit f8a2e53f3e.
* fixed broken logs
* bring back old lock order
* remove migration v13
* revert CURRENT_VERSION to 12 in migration.rs
* Fix compilation.
* Check one step deeper if we're on release track branches
* add missing pr
* Fix blooms?
* Fix tests compiilation.
* Fix size.
* CI: Fix cargo cache (#7968)
* Fix cache
Blocking waiting for file lock on the registry index
* Only clean locked cargo cache on windows
* fixed ethstore sign (#8026)
* fix cache & snapcraft CI build (#8052)
after successful testing it is necessary to port in a ```beta``` and ```stable```
* Add MCIP-6 Byzyantium transition to Musicoin spec (#7841)
* Add test chain spec for musicoin byzantium testnet
* Add MCIP-6 Byzyantium transition to Musicoin spec
* Update mcip6_byz.json
* ethcore: update musicoin byzantium block number
* ethcore: update musicoin byzantium block number
* ethcore: update musicoin bootnodes
* Update musicoin.json
* Update musicoin.json
* More bootnodes.
* Hardware-wallet/usb-subscribe-refactor (#7860)
* Hardware-wallet fix
* More fine-grained initilization of callbacks by vendorID, productID and usb class
* Each device manufacturer gets a seperate handle thread each
* Replaced "dummy for loop" with a delay to wait for the device to boot-up properly
* Haven't been very carefully with checking dependencies cycles etc
* Inline comments explaining where shortcuts have been taken
* Need to test this on Windows machine and with Ledger (both models)
Signed-off-by: niklasad1 <niklasadolfsson1@gmail.com>
* Validate product_id of detected ledger devices
* closed_device => unlocked_device
* address comments
* add target in debug
* Address feedback
* Remove thread joining in HardwareWalletManager
* Remove thread handlers in HardwareWalletManager because this makes them unused
* fixed broken logs (#7934)
* fixed broken logs
* bring back old lock order
* removed bloom groups from blockchain
* revert unrelated changes
* simplify blockchain_block_blooms
* Bump WS (#7952)
* Calculate proper keccak256/sha3 using parity. (#7953)
* Increase max download limit to 128MB (#7965)
* fetch: increase max download limit to 64MB
* parity: increase download size limit for updater service
* Detect too large packets in snapshot sync. (#7977)
* fix traces, removed bloomchain crate, closes#7228, closes#7167 (#7979)
* Remvoe generator.rs
* Make block generator easier to use (#7888)
* Make block generator easier to use
* applied review suggestions
* rename BlockMetadata -> BlockOptions
* removed redundant uses of blockchain generator and genereator.next().unwrap() calls
* ECIP 1041 - Remove Difficulty Bomb (#7905)
Enable difficulty bomb defusion at block:
- 5900000 on Ethereum Classic mainnet,
- 2300000 on morden testnet.
Reference:
https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1041.md
* spec: Validate required divisor fields are not 0 (#7933)
* Add validate_non_zero function
It's used to validate that a Spec's uint field used as a divisor is not zero.
* Add deserialize_with to gas_limit_bound_divisor
Prevents panics due to divide-by-zero on the gas_limit_bound_divisor
field.
* Add deserialize_with to difficulty_bound_divisor
Prevents panics due to divide-by-zero on the difficulty_bound_divisor
field.
* Add validate_optional_non_zero function
Used to validate Option<Uint> divisor fields.
* Use deserialize_with on optional divisor fields.
* Add #[serde(default)] attribute to divisor fields
When using `#[serde(deserialize_with)]`, `#[serde(default)]` must be specified so that missing
fields can be deserialized with the deserializer for `None`.
* Kovan WASM fork code (#7849)
* kovan fork code
* introduce ethcore level vm_factory and let it fail
* fix json tests
* wasmcosts as option
* review changes
* wasm costs in parser
* fix evm tests
* review fixes
* fix test
* remove redundant json field
* update back-references more aggressively after answering from cache (#7578)
* Add new EF ropstens nodes. (#7824)
* Add new EF ropstens nodes.
* Fix tests
* Add a timeout for light client sync requests (#7848)
* Add a timeout for light client sync requests
* Adjusting timeout to number of headers
* Flush keyfiles. Resolves#7632 (#7868)
* Fix wallet import (#7873)
* rpc: generate new account id for imported wallets
* ethstore: handle duplicate wallet filenames
* ethstore: simplify deduplication of wallet file names
* ethstore: do not dedup wallet filenames on update
* ethstore: fix minor grumbles
* [WASM] mem_cmp added to the Wasm runtime (#7539)
* mem_cmp added to the Wasm runtime
* schedule.wasm.mem_copy to schedule.wasm.mem_cmp for mem_cmp
* [Wasm] memcmp fix and test added (#7590)
* [Wasm] memcmp fix and test added
* [Wasm] use reqrep_test! macro for memcmp test
* wasmi interpreter (#7796)
* adjust storage update evm-style (#7812)
* disable internal memory (#7842)
* Improve handling of RocksDB corruption (#7630)
* kvdb-rocksdb: update rust-rocksdb version
* kvdb-rocksdb: mark corruptions and attempt repair on db open
* kvdb-rocksdb: better corruption detection on open
* kvdb-rocksdb: add corruption_file_name const
* kvdb-rocksdb: rename mark_corruption to check_for_corruption
* Hardening of CSP (#7621)
* Fixed delegatecall's from/to (#7568)
* Fixed delegatecall's from/to, closes#7166
* added tests for delegatecall traces, #7167
* Light client RPCs (#7603)
* Implement registrar.
* Implement eth_getCode
* Don't wait for providers.
* Don't wait for providers.
* Fix linting and wasm tests.
* Problem: AttachedProtocols don't get registered (#7610)
I was investigating issues I am having with Whisper support. I've
enabled Whisper on a custom test network and inserted traces into
Whisper handler implementation (Network<T> and NetworkProtocolHandler
for Network<T>) and I noticed that the handler was never invoked.
After further research on this matter, I found out that
AttachedProtocol's register function does nothing:
https://github.com/paritytech/parity/blob/master/sync/src/api.rs#L172
but there was an implementation originally:
99075ad#diff-5212acb6bcea60e9804ba7b50f6fe6ec and it did the actual
expected logic of registering the protocol in the NetworkService.
However, as of 16d84f8#diff-5212acb6bcea60e9804ba7b50f6fe6ec ("finished
removing ipc") this implementation is gone and only the no-op function
is left.
Which leads me to a conclusion that in fact Whisper's handler never gets
registered in the service and therefore two nodes won't communicate
using it.
Solution: Resurrect original non-empty `AttachedProtocols.register`
implementation
Resolves#7566
* Fix Temporarily Invalid blocks handling (#7613)
* Handle temporarily invalid blocks in sync.
* Fix tests.
* kvdb-rocksdb: update to RocksDB 5.8.8
* kvdb-rocksdb: tune RocksDB options
* Switch to level-style compaction
* Increase default block size (16K), and use bigger blocks for HDDs (64K)
* Increase default file size base (64MB SSDs, 256MB HDDs)
* Create a single block cache shared across all column families
* Tune compaction settings using RocksDB helper functions, taking into account
memory budget spread across all columns
* Configure backgrounds jobs based on the number of CPUs
* Set some default recommended settings
* ethcore: remove unused config blockchain.db_cache_size
* parity: increase default value for db_cache_size
* kvdb-rocksdb: enable compression on all levels
* kvdb-rocksdb: set global db_write_bufer_size
* kvdb-rocksdb: reduce db_write_bufer_size to force earlier flushing
* kvdb-rocksdb: use master branch for rust-rocksdb dependency
* created the dir crate in util
* moved code from ethstore/src/dir/paths.rs to dir crate
* rename dir module in ethstore to accounts_dir to distinguish it
from the dir crate
* changes after @tomusdrw on #6952
* parity-version module split from util
removed unused util deps and features
trigger buildbot again
only kvdb links rocksdb
snappy linker issues
* rm snappy
* fixed old version imports
Firstly, `Step.duration_remaining` casts it to u32, unnecesarily
limiting it to 2^32. While theoretically this is "good enough" (at 3
seconds steps it provides room for a little over 400 years), it is
still a lossy way to calculate the remaining time until the next step.
Secondly, step duration might be zero, triggering division by zero
in `Step.calibrate`
Solution: rework the code around the fact that duration is
typically in single digits and never grows, hence, it can be represented
by a much narrower range (u16) and this highlights the fact that
multiplying u64 by u16 will only result in an overflow in even further
future, at which point we should panic informatively (if anybody's
still around)
Similarly, panic when it is detected that incrementing the step
counter wrapped around on the overflow of usize.
As for the division by zero, prevent it by making zero an invalid
value for step duration. This will make AuRa log the constraint
mismatch and panic (after all, what purpose would zero step duration
serve? it makes no sense within the definition of the protocol,
as finality can only be achieved as per the specification
if messages are received within the step duration, which would violate
the speed of light and other physical laws in this case).