openethereum/ethcore/res/ethereum
Niklas Adolfsson 13729a0f7f [builtin]: support multiple prices and activations in chain spec (#11039)
* [builtin]: impl new builtin type

Have an enum to deserialize either a builtin of a single price or several prices

* [builtin]: style cleanup

* [builtin]: fix tests

* [builtin]: replace boxing with wrapper enum

* cleanup

* fix: make it backward compatible with old builtin

* fix: update chain specs

* fix: revert use of `type alias` on enum

The CI doesn't use the latest rust.

This commit reverts that change

* fix: builtin tests

* fix: revert use of `type alias` on enum

* [basic-authority]: update test-chainspec

* fix failing tests

* [builtin]: multi-prices add `info field`

It might be hard to read chain specs with several activations points.
This commit introduces a `info` field which may be used to write some
information about the current activation such as:

`Istanbul hardfork EIP-1108` or something similar.

* fix: bad rebase

Co-Authored-By: David <dvdplm@gmail.com>

* fix(grumbles): make it backward compatible

* grumbles: resolve `NOTE`

* revert chain specs changes

* rename test

Co-Authored-By: David <dvdplm@gmail.com>

* [builtin docs]: price -> Fixed price

Co-Authored-By: Andronik Ordian <write@reusable.software>

* [json]: address naming grumbles

InnerPricing -> PricingInner
PriceWithActivationAt -> PricingAt

* docs: revert changes for `AltBn128ConstOperations`

* [json]: usize -> u64

Use explicit types to cope with platform dependent issues for `usize`

* grumble: simplify `spec_backward_compability.json`

* docs: add issue link to `TODO`

* [builtin]: replace `match` with `map`

* [builtin]: add deprecation message `eip1108` params

* nits

* [json spec tests]: fix json indentation

* [json docs]: fix typos

* [json]: `compability layer` + deser to BTreeMap

Previously we had to match `Pricing::Single` and `PricingMulti` which this fixes.
It does by introducing a compability layer and into() implemenentation.

In addition, I switched the deserialization to `BTreeMap` instead of `Vec`.
That changes the format of the chain spec again

* [json]: rename `BuiltinCombat` -> `BuiltinCompat`

* Update ethcore/builtin/src/lib.rs

Co-Authored-By: David <dvdplm@gmail.com>

* [json builtin]: improve docs

Co-Authored-By: David <dvdplm@gmail.com>

* [json builtin]: improve docs

Co-Authored-By: David <dvdplm@gmail.com>

* chore(builtin): sort dependencies

* [json builtin]: deprecate `eip1108` params

* [machine]: add bench for calling builtin contract

* [machine]: reduce calls to `Builtin::is_active`

* [builtin]: fix nits

* [json]: revert breakage of chain specs

* [json builtin]: remove `eip1108` params

* [chain specs]: update to new format

* [machine]: revert changes

* [devp2p]: revert change

* [builtin]: doc nits
2019-10-31 17:09:08 +01:00
..
tests@d4f86ecf4a Update JSON tests to d4f86ecf4aa7c (#11054) 2019-09-25 10:02:04 +02:00
tests-issues Update JSON tests to d4f86ecf4aa7c (#11054) 2019-09-25 10:02:04 +02:00
builtin_multi_bench.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
builtin_one_activation_bench.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
byzantium_test.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
callisto.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
classic.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
constantinople_test.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
eip150_test.json Disable EIP-98 transition by default (#9955) 2018-11-25 19:59:27 +01:00
eip161_test.json Disable EIP-98 transition by default (#9955) 2018-11-25 19:59:27 +01:00
eip210_test.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
ellaism.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
ewc.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
expanse.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
foundation.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
frontier_like_test.json Disable EIP-98 transition by default (#9955) 2018-11-25 19:59:27 +01:00
frontier_test.json Disable EIP-98 transition by default (#9955) 2018-11-25 19:59:27 +01:00
goerli.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
homestead_test.json Disable EIP-98 transition by default (#9955) 2018-11-25 19:59:27 +01:00
istanbul_test.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
kotti.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
kovan_wasm_test.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
kovan.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
mcip3_test.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
mix.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
morden.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
musicoin.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
poacore.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
poasokol.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
rinkeby.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
ropsten.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
st_peters_test.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
transition_test.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
volta.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00
xdai.json [builtin]: support multiple prices and activations in chain spec (#11039) 2019-10-31 17:09:08 +01:00