* Add deny_unknown_fields to chainspec
* Add tests and fix existing one
* Remove serde_ignored dependency for chainspec
* Fix rpc test eth chain spec
* Fix starting_nonce_test spec
* Update test reference.
Block test are really not working so I disabled a few by commenting
directly in source.
* Move ethtest commit cursor.
* Implements 'NoProof' engine from https://github.com/ethereum/tests/issues/464 .
Since tests has been regenerated those one were failing on block
difficulty check.
Update ethereum/tests, waiting for cost fix (block test are still
commented).
* Update tests submodule reference to latest (all test passing except an
identified case).
Fix block reward of constantinople json.
* Restore broken test by using old json tests files.
* Use CanonNoSeal instead of a custom engine, still have to include some
additional tests code.
* Gas upper limit check in json_chain test was bad, moving the test to
verification, the test is running in `verify_header_param`.
Note that test was previously only for ethash, and now for any engine.
* Restore old behavior (gas uper limit only for ethash engine), at the
cost of an additional trait method.
* Proper rpc test fix.
* Update tests submodule, add SStore bug tests.
* Fix json issue tabulation.
Update tests submodule to latest master (lot of new sstore tests
passing)
* Switch ethereum/tests to tag 6.0.0-beta.1 (no tests changes from latest
synch).
* Display hex with separator, use indirection instead of clone for copy
types.
* Clean up serde rename and use rename_all = camelCase when possible
* snake_case for pricing
* Use camelcase for engine
* Use camel case for seal
* Use camel case for validator set
* Use camel case for confirmation payload
* Use camel case for consensus status
* Use camel case for nodekind
* Use kebab case for provenance
* Use camel case for pubsub
* Use lowercase and camelcase for trace
* Use camel case for whisper
* rename Ethash as irregular name
* prevent zero networkID, closes#8345
Signed-off-by: Seun LanLege <seunlanlege@gmail.com>
* updated networkID of olymic chain spec
Signed-off-by: Seun LanLege <seunlanlege@gmail.com>
* Add constantinople conf to EvmTestClient.
* Skip some test to update submodule etheureum/tests submodule to latest.
* Put skipping 'under issue' test behind a feature.
* Change blockReward for const-test to pass ethereum/tests
* Update tests to new constantinple definition (change of reward at block
5).
Switch 'reference' to string, that way we can include issues from others
repo (more flexible)Update tests to new constantinple definition (change
of reward at block 5).
Switch 'reference' to string, that way we can include issues from others
repo (more flexible).
* Fix modexp and bn128_mul gas prices in chain config
* Changes `run_test_path` method to append its directory results (without
that it stop testing at the first file failure).
Add some missing tests.
Add skip for those (block create2 is one hundred percent false but on
hive we can see that geth and aleth got similar issue for this item).
* retab current.json
* Update reference to parity issue for failing tests.
* 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
* 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
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.
* 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
* Implement EIP-1052 and fix several issues related to account cache
* Fix jsontests
* Merge two matches together
* Avoid making unnecessary Arc<Vec>
* Address grumbles
* Update `add_license` script
* run script
* add `remove duplicate lines script` and run it
* Revert changes `English spaces`
* strip whitespaces
* Revert `GPL` in files with `apache/mit license`
* don't append `gpl license` in files with other lic
* Don't append `gpl header` in files with other lic.
* re-ran script
* include c and cpp files too
* remove duplicate header
* rebase nit
* 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 SHL, SHR, SAR opcodes
* Add have_bitwise_shifting schedule flag
* Add all EIP tests for SHL
* Add SHR implementation and tests
* Implement SAR and add tests
* Add eip145transition config param
* Change map_or to map_or_else when possible
* 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`.
* aura: broadcast empty step message instead of sealing empty block
* aura: add empty_step messages to seal
* aura: include parent_hash in empty step message
* aura: verify received empty step messages
* aura: verify empty step messages in block
* aura: fix dead lock on empty_steps
* aura: fix EmptyStep Encodable
* aura: take number of empty steps into account in chain score
* aura: use empty step signers for finality
* aura: add empty "empty step" messages to seal when reading from spec
* aura: fix EmptyStep rlp encoding
* aura: use Vec<u8> instead of Bytes
* aura: fix block empty step verification
* Update .gitlab-ci.yml
fix lint
* aura: fix accumulation of empty step signatures for finality
* aura: include empty steps in seal signature
* aura: configurable max number of empty steps
* engine: pass block header to seal_fields method
This is necessary to make the number of seal fields dynamic,
e.g. activating a transition on a certain block number that changes
the seal.
* aura: add transition to enable empty step messages
* aura: clear old empty step messages on verify_block_external
* aura: ignore empty step messages from the future
* aura: report skipped primaries when empty steps are not enabled
* aura: fix tests
* aura: report misbehavior
* aura: add tests for rolling finality with multiple signatures
* engine: fix validator set test
In this test the block validation wasn't failing because the block was in the
future (expected failure) but was instead failing because the author of the
block isn't the expected authority. Since we added reporting of blocks produced
by the wrong authority this test started failing.
* aura: reward all the authors of empty step messages
* aura: fix reward attribution for new blocks
* aura: add tests for empty steps broadcasting and inclusion in blocks
* aura: reduce size of empty step messages in seal
* aura: add test for empty step inclusion in blocks
* aura: add test for rewarding of empty steps
* aura: add test for empty steps validation
* aura: fix rlp encoding of sealed empty step
* aura: fix grumbles
* Refactor updater to use ethabi-derive
* Grumble: do_call type alias
* Empty commit to trigger test re-run
* migration to ethabi-5.0
* migration to ethabi-5.0 in progress
* use ethabi_deriven to generate TransactAcl contract
* use ethabi_deriven to generate Registry contract
* hash-fetch uses ethabi_derive, removed retain cycle from updater, fixed#7720
* node-filter crate uses ethabi_derive to generate peer_set contract interface
* use LruCache in node-filter instead of HashMap
* validator_set engine uses ethabi_derive
* ethcore does not depend on native_contracts
* miner does no depend on native_contracts
* secret_store does not use native_contracts (in progress)
* removed native-contracts
* ethcore and updater does not depend on futures
* updated ethereum-types
* fixed all warnings caused by using new version of ethereum-types
* updated ethabi_derive && ethabi_contract to get rid of warnings
* removed another retain cycle in updater, fixed following minor version on update
* moved contracts out of native_contracts res
* updated ethabi_contract
* fixed failing test
* fixed failing test
* there is no need to create two contracts of the same kind any more
* simplify updater::ReleaseTrack conversion into u8 and add several tests for it
* applied review suggestions
* applied review suggestions
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).