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

Commit e0141f8

Browse files
authored
beta 2.5.1 (#10643)
* version: bump beta to 2.5.1 * fix(whisper expiry): current time + work + ttl (#10587) * update bootnodes (#10595) * config: update goerli bootnodes * config: update kotti bootnodes * adds rpc error message for --no-ancient-blocks (#10608) * adds error message for --no-ancient-blocks, closes #10261 * Apply suggestions from code review Co-Authored-By: seunlanlege <seunlanlege@gmail.com> * Constantinople HF on POA Core (#10606) * Constantinople HF on POA Core Plan Constantinople/St.Petersfork HF on POA Core network at block 8582254. Original PR in POA repository: poanetwork/poa-chain-spec#110 * Remove extra empty line * evm: add some mulmod benches (#10600) * evm: add blockhash_mulmod bench * evm: use num-bigint for mod ops * Clique: zero-fill extradata when the supplied value is less than 32 bytes in length (#10605) * Update kovan.json to switch validator set to POA Consensus Contracts (#10628) * Fix publish docs (#10635) * Fix publish docs * this never should be forced, either way compiling previous versions will produce outdated docs * fix array, var was moved to the group project global variables list * Fix rinkeby petersburg fork (#10632)
1 parent b52ac20 commit e0141f8

File tree

20 files changed

+202
-68
lines changed

20 files changed

+202
-68
lines changed

.gitlab-ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ publish-docs:
255255
except:
256256
- nightly
257257
cache: {}
258+
dependencies: []
258259
script:
259260
- scripts/gitlab/publish-docs.sh
260261
tags:

Cargo.lock

+17-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description = "Parity Ethereum client"
33
name = "parity-ethereum"
44
# NOTE Make sure to update util/version/Cargo.toml as well
5-
version = "2.5.0"
5+
version = "2.5.1"
66
license = "GPL-3.0"
77
authors = ["Parity Technologies <admin@parity.io>"]
88

ethcore/evm/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ vm = { path = "../vm" }
1414
keccak-hash = "0.1"
1515
parking_lot = "0.7"
1616
memory-cache = { path = "../../util/memory-cache" }
17+
num-bigint = "0.2"
1718

1819
[dev-dependencies]
1920
rustc-hex = "1.0"

ethcore/evm/benches/basic.rs

+51-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ criterion_group!(
4545
mem_gas_calculation_same_usize,
4646
mem_gas_calculation_same_u256,
4747
mem_gas_calculation_increasing_usize,
48-
mem_gas_calculation_increasing_u256
48+
mem_gas_calculation_increasing_u256,
49+
blockhash_mulmod_small,
50+
blockhash_mulmod_large,
4951
);
5052
criterion_main!(basic);
5153

@@ -150,6 +152,54 @@ fn mem_gas_calculation_increasing(gas: U256, b: &mut Bencher) {
150152
});
151153
}
152154

155+
fn blockhash_mulmod_small(b: &mut Criterion) {
156+
b.bench_function("blockhash_mulmod_small", |b| {
157+
let factory = Factory::default();
158+
let mut ext = FakeExt::new();
159+
160+
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
161+
162+
b.iter(|| {
163+
let code = black_box(
164+
"6080604052348015600f57600080fd5b5060005a90505b60c881111560de5760017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80095060017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80095060017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80095060017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80095060017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8009505a90506016565b506035806100ed6000396000f3fe6080604052600080fdfea165627a7a72305820bde4a0ac6d0fac28fc879244baf8a6a0eda514bc95fb7ecbcaaebf2556e2687c0029".from_hex().unwrap()
165+
);
166+
167+
let mut params = ActionParams::default();
168+
params.address = address.clone();
169+
params.gas = U256::from(4_000u64);
170+
params.code = Some(Arc::new(code.clone()));
171+
172+
let vm = factory.create(params, ext.schedule(), 0);
173+
174+
result(vm.exec(&mut ext).ok().unwrap())
175+
});
176+
});
177+
}
178+
179+
fn blockhash_mulmod_large(b: &mut Criterion) {
180+
b.bench_function("blockhash_mulmod_large", |b| {
181+
let factory = Factory::default();
182+
let mut ext = FakeExt::new();
183+
184+
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
185+
186+
b.iter(|| {
187+
let code = black_box(
188+
"608060405234801561001057600080fd5b5060005a90505b60c8811115610177577efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009507efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009507efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009507efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009507efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009505a9050610017565b506035806101866000396000f3fe6080604052600080fdfea165627a7a72305820dcaec306f67bb96f3044fff25c9af2ec66f01d0954d0656964f046f42f2780670029".from_hex().unwrap()
189+
);
190+
191+
let mut params = ActionParams::default();
192+
params.address = address.clone();
193+
params.gas = U256::from(4_000u64);
194+
params.code = Some(Arc::new(code.clone()));
195+
196+
let vm = factory.create(params, ext.schedule(), 0);
197+
198+
result(vm.exec(&mut ext).ok().unwrap())
199+
});
200+
});
201+
}
202+
153203
fn result(r: Result<evm::GasLeft>) -> U256 {
154204
match r {
155205
Ok(GasLeft::Known(gas_left)) => gas_left,

ethcore/evm/src/interpreter/mod.rs

+25-10
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ use std::{cmp, mem};
2828
use std::sync::Arc;
2929
use hash::keccak;
3030
use bytes::Bytes;
31-
use ethereum_types::{U256, U512, H256, Address};
31+
use ethereum_types::{U256, H256, Address};
32+
use num_bigint::BigUint;
3233

3334
use vm::{
3435
self, ActionParams, ParamsType, ActionValue, CallType, MessageCallResult,
@@ -61,6 +62,17 @@ const TWO_POW_96: U256 = U256([0, 0x100000000, 0, 0]); //0x1 00000000 00000000 0
6162
const TWO_POW_224: U256 = U256([0, 0, 0, 0x100000000]); //0x1 00000000 00000000 00000000 00000000 00000000 00000000 00000000
6263
const TWO_POW_248: U256 = U256([0, 0, 0, 0x100000000000000]); //0x1 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000000
6364

65+
fn to_biguint(x: U256) -> BigUint {
66+
let mut bytes = [0u8; 32];
67+
x.to_little_endian(&mut bytes);
68+
BigUint::from_bytes_le(&bytes)
69+
}
70+
71+
fn from_biguint(x: BigUint) -> U256 {
72+
let bytes = x.to_bytes_le();
73+
U256::from_little_endian(&bytes)
74+
}
75+
6476
/// Abstraction over raw vector of Bytes. Easier state management of PC.
6577
struct CodeReader {
6678
position: ProgramCounter,
@@ -1009,11 +1021,12 @@ impl<Cost: CostType> Interpreter<Cost> {
10091021
let c = self.stack.pop_back();
10101022

10111023
self.stack.push(if !c.is_zero() {
1012-
// upcast to 512
1013-
let a5 = U512::from(a);
1014-
let res = a5.overflowing_add(U512::from(b)).0;
1015-
let x = res % U512::from(c);
1016-
U256::from(x)
1024+
let a_num = to_biguint(a);
1025+
let b_num = to_biguint(b);
1026+
let c_num = to_biguint(c);
1027+
let res = a_num + b_num;
1028+
let x = res % c_num;
1029+
from_biguint(x)
10171030
} else {
10181031
U256::zero()
10191032
});
@@ -1024,10 +1037,12 @@ impl<Cost: CostType> Interpreter<Cost> {
10241037
let c = self.stack.pop_back();
10251038

10261039
self.stack.push(if !c.is_zero() {
1027-
let a5 = U512::from(a);
1028-
let res = a5.overflowing_mul(U512::from(b)).0;
1029-
let x = res % U512::from(c);
1030-
U256::from(x)
1040+
let a_num = to_biguint(a);
1041+
let b_num = to_biguint(b);
1042+
let c_num = to_biguint(c);
1043+
let res = a_num * b_num;
1044+
let x = res % c_num;
1045+
from_biguint(x)
10311046
} else {
10321047
U256::zero()
10331048
});

ethcore/evm/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ extern crate vm;
2424
extern crate keccak_hash as hash;
2525
extern crate memory_cache;
2626
extern crate parity_bytes as bytes;
27+
extern crate num_bigint;
2728

2829
#[macro_use]
2930
extern crate lazy_static;

ethcore/res/ethereum/goerli.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@
4848
"timestamp": "0x5c51a607"
4949
},
5050
"nodes": [
51-
"enode://011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a@51.141.78.53:30303",
52-
"enode://176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b@13.93.54.137:30303"
51+
"enode://06333009fc9ef3c9e174768e495722a7f98fe7afd4660542e983005f85e556028410fd03278944f44cfe5437b1750b5e6bd1738f700fe7da3626d52010d2954c@51.141.15.254:30303",
52+
"enode://176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b@13.93.54.137:30303",
53+
"enode://573b6607cd59f241e30e4c4943fd50e99e2b6f42f9bd5ca111659d309c06741247f4f1e93843ad3e8c8c18b6e2d94c161b7ef67479b3938780a97134b618b5ce@52.56.136.200:30303",
54+
"enode://67913271d14f445689e8310270c304d42f268428f2de7a4ac0275bea97690e021df6f549f462503ff4c7a81d9dd27288867bbfa2271477d0911378b8944fae55@157.230.239.163:30303",
55+
"enode://a87685902a0622e9cf18c68e73a0ea45156ec53e857ef049b185a9db2296ca04d776417bf1901c0b4eacb5b26271d8694e88e3f17c20d49eb77e1a41ab26b5b3@51.141.78.53:30303",
56+
"enode://ae8658da8d255d1992c3ec6e62e11d6e1c5899aa1566504bc1ff96a0c9c8bd44838372be643342553817f5cc7d78f1c83a8093dee13d77b3b0a583c050c81940@18.232.185.151:30303",
57+
"enode://ae8658da8d255d1992c3ec6e62e11d6e1c5899aa1566504bc1ff96a0c9c8bd44838372be643342553817f5cc7d78f1c83a8093dee13d77b3b0a583c050c81940@18.232.185.151:30303",
58+
"enode://b477ca6d507a3f57070783eb62ba838847635f8b1a0cbffb8b7f8173f5894cf550f0225a5c279341e2d862a606e778b57180a4f1db3db78c51eadcfa4fdc6963@40.68.240.160:30303"
5359
],
5460
"accounts": {
5561
"0x0000000000000000000000000000000000000000": {

ethcore/res/ethereum/kotti.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
},
3939
"nodes": [
4040
"enode://06333009fc9ef3c9e174768e495722a7f98fe7afd4660542e983005f85e556028410fd03278944f44cfe5437b1750b5e6bd1738f700fe7da3626d52010d2954c@51.141.15.254:30303",
41-
"enode://ae8658da8d255d1992c3ec6e62e11d6e1c5899aa1566504bc1ff96a0c9c8bd44838372be643342553817f5cc7d78f1c83a8093dee13d77b3b0a583c050c81940@18.232.185.151:30303"
41+
"enode://93c94e999be5dd854c5d82a7cf5c14822973b5d9badb56ad4974586ec4d4f1995c815af795c20bb6e0a6226d3ee55808435c4dc89baf94ee581141b064d19dfc@80.187.116.161:25720",
42+
"enode://ae8658da8d255d1992c3ec6e62e11d6e1c5899aa1566504bc1ff96a0c9c8bd44838372be643342553817f5cc7d78f1c83a8093dee13d77b3b0a583c050c81940@18.232.185.151:30303",
43+
"enode://b477ca6d507a3f57070783eb62ba838847635f8b1a0cbffb8b7f8173f5894cf550f0225a5c279341e2d862a606e778b57180a4f1db3db78c51eadcfa4fdc6963@40.68.240.160:30303"
4244
],
4345
"accounts": {
4446
"0x0000000000000000000000000000000000000000": {

ethcore/res/ethereum/kovan.json

+26-11
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,31 @@
77
"stepDuration": "0x4",
88
"blockReward": "0x4563918244F40000",
99
"validators": {
10-
"list": [
11-
"0x00D6Cc1BA9cf89BD2e58009741f4F7325BAdc0ED",
12-
"0x00427feae2419c15b89d1c21af10d1b6650a4d3d",
13-
"0x4Ed9B08e6354C70fE6F8CB0411b0d3246b424d6c",
14-
"0x0020ee4Be0e2027d76603cB751eE069519bA81A1",
15-
"0x0010f94b296a852aaac52ea6c5ac72e03afd032d",
16-
"0x007733a1FE69CF3f2CF989F81C7b4cAc1693387A",
17-
"0x00E6d2b931F55a3f1701c7389d592a7778897879",
18-
"0x00e4a10650e5a6D6001C38ff8E64F97016a1645c",
19-
"0x00a0a24b9f0e5ec7aa4c7389b8302fd0123194de"
20-
]
10+
"multi": {
11+
"0": {
12+
"list": [
13+
"0x00D6Cc1BA9cf89BD2e58009741f4F7325BAdc0ED",
14+
"0x00427feae2419c15b89d1c21af10d1b6650a4d3d",
15+
"0x4Ed9B08e6354C70fE6F8CB0411b0d3246b424d6c",
16+
"0x0020ee4Be0e2027d76603cB751eE069519bA81A1",
17+
"0x0010f94b296a852aaac52ea6c5ac72e03afd032d",
18+
"0x007733a1FE69CF3f2CF989F81C7b4cAc1693387A",
19+
"0x00E6d2b931F55a3f1701c7389d592a7778897879",
20+
"0x00e4a10650e5a6D6001C38ff8E64F97016a1645c",
21+
"0x00a0a24b9f0e5ec7aa4c7389b8302fd0123194de"
22+
]
23+
},
24+
"10960440": {
25+
"list": [
26+
"0x00D6Cc1BA9cf89BD2e58009741f4F7325BAdc0ED",
27+
"0x0010f94b296a852aaac52ea6c5ac72e03afd032d",
28+
"0x00a0a24b9f0e5ec7aa4c7389b8302fd0123194de"
29+
]
30+
},
31+
"10960500": {
32+
"safeContract": "0xaE71807C1B0a093cB1547b682DC78316D945c9B8"
33+
}
34+
}
2135
},
2236
"validateScoreTransition": "0x41a3c4",
2337
"validateStepTransition": "0x16e360",
@@ -5367,6 +5381,7 @@
53675381
}
53685382
},
53695383
"nodes": [
5384+
"enode://f6e37b943bad3a78cb8589b1798d30d210ffd39cfcd2c8f2de4f098467fd49c667980100d919da7ca46cd50505d30989abda87f0b9339377de13d6592c22caf8@34.198.49.72:30303",
53705385
"enode://56abaf065581a5985b8c5f4f88bd202526482761ba10be9bfdcd14846dd01f652ec33fde0f8c0fd1db19b59a4c04465681fcef50e11380ca88d25996191c52de@40.71.221.215:30303",
53715386
"enode://d07827483dc47b368eaf88454fb04b41b7452cf454e194e2bd4c14f98a3278fed5d819dbecd0d010407fc7688d941ee1e58d4f9c6354d3da3be92f55c17d7ce3@52.166.117.77:30303",
53725387
"enode://38e6e7fd416293ed120d567a2675fe078c0205ab0671abf16982ce969823bd1f3443d590c18b321dfae7dcbe1f6ba98ef8702f255c3c9822a188abb82c53adca@51.77.66.187:30303",

ethcore/res/ethereum/poacore.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
"eip140Transition": "0x0",
3535
"eip211Transition": "0x0",
3636
"eip214Transition": "0x0",
37-
"eip658Transition": "0x0"
37+
"eip658Transition": "0x0",
38+
"eip145Transition": 8582254,
39+
"eip1014Transition": 8582254,
40+
"eip1052Transition": 8582254
3841
},
3942
"genesis": {
4043
"seal": {

ethcore/res/ethereum/rinkeby.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"eip1014Transition": "0x37db77",
2626
"eip1052Transition": "0x37db77",
2727
"eip1283Transition": "0x37db77",
28+
"eip1283DisableTransition": "0x41efd2",
2829
"gasLimitBoundDivisor": "0x400",
2930
"maxCodeSize": "0x6000",
3031
"maxCodeSizeTransition": "0x0",

ethcore/src/engines/clique/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ use std::time;
6767
use std::time::{Duration, SystemTime, UNIX_EPOCH};
6868

6969
use block::ExecutedBlock;
70+
use bytes::Bytes;
7071
use client::{BlockId, EngineClient};
7172
use engines::clique::util::{extract_signers, recover_creator};
7273
use engines::{Engine, EngineError, Seal};
@@ -713,6 +714,13 @@ impl Engine<EthereumMachine> for Clique {
713714
header.set_difficulty(DIFF_NOTURN);
714715
}
715716
}
717+
718+
let zero_padding_len = VANITY_LENGTH - header.extra_data().len();
719+
if zero_padding_len > 0 {
720+
let mut resized_extra_data = header.extra_data().clone();
721+
resized_extra_data.resize(VANITY_LENGTH, 0);
722+
header.set_extra_data(resized_extra_data);
723+
}
716724
} else {
717725
trace!(target: "engine", "populate_from_parent: no signer registered");
718726
}

parity/rpc_apis.rs

+2
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ pub struct FullDependencies {
252252
pub gas_price_percentile: usize,
253253
pub poll_lifetime: u32,
254254
pub allow_missing_blocks: bool,
255+
pub no_ancient_blocks: bool,
255256
}
256257

257258
impl FullDependencies {
@@ -303,6 +304,7 @@ impl FullDependencies {
303304
gas_price_percentile: self.gas_price_percentile,
304305
allow_missing_blocks: self.allow_missing_blocks,
305306
allow_experimental_rpcs: self.experimental_rpcs,
307+
no_ancient_blocks: self.no_ancient_blocks
306308
}
307309
);
308310
handler.extend_with(client.to_delegate());

parity/run.rs

+1
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@ fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, on_client_rq:
742742
gas_price_percentile: cmd.gas_price_percentile,
743743
poll_lifetime: cmd.poll_lifetime,
744744
allow_missing_blocks: cmd.allow_missing_blocks,
745+
no_ancient_blocks: !cmd.download_old_blocks,
745746
});
746747

747748
let dependencies = rpc::Dependencies {

0 commit comments

Comments
 (0)