Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
[stable] builtin, istanbul and mordor testnet backports (#11234)
Browse files Browse the repository at this point in the history
* ethcore-builtin (#10850)

* ethcore-builtin

* rename ethcore-builtin Impl to Implementation

* [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

* manually adjust spec

* [chain specs]: activate `Istanbul` on mainnet (#11228)

* [chains spec]: activate istanbul at mainnet

* Activate `Block >= 9,069,000` on the Ethereum mainnet
* Enable Blake2 compression function `F` precompile

* [chain specs]: add comments for EIP1108 activation

* [chainspec mainnet]: enable Istanbul transitions

* [chainspec mainnet]: simply configuration

* ethcore/res: add mordor testnet configuration (#11200)

* ethcore/res: add mordor testnet configuration

* ethcore/spec: add mordor testnet configuration

* parity/cli: add mordor testnet configuration

* parity/config: fix tests

* ethcore/res: update mordor spec with agharta hardfork block 301243

*  ethcore/res: update kotti with agharta block 1705549

* ethcore/res: update morden with agharta block 5000381

* ethcore/res: multiple prices and activations for mordor testnet

* fix mordor spec json

* fix mordor spec json

* fix bad merge

* [ethereum tests]: revert `725dbc73a725dbc73a`
  • Loading branch information
niklasad1 authored and soc1c committed Nov 5, 2019
1 parent d45b891 commit 56900f0
Show file tree
Hide file tree
Showing 54 changed files with 4,593 additions and 1,434 deletions.
584 changes: 503 additions & 81 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion accounts/ethkey/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
[dependencies]
edit-distance = "2.0"
parity-crypto = "0.3.0"
eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" }
eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1", rev = "ccc06e7480148b723eb44ac56cf4d20eec380b6f" }
ethereum-types = "0.4"
lazy_static = "1.0"
log = "0.4"
Expand Down
6 changes: 2 additions & 4 deletions ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ authors = ["Parity Technologies <admin@parity.io>"]
[dependencies]
ansi_term = "0.10"
blooms-db = { path = "../util/blooms-db", optional = true }
bn = { git = "https://github.com/paritytech/bn", default-features = false }
byteorder = "1.0"
common-types = { path = "types" }
crossbeam-utils = "0.6"
Expand All @@ -22,6 +21,7 @@ ethabi-derive = "6.0"
ethash = { path = "../ethash", optional = true}
ethcore-blockchain = { path = "./blockchain" }
ethcore-bloom-journal = { path = "../util/bloom" }
ethcore-builtin = { path = "./builtin" }
ethcore-call-contract = { path = "./call-contract" }
ethcore-db = { path = "./db" }
ethcore-io = { path = "../util/io" }
Expand All @@ -46,11 +46,9 @@ log = "0.4"
lru-cache = "0.1"
macros = { path = "../util/macros" }
memory-cache = { path = "../util/memory-cache" }
memory-db = "0.11.0"
num = { version = "0.1", default-features = false, features = ["bigint"] }
memory-db = "0.11"
num_cpus = "1.2"
parity-bytes = "0.1"
parity-crypto = "0.3.0"
parity-snappy = "0.1"
parking_lot = "0.7"
trie-db = "0.11.0"
Expand Down
23 changes: 23 additions & 0 deletions ethcore/builtin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
description = "ethereum vm builtin"
name = "ethcore-builtin"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

[dependencies]
bn = { git = "https://github.com/paritytech/bn", default-features = false }
byteorder = "1.3.2"
eip-152 = { path = "../../util/EIP-152" }
ethereum-types = "0.4"
ethjson = { path = "../../json" }
ethkey = { path = "../../accounts/ethkey" }
keccak-hash = "0.2.0"
log = "0.4"
macros = { path = "../../util/macros" }
num = { version = "0.1", default-features = false, features = ["bigint"] }
parity-bytes = "0.1"
parity-crypto = "0.4.0"

[dev-dependencies]
hex-literal = "0.2.1"
Loading

0 comments on commit 56900f0

Please sign in to comment.