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

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dp/chore/update-com…
Browse files Browse the repository at this point in the history
…mon-deps

* origin/master:
  CI: Remove unnecessary pipes (#9681)
  test.sh: use cargo --target for platforms other than linux, win or mac (#9650)
  ci: fix push script (#9679)
  Hardfork the testnets (#9562)
  Calculate sha3 instead of sha256 for push-release. (#9673)
  ethcore-io retries failed work steal (#9651)
  fix(light_fetch): avoid race with BlockNumber::Latest (#9665)
  Test fix for windows cache name... (#9658)
  refactor(fetch) : light use only one `DNS` thread (#9647)
  • Loading branch information
dvdplm committed Oct 2, 2018
2 parents 0c28822 + 7781cbb commit d3001d9
Show file tree
Hide file tree
Showing 44 changed files with 327 additions and 618 deletions.
327 changes: 78 additions & 249 deletions .gitlab-ci.yml

Large diffs are not rendered by default.

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.

24 changes: 1 addition & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

<p align="center"><strong><a href="https://github.com/paritytech/parity-ethereum/releases/latest">» Download the latest release «</a></strong></p>

<p align="center"><a href="https://gitlab.parity.io/parity/parity/commits/master" target="_blank"><img src="https://gitlab.parity.io/parity/parity/badges/master/build.svg" /></a>
<a href="https://codecov.io/gh/paritytech/parity-ethereum" target="_blank"><img src="https://codecov.io/gh/paritytech/parity-ethereum/branch/master/graph/badge.svg" /></a>
<a href="https://build.snapcraft.io/user/paritytech/parity" target="_blank"><img src="https://build.snapcraft.io/badge/paritytech/parity.svg" /></a>
<p align="center"><a href="https://gitlab.parity.io/parity/parity-ethereum/commits/master" target="_blank"><img src="https://gitlab.parity.io/parity/parity-ethereum/badges/master/build.svg" /></a>
<a href="https://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank"><img src="https://img.shields.io/badge/license-GPL%20v3-green.svg" /></a></p>

**Built for mission-critical use**: Miners, service providers, and exchanges need fast synchronisation and maximum uptime. Parity Ethereum provides the core infrastructure essential for speedy and reliable services.
Expand Down Expand Up @@ -60,26 +58,6 @@ Once you have `rustup` installed, then you need to install:

Make sure that these binaries are in your `PATH`. After that, you should be able to build Parity Ethereum from source.

## Install from the Snapcraft Store

In any of the [supported Linux distros](https://snapcraft.io/docs/core/install):

```bash
sudo snap install parity
```

Alternatively, if you want to contribute testing the upcoming release:

```bash
sudo snap install parity --beta
```

Moreover, to test the latest code from the master branch:

```bash
sudo snap install parity --edge
```

## Build from Source Code

```bash
Expand Down
8 changes: 7 additions & 1 deletion ethcore/res/ethereum/kovan.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@
"eip211Transition": 5067000,
"eip214Transition": 5067000,
"eip658Transition": 5067000,
"wasmActivationTransition": 6600000
"wasmActivationTransition": 6600000,
"eip145Transition": 9200000,
"eip1014Transition": 9200000,
"eip1052Transition": 9200000,
"eip1283Transition": 9200000,
"kip4Transition": 9200000,
"kip6Transition": 9200000
},
"genesis": {
"seal": {
Expand Down
12 changes: 9 additions & 3 deletions ethcore/res/ethereum/ropsten.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
"durationLimit": "0x0d",
"blockReward": {
"0": "0x4563918244F40000",
"1700000": "0x29A2241AF62C0000"
"1700000": "0x29A2241AF62C0000",
"4200000": "0x1BC16D674EC80000"
},
"homesteadTransition": 0,
"eip100bTransition": 1700000,
"difficultyBombDelays": {
"1700000": 3000000
"1700000": 3000000,
"4200000": 2000000
}
}
}
Expand All @@ -39,7 +41,11 @@
"eip140Transition": 1700000,
"eip211Transition": 1700000,
"eip214Transition": 1700000,
"eip658Transition": 1700000
"eip658Transition": 1700000,
"eip145Transition": 4200000,
"eip1014Transition": 4200000,
"eip1052Transition": 4200000,
"eip1283Transition": 4200000
},
"genesis": {
"seal": {
Expand Down
1 change: 0 additions & 1 deletion ethcore/src/engines/tendermint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ impl Engine<EthereumMachine> for Tendermint {
}

fn stop(&self) {
self.step_service.stop()
}

fn is_proposal(&self, header: &Header) -> bool {
Expand Down
9 changes: 5 additions & 4 deletions ethcore/src/json_tests/difficulty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ mod difficulty_test_foundation {
declare_test!{DifficultyTests_difficultyMainNetwork, "BasicTests/difficultyMainNetwork.json"}
}

mod difficulty_test_ropsten {
difficulty_json_test_nopath!(new_ropsten_test);
declare_test!{DifficultyTests_difficultyRopsten, "BasicTests/difficultyRopsten.json"}
}
// Disabling Ropsten diff tests; waiting for upstream ethereum/tests Constantinople update
//mod difficulty_test_ropsten {
// difficulty_json_test_nopath!(new_ropsten_test);
// declare_test!{DifficultyTests_difficultyRopsten, "BasicTests/difficultyRopsten.json"}
//}

mod difficulty_test_frontier {
difficulty_json_test_nopath!(new_frontier_test);
Expand Down
12 changes: 9 additions & 3 deletions parity/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ const SNAPSHOT_HISTORY: u64 = 100;
const GAS_CORPUS_EXPIRATION_MINUTES: u64 = 60 * 6;

// Pops along with error messages when a password is missing or invalid.
const VERIFY_PASSWORD_HINT: &'static str = "Make sure valid password is present in files passed using `--password` or in the configuration file.";
const VERIFY_PASSWORD_HINT: &str = "Make sure valid password is present in files passed using `--password` or in the configuration file.";

// Full client number of DNS threads
const FETCH_FULL_NUM_DNS_THREADS: usize = 4;

// Light client number of DNS threads
const FETCH_LIGHT_NUM_DNS_THREADS: usize = 1;

#[derive(Debug, PartialEq)]
pub struct RunCmd {
Expand Down Expand Up @@ -283,7 +289,7 @@ fn execute_light_impl(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<Runnin
let cpu_pool = CpuPool::new(4);

// fetch service
let fetch = fetch::Client::new().map_err(|e| format!("Error starting fetch client: {:?}", e))?;
let fetch = fetch::Client::new(FETCH_LIGHT_NUM_DNS_THREADS).map_err(|e| format!("Error starting fetch client: {:?}", e))?;
let passwords = passwords_from_files(&cmd.acc_conf.password_files)?;

// prepare account provider
Expand Down Expand Up @@ -477,7 +483,7 @@ fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, on_client_rq:
let event_loop = EventLoop::spawn();

// fetch service
let fetch = fetch::Client::new().map_err(|e| format!("Error starting fetch client: {:?}", e))?;
let fetch = fetch::Client::new(FETCH_FULL_NUM_DNS_THREADS).map_err(|e| format!("Error starting fetch client: {:?}", e))?;

let txpool_size = cmd.miner_options.pool_limits.max_count;
// create miner
Expand Down
3 changes: 2 additions & 1 deletion rpc/src/v1/helpers/light_fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ impl LightFetch {
}).join(header_fut).and_then(move |((gas_known, tx), hdr)| {
// then request proved execution.
// TODO: get last-hashes from network.
let env_info = match client.env_info(id) {
let hash = hdr.hash();
let env_info = match client.env_info(BlockId::Hash(hash)) {
Some(env_info) => env_info,
_ => return Either::A(future::err(errors::unknown_block())),
};
Expand Down
12 changes: 0 additions & 12 deletions scripts/aura-test.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 15 additions & 4 deletions scripts/gitlab/build-unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@

set -e # fail on any error
set -u # treat unset variables as error

echo "__________Show ENVIROMENT__________"
echo "CC: " $CC
echo "CXX: " $CXX
echo "CI_SERVER_NAME: " $CI_SERVER_NAME
echo "CARGO_HOME: " $CARGO_HOME
echo "BUILD_TARGET: " $BUILD_TARGET
echo "BUILD_ARCH: " $BUILD_ARCH
echo "CARGO_TARGET: " $CARGO_TARGET
echo "CC: " $CC
echo "CXX: " $CXX

echo "__________CARGO CONFIG__________"
rm -rf .cargo
mkdir -p .cargo
rm -f .cargo/config
echo "[target.$CARGO_TARGET]" >> .cargo/config
echo "linker= \"$CC\"" >> .cargo/config
cat .cargo/config
Expand All @@ -26,10 +32,15 @@ mkdir -p artifacts
cd artifacts
mkdir -p $CARGO_TARGET
cd $CARGO_TARGET
cp ../../target/$CARGO_TARGET/release/{parity,parity-evm,ethstore,ethkey,whisper} .
cp ../../target/$CARGO_TARGET/release/parity ./parity
cp ../../target/$CARGO_TARGET/release/parity-evm ./parity-evm
cp ../../target/$CARGO_TARGET/release/ethstore ./ethstore
cp ../../target/$CARGO_TARGET/release/ethkey ./ethkey
cp ../../target/$CARGO_TARGET/release/whisper ./whisper
strip -v ./*
echo "_____ Calculating checksums _____"
for binary in $(ls)
do
rhash --sha256 $binary -o $binary.sha256
./parity tools hash $binary > $binary.sha3
done
29 changes: 22 additions & 7 deletions scripts/gitlab/build-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,45 @@ set INCLUDE="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;C:\vs20
set LIB="C:\vs2015\VC\lib;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64"

rustup default stable-x86_64-pc-windows-msvc
echo "_____ Building _____"

echo "__________Show ENVIROMENT__________"
echo "CI_SERVER_NAME: " $CI_SERVER_NAME
echo "CARGO_HOME: " $CARGO_HOME
echo "BUILD_TARGET: " $BUILD_TARGET
echo "BUILD_ARCH: " $BUILD_ARCH
echo "CARGO_TARGET: " $CARGO_TARGET

echo "_____ Building target: "$CARGO_TARGET" _____"
time cargo build --target $CARGO_TARGET --release --features final
time cargo build --target $CARGO_TARGET --release -p evmbin
time cargo build --target $CARGO_TARGET --release -p ethstore-cli
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
time cargo build --target $CARGO_TARGET --release -p whisper-cli

echo "__________Sign binaries__________"
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity.exe
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity-evm.exe
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethstore.exe
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethkey.exe
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/whisper.exe
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity.exe
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity-evm.exe
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethstore.exe
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethkey.exe
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/whisper.exe

echo "_____ Post-processing binaries _____"
rm -rf artifacts
mkdir -p artifacts
cd artifacts
mkdir -p $CARGO_TARGET
cd $CARGO_TARGET
cp --verbose ../../target/$CARGO_TARGET/release/{parity.exe,parity-evm.exe,ethstore.exe,ethkey.exe,whisper.exe} .
cp --verbose ../../target/$CARGO_TARGET/release/parity.exe ./parity.exe
cp --verbose ../../target/$CARGO_TARGET/release/parity-evm.exe ./parity-evm.exe
cp --verbose ../../target/$CARGO_TARGET/release/ethstore.exe ./ethstore.exe
cp --verbose ../../target/$CARGO_TARGET/release/ethkey.exe ./ethkey.exe
cp --verbose ../../target/$CARGO_TARGET/release/whisper.exe ./whisper.exe

echo "_____ Calculating checksums _____"
for binary in $(ls)
do
rhash --sha256 $binary -o $binary.sha256
./parity.exe tools hash $binary > $binary.sha3
done
cp parity.exe.sha256 parity.sha256
cp parity.exe.sha3 parity.sha3
4 changes: 2 additions & 2 deletions scripts/gitlab/rustfmt.sh → scripts/gitlab/cargo-audit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
set -e # fail on any error
set -u # treat unset variables as error

cargo install rustfmt-nightly
cargo fmt -- --write-mode=diff
CARGO_TARGET_DIR=./target cargo +stable install cargo-audit
cargo +stable audit
7 changes: 0 additions & 7 deletions scripts/gitlab/clippy.sh

This file was deleted.

20 changes: 0 additions & 20 deletions scripts/gitlab/coverage.sh

This file was deleted.

File renamed without changes.
8 changes: 0 additions & 8 deletions scripts/gitlab/install-readme.sh

This file was deleted.

24 changes: 0 additions & 24 deletions scripts/gitlab/package-snap.sh

This file was deleted.

49 changes: 49 additions & 0 deletions scripts/gitlab/publish-awss3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

set -e # fail on any error
set -u # treat unset variables as error

echo "__________Register Release__________"
DATA="secret=$RELEASES_SECRET"

echo "Pushing release to Mainnet"
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA"

echo "Pushing release to Kovan"
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-release/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA"

cd artifacts
ls -l | sort -k9
filetest=( * )
echo ${filetest[*]}
for DIR in "${filetest[@]}";
do
cd $DIR
if [[ $DIR =~ "windows" ]];
then
WIN=".exe";
else
WIN="";
fi
sha3=$(cat parity.sha3 | awk '{print $1}')
case $DIR in
x86_64* )
DATA="commit=$CI_COMMIT_SHA&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET"
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_COMMIT_REF_NAME/$DIR"
# Kovan
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_COMMIT_REF_NAME/$DIR"
;;
esac
cd ..
done

echo "__________Push binaries to AWS S3____________"
aws configure set aws_access_key_id $s3_key
aws configure set aws_secret_access_key $s3_secret
if [[ "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" || "$CI_COMMIT_REF_NAME" = "nightly" ]];
then
export S3_BUCKET=builds-parity-published;
else
export S3_BUCKET=builds-parity;
fi
aws s3 sync ./ s3://$S3_BUCKET/$CI_COMMIT_REF_NAME/
Loading

0 comments on commit d3001d9

Please sign in to comment.