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

Commit d147700

Browse files
authored
Backports for 2.1.0 beta (#9518)
* parity-version: mark 2.1.0 track beta * ci: update branch version references * docker: release master to latest * Fix checkpointing when creating contract failed (#9514) * ci: fix json docs generation (#9515) * fix typo in version string (#9516) * Update patricia trie to 0.2.2 crates. Default dependencies on minor version only. * Putting back ethereum tests to the right commit * Enable all Constantinople hard fork changes in constantinople_test.json (#9505) * Enable all Constantinople hard fork changes in constantinople_test.json * Address grumbles * Remove EIP-210 activation * 8m -> 5m * Temporarily add back eip210 transition so we can get test passed * Add eip210_test and remove eip210 transition from const_test * In create memory calculation is the same for create2 because the additional parameter was popped before. (#9522) * deps: bump fs-swap and kvdb-rocksdb * Multithreaded snapshot creation (#9239) * Add Progress to Snapshot Secondary chunks creation * Use half of CPUs to multithread snapshot creation * Use env var to define number of threads * info to debug logs * Add Snapshot threads as CLI option * Randomize chunks per thread * Remove randomness, add debugging * Add warning * Add tracing * Use parity-common fix seek branch * Fix log * Fix tests * Fix tests * PR Grumbles * PR Grumble II * Update Cargo.lock * PR Grumbles * Default snapshot threads to half number of CPUs * Fix default snapshot threads // min 1 * correct before_script for nightly build versions (#9543) - fix gitlab array of strings syntax error - get proper commit id - avoid colon in stings * Remove initial token for WS. (#9545) * version: mark release critical * ci: fix rpc docs generation 2 (#9550) * Improve P2P discovery (#9526) * Add `target` to Rust traces * network-devp2p: Don't remove discovery peer in main sync * network-p2p: Refresh discovery more often * Update Peer discovery protocol * Run discovery more often when not enough nodes connected * Start the first discovery early * Update fast discovery rate * Fix tests * Fix `ping` tests * Fixing remote Node address ; adding PingPong round * Fix tests: update new +1 PingPong round * Increase slow Discovery rate Check in flight FindNode before pings * Add `deprecated` to deprecated_echo_hash * Refactor `discovery_round` branching * net_version caches network_id to avoid redundant aquire of sync read lock (#9544) * net_version caches network_id to avoid redundant aquire of sync read lock, #8746 * use lower_hex display formatting for net_peerCount rpc method * Increase Gas-floor-target and Gas Cap (#9564) + Gas-floor-target increased to 8M by default + Gas-cap increased to 10M by default * Revert to old parity-tokio-ipc. * Downgrade named pipes.
1 parent 631df0f commit d147700

File tree

39 files changed

+831
-595
lines changed

39 files changed

+831
-595
lines changed

.gitlab-ci.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,14 @@ cache:
4141
paths:
4242
- artifacts/
4343

44-
.determine_version:
45-
before_script: &determine_version
46-
- >
47-
VERSION="$(sed -r -n '1,/^version/s/^version = "([^"]+)".*$/\1/p' < Cargo.toml)";
48-
if [ "${CI_COMMIT_REF_NAME}" = "nightly" ]; then
49-
COMMIT_REF_SHORT="echo ${CI_COMMIT_REF} | grep -oE '^.{7}')";
50-
DATE_STRING="$(date +%Y%m%d)";
51-
export VERSION="${VERSION}-${COMMIT_REF_SHORT}-${DATE_STRING}";
52-
fi;
53-
export VERSION;
54-
echo "Version: $VERSION"
44+
.determine_version: &determine_version
45+
- VERSION="$(sed -r -n '1,/^version/s/^version = "([^"]+)".*$/\1/p' Cargo.toml)"
46+
- DATE_STR="$(date +%Y%m%d)"
47+
- ID_SHORT="$(echo ${CI_COMMIT_SHA} | cut -c 1-7)"
48+
- test "${CI_COMMIT_REF_NAME}" = "nightly" && VERSION="${VERSION}-${ID_SHORT}-${DATE_STR}"
49+
- export VERSION
50+
- echo "Version = ${VERSION}"
51+
5552

5653

5754
#### stage: test
@@ -256,7 +253,7 @@ publish-linux-snap-armhf:
256253

257254
publish-docker-parity-amd64: &publish_docker
258255
stage: publish
259-
only: *publishable_branches
256+
only: *releaseable_branches
260257
cache: {}
261258
dependencies:
262259
- build-linux-ubuntu-amd64

Cargo.lock

Lines changed: 319 additions & 325 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ethcore/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ethcore-bloom-journal = { path = "../util/bloom" }
1818
parity-bytes = "0.1"
1919
hashdb = "0.2.1"
2020
memorydb = "0.2.1"
21-
patricia-trie = "0.2.1"
21+
patricia-trie = "0.2"
2222
patricia-trie-ethereum = { path = "../util/patricia-trie-ethereum" }
2323
parity-crypto = "0.1"
2424
error-chain = { version = "0.12", default-features = false }

ethcore/evm/src/interpreter/gasometer.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,7 @@ impl<Gas: evm::CostType> Gasometer<Gas> {
233233
},
234234
instructions::CREATE | instructions::CREATE2 => {
235235
let gas = Gas::from(schedule.create_gas);
236-
let mem = match instruction {
237-
instructions::CREATE => mem_needed(stack.peek(1), stack.peek(2))?,
238-
instructions::CREATE2 => mem_needed(stack.peek(2), stack.peek(3))?,
239-
_ => unreachable!("instruction can only be CREATE/CREATE2 checked above; qed"),
240-
};
236+
let mem = mem_needed(stack.peek(1), stack.peek(2))?;
241237

242238
Request::GasMemProvide(gas, mem, None)
243239
},

ethcore/light/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ parity-bytes = "0.1"
1313
ethcore-transaction = { path = "../transaction" }
1414
ethereum-types = "0.4"
1515
memorydb = "0.2.1"
16-
patricia-trie = "0.2.1"
16+
patricia-trie = "0.2"
1717
patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" }
1818
ethcore-network = { path = "../../util/network" }
1919
ethcore-io = { path = "../../util/io" }

ethcore/private-tx/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ heapsize = "0.4"
2626
keccak-hash = "0.1.2"
2727
log = "0.4"
2828
parking_lot = "0.6"
29-
patricia-trie = "0.2.1"
29+
patricia-trie = "0.2"
3030
patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" }
3131
rand = "0.3"
3232
rlp = { version = "0.2.4", features = ["ethereum"] }

ethcore/res/ethereum/constantinople_test.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"name": "Byzantium (Test)",
2+
"name": "Constantinople (test)",
33
"engine": {
44
"Ethash": {
55
"params": {
66
"minimumDifficulty": "0x020000",
77
"difficultyBoundDivisor": "0x0800",
88
"durationLimit": "0x0d",
9-
"blockReward": "0x29A2241AF62C0000",
9+
"blockReward": "0x1BC16D674EC80000",
1010
"homesteadTransition": "0x0",
1111
"eip100bTransition": "0x0",
1212
"difficultyBombDelays": {
13-
"0": 3000000
13+
"0": 5000000
1414
}
1515
}
1616
}
@@ -30,11 +30,13 @@
3030
"eip161abcTransition": "0x0",
3131
"eip161dTransition": "0x0",
3232
"eip140Transition": "0x0",
33-
"eip210Transition": "0x0",
3433
"eip211Transition": "0x0",
3534
"eip214Transition": "0x0",
3635
"eip155Transition": "0x0",
3736
"eip658Transition": "0x0",
37+
"eip145Transition": "0x0",
38+
"eip1014Transition": "0x0",
39+
"eip1052Transition": "0x0",
3840
"eip1283Transition": "0x0"
3941
},
4042
"genesis": {
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "EIP210 (test)",
3+
"engine": {
4+
"Ethash": {
5+
"params": {
6+
"minimumDifficulty": "0x020000",
7+
"difficultyBoundDivisor": "0x0800",
8+
"durationLimit": "0x0d",
9+
"blockReward": "0x4563918244F40000",
10+
"homesteadTransition": "0x0"
11+
}
12+
}
13+
},
14+
"params": {
15+
"gasLimitBoundDivisor": "0x0400",
16+
"registrar" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b",
17+
"accountStartNonce": "0x00",
18+
"maximumExtraDataSize": "0x20",
19+
"minGasLimit": "0x1388",
20+
"networkID" : "0x1",
21+
"maxCodeSize": 24576,
22+
"maxCodeSizeTransition": "0x0",
23+
"eip98Transition": "0xffffffffffffffff",
24+
"eip150Transition": "0x0",
25+
"eip160Transition": "0x0",
26+
"eip161abcTransition": "0x0",
27+
"eip161dTransition": "0x0",
28+
"eip210Transition": "0x0"
29+
},
30+
"genesis": {
31+
"seal": {
32+
"ethereum": {
33+
"nonce": "0x0000000000000042",
34+
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
35+
}
36+
},
37+
"difficulty": "0x400000000",
38+
"author": "0x0000000000000000000000000000000000000000",
39+
"timestamp": "0x00",
40+
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
41+
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
42+
"gasLimit": "0x1388"
43+
},
44+
"accounts": {
45+
"0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
46+
"0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
47+
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
48+
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
49+
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 100 } } } },
50+
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } },
51+
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 2000, "word": 0 } } } },
52+
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }
53+
}
54+
}

ethcore/src/client/client.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,8 @@ impl Client {
11531153
},
11541154
};
11551155

1156-
snapshot::take_snapshot(&*self.engine, &self.chain.read(), start_hash, db.as_hashdb(), writer, p)?;
1156+
let processing_threads = self.config.snapshot.processing_threads;
1157+
snapshot::take_snapshot(&*self.engine, &self.chain.read(), start_hash, db.as_hashdb(), writer, p, processing_threads)?;
11571158

11581159
Ok(())
11591160
}

ethcore/src/client/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use std::fmt::{Display, Formatter, Error as FmtError};
1919

2020
use verification::{VerifierType, QueueConfig};
2121
use journaldb;
22+
use snapshot::SnapshotConfiguration;
2223

2324
pub use std::time::Duration;
2425
pub use blockchain::Config as BlockChainConfig;
@@ -120,6 +121,8 @@ pub struct ClientConfig {
120121
pub check_seal: bool,
121122
/// Maximal number of transactions queued for verification in a separate thread.
122123
pub transaction_verification_queue_size: usize,
124+
/// Snapshot configuration
125+
pub snapshot: SnapshotConfiguration,
123126
}
124127

125128
impl Default for ClientConfig {
@@ -144,6 +147,7 @@ impl Default for ClientConfig {
144147
history_mem: 32 * mb,
145148
check_seal: true,
146149
transaction_verification_queue_size: 8192,
150+
snapshot: Default::default(),
147151
}
148152
}
149153
}

0 commit comments

Comments
 (0)