* Set the request index to that of the current request
When setting up the chain of (two) requests to look up a block by hash, the second need to refer to the first. This fixes an issue where the back ref was set to the subsequent request, not the current one. When the requests are executed we loop through them in order and ensure the requests that should produce headers all match up. We do this by index so they better be right.
In other words: off by one.
* Allow post-homestead forks to be specified in CommonParams
* Fix all json configs
* Fix test in json crate
* Fix test in ethcore
* Fix all chain configs to use tabs
Given we use tabs in .editorconfig and the majority of chain configs.
This change is done in Emacs using `mark-whole-buffer` and `indent-region`.
* Add license and readme
* Use pure rust implementation
* Bump version to 0.1.1
* Don't use C, prefer the pure Rust implementation
* Add test for `write_keccak`
* Bump version
* Add benchmarks
* Add benchmarks
* Add keccak_256, keccak_512, keccak_256_unchecked and keccak_512_unchecked – mostly for compatibility with ethash
* Remove failed git merge attempt from external git repo
Cargo.lock updates
* whitespace
* Mark unsafe function unsafe
* Unsafe calls in unsafe block
* Document unsafety invariants
* Revert unintended changes to Cargo.lock
Since we start parity with the UI disabled per default now, opening the browser post installation will show an annoying error message, confusing the user. This patch removes opening the browser to prevent that annoyance.
fixes#8194
* Add light client TODO item
* Move existing total-difficulty-based fork choice check to Engine
* Abstract total difficulty and block provider as Machine::BlockMetadata and Machine::BlockProvider
* Decouple "generate_metadata" logic to Engine
* Use fixed BlockMetadata and BlockProvider type for null and instantseal
In this way they can use total difficulty fork choice check
* Extend blockdetails with metadatas and finalized info
* Extra data update: mark_finalized and update_metadatas
* Check finalized block in Blockchain
* Fix a test constructor in verification mod
* Add total difficulty trait
* Fix type import
* Db migration to V13 with metadata column
* Address grumbles
* metadatas -> metadata
* Use generic type for update_metadata to avoid passing HashMap all around
* Remove metadata in blockdetails
* [WIP] Implement a generic metadata architecture
* [WIP] Metadata insertion logic in BlockChain
* typo: Value -> Self::Value
* [WIP] Temporarily remove Engine::is_new_best interface
So that we don't have too many type errors.
* [WIP] Fix more type errors
* [WIP] ExtendedHeader::PartialEq
* [WIP] Change metadata type Option<Vec<u8>> to Vec<u8>
* [WIP] Remove Metadata Error
* [WIP] Clean up error conversion
* [WIP] finalized -> is_finalized
* [WIP] Mark all fields in ExtrasInsert as pub
* [WIP] Remove unused import
* [WIP] Keep only local metadata info
* Mark metadata as optional
* [WIP] Revert metadata db change in BlockChain
* [WIP] Put finalization in unclosed state
* Use metadata interface in BlockDetail
* [WIP] Fix current build failures
* [WIP] Remove unused blockmetadata struct
* Remove DB migration info
* [WIP] Typo
* Use ExtendedHeader to implement fork choice check
* Implement is_new_best using Ancestry iterator
* Use expect instead of panic
* [WIP] Add ancestry Engine support via on_new_block
* Fix tests
* Emission of ancestry actions
* use_short_version should take account of metadata
* Engine::is_new_best -> Engine::fork_choice
* Use proper expect format as defined in #1026
* panic -> expect
* ancestry_header -> ancestry_with_metadata
* Boxed iterator -> &mut iterator
* Fix tests
* is_new_best -> primitive_fork_choice
* Document how fork_choice works
* Engine::fork_choice -> Engine::primitive_fork_choice
* comment: clarify types of finalization where Engine::primitive_fork_choice works
* Expose FinalizationInfo to Engine
* Fix tests due to merging
* Remove TotalDifficulty trait
* Do not pass FinalizationInfo to Engine
If there's finalized blocks in from route, choose the old branch without calling `Engine::fork_choice`.
* Fix compile
* Fix unused import
* Remove is_to_route_finalized
When no block reorg passes a finalized block, this variable is always false.
* Address format grumbles
* Fix docs: mark_finalized returns None if block hash is not found
`blockchain` mod does not yet have an Error type, so we still temporarily use None here.
* Fix inaccurate tree_route None expect description
* Some tiny modifications.
1. fix some typo in the comment.
2. sort the order of methods in 'impl state::Backend for StateDB`
* Remove the clone of code_cache, as it has been done in clone_basic.
* remove From::from. It seems not necessary.
* change mode: remove rust files' executable mode.
* 2 tiny modifications on snapshot.
* Remove inject.js server-side injection for dapps
* Remove dapps test `should_inject_js`
Parity doesn't inject a <script> tag inside the responses anymore
Occasionally should_return_correct_nonces_when_dropped_because_of_limit fails, possibly because of multiple threads competing to finish. See CI logs here for an example: https://gitlab.parity.io/parity/parity/-/jobs/86738
Unpack errors and check for io::ErrorKind::InvalidInput and return our own AddressParse error. Remove the foreign link to std::net::AddrParseError and add an `impl From` for that error. Test parsing properly.
* rlp::decode returns Result
* Fix journaldb to handle rlp::decode Result
* Fix ethcore to work with rlp::decode returning Result
* Light client handles rlp::decode returning Result
* Fix tests in rlp_derive
* Fix tests
* Cleanup
* cleanup
* Allow panic rather than breaking out of iterator
* Let decoding failures when reading from disk blow up
* syntax
* Fix the trivial grumbles
* Fix failing tests
* Make Account::from_rlp return Result
* Syntx, sigh
* Temp-fix for decoding failures
* Header::decode returns Result
Handle new return type throughout the code base.
* Do not continue reading from the DB when a value could not be read
* Fix tests
* Handle header decoding in light_sync
* Handling header decoding errors
* Let the DecodeError bubble up unchanged
* Remove redundant error conversion