Fixes#11202
The `Display` implementation for `SpecHardcodedSync` used the `Display` implementation of
`ethereum_types::H256` which doesn't show the full hash which this fixes.
* WIP. Typos and logging.
* Format todos
* Pause pruning while a snapshot is under way
Logs, docs and todos
* Allocate memory for the full chunk
* Name snapshotting threads
* Ensure `taking_snapshot` is set to false whenever and however `take_snapshot`returns
Rename `take_at` to `request_snapshot_at`
Cleanup
* Let "in_progress" deletion fail
Fix tests
* Just use an atomic
* Review grumbles
* Finish the sentence
* Resolve a few todos and clarify comments.
* Calculate progress rate since last update
* Lockfile
* Fix tests
* typo
* Reinstate default snapshotting frequency
Cut down on the logging noise
* address grumble
* Log memory use with `journal_size()` and explain why.
* [ethash]: validate `ecip1017EraRounds` non-zero
When `ecip1017EraRounds` ethash will divide by zero.
This commit ensures that the chainspec deserialization fails and
gives a better error message.
* [ecip1017_eras_block_reward]: document behaviour
* nit
* docs(ethash ecip1071): resolve `TODO`
* Aura: Report malice on sibling blocks from the same validator
This was originally written by @vkomenda, then squashed for
easier rebasing on master. Cleanup of `received_step_hashes`
was moved to `verify_block_family`, since `on_prepare_block`
does not exist on master, and a unit test was added.
Original commit messages:
added the map of received block header hashes
do not return an error and remove older received block records
optimised older record removal
block hash comparison optimisation and the weak client ref fix
SIBLING_MALICE_DETECTION_PERIOD constant
review comments
using step numbers instead of block numbers
* Add docs; use map_or.
* Update step hash record comment.
Co-Authored-By: David <dvdplm@gmail.com>
* Remove hash records after 2 rounds instead of 100 steps.
* Change how RPCs eth_call and eth_estimateGas handle "Pending"
Before this PR we would return a rather confusing error when calling `eth_call` and `eth_estimateGas` with `"Pending"`, e.g.:
```
{"jsonrpc":"2.0","error":{"code":-32000,"message":"This request is not supported because your node is running with state pruning. Run with --pruning=archive."},"id":"e237678f6648ed12ff05a74933d06d17"}
```
In reality what is going on is that users often use `"Pending"` when they really mean `"Latest"` (e.g. MyCrypto…) and when the block in question is not actually pending. This changes our behaviour for these two RPC calls to fall back to `"Latest"` when the query with `"Pending"` fails.
Note that we already behave this way for many other RPCs:
- eth_call (after this PR)
- eth_estimateGas (after this PR)
- eth_getBalance
- eth_getCode
- eth_getStorageAt
Closes https://github.com/paritytech/parity-ethereum/issues/10096
* Fetch jsonrpc from git
* No real need to wait for new jsonrpc
* Add tests for calling eth_call/eth_estimateGas with "Pending"
* Fix a todo, add another
* Change client.latest_state to return the best header as well so we avoid potential data races and do less work
* Impl review suggestions
* Update rpc/src/v1/impls/eth.rs
Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Review grumbles
* update docs
* Upgrade to jsonrpc v14
Contains https://github.com/paritytech/jsonrpc/pull/495 with good bugfixes to resource usage.
* Bump tokio & futures.
* Bump even further.
* Upgrade tokio to 0.1.22
* Partially revert "Bump tokio & futures."
This reverts commit 100907eb91907aa124d856d52374637256118e86.
* RPC method parity_clearEngineSigner
Add RPC method parity_clearEngineSigner
Fixes https://github.com/poanetwork/parity-ethereum/issues/113
* corrected the return type of clear_author
* review comment responses and a rebase fix
* removed a spurrious warning
* moved clear_signer functionality to set_signer
* Merge clear_author into MinerService::set_author.
* Add trace logs to Clique::set_signer.
* Clique: Don't lock signer multiple times.
* Rename RegistryInfo -> RegistryInfoDeprecated
* Add BlockId parameter to Registrar::get_address and RegistrarClient::call_contract
* Remove RegistrarClient::Call (use async for now); add RegistrarClient::get_address
* Remove Registrar type in favour of naked trait
* Use CallContract trait bound instead of separate call_contract method
* Make RegistrarClient::get_address and URLHint::resolve synchronous
* RegistrarClient::get_address: return check if address is zero
* Modify RegistryInfo::registry_address to take &str
* return Result from RegistryInfo::registry_address
* Replace RegistryInfo with RegistrarClient
- Modifed RegistrarClient::registrar_address to return Option
- Removed BlockChainClient::registrar_address
* Fix other build configs
* Fix unit test builds
* Remove local RegistrarClient type from run::execute_impl
* Remove registrar.json from ethcore
* Formatting/line breaks
* Update RegistrarClient docs, remove explicit lifetime
* Weak ref to ethcore client from hash fetch client
* Fix unit tests
* Switching cache from local to Radis
* sccache -s won't work. All the images are taken from own registry
* new images addresses
* statisticss after stop sccache server
sccache CC&CXX
* Update a few dependencies
Updates two dependencies: `kvdb-rocksdb` and `h2`. Brings in `parking_lot 0.9` which is unintended but possibly fine.
* Bump parking_lot to 0.9
Bump kvdb-memorydb to 0.2 (from git atm)
* New kvdb-memorydb is not breaking
* Remove [patch]
* new ethereum consensus tests, #10908
* Update JSON tests to 725dbc73a
This PR reverts the controversial changes of the previous PR and skips the failing tests.
Maybe I misunderstand the suggested workaround of putting the fix under `#[cfg(test)]` but it seems odd to run different code in production than we run in tests. Instead here I suggest we skip the failing tests with the argument that we do not wish to fix this issue (at least not at this time) because it does not affect us. If I am wrong, and I likely am, I look forward to hearing why and what a better approach to updating the state tests is.
Branched off https://github.com/paritytech/parity-ethereum/pull/10923
ref #10908
* Update json test commit to 1dc9d20e97165708f7db0bbf2d1a87a6b4285827
* Fail with error message
* Handle missing r, s, v params in json tests
Light cleanup of json test runner
* Include the path to the test file
* Handle new `postState` format: string or map
Sort out tests
Missing docs
* WIP
* Include test-helpers from ethjson
* Sort out new paths
* Remove dead code
* Fix warnings stemming from code called only from macros
Skip failing tests in stRevert/ and stTransactionTest/ (too course a filter!)
Docs and light touch refactorings for readability
* Skip all failing tests
* Document the single-test-skipping madness
* Update tests to latest commit on the `develop` branch
* Rename test skipping types to reflect actual purpose
* Switch to skipping individual tests in currents.json
Add some logging to help debug skipping
* Fix rpc test by curve fitting to new json test source file
* Add refs to all issues for fixing failing&skipped json tests
* Sort out the need for Clone for tests
* [json-tests] populate state from genesis pod state (#11083)
* [json-tests] populate state from genesis pod state
* [json-tests] #11075 is resolved as well
* [json-tests] #11076 hopefully too
* [json-tests] #11077🎉
* [json-tests] fix trailing comma
* Update ethcore/src/json_tests/chain.rs
Co-Authored-By: Andronik Ordian <write@reusable.software>
* Add issue numbers to TODOs
* Apply @ordians fix for wrong state_root
* Warn on invalid RLP
* Remove the `ci-skip-tests` feature
* ethcore/res: activate Istanbul on Ropsten block 6485846
* ethcore/res: activate Istanbul on Goerli block 1561651
* ethcore/res: use hex values for Istanbul specs
* ethcore/res: fix trailing comma
* ethcore/res: be pedantic about EIP-1283 in Petersburg and Istanbul test specs
* ethcore/res: activate Istanbul on Rinkeby block 5435345
* ethcore/res: activate Istanbul on Kovan block 14111141
* ethcore/res: fix kovan istanbul number to 0xd751a5