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

Commit 8354d5f

Browse files
committed
Merge branch 'master' into dp/chore/fetch-dependencies-from-crates
* master: evmbin: Fix gas_used issue in state root mismatch and handle output better (#9418) Update hardcoded sync (#9421) Add block reward contract config to ethash and allow off-chain contracts (#9312) Private packets verification and queue refactoring (#8715) Update tobalaba.json (#9419) docs: add parity ethereum logo to readme (#9415) build: update rocksdb crate (#9414) Updating the CI system (#8765) Better support for eth_getLogs in light mode (#9186) Add update docs script to CI (#9219) `gasleft` extern implemented for WASM runtime (kip-6) (#9357) block view! removal in progress (#9397) Prevent sync restart if import queue full (#9381) nonroot CentOS Docker image (#9280) ethcore: kovan: delay activation of strict score validation (#9406)
2 parents e678b0b + 8a5c9a8 commit 8354d5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2971
-1410
lines changed

.gitlab-ci.yml

Lines changed: 255 additions & 191 deletions
Large diffs are not rendered by default.

Cargo.lock

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

README.md

Lines changed: 58 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,44 @@
1-
## Parity-Ethereum - a fast, light, and robust EVM and WASM blockchain client
1+
![Parity Ethereum](docs/logo-parity-ethereum.svg)
22

3-
### [» Download the latest release «](https://github.com/paritytech/parity-ethereum/releases/latest)
3+
## The fastest and most advanced Ethereum client.
44

5-
[![build status](https://gitlab.parity.io/parity/parity/badges/master/build.svg)](https://gitlab.parity.io/parity/parity/commits/master)
6-
[![codecov](https://codecov.io/gh/paritytech/parity-ethereum/branch/master/graph/badge.svg)](https://codecov.io/gh/paritytech/parity-ethereum)
7-
[![Snap Status](https://build.snapcraft.io/badge/paritytech/parity.svg)](https://build.snapcraft.io/user/paritytech/parity)
8-
[![GPLv3](https://img.shields.io/badge/license-GPL%20v3-green.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
5+
<p align="center"><strong><a href="https://github.com/paritytech/parity-ethereum/releases/latest">» Download the latest release «</a></strong></p>
96

7+
<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>
8+
<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>
9+
<a href="https://build.snapcraft.io/user/paritytech/parity" target="_blank"><img src="https://build.snapcraft.io/badge/paritytech/parity.svg" /></a>
10+
<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>
1011

11-
### Join the chat!
12+
**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.
1213

13-
Get in touch with us on Gitter:
14-
[![Gitter: Parity](https://img.shields.io/badge/gitter-parity-4AB495.svg)](https://gitter.im/paritytech/parity)
15-
[![Gitter: Parity.js](https://img.shields.io/badge/gitter-parity.js-4AB495.svg)](https://gitter.im/paritytech/parity.js)
16-
[![Gitter: Parity/Miners](https://img.shields.io/badge/gitter-parity/miners-4AB495.svg)](https://gitter.im/paritytech/parity/miners)
17-
[![Gitter: Parity-PoA](https://img.shields.io/badge/gitter-parity--poa-4AB495.svg)](https://gitter.im/paritytech/parity-poa)
18-
19-
Or join our community on Matrix:
20-
[![Riot: +Parity](https://img.shields.io/badge/riot-%2Bparity%3Amatrix.parity.io-orange.svg)](https://riot.im/app/#/group/+parity:matrix.parity.io)
14+
- Clean, modular codebase for easy customisation
15+
- Advanced CLI-based client
16+
- Minimal memory and storage footprint
17+
- Synchronise in hours, not days with Warp Sync
18+
- Modular for light integration into your service or product
2119

22-
Official website: https://parity.io | Be sure to check out [our wiki](https://wiki.parity.io) for more information.
20+
## Technical Overview
2321

24-
----
22+
Parity Ethereum's goal is to be the fastest, lightest, and most secure Ethereum client. We are developing Parity Ethereum using the sophisticated and cutting-edge **Rust programming language**. Parity Ethereum is licensed under the GPLv3 and can be used for all your Ethereum needs.
2523

26-
## About Parity-Ethereum
24+
By default, Parity Ethereum runs a JSON-RPC HTTP server on port `:8545` and a Web-Sockets server on port `:8546`. This is fully configurable and supports a number of APIs.
2725

28-
Parity-Ethereum's goal is to be the fastest, lightest, and most secure Ethereum client. We are developing Parity-Ethereum using the sophisticated and cutting-edge Rust programming language. Parity-Ethereum is licensed under the GPLv3, and can be used for all your Ethereum needs.
26+
If you run into problems while using Parity Ethereum, check out the [wiki for documentation](https://wiki.parity.io/), feel free to [file an issue in this repository](https://github.com/paritytech/parity-ethereum/issues/new), or hop on our [Gitter](https://gitter.im/paritytech/parity) or [Riot](https://riot.im/app/#/group/+parity:matrix.parity.io) chat room to ask a question. We are glad to help! **For security-critical issues**, please refer to the security policy outlined in [SECURITY.md](SECURITY.md).
2927

30-
By default, Parity-Ethereum will run a JSON-RPC HTTP server on `127.0.0.1:8545` and a Web-Sockets server on `127.0.0.1:8546`. This is fully configurable and supports a number of APIs.
28+
Parity Ethereum's current beta-release is 2.0. You can download it at [the releases page](https://github.com/paritytech/parity-ethereum/releases) or follow the instructions below to build from source. Please, mind the [CHANGELOG.md](CHANGELOG.md) for a list of all changes between different versions.
3129

32-
If you run into problems while using Parity-Ethereum, feel free to file an issue in this repository or hop on our [Gitter](https://gitter.im/paritytech/parity) or [Riot](https://riot.im/app/#/group/+parity:matrix.parity.io) chat room to ask a question. We are glad to help! **For security-critical issues**, please refer to the security policy outlined in [SECURITY.md](SECURITY.md).
30+
## Build Dependencies
3331

34-
Parity-Ethereum's current beta-release is 2.0. You can download it at [the releases page](https://github.com/paritytech/parity-ethereum/releases) or follow the instructions below to build from source. Please, mind the [CHANGELOG.md](CHANGELOG.md) for a list of all changes between different versions.
32+
Parity Ethereum requires **Rust version 1.28.x** to build.
3533

36-
----
37-
38-
## Build dependencies
39-
40-
**Parity-Ethereum requires Rust version 1.27.0 to build**
41-
42-
We recommend installing Rust through [rustup](https://www.rustup.rs/). If you don't already have rustup, you can install it like this:
34+
We recommend installing Rust through [rustup](https://www.rustup.rs/). If you don't already have `rustup`, you can install it like this:
4335

4436
- Linux:
4537
```bash
4638
$ curl https://sh.rustup.rs -sSf | sh
4739
```
4840

49-
Parity-Ethereum also requires `gcc`, `g++`, `libudev-dev`, `pkg-config`, `file`, `make`, and `cmake` packages to be installed.
41+
Parity Ethereum also requires `gcc`, `g++`, `libudev-dev`, `pkg-config`, `file`, `make`, and `cmake` packages to be installed.
5042

5143
- OSX:
5244
```bash
@@ -56,54 +48,50 @@ We recommend installing Rust through [rustup](https://www.rustup.rs/). If you do
5648
`clang` is required. It comes with Xcode command line tools or can be installed with homebrew.
5749

5850
- Windows
59-
Make sure you have Visual Studio 2015 with C++ support installed. Next, download and run the rustup installer from
60-
https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe, start "VS2015 x64 Native Tools Command Prompt", and use the following command to install and set up the msvc toolchain:
51+
Make sure you have Visual Studio 2015 with C++ support installed. Next, download and run the `rustup` installer from
52+
https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe, start "VS2015 x64 Native Tools Command Prompt", and use the following command to install and set up the `msvc` toolchain:
6153
```bash
6254
$ rustup default stable-x86_64-pc-windows-msvc
6355
```
6456

65-
Once you have rustup installed, then you need to install:
57+
Once you have `rustup` installed, then you need to install:
6658
* [Perl](https://www.perl.org)
6759
* [Yasm](https://yasm.tortall.net)
6860

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

71-
----
72-
73-
## Install from the snap store
63+
## Install from the Snapcraft Store
7464

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

7767
```bash
7868
sudo snap install parity
7969
```
8070

81-
Or, if you want to contribute testing the upcoming release:
71+
Alternatively, if you want to contribute testing the upcoming release:
8272

8373
```bash
8474
sudo snap install parity --beta
8575
```
8676

87-
And to test the latest code landed into the master branch:
77+
Moreover, to test the latest code from the master branch:
8878

8979
```bash
9080
sudo snap install parity --edge
9181
```
9282

93-
----
94-
95-
## Build from source
83+
## Build from Source Code
9684

9785
```bash
98-
# download Parity-Ethereum code
86+
# download Parity Ethereum code
9987
$ git clone https://github.com/paritytech/parity-ethereum
10088
$ cd parity-ethereum
10189

10290
# build in release mode
10391
$ cargo build --release --features final
10492
```
10593

106-
This will produce an executable in the `./target/release` subdirectory.
94+
This produces an executable in the `./target/release` subdirectory.
10795

10896
Note: if cargo fails to parse manifest try:
10997

@@ -117,7 +105,7 @@ Note, when compiling a crate and you receive errors, it's in most cases your out
117105
$ cargo clean
118106
```
119107

120-
This will always compile the latest nightly builds. If you want to build stable or beta, do a
108+
This always compiles the latest nightly builds. If you want to build stable or beta, do a
121109

122110
```bash
123111
$ git checkout stable
@@ -129,11 +117,7 @@ or
129117
$ git checkout beta
130118
```
131119

132-
first.
133-
134-
----
135-
136-
## Simple one-line installer for Mac and Ubuntu
120+
## Simple One-Line Installer for Mac and Linux
137121

138122
```bash
139123
bash <(curl https://get.parity.io -L)
@@ -145,22 +129,39 @@ The one-line installer always defaults to the latest beta release. To install a
145129
bash <(curl https://get.parity.io -L) -r stable
146130
```
147131

148-
## Start Parity-Ethereum
132+
## Start Parity Ethereum
149133

150134
### Manually
151135

152-
To start Parity-Ethereum manually, just run
136+
To start Parity Ethereum manually, just run
153137

154138
```bash
155139
$ ./target/release/parity
156140
```
157141

158-
and Parity-Ethereum will begin syncing the Ethereum blockchain.
142+
so Parity Ethereum begins syncing the Ethereum blockchain.
159143

160-
### Using systemd service file
144+
### Using `systemd` service file
161145

162-
To start Parity-Ethereum as a regular user using systemd init:
146+
To start Parity Ethereum as a regular user using `systemd` init:
163147

164148
1. Copy `./scripts/parity.service` to your
165-
systemd user directory (usually `~/.config/systemd/user`).
166-
2. To configure Parity-Ethereum, write a `/etc/parity/config.toml` config file, see [Configuring Parity-Ethereum](https://paritytech.github.io/wiki/Configuring-Parity) for details.
149+
`systemd` user directory (usually `~/.config/systemd/user`).
150+
2. To configure Parity Ethereum, write a `/etc/parity/config.toml` config file, see [Configuring Parity Ethereum](https://paritytech.github.io/wiki/Configuring-Parity) for details.
151+
152+
## Join the chat!
153+
154+
Questions? Get in touch with us on Gitter:
155+
[![Gitter: Parity](https://img.shields.io/badge/gitter-parity-4AB495.svg)](https://gitter.im/paritytech/parity)
156+
[![Gitter: Parity.js](https://img.shields.io/badge/gitter-parity.js-4AB495.svg)](https://gitter.im/paritytech/parity.js)
157+
[![Gitter: Parity/Miners](https://img.shields.io/badge/gitter-parity/miners-4AB495.svg)](https://gitter.im/paritytech/parity/miners)
158+
[![Gitter: Parity-PoA](https://img.shields.io/badge/gitter-parity--poa-4AB495.svg)](https://gitter.im/paritytech/parity-poa)
159+
160+
Alternatively, join our community on Matrix:
161+
[![Riot: +Parity](https://img.shields.io/badge/riot-%2Bparity%3Amatrix.parity.io-orange.svg)](https://riot.im/app/#/group/+parity:matrix.parity.io)
162+
163+
## Documentation
164+
165+
Official website: https://parity.io
166+
167+
Be sure to [check out our wiki](https://wiki.parity.io) for more information.

docker/README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1-
Usage
1+
## Usage
22

33
```docker build -f docker/ubuntu/Dockerfile --tag ethcore/parity:branch_or_tag_name .```
4+
5+
## Usage - CentOS
6+
7+
Builds a lightweight non-root Parity docker image:
8+
9+
```
10+
git clone https://github.com/paritytech/parity-ethereum.git
11+
cd parity-ethereum
12+
./docker/centos/build.sh
13+
```
14+
15+
Fully customised build:
16+
```
17+
PARITY_IMAGE_REPO=my-personal/parity \
18+
PARITY_BUILDER_IMAGE_TAG=build-latest \
19+
PARITY_RUNNER_IMAGE_TAG=centos-parity-experimental \
20+
./docker/centos/build.sh
21+
```
22+
23+
24+
Default values:
25+
```
26+
# The image name
27+
PARITY_IMAGE_REPO - parity/parity
28+
29+
# The tag to be used for builder image, git commit sha will be appended
30+
PARITY_BUILDER_IMAGE_TAG - build
31+
32+
# The tag to be used for runner image
33+
PARITY_RUNNER_IMAGE_TAG - latest
34+
```
35+
36+
All default ports you might use will be exposed:
37+
```
38+
# secret
39+
# ipfs store ui rpc ws listener discovery
40+
# ↓ ↓ ↓ ↓ ↓ ↓ ↓
41+
EXPOSE 5001 8082 8083 8180 8545 8546 30303/tcp 30303/udp
42+
```

docker/centos/Dockerfile

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
FROM centos:latest
2-
WORKDIR /build
32

4-
# install tools and dependencies
5-
RUN yum -y update&& \
6-
yum install -y git make gcc-c++ gcc file binutils cmake
3+
RUN mkdir -p /opt/parity/data && \
4+
chmod g+rwX /opt/parity/data && \
5+
mkdir -p /opt/parity/release
76

8-
# install rustup
9-
RUN curl -sSf https://static.rust-lang.org/rustup.sh -o rustup.sh &&\
10-
ls&&\
11-
sh rustup.sh --disable-sudo
7+
COPY parity/parity /opt/parity/release
128

13-
# show backtraces
14-
ENV RUST_BACKTRACE 1
9+
WORKDIR /opt/parity/data
1510

16-
# set compiler
17-
ENV CXX g++
18-
ENV CC gcc
11+
# exposing default ports
12+
#
13+
# secret
14+
# ipfs store ui rpc ws listener discovery
15+
# ↓ ↓ ↓ ↓ ↓ ↓ ↓
16+
EXPOSE 5001 8082 8083 8180 8545 8546 30303/tcp 30303/udp
1917

20-
# show tools
21-
RUN rustc -vV && \
22-
cargo -V && \
23-
gcc -v &&\
24-
g++ -v
18+
# switch to non-root user
19+
USER 1001
2520

26-
# build parity
27-
ADD . /build/parity
28-
RUN cd parity&&\
29-
cargo build --release --verbose && \
30-
ls /build/parity/target/release/parity && \
31-
strip /build/parity/target/release/parity
21+
#if no base path provided, assume it's current workdir
22+
CMD ["--base-path","."]
23+
ENTRYPOINT ["/opt/parity/release/parity"]
24+
25+
26+
3227

33-
RUN file /build/parity/target/release/parity
3428

35-
EXPOSE 8080 8545 8180
36-
ENTRYPOINT ["/build/parity/target/release/parity"]

docker/centos/Dockerfile.build

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM centos:latest
2+
3+
WORKDIR /build
4+
5+
ADD . /build/parity-ethereum
6+
7+
RUN yum -y update && \
8+
yum install -y systemd-devel git make gcc-c++ gcc file binutils && \
9+
curl -L "https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.tar.gz" -o cmake.tar.gz && \
10+
tar -xzf cmake.tar.gz && \
11+
cp -r cmake-3.12.0-Linux-x86_64/* /usr/ && \
12+
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
13+
PATH=/root/.cargo/bin:$PATH && \
14+
RUST_BACKTRACE=1 && \
15+
rustc -vV && \
16+
cargo -V && \
17+
gcc -v && \
18+
g++ -v && \
19+
cmake --version && \
20+
cd parity-ethereum && \
21+
cargo build --verbose --release --features final && \
22+
strip /build/parity-ethereum/target/release/parity && \
23+
file /build/parity-ethereum/target/release/parity
24+
25+

docker/centos/build.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env sh
2+
3+
# The image name
4+
PARITY_IMAGE_REPO=${PARITY_IMAGE_REPO:-parity/parity}
5+
# The tag to be used for builder image
6+
PARITY_BUILDER_IMAGE_TAG=${PARITY_BUILDER_IMAGE_TAG:-build}
7+
# The tag to be used for runner image
8+
PARITY_RUNNER_IMAGE_TAG=${PARITY_RUNNER_IMAGE_TAG:-latest}
9+
10+
echo Building $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
11+
docker build --no-cache -t $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H") . -f docker/centos/Dockerfile.build
12+
13+
echo Creating $PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H"), extracting binary
14+
docker create --name extract $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
15+
mkdir docker/centos/parity
16+
docker cp extract:/build/parity-ethereum/target/release/parity docker/centos/parity
17+
18+
echo Building $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG
19+
docker build --no-cache -t $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG docker/centos/ -f docker/centos/Dockerfile
20+
21+
echo Cleaning up ...
22+
rm -rf docker/centos/parity
23+
docker rm -f extract
24+
docker rmi -f $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
25+
26+
echo Echoing Parity version:
27+
docker run $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG --version
28+
29+
echo Done.

0 commit comments

Comments
 (0)