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

Commit

Permalink
v2.6.4-beta (#11090)
Browse files Browse the repository at this point in the history
* ethcore/res: activate Istanbul on Ropsten, Görli, Rinkeby, Kovan (#11068)

* 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

* cleanup json crate (#11027)

* [json]: cleanup

write something here....

* nit: commit new/moved files

* nit: remove needless features

* nits

* fix(grumbles): use explicit import `DifficultyTest`

* fix(grumbles): remove needless type hints

* fix(grumble): docs `from -> used by`

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

* fix(grumbles): use explicit `imports`

* fix(grumble): merge `tx` and `tx_with_signing_info`

* fix(grumbles): resolve introduced `TODO's`

* [json-spec] make blake2 pricing spec more readable (#11034)

* [json-spec] make blake2 pricing spec more readable

* [ethcore] fix compilation

* Update JSON tests to d4f86ecf4aa7c (#11054)

* 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 #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
  • Loading branch information
s3krit authored Sep 26, 2019
1 parent b7b1484 commit 7ae5d8e
Show file tree
Hide file tree
Showing 88 changed files with 1,284 additions and 1,483 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ default = ["accounts"]
accounts = ["ethcore-accounts", "parity-rpc/accounts"]
miner-debug = ["ethcore/miner-debug"]
json-tests = ["ethcore/json-tests"]
ci-skip-tests = ["ethcore/ci-skip-tests"]
test-heavy = ["ethcore/test-heavy"]
evm-debug = ["ethcore/evm-debug"]
evm-debug-tests = ["ethcore/evm-debug-tests"]
Expand Down
4 changes: 2 additions & 2 deletions ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ blooms-db = { path = "../util/blooms-db" }
criterion = "0.2"
env_logger = "0.5"
ethcore-accounts = { path = "../accounts" }
ethjson = { path = "../json", features = ["test-helpers"] }
ethkey = { path = "../accounts/ethkey" }
fetch = { path = "../util/fetch" }
kvdb-rocksdb = "0.1.3"
parity-runtime = { path = "../util/runtime" }
Expand Down Expand Up @@ -109,8 +111,6 @@ evm-debug-tests = ["evm-debug", "evm/evm-debug-tests"]
slow-blocks = []
# Run JSON consensus tests.
json-tests = ["env_logger", "test-helpers", "to-pod-full"]
# Skip JSON consensus tests with pending issues.
ci-skip-tests = []
# Run memory/cpu heavy tests.
test-heavy = []
# Compile test helpers
Expand Down
4 changes: 2 additions & 2 deletions ethcore/builtin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ impl Builtin {
impl From<ethjson::spec::Builtin> for Builtin {
fn from(b: ethjson::spec::Builtin) -> Self {
let pricer: Box<dyn Pricer> = match b.pricing {
ethjson::spec::Pricing::Blake2F(cost_per_round) => {
Box::new(cost_per_round)
ethjson::spec::Pricing::Blake2F { gas_per_round } => {
Box::new(gas_per_round)
},
ethjson::spec::Pricing::Linear(linear) => {
Box::new(Linear {
Expand Down
15 changes: 0 additions & 15 deletions ethcore/pod-account/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,6 @@ impl PodAccount {
}
}

impl From<ethjson::blockchain::Account> for PodAccount {
fn from(a: ethjson::blockchain::Account) -> Self {
PodAccount {
balance: a.balance.into(),
nonce: a.nonce.into(),
code: Some(a.code.into()),
storage: a.storage.into_iter().map(|(key, value)| {
let key: U256 = key.into();
let value: U256 = value.into();
(BigEndianHash::from_uint(&key), BigEndianHash::from_uint(&value))
}).collect(),
}
}
}

impl From<ethjson::spec::Account> for PodAccount {
fn from(a: ethjson::spec::Account) -> Self {
PodAccount {
Expand Down
22 changes: 18 additions & 4 deletions ethcore/res/ethereum/goerli.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"eip1052Transition": "0x0",
"eip1283Transition": "0x0",
"eip1283DisableTransition": "0x0",
"eip1283ReenableTransition": "0x17d433",
"eip1344Transition": "0x17d433",
"eip1706Transition": "0x17d433",
"eip1884Transition": "0x17d433",
"eip2028Transition": "0x17d433",
"gasLimitBoundDivisor": "0x400",
"maxCodeSize": "0x6000",
"maxCodeSizeTransition": "0x0",
Expand Down Expand Up @@ -126,7 +131,7 @@
"builtin": {
"name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"eip1108_transition": "0x17d433",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
Expand All @@ -140,7 +145,7 @@
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"eip1108_transition": "0x17d433",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
Expand All @@ -154,7 +159,7 @@
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"eip1108_transition": "0x17d433",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
Expand All @@ -166,7 +171,16 @@
}
},
"0x0000000000000000000000000000000000000009": {
"balance": "0x1"
"balance": "0x1",
"builtin": {
"name": "blake2_f",
"activate_at": "0x17d433",
"pricing": {
"blake2_f": {
"gas_per_round": 1
}
}
}
},
"0x000000000000000000000000000000000000000a": {
"balance": "0x1"
Expand Down
120 changes: 120 additions & 0 deletions ethcore/res/ethereum/istanbul_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"name": "Istanbul (test)",
"engine": {
"Ethash": {
"params": {
"minimumDifficulty": "0x020000",
"difficultyBoundDivisor": "0x0800",
"durationLimit": "0x0d",
"blockReward": "0x1BC16D674EC80000",
"homesteadTransition": "0x0",
"eip100bTransition": "0x0",
"difficultyBombDelays": {
"0": 5000000
}
}
}
},
"params": {
"gasLimitBoundDivisor": "0x0400",
"registrar" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b",
"accountStartNonce": "0x00",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x1",
"maxCodeSize": 24576,
"maxCodeSizeTransition": "0x0",
"eip150Transition": "0x0",
"eip160Transition": "0x0",
"eip161abcTransition": "0x0",
"eip161dTransition": "0x0",
"eip140Transition": "0x0",
"eip211Transition": "0x0",
"eip214Transition": "0x0",
"eip155Transition": "0x0",
"eip658Transition": "0x0",
"eip145Transition": "0x0",
"eip1014Transition": "0x0",
"eip1052Transition": "0x0",
"eip1283Transition": "0x0",
"eip1283DisableTransition": "0x0",
"eip1283ReenableTransition": "0x0",
"eip1344Transition": "0x0",
"eip1706Transition": "0x0",
"eip1884Transition": "0x0",
"eip2028Transition": "0x0"
},
"genesis": {
"seal": {
"ethereum": {
"nonce": "0x0000000000000042",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x400000000",
"author": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
"gasLimit": "0x1388"
},
"accounts": {
"0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
"0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": {
"builtin": {
"name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x0",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x0",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x00",
"eip1108_transition": "0x0",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0000000000000000000000000000000000000009": {
"builtin": {
"name": "blake2_f",
"activate_at": "0x00",
"pricing": {
"blake2_f": {
"gas_per_round": 1
}
}
}
}
}
}
22 changes: 19 additions & 3 deletions ethcore/res/ethereum/kovan.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
"eip1052Transition": "0x8c6180",
"eip1283Transition": "0x8c6180",
"eip1283DisableTransition": "0x9c7b61",
"eip1283ReenableTransition": "0xd751a5",
"eip1344Transition": "0xd751a5",
"eip1706Transition": "0xd751a5",
"eip1884Transition": "0xd751a5",
"eip2028Transition": "0xd751a5",
"kip4Transition": "0x8c6180",
"kip6Transition": "0x8c6180"
},
Expand Down Expand Up @@ -5344,7 +5349,7 @@
"builtin": {
"name": "alt_bn128_add",
"activate_at": "0x4d50f8",
"eip1108_transition": "0x7fffffffffffff",
"eip1108_transition": "0xd751a5",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
Expand All @@ -5357,7 +5362,7 @@
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x4d50f8",
"eip1108_transition": "0x7fffffffffffff",
"eip1108_transition": "0xd751a5",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
Expand All @@ -5370,7 +5375,7 @@
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x4d50f8",
"eip1108_transition": "0x7fffffffffffff",
"eip1108_transition": "0xd751a5",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
Expand All @@ -5381,6 +5386,17 @@
}
}
},
"0x0000000000000000000000000000000000000009": {
"builtin": {
"name": "blake2_f",
"activate_at": "0xd751a5",
"pricing": {
"blake2_f": {
"gas_per_round": 1
}
}
}
},
"0x00521965e7bd230323c423d96c657db5b79d099f": {
"balance": "1606938044258990275541962092341162602522202993782792835301376"
}
Expand Down
22 changes: 18 additions & 4 deletions ethcore/res/ethereum/rinkeby.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"eip1052Transition": "0x37db77",
"eip1283Transition": "0x37db77",
"eip1283DisableTransition": "0x41efd2",
"eip1283ReenableTransition": "0x52efd1",
"eip1344Transition": "0x52efd1",
"eip1706Transition": "0x52efd1",
"eip1884Transition": "0x52efd1",
"eip2028Transition": "0x52efd1",
"gasLimitBoundDivisor": "0x400",
"maxCodeSize": "0x6000",
"maxCodeSizeTransition": "0x0",
Expand Down Expand Up @@ -120,7 +125,7 @@
"builtin": {
"name": "alt_bn128_add",
"activate_at": "0xfcc25",
"eip1108_transition": "0x7fffffffffffff",
"eip1108_transition": "0x52efd1",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
Expand All @@ -133,7 +138,7 @@
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0xfcc25",
"eip1108_transition": "0x7fffffffffffff",
"eip1108_transition": "0x52efd1",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
Expand All @@ -146,7 +151,7 @@
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0xfcc25",
"eip1108_transition": "0x7fffffffffffff",
"eip1108_transition": "0x52efd1",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
Expand All @@ -158,7 +163,16 @@
}
},
"0x0000000000000000000000000000000000000009": {
"balance": "0x1"
"balance": "0x1",
"builtin": {
"name": "blake2_f",
"activate_at": "0x52efd1",
"pricing": {
"blake2_f": {
"gas_per_round": 1
}
}
}
},
"0x000000000000000000000000000000000000000a": {
"balance": "0x1"
Expand Down
Loading

0 comments on commit 7ae5d8e

Please sign in to comment.