* version: bump stable to 2.1.7
* Adjust requests costs for light client (#9925)
* PIP Table Cost relative to average peers instead of max peers
* Add tracing in PIP new_cost_table
* Update stat peer_count
* Use number of leeching peers for Light serve costs
* Fix test::light_params_load_share_depends_on_max_peers (wrong type)
* Remove (now) useless test
* Remove `load_share` from LightParams.Config
Prevent div. by 0
* Add LEECHER_COUNT_FACTOR
* PR Grumble: u64 to u32 for f64 casting
* Prevent u32 overflow for avg_peer_count
* Add tests for LightSync::Statistics
* Fix empty steps (#9939)
* Don't send empty step twice or empty step then block.
* Perform basic validation of locally sealed blocks.
* Don't include empty step twice.
* prevent silent errors in daemon mode, closes#9367 (#9946)
* Fix light client informant while syncing (#9932)
* Add `is_idle` to LightSync to check importing status
* Use SyncStateWrapper to make sure is_idle gets updates
* Update is_major_import to use verified queue size as well
* Add comment for `is_idle`
* Add Debug to `SyncStateWrapper`
* `fn get` -> `fn into_inner`
* ci: rearrange pipeline by logic (#9970)
* ci: rearrange pipeline by logic
* ci: rename docs script
* 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
* Fix docker script (#9854)
* Dockerfile: change source path of the newly added check_sync.sh (#9869)
* Do not use the home directory as the working dir in docker (#9834)
* Do not create a home directory.
* Re-add -m flag
* fix docker build (#9971)
* bump smallvec to 0.6 in ethcore-light, ethstore and whisper (#9588)
* bump smallvec to 0.6 in ethcore-light, ethstore and whisper
* bump transaction-pool
* Fix test.
* patch cargo to use tokio-proto from git repo
this makes sure we no longer depend on smallvec 0.2.1 which is
affected by https://github.com/servo/rust-smallvec/issues/96
* use patched version of untrusted 0.5.1
* ci: allow audit to fail
* bump stable 2.1.6
* 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
* fix: Intermittent failing CI due to addr in use (#9885)
Allow OS to set port at runtime
* gitlab-ci: make android release build succeed (#9743)
* use docker cargo config file for android builds
* make android build succeed
* Update light-client hardcoded headers for
foundation: #6692865, ropsten: #4417537, kovan: #9363457
* Remove rust-toolchain file (#9906)
* 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>
* fix#9824 merge artifacts
* simplify cargo audit
* ci: nuke the gitlab caches (#9855)
* version: mark 2.1.5 stable
* ci: remove failing tests for android, windows, and macos (#9788)
* ci: remove failing tests for android, windows, and macos
* ci: restore android build jobs
* Move state root verification before gas used (#9841)
* 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
* version: bump parity beta to 2.1.4
* ethcore: bump ropsten forkblock checkpoint (#9775)
* ethcore: handle vm exception when estimating gas (#9615)
* removed "rustup" & added new runner tag (#9731)
* removed "rustup" & added new runner tag
* exchanged tag "rust-windows" with "windows"
* revert windows tag change
* 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
* update jsonrpc-core to a1b2bb742ce16d1168669ffb13ffe856e8131228
* Allow zero chain id in EIP155 signing process (#9792)
* Allow zero chain id in EIP155 signing process
* Rename test
* Fix test failure
* Insert dev account before unlocking (#9813)
* parity-version: mark 2.1.3 beta as critical
* Use signed 256-bit integer for sstore gas refund substate (#9746)
* Add signed refund
* Use signed 256-bit integer for sstore gas refund substate
* Fix tests
* Remove signed mod and use i128 directly
* Fix evm test case casting
* Fix jsontests ext signature
* Add --force to cargo audit install script (#9735)
* heads ref not present for branches beta and stable (#9741)
* aura: fix panic on extra_info with unsealed block (#9755)
* aura: fix panic when unsealed block passed to extra_info
* aura: use hex formatting for EmptyStep hashes
* aura: add test for extra_info
* produce portable binaries (#9725)
* HF in POA Core (2018-10-22) (#9724)
https://github.com/poanetwork/poa-chain-spec/pull/87
* Use static call and apparent value transfer for block reward contract code (#9603)
* Verify block syncing responses against requests (#9670)
* sync: Validate received BlockHeaders packets against stored request.
* sync: Validate received BlockBodies and BlockReceipts.
* sync: Fix broken tests.
* sync: Unit tests for BlockDownloader::import_headers.
* sync: Unit tests for import_{bodies,receipts}.
* tests: Add missing method doc.
* Fix ancient blocks sync (#9531)
* Log block set in block_sync for easier debugging
* logging macros
* Match no args in sync logging macros
* Add QueueFull error
* Only allow importing headers if the first matches requested
* WIP
* Test for chain head gaps and log
* Calc distance even with 2 heads
* Revert previous commits, preparing simple fix
This reverts commit 5f38aa885b22ebb0e3a1d60120cea69f9f322628.
* Reject headers with no gaps when ChainHead
* Reset block sync download when queue full
* Simplify check for subchain heads
* Add comment to explain subchain heads filter
* Fix is_subchain_heads check and comment
* Prevent premature round completion after restart
This is a problem on mainnet where multiple stale peer requests will
force many rounds to complete quickly, forcing the retraction.
* Reset stale old blocks request after queue full
* Revert "Reject headers with no gaps when ChainHead"
This reverts commit 0eb865539e5dee37ab34f168f5fb643300de5ace.
* Add BlockSet to BlockDownloader logging
Currently it is difficult to debug this because there are two instances,
one for OldBlocks and one for NewBlocks. This adds the BlockSet to all
log messages for easy log filtering.
* Reset OldBlocks download from last enqueued
Previously when the ancient block queue was full it would restart the
download from the last imported block, so the ones still in the queue would be
redownloaded. Keeping the existing downloader instance and just
resetting it will start again from the last enqueued block.:wq
* Ignore expired Body and Receipt requests
* Log when ancient block download being restarted
* Only request old blocks from peers with >= difficulty
https://github.com/paritytech/parity-ethereum/pull/9226 might be too
permissive and causing the behaviour of the retraction soon after the
fork block. With this change the peer difficulty has to be greater than
or euqal to our syncing difficulty, so should still fix
https://github.com/paritytech/parity-ethereum/issues/9225
* Some logging and clear stalled blocks head
* Revert "Some logging and clear stalled blocks head"
This reverts commit 757641d9b817ae8b63fec684759b0815af9c4d0e.
* Reset stalled header if useless more than once
* Store useless headers in HashSet
* Add sync target to logging macro
* Don't disable useless peer and fix log macro
* Clear useless headers on reset and comments
* Use custom error for collecting blocks
Previously we resued BlockImportError, however only the Invalid case and
this made little sense with the QueueFull error.
* Remove blank line
* Test for reset sync after consecutive useless headers
* Don't reset after consecutive headers when chain head
* Delete commented out imports
* Return DownloadAction from collect_blocks instead of error
* Don't reset after round complete, was causing test hangs
* Add comment explaining reset after useless
* Replace HashSet with counter for useless headers
* Refactor sync reset on bad block/queue full
* Add missing target for log message
* Fix compiler errors and test after merge
* ethcore: revert ethereum tests submodule update
* Add hardcoded headers (#9730)
* add foundation hardcoded header #6486017
* add ropsten hardcoded headers #4202497
* add kovan hardcoded headers #9023489
* gitlab ci: releasable_branches: change variables condition to schedule (#9729)
* parity-version: bump beta to 2.1.2
* docs(rpc): push the branch along with tags (#9578)
* docs(rpc): push the branch along with tags
* ci: remove old rpc docs script
* Remove snapcraft clean (#9585)
* Revert " add snapcraft package image (master) (#9584)"
This reverts commit ceaedbbd7f.
* Update package-snap.sh
* Update .gitlab-ci.yml
* ci: fix regex 🙄 (#9597)
* docs(rpc): annotate tag with the provided message (#9601)
* Update ropsten.json (#9602)
* HF in POA Sokol (2018-09-19) (#9607)
https://github.com/poanetwork/poa-chain-spec/pull/86
* fix(network): don't disconnect reserved peers (#9608)
The priority of && and || was borked.
* fix failing node-table tests on mac os, closes#9632 (#9633)
* ethcore-io retries failed work steal (#9651)
* ethcore-io uses newer version of crossbeam && retries failed work steal
* ethcore-io non-mio service uses newer crossbeam
* remove master from releasable branches (#9655)
* remove master from releasable branches
need backporting in beta
fix https://gitlab.parity.io/parity/parity-ethereum/-/jobs/101065 etc
* add except for snap packages for master
* Test fix for windows cache name... (#9658)
* Test fix for windows cache name...
* Fix variable name.
* fix(light_fetch): avoid race with BlockNumber::Latest (#9665)
* Calculate sha3 instead of sha256 for push-release. (#9673)
* Calculate sha3 instead of sha256 for push-release.
* Add pushes to the script.
* Hardfork the testnets (#9562)
* ethcore: propose hardfork block number 4230000 for ropsten
* ethcore: propose hardfork block number 9000000 for kovan
* ethcore: enable kip-4 and kip-6 on kovan
* etcore: bump kovan hardfork to block 9.2M
* ethcore: fix ropsten constantinople block number to 4.2M
* ethcore: disable difficulty_test_ropsten until ethereum/tests are updated upstream
* ci: fix push script (#9679)
* ci: fix push script
* Fix copying & running on windows.
* CI: Remove unnecessary pipes (#9681)
* ci: reduce gitlab pipelines significantly
* ci: build pipeline for PR
* ci: remove dead weight
* ci: remove github release script
* ci: remove forever broken aura tests
* ci: add random stuff to the end of the pipes
* ci: add wind and mac to the end of the pipe
* ci: remove snap artifacts
* ci: (re)move dockerfiles
* ci: clarify job names
* ci: add cargo audit job
* ci: make audit script executable
* ci: ignore snap and docker files for rust check
* ci: simplify audit script
* ci: rename misc to optional
* ci: add publish script to releaseable branches
* ci: more verbose cp command for windows build
* ci: fix weird binary checksum logic in push script
* ci: fix regex in push script for windows
* ci: simplify gitlab caching
* docs: align README with ci changes
* ci: specify default cargo target dir
* ci: print verbose environment
* ci: proper naming of scripts
* ci: restore docker files
* ci: use docker hub file
* ci: use cargo home instead of cargo target dir
* ci: touch random rust file to trigger real builds
* ci: set cargo target dir for audit script
* ci: remove temp file
* ci: don't export the cargo target dir in the audit script
* ci: fix windows unbound variable
* docs: fix gitlab badge path
* rename deprecated gitlab ci variables
https://docs.gitlab.com/ee/ci/variables/#9-0-renaming
* ci: fix git compare for nightly builds
* test: skip c++ example for all platforms but linux
* ci: add random rust file to trigger tests
* ci: remove random rust file
* disable cpp lib test for mac, win and beta (#9686)
* cleanup ci merge
* ci: fix tests
* fix bad-block reporting no reason (#9638)
* ethcore: fix detection of major import (#9552)
* sync: set state to idle after sync is completed
* sync: refactor sync reset
* Don't hash the init_code of CREATE. (#9688)
* Docker: run as parity user (#9689)
* Implement CREATE2 gas changes and fix some potential overflowing (#9694)
* Implement CREATE2 gas changes and fix some potential overflowing
* Ignore create2 state tests
* Split CREATE and CREATE2 in gasometer
* Generalize rounding (x + 31) / 32 to to_word_size
* make instantSeal engine backwards compatible, closes#9696 (#9700)
* ethcore: delay ropsten hardfork (#9704)
* fix (light/provider) : Make `read_only executions` read-only (#9591)
* `ExecutionsRequest` from light-clients as read-only
This changes so all `ExecutionRequests` from light-clients are executed
as read-only which the `virtual``flag == true ensures.
This boost up the current transaction to always succeed
Note, this only affects `eth_estimateGas` and `eth_call` AFAIK.
* grumbles(revert renaming) : TransactionProof
* grumbles(trace) : remove incorrect trace
* grumbles(state/prove_tx) : explicit `virt`
Remove the boolean flag to determine that a `state::prove_transaction`
whether it should be executed in a virtual context or not.
Because of that also rename the function to
`state::prove_transction_virtual` to make more clear
* CI: Skip docs job for nightly (#9693)
* ci: force-tag wiki changes
* ci: force-tag wiki changes
* ci: skip docs job for master and nightly
* ci: revert docs job checking for nightly tag
* ci: exclude docs job from nightly builds in gitlab script
* parity-version: mark 2.1.0 track beta
* ci: update branch version references
* docker: release master to latest
* Fix checkpointing when creating contract failed (#9514)
* ci: fix json docs generation (#9515)
* fix typo in version string (#9516)
* Update patricia trie to 0.2.2 crates. Default dependencies on minor
version only.
* Putting back ethereum tests to the right commit
* Enable all Constantinople hard fork changes in constantinople_test.json (#9505)
* Enable all Constantinople hard fork changes in constantinople_test.json
* Address grumbles
* Remove EIP-210 activation
* 8m -> 5m
* Temporarily add back eip210 transition so we can get test passed
* Add eip210_test and remove eip210 transition from const_test
* In create memory calculation is the same for create2 because the additional parameter was popped before. (#9522)
* deps: bump fs-swap and kvdb-rocksdb
* Multithreaded snapshot creation (#9239)
* Add Progress to Snapshot Secondary chunks creation
* Use half of CPUs to multithread snapshot creation
* Use env var to define number of threads
* info to debug logs
* Add Snapshot threads as CLI option
* Randomize chunks per thread
* Remove randomness, add debugging
* Add warning
* Add tracing
* Use parity-common fix seek branch
* Fix log
* Fix tests
* Fix tests
* PR Grumbles
* PR Grumble II
* Update Cargo.lock
* PR Grumbles
* Default snapshot threads to half number of CPUs
* Fix default snapshot threads // min 1
* correct before_script for nightly build versions (#9543)
- fix gitlab array of strings syntax error
- get proper commit id
- avoid colon in stings
* Remove initial token for WS. (#9545)
* version: mark release critical
* ci: fix rpc docs generation 2 (#9550)
* Improve P2P discovery (#9526)
* Add `target` to Rust traces
* network-devp2p: Don't remove discovery peer in main sync
* network-p2p: Refresh discovery more often
* Update Peer discovery protocol
* Run discovery more often when not enough nodes connected
* Start the first discovery early
* Update fast discovery rate
* Fix tests
* Fix `ping` tests
* Fixing remote Node address ; adding PingPong round
* Fix tests: update new +1 PingPong round
* Increase slow Discovery rate
Check in flight FindNode before pings
* Add `deprecated` to deprecated_echo_hash
* Refactor `discovery_round` branching
* net_version caches network_id to avoid redundant aquire of sync read lock (#9544)
* net_version caches network_id to avoid redundant aquire of sync read lock, #8746
* use lower_hex display formatting for net_peerCount rpc method
* Increase Gas-floor-target and Gas Cap (#9564)
+ Gas-floor-target increased to 8M by default
+ Gas-cap increased to 10M by default
* Revert to old parity-tokio-ipc.
* Downgrade named pipes.
* Update & fix JSON state tests.
* Update tests to be able to run ethtest at
021fe3d410773024cd5f0387e62db6e6ec800f32.
- Touch user in state
- Adjust transaction tests to new json format
* Switch to same commit for submodule ethereum/test as geth (next includes constantinople changes).
Added test `json_tests::trie::generic::TrieTests_trieanyorder` and a few
difficulty tests.
* Remove trietestnextprev as it would require to parse differently and
implement it.
* Support new (shitty) format of transaction tests.
* Ignore junk in ethereum/tests repo.
* Ignore incorrect test.
* Update to a later commit
* Move block number to a constant.
* Fix ZK2 test - touched account should also be cleared.
* Fix conflict resolution
* Implement last_checkpoint_storage_at
* Add reverted_storage_at for externalities
* sstore_clears_count -> sstore_clears_refund
* Implement eip1283 for evm
* Add eip1283Transition params
* evm: fix tests
* jsontests: fix test
* Return checkpoint index when creating
* Comply with spec Version II
* Fix docs
* Fix jsontests feature compile
* Address grumbles
* Fix no-checkpoint-entry case
* Remove unnecessary expect
* Add test for State::checkpoint_storage_at
* Add executive level test for eip1283
* Hard-code transaction_checkpoint_index to 0
* Fix jsontests
* Add tests for checkpoint discard/revert
* Require checkpoint to be empty for kill_account and commit
* Get code coverage
* Use saturating_add/saturating_sub
* Fix issues in insert_cache
* Clear the state again
* Fix original_storage_at
* Early return for empty RLP trie storage
* Update comments
* Fix borrow_mut issue
* Simplify checkpoint_storage_at if branches
* Better commenting for gas handling code
* Address naming grumbles
* More tests
* Fix an issue in overwrite_with
* Add another test
* Fix comment
* Remove unnecessary bracket
* Move orig to inner if
* Remove test coverage for this PR
* Add tests for executive original value
* Add warn! for an unreachable cause
* ethcore: don't validate difficulty when ignoring seal check
* ethcore: fix block verification test
* ethcore: document skipped verifications when check_seal is disabled
This PR is fixing deadlock for #8918
It avoids some recursive calls on light_sync by making state check optional for Informant.
The current behavior is to display the information when informant checks if block is major version.
This change a bit the informant behavior, but not on most cases.
To remember where and how this kind of deadlock are likely to happen (not seen with Parkinglot deadlock detection because it uses std condvar), I am adding a description of the deadlock.
Also, for the reviewers there may be better solution than modifying the informant.
### Thread1
- ethcore/sync/light_sync/mod.rs
A call to the light handler through any Io (having a loop of rpc query running on like client makes the dead lock way more likely).
At the end of those calls we systematically call `maintain_sync` method.
Here maintain_sync locks `state` (it is the deadlock cause), with a write purpose
`maintain_sync` -> `begin_search` with the state locked open
`begin_search` -> lightcliennt `flush_queue` method
- ethcore/light/src/client/mod.rs
`flush_queue` -> `flush` on queue (HeaderQueue aka VerificationQueue of headers)
- ethcore/src/verification/queue/mod.rs
Condition there is some unverified or verifying content
`flush` wait on a condvar until the queue is empty. The only way to unlock condvar is that worker is empty and unlock it (so thread 2 is Verification worker).
### Thread2
A verification worker at the end of a verify loop (new block).
- ethcore/src/verification/queue/mod.rs
thread loops on `verify` method.
End of loop condition is_ready -> Import the block immediately
calls `set_sync` on QueueSignal which send a BlockVerified ClientIoMessage in inner channel (IoChannel of ClientIoMessage) using `send_sync`
- util/io/src/service_mio.rs
IoChannel `send_sync` method calls all handlers with `message` method; one of the handlers is ImportBlocks IoHandler (with a single inner Client service field)
- ethcore/light/src/client/service.rs
`message` trigger inner method `import_verified`
- core/light/src/client/mod.rs
`import_verified` at the very end notify the listeners of a new_headers, one of the listeners is Informant `listener` method
- parity/informant.rs
`newHeaders` run up to call to `is_major_importing` on its target (again clinet)
- ethcore/sync/src/light_sync/mod.rs
Here `is_major_importing` tries to get state lock (read purpose only) but cannot because of previous state lock, thus deadlock
* Add EIP-1014 transition config flag
* Remove EIP-86 configs
* Change CREATE2 opcode index to 0xf5
* Move salt to the last item in the stack
* Change sendersaltandaddress scheme to comply with current EIP-1014
* Fix json configs
* Fix create2 test
* Fix deprecated comments
- Update foundation hardcoded header to block 6219777
- Update ropsten hardcoded header to block 3917825
- Update kovan hardcoded header to block 8511489
This adds block reward contract config to ethash. A new config `blockRewardContractCode` is also added to both Aura and ethash. When specified, it will execute the code directly and overrides any `blockRewardContractAddress` config. Having this `blockRewardContractCode` config allows chains to deploy hard fork by simply replacing the current config value, without the need from us to support any `multi` block reward scheme.
* Verify private transaction before propagating
* Private transactions queue reworked with tx pool queue direct usage
* Styling fixed
* Prevent resending private packets to the sender
* Process signed private transaction packets via io queue
* Test fixed
* Build and test fixed after merge
* Comments after review fixed
* Signed transaction taken from verified
* Fix after merge
* Pool scoring generalized in order to use externally
* Lib refactored according to the review comments
* Ready state refactored
* Redundant bound and copying removed
* Fixed build after the merge
* Forgotten case reworked
* Review comments fixed
* Logging reworked, target added
* Fix after merge
* Light client on-demand request for headers range.
* Cache headers in HeaderWithAncestors response.
Also fulfills request locally if all headers are in cache.
* LightFetch::logs fetches missing headers on demand.
* LightFetch::logs limit the number of headers requested at a time.
* LightFetch::logs refactor header fetching logic.
* Enforce limit on header range length in light client logs request.
* Fix light request tests after struct change.
* Respond to review comments.
* Remove pass-by-reference return data value from executive
* Fix tests
* Fix a missing test output
* typo: wasm_activation_test
* Tracing change in output
* json_tests: fix compile
* typo: 0..32 -> ..32 to keep it consistent with other occurance
* Fix tests
* Feed in ActionParams on VM creation
* Fix ethcore after Vm interface change
* Move informant inside Interpreter struct
* Move do_trace to Interpreter struct
* Move all remaining exec variables to Interpreter struct
* Refactor VM to allow single opcode step
* Fix all EVM tests
* Fix all wasm tests
* Fix wasm runner tests
* Fix a check case where code length is zero
* Fix jsontests compile
* Fix cargo lock
* Use match instead of expect
* Use cheaper check reader.len() == 0 for the initial special case
* Get rid of try_and_done! macro by using Result<(), ReturnType>
* Use Never instead of ()
* Fix parity-bytes path
* Bypass gasometer lifetime problem by borrow only for a instance
* typo: missing {
* Fix ethcore test compile
* Fix evm tests
* Implement EIP234
* Make filter conversion returns error if both blockHash and from/toBlock is found
This also changes PollFilter to store the EthFilter type, instead of the jsonrpc one, saving repeated conversion.
* Return error if block filtering target is not found in eth_getLogs
Use the old behavior (unwrap_or_default) for anywhere else.
* fix test: secret_store
* Fix weird indentation
* Make client log filter return error in case a block cannot be found
* Return blockId error in rpc
* test_client: allow return error on logs
* Add a mocked test for eth_getLogs error
* fix: should return error if from_block/to_block greater than best block number
* Add notes on pending
* Add comment for UNSUPPORTED_REQUEST
* Address grumbles
* Return err if from > to
* ethcore: fix pow difficulty validation
* ethcore: validate difficulty is not zero
* ethcore: add issue link to regression test
* ethcore: fix tests
* ethcore: move difficulty_to_boundary to ethash crate
* ethcore: reuse difficulty_to_boundary and boundary_to_difficulty
* ethcore: fix grumbles in difficulty_to_boundary_aux