Compare commits
201 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70389b2888 | ||
|
|
8f63f6d32a | ||
|
|
f02f99cd3f | ||
|
|
bbbd6f01fc | ||
|
|
ddbce9f014 | ||
|
|
423c5e87da | ||
|
|
a15d2882d0 | ||
|
|
6d5809757f | ||
|
|
e179b0e0c2 | ||
|
|
37eb0fb04e | ||
|
|
32b0a80a18 | ||
|
|
9df9937922 | ||
|
|
eae66568a9 | ||
|
|
ece348d173 | ||
|
|
cc0c54a45c | ||
|
|
3f139116b2 | ||
|
|
771e3998a9 | ||
|
|
03fbde9723 | ||
|
|
3303aa73ff | ||
|
|
8367be6992 | ||
|
|
e6237ed05e | ||
|
|
0abdcedc03 | ||
|
|
59a735e2c4 | ||
|
|
bf24355480 | ||
|
|
4ed15931af | ||
|
|
c5553c1f21 | ||
|
|
33d633eed1 | ||
|
|
a3a0de096d | ||
|
|
aed708ffd8 | ||
|
|
66d3d7ec11 | ||
|
|
8503aeb2df | ||
|
|
a7ebc1dd25 | ||
|
|
584d89f964 | ||
|
|
4aeaab3a2f | ||
|
|
9750a31336 | ||
|
|
404005cc93 | ||
|
|
9b5bd37dc5 | ||
|
|
f96e5bc0d5 | ||
|
|
444c9c4375 | ||
|
|
2a2c24855c | ||
|
|
712302391c | ||
|
|
3023d76a46 | ||
|
|
f60d74b231 | ||
|
|
3e192ab486 | ||
|
|
fe313677b3 | ||
|
|
20f3f356e5 | ||
|
|
b9141b830b | ||
|
|
a938385692 | ||
|
|
c9ac0392d8 | ||
|
|
02dfc8632e | ||
|
|
ac2a62707a | ||
|
|
6f78523bf0 | ||
|
|
5dbbf9db13 | ||
|
|
0d6ffa2a97 | ||
|
|
3afb6370f9 | ||
|
|
dad4bfecdf | ||
|
|
902b44c94f | ||
|
|
54bf237e4f | ||
|
|
f835ce8253 | ||
|
|
4d04668c48 | ||
|
|
b4d95089d4 | ||
|
|
cca30f964e | ||
|
|
f11cc80561 | ||
|
|
4f71fd5d4d | ||
|
|
0340466f5f | ||
|
|
8847819b31 | ||
|
|
ca91fd5e76 | ||
|
|
df2619a37d | ||
|
|
4840371635 | ||
|
|
68e4156143 | ||
|
|
83f812b176 | ||
|
|
36c5525e3f | ||
|
|
78b5c12cf9 | ||
|
|
0564e7c168 | ||
|
|
7a4e91d26d | ||
|
|
ec26827f58 | ||
|
|
01b71bf9ba | ||
|
|
42040438ed | ||
|
|
799828b51e | ||
|
|
f78e8c3a38 | ||
|
|
4f242996d1 | ||
|
|
daecf5db3e | ||
|
|
9a09f52679 | ||
|
|
841a996fa6 | ||
|
|
ff99ccaf82 | ||
|
|
60f2aadb8e | ||
|
|
c143b1b783 | ||
|
|
2377d46c59 | ||
|
|
10d361aec5 | ||
|
|
bf4e4df4c8 | ||
|
|
3b766f01f2 | ||
|
|
2aa3864d67 | ||
|
|
04082d1514 | ||
|
|
85fa07728c | ||
|
|
a36ac996a0 | ||
|
|
6e666ecac7 | ||
|
|
08dc83205c | ||
|
|
bff142828d | ||
|
|
6d1ae888ca | ||
|
|
d5cc2c9e67 | ||
|
|
048dba7ef3 | ||
|
|
280c5e8a99 | ||
|
|
1257ad2993 | ||
|
|
5c72e60b14 | ||
|
|
aa6b6e477c | ||
|
|
245ef854dd | ||
|
|
c2cffd1e06 | ||
|
|
ddab958e61 | ||
|
|
a10160bd56 | ||
|
|
49be60e984 | ||
|
|
2b8a151b82 | ||
|
|
9bcc6c9e69 | ||
|
|
0fc605face | ||
|
|
8f1618687c | ||
|
|
cb246c26c0 | ||
|
|
086e45671b | ||
|
|
f3ad643b69 | ||
|
|
c5a4993e39 | ||
|
|
32cc0bddf6 | ||
|
|
d87286c5c3 | ||
|
|
ac3acdef71 | ||
|
|
dffa9bcef6 | ||
|
|
9ce75a173e | ||
|
|
755faf37e3 | ||
|
|
de21fef868 | ||
|
|
39aa02ed26 | ||
|
|
7a0dfec115 | ||
|
|
1fa019d92a | ||
|
|
7105ed3f61 | ||
|
|
2f411c93fd | ||
|
|
808f959a94 | ||
|
|
2aae862330 | ||
|
|
b18a7bde9a | ||
|
|
a0cdf5c420 | ||
|
|
b3dd72ab0a | ||
|
|
4d984ead4f | ||
|
|
fbc85e31c2 | ||
|
|
177d26a25e | ||
|
|
1f363b22fc | ||
|
|
5aed421fa3 | ||
|
|
f4df9c8dfd | ||
|
|
144385e67d | ||
|
|
9b6abb5861 | ||
|
|
6c81f1fb74 | ||
|
|
7371beb26c | ||
|
|
7acdc80b27 | ||
|
|
3847f8a9fc | ||
|
|
56e977b425 | ||
|
|
2f8e6be2ea | ||
|
|
180debb260 | ||
|
|
b79c7f05c0 | ||
|
|
d17c629b71 | ||
|
|
4be4a1c151 | ||
|
|
b0d7d48391 | ||
|
|
164cd268ad | ||
|
|
3a16ef19c1 | ||
|
|
74ea9cc74c | ||
|
|
2e88183df4 | ||
|
|
fca8eb5810 | ||
|
|
df4b326cb3 | ||
|
|
4db397ecb1 | ||
|
|
e767fd88f6 | ||
|
|
fae7039fda | ||
|
|
69d6f3ed3e | ||
|
|
4292e75dca | ||
|
|
2b4640c94c | ||
|
|
42a6954ec9 | ||
|
|
114bab66c4 | ||
|
|
13d0d6d006 | ||
|
|
c15e78cd95 | ||
|
|
24993b8d4e | ||
|
|
69d89583ca | ||
|
|
3c8fb60cbd | ||
|
|
9f8a131fa4 | ||
|
|
31f4a214a9 | ||
|
|
81f8f939b9 | ||
|
|
28e4847b59 | ||
|
|
30ecff3959 | ||
|
|
8add773b12 | ||
|
|
c20e761051 | ||
|
|
35be0e9943 | ||
|
|
3bf0a00ba4 | ||
|
|
570d2c21d3 | ||
|
|
b9fc5bdda0 | ||
|
|
1964ed7eb3 | ||
|
|
60bcab3e48 | ||
|
|
ebb7699da2 | ||
|
|
78821bb935 | ||
|
|
e8a21116f7 | ||
|
|
9f81b07224 | ||
|
|
8eeda2b1a3 | ||
|
|
0087568c16 | ||
|
|
75a11ba9be | ||
|
|
4ac9807bc1 | ||
|
|
1c26ffa208 | ||
|
|
f8b18d5d7b | ||
|
|
b327e79b42 | ||
|
|
8e2f35856a | ||
|
|
a029551b0b | ||
|
|
320581a3e4 | ||
|
|
f77b4119da |
@@ -1,3 +0,0 @@
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
# Link the C runtime statically ; https://github.com/paritytech/parity-ethereum/issues/6643
|
||||
rustflags = ["-Ctarget-feature=+crt-static"]
|
||||
@@ -1,22 +0,0 @@
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
target
|
||||
|
||||
*.swp
|
||||
*.swo
|
||||
*.swn
|
||||
*.DS_Store
|
||||
|
||||
# Visual Studio Code stuff
|
||||
.vscode
|
||||
|
||||
# GitEye stuff
|
||||
.project
|
||||
|
||||
# idea ide
|
||||
.idea
|
||||
|
||||
# git stuff
|
||||
.git
|
||||
|
||||
ethcore/res/ethereum/tests
|
||||
@@ -9,8 +9,3 @@ trim_trailing_whitespace=true
|
||||
max_line_length=120
|
||||
insert_final_newline=true
|
||||
|
||||
[*.{yml,sh}]
|
||||
indent_style=space
|
||||
indent_size=2
|
||||
tab_width=8
|
||||
end_of_line=lf
|
||||
|
||||
84
.github/CODE_OF_CONDUCT.md
vendored
84
.github/CODE_OF_CONDUCT.md
vendored
@@ -1,84 +0,0 @@
|
||||
# Code of Conduct
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
A primary goal of Parity is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
|
||||
|
||||
This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
|
||||
|
||||
We invite all those who participate in Parity to help us create safe and positive experiences for everyone.
|
||||
|
||||
## 2. Open Source Citizenship
|
||||
|
||||
A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
|
||||
|
||||
Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
|
||||
|
||||
If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
|
||||
|
||||
## 3. Expected Behavior
|
||||
|
||||
The following behaviors are expected and requested of all community members:
|
||||
|
||||
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
|
||||
* Exercise consideration and respect in your speech and actions.
|
||||
* Attempt collaboration before conflict.
|
||||
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
|
||||
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
|
||||
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
|
||||
|
||||
## 4. Unacceptable Behavior
|
||||
|
||||
The following behaviors are considered harassment and are unacceptable within our community:
|
||||
|
||||
* Violence, threats of violence or violent language directed against another person.
|
||||
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
|
||||
* Posting or displaying sexually explicit or violent material.
|
||||
* Posting or threatening to post other people’s personally identifying information ("doxing").
|
||||
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
|
||||
* Inappropriate photography or recording.
|
||||
* Inappropriate physical contact. You should have someone’s consent before touching them.
|
||||
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
|
||||
* Deliberate intimidation, stalking or following (online or in person).
|
||||
* Advocating for, or encouraging, any of the above behavior.
|
||||
* Sustained disruption of community events, including talks and presentations.
|
||||
|
||||
## 5. Consequences of Unacceptable Behavior
|
||||
|
||||
Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
|
||||
|
||||
Anyone asked to stop unacceptable behavior is expected to comply immediately.
|
||||
|
||||
If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
|
||||
|
||||
## 6. Reporting Guidelines
|
||||
|
||||
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. community@parity.io.
|
||||
|
||||
Link to reporting guidelines: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
Link to security policy: [SECURITY.md](../SECURITY.md)
|
||||
|
||||
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
|
||||
|
||||
## 7. Addressing Grievances
|
||||
|
||||
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Parity Technologies with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
|
||||
|
||||
## 8. Scope
|
||||
|
||||
We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business.
|
||||
|
||||
This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
|
||||
|
||||
## 9. Contact info
|
||||
|
||||
You can contact Parity via Email: community@parity.io
|
||||
|
||||
## 10. License and attribution
|
||||
|
||||
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
|
||||
|
||||
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
|
||||
|
||||
Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
|
||||
33
.github/CONTRIBUTING.md
vendored
33
.github/CONTRIBUTING.md
vendored
@@ -1,33 +0,0 @@
|
||||
# Contributing Guidelines
|
||||
|
||||
## Do you have a question?
|
||||
|
||||
Check out our [Basic Usage](https://wiki.parity.io/Basic-Usage), [Configuration](https://wiki.parity.io/Configuring-Parity-Ethereum), and [FAQ](https://wiki.parity.io/FAQ) articles on our [wiki](https://wiki.parity.io/)!
|
||||
|
||||
See also frequently asked questions [tagged with `parity`](https://ethereum.stackexchange.com/questions/tagged/parity?sort=votes&pageSize=50) on Stack Exchange.
|
||||
|
||||
## Report bugs!
|
||||
|
||||
Do **not** open an issue on Github if you think your discovered bug could be a **security-relevant vulnerability**. Please, read our [security policy](../SECURITY.md) instead.
|
||||
|
||||
Otherwise, just create a [new issue](https://github.com/paritytech/parity-ethereum/issues/new) in our repository and state:
|
||||
|
||||
- What's your Parity Ethereum version?
|
||||
- What's your operating system and version?
|
||||
- How did you install Parity Ethereum?
|
||||
- Is your node fully synchronized?
|
||||
- Did you try turning it off and on again?
|
||||
|
||||
Also, try to include **steps to reproduce** the issue and expand on the **actual versus expected behavior**.
|
||||
|
||||
## Contribute!
|
||||
|
||||
If you would like to contribute to Parity Ethereum, please **fork it**, fix bugs or implement features, and [propose a pull request](https://github.com/paritytech/parity-ethereum/compare).
|
||||
|
||||
Please, refer to the [Coding Guide](https://wiki.parity.io/Coding-guide) in our wiki for more details about hacking on Parity.
|
||||
|
||||
## License.
|
||||
|
||||
By contributing to Parity Ethereum, you agree that your contributions will be licensed under the [GPLv3 License](../LICENSE).
|
||||
|
||||
Each contributor has to sign our Contributor License Agreement. The purpose of the CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen license. You can read and sign our full Contributor License Agreement at [cla.parity.io](https://cla.parity.io) before submitting a pull request.
|
||||
11
.github/ISSUE_TEMPLATE.md
vendored
11
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,11 +0,0 @@
|
||||
_Before filing a new issue, please **provide the following information**._
|
||||
|
||||
- **Parity Ethereum version**: 0.0.0
|
||||
- **Operating system**: Windows / MacOS / Linux
|
||||
- **Installation**: homebrew / one-line installer / built from source
|
||||
- **Fully synchronized**: no / yes
|
||||
- **Network**: ethereum / ropsten / kovan / ...
|
||||
- **Restarted**: no / yes
|
||||
|
||||
_Your issue description goes here below. Try to include **actual** vs. **expected behavior** and **steps to reproduce** the issue._
|
||||
|
||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -15,18 +15,10 @@
|
||||
|
||||
# vim stuff
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# mac stuff
|
||||
.DS_Store
|
||||
|
||||
# npm stuff
|
||||
npm-debug.log
|
||||
node_modules
|
||||
|
||||
# js build artifacts
|
||||
.git-release.log
|
||||
|
||||
# gdb files
|
||||
.gdb_history
|
||||
|
||||
@@ -38,8 +30,3 @@ node_modules
|
||||
|
||||
# Build artifacts
|
||||
out/
|
||||
parity-clib-examples/cpp/build/
|
||||
|
||||
.vscode
|
||||
rls/
|
||||
/parity.*
|
||||
|
||||
155
.gitlab-ci.yml
155
.gitlab-ci.yml
@@ -1,155 +0,0 @@
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- publish
|
||||
- optional
|
||||
|
||||
image: parity/rust:gitlab-ci
|
||||
|
||||
variables:
|
||||
CI_SERVER_NAME: "GitLab CI"
|
||||
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
|
||||
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||
|
||||
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
|
||||
only: &releaseable_branches
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- schedules
|
||||
|
||||
.collect_artifacts: &collect_artifacts
|
||||
artifacts:
|
||||
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
||||
when: on_success
|
||||
expire_in: 1 mos
|
||||
paths:
|
||||
- artifacts/
|
||||
|
||||
.determine_version: &determine_version
|
||||
- VERSION="$(sed -r -n '1,/^version/s/^version = "([^"]+)".*$/\1/p' Cargo.toml)"
|
||||
- DATE_STR="$(date +%Y%m%d)"
|
||||
- ID_SHORT="$(echo ${CI_COMMIT_SHA} | cut -c 1-7)"
|
||||
- test "${CI_COMMIT_REF_NAME}" = "nightly" && VERSION="${VERSION}-${ID_SHORT}-${DATE_STR}"
|
||||
- export VERSION
|
||||
- echo "Version = ${VERSION}"
|
||||
|
||||
test-linux:
|
||||
stage: test
|
||||
variables:
|
||||
RUN_TESTS: all
|
||||
script:
|
||||
- scripts/gitlab/test-all.sh stable
|
||||
tags:
|
||||
- rust-stable
|
||||
|
||||
test-audit:
|
||||
stage: test
|
||||
script:
|
||||
- scripts/gitlab/cargo-audit.sh
|
||||
tags:
|
||||
- rust-stable
|
||||
allow_failure: true
|
||||
|
||||
build-linux:
|
||||
stage: build
|
||||
only: *releaseable_branches
|
||||
variables:
|
||||
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||
script:
|
||||
- scripts/gitlab/build-unix.sh
|
||||
<<: *collect_artifacts
|
||||
tags:
|
||||
- rust-stable
|
||||
|
||||
build-darwin:
|
||||
stage: build
|
||||
only: *releaseable_branches
|
||||
variables:
|
||||
CARGO_TARGET: x86_64-apple-darwin
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
script:
|
||||
- scripts/gitlab/build-unix.sh
|
||||
tags:
|
||||
- rust-osx
|
||||
<<: *collect_artifacts
|
||||
|
||||
build-windows:
|
||||
stage: build
|
||||
only: *releaseable_branches
|
||||
variables:
|
||||
CARGO_TARGET: x86_64-pc-windows-msvc
|
||||
script:
|
||||
- sh scripts/gitlab/build-windows.sh
|
||||
tags:
|
||||
- rust-windows
|
||||
<<: *collect_artifacts
|
||||
|
||||
publish-docker:
|
||||
stage: publish
|
||||
only: *releaseable_branches
|
||||
cache: {}
|
||||
dependencies:
|
||||
- build-linux
|
||||
tags:
|
||||
- shell
|
||||
script:
|
||||
- scripts/gitlab/publish-docker.sh parity
|
||||
|
||||
publish-awss3:
|
||||
stage: publish
|
||||
only: *releaseable_branches
|
||||
cache: {}
|
||||
dependencies:
|
||||
- build-linux
|
||||
- build-darwin
|
||||
- build-windows
|
||||
before_script: *determine_version
|
||||
script:
|
||||
- scripts/gitlab/publish-awss3.sh
|
||||
tags:
|
||||
- shell
|
||||
|
||||
publish-docs:
|
||||
stage: publish
|
||||
only:
|
||||
- tags
|
||||
except:
|
||||
- nightly
|
||||
cache: {}
|
||||
script:
|
||||
- scripts/gitlab/publish-docs.sh
|
||||
tags:
|
||||
- shell
|
||||
|
||||
build-android:
|
||||
stage: optional
|
||||
image: parity/rust-android:gitlab-ci
|
||||
variables:
|
||||
CARGO_TARGET: armv7-linux-androideabi
|
||||
script:
|
||||
- scripts/gitlab/build-unix.sh
|
||||
tags:
|
||||
- rust-arm
|
||||
allow_failure: true
|
||||
|
||||
test-beta:
|
||||
stage: optional
|
||||
variables:
|
||||
RUN_TESTS: cargo
|
||||
script:
|
||||
- scripts/gitlab/test-all.sh beta
|
||||
tags:
|
||||
- rust-beta
|
||||
allow_failure: true
|
||||
|
||||
test-nightly:
|
||||
stage: optional
|
||||
variables:
|
||||
RUN_TESTS: all
|
||||
script:
|
||||
- scripts/gitlab/test-all.sh nightly
|
||||
tags:
|
||||
- rust-nightly
|
||||
allow_failure: true
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -2,6 +2,3 @@
|
||||
path = ethcore/res/ethereum/tests
|
||||
url = https://github.com/ethereum/tests.git
|
||||
branch = develop
|
||||
[submodule "ethcore/res/wasm-tests"]
|
||||
path = ethcore/res/wasm-tests
|
||||
url = https://github.com/paritytech/wasm-tests
|
||||
|
||||
103
.travis.yml
Normal file
103
.travis.yml
Normal file
@@ -0,0 +1,103 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
language: rust
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /^beta-.*$/
|
||||
- /^stable-.*$/
|
||||
- /^beta$/
|
||||
- /^stable$/
|
||||
git:
|
||||
depth: 3
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- rust: nightly
|
||||
include:
|
||||
- rust: stable
|
||||
env: FEATURES="--features travis-beta" RUN_TESTS="true"
|
||||
# - rust: beta
|
||||
# env: FEATURES="--features travis-beta" RUN_TESTS="true"
|
||||
- rust: stable
|
||||
env: FEATURES="--features travis-beta" RUN_BUILD="true"
|
||||
- rust: beta
|
||||
env: FEATURES="--features travis-beta" RUN_BUILD="true"
|
||||
- rust: stable
|
||||
env: FEATURES="--features travis-beta" RUN_COVERAGE="true"
|
||||
# - rust: nightly
|
||||
# env: FEATURES="--features travis-nightly" RUN_BENCHES="true"
|
||||
- rust: nightly
|
||||
env: FEATURES="--features travis-nightly" RUN_TESTS="true"
|
||||
env:
|
||||
global:
|
||||
# GH_TOKEN
|
||||
- secure: bumJASbZSU8bxJ0EyPUJmu16AiV9EXOpyOj86Jlq/Ty9CfwGqsSXt96uDyE+OUJf34RUFQMsw0nk37/zC4lcn6kqk2wpuH3N/o85Zo/cVZY/NusBWLQqtT5VbYWsV+u2Ua4Tmmsw8yVYQhYwU2ZOejNpflL+Cs9XGgORp1L+/gMRMC2y5Se6ZhwnKPQlRJ8LGsG1dzjQULxzADIt3/zuspNBS8a2urJwlHfGMkvHDoUWCviP/GXoSqw3TZR7FmKyxE19I8n9+iSvm9+oZZquvcgfUxMHn8Gq/b44UbPvjtFOg2yam4xdWXF/RyWCHdc/R9EHorSABeCbefIsm+zcUF3/YQxwpSxM4IZEeH2rTiC7dcrsKw3XsO16xFQz5YI5Bay+CT/wTdMmJd7DdYz7Dyf+pOvcM9WOf/zorxYWSBOMYy0uzbusU2iyIghQ82s7E/Ahg+WARtPgkuTLSB5aL1oCTBKHqQscMr7lo5Ti6RpWLxEdTQMBznc+bMr+6dEtkEcG9zqc6cE9XX+ox3wTU6+HVMfQ1ltCntJ4UKcw3A6INEbw9wgocQa812CIASQ2fE+SCAbz6JxBjIAlFUnD1lUB7S8PdMPwn9plfQgKQ2A5YZqg6FnBdf0rQXIJYxQWKHXj/rBHSUCT0tHACDlzTA+EwWggvkP5AGIxRxm8jhw=
|
||||
- CVER=5
|
||||
- NUM_JOBS=1
|
||||
# - TARGETS="-p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity -p ethminer"
|
||||
- TARGETS="-p ethcore-util"
|
||||
- ARCHIVE_SUFFIX="-${TRAVIS_OS_NAME}-${TRAVIS_TAG}"
|
||||
- KCOV_FEATURES=""
|
||||
- KCOV_CMD="./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /usr/,/.cargo,/root/.multirust,src/tests,util/json-tests,util/src/network/tests,sync/src/tests,ethcore/src/tests,ethcore/src/evm/tests target/kcov"
|
||||
- RUN_TESTS="false"
|
||||
- RUN_COVERAGE="false"
|
||||
- RUN_BUILD="false"
|
||||
- RUN_BENCHES="false"
|
||||
cache:
|
||||
apt: true
|
||||
directories:
|
||||
- $TRAVIS_BUILD_DIR/target
|
||||
- $HOME/.cargo
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libcurl4-openssl-dev
|
||||
- libelf-dev
|
||||
- libdw-dev
|
||||
|
||||
script:
|
||||
- echo "$TRAVIS_BUILD_DIR/target"
|
||||
- ls "$TRAVIS_BUILD_DIR/target"
|
||||
- if [ "$RUN_TESTS" = "true" ]; then cargo test --release --verbose ${FEATURES} ${TARGETS}; fi
|
||||
- if [ "$RUN_BENCHES" = "true" ]; then cargo bench --no-run ${FEATURES} ${TARGETS}; fi
|
||||
- if [ "$RUN_BUILD" = "true" ]; then cargo build --release --verbose ${FEATURES}; fi
|
||||
- if [ "$RUN_BUILD" = "true" ]; then tar cvzf parity${ARCHIVE_SUFFIX}.tar.gz -C target/release parity; fi
|
||||
|
||||
after_success: |
|
||||
[ "$RUN_COVERAGE" = "true" ] &&
|
||||
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
|
||||
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make && make install DESTDIR=../tmp && cd ../.. &&
|
||||
cargo test --no-run ${KCOV_FEATURES} ${TARGETS} &&
|
||||
$KCOV_CMD target/debug/deps/ethcore_util-* &&
|
||||
$KCOV_CMD target/debug/deps/ethash-* &&
|
||||
$KCOV_CMD target/debug/deps/ethcore-* &&
|
||||
$KCOV_CMD target/debug/deps/ethsync-* &&
|
||||
$KCOV_CMD target/debug/deps/ethcore_rpc-* &&
|
||||
$KCOV_CMD target/debug/deps/ethminer-* &&
|
||||
$KCOV_CMD target/debug/parity-* &&
|
||||
[ $TRAVIS_BRANCH = master ] &&
|
||||
[ $TRAVIS_PULL_REQUEST = false ] &&
|
||||
[ $TRAVIS_RUST_VERSION = stable ] &&
|
||||
cargo doc --no-deps --verbose ${KCOV_FEATURES} ${TARGETS} &&
|
||||
echo '<meta http-equiv=refresh content=0;url=ethcore/index.html>' > target/doc/index.html &&
|
||||
pip install --user ghp-import &&
|
||||
/home/travis/.local/bin/ghp-import -n target/doc &&
|
||||
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: "t+oGT/4lsy7IScw5s86Dpntl5Nyck4qG6nhHwMScc6FYzwLldgwgJaafL8Ej+HG+b7nFLriN+Snoa4YQ5o74X5ZlSWubVREOYQlL/fq7vcPB0DwAZ0Jufq1QW2R1M+3SwwF1eAwTv2W3G7A2K7dxjCVvENcy/gdxnZ36NeUPsqaCC9UcI2Yc7+4jyQwvx6ZfBvQeu+HbKENA0eUNs2ZQOID/1IPy0LJBvSyxAQYsysXdjTzGdNu4+Iba20E8uWYe4fAbgz+gwGarXg1L6D6gKyMlWkViqWjvXWBuDJJqMQZ3rw41AwZOoh3mKd2Lc0l6l4oZcEqPuob0yKTNjz1tuJy9xKTC2F2bDzsvUgk1IRfMK5ukXXXS09ZCZWuA9/GtnsqJ1xGTiwX+DhQzpVBHaBiseSNlYE1YN/3jNyGY+iSts1qut+1BwE7swmcTLsAPoAy8Ue+f7ErNoCg1lm71vq7VO2DLn7x2NqHyHUEuJ+7olDHSdE84G7d9otDRu/+TfMOw7GXwTaha6yJRInuNsnj4CFMLNVvYACzCC2idB7f7nUZoSFi9jf18S9fCMPVmazMrFj4g95HWrVHkjpV5zRTeUdTWw6DJl6pC9HFqORHdCvLv4Rc4dm5r3CmOcAQ0ZuiccV2oKzw4/Wic96daae8M5f5KSQ/WTr+h0wXZKp0="
|
||||
skip_cleanup: true
|
||||
file: parity${ARCHIVE_SUFFIX}.tar.gz
|
||||
on:
|
||||
tags: true
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://hooks.slack.com/services/${SLACK_WEBHOOK}
|
||||
on_success: always
|
||||
on_failure: always
|
||||
on_start: never
|
||||
379
CHANGELOG.md
379
CHANGELOG.md
@@ -1,379 +0,0 @@
|
||||
## Parity-Ethereum [v2.0.1](https://github.com/paritytech/parity-ethereum/releases/tag/v2.0.1) (2018-07-27)
|
||||
|
||||
Parity-Ethereum 2.0.1-beta is a bug-fix release to improve performance and stability.
|
||||
|
||||
Note, authorities in PoA networks based on the Aura engine, should upgrade their nodes to 1.11.8-stable or 2.0.1-beta as this release includes a critical fix.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports to 2.0.1-beta ([#9145](https://github.com/paritytech/parity-ethereum/pull/9145))
|
||||
- Parity-version: bump beta to 2.0.1
|
||||
- Ci: update version strings for snaps ([#9160](https://github.com/paritytech/parity-ethereum/pull/9160))
|
||||
- Be more graceful on Aura difficulty validation ([#9164](https://github.com/paritytech/parity-ethereum/pull/9164))
|
||||
- Be more graceful on Aura difficulty validation
|
||||
- Test: rejects_step_backwards
|
||||
- Test: proposer_switching
|
||||
- Test: rejects_future_block
|
||||
- Test: reports_skipped
|
||||
- Test: verify_empty_seal_steps
|
||||
- Remove node-health ([#9119](https://github.com/paritytech/parity-ethereum/pull/9119))
|
||||
- Remove node-health
|
||||
- Remove ntp_servers
|
||||
- Add --ntp-servers as legacy instead of removing it
|
||||
- Add --ntp-servers to deprecated args
|
||||
- Remove unused stuff
|
||||
- Remove _legacy_ntp_servers
|
||||
- Parity: fix UserDefaults json parser ([#9189](https://github.com/paritytech/parity-ethereum/pull/9189))
|
||||
- Parity: fix UserDefaults json parser
|
||||
- Parity: use serde_derive for UserDefaults
|
||||
- Parity: support deserialization of old UserDefault json format
|
||||
- Parity: make UserDefaults serde backwards compatible
|
||||
- Parity: tabify indentation in UserDefaults
|
||||
- Fix bugfix hard fork logic ([#9138](https://github.com/paritytech/parity-ethereum/pull/9138))
|
||||
- Fix bugfix hard fork logic
|
||||
- Remove dustProtectionTransition from bugfix category
|
||||
- Eip-168 is not enabled by default
|
||||
- Remove unnecessary 'static
|
||||
- Disable per-sender limit for local transactions. ([#9148](https://github.com/paritytech/parity-ethereum/pull/9148))
|
||||
- Disable per-sender limit for local transactions.
|
||||
- Add a missing new line.
|
||||
- Rpc: fix is_major_importing sync state condition ([#9112](https://github.com/paritytech/parity-ethereum/pull/9112))
|
||||
- Rpc: fix is_major_importing sync state condition
|
||||
- Rpc: fix informant printout when waiting for peers
|
||||
- Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity-ethereum/pull/9135))
|
||||
- Docker: update hub dockerfile ([#9173](https://github.com/paritytech/parity-ethereum/pull/9173))
|
||||
- Update Dockerfile for hub
|
||||
- Update to Ubuntu Xenial 16.04
|
||||
- Fix cmake version
|
||||
- Docker: fix tab indentation in hub dockerfile
|
||||
- Rpc: fix broken merge
|
||||
- Rpc: remove node_health leftover from merge
|
||||
- Rpc: remove dapps leftover from merge
|
||||
|
||||
## Parity-Ethereum [v2.0.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.0.0) "Ethereum" (2018-07-18)
|
||||
|
||||
This is the Parity-Ethereum//v2.0.0-beta release, code-named "Ethereum", **YOLO!**
|
||||
|
||||
Please note, Parity-Ethereum//v2.0.0 comes with some breaking changes that might be interrupting your usual workflows. Please mind them before upgrading:
|
||||
|
||||
- The Parity client is now called _Parity-Ethereum_ to distinguish it from other software we provide, such as [_Parity-Bitcoin_](https://github.com/paritytech/parity-bitcoin/) and [_Parity-Polkadot_](https://github.com/paritytech/polkadot) ([#9052](https://github.com/paritytech/parity-ethereum/pull/9052)).
|
||||
- The public node and the user interface (a.k.a. _"Parity Wallet"_) are completely removed from the Parity-Ethereum//v2.0.0 client ([#8758](https://github.com/paritytech/parity-ethereum/pull/8758), [#8783](https://github.com/paritytech/parity-ethereum/pull/8783), [#8641](https://github.com/paritytech/parity-ethereum/pull/8641)). Users interested running a Parity Wallet, check out [the stand-alone UI application](https://github.com/Parity-JS/shell/releases).
|
||||
- The DApps subsystem was completely removed from the client ([#9017](https://github.com/paritytech/parity-ethereum/pull/9017), [#9107](https://github.com/paritytech/parity-ethereum/pull/9107)). Again, use the standalone wallet if you wish to continue working with them.
|
||||
- Windows and MacOS versions are not available as installer anymore and the system trays were removed ([#8778](https://github.com/paritytech/parity-ethereum/pull/8778)). If you desire to run Parity-Ethereum on Windows or MacOS, you still can get the binaries from our mirrors. Furthermore, MacOS users are encouraged [to use our homebrew tap](https://github.com/paritytech/homebrew-paritytech/).
|
||||
- Linux versions are not available as deb-/rpm-packages anymore ([#8887](https://github.com/paritytech/parity-ethereum/pull/8887)). Communities are encouraged to provide their own packages or maintain their own repositories, such as [Arch Linux does](https://www.archlinux.org/packages/community/x86_64/parity/) for instance.
|
||||
- MD5-checksums are completely replaced by SHA256-checksums ([#8884](https://github.com/paritytech/parity-ethereum/pull/8884)). This is also reflected on our homepage by now.
|
||||
- Deprecated, removed, or replaced CLI-options are hidden from client `--help` to further discourage their usage ([#8967](https://github.com/paritytech/parity-ethereum/pull/8967)).
|
||||
|
||||
Additional noteworthy changes to the client:
|
||||
|
||||
- Tracing of precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity-ethereum/pull/8486))
|
||||
- _Parity-Ethereum_ as a library now provides APIs for running full and light nodes and a C interface ([#8412](https://github.com/paritytech/parity-ethereum/pull/8412)). Shared crates are now available in [_Parity-Common_](https://github.com/paritytech/parity-common) ([#9083](https://github.com/paritytech/parity-ethereum/pull/9083)).
|
||||
- The Morden database and keys are now moved to a `./Morden` subdirectory instead of `./test` which is by default used by Ropsten ([#8621](https://github.com/paritytech/parity-ethereum/pull/8621)).
|
||||
- Adding support for having an on-chain contract calculating the block rewards ([#8419](https://github.com/paritytech/parity-ethereum/pull/8419)).
|
||||
- Enforcing warp-only synchronization with `--warp-barrier [blocknumber]` flag ([#8228](https://github.com/paritytech/parity-ethereum/pull/8228)).
|
||||
- Adding a fork-choice and meta-data framework suitable for implementing Casper ([#8401](https://github.com/paritytech/parity-ethereum/pull/8401)).
|
||||
- Returning an error if RLP-size of a transaction exceeds a 300kB limit ([#8473](https://github.com/paritytech/parity-ethereum/pull/8473)).
|
||||
- Warp-sync is now resumable by keeping the downloaded chunks between client restarts. Also, it seeds downloaded snapshots for other nodes ([#8544](https://github.com/paritytech/parity-ethereum/pull/8544)).
|
||||
- The developer chain `--chain dev` now contains Byzantium features, this breaks existing developer chains ([#8717](https://github.com/paritytech/parity-ethereum/pull/8717)).
|
||||
- The EIP150, EIP160 and EIP161 forks are now to be specified in common params section of a chain-spec file instead of the Ethash params to enable these features on non-proof-of-work chains ([#8614](https://github.com/paritytech/parity-ethereum/pull/8614)). Please update your chain specs.
|
||||
- Allowing to disable local-by-default for transactions with new configurations ([#8882](https://github.com/paritytech/parity-ethereum/pull/8882)).
|
||||
- Never drop local transactions from different senders ([#9002](https://github.com/paritytech/parity-ethereum/pull/9002)).
|
||||
- Optimize pending transactions filter and fix ethstats reporting of pending transactions ([#9026](https://github.com/paritytech/parity-ethereum/pull/9026)).
|
||||
- Add separate database directory for light client allowing to run full and light nodes at the same time ([#9064](https://github.com/paritytech/parity-ethereum/pull/9064)).
|
||||
|
||||
If you are upgrading directly from versions 1.10.9 or earlier, please note important changes to our transaction-queue implementation, namely:
|
||||
|
||||
- The pool now limits transactions per-sender (see `--tx-queue-per-sender`), local transactions also have to obey that limit. Consider increasing the limit via CLI-flag when running benchmarks or sending a lot of transactions at once.
|
||||
- In case the pool is full, transactions received over the network, but originating from accounts that you have private keys for might not get accepted to the pool any more with higher priority. Consider running with larger pool size or submitting the transactions directly on the node via `eth_sendRawTransaction`.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports to 2.0.0-beta ([#9094](https://github.com/paritytech/parity-ethereum/pull/9094))
|
||||
- Parity-version: betalize 2.0
|
||||
- Multiple improvements to discovery ping handling ([#8771](https://github.com/paritytech/parity-ethereum/pull/8771))
|
||||
- Discovery: Only add nodes to routing table after receiving pong.
|
||||
- Discovery: Refactor packet creation into its own function.
|
||||
- Discovery: Additional testing for new add_node behavior.
|
||||
- Discovery: Track expiration of pings to non-yet-in-bucket nodes.
|
||||
- Discovery: Verify echo hash on pong packets.
|
||||
- Discovery: Track timeouts on FIND_NODE requests.
|
||||
- Discovery: Retry failed pings with exponential backoff.
|
||||
- !fixup Use slice instead of Vec for request_backoff.
|
||||
- Add separate database directory for light client ([#9064](https://github.com/paritytech/parity-ethereum/pull/9064))
|
||||
- Add separate default DB path for light client ([#8927](https://github.com/paritytech/parity-ethereum/pull/8927))
|
||||
- Improve readability
|
||||
- Revert "Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity-ethereum/pull/9077))" ([#9097](https://github.com/paritytech/parity-ethereum/pull/9097))
|
||||
- Revert "Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity-ethereum/pull/9077))"
|
||||
- This reverts commit 7e77932.
|
||||
- Restore some of the changes
|
||||
- Update parity-common
|
||||
- Offload cull to IoWorker. ([#9099](https://github.com/paritytech/parity-ethereum/pull/9099))
|
||||
- Fix work-notify. ([#9104](https://github.com/paritytech/parity-ethereum/pull/9104))
|
||||
- Update hidapi, fixes [#7542](https://github.com/paritytech/parity-ethereum/issues/7542) ([#9108](https://github.com/paritytech/parity-ethereum/pull/9108))
|
||||
- Docker: add cmake dependency ([#9111](https://github.com/paritytech/parity-ethereum/pull/9111))
|
||||
- Update light client hardcoded headers ([#9098](https://github.com/paritytech/parity-ethereum/pull/9098))
|
||||
- Insert Kovan hardcoded headers until 7690241
|
||||
- Insert Kovan hardcoded headers until block 7690241
|
||||
- Insert Ropsten hardcoded headers until 3612673
|
||||
- Insert Mainnet hardcoded headers until block 5941249
|
||||
- Make sure to produce full blocks. ([#9115](https://github.com/paritytech/parity-ethereum/pull/9115))
|
||||
- Insert ETC (classic) hardcoded headers until block 6170625 ([#9121](https://github.com/paritytech/parity-ethereum/pull/9121))
|
||||
- Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity-ethereum/pull/9135))
|
||||
- Completely remove all dapps struct from rpc ([#9107](https://github.com/paritytech/parity-ethereum/pull/9107))
|
||||
- Completely remove all dapps struct from rpc
|
||||
- Remove unused pub use
|
||||
- `evm bench` fix broken dependencies ([#9134](https://github.com/paritytech/parity-ethereum/pull/9134))
|
||||
- `evm bench` use valid dependencies
|
||||
- Benchmarks of the `evm` used stale versions of a couple a crates that this commit fixes!
|
||||
- Fix warnings
|
||||
- Update snapcraft.yaml ([#9132](https://github.com/paritytech/parity-ethereum/pull/9132))
|
||||
- Parity Ethereum 2.0.0 ([#9052](https://github.com/paritytech/parity-ethereum/pull/9052))
|
||||
- Don't fetch snapshot chunks at random ([#9088](https://github.com/paritytech/parity-ethereum/pull/9088))
|
||||
- Remove the dapps system ([#9017](https://github.com/paritytech/parity-ethereum/pull/9017))
|
||||
- Fix nightly warnings ([#9080](https://github.com/paritytech/parity-ethereum/pull/9080))
|
||||
- Db: remove wal disabling / fast-and-loose option. ([#8963](https://github.com/paritytech/parity-ethereum/pull/8963))
|
||||
- Transactions hashes missing in trace_replayBlockTransactions method result [#8725](https://github.com/paritytech/parity-ethereum/issues/8725) ([#8883](https://github.com/paritytech/parity-ethereum/pull/8883))
|
||||
- Delete crates from parity-ethereum and fetch them from parity-common instead ([#9083](https://github.com/paritytech/parity-ethereum/pull/9083))
|
||||
- Updater verification ([#8787](https://github.com/paritytech/parity-ethereum/pull/8787))
|
||||
- Phrasing, precisions and typos in CLI help ([#9060](https://github.com/paritytech/parity-ethereum/pull/9060))
|
||||
- Some work towards iOS build ([#9045](https://github.com/paritytech/parity-ethereum/pull/9045))
|
||||
- Clean up deprecated options and add CHECK macro ([#9036](https://github.com/paritytech/parity-ethereum/pull/9036))
|
||||
- Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity-ethereum/pull/9077))
|
||||
- Fix warning in secret-store test ([#9074](https://github.com/paritytech/parity-ethereum/pull/9074))
|
||||
- Seedhashcompute remove needless `new` impl ([#9063](https://github.com/paritytech/parity-ethereum/pull/9063))
|
||||
- Remove trait bounds from several structs ([#9055](https://github.com/paritytech/parity-ethereum/pull/9055))
|
||||
- Docs: add changelog for 1.10.9 stable and 1.11.6 beta ([#9069](https://github.com/paritytech/parity-ethereum/pull/9069))
|
||||
- Enable test in `miner/pool/test` ([#9072](https://github.com/paritytech/parity-ethereum/pull/9072))
|
||||
- Fetch: replace futures-timer with tokio-timer ([#9066](https://github.com/paritytech/parity-ethereum/pull/9066))
|
||||
- Remove util-error ([#9054](https://github.com/paritytech/parity-ethereum/pull/9054))
|
||||
- Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity-ethereum/pull/8998))
|
||||
- A last bunch of txqueue performance optimizations ([#9024](https://github.com/paritytech/parity-ethereum/pull/9024))
|
||||
- Reduce number of constraints for triedb types ([#9043](https://github.com/paritytech/parity-ethereum/pull/9043))
|
||||
- Bump fs-swap to 0.2.3 so it is compatible with osx 10.11 again ([#9050](https://github.com/paritytech/parity-ethereum/pull/9050))
|
||||
- Recursive test ([#9042](https://github.com/paritytech/parity-ethereum/pull/9042))
|
||||
- Introduce more optional features in ethcore ([#9020](https://github.com/paritytech/parity-ethereum/pull/9020))
|
||||
- Update ETSC bootnodes ([#9038](https://github.com/paritytech/parity-ethereum/pull/9038))
|
||||
- Optimize pending transactions filter ([#9026](https://github.com/paritytech/parity-ethereum/pull/9026))
|
||||
- Eip160/eip161 spec: u64 -> BlockNumber ([#9044](https://github.com/paritytech/parity-ethereum/pull/9044))
|
||||
- Move the C/C++ example to another directory ([#9032](https://github.com/paritytech/parity-ethereum/pull/9032))
|
||||
- Bump parking_lot to 0.6 ([#9013](https://github.com/paritytech/parity-ethereum/pull/9013))
|
||||
- Never drop local transactions from different senders. ([#9002](https://github.com/paritytech/parity-ethereum/pull/9002))
|
||||
- Precise HTTP or WebSockets for JSON-RPC options ([#9027](https://github.com/paritytech/parity-ethereum/pull/9027))
|
||||
- Recently rejected cache for transaction queue ([#9005](https://github.com/paritytech/parity-ethereum/pull/9005))
|
||||
- Make HashDB generic ([#8739](https://github.com/paritytech/parity-ethereum/pull/8739))
|
||||
- Only return error log for rustls ([#9025](https://github.com/paritytech/parity-ethereum/pull/9025))
|
||||
- Update Changelogs for 1.10.8 and 1.11.5 ([#9012](https://github.com/paritytech/parity-ethereum/pull/9012))
|
||||
- Attempt to graceful shutdown in case of panics ([#8999](https://github.com/paritytech/parity-ethereum/pull/8999))
|
||||
- Simplify kvdb error types ([#8924](https://github.com/paritytech/parity-ethereum/pull/8924))
|
||||
- Add option for user to set max size limit for RPC requests ([#9010](https://github.com/paritytech/parity-ethereum/pull/9010))
|
||||
- Bump ntp to 0.5.0 ([#9009](https://github.com/paritytech/parity-ethereum/pull/9009))
|
||||
- Removed duplicate dependency ([#9021](https://github.com/paritytech/parity-ethereum/pull/9021))
|
||||
- Minimal effective gas price in the queue ([#8934](https://github.com/paritytech/parity-ethereum/pull/8934))
|
||||
- Parity: fix db path when migrating to blooms db ([#8975](https://github.com/paritytech/parity-ethereum/pull/8975))
|
||||
- Preserve the current abort behavior ([#8995](https://github.com/paritytech/parity-ethereum/pull/8995))
|
||||
- Improve should_replace on NonceAndGasPrice ([#8980](https://github.com/paritytech/parity-ethereum/pull/8980))
|
||||
- Tentative fix for missing dependency error ([#8973](https://github.com/paritytech/parity-ethereum/pull/8973))
|
||||
- Refactor evm Instruction to be a c-like enum ([#8914](https://github.com/paritytech/parity-ethereum/pull/8914))
|
||||
- Fix deadlock in blockchain. ([#8977](https://github.com/paritytech/parity-ethereum/pull/8977))
|
||||
- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 ([#8984](https://github.com/paritytech/parity-ethereum/pull/8984))
|
||||
- Use local parity-dapps-glue instead of crate published at crates.io ([#8983](https://github.com/paritytech/parity-ethereum/pull/8983))
|
||||
- Parity: omit redundant last imported block number in light sync informant ([#8962](https://github.com/paritytech/parity-ethereum/pull/8962))
|
||||
- Disable hardware-wallets on platforms that don't support `libusb` ([#8464](https://github.com/paritytech/parity-ethereum/pull/8464))
|
||||
- Bump error-chain and quick_error versions ([#8972](https://github.com/paritytech/parity-ethereum/pull/8972))
|
||||
- Evm benchmark utilities ([#8944](https://github.com/paritytech/parity-ethereum/pull/8944))
|
||||
- Parity: hide legacy options from cli --help ([#8967](https://github.com/paritytech/parity-ethereum/pull/8967))
|
||||
- Scripts: fix docker build tag on latest using master ([#8952](https://github.com/paritytech/parity-ethereum/pull/8952))
|
||||
- Add type for passwords. ([#8920](https://github.com/paritytech/parity-ethereum/pull/8920))
|
||||
- Deps: bump fs-swap ([#8953](https://github.com/paritytech/parity-ethereum/pull/8953))
|
||||
- Eliminate some more `transmute()` ([#8879](https://github.com/paritytech/parity-ethereum/pull/8879))
|
||||
- Restrict vault.json permssion to owner and using random suffix for temp vault.json file ([#8932](https://github.com/paritytech/parity-ethereum/pull/8932))
|
||||
- Print SS.self_public when starting SS node ([#8949](https://github.com/paritytech/parity-ethereum/pull/8949))
|
||||
- Scripts: minor improvements ([#8930](https://github.com/paritytech/parity-ethereum/pull/8930))
|
||||
- Rpc: cap gas limit of local calls ([#8943](https://github.com/paritytech/parity-ethereum/pull/8943))
|
||||
- Docs: update changelogs ([#8931](https://github.com/paritytech/parity-ethereum/pull/8931))
|
||||
- Ethcore: fix compilation when using slow-blocks or evm-debug features ([#8936](https://github.com/paritytech/parity-ethereum/pull/8936))
|
||||
- Fixed blooms dir creation ([#8941](https://github.com/paritytech/parity-ethereum/pull/8941))
|
||||
- Update hardcoded headers ([#8925](https://github.com/paritytech/parity-ethereum/pull/8925))
|
||||
- New blooms database ([#8712](https://github.com/paritytech/parity-ethereum/pull/8712))
|
||||
- Ethstore: retry deduplication of wallet file names until success ([#8910](https://github.com/paritytech/parity-ethereum/pull/8910))
|
||||
- Update ropsten.json ([#8926](https://github.com/paritytech/parity-ethereum/pull/8926))
|
||||
- Include node identity in the P2P advertised client version. ([#8830](https://github.com/paritytech/parity-ethereum/pull/8830))
|
||||
- Allow disabling local-by-default for transactions with new config entry ([#8882](https://github.com/paritytech/parity-ethereum/pull/8882))
|
||||
- Allow Poll Lifetime to be configured via CLI ([#8885](https://github.com/paritytech/parity-ethereum/pull/8885))
|
||||
- Cleanup nibbleslice ([#8915](https://github.com/paritytech/parity-ethereum/pull/8915))
|
||||
- Hardware-wallets `Clean up things I missed in the latest PR` ([#8890](https://github.com/paritytech/parity-ethereum/pull/8890))
|
||||
- Remove debian/.deb and centos/.rpm packaging scripts ([#8887](https://github.com/paritytech/parity-ethereum/pull/8887))
|
||||
- Remove a weird emoji in new_social docs ([#8913](https://github.com/paritytech/parity-ethereum/pull/8913))
|
||||
- Minor fix in chain supplier and light provider ([#8906](https://github.com/paritytech/parity-ethereum/pull/8906))
|
||||
- Block 0 is valid in queries ([#8891](https://github.com/paritytech/parity-ethereum/pull/8891))
|
||||
- Fixed osx permissions ([#8901](https://github.com/paritytech/parity-ethereum/pull/8901))
|
||||
- Atomic create new files with permissions to owner in ethstore ([#8896](https://github.com/paritytech/parity-ethereum/pull/8896))
|
||||
- Add ETC Cooperative-run load balanced parity node ([#8892](https://github.com/paritytech/parity-ethereum/pull/8892))
|
||||
- Add support for --chain tobalaba ([#8870](https://github.com/paritytech/parity-ethereum/pull/8870))
|
||||
- Fix some warns on nightly ([#8889](https://github.com/paritytech/parity-ethereum/pull/8889))
|
||||
- Add new ovh bootnodes and fix port for foundation bootnode 3.2 ([#8886](https://github.com/paritytech/parity-ethereum/pull/8886))
|
||||
- Secretstore: service pack 1 ([#8435](https://github.com/paritytech/parity-ethereum/pull/8435))
|
||||
- Handle removed logs in filter changes and add geth compatibility field ([#8796](https://github.com/paritytech/parity-ethereum/pull/8796))
|
||||
- Fixed ipc leak, closes [#8774](https://github.com/paritytech/parity-ethereum/issues/8774) ([#8876](https://github.com/paritytech/parity-ethereum/pull/8876))
|
||||
- Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity-ethereum/pull/8884))
|
||||
- Hardware_wallet/Ledger `Sign messages` + some refactoring ([#8868](https://github.com/paritytech/parity-ethereum/pull/8868))
|
||||
- Check whether we need resealing in miner and unwrap has_account in account_provider ([#8853](https://github.com/paritytech/parity-ethereum/pull/8853))
|
||||
- Docker: Fix alpine build ([#8878](https://github.com/paritytech/parity-ethereum/pull/8878))
|
||||
- Remove mac os installers etc ([#8875](https://github.com/paritytech/parity-ethereum/pull/8875))
|
||||
- Readme.md: update the list of dependencies ([#8864](https://github.com/paritytech/parity-ethereum/pull/8864))
|
||||
- Fix concurrent access to signer queue ([#8854](https://github.com/paritytech/parity-ethereum/pull/8854))
|
||||
- Tx permission contract improvement ([#8400](https://github.com/paritytech/parity-ethereum/pull/8400))
|
||||
- Limit the number of transactions in pending set ([#8777](https://github.com/paritytech/parity-ethereum/pull/8777))
|
||||
- Use sealing.enabled to emit eth_mining information ([#8844](https://github.com/paritytech/parity-ethereum/pull/8844))
|
||||
- Don't allocate in expect_valid_rlp unless necessary ([#8867](https://github.com/paritytech/parity-ethereum/pull/8867))
|
||||
- Fix Cli Return Code on --help for ethkey, ethstore & whisper ([#8863](https://github.com/paritytech/parity-ethereum/pull/8863))
|
||||
- Fix subcrate test compile ([#8862](https://github.com/paritytech/parity-ethereum/pull/8862))
|
||||
- Network-devp2p: downgrade logging to debug, add target ([#8784](https://github.com/paritytech/parity-ethereum/pull/8784))
|
||||
- Clearing up a comment about the prefix for signing ([#8828](https://github.com/paritytech/parity-ethereum/pull/8828))
|
||||
- Disable parallel verification and skip verifiying already imported txs. ([#8834](https://github.com/paritytech/parity-ethereum/pull/8834))
|
||||
- Devp2p: Move UDP socket handling from Discovery to Host. ([#8790](https://github.com/paritytech/parity-ethereum/pull/8790))
|
||||
- Fixed AuthorityRound deadlock on shutdown, closes [#8088](https://github.com/paritytech/parity-ethereum/issues/8088) ([#8803](https://github.com/paritytech/parity-ethereum/pull/8803))
|
||||
- Specify critical release flag per network ([#8821](https://github.com/paritytech/parity-ethereum/pull/8821))
|
||||
- Fix `deadlock_detection` feature branch compilation ([#8824](https://github.com/paritytech/parity-ethereum/pull/8824))
|
||||
- Use system allocator when profiling memory ([#8831](https://github.com/paritytech/parity-ethereum/pull/8831))
|
||||
- Added from and to to Receipt ([#8756](https://github.com/paritytech/parity-ethereum/pull/8756))
|
||||
- Ethcore: fix ancient block error msg handling ([#8832](https://github.com/paritytech/parity-ethereum/pull/8832))
|
||||
- Ci: Fix docker tags ([#8822](https://github.com/paritytech/parity-ethereum/pull/8822))
|
||||
- Parity: fix indentation in sync logging ([#8794](https://github.com/paritytech/parity-ethereum/pull/8794))
|
||||
- Removed obsolete IpcMode enum ([#8819](https://github.com/paritytech/parity-ethereum/pull/8819))
|
||||
- Remove UI related settings from CLI ([#8783](https://github.com/paritytech/parity-ethereum/pull/8783))
|
||||
- Remove windows tray and installer ([#8778](https://github.com/paritytech/parity-ethereum/pull/8778))
|
||||
- Docs: add changelogs for 1.10.6 and 1.11.3 ([#8810](https://github.com/paritytech/parity-ethereum/pull/8810))
|
||||
- Fix ancient blocks queue deadlock ([#8751](https://github.com/paritytech/parity-ethereum/pull/8751))
|
||||
- Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity-ethereum/pull/8802))
|
||||
- Fix evmbin compilation ([#8795](https://github.com/paritytech/parity-ethereum/pull/8795))
|
||||
- Have space between feature cfg flag ([#8791](https://github.com/paritytech/parity-ethereum/pull/8791))
|
||||
- Rpc: fix address formatting in TransactionRequest Display ([#8786](https://github.com/paritytech/parity-ethereum/pull/8786))
|
||||
- Conditionally compile ethcore public test helpers ([#8743](https://github.com/paritytech/parity-ethereum/pull/8743))
|
||||
- Remove Result wrapper from AccountProvider in RPC impls ([#8763](https://github.com/paritytech/parity-ethereum/pull/8763))
|
||||
- Update `license header` and `scripts` ([#8666](https://github.com/paritytech/parity-ethereum/pull/8666))
|
||||
- Remove HostTrait altogether ([#8681](https://github.com/paritytech/parity-ethereum/pull/8681))
|
||||
- Ethcore-sync: fix connection to peers behind chain fork block ([#8710](https://github.com/paritytech/parity-ethereum/pull/8710))
|
||||
- Remove public node settings from cli ([#8758](https://github.com/paritytech/parity-ethereum/pull/8758))
|
||||
- Custom Error Messages on ENFILE and EMFILE IO Errors ([#8744](https://github.com/paritytech/parity-ethereum/pull/8744))
|
||||
- Ci: Fixes for Android Pipeline ([#8745](https://github.com/paritytech/parity-ethereum/pull/8745))
|
||||
- Remove NetworkService::config() ([#8653](https://github.com/paritytech/parity-ethereum/pull/8653))
|
||||
- Fix XOR distance calculation in discovery Kademlia impl ([#8589](https://github.com/paritytech/parity-ethereum/pull/8589))
|
||||
- Print warnings when fetching pending blocks ([#8711](https://github.com/paritytech/parity-ethereum/pull/8711))
|
||||
- Fix PoW blockchains sealing notifications in chain_new_blocks ([#8656](https://github.com/paritytech/parity-ethereum/pull/8656))
|
||||
- Remove -k/--insecure option from curl installer ([#8719](https://github.com/paritytech/parity-ethereum/pull/8719))
|
||||
- Ease tiny-keccak version requirements (1.4.1 -> 1.4) ([#8726](https://github.com/paritytech/parity-ethereum/pull/8726))
|
||||
- Bump tinykeccak to 1.4 ([#8728](https://github.com/paritytech/parity-ethereum/pull/8728))
|
||||
- Remove a couple of unnecessary `transmute()` ([#8736](https://github.com/paritytech/parity-ethereum/pull/8736))
|
||||
- Fix some nits using clippy ([#8731](https://github.com/paritytech/parity-ethereum/pull/8731))
|
||||
- Add 'interface' option to cli ([#8699](https://github.com/paritytech/parity-ethereum/pull/8699))
|
||||
- Remove unused function new_pow_test_spec ([#8735](https://github.com/paritytech/parity-ethereum/pull/8735))
|
||||
- Add a deadlock detection thread ([#8727](https://github.com/paritytech/parity-ethereum/pull/8727))
|
||||
- Fix local transactions policy. ([#8691](https://github.com/paritytech/parity-ethereum/pull/8691))
|
||||
- Shutdown the Snapshot Service early ([#8658](https://github.com/paritytech/parity-ethereum/pull/8658))
|
||||
- Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity-ethereum/pull/8686))
|
||||
- Fix compilation error on nightly rust ([#8707](https://github.com/paritytech/parity-ethereum/pull/8707))
|
||||
- Add a test for decoding corrupt data ([#8713](https://github.com/paritytech/parity-ethereum/pull/8713))
|
||||
- Update dev chain ([#8717](https://github.com/paritytech/parity-ethereum/pull/8717))
|
||||
- Remove unused imports ([#8722](https://github.com/paritytech/parity-ethereum/pull/8722))
|
||||
- Implement recursive Debug for Nodes in patrica_trie::TrieDB ([#8697](https://github.com/paritytech/parity-ethereum/pull/8697))
|
||||
- Parity: trim whitespace when parsing duration strings ([#8692](https://github.com/paritytech/parity-ethereum/pull/8692))
|
||||
- Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity-ethereum/pull/8683))
|
||||
- Remove empty file ([#8705](https://github.com/paritytech/parity-ethereum/pull/8705))
|
||||
- Update mod.rs ([#8695](https://github.com/paritytech/parity-ethereum/pull/8695))
|
||||
- Use impl Future in the light client RPC helpers ([#8628](https://github.com/paritytech/parity-ethereum/pull/8628))
|
||||
- Fix cli signer ([#8682](https://github.com/paritytech/parity-ethereum/pull/8682))
|
||||
- Allow making direct RPC queries from the C API ([#8588](https://github.com/paritytech/parity-ethereum/pull/8588))
|
||||
- Remove the error when stopping the network ([#8671](https://github.com/paritytech/parity-ethereum/pull/8671))
|
||||
- Move connection_filter to the network crate ([#8674](https://github.com/paritytech/parity-ethereum/pull/8674))
|
||||
- Remove HostInfo::client_version() and secret() ([#8677](https://github.com/paritytech/parity-ethereum/pull/8677))
|
||||
- Refactor EIP150, EIP160 and EIP161 forks to be specified in CommonParams ([#8614](https://github.com/paritytech/parity-ethereum/pull/8614))
|
||||
- Parity: improve cli help and logging ([#8665](https://github.com/paritytech/parity-ethereum/pull/8665))
|
||||
- Updated tiny-keccak to 1.4.2 ([#8669](https://github.com/paritytech/parity-ethereum/pull/8669))
|
||||
- Remove the Keccak C library and use the pure Rust impl ([#8657](https://github.com/paritytech/parity-ethereum/pull/8657))
|
||||
- Remove HostInfo::next_nonce ([#8644](https://github.com/paritytech/parity-ethereum/pull/8644))
|
||||
- Fix not downloading old blocks ([#8642](https://github.com/paritytech/parity-ethereum/pull/8642))
|
||||
- Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity-ethereum/pull/8544))
|
||||
- Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity-ethereum/pull/8641))
|
||||
- Changelog for 1.10.4-stable and 1.11.1-beta ([#8637](https://github.com/paritytech/parity-ethereum/pull/8637))
|
||||
- Typo ([#8640](https://github.com/paritytech/parity-ethereum/pull/8640))
|
||||
- Fork choice and metadata framework for Engine ([#8401](https://github.com/paritytech/parity-ethereum/pull/8401))
|
||||
- Check that the Android build doesn't dep on c++_shared ([#8538](https://github.com/paritytech/parity-ethereum/pull/8538))
|
||||
- Remove NetworkContext::io_channel() ([#8625](https://github.com/paritytech/parity-ethereum/pull/8625))
|
||||
- Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity-ethereum/pull/8528))
|
||||
- Store morden db and keys in "path/to/parity/data/Morden" (ropsten uses "test", like before) ([#8621](https://github.com/paritytech/parity-ethereum/pull/8621))
|
||||
- ´main.rs´ typo ([#8629](https://github.com/paritytech/parity-ethereum/pull/8629))
|
||||
- Fix BlockReward contract "arithmetic operation overflow" ([#8611](https://github.com/paritytech/parity-ethereum/pull/8611))
|
||||
- Gitlab test script fixes ([#8573](https://github.com/paritytech/parity-ethereum/pull/8573))
|
||||
- Remove manually added text to the errors ([#8595](https://github.com/paritytech/parity-ethereum/pull/8595))
|
||||
- Fix account list double 0x display ([#8596](https://github.com/paritytech/parity-ethereum/pull/8596))
|
||||
- Typo: wrong indentation in kovan config ([#8610](https://github.com/paritytech/parity-ethereum/pull/8610))
|
||||
- Fix packet count when talking with PAR2 peers ([#8555](https://github.com/paritytech/parity-ethereum/pull/8555))
|
||||
- Use full qualified syntax for itertools::Itertools::flatten ([#8606](https://github.com/paritytech/parity-ethereum/pull/8606))
|
||||
- 2 tiny modification on snapshot ([#8601](https://github.com/paritytech/parity-ethereum/pull/8601))
|
||||
- Fix the mio test again ([#8602](https://github.com/paritytech/parity-ethereum/pull/8602))
|
||||
- Remove inject.js server-side injection for dapps ([#8539](https://github.com/paritytech/parity-ethereum/pull/8539))
|
||||
- Block_header can fail so return Result ([#8581](https://github.com/paritytech/parity-ethereum/pull/8581))
|
||||
- Block::decode() returns Result ([#8586](https://github.com/paritytech/parity-ethereum/pull/8586))
|
||||
- Fix compiler warning ([#8590](https://github.com/paritytech/parity-ethereum/pull/8590))
|
||||
- Fix Parity UI link ([#8600](https://github.com/paritytech/parity-ethereum/pull/8600))
|
||||
- Make mio optional in ethcore-io ([#8537](https://github.com/paritytech/parity-ethereum/pull/8537))
|
||||
- Attempt to fix intermittent test failures ([#8584](https://github.com/paritytech/parity-ethereum/pull/8584))
|
||||
- Changelog and Readme ([#8591](https://github.com/paritytech/parity-ethereum/pull/8591))
|
||||
- Added Dockerfile for alpine linux by @andresilva, closes [#3565](https://github.com/paritytech/parity-ethereum/issues/3565) ([#8587](https://github.com/paritytech/parity-ethereum/pull/8587))
|
||||
- Add whisper CLI to the pipelines ([#8578](https://github.com/paritytech/parity-ethereum/pull/8578))
|
||||
- Rename `whisper-cli binary` to `whisper` ([#8579](https://github.com/paritytech/parity-ethereum/pull/8579))
|
||||
- Changelog nit ([#8585](https://github.com/paritytech/parity-ethereum/pull/8585))
|
||||
- Remove unnecessary cloning in overwrite_with ([#8580](https://github.com/paritytech/parity-ethereum/pull/8580))
|
||||
- Handle socket address parsing errors ([#8545](https://github.com/paritytech/parity-ethereum/pull/8545))
|
||||
- Update CHANGELOG for 1.9, 1.10, and 1.11 ([#8556](https://github.com/paritytech/parity-ethereum/pull/8556))
|
||||
- Decoding headers can fail ([#8570](https://github.com/paritytech/parity-ethereum/pull/8570))
|
||||
- Refactoring `ethcore-sync` - Fixing warp-sync barrier ([#8543](https://github.com/paritytech/parity-ethereum/pull/8543))
|
||||
- Remove State::replace_backend ([#8569](https://github.com/paritytech/parity-ethereum/pull/8569))
|
||||
- Make trace-time publishable. ([#8568](https://github.com/paritytech/parity-ethereum/pull/8568))
|
||||
- Don't block sync when importing old blocks ([#8530](https://github.com/paritytech/parity-ethereum/pull/8530))
|
||||
- Trace precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity-ethereum/pull/8486))
|
||||
- Parity as a library ([#8412](https://github.com/paritytech/parity-ethereum/pull/8412))
|
||||
- Rlp decode returns Result ([#8527](https://github.com/paritytech/parity-ethereum/pull/8527))
|
||||
- Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity-ethereum/pull/8541))
|
||||
- Keep all enacted blocks notify in order ([#8524](https://github.com/paritytech/parity-ethereum/pull/8524))
|
||||
- Ethcore, rpc, machine: refactor block reward application and tracing ([#8490](https://github.com/paritytech/parity-ethereum/pull/8490))
|
||||
- Consolidate crypto functionality in `ethcore-crypto`. ([#8432](https://github.com/paritytech/parity-ethereum/pull/8432))
|
||||
- Eip 145: Bitwise shifting instructions in EVM ([#8451](https://github.com/paritytech/parity-ethereum/pull/8451))
|
||||
- Remove expect ([#8536](https://github.com/paritytech/parity-ethereum/pull/8536))
|
||||
- Don't panic in import_block if invalid rlp ([#8522](https://github.com/paritytech/parity-ethereum/pull/8522))
|
||||
- Pass on storage keys tracing to handle the case when it is not modified ([#8491](https://github.com/paritytech/parity-ethereum/pull/8491))
|
||||
- Fetching logs by hash in blockchain database ([#8463](https://github.com/paritytech/parity-ethereum/pull/8463))
|
||||
- Transaction Pool improvements ([#8470](https://github.com/paritytech/parity-ethereum/pull/8470))
|
||||
- More changes for Android ([#8421](https://github.com/paritytech/parity-ethereum/pull/8421))
|
||||
- Enable WebAssembly and Byzantium for Ellaism ([#8520](https://github.com/paritytech/parity-ethereum/pull/8520))
|
||||
- Secretstore: merge two types of errors into single one + Error::is_non_fatal ([#8357](https://github.com/paritytech/parity-ethereum/pull/8357))
|
||||
- Hardware Wallet trait ([#8071](https://github.com/paritytech/parity-ethereum/pull/8071))
|
||||
- Directly return None if tracing is disabled ([#8504](https://github.com/paritytech/parity-ethereum/pull/8504))
|
||||
- Show imported messages for light client ([#8517](https://github.com/paritytech/parity-ethereum/pull/8517))
|
||||
- Remove unused dependency `bigint` ([#8505](https://github.com/paritytech/parity-ethereum/pull/8505))
|
||||
- `duration_ns: u64 -> duration: Duration` ([#8457](https://github.com/paritytech/parity-ethereum/pull/8457))
|
||||
- Return error if RLP size of transaction exceeds the limit ([#8473](https://github.com/paritytech/parity-ethereum/pull/8473))
|
||||
- Remove three old warp boot nodes. ([#8497](https://github.com/paritytech/parity-ethereum/pull/8497))
|
||||
- Update wasmi and pwasm-utils ([#8493](https://github.com/paritytech/parity-ethereum/pull/8493))
|
||||
- Update hardcodedSync for Ethereum, Kovan, and Ropsten ([#8489](https://github.com/paritytech/parity-ethereum/pull/8489))
|
||||
- Fix snap builds ([#8483](https://github.com/paritytech/parity-ethereum/pull/8483))
|
||||
- Bump master to 1.12 ([#8477](https://github.com/paritytech/parity-ethereum/pull/8477))
|
||||
- Don't require write lock when fetching status. ([#8481](https://github.com/paritytech/parity-ethereum/pull/8481))
|
||||
- Use rename_all for RichBlock and RichHeader serialization ([#8471](https://github.com/paritytech/parity-ethereum/pull/8471))
|
||||
|
||||
## Previous releases
|
||||
|
||||
- [CHANGELOG-1.11](docs/CHANGELOG-1.11.md) (_stable_)
|
||||
- [CHANGELOG-1.10](docs/CHANGELOG-1.10.md) (EOL: 2018-07-18)
|
||||
- [CHANGELOG-1.9](docs/CHANGELOG-1.9.md) (EOL: 2018-05-09)
|
||||
- [CHANGELOG-1.8](docs/CHANGELOG-1.8.md) (EOL: 2018-03-22)
|
||||
- [CHANGELOG-1.7](docs/CHANGELOG-1.7.md) (EOL: 2018-01-25)
|
||||
- [CHANGELOG-1.6](docs/CHANGELOG-1.6.md) (EOL: 2017-10-15)
|
||||
- [CHANGELOG-1.5](docs/CHANGELOG-1.5.md) (EOL: 2017-07-28)
|
||||
- [CHANGELOG-1.4](docs/CHANGELOG-1.4.md) (EOL: 2017-03-13)
|
||||
- [CHANGELOG-1.3](docs/CHANGELOG-1.3.md) (EOL: 2017-01-19)
|
||||
- [CHANGELOG-1.2](docs/CHANGELOG-1.2.md) (EOL: 2016-11-07)
|
||||
- [CHANGELOG-1.1](docs/CHANGELOG-1.1.md) (EOL: 2016-08-12)
|
||||
- [CHANGELOG-1.0](docs/CHANGELOG-1.0.md) (EOL: 2016-06-24)
|
||||
- [CHANGELOG-0.9](docs/CHANGELOG-0.9.md) (EOL: 2016-05-02)
|
||||
4298
Cargo.lock
generated
4298
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
161
Cargo.toml
161
Cargo.toml
@@ -1,144 +1,45 @@
|
||||
[package]
|
||||
description = "Parity Ethereum client"
|
||||
name = "parity-ethereum"
|
||||
# NOTE Make sure to update util/version/Cargo.toml as well
|
||||
version = "2.1.7"
|
||||
description = "Ethcore client."
|
||||
name = "parity"
|
||||
version = "1.0.2"
|
||||
license = "GPL-3.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
blooms-db = { path = "util/blooms-db" }
|
||||
log = "0.4"
|
||||
env_logger = "0.5"
|
||||
rustc-hex = "1.0"
|
||||
docopt = "0.8"
|
||||
clap = "2"
|
||||
term_size = "0.3"
|
||||
textwrap = "0.9"
|
||||
num_cpus = "1.2"
|
||||
number_prefix = "0.2"
|
||||
rpassword = "1.0"
|
||||
semver = "0.9"
|
||||
ansi_term = "0.10"
|
||||
parking_lot = "0.6"
|
||||
regex = "0.2"
|
||||
atty = "0.2.8"
|
||||
toml = "0.4"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
serde_derive = "1.0"
|
||||
futures = "0.1"
|
||||
futures-cpupool = "0.1"
|
||||
fdlimit = "0.1"
|
||||
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
|
||||
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" }
|
||||
ethcore = { path = "ethcore", features = ["parity"] }
|
||||
parity-bytes = "0.1"
|
||||
ethcore-io = { path = "util/io" }
|
||||
ethcore-light = { path = "ethcore/light" }
|
||||
ethcore-logger = { path = "logger" }
|
||||
ethcore-miner = { path = "miner" }
|
||||
ethcore-network = { path = "util/network" }
|
||||
ethcore-private-tx = { path = "ethcore/private-tx" }
|
||||
ethcore-service = { path = "ethcore/service" }
|
||||
ethcore-sync = { path = "ethcore/sync" }
|
||||
ethcore-transaction = { path = "ethcore/transaction" }
|
||||
ethereum-types = "0.4"
|
||||
node-filter = { path = "ethcore/node_filter" }
|
||||
ethkey = { path = "ethkey" }
|
||||
rlp = { version = "0.2.4", features = ["ethereum"] }
|
||||
rpc-cli = { path = "rpc_cli" }
|
||||
parity-hash-fetch = { path = "hash-fetch" }
|
||||
parity-ipfs-api = { path = "ipfs" }
|
||||
parity-local-store = { path = "local-store" }
|
||||
parity-reactor = { path = "util/reactor" }
|
||||
parity-rpc = { path = "rpc" }
|
||||
parity-rpc-client = { path = "rpc_client" }
|
||||
parity-updater = { path = "updater" }
|
||||
parity-version = { path = "util/version" }
|
||||
parity-whisper = { path = "whisper" }
|
||||
parity-path = "0.1"
|
||||
dir = { path = "util/dir" }
|
||||
panic_hook = { path = "util/panic_hook" }
|
||||
keccak-hash = "0.1"
|
||||
migration-rocksdb = { path = "util/migration-rocksdb" }
|
||||
kvdb = "0.1"
|
||||
kvdb-rocksdb = "0.1.3"
|
||||
journaldb = { path = "util/journaldb" }
|
||||
mem = { path = "util/mem" }
|
||||
|
||||
ethcore-secretstore = { path = "secret_store", optional = true }
|
||||
|
||||
registrar = { path = "registrar" }
|
||||
authors = ["Ethcore <admin@ethcore.io>"]
|
||||
build = "build.rs"
|
||||
|
||||
[build-dependencies]
|
||||
rustc_version = "0.2"
|
||||
rustc_version = "0.1"
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "0.1"
|
||||
ipnetwork = "0.12.6"
|
||||
tempdir = "0.3"
|
||||
fake-fetch = { path = "util/fake-fetch" }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = { version = "0.3.4", features = ["winsock2", "winuser", "shellapi"] }
|
||||
|
||||
[target.'cfg(not(windows))'.dependencies]
|
||||
daemonize = { git = "https://github.com/paritytech/daemonize" }
|
||||
[dependencies]
|
||||
log = "0.3"
|
||||
env_logger = "0.3"
|
||||
rustc-serialize = "0.3"
|
||||
docopt = "0.6"
|
||||
time = "0.1"
|
||||
ctrlc = { git = "https://github.com/tomusdrw/rust-ctrlc.git" }
|
||||
fdlimit = { path = "util/fdlimit" }
|
||||
daemonize = "0.2"
|
||||
num_cpus = "0.2"
|
||||
number_prefix = "0.2"
|
||||
rpassword = "0.1"
|
||||
clippy = { version = "0.0.54", optional = true }
|
||||
ethcore = { path = "ethcore" }
|
||||
ethcore-util = { path = "util" }
|
||||
ethsync = { path = "sync" }
|
||||
ethminer = { path = "miner" }
|
||||
ethcore-devtools = { path = "devtools" }
|
||||
ethcore-rpc = { path = "rpc", optional = true }
|
||||
|
||||
[features]
|
||||
miner-debug = ["ethcore/miner-debug"]
|
||||
json-tests = ["ethcore/json-tests"]
|
||||
test-heavy = ["ethcore/test-heavy"]
|
||||
evm-debug = ["ethcore/evm-debug"]
|
||||
evm-debug-tests = ["ethcore/evm-debug-tests"]
|
||||
slow-blocks = ["ethcore/slow-blocks"]
|
||||
secretstore = ["ethcore-secretstore"]
|
||||
final = ["parity-version/final"]
|
||||
deadlock_detection = ["parking_lot/deadlock_detection"]
|
||||
# to create a memory profile (requires nightly rust), use e.g.
|
||||
# `heaptrack /path/to/parity <parity params>`,
|
||||
# to visualize a memory profile, use `heaptrack_gui`
|
||||
# or
|
||||
# `valgrind --tool=massif /path/to/parity <parity params>`
|
||||
# and `massif-visualizer` for visualization
|
||||
memory_profiling = []
|
||||
# hardcode version number 1.3.7 of parity to force an update
|
||||
# in order to manually test that parity fall-over to the local version
|
||||
# in case of invalid or deprecated command line arguments are entered
|
||||
test-updater = ["parity-updater/test-updater"]
|
||||
|
||||
[lib]
|
||||
path = "parity/lib.rs"
|
||||
default = ["rpc"]
|
||||
rpc = ["ethcore-rpc"]
|
||||
dev = ["clippy", "ethcore/dev", "ethcore-util/dev", "ethsync/dev", "ethcore-rpc/dev", "ethminer/dev"]
|
||||
travis-beta = ["ethcore/json-tests"]
|
||||
travis-nightly = ["ethcore/json-tests", "dev"]
|
||||
|
||||
[[bin]]
|
||||
path = "parity/main.rs"
|
||||
name = "parity"
|
||||
|
||||
[profile.dev]
|
||||
|
||||
[profile.release]
|
||||
debug = false
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
"chainspec",
|
||||
"ethcore/wasm/run",
|
||||
"ethcore/types",
|
||||
"ethkey/cli",
|
||||
"ethstore/cli",
|
||||
"evmbin",
|
||||
"miner",
|
||||
"parity-clib",
|
||||
"whisper",
|
||||
"whisper/cli",
|
||||
"util/triehash-ethereum",
|
||||
"util/keccak-hasher",
|
||||
"util/patricia-trie-ethereum",
|
||||
"util/fastmap",
|
||||
]
|
||||
|
||||
[patch.crates-io]
|
||||
ring = { git = "https://github.com/paritytech/ring" }
|
||||
tokio-proto = { git = "https://github.com/tokio-rs/tokio-proto.git", rev = "56c720e" }
|
||||
untrusted = { git = "https://github.com/paritytech/untrusted", branch = "0.5" }
|
||||
lto = false
|
||||
|
||||
167
README.md
167
README.md
@@ -1,155 +1,40 @@
|
||||

|
||||
# ethcore
|
||||
|
||||
## The fastest and most advanced Ethereum client.
|
||||
[![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Join the chat at https://gitter.im/trogdoro/xiki][gitter-image]][gitter-url] [![GPLv3][license-image]][license-url]
|
||||
|
||||
<p align="center"><strong><a href="https://github.com/paritytech/parity-ethereum/releases/latest">» Download the latest release «</a></strong></p>
|
||||
[travis-image]: https://travis-ci.org/ethcore/parity.svg?branch=master
|
||||
[travis-url]: https://travis-ci.org/ethcore/parity
|
||||
[coveralls-image]: https://coveralls.io/repos/github/ethcore/parity/badge.svg?branch=master
|
||||
[coveralls-url]: https://coveralls.io/github/ethcore/parity?branch=master
|
||||
[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
|
||||
[gitter-url]: https://gitter.im/ethcore/parity?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
||||
[license-image]: https://img.shields.io/badge/license-GPL%20v3-green.svg
|
||||
[license-url]: http://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
<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>
|
||||
[Documentation](http://ethcore.github.io/parity/ethcore/index.html)
|
||||
|
||||
**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.
|
||||
### Building from source
|
||||
|
||||
- Clean, modular codebase for easy customisation
|
||||
- Advanced CLI-based client
|
||||
- Minimal memory and storage footprint
|
||||
- Synchronise in hours, not days with Warp Sync
|
||||
- Modular for light integration into your service or product
|
||||
|
||||
## Technical Overview
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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).
|
||||
|
||||
Parity Ethereum's current beta-release is 2.1. 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.
|
||||
|
||||
## Build Dependencies
|
||||
|
||||
Parity Ethereum requires **Rust version 1.29.x** to build.
|
||||
|
||||
We recommend installing Rust through [rustup](https://www.rustup.rs/). If you don't already have `rustup`, you can install it like this:
|
||||
First (if you don't already have it) get multirust:
|
||||
|
||||
- Linux:
|
||||
```bash
|
||||
$ curl https://sh.rustup.rs -sSf | sh
|
||||
```
|
||||
```bash
|
||||
curl -sf https://raw.githubusercontent.com/brson/multirust/master/quick-install.sh | sudo sh -s -- --yes
|
||||
```
|
||||
|
||||
Parity Ethereum also requires `gcc`, `g++`, `libudev-dev`, `pkg-config`, `file`, `make`, and `cmake` packages to be installed.
|
||||
- OSX with Homebrew:
|
||||
```bash
|
||||
brew update && brew install multirust
|
||||
multirust default stable
|
||||
```
|
||||
|
||||
- OSX:
|
||||
```bash
|
||||
$ curl https://sh.rustup.rs -sSf | sh
|
||||
```
|
||||
|
||||
`clang` is required. It comes with Xcode command line tools or can be installed with homebrew.
|
||||
|
||||
- Windows
|
||||
Make sure you have Visual Studio 2015 with C++ support installed. Next, download and run the `rustup` installer from
|
||||
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:
|
||||
```bash
|
||||
$ rustup default stable-x86_64-pc-windows-msvc
|
||||
```
|
||||
|
||||
Once you have `rustup` installed, then you need to install:
|
||||
* [Perl](https://www.perl.org)
|
||||
* [Yasm](https://yasm.tortall.net)
|
||||
|
||||
Make sure that these binaries are in your `PATH`. After that, you should be able to build Parity Ethereum from source.
|
||||
|
||||
## Build from Source Code
|
||||
Then, download and build Parity:
|
||||
|
||||
```bash
|
||||
# download Parity Ethereum code
|
||||
$ git clone https://github.com/paritytech/parity-ethereum
|
||||
$ cd parity-ethereum
|
||||
# download Parity code
|
||||
git clone https://github.com/ethcore/parity
|
||||
cd parity
|
||||
|
||||
# build in release mode
|
||||
$ cargo build --release --features final
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
This produces an executable in the `./target/release` subdirectory.
|
||||
|
||||
Note: if cargo fails to parse manifest try:
|
||||
|
||||
```bash
|
||||
$ ~/.cargo/bin/cargo build --release
|
||||
```
|
||||
|
||||
Note, when compiling a crate and you receive errors, it's in most cases your outdated version of Rust, or some of your crates have to be recompiled. Cleaning the repository will most likely solve the issue if you are on the latest stable version of Rust, try:
|
||||
|
||||
```bash
|
||||
$ cargo clean
|
||||
```
|
||||
|
||||
This always compiles the latest nightly builds. If you want to build stable or beta, do a
|
||||
|
||||
```bash
|
||||
$ git checkout stable
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
$ git checkout beta
|
||||
```
|
||||
|
||||
## Simple One-Line Installer for Mac and Linux
|
||||
|
||||
```bash
|
||||
bash <(curl https://get.parity.io -L)
|
||||
```
|
||||
|
||||
The one-line installer always defaults to the latest beta release. To install a stable release, run:
|
||||
|
||||
```bash
|
||||
bash <(curl https://get.parity.io -L) -r stable
|
||||
```
|
||||
|
||||
## Start Parity Ethereum
|
||||
|
||||
### Manually
|
||||
|
||||
To start Parity Ethereum manually, just run
|
||||
|
||||
```bash
|
||||
$ ./target/release/parity
|
||||
```
|
||||
|
||||
so Parity Ethereum begins syncing the Ethereum blockchain.
|
||||
|
||||
### Using `systemd` service file
|
||||
|
||||
To start Parity Ethereum as a regular user using `systemd` init:
|
||||
|
||||
1. Copy `./scripts/parity.service` to your
|
||||
`systemd` user directory (usually `~/.config/systemd/user`).
|
||||
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.
|
||||
|
||||
## Parity Ethereum toolchain
|
||||
|
||||
In addition to the Parity Ethereum client, there are additional tools in this repository available:
|
||||
|
||||
- [evmbin](https://github.com/paritytech/parity-ethereum/blob/master/evmbin/) - EVM implementation for Parity Ethereum.
|
||||
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum function calls encoding.
|
||||
- [ethstore](https://github.com/paritytech/parity-ethereum/blob/master/ethstore/) - Parity Ethereum key management.
|
||||
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/ethkey/) - Parity Ethereum keys generator.
|
||||
- [whisper](https://github.com/paritytech/parity-ethereum/blob/master/whisper/) - Implementation of Whisper-v2 PoC.
|
||||
|
||||
## Join the chat!
|
||||
|
||||
Questions? Get in touch with us on Gitter:
|
||||
[](https://gitter.im/paritytech/parity)
|
||||
[](https://gitter.im/paritytech/parity.js)
|
||||
[](https://gitter.im/paritytech/parity/miners)
|
||||
[](https://gitter.im/paritytech/parity-poa)
|
||||
|
||||
Alternatively, join our community on Matrix:
|
||||
[](https://riot.im/app/#/group/+parity:matrix.parity.io)
|
||||
|
||||
## Documentation
|
||||
|
||||
Official website: https://parity.io
|
||||
|
||||
Be sure to [check out our wiki](https://wiki.parity.io) for more information.
|
||||
|
||||
80
SECURITY.md
80
SECURITY.md
@@ -1,80 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
Parity Technologies is committed to resolving security vulnerabilities in our software quickly and carefully. We take the necessary steps to minimize risk, provide timely information, and deliver vulnerability fixes and mitigations required to address security issues.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Security vulnerabilities in Parity software should be reported by email to security@parity.io. If you think your report might be eligible for the Parity Bug Bounty Program, your email should be send to bugbounty@parity.io.
|
||||
|
||||
Your report should include the following:
|
||||
|
||||
- your name
|
||||
- description of the vulnerability
|
||||
- attack scenario (if any)
|
||||
- components
|
||||
- reproduction
|
||||
- other details
|
||||
|
||||
Try to include as much information in your report as you can, including a description of the vulnerability, its potential impact, and steps for reproducing it. Be sure to use a descriptive subject line.
|
||||
|
||||
You'll receive a response to your email within two business days indicating the next steps in handling your report. We encourage finders to use encrypted communication channels to protect the confidentiality of vulnerability reports. You can encrypt your report using our public key. This key is [on MIT's key server](https://pgp.mit.edu/pks/lookup?op=get&search=0x5D0F03018D07DE73) server and reproduced below.
|
||||
|
||||
After the initial reply to your report, our team will endeavor to keep you informed of the progress being made towards a fix. These updates will be sent at least every five business days.
|
||||
|
||||
Thank you for taking the time to responsibly disclose any vulnerabilities you find.
|
||||
|
||||
## Responsible Investigation and Reporting
|
||||
|
||||
Responsible investigation and reporting includes, but isn't limited to, the following:
|
||||
|
||||
- Don't violate the privacy of other users, destroy data, etc.
|
||||
- Don’t defraud or harm Parity Technologies Ltd or its users during your research; you should make a good faith effort to not interrupt or degrade our services.
|
||||
- Don't target our physical security measures, or attempt to use social engineering, spam, distributed denial of service (DDOS) attacks, etc.
|
||||
- Initially report the bug only to us and not to anyone else.
|
||||
- Give us a reasonable amount of time to fix the bug before disclosing it to anyone else, and give us adequate written warning before disclosing it to anyone else.
|
||||
- In general, please investigate and report bugs in a way that makes a reasonable, good faith effort not to be disruptive or harmful to us or our users. Otherwise your actions might be interpreted as an attack rather than an effort to be helpful.
|
||||
|
||||
## Bug Bounty Program
|
||||
|
||||
Our Bug Bounty Program allows us to recognise and reward members of the Parity community for helping us find and address significant bugs, in accordance with the terms of the Parity Bug Bounty Program. A detailed description on eligibility, rewards, legal information and terms & conditions for contributors can be found on [our website](https://paritytech.io/bug-bounty.html).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Plaintext PGP Key
|
||||
|
||||
```
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQENBFlyIAwBCACe0keNPjgYzZ1Oy/8t3zj/Qw9bHHqrzx7FWy8NbXnYBM19NqOZ
|
||||
DIP7Oe0DvCaf/uruBskCS0iVstHlEFQ2AYe0Ei0REt9lQdy61GylU/DEB3879IG+
|
||||
6FO0SnFeYeerv1/hFI2K6uv8v7PyyVDiiJSW0I1KIs2OBwJicTKmWxLAeQsRgx9G
|
||||
yRGalrVk4KP+6pWTA7k3DxmDZKZyfYV/Ej10NtuzmsemwDbv98HKeomp/kgFOfSy
|
||||
3AZjeCpctlsNqpjUuXa0/HudmH2WLxZ0fz8XeoRh8XM9UudNIecjrDqmAFrt/btQ
|
||||
/3guvlzhFCdhYPVGsUusKMECk/JG+Xx1/1ZjABEBAAG0LFBhcml0eSBTZWN1cml0
|
||||
eSBDb250YWN0IDxzZWN1cml0eUBwYXJpdHkuaW8+iQFUBBMBCAA+FiEE2uUVYCjP
|
||||
N6B8aTiDXQ8DAY0H3nMFAllyIAwCGwMFCQPCZwAFCwkIBwIGFQgJCgsCBBYCAwEC
|
||||
HgECF4AACgkQXQ8DAY0H3nM60wgAkS3A36Zc+upiaxU7tumcGv+an17j7gin0sif
|
||||
+0ELSjVfrXInM6ovai+NhUdcLkJ7tCrKS90fvlaELK5Sg9CXBWCTFccKN4A/B7ey
|
||||
rOg2NPXUecnyBB/XqQgKYH7ujYlOlqBDXMfz6z8Hj6WToxg9PPMGGomyMGh8AWxM
|
||||
3yRPFs5RKt0VKgN++5N00oly5Y8ri5pgCidDvCLYMGTVDHFKwkuc9w6BlWlu1R1e
|
||||
/hXFWUFAP1ffTAul3QwyKhjPn2iotCdxXjvt48KaU8DN4iL7aMBN/ZBKqGS7yRdF
|
||||
D/JbJyaaJ0ZRvFSTSXy/sWY3z1B5mtCPBxco8hqqNfRkCwuZ6LkBDQRZciAMAQgA
|
||||
8BP8xrwe12TOUTqL/Vrbxv/FLdhKh53J6TrPKvC2TEEKOrTNo5ahRq+XOS5E7G2N
|
||||
x3b+fq8gR9BzFcldAx0XWUtGs/Wv++ulaSNqTBxj13J3G3WGsUfMKxRgj//piCUD
|
||||
bCFLQfGZdKk0M1o9QkPVARwwmvCNiNB/l++xGqPtfc44H5jWj3GoGvL2MkShPzrN
|
||||
yN/bJ+m+R5gtFGdInqa5KXBuxxuW25eDKJ+LzjbgUgeC76wNcfOiQHTdMkcupjdO
|
||||
bbGFwo10hcbRAOcZEv6//Zrlmk/6nPxEd2hN20St2bSN0+FqfZ267mWEu3ejsgF8
|
||||
ArdCpv5h4fBvJyNwiTZwIQARAQABiQE8BBgBCAAmFiEE2uUVYCjPN6B8aTiDXQ8D
|
||||
AY0H3nMFAllyIAwCGwwFCQPCZwAACgkQXQ8DAY0H3nNisggAl4fqhRlA34wIb190
|
||||
sqXHVxiCuzPaqS6krE9xAa1+gncX485OtcJNqnjugHm2rFE48lv7oasviuPXuInE
|
||||
/OgVFnXYv9d/Xx2JUeDs+bFTLouCDRY2Unh7KJZasfqnMcCHWcxHx5FvRNZRssaB
|
||||
WTZVo6sizPurGUtbpYe4/OLFhadBqAE0EUmVRFEUMc1YTnu4eLaRBzoWN4d2UWwi
|
||||
LN25RSrVSke7LTSFbgn9ntQrQ2smXSR+cdNkkfRCjFcpUaecvFl9HwIqoyVbT4Ym
|
||||
0hbpbbX/cJdc91tKa+psa29uMeGL/cgL9fAu19yNFRyOTMxjZnvql1X/WE1pLmoP
|
||||
ETBD1Q==
|
||||
=K9Qw
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
```
|
||||
6
add_license.sh
Executable file
6
add_license.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
for f in $(find . -name '*.rs'); do
|
||||
cat license_header $f > $f.new
|
||||
mv $f.new $f
|
||||
done
|
||||
25
build.rs
Normal file
25
build.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
extern crate rustc_version;
|
||||
|
||||
use rustc_version::{version_meta, Channel};
|
||||
|
||||
fn main() {
|
||||
if let Channel::Nightly = version_meta().channel {
|
||||
println!("cargo:rustc-cfg=nightly");
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
[package]
|
||||
name = "chainspec"
|
||||
version = "0.1.0"
|
||||
authors = ["Marek Kotewicz <marek@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
ethjson = { path = "../json" }
|
||||
serde_json = "1.0"
|
||||
serde_ignored = "0.0.4"
|
||||
@@ -1,64 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
extern crate serde_json;
|
||||
extern crate serde_ignored;
|
||||
extern crate ethjson;
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
use std::{fs, env, process};
|
||||
use ethjson::spec::Spec;
|
||||
|
||||
fn quit(s: &str) -> ! {
|
||||
println!("{}", s);
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut args = env::args();
|
||||
if args.len() != 2 {
|
||||
quit("You need to specify chainspec.json\n\
|
||||
\n\
|
||||
./chainspec <chainspec.json>");
|
||||
}
|
||||
|
||||
let path = args.nth(1).expect("args.len() == 2; qed");
|
||||
let file = match fs::File::open(&path) {
|
||||
Ok(file) => file,
|
||||
Err(_) => quit(&format!("{} could not be opened", path)),
|
||||
};
|
||||
|
||||
let mut unused = BTreeSet::new();
|
||||
let mut deserializer = serde_json::Deserializer::from_reader(file);
|
||||
|
||||
let spec: Result<Spec, _> = serde_ignored::deserialize(&mut deserializer, |field| {
|
||||
unused.insert(field.to_string());
|
||||
});
|
||||
|
||||
if let Err(err) = spec {
|
||||
quit(&format!("{} {}", path, err.to_string()));
|
||||
}
|
||||
|
||||
if !unused.is_empty() {
|
||||
let err = unused.into_iter()
|
||||
.map(|field| format!("{} unexpected field `{}`", path, field))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
quit(&err);
|
||||
}
|
||||
|
||||
println!("{} is valid", path);
|
||||
}
|
||||
37
cov.sh
Executable file
37
cov.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
# Installing KCOV under ubuntu
|
||||
# https://users.rust-lang.org/t/tutorial-how-to-collect-test-coverages-for-rust-project/650#
|
||||
### Install deps
|
||||
# $ sudo apt-get install libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
|
||||
#
|
||||
### Compile kcov
|
||||
# $ wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && tar xf master.tar.gz
|
||||
# $ cd kcov-master && mkdir build && cd build
|
||||
# $ cmake .. && make && sudo make install
|
||||
|
||||
### Running coverage
|
||||
if ! type kcov > /dev/null; then
|
||||
echo "Install kcov first (details inside this file). Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cargo test \
|
||||
-p ethash \
|
||||
-p ethcore-util \
|
||||
-p ethcore \
|
||||
-p ethsync \
|
||||
-p ethcore-rpc \
|
||||
-p parity \
|
||||
-p ethminer \
|
||||
--no-run || exit $?
|
||||
rm -rf target/coverage
|
||||
mkdir -p target/coverage
|
||||
|
||||
EXCLUDE="~/.multirust,rocksdb,secp256k1,src/tests,util/json-tests,util/src/network/tests,sync/src/tests,ethcore/src/tests,ethcore/src/evm/tests"
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethcore-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethash-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethcore_util-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethsync-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethcore_rpc-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethminer-*
|
||||
xdg-open target/coverage/index.html
|
||||
@@ -1,7 +1,16 @@
|
||||
[package]
|
||||
description = "Ethcore development/test/build tools"
|
||||
homepage = "http://parity.io"
|
||||
homepage = "http://ethcore.io"
|
||||
license = "GPL-3.0"
|
||||
name = "ethcore-devtools"
|
||||
version = "1.12.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
version = "1.0.0"
|
||||
authors = ["Ethcore <admin@ethcore.io>"]
|
||||
|
||||
[dependencies]
|
||||
rand = "0.3"
|
||||
|
||||
[features]
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
test = true
|
||||
|
||||
1
devtools/README.md
Normal file
1
devtools/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# ethcore dev tools
|
||||
@@ -1,132 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::str::{self, Lines};
|
||||
use std::net::{TcpStream, SocketAddr};
|
||||
|
||||
pub struct Response {
|
||||
pub status: String,
|
||||
pub headers: Vec<String>,
|
||||
pub headers_raw: String,
|
||||
pub body: String,
|
||||
}
|
||||
|
||||
impl Response {
|
||||
pub fn assert_header(&self, header: &str, value: &str) {
|
||||
let header = format!("{}: {}", header, value);
|
||||
assert!(self.headers.iter().find(|h| *h == &header).is_some(), "Couldn't find header {} in {:?}", header, &self.headers)
|
||||
}
|
||||
|
||||
pub fn assert_status(&self, status: &str) {
|
||||
assert_eq!(self.status, status.to_owned(), "Got unexpected code. Body: {:?}", self.body);
|
||||
}
|
||||
|
||||
pub fn assert_security_headers_present(&self, port: Option<u16>) {
|
||||
assert_security_headers_present(&self.headers, port)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn read_block(lines: &mut Lines, all: bool) -> String {
|
||||
let mut block = String::new();
|
||||
loop {
|
||||
let line = lines.next();
|
||||
match line {
|
||||
None => break,
|
||||
Some("") if !all => break,
|
||||
Some(v) => {
|
||||
block.push_str(v);
|
||||
block.push_str("\n");
|
||||
},
|
||||
}
|
||||
}
|
||||
block
|
||||
}
|
||||
|
||||
fn connect(address: &SocketAddr) -> TcpStream {
|
||||
let mut retries = 0;
|
||||
let mut last_error = None;
|
||||
while retries < 10 {
|
||||
retries += 1;
|
||||
|
||||
let res = TcpStream::connect(address);
|
||||
match res {
|
||||
Ok(stream) => {
|
||||
return stream;
|
||||
},
|
||||
Err(e) => {
|
||||
last_error = Some(e);
|
||||
thread::sleep(Duration::from_millis(retries * 10));
|
||||
}
|
||||
}
|
||||
}
|
||||
panic!("Unable to connect to the server. Last error: {:?}", last_error);
|
||||
}
|
||||
|
||||
pub fn request(address: &SocketAddr, request: &str) -> Response {
|
||||
let mut req = connect(address);
|
||||
req.set_read_timeout(Some(Duration::from_secs(2))).unwrap();
|
||||
req.write_all(request.as_bytes()).unwrap();
|
||||
|
||||
let mut response = Vec::new();
|
||||
loop {
|
||||
let mut chunk = [0; 32 *1024];
|
||||
match req.read(&mut chunk) {
|
||||
Err(ref err) if err.kind() == io::ErrorKind::WouldBlock => break,
|
||||
Err(err) => panic!("Unable to read response: {:?}", err),
|
||||
Ok(0) => break,
|
||||
Ok(read) => response.extend_from_slice(&chunk[..read]),
|
||||
}
|
||||
}
|
||||
|
||||
let response = String::from_utf8_lossy(&response).into_owned();
|
||||
let mut lines = response.lines();
|
||||
let status = lines.next().expect("Expected a response").to_owned();
|
||||
let headers_raw = read_block(&mut lines, false);
|
||||
let headers = headers_raw.split('\n').map(|v| v.to_owned()).collect();
|
||||
let body = read_block(&mut lines, true);
|
||||
|
||||
Response {
|
||||
status: status,
|
||||
headers: headers,
|
||||
headers_raw: headers_raw,
|
||||
body: body,
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if all required security headers are present
|
||||
pub fn assert_security_headers_present(headers: &[String], port: Option<u16>) {
|
||||
if let None = port {
|
||||
assert!(
|
||||
headers.iter().find(|header| header.as_str() == "X-Frame-Options: SAMEORIGIN").is_some(),
|
||||
"X-Frame-Options: SAMEORIGIN missing: {:?}", headers
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
headers.iter().find(|header| header.as_str() == "X-XSS-Protection: 1; mode=block").is_some(),
|
||||
"X-XSS-Protection missing: {:?}", headers
|
||||
);
|
||||
assert!(
|
||||
headers.iter().find(|header| header.as_str() == "X-Content-Type-Options: nosniff").is_some(),
|
||||
"X-Content-Type-Options missing: {:?}", headers
|
||||
);
|
||||
assert!(
|
||||
headers.iter().find(|header| header.starts_with("Content-Security-Policy: ")).is_some(),
|
||||
"Content-Security-Policy missing: {:?}", headers
|
||||
)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
@@ -16,4 +16,9 @@
|
||||
|
||||
//! dev-tools
|
||||
|
||||
pub mod http_client;
|
||||
|
||||
extern crate rand;
|
||||
|
||||
pub mod random_path;
|
||||
|
||||
pub use random_path::*;
|
||||
|
||||
89
devtools/src/random_path.rs
Normal file
89
devtools/src/random_path.rs
Normal file
@@ -0,0 +1,89 @@
|
||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Random path
|
||||
|
||||
use std::path::*;
|
||||
use std::fs;
|
||||
use std::env;
|
||||
use rand::random;
|
||||
|
||||
pub struct RandomTempPath {
|
||||
path: PathBuf
|
||||
}
|
||||
|
||||
pub fn random_filename() -> String {
|
||||
(0..8).map(|_| ((random::<f32>() * 26.0) as u8 + 97) as char).collect()
|
||||
}
|
||||
|
||||
impl RandomTempPath {
|
||||
pub fn new() -> RandomTempPath {
|
||||
let mut dir = env::temp_dir();
|
||||
dir.push(random_filename());
|
||||
RandomTempPath {
|
||||
path: dir.clone()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_dir() -> RandomTempPath {
|
||||
let mut dir = env::temp_dir();
|
||||
dir.push(random_filename());
|
||||
fs::create_dir_all(dir.as_path()).unwrap();
|
||||
RandomTempPath {
|
||||
path: dir.clone()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_path(&self) -> &PathBuf {
|
||||
&self.path
|
||||
}
|
||||
|
||||
pub fn as_str(&self) -> &str {
|
||||
self.path.to_str().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for RandomTempPath {
|
||||
fn drop(&mut self) {
|
||||
if let Err(e) = fs::remove_dir_all(self.as_path()) {
|
||||
panic!("failed to remove temp directory, probably something failed to destroyed ({})", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn creates_dir() {
|
||||
let temp = RandomTempPath::create_dir();
|
||||
assert!(fs::metadata(temp.as_path()).unwrap().is_dir());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn destroys_dir() {
|
||||
let path_buf = {
|
||||
let temp = RandomTempPath::create_dir();
|
||||
assert!(fs::metadata(temp.as_path()).unwrap().is_dir());
|
||||
let path_buf = temp.as_path().to_path_buf();
|
||||
path_buf
|
||||
};
|
||||
|
||||
assert!(fs::metadata(&path_buf).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn provides_random() {
|
||||
let temp = RandomTempPath::create_dir();
|
||||
assert!(temp.as_path().to_str().is_some());
|
||||
}
|
||||
11
doc.sh
Executable file
11
doc.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# generate documentation only for partiy and ethcore libraries
|
||||
|
||||
cargo doc --no-deps --verbose \
|
||||
-p ethash \
|
||||
-p ethcore-util \
|
||||
-p ethcore \
|
||||
-p ethsync \
|
||||
-p ethcore-rpc \
|
||||
-p parity \
|
||||
-p ethminer
|
||||
37
docker/ubuntu-dev/Dockerfile
Normal file
37
docker/ubuntu-dev/Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
# make
|
||||
build-essential \
|
||||
# add-apt-repository
|
||||
software-properties-common \
|
||||
curl \
|
||||
g++ \
|
||||
wget \
|
||||
git \
|
||||
# evmjit dependencies
|
||||
zlib1g-dev \
|
||||
libedit-dev
|
||||
|
||||
# cmake, llvm and rocksdb ppas. then update ppas
|
||||
RUN add-apt-repository -y "ppa:george-edison55/cmake-3.x" && \
|
||||
add-apt-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main" && \
|
||||
apt-get update && \
|
||||
apt-get install -y --force-yes cmake llvm-3.7-dev
|
||||
|
||||
# install evmjit
|
||||
RUN git clone https://github.com/debris/evmjit && \
|
||||
cd evmjit && \
|
||||
mkdir build && cd build && \
|
||||
cmake .. && make && make install && cd
|
||||
|
||||
# install multirust
|
||||
RUN curl -sf https://raw.githubusercontent.com/brson/multirust/master/blastoff.sh | sh -s -- --yes
|
||||
|
||||
# export rust LIBRARY_PATH
|
||||
ENV LIBRARY_PATH /usr/local/lib
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
42
docker/ubuntu-jit/Dockerfile
Normal file
42
docker/ubuntu-jit/Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
# make
|
||||
build-essential \
|
||||
# add-apt-repository
|
||||
software-properties-common \
|
||||
curl \
|
||||
wget \
|
||||
git \
|
||||
g++ \
|
||||
# evmjit dependencies
|
||||
zlib1g-dev \
|
||||
libedit-dev
|
||||
|
||||
# cmake, llvm and rocksdb ppas. then update ppas
|
||||
RUN add-apt-repository -y "ppa:george-edison55/cmake-3.x" && \
|
||||
add-apt-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main" && \
|
||||
apt-get update && \
|
||||
apt-get install -y --force-yes cmake llvm-3.7-dev
|
||||
|
||||
# install evmjit
|
||||
RUN git clone https://github.com/debris/evmjit && \
|
||||
cd evmjit && \
|
||||
mkdir build && cd build && \
|
||||
cmake .. && make && make install && cd
|
||||
|
||||
# install multirust
|
||||
RUN curl -sf https://raw.githubusercontent.com/brson/multirust/master/blastoff.sh | sh -s -- --yes
|
||||
|
||||
# export rust LIBRARY_PATH
|
||||
ENV LIBRARY_PATH /usr/local/lib
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# build parity
|
||||
RUN git clone https://github.com/ethcore/parity && \
|
||||
cd parity && \
|
||||
cargo build --release --features ethcore/jit
|
||||
23
docker/ubuntu/Dockerfile
Normal file
23
docker/ubuntu/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
g++ \
|
||||
curl \
|
||||
git \
|
||||
make
|
||||
|
||||
# install multirust
|
||||
RUN curl -sf https://raw.githubusercontent.com/brson/multirust/master/blastoff.sh | sh -s -- --yes
|
||||
|
||||
# export rust LIBRARY_PATH
|
||||
ENV LIBRARY_PATH /usr/local/lib
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# build parity
|
||||
RUN git clone https://github.com/ethcore/parity && \
|
||||
cd parity && \
|
||||
cargo build --release
|
||||
@@ -1,228 +0,0 @@
|
||||
Note: Parity 0.9 reached End-of-Life on 2016-05-02 (EOL).
|
||||
|
||||
## Parity [beta-0.9.1](https://github.com/paritytech/parity/releases/tag/beta-0.9.1) (2016-02-16)
|
||||
|
||||
Homestead transition block changed to 1100000.
|
||||
|
||||
- Beta patch to 0.9.1 [#445](https://github.com/paritytech/parity/pull/445)
|
||||
- Delay homestead transition [#430](https://github.com/paritytech/parity/pull/430)
|
||||
- (BETA) https link in the installer (?) [#392](https://github.com/paritytech/parity/pull/392)
|
||||
- beta: Check for handshake expiration before attempting replace [#377](https://github.com/paritytech/parity/pull/377)
|
||||
|
||||
## Parity [beta-0.9](https://github.com/paritytech/parity/releases/tag/beta-0.9) (2016-02-08)
|
||||
|
||||
First Parity Beta 0.9 released.
|
||||
|
||||
- Panic on missing counters; Client cleanup [#368](https://github.com/paritytech/parity/pull/368)
|
||||
- Update README for new PPAs. [#369](https://github.com/paritytech/parity/pull/369)
|
||||
- block_queue::clear should be more thorough [#365](https://github.com/paritytech/parity/pull/365)
|
||||
- Fixed an issue with forked counters [#363](https://github.com/paritytech/parity/pull/363)
|
||||
- Install parity [#362](https://github.com/paritytech/parity/pull/362)
|
||||
- DB directory versioning [#358](https://github.com/paritytech/parity/pull/358)
|
||||
- Raise FD limit for MacOS [#357](https://github.com/paritytech/parity/pull/357)
|
||||
- Travis slack integration. [#356](https://github.com/paritytech/parity/pull/356)
|
||||
- SignedTransaction structure [#350](https://github.com/paritytech/parity/pull/350)
|
||||
- License [#354](https://github.com/paritytech/parity/pull/354)
|
||||
- Performance optimizations [#353](https://github.com/paritytech/parity/pull/353)
|
||||
- Gitter in README. [#355](https://github.com/paritytech/parity/pull/355)
|
||||
- test efforts, receipt requests [#352](https://github.com/paritytech/parity/pull/352)
|
||||
- sync tests setup & local module coverage [#348](https://github.com/paritytech/parity/pull/348)
|
||||
- install parity script [#347](https://github.com/paritytech/parity/pull/347)
|
||||
- evmjit homestead merge [#342](https://github.com/paritytech/parity/pull/342)
|
||||
- Fixed sync stalling on fork [#343](https://github.com/paritytech/parity/pull/343)
|
||||
- Remerge 264 [#334](https://github.com/paritytech/parity/pull/334)
|
||||
- Ethsync tests bfix [#339](https://github.com/paritytech/parity/pull/339)
|
||||
- Fix default options. [#335](https://github.com/paritytech/parity/pull/335)
|
||||
- sync queue limit hotfix [#338](https://github.com/paritytech/parity/pull/338)
|
||||
- Network tests, separate local coverage for utils [#333](https://github.com/paritytech/parity/pull/333)
|
||||
- fix parity version so netstats can parse it [#332](https://github.com/paritytech/parity/pull/332)
|
||||
- reveal surprise [#331](https://github.com/paritytech/parity/pull/331)
|
||||
- Revert removal of `new_code`. [#330](https://github.com/paritytech/parity/pull/330)
|
||||
- Network mod tests first part [#329](https://github.com/paritytech/parity/pull/329)
|
||||
- Look ma no `dead_code` [#323](https://github.com/paritytech/parity/pull/323)
|
||||
- Fixing JIT, Updating hook to run `ethcore` tests. [#326](https://github.com/paritytech/parity/pull/326)
|
||||
- Final docs [#327](https://github.com/paritytech/parity/pull/327)
|
||||
- update install-deps.sh [#316](https://github.com/paritytech/parity/pull/316)
|
||||
- Finish all my docs. Fix previous test compilation. [#320](https://github.com/paritytech/parity/pull/320)
|
||||
- Additional evm tests (extops, call, jumps) and some docs [#317](https://github.com/paritytech/parity/pull/317)
|
||||
- More documentation. [#318](https://github.com/paritytech/parity/pull/318)
|
||||
- Additional documentation. [#315](https://github.com/paritytech/parity/pull/315)
|
||||
- unused functions cleanup [#310](https://github.com/paritytech/parity/pull/310)
|
||||
- update ethcore.github.io documentation automatically [#311](https://github.com/paritytech/parity/pull/311)
|
||||
- Another try with travis ci credentials [#314](https://github.com/paritytech/parity/pull/314)
|
||||
- Document some stuff. [#309](https://github.com/paritytech/parity/pull/309)
|
||||
- Check block parent on import; Peer timeouts [#303](https://github.com/paritytech/parity/pull/303)
|
||||
- Increasing coverage for evm. [#306](https://github.com/paritytech/parity/pull/306)
|
||||
- ethcore docs [#301](https://github.com/paritytech/parity/pull/301)
|
||||
- Replacing secure token for deployment [#305](https://github.com/paritytech/parity/pull/305)
|
||||
- doc.sh [#299](https://github.com/paritytech/parity/pull/299)
|
||||
- Building beta-* and stable-* tags [#302](https://github.com/paritytech/parity/pull/302)
|
||||
- Deploying artifacts for tags (release/beta) [#300](https://github.com/paritytech/parity/pull/300)
|
||||
- cov.sh to show coverage locally [#298](https://github.com/paritytech/parity/pull/298)
|
||||
- benchmark fixes [#297](https://github.com/paritytech/parity/pull/297)
|
||||
- Include JSONRPC CLI options. [#296](https://github.com/paritytech/parity/pull/296)
|
||||
- travis.yml fixes [#293](https://github.com/paritytech/parity/pull/293)
|
||||
- Improve version string. [#295](https://github.com/paritytech/parity/pull/295)
|
||||
- Fixed block queue test [#294](https://github.com/paritytech/parity/pull/294)
|
||||
- Util docs [#292](https://github.com/paritytech/parity/pull/292)
|
||||
- fixed building docs [#289](https://github.com/paritytech/parity/pull/289)
|
||||
- update travis to build PRs only against master [#290](https://github.com/paritytech/parity/pull/290)
|
||||
- Coverage effort [#272](https://github.com/paritytech/parity/pull/272)
|
||||
- updated docker containers [#288](https://github.com/paritytech/parity/pull/288)
|
||||
- rpc module fixes [#287](https://github.com/paritytech/parity/pull/287)
|
||||
- Test for Receipt RLP. [#282](https://github.com/paritytech/parity/pull/282)
|
||||
- Building from source guide [#284](https://github.com/paritytech/parity/pull/284)
|
||||
- Fixed neted empty list RLP encoding [#283](https://github.com/paritytech/parity/pull/283)
|
||||
- Fix CALLDATACOPY (and bonus CODECOPY, too!). [#279](https://github.com/paritytech/parity/pull/279)
|
||||
- added travis && coveralls badge to README.md [#280](https://github.com/paritytech/parity/pull/280)
|
||||
- coveralls coverage [#277](https://github.com/paritytech/parity/pull/277)
|
||||
- Travis [in progress] [#257](https://github.com/paritytech/parity/pull/257)
|
||||
- Travis on reorganized repo [#276](https://github.com/paritytech/parity/pull/276)
|
||||
- umbrella project [#275](https://github.com/paritytech/parity/pull/275)
|
||||
- Ethash disk cache [#273](https://github.com/paritytech/parity/pull/273)
|
||||
- Parity executable name and version [#274](https://github.com/paritytech/parity/pull/274)
|
||||
- Dockerfile [#195](https://github.com/paritytech/parity/pull/195)
|
||||
- Garbage collection test fix [#267](https://github.com/paritytech/parity/pull/267)
|
||||
- Fix stCallCreateCallCodeTest, add more tests [#271](https://github.com/paritytech/parity/pull/271)
|
||||
- Moved sync out of ethcore crate; Added block validation [#265](https://github.com/paritytech/parity/pull/265)
|
||||
- RLP encoder refactoring [#252](https://github.com/paritytech/parity/pull/252)
|
||||
- Chain sync tests and minor refactoring [#264](https://github.com/paritytech/parity/pull/264)
|
||||
- Common log init function [#263](https://github.com/paritytech/parity/pull/263)
|
||||
- changed max vm depth from 128 to 64, change homestead block to 1_000_000 [#262](https://github.com/paritytech/parity/pull/262)
|
||||
- fixed blockchain tests crash on log init [#261](https://github.com/paritytech/parity/pull/261)
|
||||
- Blockchain tests and some helpers for guarding temp directory [#256](https://github.com/paritytech/parity/pull/256)
|
||||
- Fix logging and random tests. [#260](https://github.com/paritytech/parity/pull/260)
|
||||
- Fix difficulty calculation algo. [#259](https://github.com/paritytech/parity/pull/259)
|
||||
- fix submodule version [#258](https://github.com/paritytech/parity/pull/258)
|
||||
- temp dir spawn refactoring [#246](https://github.com/paritytech/parity/pull/246)
|
||||
- fixed tests submodule branch [#254](https://github.com/paritytech/parity/pull/254)
|
||||
- rpc net methods returns real peer count && protocol version [#253](https://github.com/paritytech/parity/pull/253)
|
||||
- Add homestead & random tests. [#245](https://github.com/paritytech/parity/pull/245)
|
||||
- Fixing suicide with self-refund to be consistent with CPP. [#247](https://github.com/paritytech/parity/pull/247)
|
||||
- stubs for rpc methods [#251](https://github.com/paritytech/parity/pull/251)
|
||||
- clippy, missing docs, renaming etc. [#244](https://github.com/paritytech/parity/pull/244)
|
||||
- impl missing methods in tests [#243](https://github.com/paritytech/parity/pull/243)
|
||||
- General tests and some helpers [#239](https://github.com/paritytech/parity/pull/239)
|
||||
- Note additional tests are fixed, fix doc test. [#242](https://github.com/paritytech/parity/pull/242)
|
||||
- jsonrpc http server [#193](https://github.com/paritytech/parity/pull/193)
|
||||
- Ethash nonce is H64 not a u64 [#240](https://github.com/paritytech/parity/pull/240)
|
||||
- Fix import for bcMultiChainTest [#236](https://github.com/paritytech/parity/pull/236)
|
||||
- Client basic tests [#232](https://github.com/paritytech/parity/pull/232)
|
||||
- Fix ensure_db_good() and flush_queue(), block refactoring, check block format, be strict. [#231](https://github.com/paritytech/parity/pull/231)
|
||||
- Rlp [#207](https://github.com/paritytech/parity/pull/207)
|
||||
- Schedule documentation [#219](https://github.com/paritytech/parity/pull/219)
|
||||
- U256<->H256 Conversion [#206](https://github.com/paritytech/parity/pull/206)
|
||||
- Spawning new thread when we are reaching stack limit [#217](https://github.com/paritytech/parity/pull/217)
|
||||
- Blockchain tests [#211](https://github.com/paritytech/parity/pull/211)
|
||||
- fixed failing sync test [#218](https://github.com/paritytech/parity/pull/218)
|
||||
- Removing println [#216](https://github.com/paritytech/parity/pull/216)
|
||||
- Cleaning readme [#212](https://github.com/paritytech/parity/pull/212)
|
||||
- Fixing delegatecall [#196](https://github.com/paritytech/parity/pull/196)
|
||||
- Autogenerate the Args from the docopt macro. [#205](https://github.com/paritytech/parity/pull/205)
|
||||
- Networking fixes [#202](https://github.com/paritytech/parity/pull/202)
|
||||
- Argument parsing from CLI [#204](https://github.com/paritytech/parity/pull/204)
|
||||
- Removed wildcard from clippy version [#203](https://github.com/paritytech/parity/pull/203)
|
||||
- Fixed tests and tweaked sync progress report [#201](https://github.com/paritytech/parity/pull/201)
|
||||
- Heavy tests [#199](https://github.com/paritytech/parity/pull/199)
|
||||
- Mutithreaded IO [#198](https://github.com/paritytech/parity/pull/198)
|
||||
- Populating last_hashes [#197](https://github.com/paritytech/parity/pull/197)
|
||||
- Fixing clippy stuff [#170](https://github.com/paritytech/parity/pull/170)
|
||||
- basic .travis.yml [#194](https://github.com/paritytech/parity/pull/194)
|
||||
- Generating coverage reports. [#190](https://github.com/paritytech/parity/pull/190)
|
||||
- Adding doc requests comments [#192](https://github.com/paritytech/parity/pull/192)
|
||||
- moved src/bin/client.rs -> src/bin/client/main.rs [#185](https://github.com/paritytech/parity/pull/185)
|
||||
- removed overflowing_shr [#188](https://github.com/paritytech/parity/pull/188)
|
||||
- fixed wrapping ops on latest nightly [#187](https://github.com/paritytech/parity/pull/187)
|
||||
- Pruned state DB [#176](https://github.com/paritytech/parity/pull/176)
|
||||
- Memory management for cache [#180](https://github.com/paritytech/parity/pull/180)
|
||||
- Implement signs having low-s. [#183](https://github.com/paritytech/parity/pull/183)
|
||||
- Introduce sha3 crate and use it in ethash [#178](https://github.com/paritytech/parity/pull/178)
|
||||
- Multithreaded block queue [#173](https://github.com/paritytech/parity/pull/173)
|
||||
- Iterator for NibbleSlice and TrieDB. [#171](https://github.com/paritytech/parity/pull/171)
|
||||
- Handling all possible overflows [#145](https://github.com/paritytech/parity/pull/145)
|
||||
- Global secp256k1 context [#164](https://github.com/paritytech/parity/pull/164)
|
||||
- Ethash [#152](https://github.com/paritytech/parity/pull/152)
|
||||
- Move util into here [#153](https://github.com/paritytech/parity/pull/153)
|
||||
- EVM Interpreter [#103](https://github.com/paritytech/parity/pull/103)
|
||||
- Homestead transition support, maybe. [#141](https://github.com/paritytech/parity/pull/141)
|
||||
- externalities refactor [#131](https://github.com/paritytech/parity/pull/131)
|
||||
- More open files. [#140](https://github.com/paritytech/parity/pull/140)
|
||||
- Single array for logs output. [#133](https://github.com/paritytech/parity/pull/133)
|
||||
- Client app event handler [#132](https://github.com/paritytech/parity/pull/132)
|
||||
- Various consensus fixes. [#130](https://github.com/paritytech/parity/pull/130)
|
||||
- callcode builtins tests pass [#127](https://github.com/paritytech/parity/pull/127)
|
||||
- Client state syncing [#119](https://github.com/paritytech/parity/pull/119)
|
||||
- Split externalities from executive. [#126](https://github.com/paritytech/parity/pull/126)
|
||||
- executive error on not enoguh base gas [#124](https://github.com/paritytech/parity/pull/124)
|
||||
- Gav [#125](https://github.com/paritytech/parity/pull/125)
|
||||
- builtin sets excepted to true [#123](https://github.com/paritytech/parity/pull/123)
|
||||
- More state tests. [#122](https://github.com/paritytech/parity/pull/122)
|
||||
- updated to rocksdb wrapper version 0.3 [#121](https://github.com/paritytech/parity/pull/121)
|
||||
- out_of_gas -> excepted [#120](https://github.com/paritytech/parity/pull/120)
|
||||
- Parametrizing evm::Factory [#111](https://github.com/paritytech/parity/pull/111)
|
||||
- stLogs tests passing [#118](https://github.com/paritytech/parity/pull/118)
|
||||
- Fix executive. [#117](https://github.com/paritytech/parity/pull/117)
|
||||
- Fixes for marek's shooting from the hip. [#116](https://github.com/paritytech/parity/pull/116)
|
||||
- Executive revert fix [#115](https://github.com/paritytech/parity/pull/115)
|
||||
- Fix storage/account and add butress test. [#114](https://github.com/paritytech/parity/pull/114)
|
||||
- Refactored Pod & Diff types into separate files, JSON infrastructure revamp. [#113](https://github.com/paritytech/parity/pull/113)
|
||||
- Fix storage stuff and introduce per-item dirty-tracking. [#112](https://github.com/paritytech/parity/pull/112)
|
||||
- Check logs in state tests. [#109](https://github.com/paritytech/parity/pull/109)
|
||||
- executive gas calculation fixes [#108](https://github.com/paritytech/parity/pull/108)
|
||||
- proper gas calculation in executive [#107](https://github.com/paritytech/parity/pull/107)
|
||||
- Fixing MaxDepth param for executive [#105](https://github.com/paritytech/parity/pull/105)
|
||||
- Fix determination of state roots. [#106](https://github.com/paritytech/parity/pull/106)
|
||||
- transact substracts tx_gas [#104](https://github.com/paritytech/parity/pull/104)
|
||||
- Pretty-print and fix for state. [#102](https://github.com/paritytech/parity/pull/102)
|
||||
- Tier step price. [#101](https://github.com/paritytech/parity/pull/101)
|
||||
- Refactor Diff datastructures. [#100](https://github.com/paritytech/parity/pull/100)
|
||||
- externalities use u256 instead of u64 for gas calculation [#99](https://github.com/paritytech/parity/pull/99)
|
||||
- Executive tests [#97](https://github.com/paritytech/parity/pull/97)
|
||||
- State conensus tests now print mismatching diff on fail. [#98](https://github.com/paritytech/parity/pull/98)
|
||||
- State testing framework. First test is failing. [#96](https://github.com/paritytech/parity/pull/96)
|
||||
- executive tests [#95](https://github.com/paritytech/parity/pull/95)
|
||||
- Use U512s for ether cost calculation, complete transaction API [#94](https://github.com/paritytech/parity/pull/94)
|
||||
- Utils for consensus test decoding and better layout. [#93](https://github.com/paritytech/parity/pull/93)
|
||||
- executive fixes + tests [#89](https://github.com/paritytech/parity/pull/89)
|
||||
- All transaction tests pass. Nicer testing framework. [#92](https://github.com/paritytech/parity/pull/92)
|
||||
- Block verification tests; BlockProvider blockchain trait for testing [#88](https://github.com/paritytech/parity/pull/88)
|
||||
- State::exists, docs and tests. [#87](https://github.com/paritytech/parity/pull/87)
|
||||
- Add tests module, add two more transaction tests. [#86](https://github.com/paritytech/parity/pull/86)
|
||||
- bring back removed tests, removed build warnings [#82](https://github.com/paritytech/parity/pull/82)
|
||||
- Nicer transaction validation API. Nicer OutOfBounds API in general. [#85](https://github.com/paritytech/parity/pull/85)
|
||||
- Transaction fixes and consensus tests (all passing) [#84](https://github.com/paritytech/parity/pull/84)
|
||||
- fixed getting block info in evmjit + tests [#81](https://github.com/paritytech/parity/pull/81)
|
||||
- evm tests cleanup [#80](https://github.com/paritytech/parity/pull/80)
|
||||
- renamed VmFactory -> Factory [#77](https://github.com/paritytech/parity/pull/77)
|
||||
- fixed rust-evmjit description of improper_ctypes usage [#76](https://github.com/paritytech/parity/pull/76)
|
||||
- jit feature enabled by default [#75](https://github.com/paritytech/parity/pull/75)
|
||||
- evm [#52](https://github.com/paritytech/parity/pull/52)
|
||||
- state clone [#74](https://github.com/paritytech/parity/pull/74)
|
||||
- Block Verification (no tests yet) [#72](https://github.com/paritytech/parity/pull/72)
|
||||
- Improvements to LogEntry and Transaction [#73](https://github.com/paritytech/parity/pull/73)
|
||||
- Use getter in header in preparation for a Header trait; additional testing in enact_block(). [#64](https://github.com/paritytech/parity/pull/64)
|
||||
- BlockChain sync and Client app [#55](https://github.com/paritytech/parity/pull/55)
|
||||
- Block enactment (including test) [#63](https://github.com/paritytech/parity/pull/63)
|
||||
- Block complete. Needs tests. [#62](https://github.com/paritytech/parity/pull/62)
|
||||
- More on OpenBlock::close; State::kill_account added [#61](https://github.com/paritytech/parity/pull/61)
|
||||
- Remove genesis module, add more chain specs and separate out ethereum-specific stuff [#60](https://github.com/paritytech/parity/pull/60)
|
||||
- State::new_contract, camelCase engine params, missing param [#59](https://github.com/paritytech/parity/pull/59)
|
||||
- Use reorganisation [#58](https://github.com/paritytech/parity/pull/58)
|
||||
- Initial Ethash/Block skeleton implementations. [#57](https://github.com/paritytech/parity/pull/57)
|
||||
- Spec with tested Morden genesis decoder and builtins. [#54](https://github.com/paritytech/parity/pull/54)
|
||||
- Move all chain parameters into `engine_params` [#50](https://github.com/paritytech/parity/pull/50)
|
||||
- jit ffi improvements [please review] [#51](https://github.com/paritytech/parity/pull/51)
|
||||
- blockchain [please review] [#34](https://github.com/paritytech/parity/pull/34)
|
||||
- Move information from networkparams.rs into spec.rs [#48](https://github.com/paritytech/parity/pull/48)
|
||||
- Move bulking out in Engine/Params. [#47](https://github.com/paritytech/parity/pull/47)
|
||||
- Removed need for mutation in State. [#46](https://github.com/paritytech/parity/pull/46)
|
||||
- State::code and State::storage_at + tests. [#45](https://github.com/paritytech/parity/pull/45)
|
||||
- State functions for balance and nonce operations [#44](https://github.com/paritytech/parity/pull/44)
|
||||
- Account::storage_at, Account::ensure_cached and tests. [#43](https://github.com/paritytech/parity/pull/43)
|
||||
- Additional tests. [#42](https://github.com/paritytech/parity/pull/42)
|
||||
- seal todo done [#41](https://github.com/paritytech/parity/pull/41)
|
||||
- missing rustc_serialize crate && rlp `as_list` function [#40](https://github.com/paritytech/parity/pull/40)
|
||||
- More methods in Account, documentation and tests. [#39](https://github.com/paritytech/parity/pull/39)
|
||||
- Minor reworking of Account. [#38](https://github.com/paritytech/parity/pull/38)
|
||||
- Add Account and State classes. [#37](https://github.com/paritytech/parity/pull/37)
|
||||
- Revert regressions [#36](https://github.com/paritytech/parity/pull/36)
|
||||
@@ -1,317 +0,0 @@
|
||||
Note: Parity 1.0 reached End-of-Life on 2016-06-24 (EOL).
|
||||
|
||||
## Parity [v1.0.2](https://github.com/paritytech/parity/releases/tag/v1.0.2) (2016-04-11)
|
||||
|
||||
Parity 1.0.2 release improves Json RPC compatibility and fixes a number of stability issues.
|
||||
|
||||
- Flush password prompt [#1031](https://github.com/paritytech/parity/pull/1031)
|
||||
- [beta] dependencies update [#949](https://github.com/paritytech/parity/pull/949)
|
||||
- Master to beta v1.0.2 [#922](https://github.com/paritytech/parity/pull/922)
|
||||
- Master to beta 1.0.2 [#908](https://github.com/paritytech/parity/pull/908)
|
||||
|
||||
## Parity [v1.0.1](https://github.com/paritytech/parity/releases/tag/v1.0.1) (2016-03-28)
|
||||
|
||||
Parity 1.0.1 update fixes a number of issues with Json RPC, transaction propagation and syncing.
|
||||
|
||||
- Imporved sync error handling [#905](https://github.com/paritytech/parity/pull/905)
|
||||
- Publish locally-made transactions to peers. [#851](https://github.com/paritytech/parity/pull/851)
|
||||
- Merge fixes from master to beta [#845](https://github.com/paritytech/parity/pull/845)
|
||||
- Full sync restart on bad block [#844](https://github.com/paritytech/parity/pull/844)
|
||||
- Make BlockNumber optional, fix eth_call [#828](https://github.com/paritytech/parity/pull/828)
|
||||
- Web3sha3 beta [#826](https://github.com/paritytech/parity/pull/826)
|
||||
- Use network id for the web3_net_version return. [#821](https://github.com/paritytech/parity/pull/821)
|
||||
- Fix mining from spinning [#806](https://github.com/paritytech/parity/pull/806)
|
||||
- Merge master to beta [#796](https://github.com/paritytech/parity/pull/796)
|
||||
|
||||
## Parity [v1.0.0](https://github.com/paritytech/parity/releases/tag/v1.0.0) (2016-03-24)
|
||||
|
||||
Parity 1.0.0 release adds the following features:
|
||||
|
||||
- Standard JsonRPC interface.
|
||||
- Full Homestead compatibility.
|
||||
- Transaction management.
|
||||
- Mining with external miner.
|
||||
- Account management.
|
||||
- Geth key chain compatibility.
|
||||
- Additional command line options.
|
||||
- State trie pruning.
|
||||
- Cache and queue footprint.
|
||||
- Network discovery & NAT traversal.
|
||||
- Custom chain specification files.
|
||||
|
||||
Note that in this release the state database is in archive (full) mode by default. Run with one of the `--pruning` options to enable pruning.
|
||||
|
||||
- First part of multi-mining support [#804](https://github.com/paritytech/parity/pull/804)
|
||||
- Fixing future-current transactions clash [#802](https://github.com/paritytech/parity/pull/802)
|
||||
- Increase threads to num_cpus & fix author reporting [#800](https://github.com/paritytech/parity/pull/800)
|
||||
- another batch of rpc improvements [#798](https://github.com/paritytech/parity/pull/798)
|
||||
- Avoid tracing DELEGATECALL and CALLCODE. Plus tests for it. [#794](https://github.com/paritytech/parity/pull/794)
|
||||
- complete getting started steps for OS X [#793](https://github.com/paritytech/parity/pull/793)
|
||||
- Auto detect available port (with fixed test) [#788](https://github.com/paritytech/parity/pull/788)
|
||||
- eth_getTransactionReceipt [#792](https://github.com/paritytech/parity/pull/792)
|
||||
- Comprehensive tests for tracing transactions [#791](https://github.com/paritytech/parity/pull/791)
|
||||
- Disable preparing work package if miners don't ask for it. [#771](https://github.com/paritytech/parity/pull/771)
|
||||
- Listen on all interfaces for JSONRPC by default. [#786](https://github.com/paritytech/parity/pull/786)
|
||||
- eth_call [#783](https://github.com/paritytech/parity/pull/783)
|
||||
- Revert "Auto detect available port" [#789](https://github.com/paritytech/parity/pull/789)
|
||||
- added output to execution result [#777](https://github.com/paritytech/parity/pull/777)
|
||||
- Auto detect available port [#782](https://github.com/paritytech/parity/pull/782)
|
||||
- Allow 0x prefix for --author. [#785](https://github.com/paritytech/parity/pull/785)
|
||||
- updated dependencies, moved rpctest to its own submodule [#784](https://github.com/paritytech/parity/pull/784)
|
||||
- use ethjson module to load chain json tests [#778](https://github.com/paritytech/parity/pull/778)
|
||||
- Tracing implemented. [#772](https://github.com/paritytech/parity/pull/772)
|
||||
- test ethjson module on travis [#780](https://github.com/paritytech/parity/pull/780)
|
||||
- batch of rpc fixes [#775](https://github.com/paritytech/parity/pull/775)
|
||||
- rpctest executable [#757](https://github.com/paritytech/parity/pull/757)
|
||||
- Refactoring error transaction_queue error handling and `update_sealing` method. [#753](https://github.com/paritytech/parity/pull/753)
|
||||
- Avoid importing transactions with gas above 1.1*block_gas_limit to transaction queue [#760](https://github.com/paritytech/parity/pull/760)
|
||||
- Removing transactions that failed to be pushed to block. [#752](https://github.com/paritytech/parity/pull/752)
|
||||
- Updating clippy [#766](https://github.com/paritytech/parity/pull/766)
|
||||
- Attempting to add all transactions to mined block [#754](https://github.com/paritytech/parity/pull/754)
|
||||
- Prettier version w/o git dir; Use rustc compile time version [#761](https://github.com/paritytech/parity/pull/761)
|
||||
- Stop adding transactions to queue while not fully synced [#751](https://github.com/paritytech/parity/pull/751)
|
||||
- Verify sender's balance before importing transaction to queue [#746](https://github.com/paritytech/parity/pull/746)
|
||||
- Returning number of transactions pending in block not queue [#750](https://github.com/paritytech/parity/pull/750)
|
||||
- Speeding up build [#733](https://github.com/paritytech/parity/pull/733)
|
||||
- adding check for a sync when giving work to miner [#742](https://github.com/paritytech/parity/pull/742)
|
||||
- json deserialization module [#745](https://github.com/paritytech/parity/pull/745)
|
||||
- Update install-parity.sh [#749](https://github.com/paritytech/parity/pull/749)
|
||||
- Restart sync on getting old unknown header [#747](https://github.com/paritytech/parity/pull/747)
|
||||
- Missing return for #737 [#744](https://github.com/paritytech/parity/pull/744)
|
||||
- Enact block with uncles test [#741](https://github.com/paritytech/parity/pull/741)
|
||||
- Fix outdated libc version on dependency [#740](https://github.com/paritytech/parity/pull/740)
|
||||
- Fixing possible race in transaction queue [#735](https://github.com/paritytech/parity/pull/735)
|
||||
- Sync fixed again [#737](https://github.com/paritytech/parity/pull/737)
|
||||
- Don't change best block until extras is committed. [#734](https://github.com/paritytech/parity/pull/734)
|
||||
- stable only until travis speedup [#736](https://github.com/paritytech/parity/pull/736)
|
||||
- Optimizing uint operations (architecture independent) [#629](https://github.com/paritytech/parity/pull/629)
|
||||
- Add RLP, not a data item. [#725](https://github.com/paritytech/parity/pull/725)
|
||||
- PV63 receipts response [#687](https://github.com/paritytech/parity/pull/687)
|
||||
- another batch of rpc tests [#723](https://github.com/paritytech/parity/pull/723)
|
||||
- dockerfiles update [#726](https://github.com/paritytech/parity/pull/726)
|
||||
- Lock reports to avoid out of order badness. [#721](https://github.com/paritytech/parity/pull/721)
|
||||
- Fixed handshake leak [#722](https://github.com/paritytech/parity/pull/722)
|
||||
- Allow configuration of target gas limit. [#719](https://github.com/paritytech/parity/pull/719)
|
||||
- Version 1.1 in master [#714](https://github.com/paritytech/parity/pull/714)
|
||||
- Silence UDP warnings [#720](https://github.com/paritytech/parity/pull/720)
|
||||
- Rpc personal tests [#715](https://github.com/paritytech/parity/pull/715)
|
||||
- Fixing warnings [#704](https://github.com/paritytech/parity/pull/704)
|
||||
- docopts cleanups [#713](https://github.com/paritytech/parity/pull/713)
|
||||
- Removed rocksdb build dependency [#717](https://github.com/paritytech/parity/pull/717)
|
||||
- Fixed splitting Neighbours packet [#710](https://github.com/paritytech/parity/pull/710)
|
||||
- management of account expiration & memory [#701](https://github.com/paritytech/parity/pull/701)
|
||||
- Remove EarlyMerge from user docs. [#708](https://github.com/paritytech/parity/pull/708)
|
||||
- Fixes and traces for refcountdb. [#705](https://github.com/paritytech/parity/pull/705)
|
||||
- Check for NULL_RLP in AccountDB [#706](https://github.com/paritytech/parity/pull/706)
|
||||
- ethminer as crate [#700](https://github.com/paritytech/parity/pull/700)
|
||||
- Old ref-counted DB code [#692](https://github.com/paritytech/parity/pull/692)
|
||||
- next batch of rpc tests and fixes [#699](https://github.com/paritytech/parity/pull/699)
|
||||
- implemented eth_geStorageAt rpc method, added more tests for rpc [#695](https://github.com/paritytech/parity/pull/695)
|
||||
- Fix JournalDB era marker [#690](https://github.com/paritytech/parity/pull/690)
|
||||
- More sync fixes [#685](https://github.com/paritytech/parity/pull/685)
|
||||
- mark some key tests as heavy [#694](https://github.com/paritytech/parity/pull/694)
|
||||
- Limit incoming connections [#693](https://github.com/paritytech/parity/pull/693)
|
||||
- Updating clippy [#688](https://github.com/paritytech/parity/pull/688)
|
||||
- eth_accounts, eth_getBalance rpc functions && tests [#691](https://github.com/paritytech/parity/pull/691)
|
||||
- state query for archive jdb [#683](https://github.com/paritytech/parity/pull/683)
|
||||
- Fix for option 1 of JournalDB [#658](https://github.com/paritytech/parity/pull/658)
|
||||
- Rename into something that is a little more descriptive. [#689](https://github.com/paritytech/parity/pull/689)
|
||||
- JournalDB with in-memory overlay (option2) [#634](https://github.com/paritytech/parity/pull/634)
|
||||
- additional (failing) SecretStore test [#682](https://github.com/paritytech/parity/pull/682)
|
||||
- Updating clippy & fixing warnings. [#670](https://github.com/paritytech/parity/pull/670)
|
||||
- rpc web3 tests [#681](https://github.com/paritytech/parity/pull/681)
|
||||
- Making personal json-rpc configurable via cli [#677](https://github.com/paritytech/parity/pull/677)
|
||||
- RPC Pending Transactions Filter [#661](https://github.com/paritytech/parity/pull/661)
|
||||
- Rearrange journaldb infrastructure to make more extensible [#678](https://github.com/paritytech/parity/pull/678)
|
||||
- JournalDB -> Box<JournalDB>, and it's a trait. [#673](https://github.com/paritytech/parity/pull/673)
|
||||
- fix warning for transaction_queue.add usage [#676](https://github.com/paritytech/parity/pull/676)
|
||||
- Adding std::mem back (only for asm) [#680](https://github.com/paritytech/parity/pull/680)
|
||||
- update readme to exclude beta step (stable is ok) [#679](https://github.com/paritytech/parity/pull/679)
|
||||
- fixed U256 and transaction request deserialization [#675](https://github.com/paritytech/parity/pull/675)
|
||||
- More geth compatibility. [#666](https://github.com/paritytech/parity/pull/666)
|
||||
- Removing running clippy by default on nightly. [#671](https://github.com/paritytech/parity/pull/671)
|
||||
- rpc net submodule tests [#667](https://github.com/paritytech/parity/pull/667)
|
||||
- Client module overhaul [#665](https://github.com/paritytech/parity/pull/665)
|
||||
- Rpc transaction signing [#587](https://github.com/paritytech/parity/pull/587)
|
||||
- Transaction queue exposed via JSON rpc. [#652](https://github.com/paritytech/parity/pull/652)
|
||||
- Remove unneeded locking [#499](https://github.com/paritytech/parity/pull/499)
|
||||
- extend sync status interface to sync provider [#664](https://github.com/paritytech/parity/pull/664)
|
||||
- --archive is default. --pruning is option. [#663](https://github.com/paritytech/parity/pull/663)
|
||||
- jsonrpc uses client and sync interfaces [#641](https://github.com/paritytech/parity/pull/641)
|
||||
- Expose transaction insertion in sync lib [#609](https://github.com/paritytech/parity/pull/609)
|
||||
- Removing get prefix from poll_info [#660](https://github.com/paritytech/parity/pull/660)
|
||||
- Tx queue update height bug [#657](https://github.com/paritytech/parity/pull/657)
|
||||
- Tx_queue_docs -> To master [#651](https://github.com/paritytech/parity/pull/651)
|
||||
- blockchain import_route [#645](https://github.com/paritytech/parity/pull/645)
|
||||
- Stop workers before stopping event loop [#655](https://github.com/paritytech/parity/pull/655)
|
||||
- Validate sender before importing to queue [#650](https://github.com/paritytech/parity/pull/650)
|
||||
- Gas price threshold for transactions [#640](https://github.com/paritytech/parity/pull/640)
|
||||
- `dev` feature enabled when compiling without `--release` [#627](https://github.com/paritytech/parity/pull/627)
|
||||
- Don't call mark_as_bad needlessly [#648](https://github.com/paritytech/parity/pull/648)
|
||||
- Fixed sync handling large forks [#647](https://github.com/paritytech/parity/pull/647)
|
||||
- Additional documentation for transaction queue [#631](https://github.com/paritytech/parity/pull/631)
|
||||
- Transaction Queue Integration [#607](https://github.com/paritytech/parity/pull/607)
|
||||
- Keys cli [#639](https://github.com/paritytech/parity/pull/639)
|
||||
- fix build warning [#643](https://github.com/paritytech/parity/pull/643)
|
||||
- updated jsonrpc-core and http-server libs [#642](https://github.com/paritytech/parity/pull/642)
|
||||
- jsonrpc panics gracefully shutdown client [#638](https://github.com/paritytech/parity/pull/638)
|
||||
- Fixing CLI parameters [#633](https://github.com/paritytech/parity/pull/633)
|
||||
- Normal CLI options with geth. [#628](https://github.com/paritytech/parity/pull/628)
|
||||
- Do not remove the peer immediatelly on send error [#626](https://github.com/paritytech/parity/pull/626)
|
||||
- Jsonrpc block behind [#622](https://github.com/paritytech/parity/pull/622)
|
||||
- Remove println!s. [#624](https://github.com/paritytech/parity/pull/624)
|
||||
- JournalDB option 1 fix [#613](https://github.com/paritytech/parity/pull/613)
|
||||
- Network tracing cleanup [#611](https://github.com/paritytech/parity/pull/611)
|
||||
- Revert "Transaction Queue integration" [#602](https://github.com/paritytech/parity/pull/602)
|
||||
- fix benches compilation [#601](https://github.com/paritytech/parity/pull/601)
|
||||
- Transaction Queue integration [#595](https://github.com/paritytech/parity/pull/595)
|
||||
- verifier trait improvements [#597](https://github.com/paritytech/parity/pull/597)
|
||||
- build on rust stable [#600](https://github.com/paritytech/parity/pull/600)
|
||||
- Geth import silent if no geth [#599](https://github.com/paritytech/parity/pull/599)
|
||||
- Additional journaldb logging and assert [#593](https://github.com/paritytech/parity/pull/593)
|
||||
- Uncle inclusion in block authoring. [#578](https://github.com/paritytech/parity/pull/578)
|
||||
- Fixed potential deadlock on startup [#592](https://github.com/paritytech/parity/pull/592)
|
||||
- Fixing an overflow panic [#591](https://github.com/paritytech/parity/pull/591)
|
||||
- Fixed one more case of sync stalling [#590](https://github.com/paritytech/parity/pull/590)
|
||||
- JournalDB can now operate in "archive" mode [#589](https://github.com/paritytech/parity/pull/589)
|
||||
- Secret store integration with client [#586](https://github.com/paritytech/parity/pull/586)
|
||||
- fix build on nightly rust [#588](https://github.com/paritytech/parity/pull/588)
|
||||
- deserialization for uint generic [#585](https://github.com/paritytech/parity/pull/585)
|
||||
- TransactionsQueue implementation [#559](https://github.com/paritytech/parity/pull/559)
|
||||
- JSON-RPC personal service (follows #582) [#583](https://github.com/paritytech/parity/pull/583)
|
||||
- making key directory thread-safe [#582](https://github.com/paritytech/parity/pull/582)
|
||||
- verifier trait [#581](https://github.com/paritytech/parity/pull/581)
|
||||
- shrink_to_fit after removing hashes. [#580](https://github.com/paritytech/parity/pull/580)
|
||||
- support for rpc polling [#504](https://github.com/paritytech/parity/pull/504)
|
||||
- limit serde codegen only to rpc types submodule [#569](https://github.com/paritytech/parity/pull/569)
|
||||
- fork test for Issue test/568 [#573](https://github.com/paritytech/parity/pull/573)
|
||||
- Fixing clippy warnings = small refactoring of `request_blocks` [#560](https://github.com/paritytech/parity/pull/560)
|
||||
- Improved journaldb logging [#571](https://github.com/paritytech/parity/pull/571)
|
||||
- Additional check to ancient enactments. [#570](https://github.com/paritytech/parity/pull/570)
|
||||
- chainfilter shouldnt exclude to_block from results [#564](https://github.com/paritytech/parity/pull/564)
|
||||
- Fix coverage test run [#567](https://github.com/paritytech/parity/pull/567)
|
||||
- Mining [#547](https://github.com/paritytech/parity/pull/547)
|
||||
- fix uint warnings [#565](https://github.com/paritytech/parity/pull/565)
|
||||
- Finished blockchain generator. [#562](https://github.com/paritytech/parity/pull/562)
|
||||
- fixed broken master [#563](https://github.com/paritytech/parity/pull/563)
|
||||
- uint to separate crate [#544](https://github.com/paritytech/parity/pull/544)
|
||||
- improved test chain generator [#554](https://github.com/paritytech/parity/pull/554)
|
||||
- Fixing spelling in propagade->propagate [#558](https://github.com/paritytech/parity/pull/558)
|
||||
- Changing RefCell to Cell in transaction. [#557](https://github.com/paritytech/parity/pull/557)
|
||||
- Fix for morden consensus. [#556](https://github.com/paritytech/parity/pull/556)
|
||||
- blockchain generator [#550](https://github.com/paritytech/parity/pull/550)
|
||||
- Sparse Table Implementation (Row, Col) -> Val [#545](https://github.com/paritytech/parity/pull/545)
|
||||
- fixup install script [#548](https://github.com/paritytech/parity/pull/548)
|
||||
- Fixing clippy warnings [#546](https://github.com/paritytech/parity/pull/546)
|
||||
- ignore out directory [#543](https://github.com/paritytech/parity/pull/543)
|
||||
- u256 full multiplication [#539](https://github.com/paritytech/parity/pull/539)
|
||||
- Fix panic when downloading stales, update homestead transition [#537](https://github.com/paritytech/parity/pull/537)
|
||||
- changing x64 asm config [#534](https://github.com/paritytech/parity/pull/534)
|
||||
- uncomment state transition tests [#533](https://github.com/paritytech/parity/pull/533)
|
||||
- jsonrpc uses weak pointers to client [#532](https://github.com/paritytech/parity/pull/532)
|
||||
- Morden switch to Homestead rules at #494,000. [#531](https://github.com/paritytech/parity/pull/531)
|
||||
- Blockchain module cleanup [#524](https://github.com/paritytech/parity/pull/524)
|
||||
- Multiplication issue + very exhaustive tests for it [#528](https://github.com/paritytech/parity/pull/528)
|
||||
- EIP-8 [#498](https://github.com/paritytech/parity/pull/498)
|
||||
- Make "random" trie tests fully deterministic. [#527](https://github.com/paritytech/parity/pull/527)
|
||||
- udpated serde to version 0.7.0 [#526](https://github.com/paritytech/parity/pull/526)
|
||||
- Better memory management [#516](https://github.com/paritytech/parity/pull/516)
|
||||
- Typo [#523](https://github.com/paritytech/parity/pull/523)
|
||||
- U512 add/sub optimize [#521](https://github.com/paritytech/parity/pull/521)
|
||||
- Account management + geth keystore import (no utility crate added) [#509](https://github.com/paritytech/parity/pull/509)
|
||||
- Delayed UPnP initialization [#505](https://github.com/paritytech/parity/pull/505)
|
||||
- Fixing marking blocks as bad & SyncMessage bugs + small client refactoring. [#503](https://github.com/paritytech/parity/pull/503)
|
||||
- optimization of U256 [#515](https://github.com/paritytech/parity/pull/515)
|
||||
- Removed rocksdb from build scripts and instructions [#520](https://github.com/paritytech/parity/pull/520)
|
||||
- RocksDB abstraction layer + Hash index for state DB [#464](https://github.com/paritytech/parity/pull/464)
|
||||
- bloomfilter [#418](https://github.com/paritytech/parity/pull/418)
|
||||
- Fixed a race condition when connecting peer disconnects immediately [#519](https://github.com/paritytech/parity/pull/519)
|
||||
- ignore intellij idea project files as well [#518](https://github.com/paritytech/parity/pull/518)
|
||||
- updated version of unicase [#517](https://github.com/paritytech/parity/pull/517)
|
||||
- jsonrpc security, cors headers, fixed #359 [#493](https://github.com/paritytech/parity/pull/493)
|
||||
- Rust implementations to replace data tables (#161) [#482](https://github.com/paritytech/parity/pull/482)
|
||||
- fix issue with starting requested block number was not included itself [#512](https://github.com/paritytech/parity/pull/512)
|
||||
- fixed travis --org GH_TOKEN [#510](https://github.com/paritytech/parity/pull/510)
|
||||
- Improved log format [#506](https://github.com/paritytech/parity/pull/506)
|
||||
- Log address on failed connection attempt [#502](https://github.com/paritytech/parity/pull/502)
|
||||
- Bumping clippy and fixing warnings. [#501](https://github.com/paritytech/parity/pull/501)
|
||||
- Bumping versions. Fixes #496 [#500](https://github.com/paritytech/parity/pull/500)
|
||||
- Manage final user-input errors. [#494](https://github.com/paritytech/parity/pull/494)
|
||||
- Remove unneeded code, fix minor potential issue with length. [#495](https://github.com/paritytech/parity/pull/495)
|
||||
- Remove "unknown" from version string. [#488](https://github.com/paritytech/parity/pull/488)
|
||||
- Include git commit date & hash. [#486](https://github.com/paritytech/parity/pull/486)
|
||||
- Use proper version string. [#485](https://github.com/paritytech/parity/pull/485)
|
||||
- Networking fixes [#480](https://github.com/paritytech/parity/pull/480)
|
||||
- Fix potential deadlock on node table update [#484](https://github.com/paritytech/parity/pull/484)
|
||||
- Squash more warnings [#481](https://github.com/paritytech/parity/pull/481)
|
||||
- dev/test/build tools to separate crate [#477](https://github.com/paritytech/parity/pull/477)
|
||||
- Back to original slab crate [#479](https://github.com/paritytech/parity/pull/479)
|
||||
- Better user errors. [#476](https://github.com/paritytech/parity/pull/476)
|
||||
- UDP Discovery [#440](https://github.com/paritytech/parity/pull/440)
|
||||
- update readme with rust override [#475](https://github.com/paritytech/parity/pull/475)
|
||||
- fixed warnings on rust beta [#474](https://github.com/paritytech/parity/pull/474)
|
||||
- Secret store (part2 - encrypted key/value svc) [#449](https://github.com/paritytech/parity/pull/449)
|
||||
- Kill bad test. [#473](https://github.com/paritytech/parity/pull/473)
|
||||
- Make clippy an optional dependency [#422](https://github.com/paritytech/parity/pull/422)
|
||||
- parity compiling fine [#469](https://github.com/paritytech/parity/pull/469)
|
||||
- compiling ethcore on beta [#468](https://github.com/paritytech/parity/pull/468)
|
||||
- Utils compiling in beta [#467](https://github.com/paritytech/parity/pull/467)
|
||||
- Get rid of lru_cache dependency [#466](https://github.com/paritytech/parity/pull/466)
|
||||
- Add daemonization. [#459](https://github.com/paritytech/parity/pull/459)
|
||||
- Master upgrade [#448](https://github.com/paritytech/parity/pull/448)
|
||||
- Remove contributing stuff now that we have CLA bot. [#447](https://github.com/paritytech/parity/pull/447)
|
||||
- Add Morden bootnode. [#446](https://github.com/paritytech/parity/pull/446)
|
||||
- beta fixes to master [#441](https://github.com/paritytech/parity/pull/441)
|
||||
- Secret store (part1 - key management) [#423](https://github.com/paritytech/parity/pull/423)
|
||||
- Use 1100000 as the homestead transition, fix build instructions. [#438](https://github.com/paritytech/parity/pull/438)
|
||||
- More sync and propagation fixes [#420](https://github.com/paritytech/parity/pull/420)
|
||||
- back to cargo crates [#436](https://github.com/paritytech/parity/pull/436)
|
||||
- Fixing clippy warnings [#435](https://github.com/paritytech/parity/pull/435)
|
||||
- preserving root cargo lock [#434](https://github.com/paritytech/parity/pull/434)
|
||||
- Nightly fix [#432](https://github.com/paritytech/parity/pull/432)
|
||||
- nightly fixes [#431](https://github.com/paritytech/parity/pull/431)
|
||||
- Delay Homestead transition from 1,000,000. [#429](https://github.com/paritytech/parity/pull/429)
|
||||
- Nightly fix effort (still should fail) [#428](https://github.com/paritytech/parity/pull/428)
|
||||
- clippy version update, docopt-macro moving to fork [#425](https://github.com/paritytech/parity/pull/425)
|
||||
- Network/Sync fixes and optimizations [#416](https://github.com/paritytech/parity/pull/416)
|
||||
- Use latest era instead of end era as journal marker [#414](https://github.com/paritytech/parity/pull/414)
|
||||
- api changes [#402](https://github.com/paritytech/parity/pull/402)
|
||||
- Option for no init nodes. [#408](https://github.com/paritytech/parity/pull/408)
|
||||
- Fixed block_bodies not returning a list [#406](https://github.com/paritytech/parity/pull/406)
|
||||
- Fix test. [#405](https://github.com/paritytech/parity/pull/405)
|
||||
- Allow path to be configured. [#404](https://github.com/paritytech/parity/pull/404)
|
||||
- Upnp [#400](https://github.com/paritytech/parity/pull/400)
|
||||
- eth_syncing, fixed #397 [#398](https://github.com/paritytech/parity/pull/398)
|
||||
- Using modified version of ctrlc that catches SIGTERM [#399](https://github.com/paritytech/parity/pull/399)
|
||||
- Catching panics. [#396](https://github.com/paritytech/parity/pull/396)
|
||||
- jsonrpc [#391](https://github.com/paritytech/parity/pull/391)
|
||||
- Externalities tests (still clumsy) [#394](https://github.com/paritytech/parity/pull/394)
|
||||
- excluding test code itself from coverage [#395](https://github.com/paritytech/parity/pull/395)
|
||||
- Additional tweaks to options. [#390](https://github.com/paritytech/parity/pull/390)
|
||||
- --chain option for setting which network to go on. [#388](https://github.com/paritytech/parity/pull/388)
|
||||
- Ethash unit tests final [#387](https://github.com/paritytech/parity/pull/387)
|
||||
- jsonrpc [#374](https://github.com/paritytech/parity/pull/374)
|
||||
- Editorconfig file. [#384](https://github.com/paritytech/parity/pull/384)
|
||||
- Coverage effort [in progress] [#382](https://github.com/paritytech/parity/pull/382)
|
||||
- making root kcov runner simular to the one running on CI [#380](https://github.com/paritytech/parity/pull/380)
|
||||
- add gcc as a dependency to dockerfiles [#381](https://github.com/paritytech/parity/pull/381)
|
||||
- Check for handshake expiration before attempting connection replace [#375](https://github.com/paritytech/parity/pull/375)
|
||||
- Blocks propagation [#364](https://github.com/paritytech/parity/pull/364)
|
||||
- Network params. [#376](https://github.com/paritytech/parity/pull/376)
|
||||
- Add parity-node-zero to bootnodes. [#373](https://github.com/paritytech/parity/pull/373)
|
||||
- kcov uses travis_job_id instead of coveralls token [#370](https://github.com/paritytech/parity/pull/370)
|
||||
- Add parity-node-zero.ethcore.io to boot nodes. [#371](https://github.com/paritytech/parity/pull/371)
|
||||
|
||||
## Parity [v1.0.0-rc1](https://github.com/paritytech/parity/releases/tag/v1.0.0-rc1) (2016-03-15)
|
||||
|
||||
First Parity 1.0.0 release candidate.
|
||||
|
||||
- Version 1.0 in beta [#712](https://github.com/paritytech/parity/pull/712)
|
||||
- Fix test for beta [#617](https://github.com/paritytech/parity/pull/617)
|
||||
- JournalDB fix option 1 for beta [#614](https://github.com/paritytech/parity/pull/614)
|
||||
- Failing test. [#606](https://github.com/paritytech/parity/pull/606)
|
||||
- Fix transition points [#604](https://github.com/paritytech/parity/pull/604)
|
||||
- (BETA) Update README.md [#549](https://github.com/paritytech/parity/pull/549)
|
||||
- (BETA) instructions for beta release channel [#456](https://github.com/paritytech/parity/pull/456)
|
||||
- (BETA) fix nightly - remerge [#454](https://github.com/paritytech/parity/pull/454)
|
||||
- (BETA) fixing nightly version for beta [#452](https://github.com/paritytech/parity/pull/452)
|
||||
@@ -1,154 +0,0 @@
|
||||
Note: Parity 1.1 reached End-of-Life on 2016-08-12 (EOL).
|
||||
|
||||
## Parity [v1.1.0](https://github.com/paritytech/parity/releases/tag/v1.1.0) (2016-05-02)
|
||||
|
||||
Parity 1.1.0 introduces:
|
||||
|
||||
- Transaction tracing. Parity now optionally indexes & stores message-call/"internal transaction" information and provides additional RPC for querying.
|
||||
- Web interface for logs, status & JSON RPC.
|
||||
- Improved JSON RPC compatibility.
|
||||
- Reduced memory footprint.
|
||||
- Optimized EVM interpreter performance.
|
||||
|
||||
Full Changes:
|
||||
|
||||
- Exposing default extra data via ethcore RPC [#1032](https://github.com/paritytech/parity/pull/1032)
|
||||
- Net etiquette [#1028](https://github.com/paritytech/parity/pull/1028)
|
||||
- Bumping clippy & fixing warnings [#1024](https://github.com/paritytech/parity/pull/1024)
|
||||
- Tracedb interface && cli [#997](https://github.com/paritytech/parity/pull/997)
|
||||
- Switching to geth-attach supporting version of rpc core and server [#1022](https://github.com/paritytech/parity/pull/1022)
|
||||
- Fixing status page displaying homestead [#1020](https://github.com/paritytech/parity/pull/1020)
|
||||
- Core tracedb functionality. [#996](https://github.com/paritytech/parity/pull/996)
|
||||
- RPC method for supported modules [#1019](https://github.com/paritytech/parity/pull/1019)
|
||||
- Updating status page [#1015](https://github.com/paritytech/parity/pull/1015)
|
||||
- Disabling wallet [#1017](https://github.com/paritytech/parity/pull/1017)
|
||||
- More detailed fatal error reporting [#1016](https://github.com/paritytech/parity/pull/1016)
|
||||
- Support 'pending' block in RPC [#1007](https://github.com/paritytech/parity/pull/1007)
|
||||
- Enable pending block when there is local transaction pending. [#1005](https://github.com/paritytech/parity/pull/1005)
|
||||
- updating key files permissions on save [#1010](https://github.com/paritytech/parity/pull/1010)
|
||||
- IPC JSON RPC (for external interface) [#1009](https://github.com/paritytech/parity/pull/1009)
|
||||
- Fixing Firefox authorization issues [#1013](https://github.com/paritytech/parity/pull/1013)
|
||||
- cargo update [#1012](https://github.com/paritytech/parity/pull/1012)
|
||||
- Switching to rust-url@1.0.0 [#1011](https://github.com/paritytech/parity/pull/1011)
|
||||
- Exception handling in RPC & WebApps [#988](https://github.com/paritytech/parity/pull/988)
|
||||
- Fixed uint deserialization from hex [#1008](https://github.com/paritytech/parity/pull/1008)
|
||||
- Tweak timeout and packet size to handle slow networks better [#1004](https://github.com/paritytech/parity/pull/1004)
|
||||
- db key is generic and can be made smaller [#1006](https://github.com/paritytech/parity/pull/1006)
|
||||
- IPC with new serialization [#998](https://github.com/paritytech/parity/pull/998)
|
||||
- make jsonrpc api engine agnostic [#1001](https://github.com/paritytech/parity/pull/1001)
|
||||
- updated cargo.lock [#1002](https://github.com/paritytech/parity/pull/1002)
|
||||
- updated parity dependencies [#993](https://github.com/paritytech/parity/pull/993)
|
||||
- Auto (with codegen) binary serializer [#980](https://github.com/paritytech/parity/pull/980)
|
||||
- Fixing transaction queue last_nonces update [#995](https://github.com/paritytech/parity/pull/995)
|
||||
- import route contains ommited blocks [#994](https://github.com/paritytech/parity/pull/994)
|
||||
- fixed encoding 0u8 [#992](https://github.com/paritytech/parity/pull/992)
|
||||
- Use latest netstats [#989](https://github.com/paritytech/parity/pull/989)
|
||||
- RPC shared external miner [#984](https://github.com/paritytech/parity/pull/984)
|
||||
- Additional RPC methods for settings [#983](https://github.com/paritytech/parity/pull/983)
|
||||
- Fixing transaction_queue deadlock [#985](https://github.com/paritytech/parity/pull/985)
|
||||
- Refactoring of `parity/main.rs` [#981](https://github.com/paritytech/parity/pull/981)
|
||||
- Fixing clippy warnings. [#982](https://github.com/paritytech/parity/pull/982)
|
||||
- Bumping status page [#977](https://github.com/paritytech/parity/pull/977)
|
||||
- querying extras separated to its own module [#972](https://github.com/paritytech/parity/pull/972)
|
||||
- Exposing application logs via RPC. [#976](https://github.com/paritytech/parity/pull/976)
|
||||
- Addressing binary serialization for db types [#966](https://github.com/paritytech/parity/pull/966)
|
||||
- removed redundant unwraps [#935](https://github.com/paritytech/parity/pull/935)
|
||||
- fixed transaction queue merge conflict [#975](https://github.com/paritytech/parity/pull/975)
|
||||
- Configurable limit for transaction queue (CLI & Ethcore-RPC) [#974](https://github.com/paritytech/parity/pull/974)
|
||||
- Enforce limit caused `last_nonce` to return incorrect values. [#973](https://github.com/paritytech/parity/pull/973)
|
||||
- Even more detailed errors for transaction queue [#969](https://github.com/paritytech/parity/pull/969)
|
||||
- temporary fix of panic in blockchain garbage collection [#970](https://github.com/paritytech/parity/pull/970)
|
||||
- IPC codegen - some minor fixes & enhancements [#967](https://github.com/paritytech/parity/pull/967)
|
||||
- Additional logging for transactions [#968](https://github.com/paritytech/parity/pull/968)
|
||||
- refactored blockchain extras keys building [#963](https://github.com/paritytech/parity/pull/963)
|
||||
- Using hyper-mio branch in webapps. [#957](https://github.com/paritytech/parity/pull/957)
|
||||
- Remove nanomsg from build-dependencies [#965](https://github.com/paritytech/parity/pull/965)
|
||||
- Fix build for --target=armv7-unknown-linux-gnueabihf [#964](https://github.com/paritytech/parity/pull/964)
|
||||
- IPC RPC codegen extra feature [#962](https://github.com/paritytech/parity/pull/962)
|
||||
- IPC RPC codegen for generic implementation [#961](https://github.com/paritytech/parity/pull/961)
|
||||
- using db_path directory when upgrading [#960](https://github.com/paritytech/parity/pull/960)
|
||||
- IPC hypervisor [#958](https://github.com/paritytech/parity/pull/958)
|
||||
- Removing a transaction from queue now removes all from this sender with lower nonces. [#950](https://github.com/paritytech/parity/pull/950)
|
||||
- bump status page version 0.1.7 [#955](https://github.com/paritytech/parity/pull/955)
|
||||
- Changing cors header to be optional [#956](https://github.com/paritytech/parity/pull/956)
|
||||
- Update ARM Dockerfile [#959](https://github.com/paritytech/parity/pull/959)
|
||||
- Sensible gas limits for eth_sendTransaction [#953](https://github.com/paritytech/parity/pull/953)
|
||||
- Fix upgrade script and make parity run when no .parity dir. [#954](https://github.com/paritytech/parity/pull/954)
|
||||
- Tracing and docs for --pruning=auto. [#952](https://github.com/paritytech/parity/pull/952)
|
||||
- IPC serialization for custom parameters [#946](https://github.com/paritytech/parity/pull/946)
|
||||
- default filter from block should be Latest, not Earliest [#948](https://github.com/paritytech/parity/pull/948)
|
||||
- README.md: removes sudo from multirust installation [#943](https://github.com/paritytech/parity/pull/943)
|
||||
- Disable long lines formatting + ethash example. [#939](https://github.com/paritytech/parity/pull/939)
|
||||
- Ethcore-specific RPC methods for altering miner parameters. [#934](https://github.com/paritytech/parity/pull/934)
|
||||
- Use ethcore nanomsg bindings [#941](https://github.com/paritytech/parity/pull/941)
|
||||
- Update IPC codegen to latest syntax libs [#938](https://github.com/paritytech/parity/pull/938)
|
||||
- IPC documentation [#937](https://github.com/paritytech/parity/pull/937)
|
||||
- Bumping clippy and fixing warnings. [#936](https://github.com/paritytech/parity/pull/936)
|
||||
- Pruning auto [#927](https://github.com/paritytech/parity/pull/927)
|
||||
- IPC persistent client link [#933](https://github.com/paritytech/parity/pull/933)
|
||||
- IPC persistent client link [#930](https://github.com/paritytech/parity/pull/930)
|
||||
- IPC handshake (negotiating protocol/api version) [#928](https://github.com/paritytech/parity/pull/928)
|
||||
- Upgrade logic between versions [#914](https://github.com/paritytech/parity/pull/914)
|
||||
- executive tracing cleanup [#903](https://github.com/paritytech/parity/pull/903)
|
||||
- Ethcore-specific RPC methods [#923](https://github.com/paritytech/parity/pull/923)
|
||||
- Parameter to allow user to force the sealing mechanism [#918](https://github.com/paritytech/parity/pull/918)
|
||||
- updated dependencies [#921](https://github.com/paritytech/parity/pull/921)
|
||||
- Fixed send transaction deadlock [#920](https://github.com/paritytech/parity/pull/920)
|
||||
- --unlock is comma-delimited. [#916](https://github.com/paritytech/parity/pull/916)
|
||||
- fixed eth_getLogs [#915](https://github.com/paritytech/parity/pull/915)
|
||||
- create provided custom dir for keys if none [#912](https://github.com/paritytech/parity/pull/912)
|
||||
- spec loading cleanup [#858](https://github.com/paritytech/parity/pull/858)
|
||||
- WebApps HTTP Basic Auth Support [#906](https://github.com/paritytech/parity/pull/906)
|
||||
- Removing match on constant [#888](https://github.com/paritytech/parity/pull/888)
|
||||
- Update auth.rs [#907](https://github.com/paritytech/parity/pull/907)
|
||||
- Enabling webapps compilation by default [#904](https://github.com/paritytech/parity/pull/904)
|
||||
- fixed #895 [#898](https://github.com/paritytech/parity/pull/898)
|
||||
- Support for compile-time included WebApplications. [#899](https://github.com/paritytech/parity/pull/899)
|
||||
- Propagate transaction queue [#894](https://github.com/paritytech/parity/pull/894)
|
||||
- Use new json RPC server [#901](https://github.com/paritytech/parity/pull/901)
|
||||
- Gracefully dying when trying to enable RPC and app is compiled without it. [#900](https://github.com/paritytech/parity/pull/900)
|
||||
- Additional logging and friendlier error messages [#893](https://github.com/paritytech/parity/pull/893)
|
||||
- Avoid signalling readiness when app is about to be closed. [#897](https://github.com/paritytech/parity/pull/897)
|
||||
- fixed #875 and added tests for eth_sendTransaction [#890](https://github.com/paritytech/parity/pull/890)
|
||||
- passing key path to all invocations [#891](https://github.com/paritytech/parity/pull/891)
|
||||
- Fixed eth_call nonce and gas handling [#892](https://github.com/paritytech/parity/pull/892)
|
||||
- ipc rpc with nano transport (simple duplex) [#886](https://github.com/paritytech/parity/pull/886)
|
||||
- Bumping clippy and fixing warnings [#889](https://github.com/paritytech/parity/pull/889)
|
||||
- More descriptive expectations to transaction queue consistency. [#878](https://github.com/paritytech/parity/pull/878)
|
||||
- uint bug - replace add with or [#879](https://github.com/paritytech/parity/pull/879)
|
||||
- Fixing typo in bigint [#877](https://github.com/paritytech/parity/pull/877)
|
||||
- update misleading cli help msg for author [#874](https://github.com/paritytech/parity/pull/874)
|
||||
- Find geth data store cross-platform. [#871](https://github.com/paritytech/parity/pull/871)
|
||||
- Import geth 1.4.0 keys [#872](https://github.com/paritytech/parity/pull/872)
|
||||
- Syntax helpers for IPC RPC (part 2) [#854](https://github.com/paritytech/parity/pull/854)
|
||||
- Fixed bootnode URL and error message [#870](https://github.com/paritytech/parity/pull/870)
|
||||
- replace popcnt with mov (861) [#867](https://github.com/paritytech/parity/pull/867)
|
||||
- weekly dependencies update [#865](https://github.com/paritytech/parity/pull/865)
|
||||
- Remove unused mut [#866](https://github.com/paritytech/parity/pull/866)
|
||||
- fixed #855 [#864](https://github.com/paritytech/parity/pull/864)
|
||||
- simplified trace from functions, removed clippy warnings [#862](https://github.com/paritytech/parity/pull/862)
|
||||
- Update deprecated HashDB methods in docs. [#857](https://github.com/paritytech/parity/pull/857)
|
||||
- refactored loading transaction json tests [#853](https://github.com/paritytech/parity/pull/853)
|
||||
- reorganised price info lookup [#852](https://github.com/paritytech/parity/pull/852)
|
||||
- Publish locally-made transactions to peers. [#850](https://github.com/paritytech/parity/pull/850)
|
||||
- Add generalbeck's token [#847](https://github.com/paritytech/parity/pull/847)
|
||||
- Fix response for mining. [#846](https://github.com/paritytech/parity/pull/846)
|
||||
- USD-based pricing of gas. [#843](https://github.com/paritytech/parity/pull/843)
|
||||
- Parity can accept older work packages [#811](https://github.com/paritytech/parity/pull/811)
|
||||
- Caching for computing seed hashes (#541) [#841](https://github.com/paritytech/parity/pull/841)
|
||||
- checking transaction queue for pending transaction [#838](https://github.com/paritytech/parity/pull/838)
|
||||
- refactored loading of state tests [#817](https://github.com/paritytech/parity/pull/817)
|
||||
- tests for deserialization of transaction from issue #835 [#837](https://github.com/paritytech/parity/pull/837)
|
||||
- unlocks with no expiration [on top of 833] [#834](https://github.com/paritytech/parity/pull/834)
|
||||
- Unlock accounts on CLI. [#833](https://github.com/paritytech/parity/pull/833)
|
||||
- Make BlockNumber optional, fix eth_call [#829](https://github.com/paritytech/parity/pull/829)
|
||||
- Test socket to common test code (ethcore-devtools) [#831](https://github.com/paritytech/parity/pull/831)
|
||||
- Use network id for the web3_net_version return. [#822](https://github.com/paritytech/parity/pull/822)
|
||||
- json-rpc web3_sha3 [#824](https://github.com/paritytech/parity/pull/824)
|
||||
- remove some unused files [#819](https://github.com/paritytech/parity/pull/819)
|
||||
- debug symbols for master/beta [#818](https://github.com/paritytech/parity/pull/818)
|
||||
- Syntax helpers for IPC RPC [#809](https://github.com/paritytech/parity/pull/809)
|
||||
- refactored loading of execution tests [#803](https://github.com/paritytech/parity/pull/803)
|
||||
- Rustfmt.toml [#805](https://github.com/paritytech/parity/pull/805)
|
||||
- install-partiy runs brew reinstall parity on osx [#810](https://github.com/paritytech/parity/pull/810)
|
||||
- Fix mining from spinning [#807](https://github.com/paritytech/parity/pull/807)
|
||||
@@ -1,469 +0,0 @@
|
||||
Note: Parity 1.10 reached End-of-Life on 2018-07-18 (EOL).
|
||||
|
||||
## Parity [v1.10.9](https://github.com/paritytech/parity/releases/tag/v1.10.9) (2018-07-07)
|
||||
|
||||
Parity 1.10.9 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Stable: 1.10.9 backports ([#9016](https://github.com/paritytech/parity/pull/9016))
|
||||
- Parity-version: bump stable to 1.10.9
|
||||
- Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity/pull/8884))
|
||||
- Add support for --chain tobalaba ([#8870](https://github.com/paritytech/parity/pull/8870))
|
||||
- Add support for --chain tobalaba
|
||||
- Only return error log for rustls ([#9025](https://github.com/paritytech/parity/pull/9025))
|
||||
- Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity/pull/8998))
|
||||
- Aura: only report after checking for repeated skipped primaries
|
||||
- Aura: refactor duplicate code for getting epoch validator set
|
||||
- Aura: verify_external: report on validator set contract instance
|
||||
- Aura: use correct validator set epoch number when reporting
|
||||
- Aura: use epoch set when verifying blocks
|
||||
- Aura: report skipped primaries when generating seal
|
||||
- Aura: handle immediate transitions
|
||||
- Aura: don't report skipped steps from genesis to first block
|
||||
- Aura: fix reporting test
|
||||
- Aura: refactor duplicate code to handle immediate_transitions
|
||||
- Aura: let reporting fail on verify_block_basic
|
||||
- Aura: add comment about possible failure of reporting
|
||||
|
||||
## Parity [v1.10.8](https://github.com/paritytech/parity/releases/tag/v1.10.8) (2018-06-29)
|
||||
|
||||
Parity 1.10.8 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports ([#8986](https://github.com/paritytech/parity/pull/8986))
|
||||
- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 ([#8984](https://github.com/paritytech/parity/pull/8984))
|
||||
- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530
|
||||
- Snap: use plugin rust
|
||||
- Fix deadlock in blockchain. ([#8977](https://github.com/paritytech/parity/pull/8977))
|
||||
- Remove js-glue from workspace
|
||||
- Bump stable to 1.10.8 ([#8951](https://github.com/paritytech/parity/pull/8951))
|
||||
- Parity-version: bump stable to 1.10.8
|
||||
- Update ropsten.json ([#8926](https://github.com/paritytech/parity/pull/8926))
|
||||
- Scripts: minor improvements ([#8930](https://github.com/paritytech/parity/pull/8930))
|
||||
- CI: enable 'latest' docker tag on master pipeline
|
||||
- CI: mark both beta and stable as stable snap.
|
||||
- CI: sign all windows binaries
|
||||
- Scripts: remove whisper target not available in stable
|
||||
- Scripts: fix gitlab strip binaries
|
||||
- Scripts: fix docker build tag on latest using master ([#8952](https://github.com/paritytech/parity/pull/8952))
|
||||
- Rpc: cap gas limit of local calls ([#8943](https://github.com/paritytech/parity/pull/8943))
|
||||
|
||||
## Parity [v1.10.7](https://github.com/paritytech/parity/releases/tag/v1.10.7) (2018-06-20)
|
||||
|
||||
Parity 1.10.7 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports ([#8919](https://github.com/paritytech/parity/pull/8919))
|
||||
- Fixed AuthorityRound deadlock on shutdown, closes [#8088](https://github.com/paritytech/parity/issues/8088) ([#8803](https://github.com/paritytech/parity/pull/8803))
|
||||
- CI: Fix docker tags ([#8822](https://github.com/paritytech/parity/pull/8822))
|
||||
- Scripts: enable docker builds for beta and stable
|
||||
- Scripts: docker latest should be beta not master
|
||||
- Scripts: docker latest is master
|
||||
- Fix concurrent access to signer queue ([#8854](https://github.com/paritytech/parity/pull/8854))
|
||||
- Fix concurrent access to signer queue
|
||||
- Put request back to the queue if confirmation failed
|
||||
- Typo: fix docs and rename functions to be more specific
|
||||
- Change trace info "Transaction" -> "Request"
|
||||
- Add new ovh bootnodes and fix port for foundation bootnode 3.2 ([#8886](https://github.com/paritytech/parity/pull/8886))
|
||||
- Add new ovh bootnodes and fix port for foundation bootnode 3.2
|
||||
- Remove old bootnodes.
|
||||
- Remove duplicate 1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082
|
||||
- Block 0 is valid in queries ([#8891](https://github.com/paritytech/parity/pull/8891))
|
||||
- Update jsonrpc libs, fixed ipc leak, closes [#8774](https://github.com/paritytech/parity/issues/8774) ([#8876](https://github.com/paritytech/parity/pull/8876))
|
||||
- Add ETC Cooperative-run load balanced parity node ([#8892](https://github.com/paritytech/parity/pull/8892))
|
||||
- Minor fix in chain supplier and light provider ([#8906](https://github.com/paritytech/parity/pull/8906))
|
||||
- Fix chain supplier increment
|
||||
- Fix light provider block_headers
|
||||
- Parity-version: stable release 1.10.7 ([#8855](https://github.com/paritytech/parity/pull/8855))
|
||||
- Cherry-pick network-specific release flag ([#8821](https://github.com/paritytech/parity/pull/8821))
|
||||
- Parity-version: bump stable to 1.10.7
|
||||
|
||||
## Parity [v1.10.6](https://github.com/paritytech/parity/releases/tag/v1.10.6) (2018-06-05)
|
||||
|
||||
Parity 1.10.6 is a security-relevant release. Please upgrade your nodes as soon as possible.
|
||||
|
||||
If you can not upgrade to 1.10+ yet, please use the following branches and build your own binaries from source:
|
||||
|
||||
- git checkout [old-stable-1.9](https://github.com/paritytech/parity/tree/old-stable-1.9) # `v1.9.8` (EOL)
|
||||
- git checkout [old-stable-1.8](https://github.com/paritytech/parity/tree/old-stable-1.8) # `v1.8.12` (EOL)
|
||||
- git checkout [old-stable-1.7](https://github.com/paritytech/parity/tree/old-stable-1.7) # `v1.7.14` (EOL)
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Parity-version: bump stable to 1.10.6 ([#8805](https://github.com/paritytech/parity/pull/8805))
|
||||
- Parity-version: bump stable to 1.10.6
|
||||
- Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity/pull/8802))
|
||||
- Update shell32-sys to fix windows build ([#8793](https://github.com/paritytech/parity/pull/8793))
|
||||
- Backports ([#8782](https://github.com/paritytech/parity/pull/8782))
|
||||
- Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528))
|
||||
- Fix #8468
|
||||
- Use U256::max_value() instead
|
||||
- Fix again
|
||||
- Also change initial transaction gas
|
||||
- Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity/pull/8641))
|
||||
- Prefix uint fmt with `0x` with alternate flag
|
||||
- Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity/pull/8683))
|
||||
- Set the request index to that of the current request
|
||||
- Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity/pull/8541))
|
||||
- Network-devp2p: sort nodes in node table using last contact data
|
||||
- Network-devp2p: rename node contact types in node table json output
|
||||
- Network-devp2p: fix node table tests
|
||||
- Network-devp2p: note node failure when failed to establish connection
|
||||
- Network-devp2p: handle UselessPeer error
|
||||
- Network-devp2p: note failure when marking node as useless
|
||||
- Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity/pull/8686))
|
||||
- Parity: bump stable version to 1.10.5 ([#8749](https://github.com/paritytech/parity/pull/8749))
|
||||
- Parity: bump stable version to 1.10.5
|
||||
- Fix failing doc tests running on non-code
|
||||
|
||||
## Parity [v1.10.4](https://github.com/paritytech/parity/releases/tag/v1.10.4) (2018-05-15)
|
||||
|
||||
Parity 1.10.4 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports ([#8623](https://github.com/paritytech/parity/pull/8623))
|
||||
- Fix account list double 0x display ([#8596](https://github.com/paritytech/parity/pull/8596))
|
||||
- Remove unused self import
|
||||
- Fix account list double 0x display
|
||||
- Trace precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity/pull/8486))
|
||||
- Trace precompiled contracts when the transfer value is not zero
|
||||
- Add tests for precompiled CALL tracing
|
||||
- Use byzantium test machine for the new test
|
||||
- Add notes in comments on why we don't trace all precompileds
|
||||
- Use is_transferred instead of transferred
|
||||
- Gitlab test script fixes ([#8573](https://github.com/paritytech/parity/pull/8573))
|
||||
- Exclude /docs from modified files.
|
||||
- Ensure all references in the working tree are available
|
||||
- Remove duplicated line from test script
|
||||
- Bump stable to 1.10.4 ([#8626](https://github.com/paritytech/parity/pull/8626))
|
||||
- Allow stable snaps to be stable. ([#8582](https://github.com/paritytech/parity/pull/8582))
|
||||
|
||||
## Parity [v1.10.3](https://github.com/paritytech/parity/releases/tag/v1.10.3) (2018-05-08)
|
||||
|
||||
Parity 1.10.3 marks the first stable release on the 1.10 track. Among others, it improves performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports ([#8557](https://github.com/paritytech/parity/pull/8557))
|
||||
- Update wasmi and pwasm-utils ([#8493](https://github.com/paritytech/parity/pull/8493))
|
||||
- Update wasmi to 0.2
|
||||
- Update pwasm-utils to 0.1.5
|
||||
- Fetching logs by hash in blockchain database ([#8463](https://github.com/paritytech/parity/pull/8463))
|
||||
- Fetch logs by hash in blockchain database
|
||||
- Fix tests
|
||||
- Add unit test for branch block logs fetching
|
||||
- Add docs that blocks must already be sorted
|
||||
- Handle branch block cases properly
|
||||
- typo: empty -> is_empty
|
||||
- Remove return_empty_if_none by using a closure
|
||||
- Use BTreeSet to avoid sorting again
|
||||
- Move is_canon to BlockChain
|
||||
- typo: pass value by reference
|
||||
- Use loop and wrap inside blocks to simplify the code
|
||||
- typo: missed a comment
|
||||
- Pass on storage keys tracing to handle the case when it is not modified ([#8491](https://github.com/paritytech/parity/pull/8491))
|
||||
- Pass on storage keys even if it is not modified
|
||||
- typo: account and storage query `to_pod_diff` builds both `touched_addresses` merge and storage keys merge.
|
||||
- Fix tests
|
||||
- Use state query directly because of suicided accounts
|
||||
- Fix a RefCell borrow issue
|
||||
- Add tests for unmodified storage trace
|
||||
- Address grumbles
|
||||
- typo: remove unwanted empty line
|
||||
- ensure_cached compiles with the original signature
|
||||
- Enable WebAssembly and Byzantium for Ellaism ([#8520](https://github.com/paritytech/parity/pull/8520))
|
||||
- Enable WebAssembly and Byzantium for Ellaism
|
||||
- Fix indentation
|
||||
- Remove empty lines
|
||||
- Fix compilation.
|
||||
- Stabilize 1.10.3 ([#8474](https://github.com/paritytech/parity/pull/8474))
|
||||
- Stabelize 1.10
|
||||
- Bump stable to 1.10.3
|
||||
- Update Gitlab scripts
|
||||
- Fix snap builds ([#8483](https://github.com/paritytech/parity/pull/8483))
|
||||
- Fix docker build ([#8462](https://github.com/paritytech/parity/pull/8462))
|
||||
- Use `master` as Docker's `latest` (`beta-release` is not used anymore)
|
||||
|
||||
## Parity [v1.10.2](https://github.com/paritytech/parity/releases/tag/v1.10.2) (2018-04-24)
|
||||
|
||||
Parity 1.10.2 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Update Parity beta to 1.10.2 + Backports ([#8455](https://github.com/paritytech/parity/pull/8455))
|
||||
- Update Parity beta to 1.10.2
|
||||
- Allow 32-bit pipelines to fail ([#8454](https://github.com/paritytech/parity/pull/8454))
|
||||
- Disable 32-bit targets for Gitlab
|
||||
- Rename Linux pipelines
|
||||
- Update wasmi ([#8452](https://github.com/paritytech/parity/pull/8452))
|
||||
- Fix Cargo.lock
|
||||
- Backports ([#8450](https://github.com/paritytech/parity/pull/8450))
|
||||
- Use forked app_dirs crate for reverted Windows dir behavior ([#8438](https://github.com/paritytech/parity/pull/8438))
|
||||
- Remove unused app_dirs dependency in CLI
|
||||
- Use forked app_dirs crate for reverted Windows dir behavior
|
||||
- Remove Tendermint extra_info due to seal inconsistencies ([#8367](https://github.com/paritytech/parity/pull/8367))
|
||||
- Handle queue import errors a bit more gracefully ([#8385](https://github.com/paritytech/parity/pull/8385))
|
||||
- Improve VM executor stack size estimation rules ([#8439](https://github.com/paritytech/parity/pull/8439))
|
||||
- Improve VM executor stack size estimation rules
|
||||
- Typo: docs add "(Debug build)" comment
|
||||
- Fix an off by one typo and set minimal stack size
|
||||
- Use saturating_sub to avoid potential overflow
|
||||
|
||||
## Parity [v1.10.1](https://github.com/paritytech/parity/releases/tag/v1.10.1) (2018-04-17)
|
||||
|
||||
Parity 1.10.1 is a bug-fix release to improve performance and stability. Among other changes, you can now use `--warp-barrier [BLOCK]` to specify a minimum block number to `--warp` to. This is useful in cases where clients restore to outdated snapshots far behind the latest chain head.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Bump beta to 1.10.1 ([#8350](https://github.com/paritytech/parity/pull/8350))
|
||||
- Bump beta to 1.10.1
|
||||
- Unflag critical release
|
||||
- Backports ([#8346](https://github.com/paritytech/parity/pull/8346))
|
||||
- Warp-only sync with warp-barrier [blocknumber] flag. ([#8228](https://github.com/paritytech/parity/pull/8228))
|
||||
- Warp-only sync with warp-after [blocknumber] flag.
|
||||
- Fix tests.
|
||||
- Fix configuration tests.
|
||||
- Rename to warp barrier.
|
||||
- Allow unsafe js eval on Parity Wallet. ([#8204](https://github.com/paritytech/parity/pull/8204))
|
||||
- Update musicoin spec in line with gmc v2.6.2 ([#8242](https://github.com/paritytech/parity/pull/8242))
|
||||
- Supress TemporaryInvalid verification failures. ([#8256](https://github.com/paritytech/parity/pull/8256))
|
||||
- Include suicided accounts in state diff ([#8297](https://github.com/paritytech/parity/pull/8297))
|
||||
- Include suicided accounts in state diff
|
||||
- Shorten form match -> if let
|
||||
- Test suicide trace diff in State
|
||||
- Replace_home for password_files, reserved_peers and log_file ([#8324](https://github.com/paritytech/parity/pull/8324))
|
||||
- Replace_home for password_files, reserved_peers and log_file
|
||||
- Typo: arg_log_file is Option
|
||||
- Enable UI by default, but only display info page.
|
||||
- Fix test.
|
||||
- Fix naming and remove old todo.
|
||||
- Change "wallet" with "browser UI"
|
||||
- Change name Wallet -> UI ([#8164](https://github.com/paritytech/parity/pull/8164)) ([#8205](https://github.com/paritytech/parity/pull/8205))
|
||||
- Change name Wallet -> UI
|
||||
- Make warning bold
|
||||
- Backport [#8099](https://github.com/paritytech/parity/pull/8099) ([#8132](https://github.com/paritytech/parity/pull/8132))
|
||||
- WASM libs ([#8220](https://github.com/paritytech/parity/pull/8220))
|
||||
- Bump wasm libs ([#8171](https://github.com/paritytech/parity/pull/8171))
|
||||
- Bump wasmi version ([#8209](https://github.com/paritytech/parity/pull/8209))
|
||||
- Update hyper to 0.11.24 ([#8203](https://github.com/paritytech/parity/pull/8203))
|
||||
- Updated jsonrpc to include latest backports (beta) ([#8181](https://github.com/paritytech/parity/pull/8181))
|
||||
- Updated jsonrpc to include latest backports
|
||||
- Update dependencies.
|
||||
|
||||
## Parity [v1.10.0](https://github.com/paritytech/parity/releases/tag/v1.10.0) (2018-03-22)
|
||||
|
||||
This is the Parity 1.10.0-beta release! Cool!
|
||||
|
||||
### Disabling the Parity Wallet
|
||||
|
||||
The **Parity Wallet (a.k.a. "UI") is now disabled by default**. We are preparing to split the wallet from the core client.
|
||||
|
||||
To reactivate the parity wallet, you have to run Parity either with `parity --force-ui` (not recommended) or `parity ui` (deprecated) from the command line. Or, if you feel super fancy and want to test our pre-releases of the stand-alone electron wallet, head over to the [Parity-JS repositories and check the releases](https://github.com/Parity-JS/shell/releases).
|
||||
|
||||
Further reading:
|
||||
|
||||
- [Docs: Parity Wallet](https://wiki.parity.io/Parity-Wallet)
|
||||
- [Docs: How to customize Parity UI?](https://wiki.parity.io/FAQ-Customize-Parity-UI.html)
|
||||
- [Github: Parity-JS](https://github.com/parity-js)
|
||||
|
||||
### Introducing the Wasm VM
|
||||
|
||||
We are excited to announce support for **Wasm Smart Contracts on Kovan network**. The hard-fork to activate the Wasm-VM will take place on block `6_600_000`.
|
||||
|
||||
To enable Wasm contracts on your custom network, just schedule a `wasmActivationTransition` at your favorite block number (e.g., `42`, `666`, or `0xbada55`). To hack your first Wasm smart contracts in Rust, have a look at the [Parity Wasm Tutorials](https://github.com/paritytech/pwasm-tutorial).
|
||||
|
||||
Further reading:
|
||||
|
||||
- [Docs: WebAssembly (wasm)](https://wiki.parity.io/WebAssembly-Home)
|
||||
- [Docs: Wasm VM Design](https://wiki.parity.io/WebAssembly-Design)
|
||||
- [Docs: Wasm tutorials and examples](https://wiki.parity.io/WebAssembly-Links)
|
||||
|
||||
### Empty step messages in PoA
|
||||
|
||||
To **reduce blockchain bloat, proof-of-authority networks can now enable _empty step messages_ which replace empty blocks**. Each step message will be signed and broadcasted by the issuing authorities, and included and rewarded in the next non-empty block.
|
||||
|
||||
To enable empty step messages, set the `emptyStepsTransition` to your favorite block number. You can also specify a maximum number of empty steps with `maximumEmptySteps` in your chain spec.
|
||||
|
||||
### Other noteworthy changes
|
||||
|
||||
We removed the old database migrations from 2016. In case you upgrade Parity from a really, really old version, you will have to reset your database manually first with `parity <options> db kill`.
|
||||
|
||||
We fixed DELEGATECALL `from` and `to` fields, see [#7166](https://github.com/paritytech/parity/issues/7166).
|
||||
|
||||
We reduced the default USD per transaction value to 0.0001. Thanks, @MysticRyuujin!
|
||||
|
||||
The Musicoin chain is now enabled with Byzantium features starting at block `2_222_222`.
|
||||
|
||||
### Overview of all changes included
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Re-enable signer, even with no UI. ([#8167](https://github.com/paritytech/parity/pull/8167)) ([#8168](https://github.com/paritytech/parity/pull/8168))
|
||||
- Re-enable signer, even with no UI.
|
||||
- Fix message.
|
||||
- Beta Backports ([#8136](https://github.com/paritytech/parity/pull/8136))
|
||||
- Support parity protocol. ([#8035](https://github.com/paritytech/parity/pull/8035))
|
||||
- updater: apply exponential backoff after download failure ([#8059](https://github.com/paritytech/parity/pull/8059))
|
||||
- updater: apply exponential backoff after download failure
|
||||
- updater: reset backoff on new release
|
||||
- Max code size on Kovan ([#8067](https://github.com/paritytech/parity/pull/8067))
|
||||
- Enable code size limit on kovan
|
||||
- Fix formatting.
|
||||
- Limit incoming connections. ([#8060](https://github.com/paritytech/parity/pull/8060))
|
||||
- Limit ingress connections
|
||||
- Optimized handshakes logging
|
||||
- WASM libraries bump ([#7970](https://github.com/paritytech/parity/pull/7970))
|
||||
- update wasmi, parity-wasm, wasm-utils to latest version
|
||||
- Update to new wasmi & error handling
|
||||
- also utilize new stack limiter
|
||||
- fix typo
|
||||
- replace dependency url
|
||||
- Cargo.lock update
|
||||
- add some dos protection ([#8084](https://github.com/paritytech/parity/pull/8084))
|
||||
- revert removing blooms ([#8066](https://github.com/paritytech/parity/pull/8066))
|
||||
- Revert "fix traces, removed bloomchain crate, closes [#7228](https://github.com/paritytech/parity/issues/7228), closes [#7167](https://github.com/paritytech/parity/issues/7167)"
|
||||
- Revert "fixed broken logs ([#7934](https://github.com/paritytech/parity/pull/7934))"
|
||||
- fixed broken logs
|
||||
- bring back old lock order
|
||||
- remove migration v13
|
||||
- revert CURRENT_VERSION to 12 in migration.rs
|
||||
- more dos protection ([#8104](https://github.com/paritytech/parity/pull/8104))
|
||||
- Const time comparison ([#8113](https://github.com/paritytech/parity/pull/8113))
|
||||
- Use `subtle::slices_equal` for constant time comparison.
|
||||
- Also update the existing version of subtle in `ethcrypto` from 0.1 to 0.5
|
||||
- Test specifically for InvalidPassword error.
|
||||
- fix trace filter returning returning unrelated reward calls, closes #8070 ([#8098](https://github.com/paritytech/parity/pull/8098))
|
||||
- network: init discovery using healthy nodes ([#8061](https://github.com/paritytech/parity/pull/8061))
|
||||
- network: init discovery using healthy nodes
|
||||
- network: fix style grumble
|
||||
- network: fix typo
|
||||
- Postpone Kovan hard fork ([#8137](https://github.com/paritytech/parity/pull/8137))
|
||||
- ethcore: postpone Kovan hard fork
|
||||
- util: update version fork metadata
|
||||
- Disable UI by default. ([#8105](https://github.com/paritytech/parity/pull/8105))
|
||||
- dapps: update parity-ui dependencies ([#8160](https://github.com/paritytech/parity/pull/8160))
|
||||
- Probe changes one step deeper ([#8134](https://github.com/paritytech/parity/pull/8134)) ([#8135](https://github.com/paritytech/parity/pull/8135))
|
||||
- Beta backports ([#8053](https://github.com/paritytech/parity/pull/8053))
|
||||
- CI: Fix cargo cache ([#7968](https://github.com/paritytech/parity/pull/7968))
|
||||
- Fix cache
|
||||
- Only clean locked cargo cache on windows
|
||||
- fixed ethstore sign ([#8026](https://github.com/paritytech/parity/pull/8026))
|
||||
- fixed parsing ethash seals and verify_block_undordered ([#8031](https://github.com/paritytech/parity/pull/8031))
|
||||
- fix for verify_block_basic crashing on invalid transaction rlp ([#8032](https://github.com/paritytech/parity/pull/8032))
|
||||
- fix cache & snapcraft CI build ([#8052](https://github.com/paritytech/parity/pull/8052))
|
||||
- Add MCIP-6 Byzyantium transition to Musicoin spec ([#7841](https://github.com/paritytech/parity/pull/7841))
|
||||
- Add test chain spec for musicoin byzantium testnet
|
||||
- Add MCIP-6 Byzyantium transition to Musicoin spec
|
||||
- Update mcip6_byz.json
|
||||
- ethcore: update musicoin byzantium block number
|
||||
- ethcore: update musicoin bootnodes
|
||||
- Update musicoin.json
|
||||
- More bootnodes.
|
||||
- Make 1.10 beta ([#8022](https://github.com/paritytech/parity/pull/8022))
|
||||
- Make 1.10 beta
|
||||
- Fix gitlab builds
|
||||
- SecretStore: secretstore_generateDocumentKey RPC ([#7864](https://github.com/paritytech/parity/pull/7864))
|
||||
- SecretStore: ECDSA session for cases when 2*t < N ([#7739](https://github.com/paritytech/parity/pull/7739))
|
||||
- bump tiny-keccak ([#8019](https://github.com/paritytech/parity/pull/8019))
|
||||
- Remove un-necessary comment ([#8014](https://github.com/paritytech/parity/pull/8014))
|
||||
- clean up account fmt::Debug ([#7983](https://github.com/paritytech/parity/pull/7983))
|
||||
- improve quality of vote_collector module ([#7984](https://github.com/paritytech/parity/pull/7984))
|
||||
- ExecutedBlock cleanup ([#7991](https://github.com/paritytech/parity/pull/7991))
|
||||
- Hardware-wallet/usb-subscribe-refactor ([#7860](https://github.com/paritytech/parity/pull/7860))
|
||||
- remove wildcard imports from views, make tests more idiomatic ([#7986](https://github.com/paritytech/parity/pull/7986))
|
||||
- moved PerfTimer to a separate crate - "trace-time" ([#7985](https://github.com/paritytech/parity/pull/7985))
|
||||
- clean up ethcore::spec module imports ([#7990](https://github.com/paritytech/parity/pull/7990))
|
||||
- rpc: don't include current block in new_block_filter ([#7982](https://github.com/paritytech/parity/pull/7982))
|
||||
- fix traces, removed bloomchain crate ([#7979](https://github.com/paritytech/parity/pull/7979))
|
||||
- simplify compression and move it out of rlp crate ([#7957](https://github.com/paritytech/parity/pull/7957))
|
||||
- removed old migrations ([#7974](https://github.com/paritytech/parity/pull/7974))
|
||||
- Reject too large packets in snapshot sync. ([#7977](https://github.com/paritytech/parity/pull/7977))
|
||||
- fixed broken logs ([#7934](https://github.com/paritytech/parity/pull/7934))
|
||||
- Increase max download limit to 128MB ([#7965](https://github.com/paritytech/parity/pull/7965))
|
||||
- Calculate proper keccak256/sha3 using parity. ([#7953](https://github.com/paritytech/parity/pull/7953))
|
||||
- Add changelog for 1.8.10 stable and 1.9.3 beta ([#7947](https://github.com/paritytech/parity/pull/7947))
|
||||
- kvdb-rocksdb: remove buffered operations when committing transaction ([#7950](https://github.com/paritytech/parity/pull/7950))
|
||||
- Bump WebSockets ([#7952](https://github.com/paritytech/parity/pull/7952))
|
||||
- removed redundant Bloom conversions ([#7932](https://github.com/paritytech/parity/pull/7932))
|
||||
- simplify RefInfo fmt ([#7929](https://github.com/paritytech/parity/pull/7929))
|
||||
- Kovan WASM fork code ([#7849](https://github.com/paritytech/parity/pull/7849))
|
||||
- bring back trie and triehash benches ([#7926](https://github.com/paritytech/parity/pull/7926))
|
||||
- removed redundant PodAccount::new method ([#7928](https://github.com/paritytech/parity/pull/7928))
|
||||
- removed dummy wrapper structure - LogGroupPosition ([#7922](https://github.com/paritytech/parity/pull/7922))
|
||||
- spec: Validate required divisor fields are not 0 ([#7933](https://github.com/paritytech/parity/pull/7933))
|
||||
- simplify Client::filter_traces method ([#7936](https://github.com/paritytech/parity/pull/7936))
|
||||
- gitlab cache ([#7921](https://github.com/paritytech/parity/pull/7921))
|
||||
- Fix a division by zero in light client RPC handler ([#7917](https://github.com/paritytech/parity/pull/7917))
|
||||
- triehash optimisations ([#7920](https://github.com/paritytech/parity/pull/7920))
|
||||
- removed redundant Blockchain::db method ([#7919](https://github.com/paritytech/parity/pull/7919))
|
||||
- removed redundant Blockchain::rewind method ([#7918](https://github.com/paritytech/parity/pull/7918))
|
||||
- Pending transactions subscription ([#7906](https://github.com/paritytech/parity/pull/7906))
|
||||
- removed redundant otry! macro from ethcore ([#7916](https://github.com/paritytech/parity/pull/7916))
|
||||
- Make block generator easier to use ([#7888](https://github.com/paritytech/parity/pull/7888))
|
||||
- ECIP 1041 - Remove Difficulty Bomb ([#7905](https://github.com/paritytech/parity/pull/7905))
|
||||
- Fix CSP for dapps that require eval. ([#7867](https://github.com/paritytech/parity/pull/7867))
|
||||
- Fix gitlab ([#7901](https://github.com/paritytech/parity/pull/7901))
|
||||
- Gitlb snap master patch ([#7900](https://github.com/paritytech/parity/pull/7900))
|
||||
- fix snap build master ([#7896](https://github.com/paritytech/parity/pull/7896))
|
||||
- Fix wallet import ([#7873](https://github.com/paritytech/parity/pull/7873))
|
||||
- Fix snapcraft nightly ([#7884](https://github.com/paritytech/parity/pull/7884))
|
||||
- Add a timeout for light client sync requests ([#7848](https://github.com/paritytech/parity/pull/7848))
|
||||
- SecretStore: fixed test ([#7878](https://github.com/paritytech/parity/pull/7878))
|
||||
- Fix checksums and auto-update push ([#7846](https://github.com/paritytech/parity/pull/7846))
|
||||
- Forward-port snap fixes ([#7831](https://github.com/paritytech/parity/pull/7831))
|
||||
- Update gitlab-test.sh ([#7883](https://github.com/paritytech/parity/pull/7883))
|
||||
- Fix installer binary names for macos and windows ([#7881](https://github.com/paritytech/parity/pull/7881))
|
||||
- Fix string typo: "develoopment" -> "development" ([#7874](https://github.com/paritytech/parity/pull/7874))
|
||||
- Update the instructions to install the stable snap ([#7876](https://github.com/paritytech/parity/pull/7876))
|
||||
- SecretStore: 'broadcast' decryption session ([#7843](https://github.com/paritytech/parity/pull/7843))
|
||||
- Flush keyfiles. Resolves #7632 ([#7868](https://github.com/paritytech/parity/pull/7868))
|
||||
- Read registry_address from given block ([#7866](https://github.com/paritytech/parity/pull/7866))
|
||||
- Clean up docs formatting for Wasm runtime ([#7869](https://github.com/paritytech/parity/pull/7869))
|
||||
- WASM: Disable internal memory ([#7842](https://github.com/paritytech/parity/pull/7842))
|
||||
- Update gitlab-build.sh ([#7855](https://github.com/paritytech/parity/pull/7855))
|
||||
- ethabi version 5 ([#7723](https://github.com/paritytech/parity/pull/7723))
|
||||
- Light client: randomize the peer we dispatch requests to ([#7844](https://github.com/paritytech/parity/pull/7844))
|
||||
- Store updater metadata in a single place ([#7832](https://github.com/paritytech/parity/pull/7832))
|
||||
- Add new EF ropstens nodes. ([#7824](https://github.com/paritytech/parity/pull/7824))
|
||||
- refactor stratum to remove retain cycle ([#7827](https://github.com/paritytech/parity/pull/7827))
|
||||
- Bump jsonrpc. ([#7828](https://github.com/paritytech/parity/pull/7828))
|
||||
- Add binary identifiers and sha256sum to builds ([#7830](https://github.com/paritytech/parity/pull/7830))
|
||||
- Update references to UI shell & wallet ([#7808](https://github.com/paritytech/parity/pull/7808))
|
||||
- Adjust storage update evm-style ([#7812](https://github.com/paritytech/parity/pull/7812))
|
||||
- Updated WASM Runtime & new interpreter (wasmi) ([#7796](https://github.com/paritytech/parity/pull/7796))
|
||||
- SecretStore: ignore removed authorities when running auto-migration ([#7674](https://github.com/paritytech/parity/pull/7674))
|
||||
- Fix build ([#7807](https://github.com/paritytech/parity/pull/7807))
|
||||
- Move js & js-old code to github.com/parity-js ([#7685](https://github.com/paritytech/parity/pull/7685))
|
||||
- More changelogs :) ([#7782](https://github.com/paritytech/parity/pull/7782))
|
||||
- Actualized API set in help ([#7790](https://github.com/paritytech/parity/pull/7790))
|
||||
- Removed obsolete file ([#7788](https://github.com/paritytech/parity/pull/7788))
|
||||
- Update ropsten bootnodes ([#7776](https://github.com/paritytech/parity/pull/7776))
|
||||
- CHANGELOG for 1.9.1 and 1.8.8 ([#7775](https://github.com/paritytech/parity/pull/7775))
|
||||
- Enable byzantium features on non-ethash chains ([#7753](https://github.com/paritytech/parity/pull/7753))
|
||||
- Fix client not being dropped on shutdown ([#7695](https://github.com/paritytech/parity/pull/7695))
|
||||
- Filter-out nodes.json ([#7716](https://github.com/paritytech/parity/pull/7716))
|
||||
- Removes redundant parentheses ([#7721](https://github.com/paritytech/parity/pull/7721))
|
||||
- Transaction-pool fixes ([#7741](https://github.com/paritytech/parity/pull/7741))
|
||||
- More visible download link in README.md ([#7707](https://github.com/paritytech/parity/pull/7707))
|
||||
- Changelog for 1.9.0 ([#7664](https://github.com/paritytech/parity/pull/7664))
|
||||
- Add scroll when too many accounts ([#7677](https://github.com/paritytech/parity/pull/7677))
|
||||
- SecretStore: return HTTP 403 (access denied) if consensus is unreachable ([#7656](https://github.com/paritytech/parity/pull/7656))
|
||||
- Moved StopGaurd to it's own crate ([#7635](https://github.com/paritytech/parity/pull/7635))
|
||||
|
||||
## Previous releases
|
||||
|
||||
- [CHANGELOG-1.9](docs/CHANGELOG-1.9.md) (_stable_)
|
||||
- [CHANGELOG-1.8](docs/CHANGELOG-1.8.md) (EOL: 2018-03-22)
|
||||
- [CHANGELOG-1.7](docs/CHANGELOG-1.7.md) (EOL: 2018-01-25)
|
||||
- [CHANGELOG-1.6](docs/CHANGELOG-1.6.md) (EOL: 2017-10-15)
|
||||
- [CHANGELOG-1.5](docs/CHANGELOG-1.5.md) (EOL: 2017-07-28)
|
||||
- [CHANGELOG-1.4](docs/CHANGELOG-1.4.md) (EOL: 2017-03-13)
|
||||
- [CHANGELOG-1.3](docs/CHANGELOG-1.3.md) (EOL: 2017-01-19)
|
||||
- [CHANGELOG-1.2](docs/CHANGELOG-1.2.md) (EOL: 2016-11-07)
|
||||
- [CHANGELOG-1.1](docs/CHANGELOG-1.1.md) (EOL: 2016-08-12)
|
||||
- [CHANGELOG-1.0](docs/CHANGELOG-1.0.md) (EOL: 2016-06-24)
|
||||
- [CHANGELOG-0.9](docs/CHANGELOG-0.9.md) (EOL: 2016-05-02)
|
||||
@@ -1,724 +0,0 @@
|
||||
## Parity [v1.11.8](https://github.com/paritytech/parity-ethereum/releases/tag/v1.11.8) (2018-07-27)
|
||||
|
||||
Parity 1.11.8-stable is a bug-fix release to improve performance and stability.
|
||||
|
||||
Note, authorities in PoA networks based on the Aura engine, should upgrade their nodes immediately as this release includes a critical fix.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports to 1.11.8-stable ([#9144](https://github.com/paritytech/parity-ethereum/pull/9144))
|
||||
- Parity-version: bump stable to 1.11.8
|
||||
- Ci: update version strings for snaps ([#9160](https://github.com/paritytech/parity-ethereum/pull/9160))
|
||||
- Be more graceful on Aura difficulty validation ([#9164](https://github.com/paritytech/parity-ethereum/pull/9164))
|
||||
- Be more graceful on Aura difficulty validation
|
||||
- Test: rejects_step_backwards
|
||||
- Test: proposer_switching
|
||||
- Test: rejects_future_block
|
||||
- Test: reports_skipped
|
||||
- Test: verify_empty_seal_steps
|
||||
- Parity: fix UserDefaults json parser ([#9189](https://github.com/paritytech/parity-ethereum/pull/9189))
|
||||
- Parity: fix UserDefaults json parser
|
||||
- Parity: use serde_derive for UserDefaults
|
||||
- Parity: support deserialization of old UserDefault json format
|
||||
- Parity: make UserDefaults serde backwards compatible
|
||||
- Parity: tabify indentation in UserDefaults
|
||||
- Fix bugfix hard fork logic ([#9138](https://github.com/paritytech/parity-ethereum/pull/9138))
|
||||
- Fix bugfix hard fork logic
|
||||
- Remove dustProtectionTransition from bugfix category
|
||||
- EIP-168 is not enabled by default
|
||||
- Remove unnecessary 'static
|
||||
- Disable per-sender limit for local transactions. ([#9148](https://github.com/paritytech/parity-ethereum/pull/9148))
|
||||
- Disable per-sender limit for local transactions.
|
||||
- Add a missing new line.
|
||||
- Rpc: fix is_major_importing sync state condition ([#9112](https://github.com/paritytech/parity-ethereum/pull/9112))
|
||||
- Rpc: fix is_major_importing sync state condition
|
||||
- Rpc: fix informant printout when waiting for peers
|
||||
- Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity-ethereum/pull/9135))
|
||||
- Docker: update hub dockerfile ([#9173](https://github.com/paritytech/parity-ethereum/pull/9173))
|
||||
- Update Dockerfile for hub
|
||||
- Update to Ubuntu Xenial 16.04
|
||||
- Fix cmake version
|
||||
- Docker: fix tab indentation in hub dockerfile
|
||||
- Ethcore: update to parity-wasm 0.31
|
||||
- Rpc: fix broken merge
|
||||
|
||||
## Parity [v1.11.7](https://github.com/paritytech/parity-ethereum/releases/tag/v1.11.7) "Prosperity" (2018-07-17)
|
||||
|
||||
Parity 1.11.7 "Prosperity" is a bug-fix release to improve performance and stability that marks the 1.11 release track as `stable`. Among other fixes, this release significantly addresses peering and synchronization issues. If you experienced such issues before, upgrading is highly recommended. If you rely on old versions of Parity, check out the `old-stable-1.10` branch, cherry-pick fixes, and compile your binaries independently. There will be no official support for any versions prior to 1.11.7, however (EOL).
|
||||
|
||||
If you are upgrading directly from versions 1.10.9 or earlier, please note important changes to our transaction-queue implementation, namely:
|
||||
|
||||
- The pool now limits transactions per-sender (see `--tx-queue-per-sender`), local transactions also have to obey that limit. Consider increasing the limit via CLI-flag when running benchmarks or sending a lot of transactions at once.
|
||||
- In case the pool is full, transactions received over the network, but originating from accounts that you have private keys for might not get accepted to the pool any more with higher priority. Consider running with larger pool size or submitting the transactions directly on the node via `eth_sendRawTransaction`.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports to 1.11.7-stable ([#9093](https://github.com/paritytech/parity/pull/9093))
|
||||
- Parity-version: stabilize 1.11
|
||||
- Parity-version: bump stable to 1.11.7
|
||||
- Don't fetch snapshot chunks at random ([#9088](https://github.com/paritytech/parity/pull/9088))
|
||||
- Offload cull to IoWorker. ([#9099](https://github.com/paritytech/parity/pull/9099))
|
||||
- Limit the number of transactions in pending set ([#8777](https://github.com/paritytech/parity/pull/8777))
|
||||
- Unordered iterator.
|
||||
- Use unordered and limited set if full not required.
|
||||
- Split timeout work into smaller timers.
|
||||
- Avoid collecting all pending transactions when mining
|
||||
- Remove println.
|
||||
- Use priority ordering in eth-filter.
|
||||
- Fix ethcore-miner tests and tx propagation.
|
||||
- Review grumbles addressed.
|
||||
- Add test for unordered not populating the cache.
|
||||
- Fix ethcore tests.
|
||||
- Fix light tests.
|
||||
- Fix ethcore-sync tests.
|
||||
- Fix RPC tests.
|
||||
- Make sure to produce full blocks. ([#9115](https://github.com/paritytech/parity/pull/9115))
|
||||
- Update hidapi, fixes [#7542](https://github.com/paritytech/parity-ethereum/issues/7542) ([#9108](https://github.com/paritytech/parity/pull/9108))
|
||||
- Docker: add cmake dependency ([#9111](https://github.com/paritytech/parity/pull/9111))
|
||||
- Fix miner tests.
|
||||
- Revert "Make sure to produce full blocks."
|
||||
- This reverts commit b12d592.
|
||||
- Update light client hardcoded headers ([#9098](https://github.com/paritytech/parity/pull/9098))
|
||||
- Insert Kovan hardcoded headers until 7690241
|
||||
- Insert Kovan hardcoded headers until block 7690241
|
||||
- Insert Ropsten hardcoded headers until 3612673
|
||||
- Insert Mainnet hardcoded headers until block 5941249
|
||||
- Make sure to produce full blocks. ([#9115](https://github.com/paritytech/parity/pull/9115))
|
||||
- Insert ETC (classic) hardcoded headers until block 6170625 ([#9121](https://github.com/paritytech/parity/pull/9121))
|
||||
- Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity/pull/9135))
|
||||
- `evm bench` fix broken dependencies ([#9134](https://github.com/paritytech/parity/pull/9134))
|
||||
- `evm bench` use valid dependencies
|
||||
- Fix warnings
|
||||
|
||||
## Parity [v1.11.6](https://github.com/paritytech/parity/releases/tag/v1.11.6) (2018-07-09)
|
||||
|
||||
Parity 1.11.6 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Beta: 1.11.6 backports ([#9015](https://github.com/paritytech/parity/pull/9015))
|
||||
- Parity-version: bump beta to 1.11.6
|
||||
- Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity/pull/8884))
|
||||
- Add support for --chain tobalaba
|
||||
- Convert indents to tabs :)
|
||||
- Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity/pull/8998))
|
||||
- Aura: only report after checking for repeated skipped primaries
|
||||
- Aura: refactor duplicate code for getting epoch validator set
|
||||
- Aura: verify_external: report on validator set contract instance
|
||||
- Aura: use correct validator set epoch number when reporting
|
||||
- Aura: use epoch set when verifying blocks
|
||||
- Aura: report skipped primaries when generating seal
|
||||
- Aura: handle immediate transitions
|
||||
- Aura: don't report skipped steps from genesis to first block
|
||||
- Aura: fix reporting test
|
||||
- Aura: refactor duplicate code to handle immediate_transitions
|
||||
- Aura: let reporting fail on verify_block_basic
|
||||
- Aura: add comment about possible failure of reporting
|
||||
- Only return error log for rustls ([#9025](https://github.com/paritytech/parity/pull/9025))
|
||||
- Transaction Pool improvements ([#8470](https://github.com/paritytech/parity/pull/8470))
|
||||
- Don't use ethereum_types in transaction pool.
|
||||
- Hide internal insertion_id.
|
||||
- Fix tests.
|
||||
- Review grumbles.
|
||||
- Improve should_replace on NonceAndGasPrice ([#8980](https://github.com/paritytech/parity/pull/8980))
|
||||
- Additional tests for NonceAndGasPrice::should_replace.
|
||||
- Fix should_replace in the distinct sender case.
|
||||
- Use natural priority ordering to simplify should_replace.
|
||||
- Minimal effective gas price in the queue ([#8934](https://github.com/paritytech/parity/pull/8934))
|
||||
- Minimal effective gas price.
|
||||
- Fix naming, add test
|
||||
- Fix minimal entry score and add test.
|
||||
- Fix worst_transaction.
|
||||
- Remove effective gas price threshold.
|
||||
- Don't leak gas_price decisions out of Scoring.
|
||||
- Never drop local transactions from different senders. ([#9002](https://github.com/paritytech/parity/pull/9002))
|
||||
- Recently rejected cache for transaction queue ([#9005](https://github.com/paritytech/parity/pull/9005))
|
||||
- Store recently rejected transactions.
|
||||
- Don't cache AlreadyImported rejections.
|
||||
- Make the size of transaction verification queue dependent on pool size.
|
||||
- Add a test for recently rejected.
|
||||
- Fix logging for recently rejected.
|
||||
- Make rejection cache smaller.
|
||||
- Obsolete test removed
|
||||
- Obsolete test removed
|
||||
- Construct cache with_capacity.
|
||||
- Optimize pending transactions filter ([#9026](https://github.com/paritytech/parity/pull/9026))
|
||||
- Rpc: return unordered transactions in pending transactions filter
|
||||
- Ethcore: use LruCache for nonce cache
|
||||
- Only clear the nonce cache when a block is retracted
|
||||
- Revert "ethcore: use LruCache for nonce cache"
|
||||
- This reverts commit b382c19.
|
||||
- Use only cached nonces when computing pending hashes.
|
||||
- Give filters their own locks, so that they don't block one another.
|
||||
- Fix pending transaction count if not sealing.
|
||||
- Clear cache only when block is enacted.
|
||||
- Fix RPC tests.
|
||||
- Address review comments.
|
||||
- A last bunch of txqueue performance optimizations ([#9024](https://github.com/paritytech/parity/pull/9024))
|
||||
- Clear cache only when block is enacted.
|
||||
- Add tracing for cull.
|
||||
- Cull split.
|
||||
- Cull after creating pending block.
|
||||
- Add constant, remove sync::read tracing.
|
||||
- Reset debug.
|
||||
- Remove excessive tracing.
|
||||
- Use struct for NonceCache.
|
||||
- Fix build
|
||||
- Remove warnings.
|
||||
- Fix build again.
|
||||
- Miner: add missing macro use for trace_time
|
||||
- Ci: remove md5 merge leftovers
|
||||
|
||||
## Parity [v1.11.5](https://github.com/paritytech/parity/releases/tag/v1.11.5) (2018-06-29)
|
||||
|
||||
Parity 1.11.5 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Bump beta to 1.11.5 / Backports ([#8955](https://github.com/paritytech/parity/pull/8955))
|
||||
- Parity-version: bump beta to 1.11.5
|
||||
- Update ropsten.json ([#8926](https://github.com/paritytech/parity/pull/8926))
|
||||
- Update hardcoded headers ([#8925](https://github.com/paritytech/parity/pull/8925))
|
||||
- Update kovan.json
|
||||
- Update Kovan to block 7693549
|
||||
- Update foundation.json
|
||||
- Updated to block 5812225
|
||||
- Update ropsten.json
|
||||
- Update to 3465217
|
||||
- Scripts: minor improvements ([#8930](https://github.com/paritytech/parity/pull/8930))
|
||||
- CI: enable 'latest' docker tag on master pipeline
|
||||
- CI: mark both beta and stable as stable snap.
|
||||
- CI: sign all windows binaries
|
||||
- Scripts: fix docker build tag on latest using master ([#8952](https://github.com/paritytech/parity/pull/8952))
|
||||
- Rpc: cap gas limit of local calls ([#8943](https://github.com/paritytech/parity/pull/8943))
|
||||
- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 ([#8984](https://github.com/paritytech/parity/pull/8984))
|
||||
- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530
|
||||
- Snap: use plugin rust
|
||||
- Fix deadlock in blockchain. ([#8977](https://github.com/paritytech/parity/pull/8977))
|
||||
- Remove js-glue from workspace
|
||||
- This fixes test error on Rust 1.27 but also prevents js-glue from building itself.
|
||||
- Builtin dapp users can still use js-glue from crates.io.
|
||||
- Fix Android build on beta ([#9003](https://github.com/paritytech/parity/pull/9003))
|
||||
|
||||
## Parity [v1.11.4](https://github.com/paritytech/parity/releases/tag/v1.11.4) (2018-06-20)
|
||||
|
||||
Parity 1.11.4 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports ([#8916](https://github.com/paritytech/parity/pull/8916))
|
||||
- `Duration_ns: u64 -> duration: Duration` ([#8457](https://github.com/paritytech/parity/pull/8457))
|
||||
- Duration_ns: u64 -> duration: Duration
|
||||
- Format on millis {:.2} -> {}
|
||||
- Keep all enacted blocks notify in order ([#8524](https://github.com/paritytech/parity/pull/8524))
|
||||
- Keep all enacted blocks notify in order
|
||||
- Collect is unnecessary
|
||||
- Update ChainNotify to use ChainRouteType
|
||||
- Fix all ethcore fn defs
|
||||
- Wrap the type within ChainRoute
|
||||
- Fix private-tx and sync api
|
||||
- Fix secret_store API
|
||||
- Fix updater API
|
||||
- Fix rpc api
|
||||
- Fix informant api
|
||||
- Eagerly cache enacted/retracted and remove contain_enacted/retracted
|
||||
- Fix indent
|
||||
- Tests: should use full expr form for struct constructor
|
||||
- Use into_enacted_retracted to further avoid copy
|
||||
- Typo: not a function
|
||||
- Rpc/tests: ChainRoute -> ChainRoute::new
|
||||
- Handle removed logs in filter changes and add geth compatibility field ([#8796](https://github.com/paritytech/parity/pull/8796))
|
||||
- Add removed geth compatibility field in log
|
||||
- Fix mocked tests
|
||||
- Add field block hash in PollFilter
|
||||
- Store last block hash info for log filters
|
||||
- Implement canon route
|
||||
- Use canon logs for fetching reorg logs
|
||||
- Make sure removed flag is set
|
||||
- Address grumbles
|
||||
- Fixed AuthorityRound deadlock on shutdown, closes [#8088](https://github.com/paritytech/parity/issues/8088) ([#8803](https://github.com/paritytech/parity/pull/8803))
|
||||
- Ci: Fix docker tags ([#8822](https://github.com/paritytech/parity/pull/8822))
|
||||
- Scripts: enable docker builds for beta and stable
|
||||
- Scripts: docker latest should be beta not master
|
||||
- Scripts: docker latest is master
|
||||
- Ethcore: fix ancient block error msg handling ([#8832](https://github.com/paritytech/parity/pull/8832))
|
||||
- Disable parallel verification and skip verifiying already imported txs. ([#8834](https://github.com/paritytech/parity/pull/8834))
|
||||
- Reject transactions that are already in pool without verifying them.
|
||||
- Avoid verifying already imported transactions.
|
||||
- Fix concurrent access to signer queue ([#8854](https://github.com/paritytech/parity/pull/8854))
|
||||
- Fix concurrent access to signer queue
|
||||
- Put request back to the queue if confirmation failed
|
||||
- Typo: fix docs and rename functions to be more specific
|
||||
- Change trace info "Transaction" -> "Request"
|
||||
- Don't allocate in expect_valid_rlp unless necessary ([#8867](https://github.com/paritytech/parity/pull/8867))
|
||||
- Don't allocate via format! in case there's no error
|
||||
- Fix test?
|
||||
- Fixed ipc leak, closes [#8774](https://github.com/paritytech/parity/issues/8774) ([#8876](https://github.com/paritytech/parity/pull/8876))
|
||||
- Add new ovh bootnodes and fix port for foundation bootnode 3.2 ([#8886](https://github.com/paritytech/parity/pull/8886))
|
||||
- Add new ovh bootnodes and fix port for foundation bootnode 3.2
|
||||
- Remove old bootnodes.
|
||||
- Remove duplicate 1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082
|
||||
- Block 0 is valid in queries ([#8891](https://github.com/paritytech/parity/pull/8891))
|
||||
- Add ETC Cooperative-run load balanced parity node ([#8892](https://github.com/paritytech/parity/pull/8892))
|
||||
- Minor fix in chain supplier and light provider ([#8906](https://github.com/paritytech/parity/pull/8906))
|
||||
- Fix chain supplier increment
|
||||
- Fix light provider block_headers
|
||||
- Check whether we need resealing in miner and unwrap has_account in account_provider ([#8853](https://github.com/paritytech/parity/pull/8853))
|
||||
- Remove unused Result wrap in has_account
|
||||
- Check whether we need to reseal for external transactions
|
||||
- Fix reference to has_account interface
|
||||
- Typo: missing )
|
||||
- Refactor duplicates to prepare_and_update_sealing
|
||||
- Fix build
|
||||
- Allow disabling local-by-default for transactions with new config entry ([#8882](https://github.com/paritytech/parity/pull/8882))
|
||||
- Add tx_queue_allow_unknown_local config option
|
||||
- Refactor flag name + don't change import_own_tx behaviour
|
||||
- Add fn to TestMinerService
|
||||
- Avoid race condition from trusted sources
|
||||
- Parity-version: beta release 1.11.4 ([#8856](https://github.com/paritytech/parity/pull/8856))
|
||||
- Cherry-pick network-specific release flag ([#8821](https://github.com/paritytech/parity/pull/8821))
|
||||
- Parity-version: bump beta to 1.11.4
|
||||
- Parity-version: remove merge leftovers
|
||||
|
||||
## Parity [v1.11.3](https://github.com/paritytech/parity/releases/tag/v1.11.3) (2018-06-06)
|
||||
|
||||
Parity 1.11.3 is a security-relevant release. Please upgrade your nodes as soon as possible to [v1.10.6](https://github.com/paritytech/parity/releases/tag/v1.10.6) or [v1.11.3](https://github.com/paritytech/parity/releases/tag/v1.11.3).
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Parity-version: bump beta to 1.11.3 ([#8806](https://github.com/paritytech/parity/pull/8806))
|
||||
- Parity-version: bump beta to 1.11.3
|
||||
- Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity/pull/8802))
|
||||
- Fix ancient blocks queue deadlock ([#8751](https://github.com/paritytech/parity/pull/8751))
|
||||
- Update shell32-sys to fix windows build ([#8792](https://github.com/paritytech/parity/pull/8792))
|
||||
- Backports ([#8785](https://github.com/paritytech/parity/pull/8785))
|
||||
- Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528))
|
||||
- Fix [#8468](https://github.com/paritytech/parity-ethereum/issues/8468)
|
||||
- Use U256::max_value() instead
|
||||
- Also change initial transaction gas
|
||||
- Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity/pull/8544))
|
||||
- Start dividing sync chain : first supplier method
|
||||
- WIP - updated chain sync supplier
|
||||
- Finish refactoring the Chain Sync Supplier
|
||||
- Create Chain Sync Requester
|
||||
- Add Propagator for Chain Sync
|
||||
- Add the Chain Sync Handler
|
||||
- Move tests from mod -> handler
|
||||
- Move tests to propagator
|
||||
- Refactor SyncRequester arguments
|
||||
- Refactoring peer fork header handler
|
||||
- Fix wrong highest block number in snapshot sync
|
||||
- Small refactor...
|
||||
- Resume warp-sync downloaded chunks
|
||||
- Refactoring the previous chunks import
|
||||
- Address PR grumbles
|
||||
- Fix not seeding current snapshot
|
||||
- Update SnapshotService readiness check
|
||||
- Early abort importing previous chunks
|
||||
- Update Gitlab CI config
|
||||
- SyncState back to Waiting when Manifest peers disconnect
|
||||
- Revert GitLab CI changes
|
||||
- Refactor resuming snapshots
|
||||
- Revert "Refactor resuming snapshots"
|
||||
- Update informant log
|
||||
- Refactor resuming snapshots
|
||||
- Update informant message : show chunks done
|
||||
- Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity/pull/8641))
|
||||
- Fix not downloading old blocks ([#8642](https://github.com/paritytech/parity/pull/8642))
|
||||
- Fix PoW blockchains sealing notifications in chain_new_blocks ([#8656](https://github.com/paritytech/parity/pull/8656))
|
||||
- Shutdown the Snapshot Service early ([#8658](https://github.com/paritytech/parity/pull/8658))
|
||||
- Shutdown the Snapshot Service when shutting down the runner
|
||||
- Rename `service` to `client_service`
|
||||
- Fix tests
|
||||
- Fix cli signer ([#8682](https://github.com/paritytech/parity/pull/8682))
|
||||
- Update ethereum-types so `{:#x}` applies 0x prefix
|
||||
- Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity/pull/8683))
|
||||
- Set the request index to that of the current request
|
||||
- Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity/pull/8686))
|
||||
- Fix local transactions policy. ([#8691](https://github.com/paritytech/parity/pull/8691))
|
||||
- CI: Fixes for Android Pipeline ([#8745](https://github.com/paritytech/parity/pull/8745))
|
||||
- Ci: Remove check for shared libraries in gitlab script
|
||||
- Ci: allow android arm build to fail
|
||||
- Custom Error Messages on ENFILE and EMFILE IO Errors ([#8744](https://github.com/paritytech/parity/pull/8744))
|
||||
- Custom Error Messages on ENFILE and EMFILE IO Errors
|
||||
- Use assert-matches for more readable tests
|
||||
- Fix Wording and consistency
|
||||
- Ethcore-sync: fix connection to peers behind chain fork block ([#8710](https://github.com/paritytech/parity/pull/8710))
|
||||
- Parity-version: bump beta to 1.11.2 ([#8750](https://github.com/paritytech/parity/pull/8750))
|
||||
- Parity-version: bump beta to 1.11.2
|
||||
- Parity-version: unset critical flag
|
||||
|
||||
## Parity [v1.11.1](https://github.com/paritytech/parity/releases/tag/v1.11.1) (2018-05-15)
|
||||
|
||||
This is the Parity 1.11.1-beta release! Hurray!
|
||||
|
||||
Notable changes in reversed alphabetical order:
|
||||
|
||||
- TOOLING: **Whisper CLI** [#8201](https://github.com/paritytech/parity/pull/8201)
|
||||
- `whisper-cli` is a standalone tool to communicate with the Whisper protocol.
|
||||
- It provides functionality to specify `whisper-pool-size`, `port` and `address` to use.
|
||||
- All whisper RPC APIs are enabled and can be directly accessed.
|
||||
- JSON-RPC API: **Return error in case eth_call returns VM errors** [#8448](https://github.com/paritytech/parity/pull/8448)
|
||||
- This changes the behaviors of `eth_call` to respect VM errors if any.
|
||||
- In case of `REVERT`, it will also return the reverted return data in hex format.
|
||||
- ENGINES: **Block Reward Contract** [#8419](https://github.com/paritytech/parity/pull/8419)
|
||||
- The _AuRa_ PoA engine has now support for having a contract to calculate the block rewards.
|
||||
- The engine passes a list of benefactors and reward types to the contract which then returns a list of addresses and respective rewards.
|
||||
- CORE: **Private Transactions** [#6422](https://github.com/paritytech/parity/pull/6422)
|
||||
- Parity now provides a private transactions system.
|
||||
- Please, check out our wiki to get an [overview and setup instructions](https://wiki.parity.io/Private-Transactions.html).
|
||||
- CORE: **New Transaction Queue implementation** [#8074](https://github.com/paritytech/parity/pull/8074)
|
||||
- Verification is now done in parallel.
|
||||
- Previous queue had `O(1)` time to get pending set, but `O(n^2)` insertion time. And obviously insertion/removal happens much more often than retrieving the pending set (only for propagation and pending block building) Currently we have `O(n * log(senders))` pending set time (with cache) and `O(tx_per_sender)` (usually within `log(tx_per_sender)`) insertion time.
|
||||
- `Scoring` and `Readiness` are separated from the pool, so it's easier to customize them or introduce different definitions (for instance for [EIP-859](https://github.com/ethereum/EIPs/issues/859) or private transactions, etc).
|
||||
- Banning removed, soft-penalization introduced instead: if transaction exceeds the limit other transactions from that sender get lower priority.
|
||||
- There is no explicit distinction between current and future transactions in the pool - `Readiness` determines that. Because of this we additionally remove `future` transactions that occupy the pool for long time.
|
||||
- CONFIGURATION: **Warp-only sync with --warp-barrier [block-number] flag.** [#8228](https://github.com/paritytech/parity/pull/8228)
|
||||
- Enables warp-only sync in case `--warp-barrier [block-number]` is provided.
|
||||
- This avoids clients to warp to outdated snapshots that are too far away from the best block.
|
||||
- This avoids clients to fall back to normal sync if there are no recent snapshots available currently.
|
||||
- CONFIGURATION: **Disable UI by default.** [#8105](https://github.com/paritytech/parity/pull/8105)
|
||||
- The user interface is now disabled by default. It still can be activated with the `--force-ui` flag.
|
||||
- To get the stand-alone Parity UI, please check the dedicated [releases page](https://github.com/parity-js/shell/releases).
|
||||
- CONFIGURATION: **Auto-updater improvements** [#8078](https://github.com/paritytech/parity/pull/8078)
|
||||
- Added `--auto-update-delay` to randomly delay updates by `n` blocks. This takes into account the number of the block of the update release (old updates aren't delayed).
|
||||
- Added `--auto-update-check-frequency` to define the periodicity of auto-update checks in number of blocks.
|
||||
- This is an important improvement to ensure the network does not update all clients at the same time.
|
||||
- CHAIN SPECS: **Enable WebAssembly and Byzantium for Ellaism** [#8520](https://github.com/paritytech/parity/pull/8520)
|
||||
- This activates the Ellaism Byzantium hardfork ([2018-0004-byzantium](https://github.com/ellaism/specs/blob/master/specs/2018-0004-byzantium.md)) at block `2_000_000`.
|
||||
- This enables the Wasm VM on Ellaism ([2018-0003-wasm-hardfork](https://github.com/ellaism/specs/blob/master/specs/2018-0003-wasm-hardfork.md)) at block `2_000_000`.
|
||||
- Please, upgrade your clients if you run an Ellaism configuration.
|
||||
- CHAIN SPECS: **Dev chain - increase gasLimit to 8_000_000** [#8362](https://github.com/paritytech/parity/pull/8362)
|
||||
- This increases the default block gas limit on development chains to `8_000_000`.
|
||||
- Please note, this makes previous dev chain configurations incompatible.
|
||||
- CHAIN SPECS: **Add MCIP-6 Byzyantium transition to Musicoin spec** [#7841](https://github.com/paritytech/parity/pull/7841)
|
||||
- This activates the Musicoin Byzantium hardfork ([MCIP-6](https://github.com/Musicoin/MCIPs/blob/master/MCIPS/mcip-6.md)) at block `2_222_222`.
|
||||
- Please, upgrade your clients if you run a Musicoin configuration.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports ([#8624](https://github.com/paritytech/parity/pull/8624))
|
||||
- Trace precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity/pull/8486))
|
||||
- Trace precompiled contracts when the transfer value is not zero
|
||||
- Add tests for precompiled CALL tracing
|
||||
- Use byzantium test machine for the new test
|
||||
- Add notes in comments on why we don't trace all precompiles
|
||||
- Use is_transferred instead of transferred
|
||||
- Return error if RLP size of transaction exceeds the limit ([#8473](https://github.com/paritytech/parity/pull/8473))
|
||||
- Return error if RLP size of transaction exceeds the limit
|
||||
- Review comments fixed
|
||||
- RLP check moved to verifier, corresponding pool test added
|
||||
- Don't block sync when importing old blocks ([#8530](https://github.com/paritytech/parity/pull/8530))
|
||||
- Alter IO queueing.
|
||||
- Don't require IoMessages to be Clone
|
||||
- Ancient blocks imported via IoChannel.
|
||||
- Get rid of private transactions io message.
|
||||
- Get rid of deadlock and fix disconnected handler.
|
||||
- Revert to old disconnect condition.
|
||||
- Fix tests.
|
||||
- Fix deadlock.
|
||||
- Refactoring `ethcore-sync` - Fixing warp-sync barrier ([#8543](https://github.com/paritytech/parity/pull/8543))
|
||||
- Start dividing sync chain : first supplier method
|
||||
- WIP - updated chain sync supplier
|
||||
- Finish refactoring the Chain Sync Supplier
|
||||
- Create Chain Sync Requester
|
||||
- Add Propagator for Chain Sync
|
||||
- Add the Chain Sync Handler
|
||||
- Move tests from mod -> handler
|
||||
- Move tests to propagator
|
||||
- Refactor SyncRequester arguments
|
||||
- Refactoring peer fork header handler
|
||||
- Fix wrong highest block number in snapshot sync
|
||||
- Small refactor...
|
||||
- Address PR grumbles
|
||||
- Retry failed CI job
|
||||
- Fix tests
|
||||
- PR Grumbles
|
||||
- Handle socket address parsing errors ([#8545](https://github.com/paritytech/parity/pull/8545))
|
||||
- Fix packet count when talking with PAR2 peers ([#8555](https://github.com/paritytech/parity/pull/8555))
|
||||
- Support diferent packet counts in different protocol versions.
|
||||
- Fix light timeouts and eclipse protection.
|
||||
- Fix devp2p tests.
|
||||
- Fix whisper-cli compilation.
|
||||
- Fix compilation.
|
||||
- Fix ethcore-sync tests.
|
||||
- Revert "Fix light timeouts and eclipse protection."
|
||||
- Increase timeouts.
|
||||
- Add whisper CLI to the pipelines ([#8578](https://github.com/paritytech/parity/pull/8578))
|
||||
- Add whisper CLI to the pipelines
|
||||
- Address todo, ref [#8579](https://github.com/paritytech/parity/pull/8579)
|
||||
- Rename `whisper-cli binary` to `whisper` ([#8579](https://github.com/paritytech/parity/pull/8579))
|
||||
- Rename whisper-cli binary to whisper
|
||||
- Fix tests
|
||||
- Remove manually added text to the errors ([#8595](https://github.com/paritytech/parity/pull/8595))
|
||||
- Fix account list double 0x display ([#8596](https://github.com/paritytech/parity/pull/8596))
|
||||
- Remove unused self import
|
||||
- Fix account list double 0x display
|
||||
- Fix BlockReward contract "arithmetic operation overflow" ([#8611](https://github.com/paritytech/parity/pull/8611))
|
||||
- Fix BlockReward contract "arithmetic operation overflow"
|
||||
- Add docs on how execute_as_system works
|
||||
- Fix typo
|
||||
- Rlp decode returns Result ([#8527](https://github.com/paritytech/parity/pull/8527))
|
||||
- Remove expect ([#8536](https://github.com/paritytech/parity/pull/8536))
|
||||
- Remove expect and propagate rlp::DecoderErrors as TrieErrors
|
||||
- Decoding headers can fail ([#8570](https://github.com/paritytech/parity/pull/8570))
|
||||
- Rlp::decode returns Result
|
||||
- Fix journaldb to handle rlp::decode Result
|
||||
- Fix ethcore to work with rlp::decode returning Result
|
||||
- Light client handles rlp::decode returning Result
|
||||
- Fix tests in rlp_derive
|
||||
- Fix tests
|
||||
- Cleanup
|
||||
- Cleanup
|
||||
- Allow panic rather than breaking out of iterator
|
||||
- Let decoding failures when reading from disk blow up
|
||||
- Syntax
|
||||
- Fix the trivial grumbles
|
||||
- Fix failing tests
|
||||
- Make Account::from_rlp return Result
|
||||
- Syntx, sigh
|
||||
- Temp-fix for decoding failures
|
||||
- Header::decode returns Result
|
||||
- Do not continue reading from the DB when a value could not be read
|
||||
- Fix tests
|
||||
- Handle header decoding in light_sync
|
||||
- Handling header decoding errors
|
||||
- Let the DecodeError bubble up unchanged
|
||||
- Remove redundant error conversion
|
||||
- Fix compiler warning ([#8590](https://github.com/paritytech/parity/pull/8590))
|
||||
- Attempt to fix intermittent test failures ([#8584](https://github.com/paritytech/parity/pull/8584))
|
||||
- Block_header can fail so return Result ([#8581](https://github.com/paritytech/parity/pull/8581))
|
||||
- Block_header can fail so return Result
|
||||
- Restore previous return type based on feedback
|
||||
- Fix failing doc tests running on non-code
|
||||
- Block::decode() returns Result ([#8586](https://github.com/paritytech/parity/pull/8586))
|
||||
- Gitlab test script fixes ([#8573](https://github.com/paritytech/parity/pull/8573))
|
||||
- Exclude /docs from modified files.
|
||||
- Ensure all references in the working tree are available
|
||||
- Remove duplicated line from test script
|
||||
- Bump beta to 1.11.1 ([#8627](https://github.com/paritytech/parity/pull/8627))
|
||||
|
||||
## Parity [v1.11.0](https://github.com/paritytech/parity/releases/tag/v1.11.0) (2018-05-09)
|
||||
|
||||
This is the Parity 1.11.0-beta release! ~~Hurray!~~ This release has been pulled due to peering issues, please use 1.11.1-beta.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports ([#8558](https://github.com/paritytech/parity/pull/8558))
|
||||
- Fetching logs by hash in blockchain database ([#8463](https://github.com/paritytech/parity/pull/8463))
|
||||
- Fetch logs by hash in blockchain database
|
||||
- Fix tests
|
||||
- Add unit test for branch block logs fetching
|
||||
- Add docs that blocks must already be sorted
|
||||
- Handle branch block cases properly
|
||||
- typo: empty -> is_empty
|
||||
- Remove return_empty_if_none by using a closure
|
||||
- Use BTreeSet to avoid sorting again
|
||||
- Move is_canon to BlockChain
|
||||
- typo: pass value by reference
|
||||
- Use loop and wrap inside blocks to simplify the code
|
||||
- typo: missed a comment
|
||||
- Pass on storage keys tracing to handle the case when it is not modified ([#8491](https://github.com/paritytech/parity/pull/8491))
|
||||
- Pass on storage keys even if it is not modified
|
||||
- typo: account and storage query
|
||||
- Fix tests
|
||||
- Use state query directly because of suicided accounts
|
||||
- Fix a RefCell borrow issue
|
||||
- Add tests for unmodified storage trace
|
||||
- Address grumbles
|
||||
- typo: remove unwanted empty line
|
||||
- ensure_cached compiles with the original signature
|
||||
- Update wasmi and pwasm-utils ([#8493](https://github.com/paritytech/parity/pull/8493))
|
||||
- Update wasmi to 0.2
|
||||
- Update pwasm-utils to 0.1.5
|
||||
- Show imported messages for light client ([#8517](https://github.com/paritytech/parity/pull/8517))
|
||||
- Enable WebAssembly and Byzantium for Ellaism ([#8520](https://github.com/paritytech/parity/pull/8520))
|
||||
- Enable WebAssembly and Byzantium for Ellaism
|
||||
- Fix indentation
|
||||
- Remove empty lines
|
||||
- Don't panic in import_block if invalid rlp ([#8522](https://github.com/paritytech/parity/pull/8522))
|
||||
- Don't panic in import_block if invalid rlp
|
||||
- Remove redundant type annotation
|
||||
- Replace RLP header view usage with safe decoding
|
||||
- Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity/pull/8541))
|
||||
- network-devp2p: sort nodes in node table using last contact data
|
||||
- network-devp2p: rename node contact types in node table json output
|
||||
- network-devp2p: fix node table tests
|
||||
- network-devp2p: note node failure when failed to establish connection
|
||||
- network-devp2p: handle UselessPeer error
|
||||
- network-devp2p: note failure when marking node as useless
|
||||
- Betalize 1.11 :) ([#8475](https://github.com/paritytech/parity/pull/8475))
|
||||
- Betalize 1.11 :)
|
||||
- Update Gitlab scripts
|
||||
- Use master as gitlab latest
|
||||
- Fix snap builds ([#8483](https://github.com/paritytech/parity/pull/8483))
|
||||
- Update hardcodedSync for Ethereum, Kovan, and Ropsten ([#8489](https://github.com/paritytech/parity/pull/8489))
|
||||
- Fix typos in vm description comment ([#8446](https://github.com/paritytech/parity/pull/8446))
|
||||
- Add changelog for 1.9.7 and 1.10.2 ([#8460](https://github.com/paritytech/parity/pull/8460))
|
||||
- Fix docker build ([#8462](https://github.com/paritytech/parity/pull/8462))
|
||||
- Parityshell::open `Return result` ([#8377](https://github.com/paritytech/parity/pull/8377))
|
||||
- Return error in case eth_call returns VM errors ([#8448](https://github.com/paritytech/parity/pull/8448))
|
||||
- Update wasmi ([#8452](https://github.com/paritytech/parity/pull/8452))
|
||||
- Allow 32 bit pipelines to fail ([#8454](https://github.com/paritytech/parity/pull/8454))
|
||||
- Update Cargo hidapi-rs dependency ([#8447](https://github.com/paritytech/parity/pull/8447))
|
||||
- Private transactions processing error handling ([#8431](https://github.com/paritytech/parity/pull/8431))
|
||||
- Improve VM executor stack size estimation rules ([#8439](https://github.com/paritytech/parity/pull/8439))
|
||||
- Block reward contract ([#8419](https://github.com/paritytech/parity/pull/8419))
|
||||
- Permission fix ([#8441](https://github.com/paritytech/parity/pull/8441))
|
||||
- Use forked app_dirs crate for reverted Windows dir behavior ([#8438](https://github.com/paritytech/parity/pull/8438))
|
||||
- Remove From::from. ([#8390](https://github.com/paritytech/parity/pull/8390))
|
||||
- Move ethcore::Error to error_chain ([#8386](https://github.com/paritytech/parity/pull/8386))
|
||||
- Changelogs for 1.9.6 and 1.10.1 ([#8411](https://github.com/paritytech/parity/pull/8411))
|
||||
- Fix receipts stripping. ([#8414](https://github.com/paritytech/parity/pull/8414))
|
||||
- Typo, docs parity_chainId: empty string -> None ([#8434](https://github.com/paritytech/parity/pull/8434))
|
||||
- Update zip to 0.3 ([#8381](https://github.com/paritytech/parity/pull/8381))
|
||||
- Fix TODO comments ([#8413](https://github.com/paritytech/parity/pull/8413))
|
||||
- Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views ([#8316](https://github.com/paritytech/parity/pull/8316))
|
||||
- Tokio-core v0.1.16 -> v0.1.17 ([#8408](https://github.com/paritytech/parity/pull/8408))
|
||||
- More code refactoring to integrate Duration ([#8322](https://github.com/paritytech/parity/pull/8322))
|
||||
- Remove Tendermint extra_info due to seal inconsistencies ([#8367](https://github.com/paritytech/parity/pull/8367))
|
||||
- Use tokio::spawn in secret_store listener and fix Uri ([#8373](https://github.com/paritytech/parity/pull/8373))
|
||||
- Unify and limit rocksdb dependency places ([#8371](https://github.com/paritytech/parity/pull/8371))
|
||||
- Clarify that windows need perl and yasm ([#8402](https://github.com/paritytech/parity/pull/8402))
|
||||
- New Transaction Queue implementation ([#8074](https://github.com/paritytech/parity/pull/8074))
|
||||
- Some tweaks to main.rs for parity as a library ([#8370](https://github.com/paritytech/parity/pull/8370))
|
||||
- Handle queue import errors a bit more gracefully ([#8385](https://github.com/paritytech/parity/pull/8385))
|
||||
- Ci: fix change detection in master builds ([#8382](https://github.com/paritytech/parity/pull/8382))
|
||||
- Fix config test by adding no-hardcodec-sync ([#8380](https://github.com/paritytech/parity/pull/8380))
|
||||
- Fixed unsafe shell call on windows ([#8372](https://github.com/paritytech/parity/pull/8372))
|
||||
- Parity uses winapi 0.3.4 ([#8366](https://github.com/paritytech/parity/pull/8366))
|
||||
- No hardcoded client name ([#8368](https://github.com/paritytech/parity/pull/8368))
|
||||
- Add `util/mem` to zero out memory on drop. ([#8356](https://github.com/paritytech/parity/pull/8356))
|
||||
- Use atty instead of isatty ([#8365](https://github.com/paritytech/parity/pull/8365))
|
||||
- Increase gasLimit to 8'000'000 ([#8362](https://github.com/paritytech/parity/pull/8362))
|
||||
- Util `fake-fetch` ([#8363](https://github.com/paritytech/parity/pull/8363))
|
||||
- Bump snappy and ring, use single rayon version, closes [#8296](https://github.com/paritytech/parity/issues/8296) ([#8364](https://github.com/paritytech/parity/pull/8364))
|
||||
- Use async hyper server in secret_store and upgrade igd ([#8359](https://github.com/paritytech/parity/pull/8359))
|
||||
- Enable UI by default, but only display deprecation notice ([#8262](https://github.com/paritytech/parity/pull/8262))
|
||||
- Ethcrypto renamed to ethcore-crypto and moved to ethcore dir ([#8340](https://github.com/paritytech/parity/pull/8340))
|
||||
- Use hyper 0.11 in ethcore-miner and improvements in parity-reactor ([#8335](https://github.com/paritytech/parity/pull/8335))
|
||||
- Ethcore-sync ([#8347](https://github.com/paritytech/parity/pull/8347))
|
||||
- Rpc, eth_filter: return error if the filter id does not exist ([#8341](https://github.com/paritytech/parity/pull/8341))
|
||||
- Ethcore-stratum crate moved to ethcore directory ([#8338](https://github.com/paritytech/parity/pull/8338))
|
||||
- Secretstore: get rid of engine.signer dependency ([#8173](https://github.com/paritytech/parity/pull/8173))
|
||||
- Whisper cli ([#8201](https://github.com/paritytech/parity/pull/8201))
|
||||
- Replace_home for password_files, reserved_peers and log_file ([#8324](https://github.com/paritytech/parity/pull/8324))
|
||||
- Add Ethereum Social support ([#8325](https://github.com/paritytech/parity/pull/8325))
|
||||
- Private transactions integration pr ([#6422](https://github.com/paritytech/parity/pull/6422))
|
||||
- Decouple rocksdb dependency from ethcore ([#8320](https://github.com/paritytech/parity/pull/8320))
|
||||
- Remove the clone operation of code_cache ([#8334](https://github.com/paritytech/parity/pull/8334))
|
||||
- Fix the JSONRPC API not running with the light client ([#8326](https://github.com/paritytech/parity/pull/8326))
|
||||
- Read registry_address from block with REQUEST_CONFIRMATIONS_REQUIRED ([#8309](https://github.com/paritytech/parity/pull/8309))
|
||||
- Tweaks and add a Dockerfile for Android ([#8036](https://github.com/paritytech/parity/pull/8036))
|
||||
- Use associated type M::Error instead of Error ([#8308](https://github.com/paritytech/parity/pull/8308))
|
||||
- Remove InvalidParentHash in favor of assert! ([#8300](https://github.com/paritytech/parity/pull/8300))
|
||||
- Bump proc macro deps ([#8310](https://github.com/paritytech/parity/pull/8310))
|
||||
- Decouple timestamp open-block-assignment/verification to Engine ([#8305](https://github.com/paritytech/parity/pull/8305))
|
||||
- Validate if gas limit is not zero ([#8307](https://github.com/paritytech/parity/pull/8307))
|
||||
- Implement Easthub chain spec ([#8295](https://github.com/paritytech/parity/pull/8295))
|
||||
- Update some dependencies ([#8285](https://github.com/paritytech/parity/pull/8285))
|
||||
- Ethcore now uses Rayon 1.0 as a dependency ([#8296](https://github.com/paritytech/parity/pull/8296)) ([#8304](https://github.com/paritytech/parity/pull/8304))
|
||||
- Upgrader `remove raw unwrap` and bump semver ([#8251](https://github.com/paritytech/parity/pull/8251))
|
||||
- Cleaner binary shutdown system ([#8284](https://github.com/paritytech/parity/pull/8284))
|
||||
- Ethcore now uses rayon to 0.9 as a dependency ([#8296](https://github.com/paritytech/parity/pull/8296)) ([#8302](https://github.com/paritytech/parity/pull/8302))
|
||||
- Include suicided accounts in state diff ([#8297](https://github.com/paritytech/parity/pull/8297))
|
||||
- Remove evmjit ([#8229](https://github.com/paritytech/parity/pull/8229))
|
||||
- Build: fix updater rand dependency in Cargo.lock ([#8298](https://github.com/paritytech/parity/pull/8298))
|
||||
- Honor --max-peers if --min-peers is not specified ([#8087](https://github.com/paritytech/parity/pull/8087))
|
||||
- Auto-updater improvements ([#8078](https://github.com/paritytech/parity/pull/8078))
|
||||
- Dapps-fetcher: calculate keccak in-flight while reading the response ([#8294](https://github.com/paritytech/parity/pull/8294))
|
||||
- Cleanup Ellaism bootnodes ([#8276](https://github.com/paritytech/parity/pull/8276))
|
||||
- Allow unsafe js eval on Parity Wallet. ([#8204](https://github.com/paritytech/parity/pull/8204))
|
||||
- Remove RefCell from Header ([#8227](https://github.com/paritytech/parity/pull/8227))
|
||||
- Typo fix: todo with no content ([#8292](https://github.com/paritytech/parity/pull/8292))
|
||||
- Revert "ci: disable link-dead-code in coverage build ([#8118](https://github.com/paritytech/parity/pull/8118))" ([#8287](https://github.com/paritytech/parity/pull/8287))
|
||||
- Bump ethabi & ethereum-types. ([#8258](https://github.com/paritytech/parity/pull/8258))
|
||||
- Allow customization of max WS connections. ([#8257](https://github.com/paritytech/parity/pull/8257))
|
||||
- Supress TemporaryInvalid verification failures. ([#8256](https://github.com/paritytech/parity/pull/8256))
|
||||
- Return null number for pending block in eth_getBlockByNumber ([#8281](https://github.com/paritytech/parity/pull/8281))
|
||||
- Use constant durations ([#8278](https://github.com/paritytech/parity/pull/8278))
|
||||
- Typo fix: Mode doc - RLP should be client ([#8283](https://github.com/paritytech/parity/pull/8283))
|
||||
- Eth_uninstallfilter should return false for non-existent filter ([#8280](https://github.com/paritytech/parity/pull/8280))
|
||||
- Update `app_dirs` to 1.2.1 ([#8268](https://github.com/paritytech/parity/pull/8268))
|
||||
- Add missing license header for runtime.rs ([#8252](https://github.com/paritytech/parity/pull/8252))
|
||||
- Warp-only sync with warp-barrier [blocknumber] flag. ([#8228](https://github.com/paritytech/parity/pull/8228))
|
||||
- Replace all Rlp usages with UntrustedRlp except for ethcore views ([#8233](https://github.com/paritytech/parity/pull/8233))
|
||||
- Add test for ethstore-cli, fixes [#8027](https://github.com/paritytech/parity/issues/8027) ([#8187](https://github.com/paritytech/parity/pull/8187))
|
||||
- Update musicoin spec in line with gmc v2.6.2 ([#8242](https://github.com/paritytech/parity/pull/8242))
|
||||
- Fixed ethcore tx_filter ([#8200](https://github.com/paritytech/parity/pull/8200))
|
||||
- Update CLI help for jsonrpc-apis, ws-apis and ipc-apis ([#8234](https://github.com/paritytech/parity/pull/8234))
|
||||
- Remove network stats ([#8225](https://github.com/paritytech/parity/pull/8225))
|
||||
- Node-filter does not use ChainNotify ([#8231](https://github.com/paritytech/parity/pull/8231))
|
||||
- Implement hardcoded sync in the light client ([#8075](https://github.com/paritytech/parity/pull/8075))
|
||||
- Update some of the dependencies for WASM ([#8223](https://github.com/paritytech/parity/pull/8223))
|
||||
- Bump wasmi version ([#8209](https://github.com/paritytech/parity/pull/8209))
|
||||
- Updated jsonrpc to point to the 1.11 branch ([#8180](https://github.com/paritytech/parity/pull/8180))
|
||||
- Change name Wallet -> UI ([#8164](https://github.com/paritytech/parity/pull/8164))
|
||||
- Introduce Parity UI ([#8202](https://github.com/paritytech/parity/pull/8202))
|
||||
- Update Changelogs ([#8175](https://github.com/paritytech/parity/pull/8175))
|
||||
- Returns number of topcis to take fr.. ([#8199](https://github.com/paritytech/parity/pull/8199))
|
||||
- Make docopt usage non-const ([#8189](https://github.com/paritytech/parity/pull/8189))
|
||||
- Avoid allocations when computing triehash. ([#8176](https://github.com/paritytech/parity/pull/8176))
|
||||
- Handle rlp decoding Result in patricia trie ([#8166](https://github.com/paritytech/parity/pull/8166))
|
||||
- Bump wasm libs ([#8171](https://github.com/paritytech/parity/pull/8171))
|
||||
- Re-enable signer, even with no UI. ([#8167](https://github.com/paritytech/parity/pull/8167))
|
||||
- Update daemonize ([#8165](https://github.com/paritytech/parity/pull/8165))
|
||||
- Some tiny modifications. ([#8163](https://github.com/paritytech/parity/pull/8163))
|
||||
- Secretstore: store key author address in db ([#7887](https://github.com/paritytech/parity/pull/7887))
|
||||
- Rename DatabaseValueView::new to from_rlp ([#8159](https://github.com/paritytech/parity/pull/8159))
|
||||
- Dapps: update parity-ui dependencies ([#8160](https://github.com/paritytech/parity/pull/8160))
|
||||
- Disable UI by default. ([#8105](https://github.com/paritytech/parity/pull/8105))
|
||||
- Fix wasmi x32 builds ([#8155](https://github.com/paritytech/parity/pull/8155))
|
||||
- Postpone Kovan hard fork ([#8137](https://github.com/paritytech/parity/pull/8137))
|
||||
- Secretstore: ability to identify requester via Public/Address ([#7886](https://github.com/paritytech/parity/pull/7886))
|
||||
- Optional dependency on secp256k1 for ethcrypto ([#8109](https://github.com/paritytech/parity/pull/8109))
|
||||
- Network: init discovery using healthy nodes ([#8061](https://github.com/paritytech/parity/pull/8061))
|
||||
- Check one step deeper if we're on release track branches ([#8134](https://github.com/paritytech/parity/pull/8134))
|
||||
- Explicitly mention pruning_history uses RAM ([#8130](https://github.com/paritytech/parity/pull/8130))
|
||||
- Remove `ethcrypto::{en,de}crypt_single_message`. ([#8126](https://github.com/paritytech/parity/pull/8126))
|
||||
- Fix typo ([#8124](https://github.com/paritytech/parity/pull/8124))
|
||||
- Secret_store: use `ecies::encrypt`/`ecies::decrypt`. ([#8125](https://github.com/paritytech/parity/pull/8125))
|
||||
- Fix comment for fn gas() in wasm/runtime ([#8122](https://github.com/paritytech/parity/pull/8122))
|
||||
- Structured rlp encoding in journaldb ([#8047](https://github.com/paritytech/parity/pull/8047))
|
||||
- Ci: disable link-dead-code in coverage build ([#8118](https://github.com/paritytech/parity/pull/8118))
|
||||
- Fix trace filter returning returning unrelated reward calls, closes [#8070](https://github.com/paritytech/parity/issues/8070) ([#8098](https://github.com/paritytech/parity/pull/8098))
|
||||
- Const time comparison ([#8113](https://github.com/paritytech/parity/pull/8113))
|
||||
- Replace reqwest with hyper ([#8099](https://github.com/paritytech/parity/pull/8099))
|
||||
- More dos protection ([#8104](https://github.com/paritytech/parity/pull/8104))
|
||||
- Remove the time dependency where possible ([#8100](https://github.com/paritytech/parity/pull/8100))
|
||||
- Fix comment for gas extern in Wasm runtime ([#8101](https://github.com/paritytech/parity/pull/8101))
|
||||
- Replace std::env::temp_dir with tempdir in tests ([#8103](https://github.com/paritytech/parity/pull/8103))
|
||||
- Fix Cargo.lock not parsable ([#8102](https://github.com/paritytech/parity/pull/8102))
|
||||
- Additional data in EVMTestClient ([#7964](https://github.com/paritytech/parity/pull/7964))
|
||||
- Update serde, serde-derive, ethabi-derive, syn, quote and rlp_derive ([#8085](https://github.com/paritytech/parity/pull/8085))
|
||||
- Ethcore-service ([#8089](https://github.com/paritytech/parity/pull/8089))
|
||||
- [contract-client] refactor ([#7978](https://github.com/paritytech/parity/pull/7978))
|
||||
- Revert removing blooms ([#8066](https://github.com/paritytech/parity/pull/8066))
|
||||
- Ethcore test::helpers cleanup ([#8086](https://github.com/paritytech/parity/pull/8086))
|
||||
- Add some dos protection ([#8084](https://github.com/paritytech/parity/pull/8084))
|
||||
- Wasm libraries bump ([#7970](https://github.com/paritytech/parity/pull/7970))
|
||||
- Echo back the message hash of a ping in the pong request ([#8042](https://github.com/paritytech/parity/pull/8042))
|
||||
- Add Kovan WASM activation blocknumber ([#8057](https://github.com/paritytech/parity/pull/8057))
|
||||
- [ethkey] Unify debug/display for Address/Public/Secret ([#8076](https://github.com/paritytech/parity/pull/8076))
|
||||
- Limit incoming connections. ([#8060](https://github.com/paritytech/parity/pull/8060))
|
||||
- Max code size on Kovan ([#8067](https://github.com/paritytech/parity/pull/8067))
|
||||
- Updater: apply exponential backoff after download failure ([#8059](https://github.com/paritytech/parity/pull/8059))
|
||||
- Make blockchain functions more idiomatic, avoid needless writes to cache_man ([#8054](https://github.com/paritytech/parity/pull/8054))
|
||||
- Make patricia-trie more idiomatic and remove redundant code ([#8056](https://github.com/paritytech/parity/pull/8056))
|
||||
- Abstract devp2p ([#8048](https://github.com/paritytech/parity/pull/8048))
|
||||
- Update refs to shell ([#8051](https://github.com/paritytech/parity/pull/8051))
|
||||
- Fix cache & snapcraft CI build ([#8052](https://github.com/paritytech/parity/pull/8052))
|
||||
- Prelude to the block module cleanup ([#8025](https://github.com/paritytech/parity/pull/8025))
|
||||
- Add MCIP-6 Byzyantium transition to Musicoin spec ([#7841](https://github.com/paritytech/parity/pull/7841))
|
||||
- Bump master to 1.11.0 ([#8021](https://github.com/paritytech/parity/pull/8021))
|
||||
- `client` refactoring ([#7038](https://github.com/paritytech/parity/pull/7038))
|
||||
- [hardware wallet] sleeping -> pollling ([#8018](https://github.com/paritytech/parity/pull/8018))
|
||||
- Fixed broken link in README ([#8012](https://github.com/paritytech/parity/pull/8012))
|
||||
- Support parity protocol. ([#8035](https://github.com/paritytech/parity/pull/8035))
|
||||
- Add changelog for 1.8.11 stable and 1.9.4 beta ([#8017](https://github.com/paritytech/parity/pull/8017))
|
||||
- Fix for verify_block_basic crashing on invalid transaction rlp ([#8032](https://github.com/paritytech/parity/pull/8032))
|
||||
- Extract the hard dependency on rocksdb from the light client ([#8034](https://github.com/paritytech/parity/pull/8034))
|
||||
- Fixed parsing ethash seals and verify_block_undordered ([#8031](https://github.com/paritytech/parity/pull/8031))
|
||||
- Fixed ethstore sign ([#8026](https://github.com/paritytech/parity/pull/8026))
|
||||
- Ci: Fix cargo cache ([#7968](https://github.com/paritytech/parity/pull/7968))
|
||||
- Update ref to new shell ([#8024](https://github.com/paritytech/parity/pull/8024))
|
||||
@@ -1,376 +0,0 @@
|
||||
Note: Parity 1.2 reached End-of-Life on 2016-11-07 (EOL).
|
||||
|
||||
## Parity [v1.2.4](https://github.com/paritytech/parity/releases/tag/v1.2.4) (2016-08-09)
|
||||
|
||||
Parity 1.2.4 Is a maintenance release that fixes a [few](https://github.com/paritytech/parity/pull/1888/commits) issues related to mining and peer synchronization.
|
||||
This release is marked as stable.
|
||||
|
||||
- Backports for beta [#1888](https://github.com/paritytech/parity/pull/1888)
|
||||
- BETA: fixed trace_transaction crash when block contained suicide [#1782](https://github.com/paritytech/parity/pull/1782)
|
||||
|
||||
## Parity [v1.2.3](https://github.com/paritytech/parity/releases/tag/v1.2.3) (2016-07-31)
|
||||
|
||||
Parity 1.2.3 is a patch release that addresses network stability issues for both Ethereum HF and Ethereum classic chains and brings a few changes to the transaction tracing API.
|
||||
|
||||
#### Tracing API changes
|
||||
- Added tracing for `CALLCODE`, `DELEGATECALL` and `SUICIDE`
|
||||
- `trace_call` returns traces in flat format
|
||||
- Added 2 new methods: `trace_rawTransaction` and `trace_replayTransaction`
|
||||
|
||||
Note that to continue using tracing features in this version you need to re-sync the blockchain. This can be done by using `parity export $HOME/ethereum-chain-backup.rlp` , deleting the database usually located at `~/.parity/906a34e69aec8c0d` followed by `parity import $HOME/ethereum-chain-backup.rlp`.
|
||||
|
||||
- [beta] Updating UI [#1778](https://github.com/paritytech/parity/pull/1778)
|
||||
- tracing backport [#1770](https://github.com/paritytech/parity/pull/1770)
|
||||
- Backport commits to beta [#1763](https://github.com/paritytech/parity/pull/1763)
|
||||
- Deadlock on incoming connection (#1672) [#1675](https://github.com/paritytech/parity/pull/1675)
|
||||
- [BETA] Removed DAO soft fork traces [#1640](https://github.com/paritytech/parity/pull/1640)
|
||||
|
||||
|
||||
## Parity [v1.2.2](https://github.com/paritytech/parity/releases/tag/v1.2.2) (2016-07-16)
|
||||
|
||||
#### New
|
||||
- DAO hard-fork.
|
||||
|
||||
DAO hard-fork implementation conforms to the [specification](https://blog.slock.it/hard-fork-specification-24b889e70703) and is enabled by default.
|
||||
|
||||
#### Changed
|
||||
- `--reseal-on-txs` defaults to `own`.
|
||||
- DAO soft-fork support has been removed along with related command line options.
|
||||
|
||||
#### Resolved issues
|
||||
- `--db-cache-size` consuming too much memory.
|
||||
`eth_getWork` RPC response additionally includes the block number.
|
||||
- Skipping transactions with invalid nonces when pushing to block.
|
||||
- Update sealing just once when externally importing many blocks (#1541).
|
||||
- Transaction tracing skipping simple transactions (#1606).
|
||||
- Other small fixes and improvements.
|
||||
|
||||
Full changelog
|
||||
|
||||
- DAO hard-fork (#1483) [#1636](https://github.com/paritytech/parity/pull/1636)
|
||||
- Backports for beta [#1628](https://github.com/paritytech/parity/pull/1628)
|
||||
- don't batch best block for branches (#1623) [#1626](https://github.com/paritytech/parity/pull/1626)
|
||||
- Merge bugfixes from master to beta [#1605](https://github.com/paritytech/parity/pull/1605)
|
||||
- (BETA) using block options cache instead of general cache for rocksdb [#1613](https://github.com/paritytech/parity/pull/1613)
|
||||
- Backport sealing fixes to beta [#1583](https://github.com/paritytech/parity/pull/1583)
|
||||
- v1.2.2 in beta [#1581](https://github.com/paritytech/parity/pull/1581)
|
||||
- Skipping transactions with invalid nonces when pushing to block. (#1545) [#1547](https://github.com/paritytech/parity/pull/1547)
|
||||
|
||||
|
||||
## Parity [v1.2.1](https://github.com/paritytech/parity/releases/tag/v1.2.1) (2016-07-01)
|
||||
|
||||
#### New
|
||||
- Options for more precise mining tuning (see below).
|
||||
- Informative notification when block mined.
|
||||
- HTTP signal on new work-package.
|
||||
- Optimised database insertion for self-mined blocks.
|
||||
- Short-circuit for local transaction gas-price approval.
|
||||
- A number of issues related to mining have been fixed.
|
||||
|
||||
##### Mining options
|
||||
- `--author` is now required for mining.
|
||||
- `--reseal-on-txs` Specify which transactions should force the node to reseal a block. By default parity updates the seal on incoming transactions to reduce transaction latency. Set this option to `none` to force updates on new blocks only.
|
||||
- `--reseal-min-period` Can be used to control how often a new pending block is generated if `none` is not selected on prior option.
|
||||
- `--work-queue-size` Controls how many pending blocks to keep in memory.
|
||||
- `--relay-set` Can be used to enable more strict transaction verification.
|
||||
- `--remove-solved` Move solved blocks from the work package queue instead of cloning them. This gives a slightly faster import speed, but means that extra solutions submitted for the same work package will go unused.
|
||||
- `--notify-work` Accepts a list of URLs that will receive a POST request when new work package is available. The body of the POST message is JSON encoded and has the same format as `eth_getWork` RPC response.
|
||||
|
||||
##### RPC
|
||||
|
||||
`eth_getWork` RPC response additionally includes the block number.
|
||||
|
||||
##### DAO soft-fork
|
||||
|
||||
DAO soft-fork control options have been replaced by the single `--fork` option which disables the soft-fork by default.
|
||||
|
||||
#### Changes
|
||||
|
||||
- v1.2.1 in beta [#1492](https://github.com/paritytech/parity/pull/1492)
|
||||
- (BETA) add artifacts [#1420](https://github.com/paritytech/parity/pull/1420)
|
||||
|
||||
## Parity [v1.2.0: "Security"](https://github.com/paritytech/parity/releases/tag/v1.2.0) (2016-06-24)
|
||||
|
||||
[Blog post](https://blog.parity.io/announcing-parity-1-2/)
|
||||
|
||||
#### New
|
||||
|
||||
- Transaction signing UI.
|
||||
- IPC/RPC module.
|
||||
- Optimised mining support.
|
||||
- Windows build.
|
||||
- DAO soft-fork support.
|
||||
|
||||
##### Transaction signing UI
|
||||
|
||||
This is a new framework for signing transactions. It fulfills three requirements:
|
||||
- You should never have to type your passwords into a Dapp.
|
||||
- No Javascript code should ever hold a secret.
|
||||
- No transaction should ever be signed without the consent of the user.
|
||||
|
||||
The feature is enabled through the `--signer` flag. When enabled, the user must ensure at least one "Signer UI" is set-up for managing transaction confirmation. There are two such UIs available; one through a Google Chrome Extension, separately installable and the second through a special web page hosted locally. Set-up must be done once for each such UI, through copying and pasting a token from the output console of Parity into the UI. Specific instructions are given in the UI.
|
||||
|
||||
From this point on, no transaction may ever be signed by Parity except through one of these allowed Signer UIs, and no password should ever be entered anywhere else.
|
||||
|
||||
##### IPC/RPC module and Mist/Geth compatibility
|
||||
|
||||
Should be started with `--geth` to ensure Mist compatibility.
|
||||
|
||||
##### Optimised mining support
|
||||
|
||||
Numerous improvements and optimisations have been added to our mining implementation. A large "active queue" ensures that late-included transactions are included in the mined block without sacrificing older results from latent-reported `ethminer` results.
|
||||
|
||||
##### Windows build
|
||||
|
||||
We're happy to announce full Windows support with 1.2!
|
||||
|
||||
##### Soft-fork
|
||||
|
||||
This release includes support for the proposed [DAO soft-fork](https://docs.google.com/document/d/10RktunzjKNfp6Y8Cu4EhR5V9IqxEZq42LU126EYhWY4/pub). Upon upgrade, all mining nodes can vote for or against the soft fork (this is done through altering the block gas limit; a gas limit of at most 4M results in the soft-fork being triggered).
|
||||
|
||||
By default, nodes vote "for" the DAO soft-fork (and try to reduce the gas limit to 3.1M). To vote against the soft-fork (keeping it at 4.7M), run with `--dont-help-rescue-dao`. Not upgrading is not recommended; if the majority votes with a soft-fork, an upgrade will be necessary to mine on the correct chain.
|
||||
|
||||
#### Changed
|
||||
- Fast pruning method is now default for a fresh sync.
|
||||
- Web UI renamed to Dapps UI.
|
||||
- JSONRPC and Dapps UI enabled by default.
|
||||
- CLI options ending `-off` renamed to GNU-consistent prefix `--no-`.
|
||||
- Dynamic gas-pricing (data feed and statistical techniques used to determine optimum gas prices).
|
||||
|
||||
Full changes:
|
||||
|
||||
- Signer enabled by default for UI [#1417](https://github.com/paritytech/parity/pull/1417)
|
||||
- Remove experimental pruning options. [#1415](https://github.com/paritytech/parity/pull/1415)
|
||||
- Fixing interface and port for parity ui [#1414](https://github.com/paritytech/parity/pull/1414)
|
||||
- Configurable gas limit cap. [#1405](https://github.com/paritytech/parity/pull/1405)
|
||||
- Bumping TopBar, Minimal SignerUI and wallet [#1413](https://github.com/paritytech/parity/pull/1413)
|
||||
- Sync: Update highest block for progress reporting [#1411](https://github.com/paritytech/parity/pull/1411)
|
||||
- Tweaked CLI options for the release [#1407](https://github.com/paritytech/parity/pull/1407)
|
||||
- Further rocksdb tuning [#1409](https://github.com/paritytech/parity/pull/1409)
|
||||
- Fixing jit compilation [#1406](https://github.com/paritytech/parity/pull/1406)
|
||||
- Bump clippy [#1403](https://github.com/paritytech/parity/pull/1403)
|
||||
- Shortcut SF condition when canon known [#1401](https://github.com/paritytech/parity/pull/1401)
|
||||
- Additional assertions for internal state of queue [#1402](https://github.com/paritytech/parity/pull/1402)
|
||||
- Replace deprecated hashdb trait names [#1394](https://github.com/paritytech/parity/pull/1394)
|
||||
- rpc api by default for ipc [#1400](https://github.com/paritytech/parity/pull/1400)
|
||||
- Ensure judging the SF trigger by relative branch [#1399](https://github.com/paritytech/parity/pull/1399)
|
||||
- Signer with unlocked account working as expected. [#1398](https://github.com/paritytech/parity/pull/1398)
|
||||
- Make --signer default. [#1392](https://github.com/paritytech/parity/pull/1392)
|
||||
- Presale wallet [#1376](https://github.com/paritytech/parity/pull/1376)
|
||||
- Removing signer connection limit [#1396](https://github.com/paritytech/parity/pull/1396)
|
||||
- Optional gas price in transactions come from statistics [#1388](https://github.com/paritytech/parity/pull/1388)
|
||||
- Update README.md with cargo install [ci-skip] [#1389](https://github.com/paritytech/parity/pull/1389)
|
||||
- Fixing possible overflow during multiplication [#1381](https://github.com/paritytech/parity/pull/1381)
|
||||
- Update SF to latest spec [#1386](https://github.com/paritytech/parity/pull/1386)
|
||||
- Sync optimization [#1385](https://github.com/paritytech/parity/pull/1385)
|
||||
- Fixing order of if statements to avoid overflows. [#1384](https://github.com/paritytech/parity/pull/1384)
|
||||
- New topbar & signer UI [#1383](https://github.com/paritytech/parity/pull/1383)
|
||||
- Install trigger for DAO-rescue soft-fork. [#1329](https://github.com/paritytech/parity/pull/1329)
|
||||
- Rocksdb flush/compact limit [#1375](https://github.com/paritytech/parity/pull/1375)
|
||||
- CentOS Dockerfile [#1377](https://github.com/paritytech/parity/pull/1377)
|
||||
- RPC method to return number of unconfirmed transactions... [#1371](https://github.com/paritytech/parity/pull/1371)
|
||||
- bump jsonrpc-http-server [#1369](https://github.com/paritytech/parity/pull/1369)
|
||||
- Fix lock order when updating sealing [#1364](https://github.com/paritytech/parity/pull/1364)
|
||||
- Update sealing on new transactions [#1365](https://github.com/paritytech/parity/pull/1365)
|
||||
- Fixed panic on aborted connection [#1370](https://github.com/paritytech/parity/pull/1370)
|
||||
- importing presale wallet [#1368](https://github.com/paritytech/parity/pull/1368)
|
||||
- Set default database file size large enough [#1363](https://github.com/paritytech/parity/pull/1363)
|
||||
- Reserved peers rpc API [#1360](https://github.com/paritytech/parity/pull/1360)
|
||||
- Fixing replacing transaction with lower gas_price result. [#1343](https://github.com/paritytech/parity/pull/1343)
|
||||
- fixed migration of empty pruning dir [#1362](https://github.com/paritytech/parity/pull/1362)
|
||||
- Transaction processing queue [#1335](https://github.com/paritytech/parity/pull/1335)
|
||||
- Fixing last nonce values in case transaction is replaced [#1359](https://github.com/paritytech/parity/pull/1359)
|
||||
- docopt is an optional dependency of ethkey and ethstore [#1358](https://github.com/paritytech/parity/pull/1358)
|
||||
- Fixing clippy warnings [#1354](https://github.com/paritytech/parity/pull/1354)
|
||||
- Reduce locking when syncing [#1357](https://github.com/paritytech/parity/pull/1357)
|
||||
- removed unnecessary logs [#1356](https://github.com/paritytech/parity/pull/1356)
|
||||
- Updating parity-dapps [#1353](https://github.com/paritytech/parity/pull/1353)
|
||||
- moved keystore tests files from util to ethstore [#1352](https://github.com/paritytech/parity/pull/1352)
|
||||
- removed redundant bigint deps [#1351](https://github.com/paritytech/parity/pull/1351)
|
||||
- Reopen "reserved peers and reserved-only flag" [#1350](https://github.com/paritytech/parity/pull/1350)
|
||||
- Configurable rocksdb cache size [#1348](https://github.com/paritytech/parity/pull/1348)
|
||||
- Fixing future order and errors when reaching limit. [#1346](https://github.com/paritytech/parity/pull/1346)
|
||||
- Removing priority on local transactions [#1342](https://github.com/paritytech/parity/pull/1342)
|
||||
- Revert "Reserved peers, reserved-only flag" [#1349](https://github.com/paritytech/parity/pull/1349)
|
||||
- Sync attack defense: Deactivate peers on invalid block bodies [#1345](https://github.com/paritytech/parity/pull/1345)
|
||||
- Reserved peers, reserved-only flag [#1347](https://github.com/paritytech/parity/pull/1347)
|
||||
- CI for ethkey and ethstore [#1341](https://github.com/paritytech/parity/pull/1341)
|
||||
- Fixed empty block body composition [#1340](https://github.com/paritytech/parity/pull/1340)
|
||||
- Provide a signer UI token by default. [#1334](https://github.com/paritytech/parity/pull/1334)
|
||||
- docker uses rustup, fixes #1337 [#1344](https://github.com/paritytech/parity/pull/1344)
|
||||
- Fixed network service dispose [#1339](https://github.com/paritytech/parity/pull/1339)
|
||||
- Sync: Cache last sync round block parents [#1331](https://github.com/paritytech/parity/pull/1331)
|
||||
- secret store separated from util [#1304](https://github.com/paritytech/parity/pull/1304)
|
||||
- --geth prevent getTransactionReceipt from using pending. [#1325](https://github.com/paritytech/parity/pull/1325)
|
||||
- Fixing locks order in miner. [#1328](https://github.com/paritytech/parity/pull/1328)
|
||||
- Update default gas limit, rename field [#1324](https://github.com/paritytech/parity/pull/1324)
|
||||
- Use constants for DatabaseConfig [#1318](https://github.com/paritytech/parity/pull/1318)
|
||||
- Fixing clippy warnings [#1321](https://github.com/paritytech/parity/pull/1321)
|
||||
- Bumping topbar. Fixing ws server closing when suspending [#1312](https://github.com/paritytech/parity/pull/1312)
|
||||
- Syncing fix [#1320](https://github.com/paritytech/parity/pull/1320)
|
||||
- Filling-in optional fields of TransactionRequest... [#1305](https://github.com/paritytech/parity/pull/1305)
|
||||
- Removing MakerOTC and DAO dapps [#1319](https://github.com/paritytech/parity/pull/1319)
|
||||
- Disabling ethcore_set* APIs by default (+ Status page update) [#1315](https://github.com/paritytech/parity/pull/1315)
|
||||
- fixed #1180 [#1282](https://github.com/paritytech/parity/pull/1282)
|
||||
- Network start/stop [#1313](https://github.com/paritytech/parity/pull/1313)
|
||||
- Additional logging for own transactions in queue [#1311](https://github.com/paritytech/parity/pull/1311)
|
||||
- DAO Rescue soft fork [#1309](https://github.com/paritytech/parity/pull/1309)
|
||||
- Appveyor config for windows build+installer [#1302](https://github.com/paritytech/parity/pull/1302)
|
||||
- Key load avoid warning [#1303](https://github.com/paritytech/parity/pull/1303)
|
||||
- More meaningful errors when sending transaction [#1290](https://github.com/paritytech/parity/pull/1290)
|
||||
- Gas price statistics. [#1291](https://github.com/paritytech/parity/pull/1291)
|
||||
- Fix read-ahead bug. [#1298](https://github.com/paritytech/parity/pull/1298)
|
||||
- firewall rules for windows installer [#1297](https://github.com/paritytech/parity/pull/1297)
|
||||
- x64 program files path for installer [#1296](https://github.com/paritytech/parity/pull/1296)
|
||||
- Fixed loosing peers on incoming connections. [#1293](https://github.com/paritytech/parity/pull/1293)
|
||||
- fixed #1261, overflow when calculating work [#1283](https://github.com/paritytech/parity/pull/1283)
|
||||
- snappy and minor block compression [#1286](https://github.com/paritytech/parity/pull/1286)
|
||||
- clarify build instructions [#1287](https://github.com/paritytech/parity/pull/1287)
|
||||
- fixed #1255 [#1280](https://github.com/paritytech/parity/pull/1280)
|
||||
- bump rust-crypto [#1289](https://github.com/paritytech/parity/pull/1289)
|
||||
- Security audit issues fixed [#1279](https://github.com/paritytech/parity/pull/1279)
|
||||
- Fixing origin/host validation [#1273](https://github.com/paritytech/parity/pull/1273)
|
||||
- windows installer + parity start ui cli option [#1284](https://github.com/paritytech/parity/pull/1284)
|
||||
- ipc lib version bump [#1285](https://github.com/paritytech/parity/pull/1285)
|
||||
- Syncing improvements [#1274](https://github.com/paritytech/parity/pull/1274)
|
||||
- removed redundant if condition [#1270](https://github.com/paritytech/parity/pull/1270)
|
||||
- Naive chunk creation, snapshotting [#1263](https://github.com/paritytech/parity/pull/1263)
|
||||
- Fixing generating new token while another parity instance is running. [#1272](https://github.com/paritytech/parity/pull/1272)
|
||||
- README: rustup and windows instructions [#1266](https://github.com/paritytech/parity/pull/1266)
|
||||
- Windows build [#1253](https://github.com/paritytech/parity/pull/1253)
|
||||
- removed try_seal from MiningBlockChainClient [#1262](https://github.com/paritytech/parity/pull/1262)
|
||||
- simplified block opening [#1232](https://github.com/paritytech/parity/pull/1232)
|
||||
- Clippy bump [#1259](https://github.com/paritytech/parity/pull/1259)
|
||||
- Fixing uint ASM macros compilation [#1258](https://github.com/paritytech/parity/pull/1258)
|
||||
- Signer port returned from RPC + Topbar showing count of unconfirmed transactions. [#1252](https://github.com/paritytech/parity/pull/1252)
|
||||
- codegen - avoid unwraps leading to compilation crash [#1250](https://github.com/paritytech/parity/pull/1250)
|
||||
- Dapps bump [#1257](https://github.com/paritytech/parity/pull/1257)
|
||||
- Windows named pipes [#1254](https://github.com/paritytech/parity/pull/1254)
|
||||
- remove unsafety from util/hash.rs and util/bigint/uint.rs [#1236](https://github.com/paritytech/parity/pull/1236)
|
||||
- Fixing CORS settings for special values: * & null. [#1247](https://github.com/paritytech/parity/pull/1247)
|
||||
- JSONRPC test strings avoid using \ char [#1246](https://github.com/paritytech/parity/pull/1246)
|
||||
- Tests for JSON serialisation of statediff/vmtrace [#1241](https://github.com/paritytech/parity/pull/1241)
|
||||
- Bumping Dapps & TopBar to newest version. [#1245](https://github.com/paritytech/parity/pull/1245)
|
||||
- keys import [#1240](https://github.com/paritytech/parity/pull/1240)
|
||||
- Splitting RPC Apis into more fine-grained sets [#1234](https://github.com/paritytech/parity/pull/1234)
|
||||
- Refactor triedb constructors to error on invalid state root [#1230](https://github.com/paritytech/parity/pull/1230)
|
||||
- Signer RPC method to check if signer is enabled [#1238](https://github.com/paritytech/parity/pull/1238)
|
||||
- Fixing signer behaviour when confirming transaction with wrong password. [#1237](https://github.com/paritytech/parity/pull/1237)
|
||||
- SystemUIs authorization [#1233](https://github.com/paritytech/parity/pull/1233)
|
||||
- IPC path for tesetnet with --geth compatibility [#1231](https://github.com/paritytech/parity/pull/1231)
|
||||
- Transaction tracing for eth_call [#1210](https://github.com/paritytech/parity/pull/1210)
|
||||
- Removing compilation warnings [#1227](https://github.com/paritytech/parity/pull/1227)
|
||||
- Allowing connections only from chrome-extension and self-hosted client [#1226](https://github.com/paritytech/parity/pull/1226)
|
||||
- Clippy bump & fixing warnings [#1219](https://github.com/paritytech/parity/pull/1219)
|
||||
- Bumping serde & syntex [#1216](https://github.com/paritytech/parity/pull/1216)
|
||||
- Minimal Signer UI (System UI) exposed over websockets. [#1211](https://github.com/paritytech/parity/pull/1211)
|
||||
- Switch RPC namespace form ethcore_ to trace_ [#1208](https://github.com/paritytech/parity/pull/1208)
|
||||
- Verify the state root exists before creating a State [#1217](https://github.com/paritytech/parity/pull/1217)
|
||||
- Integrate state diffing into the ethcore JSONRPC [#1206](https://github.com/paritytech/parity/pull/1206)
|
||||
- Updating topbar to latest version [#1220](https://github.com/paritytech/parity/pull/1220)
|
||||
- Loading local Dapps from FS. [#1214](https://github.com/paritytech/parity/pull/1214)
|
||||
- Ipc serialization & protocol fixes [#1188](https://github.com/paritytech/parity/pull/1188)
|
||||
- Have Ext::ret take self by value [#1187](https://github.com/paritytech/parity/pull/1187)
|
||||
- Simple WebSockets notification about new request [#1202](https://github.com/paritytech/parity/pull/1202)
|
||||
- Removing leftovers of ethminer [#1207](https://github.com/paritytech/parity/pull/1207)
|
||||
- fixed #1204 [#1205](https://github.com/paritytech/parity/pull/1205)
|
||||
- VM tracing and JSON RPC endpoint for it. [#1169](https://github.com/paritytech/parity/pull/1169)
|
||||
- devtools helpers extended [#1186](https://github.com/paritytech/parity/pull/1186)
|
||||
- Networking refactoring [#1172](https://github.com/paritytech/parity/pull/1172)
|
||||
- Client & Miner refactoring [#1195](https://github.com/paritytech/parity/pull/1195)
|
||||
- update readme [#1201](https://github.com/paritytech/parity/pull/1201)
|
||||
- Simple signing queue, confirmation APIs exposed in signer WebSockets. [#1182](https://github.com/paritytech/parity/pull/1182)
|
||||
- Using ordered hashmap to keep the order of dapps on home screen [#1199](https://github.com/paritytech/parity/pull/1199)
|
||||
- Disabling `ethcore` by default, adding x-frame-options header to dapps. [#1197](https://github.com/paritytech/parity/pull/1197)
|
||||
- transaction count verifier tests [#1196](https://github.com/paritytech/parity/pull/1196)
|
||||
- expunge x! and xx! from the codebase [#1192](https://github.com/paritytech/parity/pull/1192)
|
||||
- Database service upgrade (from the ipc branch) [#1185](https://github.com/paritytech/parity/pull/1185)
|
||||
- stop eth_syncing from returning true forever [#1181](https://github.com/paritytech/parity/pull/1181)
|
||||
- Sync fixes and tweaks [#1164](https://github.com/paritytech/parity/pull/1164)
|
||||
- Exposing RPC over Signer WebSockets [#1167](https://github.com/paritytech/parity/pull/1167)
|
||||
- implement missing rpc methods and tests [#1171](https://github.com/paritytech/parity/pull/1171)
|
||||
- json ipc server version bump [#1170](https://github.com/paritytech/parity/pull/1170)
|
||||
- Updated dependencies for windows build [#1173](https://github.com/paritytech/parity/pull/1173)
|
||||
- Framework for improved RPC unit tests [#1141](https://github.com/paritytech/parity/pull/1141)
|
||||
- remove all possible unsafe code in crypto [#1168](https://github.com/paritytech/parity/pull/1168)
|
||||
- Base for Signer Websockets server [#1158](https://github.com/paritytech/parity/pull/1158)
|
||||
- Write queue to speed-up db ipc [#1160](https://github.com/paritytech/parity/pull/1160)
|
||||
- Fixing few clippy warnings [#1163](https://github.com/paritytech/parity/pull/1163)
|
||||
- Change eth_signAndSendTransaction to personal_SignAndSendTransaction [#1154](https://github.com/paritytech/parity/pull/1154)
|
||||
- Support "earliest" and specific block parameters in RPC where possible [#1149](https://github.com/paritytech/parity/pull/1149)
|
||||
- migration fixes [#1155](https://github.com/paritytech/parity/pull/1155)
|
||||
- Empty trusted signer crate with it's general purpose described. [#1150](https://github.com/paritytech/parity/pull/1150)
|
||||
- More bootnodes for morden. [#1153](https://github.com/paritytech/parity/pull/1153)
|
||||
- move existing rpc tests into mocked module [#1151](https://github.com/paritytech/parity/pull/1151)
|
||||
- Bloomchain [#1014](https://github.com/paritytech/parity/pull/1014)
|
||||
- Renaming dapps repos. Updating dapps [#1142](https://github.com/paritytech/parity/pull/1142)
|
||||
- fixed pending transactions [#1147](https://github.com/paritytech/parity/pull/1147)
|
||||
- Basic benches to provide metrics for ipc optimizations [#1145](https://github.com/paritytech/parity/pull/1145)
|
||||
- Fixing clippy warnings [#1148](https://github.com/paritytech/parity/pull/1148)
|
||||
- correct signature of SecTrieDB::raw_mut [#1143](https://github.com/paritytech/parity/pull/1143)
|
||||
- Merge to master and start hypervisor for import/export [#1138](https://github.com/paritytech/parity/pull/1138)
|
||||
- Bumping clippy. Fixing warnings [#1139](https://github.com/paritytech/parity/pull/1139)
|
||||
- Display progress when importing [#1136](https://github.com/paritytech/parity/pull/1136)
|
||||
- foundation of simple db migration [#1128](https://github.com/paritytech/parity/pull/1128)
|
||||
- Fixpending [#1074](https://github.com/paritytech/parity/pull/1074)
|
||||
- Sync: Propagate uncles and fix status reporting [#1134](https://github.com/paritytech/parity/pull/1134)
|
||||
- Coloured, padding logging. [#1133](https://github.com/paritytech/parity/pull/1133)
|
||||
- Importing [#1132](https://github.com/paritytech/parity/pull/1132)
|
||||
- Have `die_with_error` use `fmt::Display` rather than Debug [#1116](https://github.com/paritytech/parity/pull/1116)
|
||||
- Exporting [#1129](https://github.com/paritytech/parity/pull/1129)
|
||||
- Sign and send transaction [#1124](https://github.com/paritytech/parity/pull/1124)
|
||||
- Fixing unused imports warnings [#1125](https://github.com/paritytech/parity/pull/1125)
|
||||
- Adding info messages on mined blocks [#1127](https://github.com/paritytech/parity/pull/1127)
|
||||
- Fix styling - don't mix spaces with tabs!!! [#1123](https://github.com/paritytech/parity/pull/1123)
|
||||
- Fix is_syncing so it's false as long as the update is trivial. [#1122](https://github.com/paritytech/parity/pull/1122)
|
||||
- Relock unlocked accounts after first use [#1120](https://github.com/paritytech/parity/pull/1120)
|
||||
- Avoid importing keys into wrong place. [#1119](https://github.com/paritytech/parity/pull/1119)
|
||||
- Implement receipt's gasUsed field [#1118](https://github.com/paritytech/parity/pull/1118)
|
||||
- New dapps & query parameter handling [#1113](https://github.com/paritytech/parity/pull/1113)
|
||||
- pretty print trace error [#1098](https://github.com/paritytech/parity/pull/1098)
|
||||
- New syncing strategy [#1095](https://github.com/paritytech/parity/pull/1095)
|
||||
- ethcore-db crate [#1097](https://github.com/paritytech/parity/pull/1097)
|
||||
- Fix the default for pruning. [#1107](https://github.com/paritytech/parity/pull/1107)
|
||||
- Make Id/ID and db/Db/DB usage consistent [#1105](https://github.com/paritytech/parity/pull/1105)
|
||||
- Miner holds it's own copy of spec/engine [#1091](https://github.com/paritytech/parity/pull/1091)
|
||||
- Apps listing API & Home webapp. [#1101](https://github.com/paritytech/parity/pull/1101)
|
||||
- CLI option for using JITEVM [#1103](https://github.com/paritytech/parity/pull/1103)
|
||||
- Fix up the seal fields in RPC output [#1096](https://github.com/paritytech/parity/pull/1096)
|
||||
- Fixing some warnings [#1102](https://github.com/paritytech/parity/pull/1102)
|
||||
- fixed incorrect decoding of header seal_fields. added tests. #1090 [#1094](https://github.com/paritytech/parity/pull/1094)
|
||||
- Bumping Clippy [#1093](https://github.com/paritytech/parity/pull/1093)
|
||||
- Injectable topbar support. [#1092](https://github.com/paritytech/parity/pull/1092)
|
||||
- New syncing part 1: Block collection [#1088](https://github.com/paritytech/parity/pull/1088)
|
||||
- Moving all Client public API types to separate mod & binary serialization codegen for that mod [#1051](https://github.com/paritytech/parity/pull/1051)
|
||||
- Subdomains support in content server (webapps server). [#1082](https://github.com/paritytech/parity/pull/1082)
|
||||
- Fix uncle getter [#1087](https://github.com/paritytech/parity/pull/1087)
|
||||
- Provide fallback for usd-per-eth option when offline. [#1085](https://github.com/paritytech/parity/pull/1085)
|
||||
- path centralized [#1083](https://github.com/paritytech/parity/pull/1083)
|
||||
- Limiting result of the execution to execution-specific errors [#1071](https://github.com/paritytech/parity/pull/1071)
|
||||
- Configurable keys security [#1080](https://github.com/paritytech/parity/pull/1080)
|
||||
- comma delimeting multiple cors headers [#1078](https://github.com/paritytech/parity/pull/1078)
|
||||
- Update error message [#1081](https://github.com/paritytech/parity/pull/1081)
|
||||
- Updating dapp-wallet [#1076](https://github.com/paritytech/parity/pull/1076)
|
||||
- Fixed connecting to local nodes on startup [#1070](https://github.com/paritytech/parity/pull/1070)
|
||||
- Validate signature in Tx queue [#1068](https://github.com/paritytech/parity/pull/1068)
|
||||
- moving deps to ethcore/hyper and bumping jsonrpc-http-server version [#1067](https://github.com/paritytech/parity/pull/1067)
|
||||
- Updating status page. Bringing back wallet [#1064](https://github.com/paritytech/parity/pull/1064)
|
||||
- Fix --geth IPC for MacOS. [#1062](https://github.com/paritytech/parity/pull/1062)
|
||||
- Fixing formatter for defaultExtraData [#1060](https://github.com/paritytech/parity/pull/1060)
|
||||
- --geth IPC compatibility [#1059](https://github.com/paritytech/parity/pull/1059)
|
||||
- Moving dependencies to ethcore & uniforming syntax libs through all crates [#1050](https://github.com/paritytech/parity/pull/1050)
|
||||
- update hyper branch mio [#1054](https://github.com/paritytech/parity/pull/1054)
|
||||
- IPC lib update [#1047](https://github.com/paritytech/parity/pull/1047)
|
||||
- Updating hyper-mio revision [#1048](https://github.com/paritytech/parity/pull/1048)
|
||||
- Bump ipc-lib version [#1046](https://github.com/paritytech/parity/pull/1046)
|
||||
- Tidy up CLI options and make JSONRPC & webapps on by default. [#1045](https://github.com/paritytech/parity/pull/1045)
|
||||
- Fixing clippy warnings [#1044](https://github.com/paritytech/parity/pull/1044)
|
||||
- Fixing RPC modules compatibility [#1041](https://github.com/paritytech/parity/pull/1041)
|
||||
- Fixing hyper-mio revision [#1043](https://github.com/paritytech/parity/pull/1043)
|
||||
- Updating locations of webapp stuff [#1040](https://github.com/paritytech/parity/pull/1040)
|
||||
- JSON-RPC over IPC [#1039](https://github.com/paritytech/parity/pull/1039)
|
||||
- Update nix/mio for ARM [#1036](https://github.com/paritytech/parity/pull/1036)
|
||||
- Basic Authority [#991](https://github.com/paritytech/parity/pull/991)
|
||||
- Prioritizing of local transaction [#1023](https://github.com/paritytech/parity/pull/1023)
|
||||
- Version 1.2 [#1030](https://github.com/paritytech/parity/pull/1030)
|
||||
- Bumping status page [#1033](https://github.com/paritytech/parity/pull/1033)
|
||||
@@ -1,502 +0,0 @@
|
||||
Note: Parity 1.3 reached End-of-Life on 2017-01-19 (EOL).
|
||||
|
||||
## Parity [v1.3.15](https://github.com/paritytech/parity/releases/tag/v1.3.15) (2016-12-10)
|
||||
|
||||
This patch release fixes an issue with syncing on the Ropsten test network.
|
||||
|
||||
- Backporting to stable [#3793](https://github.com/paritytech/parity/pull/3793)
|
||||
|
||||
## Parity [v1.3.14](https://github.com/paritytech/parity/releases/tag/v1.3.14) (2016-11-25)
|
||||
|
||||
Parity 1.3.14 fixes a few stability issues and adds support for the Ropsten testnet.
|
||||
|
||||
- Backporting to stable [#3616](https://github.com/paritytech/parity/pull/3616)
|
||||
|
||||
## Parity [v1.3.13](https://github.com/paritytech/parity/releases/tag/v1.3.13) (2016-11-18)
|
||||
|
||||
This release fixes an issue with EIP-155 transactions being allowed into the transaction pool.
|
||||
|
||||
- [stable] Check tx signatures before adding to the queue. [#3521](https://github.com/paritytech/parity/pull/3521)
|
||||
- Fix Stable Docker Build [#3479](https://github.com/paritytech/parity/pull/3479)
|
||||
|
||||
## Parity [v1.3.12](https://github.com/paritytech/parity/releases/tag/v1.3.12) (2016-11-16)
|
||||
|
||||
This stable release enables EIP-155/160/161/170 hardfork at block 2675000 (1885000 for test network).
|
||||
|
||||
- [stable] EIP-170 [#3462](https://github.com/paritytech/parity/pull/3462)
|
||||
- #3035 Backport to stable [#3441](https://github.com/paritytech/parity/pull/3441)
|
||||
|
||||
## Parity [v1.3.11](https://github.com/paritytech/parity/releases/tag/v1.3.11) (2016-11-11)
|
||||
|
||||
This is a maintenance release for the stable series to delay the EIP-155/160/161 hard fork transition. **Update from 1.3.10 is mandatory**. It also deprecates and disables the old Parity UI.
|
||||
|
||||
- [stable] Disable HF and UI [#3372](https://github.com/paritytech/parity/pull/3372)
|
||||
- [stable] EIP-155 update with Vitalik's new test vectors (#3166) [#3190](https://github.com/paritytech/parity/pull/3190)
|
||||
- Backport EIP-150 to stable [#2672](https://github.com/paritytech/parity/pull/2672)
|
||||
- Create gitlab-ci.yml for stable [#2517](https://github.com/paritytech/parity/pull/2517)
|
||||
|
||||
## Parity [v1.3.10](https://github.com/paritytech/parity/releases/tag/v1.3.10) (2016-11-04)
|
||||
|
||||
The latest 1.3 series release, now considered stable.
|
||||
|
||||
This includes several additional optimisations and fixes together with provisional support for the upcoming hard fork for EIP155/160/161.
|
||||
|
||||
- Stable branch reset to 1.3.10 [#3156](https://github.com/paritytech/parity/pull/3156)
|
||||
- Backporting to beta [#3149](https://github.com/paritytech/parity/pull/3149)
|
||||
- apply post-consolidation migrations after consolidating (BETA) [#3048](https://github.com/paritytech/parity/pull/3048)
|
||||
- [beta] Fix the brainwallet functionality. (#2994) [#3005](https://github.com/paritytech/parity/pull/3005)
|
||||
- Bumping json-ipc-server [#2989](https://github.com/paritytech/parity/pull/2989)
|
||||
- Backports for 1.3.10 [#2987](https://github.com/paritytech/parity/pull/2987)
|
||||
|
||||
## Parity [v1.3.9](https://github.com/paritytech/parity/releases/tag/v1.3.9) (2016-10-21)
|
||||
|
||||
This release enables EIP-150 hard fork for Ethereum Classic chain and resolves a few stability and performance issues, such as:
|
||||
- Interrupted syncing on the test network.
|
||||
- Block import delays caused by a large number of incoming transactions. A full re-sync is recommended for performance improvement to take effect.
|
||||
|
||||
Full changes:
|
||||
- [beta] Resolve morden fork [#2776](https://github.com/paritytech/parity/pull/2776)
|
||||
- Fixing botched merge [#2767](https://github.com/paritytech/parity/pull/2767)
|
||||
- Backports for beta [#2764](https://github.com/paritytech/parity/pull/2764)
|
||||
- Introduce EIP150 hardfork block for ETC [#2736](https://github.com/paritytech/parity/pull/2736)
|
||||
- [beta] fix issues with no test dir present (#2659) [#2724](https://github.com/paritytech/parity/pull/2724)
|
||||
- [beta] Bumping jsonrpc-http-server [#2715](https://github.com/paritytech/parity/pull/2715)
|
||||
- [beta] Fix migration system, better errors [#2661](https://github.com/paritytech/parity/pull/2661)
|
||||
|
||||
## Parity [v1.3.8](https://github.com/paritytech/parity/releases/tag/v1.3.8) (2016-10-15)
|
||||
|
||||
Parity 1.3.8 is our EIP150 hard-fork compliant release.
|
||||
|
||||
Running this will enact a mild change of the protocol at block number 2,463,000 which should occur on Tuesday 18th October 2016 at approximately 12:20 London time (BST). This change alters the gas prices for a number of operations, mainly centring around i/o intensive Merkle trie lookups (`BALANCE`, `EXTCODESIZE` &c.) and state-trie polluters (`SUICIDE`, `CREATE` and `CALL`). These operations were heavily underpriced, an oversight which lead to the recent degradation of network service. The full details of the alteration are specified in [EIP-150](https://github.com/ethereum/EIPs/issues/150).
|
||||
|
||||
Additionally several issues have been fixed including:
|
||||
- a transaction queue limitation leading to dropped transactions;
|
||||
- a synchronisation issue leading to stalls when syncing;
|
||||
|
||||
And some small features including database performance improvements and additional logging.
|
||||
|
||||
#### Upgrading private chain specification files.
|
||||
|
||||
All the chain specification files now have EIP-150 rules enabled by default. To continue using the chain add the `eip150Transition` key under `Engine/ethash/params` and set it to a future transition block as shown in [this example](https://github.com/paritytech/parity/blob/85eeb3ea6e5e21ad8e5644241edf82eb8069f536/ethcore/res/ethereum/morden.json#L13).
|
||||
|
||||
The key related to homestead transition has been renamed from `frontierCompatibilityModeLimit` to `homesteadTransition`.
|
||||
|
||||
#### Full changes
|
||||
|
||||
- [beta] EIP150.1c [#2599](https://github.com/paritytech/parity/pull/2599)
|
||||
- Remove count limit for local transactions [#2634](https://github.com/paritytech/parity/pull/2634)
|
||||
- Tweak DB and mining defaults [#2598](https://github.com/paritytech/parity/pull/2598)
|
||||
- Revert "Bloom upgrade in beta" [#2635](https://github.com/paritytech/parity/pull/2635)
|
||||
- Bloom upgrade in beta [#2609](https://github.com/paritytech/parity/pull/2609)
|
||||
- Backports to beta [#2628](https://github.com/paritytech/parity/pull/2628)
|
||||
|
||||
## Parity [v1.3.7](https://github.com/paritytech/parity/releases/tag/v1.3.7) (2016-10-12)
|
||||
|
||||
This release contains fixes to reduce memory usage under the DoS attack and improve transaction relay.
|
||||
|
||||
- Configurable history size in beta [#2587](https://github.com/paritytech/parity/pull/2587)
|
||||
- Backports to beta [#2592](https://github.com/paritytech/parity/pull/2592)
|
||||
|
||||
|
||||
## Parity [v1.3.6](https://github.com/paritytech/parity/releases/tag/v1.3.6) (2016-10-11)
|
||||
|
||||
Parity 1.3.6 is another hotfix release to address transaction spam and deal with stability issues. With this release transaction pool gas limit no longer applies to local transactions. Full list of changes is available here:
|
||||
|
||||
- Backports to beta v1.3.6 [#2571](https://github.com/paritytech/parity/pull/2571)
|
||||
- Use global state cache when mining [#2529](https://github.com/paritytech/parity/pull/2529)
|
||||
- Transaction queue limited by gas [#2528](https://github.com/paritytech/parity/pull/2528)
|
||||
|
||||
## Parity [v1.3.5](https://github.com/paritytech/parity/releases/tag/v1.3.5) (2016-10-08)
|
||||
|
||||
1.3.5 is a hotfix release for the transaction propagation issue. Transaction pool limit is now calculated based on the block gas limit.
|
||||
|
||||
- Update appveyor rustc [beta] [#2521](https://github.com/paritytech/parity/pull/2521)
|
||||
- Increase size of transaction queue by default [#2519](https://github.com/paritytech/parity/pull/2519)
|
||||
|
||||
## Parity [v1.3.4](https://github.com/paritytech/parity/releases/tag/v1.3.4) (2016-10-07)
|
||||
|
||||
Parity 1.3.4 release contains more optimizations to internal caching as well as stability improvements.
|
||||
|
||||
It also introduces an ability for miners to choose a transaction ordering strategy:
|
||||
|
||||
--tx-queue-strategy S Prioritization strategy used to order transactions
|
||||
in the queue. S may be:
|
||||
gas - Prioritize txs with low gas limit;
|
||||
gas_price - Prioritize txs with high gas price;
|
||||
gas_factor - Prioritize txs using gas price
|
||||
and gas limit ratio [default: gas_factor].
|
||||
|
||||
- Backport to beta [#2518](https://github.com/paritytech/parity/pull/2518)
|
||||
- [beta] Fixing RPC Filter conversion to EthFilter [#2501](https://github.com/paritytech/parity/pull/2501)
|
||||
- [beta] Using pending block only if is not old [#2515](https://github.com/paritytech/parity/pull/2515)
|
||||
- Backports into beta [#2512](https://github.com/paritytech/parity/pull/2512)
|
||||
- CLI to specify queue ordering strategy [#2494](https://github.com/paritytech/parity/pull/2494)
|
||||
- Fix ethstore opening all key files in the directory at once (BETA) [#2472](https://github.com/paritytech/parity/pull/2472)
|
||||
- Beta backports [#2465](https://github.com/paritytech/parity/pull/2465)
|
||||
- IPC-library dependency fork & bump for beta [#2455](https://github.com/paritytech/parity/pull/2455)
|
||||
|
||||
## Parity [v1.3.3](https://github.com/paritytech/parity/releases/tag/v1.3.3) (2016-10-04)
|
||||
|
||||
1.3.3 is another hotfix release for the DoS attack
|
||||
|
||||
- Jumptable cache [#2435](https://github.com/paritytech/parity/pull/2435)
|
||||
- fix broken beta compilation (backport to beta) [#2414](https://github.com/paritytech/parity/pull/2414)
|
||||
- Run inplace upgrades after version update [#2411](https://github.com/paritytech/parity/pull/2411)
|
||||
|
||||
## Parity [v1.3.2](https://github.com/paritytech/parity/releases/tag/v1.3.2) (2016-09-29)
|
||||
|
||||
This is a hotfix release to address stability and performance issues uncovered during the network DoS attack. Full list of changes is available [here](https://github.com/paritytech/parity/compare/v1.3.1...v1.3.2)
|
||||
|
||||
- Beta Backports [#2396](https://github.com/paritytech/parity/pull/2396)
|
||||
- Fixing penalization in future [#2493](https://github.com/paritytech/parity/pull/2493)
|
||||
- A quick fix for missing tree route blocks [#2400](https://github.com/paritytech/parity/pull/2400)
|
||||
- Cache the fork block header after snapshot restoration [#2391](https://github.com/paritytech/parity/pull/2391)
|
||||
- correct sync memory usage calculation (BETA) [#2386](https://github.com/paritytech/parity/pull/2386)
|
||||
- Accounts bloom [#2357](https://github.com/paritytech/parity/pull/2357)
|
||||
- Disable colors when generating signer token. [#2379](https://github.com/paritytech/parity/pull/2379)
|
||||
- Fixing jit feature compilation [#2376](https://github.com/paritytech/parity/pull/2376)
|
||||
- Clear state cache on sealed block import [#2377](https://github.com/paritytech/parity/pull/2377)
|
||||
- DIV optimization (beta) [#2353](https://github.com/paritytech/parity/pull/2353)
|
||||
- Canonical state cache [#2308](https://github.com/paritytech/parity/pull/2308)
|
||||
- Reorder transaction_by_hash to favour canon search [#2331](https://github.com/paritytech/parity/pull/2331)
|
||||
- Lenient bytes deserialization [#2340](https://github.com/paritytech/parity/pull/2340)
|
||||
- Penalize transactions with gas above gas limit [#2271](https://github.com/paritytech/parity/pull/2271)
|
||||
- Peek transaction queue via RPC [#2270](https://github.com/paritytech/parity/pull/2270)
|
||||
- Handle RLP to string UTF-8 decoding errors (#2217) [#2226](https://github.com/paritytech/parity/pull/2226)
|
||||
- Fixing compilation without default features [beta] [#2207](https://github.com/paritytech/parity/pull/2207)
|
||||
- Avoid cloning clean stuff [beta backport] [#2173](https://github.com/paritytech/parity/pull/2173)
|
||||
- v1.3.2 in beta [#2200](https://github.com/paritytech/parity/pull/2200)
|
||||
|
||||
## Parity [v1.3.1](https://github.com/paritytech/parity/releases/tag/v1.3.1) (2016-09-11)
|
||||
|
||||
1.3.1 includes many [bugfixes](https://github.com/paritytech/parity/commit/2a82fa0a47b00bedfec520a2fdd3cc31aa4ccd8c). Critical ones:
|
||||
- **Chain reorganisation fix** Transaction receipts / traces were sometimes linked with incorrect block hash. Fixed in https://github.com/paritytech/parity/commit/a9587f8965a32c84973c35ce1c8d51d07044143f
|
||||
- **Trace overflow fix** Overflow which occurred during tracing. Fixed in https://github.com/paritytech/parity/pull/1979
|
||||
|
||||
- Backports to beta [#2068](https://github.com/paritytech/parity/pull/2068)
|
||||
- Fixing serde overflow error (#1977) [#2030](https://github.com/paritytech/parity/pull/2030)
|
||||
- Simplified db pruning detection in beta [#1924](https://github.com/paritytech/parity/pull/1924)
|
||||
- Backports to beta [#1919](https://github.com/paritytech/parity/pull/1919)
|
||||
|
||||
## Parity [v1.3.0: "Acuity"](https://github.com/paritytech/parity/releases/tag/v1.3.0) (2016-08-12)
|
||||
|
||||
As well as many bug fixes, 1.3.0 includes a number of important improvements including:
|
||||
- **Optimisations** Heavily optimised block/transaction processing core - up to 2x faster than 1.2 series.
|
||||
- **Database compression** Databases take as much as 30% less storage than before.
|
||||
- **State snapshotting** An installation synchronised from scratch in 1-2 minutes can be made after downloading the 140MB state snapshot. See [the wiki](https://github.com/paritytech/parity/wiki/Getting-Synced) for more information.
|
||||
- **Process isolation** The networking/chain-synchronisation is now a fully independent process.
|
||||
|
||||
Incremental improvements include:
|
||||
- Additional [RPCs](https://github.com/paritytech/parity/wiki/JSONRPC) for transaction tracing, state diffing, VM tracing, asynchronous transaction posting, accounts metadata and message signing.
|
||||
- Improved logging, including for chain reorganisations.
|
||||
- Added a `--fast-and-loose` option for additional speed-ups which can compromise integrity on a dirty shutdown.
|
||||
- Column families to ensure maximal inter-database integrity.
|
||||
- Key naming includes date/time of creation.
|
||||
- Various improvements to networking robustness and performance.
|
||||
- Solidity compilation supported through RPC if `solc` is available.
|
||||
- Various improvements to the miner including [HTTP push work notification](https://github.com/ethcoreparitytech/parity/wiki/Mining#starting-it).
|
||||
|
||||
Full changes:
|
||||
- Bumping Parity UI [#1920](https://github.com/paritytech/parity/pull/1920)
|
||||
- Adding entrypoints to docker images [#1909](https://github.com/paritytech/parity/pull/1909)
|
||||
- Save nodes removed from backing_overlay until commit [#1917](https://github.com/paritytech/parity/pull/1917)
|
||||
- RPC for importing geth keys [#1916](https://github.com/paritytech/parity/pull/1916)
|
||||
- Peers RPC + UI displaying active/connected/max peers [#1915](https://github.com/paritytech/parity/pull/1915)
|
||||
- RPC for deriving address from phrase. [#1912](https://github.com/paritytech/parity/pull/1912)
|
||||
- adjust polling & connection timeouts for ipc [#1910](https://github.com/paritytech/parity/pull/1910)
|
||||
- Don't return deleted nodes that are not yet flushed [#1908](https://github.com/paritytech/parity/pull/1908)
|
||||
- Wallet rpcs [#1898](https://github.com/paritytech/parity/pull/1898)
|
||||
- Fix binary serialization bug [#1907](https://github.com/paritytech/parity/pull/1907)
|
||||
- fixed #1889, .DS_Store is no longer treated as key file [#1892](https://github.com/paritytech/parity/pull/1892)
|
||||
- Purging .derefs, fixing clippy warnings. [#1890](https://github.com/paritytech/parity/pull/1890)
|
||||
- RocksDB version bump [#1904](https://github.com/paritytech/parity/pull/1904)
|
||||
- Fix ipc compilation and add ipc feature to test targets [#1902](https://github.com/paritytech/parity/pull/1902)
|
||||
- Autocreating geth dir if none and geth mode on [#1896](https://github.com/paritytech/parity/pull/1896)
|
||||
- v1.4.0 in master [#1886](https://github.com/paritytech/parity/pull/1886)
|
||||
- Adding more details to miner log [#1891](https://github.com/paritytech/parity/pull/1891)
|
||||
- moved hash.rs to bigint library [#1827](https://github.com/paritytech/parity/pull/1827)
|
||||
- fixed cache_manager lock order [#1877](https://github.com/paritytech/parity/pull/1877)
|
||||
- Fixing miner deadlock [#1885](https://github.com/paritytech/parity/pull/1885)
|
||||
- Updating WS + Increasing token validity [#1882](https://github.com/paritytech/parity/pull/1882)
|
||||
- take snapshot at specified block and slightly better informants [#1873](https://github.com/paritytech/parity/pull/1873)
|
||||
- RPC errors & logs [#1845](https://github.com/paritytech/parity/pull/1845)
|
||||
- Reduce max open files [#1876](https://github.com/paritytech/parity/pull/1876)
|
||||
- Send new block hashes to all peers [#1875](https://github.com/paritytech/parity/pull/1875)
|
||||
- Use UntrustedRlp for block verification [#1872](https://github.com/paritytech/parity/pull/1872)
|
||||
- Update cache usage on commiting block info [#1871](https://github.com/paritytech/parity/pull/1871)
|
||||
- Validating conversion U256->usize when doing gas calculation (for 32bits) [#1870](https://github.com/paritytech/parity/pull/1870)
|
||||
- Sync to peers with confirmed fork block only [#1863](https://github.com/paritytech/parity/pull/1863)
|
||||
- miner and client take spec reference [#1853](https://github.com/paritytech/parity/pull/1853)
|
||||
- Unlock account with timeout for geth compatibility [#1854](https://github.com/paritytech/parity/pull/1854)
|
||||
- Fixed reported max height and transaction propagation [#1852](https://github.com/paritytech/parity/pull/1852)
|
||||
- Snapshot creation and restoration [#1679](https://github.com/paritytech/parity/pull/1679)
|
||||
- fix deprecated typo [#1850](https://github.com/paritytech/parity/pull/1850)
|
||||
- Split IO and network crates [#1828](https://github.com/paritytech/parity/pull/1828)
|
||||
- updated classic JSON spec with classic bootnodes, fixes #1842 [#1847](https://github.com/paritytech/parity/pull/1847)
|
||||
- protect unsafety in plainhasher; get more unique hashes [#1841](https://github.com/paritytech/parity/pull/1841)
|
||||
- use mutex in dbtransaction [#1843](https://github.com/paritytech/parity/pull/1843)
|
||||
- Fix state not using "account_starting_nonce" [#1830](https://github.com/paritytech/parity/pull/1830)
|
||||
- Supporting blockid in eth_call and trace_call/trace_raw [#1837](https://github.com/paritytech/parity/pull/1837)
|
||||
- eth_checkTransaction renamed to eth_checkRequest [#1817](https://github.com/paritytech/parity/pull/1817)
|
||||
- Bump json-ipc-server again [#1839](https://github.com/paritytech/parity/pull/1839)
|
||||
- Fixing another deadlock in trace db [#1833](https://github.com/paritytech/parity/pull/1833)
|
||||
- Fix up the VM trace. [#1829](https://github.com/paritytech/parity/pull/1829)
|
||||
- fixed parsing export params, fixes #1826 [#1834](https://github.com/paritytech/parity/pull/1834)
|
||||
- More performance optimizations [#1814](https://github.com/paritytech/parity/pull/1814)
|
||||
- Bumping clippy & fixing warnings [#1823](https://github.com/paritytech/parity/pull/1823)
|
||||
- removed unused code from util and unnecessary dependency of FixedHash [#1824](https://github.com/paritytech/parity/pull/1824)
|
||||
- Remove (almost all) panickers from trie module [#1776](https://github.com/paritytech/parity/pull/1776)
|
||||
- Fixing account naming [#1810](https://github.com/paritytech/parity/pull/1810)
|
||||
- JournalDB inject [#1806](https://github.com/paritytech/parity/pull/1806)
|
||||
- No block number in get work while in geth-compat mode. [#1821](https://github.com/paritytech/parity/pull/1821)
|
||||
- Import wallet fix [#1820](https://github.com/paritytech/parity/pull/1820)
|
||||
- Supporting eth_sign in Signer [#1787](https://github.com/paritytech/parity/pull/1787)
|
||||
- Fixing cache update after chain reorg [#1816](https://github.com/paritytech/parity/pull/1816)
|
||||
- Development mode for Signer UI [#1788](https://github.com/paritytech/parity/pull/1788)
|
||||
- Miner tweaks [#1797](https://github.com/paritytech/parity/pull/1797)
|
||||
- Util & ipc clenup [#1807](https://github.com/paritytech/parity/pull/1807)
|
||||
- Fixing unlock parsing [#1802](https://github.com/paritytech/parity/pull/1802)
|
||||
- fixed importing presale wallet with encseed longer than 96 bytes [#1801](https://github.com/paritytech/parity/pull/1801)
|
||||
- DRYing build scripts [#1795](https://github.com/paritytech/parity/pull/1795)
|
||||
- Allow code from spec json [#1790](https://github.com/paritytech/parity/pull/1790)
|
||||
- nano-tests (ipc transport) to the CI [#1793](https://github.com/paritytech/parity/pull/1793)
|
||||
- Commit best block after closing transaction [#1791](https://github.com/paritytech/parity/pull/1791)
|
||||
- Place thread name in the log output [#1792](https://github.com/paritytech/parity/pull/1792)
|
||||
- Fix ipc tests and bring to CI [#1789](https://github.com/paritytech/parity/pull/1789)
|
||||
- dynamic keys pickup [#1779](https://github.com/paritytech/parity/pull/1779)
|
||||
- ipc version bump [#1783](https://github.com/paritytech/parity/pull/1783)
|
||||
- Prevent deadlock on trace GC [#1780](https://github.com/paritytech/parity/pull/1780)
|
||||
- fixed trace_transaction crash when block contained suicide [#1781](https://github.com/paritytech/parity/pull/1781)
|
||||
- Fix block body migration [#1777](https://github.com/paritytech/parity/pull/1777)
|
||||
- cache manager and clearing tracing cache [#1769](https://github.com/paritytech/parity/pull/1769)
|
||||
- Return storage as H256 from RPC. [#1774](https://github.com/paritytech/parity/pull/1774)
|
||||
- Instant sealing engine [#1767](https://github.com/paritytech/parity/pull/1767)
|
||||
- fix state unsafety with a mostly-guaranteed handle [#1755](https://github.com/paritytech/parity/pull/1755)
|
||||
- Gas for mem optimization [#1768](https://github.com/paritytech/parity/pull/1768)
|
||||
- Min and Max peers setting [#1771](https://github.com/paritytech/parity/pull/1771)
|
||||
- Disable WAL [#1765](https://github.com/paritytech/parity/pull/1765)
|
||||
- Add new line when printing start strings [#1766](https://github.com/paritytech/parity/pull/1766)
|
||||
- Log tweak [#1764](https://github.com/paritytech/parity/pull/1764)
|
||||
- Remove update_sealing call on importing own block [#1762](https://github.com/paritytech/parity/pull/1762)
|
||||
- Single DB [#1741](https://github.com/paritytech/parity/pull/1741)
|
||||
- Tweak format of log so it's not so verbose. [#1758](https://github.com/paritytech/parity/pull/1758)
|
||||
- Combine mining queue and enabled into single locked datum [#1749](https://github.com/paritytech/parity/pull/1749)
|
||||
- Collect consensus/null engines into a single module [#1754](https://github.com/paritytech/parity/pull/1754)
|
||||
- Fix failing deserialization test [#1756](https://github.com/paritytech/parity/pull/1756)
|
||||
- Stackoverflow fix [#1742](https://github.com/paritytech/parity/pull/1742)
|
||||
- compaction profile used during migration, fixes #1750 [#1751](https://github.com/paritytech/parity/pull/1751)
|
||||
- Splitting documentation into separate build job [#1752](https://github.com/paritytech/parity/pull/1752)
|
||||
- handle keys deserialization errors, fixes #1592 [#1701](https://github.com/paritytech/parity/pull/1701)
|
||||
- add gitlab-ci yaml [#1753](https://github.com/paritytech/parity/pull/1753)
|
||||
- Better handling of multiple migrations [#1747](https://github.com/paritytech/parity/pull/1747)
|
||||
- Disconnect peers on a fork [#1738](https://github.com/paritytech/parity/pull/1738)
|
||||
- Add RPC & client call to replay a transaction. [#1734](https://github.com/paritytech/parity/pull/1734)
|
||||
- another version bump for jsonrpc-ipc [#1744](https://github.com/paritytech/parity/pull/1744)
|
||||
- Trace other types of calls [#1727](https://github.com/paritytech/parity/pull/1727)
|
||||
- Fixing compilation on latest nightly [#1736](https://github.com/paritytech/parity/pull/1736)
|
||||
- Blocks and snapshot compression [#1687](https://github.com/paritytech/parity/pull/1687)
|
||||
- bump json-ipc-server version [#1739](https://github.com/paritytech/parity/pull/1739)
|
||||
- Use std::sync::Condvar [#1732](https://github.com/paritytech/parity/pull/1732)
|
||||
- Bump json-ipc-server version [#1733](https://github.com/paritytech/parity/pull/1733)
|
||||
- bump json-ipc-server version [#1731](https://github.com/paritytech/parity/pull/1731)
|
||||
- Fixing some clippy warnings [#1728](https://github.com/paritytech/parity/pull/1728)
|
||||
- Bumping Parity UI [#1682](https://github.com/paritytech/parity/pull/1682)
|
||||
- Various improvements to tracing & diagnostics. [#1707](https://github.com/paritytech/parity/pull/1707)
|
||||
- Fixed reading chunked EIP8 handshake [#1712](https://github.com/paritytech/parity/pull/1712)
|
||||
- Fix for importing blocks from a pipe file [#1724](https://github.com/paritytech/parity/pull/1724)
|
||||
- Proper errors for binary serializer [#1714](https://github.com/paritytech/parity/pull/1714)
|
||||
- Use a transaction for writing blocks [#1718](https://github.com/paritytech/parity/pull/1718)
|
||||
- Exclude generated code from coverage [#1720](https://github.com/paritytech/parity/pull/1720)
|
||||
- Use single binary for ipc modules [#1710](https://github.com/paritytech/parity/pull/1710)
|
||||
- Log a chain-reorg. [#1715](https://github.com/paritytech/parity/pull/1715)
|
||||
- Restore new block informant message [#1716](https://github.com/paritytech/parity/pull/1716)
|
||||
- Parallel block body download [#1659](https://github.com/paritytech/parity/pull/1659)
|
||||
- Rotate blockchain cache [#1709](https://github.com/paritytech/parity/pull/1709)
|
||||
- Fix broken internal names. [#1711](https://github.com/paritytech/parity/pull/1711)
|
||||
- cli overhaul [#1600](https://github.com/paritytech/parity/pull/1600)
|
||||
- Key files include timestamp in name. [#1700](https://github.com/paritytech/parity/pull/1700)
|
||||
- Fixing warnings [#1705](https://github.com/paritytech/parity/pull/1705)
|
||||
- Ethereum classic [#1706](https://github.com/paritytech/parity/pull/1706)
|
||||
- Docker Arguments [#1703](https://github.com/paritytech/parity/pull/1703)
|
||||
- Informant tidyup. [#1699](https://github.com/paritytech/parity/pull/1699)
|
||||
- Name and meta in accounts [#1695](https://github.com/paritytech/parity/pull/1695)
|
||||
- Stackoverflow #1686 [#1698](https://github.com/paritytech/parity/pull/1698)
|
||||
- filtering transactions toAddress includes contract creation [#1697](https://github.com/paritytech/parity/pull/1697)
|
||||
- Prevent syncing to ancient blocks [#1693](https://github.com/paritytech/parity/pull/1693)
|
||||
- Enable WAL and disable DB repair [#1696](https://github.com/paritytech/parity/pull/1696)
|
||||
- Returning error when transaction is rejected (for consistency) [#1667](https://github.com/paritytech/parity/pull/1667)
|
||||
- Disabling signer when in geth-compatibility mode [#1676](https://github.com/paritytech/parity/pull/1676)
|
||||
- Suicides tracing [#1688](https://github.com/paritytech/parity/pull/1688)
|
||||
- small cleanup of substate.rs [#1685](https://github.com/paritytech/parity/pull/1685)
|
||||
- resolve #411: remove install scripts [#1684](https://github.com/paritytech/parity/pull/1684)
|
||||
- IPC (feature-gated) [#1654](https://github.com/paritytech/parity/pull/1654)
|
||||
- Bumping JSONRPC-http-server [#1678](https://github.com/paritytech/parity/pull/1678)
|
||||
- Fixing hash deserialisation [#1674](https://github.com/paritytech/parity/pull/1674)
|
||||
- Ping discovery nodes gradually [#1671](https://github.com/paritytech/parity/pull/1671)
|
||||
- Fixing the deadlock on incoming connection [#1672](https://github.com/paritytech/parity/pull/1672)
|
||||
- Fixing errors returned by sendTransaction* method family [#1665](https://github.com/paritytech/parity/pull/1665)
|
||||
- Moved syncing log out of the client [#1670](https://github.com/paritytech/parity/pull/1670)
|
||||
- Host validation (again) [#1666](https://github.com/paritytech/parity/pull/1666)
|
||||
- Update install-deps.sh [ci skip] [#1664](https://github.com/paritytech/parity/pull/1664)
|
||||
- fix typos [#1644](https://github.com/paritytech/parity/pull/1644)
|
||||
- Size for blocks [#1668](https://github.com/paritytech/parity/pull/1668)
|
||||
- Revert "Validating Host headers in RPC requests" [#1663](https://github.com/paritytech/parity/pull/1663)
|
||||
- Validating Host headers in RPC requests [#1658](https://github.com/paritytech/parity/pull/1658)
|
||||
- fixed failing master [#1662](https://github.com/paritytech/parity/pull/1662)
|
||||
- Fixing clippy warnings [#1660](https://github.com/paritytech/parity/pull/1660)
|
||||
- Don't ping all nodes on start [#1656](https://github.com/paritytech/parity/pull/1656)
|
||||
- More performance optimizations [#1649](https://github.com/paritytech/parity/pull/1649)
|
||||
- Removing unused client code [#1645](https://github.com/paritytech/parity/pull/1645)
|
||||
- Asynchronous transactions (polling based for now). [#1652](https://github.com/paritytech/parity/pull/1652)
|
||||
- Sync stand-alone binary and feature-gated dependencies refactoring [#1637](https://github.com/paritytech/parity/pull/1637)
|
||||
- Re-enabling Parity UI [#1627](https://github.com/paritytech/parity/pull/1627)
|
||||
- Blockchain repair on missing state root [#1646](https://github.com/paritytech/parity/pull/1646)
|
||||
- Multi-mode logging. [#1643](https://github.com/paritytech/parity/pull/1643)
|
||||
- Pro paths [#1650](https://github.com/paritytech/parity/pull/1650)
|
||||
- Performance optimizations [#1642](https://github.com/paritytech/parity/pull/1642)
|
||||
- Removed DAO soft fork traces [#1639](https://github.com/paritytech/parity/pull/1639)
|
||||
- Compiler version update for windows [#1638](https://github.com/paritytech/parity/pull/1638)
|
||||
- Delete values immediately from DB overlay [#1631](https://github.com/paritytech/parity/pull/1631)
|
||||
- DAO hard-fork [#1483](https://github.com/paritytech/parity/pull/1483)
|
||||
- fix network_start regression [#1629](https://github.com/paritytech/parity/pull/1629)
|
||||
- Die if the DB is newer than the one supported. [#1630](https://github.com/paritytech/parity/pull/1630)
|
||||
- Cleanup of colour code. Use is_a_tty. [#1621](https://github.com/paritytech/parity/pull/1621)
|
||||
- don't batch best block for branches [#1623](https://github.com/paritytech/parity/pull/1623)
|
||||
- In-memory trie operations [#1408](https://github.com/paritytech/parity/pull/1408)
|
||||
- Fix "pending" parameter on RPC block requests [#1602](https://github.com/paritytech/parity/pull/1602)
|
||||
- Allow RPC to use solc to compile solidity [#1607](https://github.com/paritytech/parity/pull/1607)
|
||||
- IPC RPC deriving for traits [#1599](https://github.com/paritytech/parity/pull/1599)
|
||||
- Utilize cached kcov if exists [#1619](https://github.com/paritytech/parity/pull/1619)
|
||||
- Fixing no-ui feature [#1618](https://github.com/paritytech/parity/pull/1618)
|
||||
- Couple of rocksdb optimizations [#1614](https://github.com/paritytech/parity/pull/1614)
|
||||
- Miner tests [#1597](https://github.com/paritytech/parity/pull/1597)
|
||||
- Sync IPC interface [#1584](https://github.com/paritytech/parity/pull/1584)
|
||||
- Make sure reserved peers are in the node table [#1616](https://github.com/paritytech/parity/pull/1616)
|
||||
- Fix bloomchain on blockchain repair [#1610](https://github.com/paritytech/parity/pull/1610)
|
||||
- fixed broken tracing [#1615](https://github.com/paritytech/parity/pull/1615)
|
||||
- fix benchmark compilation [#1612](https://github.com/paritytech/parity/pull/1612)
|
||||
- Updating jsonrpc-http-server [#1611](https://github.com/paritytech/parity/pull/1611)
|
||||
- replace synchronization primitives with those from parking_lot [#1593](https://github.com/paritytech/parity/pull/1593)
|
||||
- ui compilation feature [#1604](https://github.com/paritytech/parity/pull/1604)
|
||||
- is_zero() and pow() optimisations for uint [#1608](https://github.com/paritytech/parity/pull/1608)
|
||||
- Optimizing & Cleaning the build [#1591](https://github.com/paritytech/parity/pull/1591)
|
||||
- Fix logging [#1590](https://github.com/paritytech/parity/pull/1590)
|
||||
- remove unnecessary mutex in logging [#1601](https://github.com/paritytech/parity/pull/1601)
|
||||
- Using streamlined parity-ui repository [#1566](https://github.com/paritytech/parity/pull/1566)
|
||||
- Optimizing InstructionInfo access. [#1595](https://github.com/paritytech/parity/pull/1595)
|
||||
- V7 Migration progress indicator [#1594](https://github.com/paritytech/parity/pull/1594)
|
||||
- bring snapshotting work into master [#1577](https://github.com/paritytech/parity/pull/1577)
|
||||
- Bump clippy [#1587](https://github.com/paritytech/parity/pull/1587)
|
||||
- refactoring of handshake messages serialization in ipc [#1586](https://github.com/paritytech/parity/pull/1586)
|
||||
- expunge &Vec<T> pattern [#1579](https://github.com/paritytech/parity/pull/1579)
|
||||
- EVM gas for memory tiny optimization [#1578](https://github.com/paritytech/parity/pull/1578)
|
||||
- cleaned up parity/signer [#1551](https://github.com/paritytech/parity/pull/1551)
|
||||
- Major sync <-> client interactions refactoring [#1572](https://github.com/paritytech/parity/pull/1572)
|
||||
- failing test with overlayrecent pruning [#1567](https://github.com/paritytech/parity/pull/1567)
|
||||
- Enable state queries for OverlayRecent DB [#1575](https://github.com/paritytech/parity/pull/1575)
|
||||
- have AccountDB use address hash for uniqueness [#1533](https://github.com/paritytech/parity/pull/1533)
|
||||
- Very basic EVM binary. [#1574](https://github.com/paritytech/parity/pull/1574)
|
||||
- Some obvious evm & uint optimizations [#1576](https://github.com/paritytech/parity/pull/1576)
|
||||
- Fixing clippy warnings [#1568](https://github.com/paritytech/parity/pull/1568)
|
||||
- Miner's gas price gets updated dynamically [#1570](https://github.com/paritytech/parity/pull/1570)
|
||||
- bringing hypervisor as a crate in ipc dir [#1565](https://github.com/paritytech/parity/pull/1565)
|
||||
- Init public interface with IO message [#1573](https://github.com/paritytech/parity/pull/1573)
|
||||
- Uncommenting simple Miner tests [#1571](https://github.com/paritytech/parity/pull/1571)
|
||||
- Kill lock unwraps [#1558](https://github.com/paritytech/parity/pull/1558)
|
||||
- Fixing deadlock in miner [#1569](https://github.com/paritytech/parity/pull/1569)
|
||||
- Idealpeers in log [#1563](https://github.com/paritytech/parity/pull/1563)
|
||||
- Simple style fix. [#1561](https://github.com/paritytech/parity/pull/1561)
|
||||
- Enum variants serialisation test&fix [#1559](https://github.com/paritytech/parity/pull/1559)
|
||||
- Supporting /api/ping for dapps server [#1543](https://github.com/paritytech/parity/pull/1543)
|
||||
- Client IPC Interface [#1493](https://github.com/paritytech/parity/pull/1493)
|
||||
- Kill timers when removing IO handler [#1554](https://github.com/paritytech/parity/pull/1554)
|
||||
- Fix and add info messages [#1552](https://github.com/paritytech/parity/pull/1552)
|
||||
- Fix indent of #1541 [#1555](https://github.com/paritytech/parity/pull/1555)
|
||||
- Update sealing just once when externally importing many blocks [#1541](https://github.com/paritytech/parity/pull/1541)
|
||||
- Remove soft-fork stuff. [#1548](https://github.com/paritytech/parity/pull/1548)
|
||||
- fix codegen warning [#1550](https://github.com/paritytech/parity/pull/1550)
|
||||
- Extend migration framework [#1546](https://github.com/paritytech/parity/pull/1546)
|
||||
- Refactoring dapps to support API endpoints. [#1542](https://github.com/paritytech/parity/pull/1542)
|
||||
- serde is no longer util dependency [#1534](https://github.com/paritytech/parity/pull/1534)
|
||||
- mention wiki in README [#1549](https://github.com/paritytech/parity/pull/1549)
|
||||
- Skipping transactions with invalid nonces when pushing to block. [#1545](https://github.com/paritytech/parity/pull/1545)
|
||||
- Silent running operating modes [#1477](https://github.com/paritytech/parity/pull/1477)
|
||||
- util cleanup [#1474](https://github.com/paritytech/parity/pull/1474)
|
||||
- Calculating gas using usize (if supplied gaslimit fits in usize) [#1518](https://github.com/paritytech/parity/pull/1518)
|
||||
- add owning NibbleVec [#1536](https://github.com/paritytech/parity/pull/1536)
|
||||
- Attempt to fix blochchain/extras DBs sync [#1538](https://github.com/paritytech/parity/pull/1538)
|
||||
- Client API refactoring - limiting errors to crate-level error types [#1525](https://github.com/paritytech/parity/pull/1525)
|
||||
- IPC codegen enhancement - allow void methods [#1540](https://github.com/paritytech/parity/pull/1540)
|
||||
- Fixing serving nested files for dapps. [#1539](https://github.com/paritytech/parity/pull/1539)
|
||||
- Fixed public address config [#1537](https://github.com/paritytech/parity/pull/1537)
|
||||
- Fixing compilation&clippy warnings [#1531](https://github.com/paritytech/parity/pull/1531)
|
||||
- creating ethereum dir while in geth mode [#1530](https://github.com/paritytech/parity/pull/1530)
|
||||
- Bumping clippy [#1532](https://github.com/paritytech/parity/pull/1532)
|
||||
- Make signer default as long as --unlock isn't used. [#1524](https://github.com/paritytech/parity/pull/1524)
|
||||
- add client timeout when requesting usd price for gas [#1526](https://github.com/paritytech/parity/pull/1526)
|
||||
- Fix gitter-url link in README.md [#1528](https://github.com/paritytech/parity/pull/1528)
|
||||
- Fix error message. [#1527](https://github.com/paritytech/parity/pull/1527)
|
||||
- BTreeMap binary serialization [#1489](https://github.com/paritytech/parity/pull/1489)
|
||||
- Save block reference in the queue on notification [#1501](https://github.com/paritytech/parity/pull/1501)
|
||||
- bigint tests to run on CI [#1522](https://github.com/paritytech/parity/pull/1522)
|
||||
- Client api cleaning - uncles are returned as rlp [#1516](https://github.com/paritytech/parity/pull/1516)
|
||||
- Fatdb integration with CLI [#1464](https://github.com/paritytech/parity/pull/1464)
|
||||
- Optimizing/simplifying shr [#1517](https://github.com/paritytech/parity/pull/1517)
|
||||
- change IPC codegen to allow attributes [#1500](https://github.com/paritytech/parity/pull/1500)
|
||||
- Fix warnings [#1514](https://github.com/paritytech/parity/pull/1514)
|
||||
- FatDB [#1452](https://github.com/paritytech/parity/pull/1452)
|
||||
- Fix the reseal mechanism. [#1513](https://github.com/paritytech/parity/pull/1513)
|
||||
- Update Dockerfile ubuntu-aarch64 [#1509](https://github.com/paritytech/parity/pull/1509)
|
||||
- Update Ubuntu-arm Dockerfile [#1510](https://github.com/paritytech/parity/pull/1510)
|
||||
- Update Ubuntu-jit Dockerfile [#1511](https://github.com/paritytech/parity/pull/1511)
|
||||
- Update Ubuntu Dockerfile [#1512](https://github.com/paritytech/parity/pull/1512)
|
||||
- Update CentOS Dockerfile [#1508](https://github.com/paritytech/parity/pull/1508)
|
||||
- bump status page v0.5.1 [#1502](https://github.com/paritytech/parity/pull/1502)
|
||||
- Update CentOS Dockerfile [#1507](https://github.com/paritytech/parity/pull/1507)
|
||||
- Update Dockerfile ubuntu-aarch64 [#1506](https://github.com/paritytech/parity/pull/1506)
|
||||
- Update Ubuntu-arm Dockerfile [#1505](https://github.com/paritytech/parity/pull/1505)
|
||||
- Update Ubuntu-jit Dockerfile [#1504](https://github.com/paritytech/parity/pull/1504)
|
||||
- Update Ubuntu Dockerfile [#1503](https://github.com/paritytech/parity/pull/1503)
|
||||
- Optionally clone block behind work-package [#1497](https://github.com/paritytech/parity/pull/1497)
|
||||
- Fix no colour on windows. [#1498](https://github.com/paritytech/parity/pull/1498)
|
||||
- Workaround for hyper panic [#1495](https://github.com/paritytech/parity/pull/1495)
|
||||
- Colourful notification on mine [#1488](https://github.com/paritytech/parity/pull/1488)
|
||||
- Quick fix for max open files error [#1494](https://github.com/paritytech/parity/pull/1494)
|
||||
- Work notification over HTTP [#1491](https://github.com/paritytech/parity/pull/1491)
|
||||
- Sealed block importing and propagation optimization [#1478](https://github.com/paritytech/parity/pull/1478)
|
||||
- vm factory to mining client [#1487](https://github.com/paritytech/parity/pull/1487)
|
||||
- topbar dialog fix [#1479](https://github.com/paritytech/parity/pull/1479)
|
||||
- Minor additions to allow resetting of code. [#1482](https://github.com/paritytech/parity/pull/1482)
|
||||
- Introduce options for fine-grained management of work queue. [#1484](https://github.com/paritytech/parity/pull/1484)
|
||||
- Snapshot state restoration [#1308](https://github.com/paritytech/parity/pull/1308)
|
||||
- Merge master into pv64 branch [#1486](https://github.com/paritytech/parity/pull/1486)
|
||||
- Ensure we don't reject our own transactions for gasprice. [#1485](https://github.com/paritytech/parity/pull/1485)
|
||||
- Signing parity executable & windows installer in appveyor [#1481](https://github.com/paritytech/parity/pull/1481)
|
||||
- Rearrange fork CLI options. [#1476](https://github.com/paritytech/parity/pull/1476)
|
||||
- give appveyor some breath [#1475](https://github.com/paritytech/parity/pull/1475)
|
||||
- Ensure we always get the latest work when mining on submitted. [#1469](https://github.com/paritytech/parity/pull/1469)
|
||||
- Tests for views [#1471](https://github.com/paritytech/parity/pull/1471)
|
||||
- json ipc version bump [#1470](https://github.com/paritytech/parity/pull/1470)
|
||||
- verifier is no longer a template type of client [#1467](https://github.com/paritytech/parity/pull/1467)
|
||||
- Allow configuration of when to reseal blocks. [#1460](https://github.com/paritytech/parity/pull/1460)
|
||||
- removed unsafe code [#1466](https://github.com/paritytech/parity/pull/1466)
|
||||
- WS bump + Adding default for value [#1465](https://github.com/paritytech/parity/pull/1465)
|
||||
- Attempt DB repair if corrupted [#1461](https://github.com/paritytech/parity/pull/1461)
|
||||
- Database configuration extended [#1454](https://github.com/paritytech/parity/pull/1454)
|
||||
- Updating WS-RS server [#1459](https://github.com/paritytech/parity/pull/1459)
|
||||
- Reduced IO messages; removed panics on IO notifications [#1457](https://github.com/paritytech/parity/pull/1457)
|
||||
- Handle errors when starting parity --signer [#1451](https://github.com/paritytech/parity/pull/1451)
|
||||
- Fixed losing queued blocks on error [#1453](https://github.com/paritytech/parity/pull/1453)
|
||||
- Updated to latest hyper with patched mio [#1450](https://github.com/paritytech/parity/pull/1450)
|
||||
- Retweak BASE and MULTIPLIER in rocksdb config. [#1445](https://github.com/paritytech/parity/pull/1445)
|
||||
- Removing Miner::default. [#1410](https://github.com/paritytech/parity/pull/1410)
|
||||
- Don't mine without --author [#1436](https://github.com/paritytech/parity/pull/1436)
|
||||
- Revert the rescuedao extradata. [#1437](https://github.com/paritytech/parity/pull/1437)
|
||||
- More conservative settings for rocksdb. [#1440](https://github.com/paritytech/parity/pull/1440)
|
||||
- v1.3.0 in master [#1421](https://github.com/paritytech/parity/pull/1421)
|
||||
- Update Ubuntu-arm Dockerfile [#1429](https://github.com/paritytech/parity/pull/1429)
|
||||
- Create Dockerfile ubuntu-aarch64 [#1430](https://github.com/paritytech/parity/pull/1430)
|
||||
- Update CentOS Dockerfile [#1424](https://github.com/paritytech/parity/pull/1424)
|
||||
- Update Ubuntu Dockerfile [#1426](https://github.com/paritytech/parity/pull/1426)
|
||||
- Update Ubuntu-jit Dockerfile [#1427](https://github.com/paritytech/parity/pull/1427)
|
||||
- Update SF blocknumber to 1800000. [#1418](https://github.com/paritytech/parity/pull/1418)
|
||||
@@ -1,746 +0,0 @@
|
||||
Note: Parity 1.4 reached End-of-Life on 2017-03-13 (EOL).
|
||||
|
||||
## Parity [v1.4.12](https://github.com/paritytech/parity/releases/tag/v1.4.12) (2017-02-22)
|
||||
|
||||
This stable release fixes an issue with block uncle validation. Parity now allows uncle headers to have timestamp set to arbitrary future value.
|
||||
|
||||
- Stable Backporting ([#4633](https://github.com/paritytech/parity/pull/4633)) [#4642](https://github.com/paritytech/parity/pull/4642)
|
||||
- Tweak some checks.
|
||||
- Fixed build and added a difficulty test
|
||||
- Bump to v1.4.12
|
||||
- Add missing maxCodeSize [#4585](https://github.com/paritytech/parity/pull/4585)
|
||||
|
||||
## Parity [v1.4.11](https://github.com/paritytech/parity/releases/tag/v1.4.11) (2017-02-17)
|
||||
|
||||
This release corrects the Ropsten chain specification file.
|
||||
|
||||
- Bump to v1.4.11 [#4587](https://github.com/paritytech/parity/pull/4587)
|
||||
- Fixing etherscan price parsing ([#4202](https://github.com/paritytech/parity/pull/4202)) [#4209](https://github.com/paritytech/parity/pull/4209)
|
||||
- Fixing etherscan price parsing
|
||||
- Handling all errors
|
||||
- Removed pdbs
|
||||
- Add missing maxCodeSize [#4585](https://github.com/paritytech/parity/pull/4585)
|
||||
|
||||
## Parity [v1.4.10](https://github.com/paritytech/parity/releases/tag/v1.4.10) (2017-01-18)
|
||||
|
||||
Parity 1.4.10 is a first stable release of 1.4.x series. It includes a few minor networking fixes.
|
||||
|
||||
- Gas_limit for blocks, mined by Parity will be divisible by 37 (#4154) [#4179](https://github.com/paritytech/parity/pull/4179)
|
||||
- gas_limit for new blocks will divide evenly by 13
|
||||
- increased PARITY_GAS_LIMIT_DETERMINANT to 37
|
||||
- separate method for marking mined block
|
||||
- debug_asserts(gas_limit within protocol range)
|
||||
- round_block_gas_limit method is now static
|
||||
- made round_block_gas_limit free-function
|
||||
- multiplier->multiple
|
||||
- Backporing to 1.4.10-stable [#4110](https://github.com/paritytech/parity/pull/4110)
|
||||
- Bump to v1.4.10
|
||||
- No reorg limit for ancient blocks
|
||||
- Update registration after every write
|
||||
|
||||
## Parity [v1.4.9](https://github.com/paritytech/parity/releases/tag/v1.4.9) (2017-01-09)
|
||||
|
||||
This fixes an issue introduced in 1.4.8 that causes Parity to panic on propagating transactions in some cases.
|
||||
|
||||
- v1.4.9 in beta [#4097](https://github.com/paritytech/parity/pull/4097)
|
||||
- Bump to v1.4.9
|
||||
- Disable armv6 build
|
||||
- beta Fix queue deadlock [#4095](https://github.com/paritytech/parity/pull/4095)
|
||||
- Fix rebroadcast panic beta [#4085](https://github.com/paritytech/parity/pull/4085)
|
||||
- fix compile
|
||||
- fix backport
|
||||
- clean up old method
|
||||
- remove unnecessary reference
|
||||
- simplify
|
||||
- Fixing 'simplify'
|
||||
|
||||
## Parity [v1.4.8](https://github.com/paritytech/parity/releases/tag/v1.4.8) (2017-01-06)
|
||||
|
||||
Ethereum Classic Hard Fork ready release containing various bugfixes:
|
||||
|
||||
- Fix for excessive transactions propagation
|
||||
- Fix for inconsistent `logIndex` in transaction receipts
|
||||
|
||||
See [full list of changes](https://github.com/paritytech/parity/compare/v1.4.7...v1.4.8):
|
||||
|
||||
- Beta backports [#4067](https://github.com/paritytech/parity/pull/4067)
|
||||
- Re-broadcast transactions to few random peers on each new block. (#4054) [#4061](https://github.com/paritytech/parity/pull/4061)
|
||||
- Tolerate errors in user_defaults [#4060](https://github.com/paritytech/parity/pull/4060)
|
||||
- ETC Config change backport [#4056](https://github.com/paritytech/parity/pull/4056)
|
||||
- [beta] Avoid re-broadcasting transactions on each block [#4047](https://github.com/paritytech/parity/pull/4047)
|
||||
- Beta Backports [#4012](https://github.com/paritytech/parity/pull/4012)
|
||||
|
||||
## Parity [v1.4.7](https://github.com/paritytech/parity/releases/tag/v1.4.7) (2016-12-27)
|
||||
|
||||
This maintenance release fixes an issue with sync falling behind occasionally.
|
||||
|
||||
- Backporting to beta [#3980](https://github.com/paritytech/parity/pull/3980)
|
||||
- [beta] enforce gas limit falls within engine bounds [#3816](https://github.com/paritytech/parity/pull/3816)
|
||||
|
||||
|
||||
## Parity [v1.4.6](https://github.com/paritytech/parity/releases/tag/v1.4.6) (2016-12-05)
|
||||
|
||||
This patch release fixes an issue with syncing on the Ropsten test network.
|
||||
|
||||
- Backporting to beta [#3718](https://github.com/paritytech/parity/pull/3718)
|
||||
- [beta] scrollable contract deploy & execute modals [#3656](https://github.com/paritytech/parity/pull/3656)
|
||||
|
||||
## Parity [v1.4.5](https://github.com/paritytech/parity/releases/tag/v1.4.5) (2016-11-26)
|
||||
|
||||
1.4.5 release fixes a number of issues, notably:
|
||||
- High CPU usage when idle.
|
||||
- Key recovery phrases generated on windows now can be imported.
|
||||
|
||||
#### Configuration changes
|
||||
- `--usd-per-tx` is now set to 0.0025 by default.
|
||||
|
||||
#### New features
|
||||
- Support for Ropsten test network is introduced with `--chain=ropsten` or `--testnet`. Morden network is still available via `--chain=morden`
|
||||
|
||||
#### Full changes
|
||||
- [beta] Pin package versions for React [#3628](https://github.com/paritytech/parity/pull/3628)
|
||||
- Backporting to beta [#3623](https://github.com/paritytech/parity/pull/3623)
|
||||
- [beta] Ropsten chain for UI [#3622](https://github.com/paritytech/parity/pull/3622)
|
||||
|
||||
## Parity [v1.4.4](https://github.com/paritytech/parity/releases/tag/v1.4.4) (2016-11-18)
|
||||
|
||||
This is a maintenance release that fixes an issue with EIP-155 transactions being added to the transaction pool. It also improves syncing stability and resolved a number of UI issues.
|
||||
Full changelog is available [here.](https://github.com/paritytech/parity/commit/3e0d033eaf789cfdf517f4a97effc500f1f9263b)
|
||||
|
||||
- [beta] apps typo fix [#3533](https://github.com/paritytech/parity/pull/3533)
|
||||
- Backporting to beta [#3525](https://github.com/paritytech/parity/pull/3525)
|
||||
|
||||
## Parity [v1.4.3](https://github.com/paritytech/parity/releases/tag/v1.4.3) (2016-11-16)
|
||||
|
||||
This release includes memory footprint optimization as well as a few fixes in the UI.
|
||||
EIP-155/160/161/170 hardfork is enabled at block 2675000 (1885000 for test network).
|
||||
Full changelog is available [here.](https://github.com/paritytech/parity/compare/v1.4.2...v1.4.3)
|
||||
|
||||
- [beta] EIP-170 [#3464](https://github.com/paritytech/parity/pull/3464)
|
||||
- Backports to beta [#3465](https://github.com/paritytech/parity/pull/3465)
|
||||
- Backport: additional fields on transaction and receipt [#3463](https://github.com/paritytech/parity/pull/3463)
|
||||
- v1.4.3 in beta [#3424](https://github.com/paritytech/parity/pull/3424)
|
||||
|
||||
## Parity [v1.4.2](https://github.com/paritytech/parity/releases/tag/v1.4.2) (2016-11-10)
|
||||
|
||||
This release fixes a few additional issues:
|
||||
- Parity now correctly handles external `--dapps-interface` and `--ui-interface` in the UI.
|
||||
- Crash in `eth_getUncle*` has been fixed.
|
||||
- macOS installer now includes an uninstall script.
|
||||
- Security token input UI has been fixed.
|
||||
- Correct display for tokens with minimum decimals.
|
||||
|
||||
And some additional minor changes. Full changelog is [available](https://github.com/paritytech/parity/compare/v1.4.1...v1.4.2)
|
||||
- Backporting to beta [#3344](https://github.com/paritytech/parity/pull/3344)
|
||||
- Backporting to beta [#3324](https://github.com/paritytech/parity/pull/3324)
|
||||
|
||||
## Parity [v1.4.1](https://github.com/paritytech/parity/releases/tag/v1.4.1) (2016-11-09)
|
||||
|
||||
This is a hotfix release to address a couple of issues with 1.4.0:
|
||||
|
||||
- UI token is requested instead of being supplied automatically.
|
||||
- Running with `--geth` results in an error.
|
||||
|
||||
- Backporting to beta [#3293](https://github.com/paritytech/parity/pull/3293)
|
||||
|
||||
## Parity [v1.4.0](https://github.com/paritytech/parity/releases/tag/v1.4.0) (2016-11-07)
|
||||
|
||||
First beta release of the 1.4 series.
|
||||
|
||||
This includes the new Parity Wallet and Warp-Sync synchronisation as well as several optimisations and fixes.
|
||||
|
||||
- Add secure flag back [#3246](https://github.com/paritytech/parity/pull/3246)
|
||||
- [BETA] verify chunk hashes in cli restore [#3242](https://github.com/paritytech/parity/pull/3242)
|
||||
- Backporting to beta [#3239](https://github.com/paritytech/parity/pull/3239)
|
||||
- UI fixes backporting [#3234](https://github.com/paritytech/parity/pull/3234)
|
||||
- Backporting to beta [#3229](https://github.com/paritytech/parity/pull/3229)
|
||||
- Beta branch cleanup [#3226](https://github.com/paritytech/parity/pull/3226)
|
||||
- [beta] Set passive mode for first run only (#3214) [#3216](https://github.com/paritytech/parity/pull/3216)
|
||||
- Mode configuration backported to beta [#3213](https://github.com/paritytech/parity/pull/3213)
|
||||
- Backporting [#3198](https://github.com/paritytech/parity/pull/3198)
|
||||
- [beta] EIP-155 update with Vitalik's new test vectors (#3166) [#3189](https://github.com/paritytech/parity/pull/3189)
|
||||
- Backporting to beta [#3176](https://github.com/paritytech/parity/pull/3176)
|
||||
- parity-ui-precompiled pinned to beta [#3168](https://github.com/paritytech/parity/pull/3168)
|
||||
- EIP-155 update with Vitalik's new test vectors [#3166](https://github.com/paritytech/parity/pull/3166)
|
||||
- Push precompiled for beta/stable, npm only master [#3163](https://github.com/paritytech/parity/pull/3163)
|
||||
- Back to real root after npm publish [#3178](https://github.com/paritytech/parity/pull/3178)
|
||||
- Remove extra cd js [#3177](https://github.com/paritytech/parity/pull/3177)
|
||||
- Fixes Gas price selection bug [#3175](https://github.com/paritytech/parity/pull/3175)
|
||||
- Exposing state root and logsBloom in RPC receipts [#3174](https://github.com/paritytech/parity/pull/3174)
|
||||
- Exposing v,r,s from transaction signature in RPC [#3172](https://github.com/paritytech/parity/pull/3172)
|
||||
- Enabling personal RPC over IPC by default [#3165](https://github.com/paritytech/parity/pull/3165)
|
||||
- Gitlab CI badge [#3164](https://github.com/paritytech/parity/pull/3164)
|
||||
- Dependencies in README [#3162](https://github.com/paritytech/parity/pull/3162)
|
||||
- Make the footer a bit less ugly. [#3160](https://github.com/paritytech/parity/pull/3160)
|
||||
- Linux build case sensitivity fix [#3161](https://github.com/paritytech/parity/pull/3161)
|
||||
- abbreviated enode, `CopyToClipboard` component [#3131](https://github.com/paritytech/parity/pull/3131)
|
||||
- EIPs 155, 160, 161 [#2976](https://github.com/paritytech/parity/pull/2976)
|
||||
- beta reset to 1.4.0 [#3157](https://github.com/paritytech/parity/pull/3157)
|
||||
- Fix histogram [#3150](https://github.com/paritytech/parity/pull/3150)
|
||||
- Remove network label from TabBar [#3142](https://github.com/paritytech/parity/pull/3142)
|
||||
- Speed up unresponsive Contract events & Account transactions [#3145](https://github.com/paritytech/parity/pull/3145)
|
||||
- Better windows shortcut [#3147](https://github.com/paritytech/parity/pull/3147)
|
||||
- Redirect content to the same address as requested [#3133](https://github.com/paritytech/parity/pull/3133)
|
||||
- Fixed peer ping timeout [#3137](https://github.com/paritytech/parity/pull/3137)
|
||||
- Fix for windows build [#3125](https://github.com/paritytech/parity/pull/3125)
|
||||
- Fix AddessInput icon position [#3132](https://github.com/paritytech/parity/pull/3132)
|
||||
- Fixed not scrollable accounts in tokenreg dapp [#3128](https://github.com/paritytech/parity/pull/3128)
|
||||
- Returning cache headers for network content [#3123](https://github.com/paritytech/parity/pull/3123)
|
||||
- Optimise contract events display [#3120](https://github.com/paritytech/parity/pull/3120)
|
||||
- Add basic validation for contract execute values [#3118](https://github.com/paritytech/parity/pull/3118)
|
||||
- Dapps errors embeddable on signer [#3115](https://github.com/paritytech/parity/pull/3115)
|
||||
- Use enode RPC in UI [#3108](https://github.com/paritytech/parity/pull/3108)
|
||||
- Windows tray app [#3103](https://github.com/paritytech/parity/pull/3103)
|
||||
- Displaying CLI errors on stderr [#3116](https://github.com/paritytech/parity/pull/3116)
|
||||
- new InputAddressSelect component [#3071](https://github.com/paritytech/parity/pull/3071)
|
||||
- Bump mio [#3117](https://github.com/paritytech/parity/pull/3117)
|
||||
- Minor typo fixed. [#3110](https://github.com/paritytech/parity/pull/3110)
|
||||
- Sort by ETH balance and contract by date [#3107](https://github.com/paritytech/parity/pull/3107)
|
||||
- Add RPC enode lookup [#3096](https://github.com/paritytech/parity/pull/3096)
|
||||
- Initializing logger for each command [#3090](https://github.com/paritytech/parity/pull/3090)
|
||||
- Allow registration of content bundles in GitHubHint [#3094](https://github.com/paritytech/parity/pull/3094)
|
||||
- Add read-only inputs to UI plus Copy to Clipboard buttons [#3095](https://github.com/paritytech/parity/pull/3095)
|
||||
- Allow boolean dropdowns for contract deploy [#3077](https://github.com/paritytech/parity/pull/3077)
|
||||
- Add mac installer files [#2995](https://github.com/paritytech/parity/pull/2995)
|
||||
- Fixing dapps sorting [#3086](https://github.com/paritytech/parity/pull/3086)
|
||||
- Add a Gitter chat badge to README.md [#3092](https://github.com/paritytech/parity/pull/3092)
|
||||
- Fixes webpack HTML loader [#3089](https://github.com/paritytech/parity/pull/3089)
|
||||
- Redirecting /home to new UI [#3084](https://github.com/paritytech/parity/pull/3084)
|
||||
- Allow GitHubHint content owner to update url [#3083](https://github.com/paritytech/parity/pull/3083)
|
||||
- Remove token assets (moved to ethcore/dapps-assets) [#3082](https://github.com/paritytech/parity/pull/3082)
|
||||
- Goodbye Gavcoin, Hello Gavcoin [#3080](https://github.com/paritytech/parity/pull/3080)
|
||||
- Load network dapps [#3078](https://github.com/paritytech/parity/pull/3078)
|
||||
- Swap account phrase input to normal (non-multiline) [#3060](https://github.com/paritytech/parity/pull/3060)
|
||||
- Fix minor typo in informant [#3056](https://github.com/paritytech/parity/pull/3056)
|
||||
- Warp sync status display [#3045](https://github.com/paritytech/parity/pull/3045)
|
||||
- Enhance address input [#3065](https://github.com/paritytech/parity/pull/3065)
|
||||
- Go to Accounts Page if Tooltips are displayed [#3063](https://github.com/paritytech/parity/pull/3063)
|
||||
- Change contract Execute bool values & query bool value display [#3024](https://github.com/paritytech/parity/pull/3024)
|
||||
- Update Parity logo [#3036](https://github.com/paritytech/parity/pull/3036)
|
||||
- settings: replace background patterns (inline) [#3047](https://github.com/paritytech/parity/pull/3047)
|
||||
- Multiple line description for dapps [#3058](https://github.com/paritytech/parity/pull/3058)
|
||||
- Fix status log order [#3062](https://github.com/paritytech/parity/pull/3062)
|
||||
- Graphical gas price selection [#2898](https://github.com/paritytech/parity/pull/2898)
|
||||
- [Registry dApp] Actions not available before selecting accounts [#3032](https://github.com/paritytech/parity/pull/3032)
|
||||
- apply post-consolidation migrations after consolidating [#3020](https://github.com/paritytech/parity/pull/3020)
|
||||
- fix chain badge padding [#3046](https://github.com/paritytech/parity/pull/3046)
|
||||
- Don't delete Tags input on blur (eg. tab) [#3044](https://github.com/paritytech/parity/pull/3044)
|
||||
- Fixing last hashes for ethcall [#3043](https://github.com/paritytech/parity/pull/3043)
|
||||
- Remove signer icons [#3039](https://github.com/paritytech/parity/pull/3039)
|
||||
- execute periodic snapshot in new thread [#3029](https://github.com/paritytech/parity/pull/3029)
|
||||
- fix background of embedded signer [#3026](https://github.com/paritytech/parity/pull/3026)
|
||||
- registry dapp: fix reducer [#3028](https://github.com/paritytech/parity/pull/3028)
|
||||
- Replace Execute by Query in contract button [#3031](https://github.com/paritytech/parity/pull/3031)
|
||||
- Fixing GavCoin dApp overflow issues [#3030](https://github.com/paritytech/parity/pull/3030)
|
||||
- execute contract function: validate address [#3013](https://github.com/paritytech/parity/pull/3013)
|
||||
- Align tag inputs with other input boxes [#2965](https://github.com/paritytech/parity/pull/2965)
|
||||
- Sweep panickers from IO and network [#3018](https://github.com/paritytech/parity/pull/3018)
|
||||
- Terms & Conditions [#3019](https://github.com/paritytech/parity/pull/3019)
|
||||
- open column families after reparing db corruption [#3017](https://github.com/paritytech/parity/pull/3017)
|
||||
- Snapshot sync and block gap info in `eth_syncing` [#2948](https://github.com/paritytech/parity/pull/2948)
|
||||
- personal_ RPCs to AutoArgs [#3000](https://github.com/paritytech/parity/pull/3000)
|
||||
- RPCs for mode change [#3002](https://github.com/paritytech/parity/pull/3002)
|
||||
- Fix a test sensitive to slow execution. [#3014](https://github.com/paritytech/parity/pull/3014)
|
||||
- Fixes search filtering issues [#3011](https://github.com/paritytech/parity/pull/3011)
|
||||
- Restart sync if no more peers with snapshots [#3007](https://github.com/paritytech/parity/pull/3007)
|
||||
- Allow empty/non-existant input arrays for ABIs in contract view [#3001](https://github.com/paritytech/parity/pull/3001)
|
||||
- Allow operation when no registry is available [#2980](https://github.com/paritytech/parity/pull/2980)
|
||||
- Make JS lint & test run on Travis [#2894](https://github.com/paritytech/parity/pull/2894)
|
||||
- Update account dropdowns [#2959](https://github.com/paritytech/parity/pull/2959)
|
||||
- Modify gas price statistics [#2947](https://github.com/paritytech/parity/pull/2947)
|
||||
- Fixes pending/mined transactions in registry dApp [#3004](https://github.com/paritytech/parity/pull/3004)
|
||||
- Prevent connecting to self [#2997](https://github.com/paritytech/parity/pull/2997)
|
||||
- Disable verbose in gitlab CI [#2999](https://github.com/paritytech/parity/pull/2999)
|
||||
- Allow warnings in gitlab [#2998](https://github.com/paritytech/parity/pull/2998)
|
||||
- Fix the brainwallet functionality. [#2994](https://github.com/paritytech/parity/pull/2994)
|
||||
- Provided gas description update [#2993](https://github.com/paritytech/parity/pull/2993)
|
||||
- Print messages to stderr [#2991](https://github.com/paritytech/parity/pull/2991)
|
||||
- Networking and syncing tweaks [#2990](https://github.com/paritytech/parity/pull/2990)
|
||||
- Allow build warnings [#2985](https://github.com/paritytech/parity/pull/2985)
|
||||
- Display network status for finished Signer requests [#2983](https://github.com/paritytech/parity/pull/2983)
|
||||
- Fixed rejecting transactions [#2984](https://github.com/paritytech/parity/pull/2984)
|
||||
- mio version bump [#2982](https://github.com/paritytech/parity/pull/2982)
|
||||
- Publish parity.js to npmjs registry [#2978](https://github.com/paritytech/parity/pull/2978)
|
||||
- Import raw private key [#2945](https://github.com/paritytech/parity/pull/2945)
|
||||
- refactor etherscan.io links [#2896](https://github.com/paritytech/parity/pull/2896)
|
||||
- Use separate lock for code cache [#2977](https://github.com/paritytech/parity/pull/2977)
|
||||
- Add favicon [#2974](https://github.com/paritytech/parity/pull/2974)
|
||||
- Align password change dialog with create dialog ordering [#2970](https://github.com/paritytech/parity/pull/2970)
|
||||
- WS bump [#2973](https://github.com/paritytech/parity/pull/2973)
|
||||
- Discovery performance optimization [#2972](https://github.com/paritytech/parity/pull/2972)
|
||||
- Pass gas & gasPrice to token transfers [#2964](https://github.com/paritytech/parity/pull/2964)
|
||||
- Updating ws-rs [#2962](https://github.com/paritytech/parity/pull/2962)
|
||||
- Run cargo with verbose flag when testing [#2943](https://github.com/paritytech/parity/pull/2943)
|
||||
- Fixing clippy warnings take two [#2961](https://github.com/paritytech/parity/pull/2961)
|
||||
- Snapshot sync improvements [#2960](https://github.com/paritytech/parity/pull/2960)
|
||||
- Gavcoin event display updates [#2956](https://github.com/paritytech/parity/pull/2956)
|
||||
- Eslint fixes [#2957](https://github.com/paritytech/parity/pull/2957)
|
||||
- Add import of raw private key RPCs [#2942](https://github.com/paritytech/parity/pull/2942)
|
||||
- Bring in styling queues from original Gavcoin [#2936](https://github.com/paritytech/parity/pull/2936)
|
||||
- Validating minimal required gas for a transaction [#2937](https://github.com/paritytech/parity/pull/2937)
|
||||
- Even more snapshot validity checks [#2935](https://github.com/paritytech/parity/pull/2935)
|
||||
- Shared code cache [#2921](https://github.com/paritytech/parity/pull/2921)
|
||||
- Updating bootnodes for ETC [#2938](https://github.com/paritytech/parity/pull/2938)
|
||||
- More bootnodes [#2926](https://github.com/paritytech/parity/pull/2926)
|
||||
- Revert hash updates until testable [#2925](https://github.com/paritytech/parity/pull/2925)
|
||||
- Release.sh verbose output [#2924](https://github.com/paritytech/parity/pull/2924)
|
||||
- additional release.sh debugging info [#2922](https://github.com/paritytech/parity/pull/2922)
|
||||
- Pass the js-precompiled commit hash to cargo update [#2920](https://github.com/paritytech/parity/pull/2920)
|
||||
- Next nonce RPC [#2917](https://github.com/paritytech/parity/pull/2917)
|
||||
- Get rid of duplicated code in EVM [#2915](https://github.com/paritytech/parity/pull/2915)
|
||||
- Transaction Queue banning [#2524](https://github.com/paritytech/parity/pull/2524)
|
||||
- Revert to gas price ordering [#2919](https://github.com/paritytech/parity/pull/2919)
|
||||
- Personal split [#2879](https://github.com/paritytech/parity/pull/2879)
|
||||
- Fixing config values for pruning_history [#2918](https://github.com/paritytech/parity/pull/2918)
|
||||
- Apply pending block details on commit [#2254](https://github.com/paritytech/parity/pull/2254)
|
||||
- Fixed GetNodeData output [#2892](https://github.com/paritytech/parity/pull/2892)
|
||||
- New sync protocol ID [#2912](https://github.com/paritytech/parity/pull/2912)
|
||||
- Clippy bump [#2877](https://github.com/paritytech/parity/pull/2877)
|
||||
- iconomi token images [#2906](https://github.com/paritytech/parity/pull/2906)
|
||||
- Fixes too long description and Token balance value in Dapps/Accounts [#2902](https://github.com/paritytech/parity/pull/2902)
|
||||
- Add missing images for local dapps [#2890](https://github.com/paritytech/parity/pull/2890)
|
||||
- Fix Webpack, again [#2895](https://github.com/paritytech/parity/pull/2895)
|
||||
- Enable suicide json test [#2893](https://github.com/paritytech/parity/pull/2893)
|
||||
- More snapshot fixes and optimizations [#2883](https://github.com/paritytech/parity/pull/2883)
|
||||
- Fixes CI JS precompiled build [#2886](https://github.com/paritytech/parity/pull/2886)
|
||||
- Fix empty tags modification [#2884](https://github.com/paritytech/parity/pull/2884)
|
||||
- Fix up informant. [#2865](https://github.com/paritytech/parity/pull/2865)
|
||||
- Get rid of MemoryDB denote [#2881](https://github.com/paritytech/parity/pull/2881)
|
||||
- Add inject to "bundle everything" list [#2871](https://github.com/paritytech/parity/pull/2871)
|
||||
- Fixes signer and MUI errors throwing [#2876](https://github.com/paritytech/parity/pull/2876)
|
||||
- Fix failing tests after log parsing updates [#2878](https://github.com/paritytech/parity/pull/2878)
|
||||
- Sweep some more panics [#2848](https://github.com/paritytech/parity/pull/2848)
|
||||
- Make GitLab js-precompiled really update Cargo.toml in main repo [#2869](https://github.com/paritytech/parity/pull/2869)
|
||||
- IPC version bump [#2870](https://github.com/paritytech/parity/pull/2870)
|
||||
- Snapshot sync fixes and optimizations [#2863](https://github.com/paritytech/parity/pull/2863)
|
||||
- Add Check and Change Password for an Account [#2861](https://github.com/paritytech/parity/pull/2861)
|
||||
- Output git fetch/push to log files [#2862](https://github.com/paritytech/parity/pull/2862)
|
||||
- Align contract event log l&f with transactions [#2812](https://github.com/paritytech/parity/pull/2812)
|
||||
- Nicer port in use errors [#2859](https://github.com/paritytech/parity/pull/2859)
|
||||
- Remove personal_* calls from dapps [#2860](https://github.com/paritytech/parity/pull/2860)
|
||||
- Token sorting, zero-ETH transfer & token decimals [#2805](https://github.com/paritytech/parity/pull/2805)
|
||||
- Don't fail badly when no transactions in last 100 blocks. [#2856](https://github.com/paritytech/parity/pull/2856)
|
||||
- Fixing home.parity address for new signer [#2851](https://github.com/paritytech/parity/pull/2851)
|
||||
- Enabling UI build back [#2853](https://github.com/paritytech/parity/pull/2853)
|
||||
- Remove eventName in unsubscribe API arguments [#2844](https://github.com/paritytech/parity/pull/2844)
|
||||
- Don't return empty names as clickable titles [#2809](https://github.com/paritytech/parity/pull/2809)
|
||||
- Auto-bump js-precompiled on release [#2828](https://github.com/paritytech/parity/pull/2828)
|
||||
- Remove ethcore::common re-export module [#2792](https://github.com/paritytech/parity/pull/2792)
|
||||
- Prevent database corruption on OOM [#2832](https://github.com/paritytech/parity/pull/2832)
|
||||
- Download/Export Addressbook [#2847](https://github.com/paritytech/parity/pull/2847)
|
||||
- Snapshot and blockchain stability improvements [#2843](https://github.com/paritytech/parity/pull/2843)
|
||||
- Extended network options [#2845](https://github.com/paritytech/parity/pull/2845)
|
||||
- fix failing master test build [#2846](https://github.com/paritytech/parity/pull/2846)
|
||||
- Local dapps embeddable on signer port [#2815](https://github.com/paritytech/parity/pull/2815)
|
||||
- Trigger accounts/contracts search on search input change [#2838](https://github.com/paritytech/parity/pull/2838)
|
||||
- Move snapshot sync to a subprotocol [#2820](https://github.com/paritytech/parity/pull/2820)
|
||||
- fix node log being reversed [#2839](https://github.com/paritytech/parity/pull/2839)
|
||||
- Fixes currency symbol font size in Shapeshift modal [#2840](https://github.com/paritytech/parity/pull/2840)
|
||||
- Disable personal APIs by default for security reasons [#2834](https://github.com/paritytech/parity/pull/2834)
|
||||
- Clear cached content [#2833](https://github.com/paritytech/parity/pull/2833)
|
||||
- Add ethcore_[dapps|signer]Port APIs [#2821](https://github.com/paritytech/parity/pull/2821)
|
||||
- CLI option to skip seal check when importing [#2842](https://github.com/paritytech/parity/pull/2842)
|
||||
- Fix case error in Dapps import [#2837](https://github.com/paritytech/parity/pull/2837)
|
||||
- Double click on address in account detail view should select it [#2841](https://github.com/paritytech/parity/pull/2841)
|
||||
- Bump js-precompiled to 20161022-223915 UTC [#2826](https://github.com/paritytech/parity/pull/2826)
|
||||
- Adjust paths to handle CORS changes [#2816](https://github.com/paritytech/parity/pull/2816)
|
||||
- RPC for dapps port and signer port [#2819](https://github.com/paritytech/parity/pull/2819)
|
||||
- Update build to working version on pre-compiled repo [#2825](https://github.com/paritytech/parity/pull/2825)
|
||||
- Adjust network name badge colours (darker) [#2823](https://github.com/paritytech/parity/pull/2823)
|
||||
- Removing submodule in favour of rust crate [#2756](https://github.com/paritytech/parity/pull/2756)
|
||||
- Return old-ish content even when syncing [#2757](https://github.com/paritytech/parity/pull/2757)
|
||||
- fix Signer UI [#2750](https://github.com/paritytech/parity/pull/2750)
|
||||
- USG, GBP, Euro & Yuan updates [#2818](https://github.com/paritytech/parity/pull/2818)
|
||||
- Make locally installed apps available again (Fixes #2771) [#2808](https://github.com/paritytech/parity/pull/2808)
|
||||
- Additional RPCs for password management [#2779](https://github.com/paritytech/parity/pull/2779)
|
||||
- flush DB changes on drop [#2795](https://github.com/paritytech/parity/pull/2795)
|
||||
- rename State::snapshot to checkpoint to avoid confusion [#2796](https://github.com/paritytech/parity/pull/2796)
|
||||
- Missing changes required to make new UI work [#2793](https://github.com/paritytech/parity/pull/2793)
|
||||
- Cleanup method decoding (Fixes #2811) [#2810](https://github.com/paritytech/parity/pull/2810)
|
||||
- Use trace API for decentralized transaction list [#2784](https://github.com/paritytech/parity/pull/2784)
|
||||
- Automatic compaction selection on Linux [#2785](https://github.com/paritytech/parity/pull/2785)
|
||||
- Update token images [#2804](https://github.com/paritytech/parity/pull/2804)
|
||||
- Hackergold token images [#2801](https://github.com/paritytech/parity/pull/2801)
|
||||
- Additional token images [#2800](https://github.com/paritytech/parity/pull/2800)
|
||||
- Additional token images [#2798](https://github.com/paritytech/parity/pull/2798)
|
||||
- Resolve morden fork [#2773](https://github.com/paritytech/parity/pull/2773)
|
||||
- Using SipHashes from crates.io [#2778](https://github.com/paritytech/parity/pull/2778)
|
||||
- Fixed issues on Searchable Addresses [#2790](https://github.com/paritytech/parity/pull/2790)
|
||||
- Currency icons [#2788](https://github.com/paritytech/parity/pull/2788)
|
||||
- Update token images [#2783](https://github.com/paritytech/parity/pull/2783)
|
||||
- Fix warning in master [#2775](https://github.com/paritytech/parity/pull/2775)
|
||||
- Add empty account existence test from beta. [#2769](https://github.com/paritytech/parity/pull/2769)
|
||||
- Update name of basiccoin manager [#2768](https://github.com/paritytech/parity/pull/2768)
|
||||
- sweep most unwraps from ethcore crate, dapps crate [#2762](https://github.com/paritytech/parity/pull/2762)
|
||||
- Check queue to determine major importing [#2763](https://github.com/paritytech/parity/pull/2763)
|
||||
- Trace filtering fix [#2760](https://github.com/paritytech/parity/pull/2760)
|
||||
- Update js precompiled to 20161020-141636 [#2761](https://github.com/paritytech/parity/pull/2761)
|
||||
- Incrementally calculate verification queue heap size [#2749](https://github.com/paritytech/parity/pull/2749)
|
||||
- Don't add empty accounts to bloom [#2753](https://github.com/paritytech/parity/pull/2753)
|
||||
- fix contract deployments not showing up [#2759](https://github.com/paritytech/parity/pull/2759)
|
||||
- Fixes a positioning issue in Address Selection component [#2754](https://github.com/paritytech/parity/pull/2754)
|
||||
- fix linting issues [#2758](https://github.com/paritytech/parity/pull/2758)
|
||||
- Making Trie.iter non-recursive [#2733](https://github.com/paritytech/parity/pull/2733)
|
||||
- Block import optimization [#2748](https://github.com/paritytech/parity/pull/2748)
|
||||
- Update js-precompiled to 20161020-110858 [#2752](https://github.com/paritytech/parity/pull/2752)
|
||||
- Fixing small files fetching [#2742](https://github.com/paritytech/parity/pull/2742)
|
||||
- Fixing stalled sync [#2747](https://github.com/paritytech/parity/pull/2747)
|
||||
- refactor signer components [#2691](https://github.com/paritytech/parity/pull/2691)
|
||||
- Png images with backgrounds (original svg) [#2740](https://github.com/paritytech/parity/pull/2740)
|
||||
- Make address selection searchable [#2739](https://github.com/paritytech/parity/pull/2739)
|
||||
- very basic dapp add/remove interface [#2721](https://github.com/paritytech/parity/pull/2721)
|
||||
- Frontport commits from beta to master [#2743](https://github.com/paritytech/parity/pull/2743)
|
||||
- Implements Trace API Formatter [#2732](https://github.com/paritytech/parity/pull/2732)
|
||||
- bump parking_lot to 0.3.x series [#2702](https://github.com/paritytech/parity/pull/2702)
|
||||
- Unify major syncing detection [#2699](https://github.com/paritytech/parity/pull/2699)
|
||||
- Fixes gas/gasPrice change not reflected in transaction modal [#2735](https://github.com/paritytech/parity/pull/2735)
|
||||
- Fixing build UI stuff along with Rust [#2726](https://github.com/paritytech/parity/pull/2726)
|
||||
- Fixed Snackbar not showing and/or behind transactions (#2730) [#2731](https://github.com/paritytech/parity/pull/2731)
|
||||
- Updating json tests to latest develop commit [#2728](https://github.com/paritytech/parity/pull/2728)
|
||||
- dapps: show errors [#2727](https://github.com/paritytech/parity/pull/2727)
|
||||
- node logs: break lines [#2722](https://github.com/paritytech/parity/pull/2722)
|
||||
- Bumping JSON-RPC http server [#2714](https://github.com/paritytech/parity/pull/2714)
|
||||
- Add ability to copy address to the clipboard [#2716](https://github.com/paritytech/parity/pull/2716)
|
||||
- Sort tags when displaying ; use AND for search results [#2720](https://github.com/paritytech/parity/pull/2720)
|
||||
- allow-same-origin for iframe [#2711](https://github.com/paritytech/parity/pull/2711)
|
||||
- Update Registry address (mainnet) [#2713](https://github.com/paritytech/parity/pull/2713)
|
||||
- Allow tags for Accounts, Addresses and Contracts [#2712](https://github.com/paritytech/parity/pull/2712)
|
||||
- Correct parameters for eth_sign [#2703](https://github.com/paritytech/parity/pull/2703)
|
||||
- Bump js-precompiled to 20161018-161705 [#2698](https://github.com/paritytech/parity/pull/2698)
|
||||
- Add inject.js (for web3 exposed) [#2692](https://github.com/paritytech/parity/pull/2692)
|
||||
- Remove obsolete dapps and update security headers [#2694](https://github.com/paritytech/parity/pull/2694)
|
||||
- Snapshot sync part 2 [#2098](https://github.com/paritytech/parity/pull/2098)
|
||||
- Fix issues with no ethereum test dir present (2382) [#2659](https://github.com/paritytech/parity/pull/2659)
|
||||
- Apply UI PRs after master merge [#2690](https://github.com/paritytech/parity/pull/2690)
|
||||
- Fix importing traces for non-canon blocks [#2683](https://github.com/paritytech/parity/pull/2683)
|
||||
- Fixing random test failures [#2577](https://github.com/paritytech/parity/pull/2577)
|
||||
- Disable IPC in default build for 1.4 [#2657](https://github.com/paritytech/parity/pull/2657)
|
||||
- use pruning history in CLI snapshots [#2658](https://github.com/paritytech/parity/pull/2658)
|
||||
- Fixing --no-default-features again and evmbin [#2670](https://github.com/paritytech/parity/pull/2670)
|
||||
- Settings > Proxy for proxy.pac setup instructions [#2678](https://github.com/paritytech/parity/pull/2678)
|
||||
- Re-instate transaitions to allow updating busy indicator [#2682](https://github.com/paritytech/parity/pull/2682)
|
||||
- signer: remove reject counter [#2685](https://github.com/paritytech/parity/pull/2685)
|
||||
- Initial new UI source code import [#2607](https://github.com/paritytech/parity/pull/2607)
|
||||
- Additional dapp logo images [#2677](https://github.com/paritytech/parity/pull/2677)
|
||||
- Redirect from :8080 to :8180 [#2676](https://github.com/paritytech/parity/pull/2676)
|
||||
- script to update js-precompiled [#2673](https://github.com/paritytech/parity/pull/2673)
|
||||
- Styling in FF is not 100% [#2669](https://github.com/paritytech/parity/pull/2669)
|
||||
- Don't allow gavcoin transfer with no balances [#2667](https://github.com/paritytech/parity/pull/2667)
|
||||
- fix signer rejections [#2666](https://github.com/paritytech/parity/pull/2666)
|
||||
- better text on unique background pattern [#2664](https://github.com/paritytech/parity/pull/2664)
|
||||
- Adjust z-index for error overlay [#2662](https://github.com/paritytech/parity/pull/2662)
|
||||
- Fix address selection for contract deployment [#2660](https://github.com/paritytech/parity/pull/2660)
|
||||
- Add additional contract images [#2655](https://github.com/paritytech/parity/pull/2655)
|
||||
- Update /api/* to point to :8080/api/* (first generation interface) [#2612](https://github.com/paritytech/parity/pull/2612)
|
||||
- Initial import of new UI (compiled JS code) [#2220](https://github.com/paritytech/parity/pull/2220)
|
||||
- Fixing evmbin compilation [#2652](https://github.com/paritytech/parity/pull/2652)
|
||||
- Fix up ETC EIP-150 transition to 2,500,000. [#2636](https://github.com/paritytech/parity/pull/2636)
|
||||
- Fixing compilation without default features [#2638](https://github.com/paritytech/parity/pull/2638)
|
||||
- [frontport] CLI to specify queue ordering strategy (#2494) [#2623](https://github.com/paritytech/parity/pull/2623)
|
||||
- Support for decryption in Signer [#2421](https://github.com/paritytech/parity/pull/2421)
|
||||
- EIP150.1c [#2591](https://github.com/paritytech/parity/pull/2591)
|
||||
- Release merge with origin with ours strategy [#2631](https://github.com/paritytech/parity/pull/2631)
|
||||
- Adjust build output directories [#2630](https://github.com/paritytech/parity/pull/2630)
|
||||
- cater for txhash returning null/empty object [#2629](https://github.com/paritytech/parity/pull/2629)
|
||||
- snapshot: single byte for empty accounts [#2625](https://github.com/paritytech/parity/pull/2625)
|
||||
- Configurable history size in master [#2606](https://github.com/paritytech/parity/pull/2606)
|
||||
- Database performance tweaks [#2619](https://github.com/paritytech/parity/pull/2619)
|
||||
- Enable suicide json test [#2626](https://github.com/paritytech/parity/pull/2626)
|
||||
- Split journaldb commit into two functions: journal_under and mark_canonical [#2329](https://github.com/paritytech/parity/pull/2329)
|
||||
- Fixed tx queue limit for local transactions [#2616](https://github.com/paritytech/parity/pull/2616)
|
||||
- Additional logs when transactions is removed from queue [#2617](https://github.com/paritytech/parity/pull/2617)
|
||||
- mitigate refcell conflict in state diffing [#2601](https://github.com/paritytech/parity/pull/2601)
|
||||
- Fix tests [#2611](https://github.com/paritytech/parity/pull/2611)
|
||||
- small styling updates [#2610](https://github.com/paritytech/parity/pull/2610)
|
||||
- Remove web3 from Signer, bring in parity.js API [#2604](https://github.com/paritytech/parity/pull/2604)
|
||||
- Mostly configurable canonical cache size [#2516](https://github.com/paritytech/parity/pull/2516)
|
||||
- Added peers details to ethcore_netPeers RPC [#2580](https://github.com/paritytech/parity/pull/2580)
|
||||
- Display account password hint when available [#2596](https://github.com/paritytech/parity/pull/2596)
|
||||
- Fix gas estimation on transfer when data supplied [#2593](https://github.com/paritytech/parity/pull/2593)
|
||||
- remove unused npm packages [#2590](https://github.com/paritytech/parity/pull/2590)
|
||||
- Bundle fonts as part of the build process [#2588](https://github.com/paritytech/parity/pull/2588)
|
||||
- Contract constructor params [#2586](https://github.com/paritytech/parity/pull/2586)
|
||||
- Update json test suite [#2574](https://github.com/paritytech/parity/pull/2574)
|
||||
- Filter apps that has been replaced for the local list [#2583](https://github.com/paritytech/parity/pull/2583)
|
||||
- Display local apps listed by Parity [#2581](https://github.com/paritytech/parity/pull/2581)
|
||||
- Network-specific nodes file [#2569](https://github.com/paritytech/parity/pull/2569)
|
||||
- Dont close when block is known to be invalid [#2572](https://github.com/paritytech/parity/pull/2572)
|
||||
- deny compiler warnings in CI [#2570](https://github.com/paritytech/parity/pull/2570)
|
||||
- adjust alignment of queries [#2573](https://github.com/paritytech/parity/pull/2573)
|
||||
- update ethcore-bigint crate to 0.1.1 [#2562](https://github.com/paritytech/parity/pull/2562)
|
||||
- Registry dapp uses setAddress to actually set addresses now [#2568](https://github.com/paritytech/parity/pull/2568)
|
||||
- Add the new EIP150 test. [#2563](https://github.com/paritytech/parity/pull/2563)
|
||||
- fix failing tests [#2567](https://github.com/paritytech/parity/pull/2567)
|
||||
- ΞTH -> ETH [#2566](https://github.com/paritytech/parity/pull/2566)
|
||||
- Ensure polling is only done when connected [#2565](https://github.com/paritytech/parity/pull/2565)
|
||||
- Fixed race condition in trace import [#2555](https://github.com/paritytech/parity/pull/2555)
|
||||
- Disable misbehaving peers while seeking for best block [#2537](https://github.com/paritytech/parity/pull/2537)
|
||||
- TX queue gas limit config and allow local transactions over the gas limit [#2553](https://github.com/paritytech/parity/pull/2553)
|
||||
- standard component for address -> name mappings (consistent use everywhere) [#2557](https://github.com/paritytech/parity/pull/2557)
|
||||
- Remove unwrap from client module [#2554](https://github.com/paritytech/parity/pull/2554)
|
||||
- Removing panickers from sync module [#2551](https://github.com/paritytech/parity/pull/2551)
|
||||
- Address images (tokens, dapps) as registered via contentHash (when available) [#2526](https://github.com/paritytech/parity/pull/2526)
|
||||
- TokenReg set & get images working [#2540](https://github.com/paritytech/parity/pull/2540)
|
||||
- adjust app_id where /api/content/<hash> is called, fixes #2541 [#2543](https://github.com/paritytech/parity/pull/2543)
|
||||
- connection dialog now shows up in dapps as well, closes #2538 [#2550](https://github.com/paritytech/parity/pull/2550)
|
||||
- display account uuid (where available), closes #2546 [#2549](https://github.com/paritytech/parity/pull/2549)
|
||||
- create accounts via recovery phrase [#2545](https://github.com/paritytech/parity/pull/2545)
|
||||
- Build ethcore/js-precompiled on GitLab [#2522](https://github.com/paritytech/parity/pull/2522)
|
||||
- Return errors from eth_call RPC [#2498](https://github.com/paritytech/parity/pull/2498)
|
||||
- registry dapp: manage records [#2323](https://github.com/paritytech/parity/pull/2323)
|
||||
- Print backtrace on panic [#2535](https://github.com/paritytech/parity/pull/2535)
|
||||
- GitHubHint dapp [#2531](https://github.com/paritytech/parity/pull/2531)
|
||||
- Backports to master [#2530](https://github.com/paritytech/parity/pull/2530)
|
||||
- Handle reorganizations in the state cache [#2490](https://github.com/paritytech/parity/pull/2490)
|
||||
- Hypervisor: terminate hanging modules [#2513](https://github.com/paritytech/parity/pull/2513)
|
||||
- signer & node connection prompts/indicators [#2504](https://github.com/paritytech/parity/pull/2504)
|
||||
- Using pending block only if is not old [#2514](https://github.com/paritytech/parity/pull/2514)
|
||||
- More caching optimizations [#2505](https://github.com/paritytech/parity/pull/2505)
|
||||
- Fixed possible panic in the networking [#2495](https://github.com/paritytech/parity/pull/2495)
|
||||
- Trim password from file [#2503](https://github.com/paritytech/parity/pull/2503)
|
||||
- Fixing RPC Filter conversion to EthFilter [#2500](https://github.com/paritytech/parity/pull/2500)
|
||||
- Fixing error message for transactions [#2496](https://github.com/paritytech/parity/pull/2496)
|
||||
- Adjustable stack size for EVM [#2483](https://github.com/paritytech/parity/pull/2483)
|
||||
- [master] Fixing penalization in future [#2499](https://github.com/paritytech/parity/pull/2499)
|
||||
- Preserve cache on reverting the snapshot [#2488](https://github.com/paritytech/parity/pull/2488)
|
||||
- RocksDB version bump [#2492](https://github.com/paritytech/parity/pull/2492)
|
||||
- Increase default size of transaction queue [#2489](https://github.com/paritytech/parity/pull/2489)
|
||||
- basiccoin v1 available [#2491](https://github.com/paritytech/parity/pull/2491)
|
||||
- Small EVM optimization [#2487](https://github.com/paritytech/parity/pull/2487)
|
||||
- Track dirty accounts in the state [#2461](https://github.com/paritytech/parity/pull/2461)
|
||||
- fix signature lookup address [#2480](https://github.com/paritytech/parity/pull/2480)
|
||||
- update registrar test with generic non-empty test [#2476](https://github.com/paritytech/parity/pull/2476)
|
||||
- Derive IPC interface only when ipc feature is on [#2463](https://github.com/paritytech/parity/pull/2463)
|
||||
- Fix ethstore opening all key files in the directory at once [#2471](https://github.com/paritytech/parity/pull/2471)
|
||||
- contract api event log fixes [#2469](https://github.com/paritytech/parity/pull/2469)
|
||||
- basiccoin base functionality in-place [#2468](https://github.com/paritytech/parity/pull/2468)
|
||||
- Merge IPC codegen attributes into one [#2460](https://github.com/paritytech/parity/pull/2460)
|
||||
- Close after importing keys from geth [#2464](https://github.com/paritytech/parity/pull/2464)
|
||||
- Port a couple more RPC APIs to the new auto args [#2325](https://github.com/paritytech/parity/pull/2325)
|
||||
- update rustc for appveyor to 1.12.0 [#2423](https://github.com/paritytech/parity/pull/2423)
|
||||
- dapp basiccoin send operations [#2456](https://github.com/paritytech/parity/pull/2456)
|
||||
- Better EVM informant & Slow transactions warning [#2436](https://github.com/paritytech/parity/pull/2436)
|
||||
- Fixing Signer token RPC API [#2437](https://github.com/paritytech/parity/pull/2437)
|
||||
- Fixed FatDB check [#2443](https://github.com/paritytech/parity/pull/2443)
|
||||
- dapp basiccoin structure [#2444](https://github.com/paritytech/parity/pull/2444)
|
||||
- Accounts bloom in master [#2426](https://github.com/paritytech/parity/pull/2426)
|
||||
- Polishing Actually enable fat db pr (#1974) [#2048](https://github.com/paritytech/parity/pull/2048)
|
||||
- Jumptable cache [#2427](https://github.com/paritytech/parity/pull/2427)
|
||||
- signaturereg registered, remove hardcoding [#2431](https://github.com/paritytech/parity/pull/2431)
|
||||
- tokenreg dapp fixes for non-null returns [#2430](https://github.com/paritytech/parity/pull/2430)
|
||||
- update ABI json to latest deployed versions [#2428](https://github.com/paritytech/parity/pull/2428)
|
||||
- update Morden registry address [#2417](https://github.com/paritytech/parity/pull/2417)
|
||||
- Make migration api more friendly [#2420](https://github.com/paritytech/parity/pull/2420)
|
||||
- Journaling bloom filter crate in util [#2395](https://github.com/paritytech/parity/pull/2395)
|
||||
- move abis from js/json to contracts/abi [#2418](https://github.com/paritytech/parity/pull/2418)
|
||||
- Fixing logs-receipt matching [#2403](https://github.com/paritytech/parity/pull/2403)
|
||||
- fix broken beta compilation [#2405](https://github.com/paritytech/parity/pull/2405)
|
||||
- registry dapp: transfer names [#2335](https://github.com/paritytech/parity/pull/2335)
|
||||
- manage firstRun better [#2398](https://github.com/paritytech/parity/pull/2398)
|
||||
- render contract deployment address [#2397](https://github.com/paritytech/parity/pull/2397)
|
||||
- Transaction Queue fix [#2392](https://github.com/paritytech/parity/pull/2392)
|
||||
- contracts abi types & execute value [#2394](https://github.com/paritytech/parity/pull/2394)
|
||||
- update styling with ParityBar overlay [#2390](https://github.com/paritytech/parity/pull/2390)
|
||||
- application Signer popup window [#2388](https://github.com/paritytech/parity/pull/2388)
|
||||
- Fixing Delegate Call in JIT [#2378](https://github.com/paritytech/parity/pull/2378)
|
||||
- Prioritizing re-imported transactions [#2372](https://github.com/paritytech/parity/pull/2372)
|
||||
- Revert #2172, pretty much. [#2387](https://github.com/paritytech/parity/pull/2387)
|
||||
- correct sync memory usage calculation [#2385](https://github.com/paritytech/parity/pull/2385)
|
||||
- fix migration system for post-consolidation migrations, better errors [#2334](https://github.com/paritytech/parity/pull/2334)
|
||||
- Fix the traceAddress field in transaction traces. [#2373](https://github.com/paritytech/parity/pull/2373)
|
||||
- Gavcoin utilises the popup box [#2381](https://github.com/paritytech/parity/pull/2381)
|
||||
- registry dapp: support dropping names [#2328](https://github.com/paritytech/parity/pull/2328)
|
||||
- settings view, set background & store views [#2380](https://github.com/paritytech/parity/pull/2380)
|
||||
- Removing extras data from retracted blocks. [#2375](https://github.com/paritytech/parity/pull/2375)
|
||||
- fixed #2263, geth keys with ciphertext shorter than 32 bytes [#2318](https://github.com/paritytech/parity/pull/2318)
|
||||
- Expanse compatibility [#2369](https://github.com/paritytech/parity/pull/2369)
|
||||
- Allow queries of constant functions on contracts [#2360](https://github.com/paritytech/parity/pull/2360)
|
||||
- Auto Open/Close the Signer window on new transaction request [#2362](https://github.com/paritytech/parity/pull/2362)
|
||||
- Specify column cache sizes explicitly; default fallback of 2MB [#2358](https://github.com/paritytech/parity/pull/2358)
|
||||
- Canonical state cache (master) [#2311](https://github.com/paritytech/parity/pull/2311)
|
||||
- method signature lookups, parameter decoding & management [#2313](https://github.com/paritytech/parity/pull/2313)
|
||||
- make block queue into a more generic verification queue and fix block heap size calculation [#2095](https://github.com/paritytech/parity/pull/2095)
|
||||
- Hash Content RPC method [#2355](https://github.com/paritytech/parity/pull/2355)
|
||||
- registry dapp: show reserved events by default [#2359](https://github.com/paritytech/parity/pull/2359)
|
||||
- Display timestamp in Signer requests details [#2324](https://github.com/paritytech/parity/pull/2324)
|
||||
- Reorder transaction_by_hash to favour canon search [#2332](https://github.com/paritytech/parity/pull/2332)
|
||||
- Optimize DIV for some common divisors [#2327](https://github.com/paritytech/parity/pull/2327)
|
||||
- Return error when deserializing invalid hex [#2339](https://github.com/paritytech/parity/pull/2339)
|
||||
- Changed http:// to https:// on some links [#2349](https://github.com/paritytech/parity/pull/2349)
|
||||
- user defaults [#2014](https://github.com/paritytech/parity/pull/2014)
|
||||
- Fixing jit feature compilation [#2310](https://github.com/paritytech/parity/pull/2310)
|
||||
- Tx Queue improvements [#2292](https://github.com/paritytech/parity/pull/2292)
|
||||
- Removing PropTypes on build [#2322](https://github.com/paritytech/parity/pull/2322)
|
||||
- Lenient bytes deserialization [#2036](https://github.com/paritytech/parity/pull/2036)
|
||||
- reverse call data decoding given transaction data & method [#2312](https://github.com/paritytech/parity/pull/2312)
|
||||
- add missing gpl headers to gavcoin dapp [#2317](https://github.com/paritytech/parity/pull/2317)
|
||||
- contract Events, Functions & Queries sub-components as well as Event log visual updates [#2306](https://github.com/paritytech/parity/pull/2306)
|
||||
- webpack config updates (really include babel-polyfill, rename npm steps) [#2305](https://github.com/paritytech/parity/pull/2305)
|
||||
- remove unneeded Form from Account header [#2302](https://github.com/paritytech/parity/pull/2302)
|
||||
- edit of metadata across accounts, addresses & contracts [#2300](https://github.com/paritytech/parity/pull/2300)
|
||||
- Adjust all modals for consistency & css DRY-ness [#2301](https://github.com/paritytech/parity/pull/2301)
|
||||
- update container spacing [#2296](https://github.com/paritytech/parity/pull/2296)
|
||||
- local cache of generated background (no allocation on each re-render) [#2298](https://github.com/paritytech/parity/pull/2298)
|
||||
- fix failing tests [#2290](https://github.com/paritytech/parity/pull/2290)
|
||||
- Respecting standards for tokenreg dapp [#2287](https://github.com/paritytech/parity/pull/2287)
|
||||
- Separate RPC serialization from implementation [#2072](https://github.com/paritytech/parity/pull/2072)
|
||||
- Webpack optimisations - Using DLL [#2264](https://github.com/paritytech/parity/pull/2264)
|
||||
- header background, theme adjustments (not that harsh) [#2273](https://github.com/paritytech/parity/pull/2273)
|
||||
- contract view (developer-centric) [#2259](https://github.com/paritytech/parity/pull/2259)
|
||||
- Add hash as CLI function [#1995](https://github.com/paritytech/parity/pull/1995)
|
||||
- registry: fix mined events showing as pending [#2267](https://github.com/paritytech/parity/pull/2267)
|
||||
- Dapp - Tokereg ; Query Tokens from TLA or Address [#2266](https://github.com/paritytech/parity/pull/2266)
|
||||
- Fixes to the Token Registration dApp [#2250](https://github.com/paritytech/parity/pull/2250)
|
||||
- remove abi *.json duplication, provide a single version of the truth [#2253](https://github.com/paritytech/parity/pull/2253)
|
||||
- Separate path for ext code size [#2251](https://github.com/paritytech/parity/pull/2251)
|
||||
- Snapshot format changes [#2234](https://github.com/paritytech/parity/pull/2234)
|
||||
- Serving content at /api/content/<hash> [#2248](https://github.com/paritytech/parity/pull/2248)
|
||||
- Fails when deserializing non-hex uints [#2247](https://github.com/paritytech/parity/pull/2247)
|
||||
- registry dapp: add GPL headers [#2252](https://github.com/paritytech/parity/pull/2252)
|
||||
- registry dapp: user-friendly lookup [#2229](https://github.com/paritytech/parity/pull/2229)
|
||||
- registry dapp: show DataChanged events [#2242](https://github.com/paritytech/parity/pull/2242)
|
||||
- fixups for deploys [#2249](https://github.com/paritytech/parity/pull/2249)
|
||||
- Fixing output of eth_call and Bytes deserialization [#2230](https://github.com/paritytech/parity/pull/2230)
|
||||
- Encryption, decryption and public key RPCs. [#1946](https://github.com/paritytech/parity/pull/1946)
|
||||
- limit number of event logs returned [#2231](https://github.com/paritytech/parity/pull/2231)
|
||||
- babel-polyfill [#2239](https://github.com/paritytech/parity/pull/2239)
|
||||
- procedurally generate background based on signer key [#2233](https://github.com/paritytech/parity/pull/2233)
|
||||
- UI fixes [#2238](https://github.com/paritytech/parity/pull/2238)
|
||||
- expose isConnected() from transport [#2225](https://github.com/paritytech/parity/pull/2225)
|
||||
- registry dapp: rename event log [#2227](https://github.com/paritytech/parity/pull/2227)
|
||||
- registry dapp: show pending events [#2223](https://github.com/paritytech/parity/pull/2223)
|
||||
- Handle RLP to string UTF-8 decoding errors [#2217](https://github.com/paritytech/parity/pull/2217)
|
||||
- Use WebSocket transport for all built-in calls [#2216](https://github.com/paritytech/parity/pull/2216)
|
||||
- Remove panickers from trie iterators [#2209](https://github.com/paritytech/parity/pull/2209)
|
||||
- Limit for logs filter. [#2180](https://github.com/paritytech/parity/pull/2180)
|
||||
- Various state copy optimizations [#2172](https://github.com/paritytech/parity/pull/2172)
|
||||
- New signer token RPC & Initial signer connection without token. [#2096](https://github.com/paritytech/parity/pull/2096)
|
||||
- signer ui fixes [#2219](https://github.com/paritytech/parity/pull/2219)
|
||||
- contract deploy ui [#2212](https://github.com/paritytech/parity/pull/2212)
|
||||
- registry dapp: fix propTypes [#2218](https://github.com/paritytech/parity/pull/2218)
|
||||
- registry: fix IdentityIcon in events log [#2206](https://github.com/paritytech/parity/pull/2206)
|
||||
- Fixing evm-debug [#2161](https://github.com/paritytech/parity/pull/2161)
|
||||
- Fix syncing with pv63 peers [#2204](https://github.com/paritytech/parity/pull/2204)
|
||||
- registry: show shortened hashes [#2205](https://github.com/paritytech/parity/pull/2205)
|
||||
- registry dapp: remove owner [#2203](https://github.com/paritytech/parity/pull/2203)
|
||||
- webpack proxy updates for /api* [#2175](https://github.com/paritytech/parity/pull/2175)
|
||||
- simplify personal event publishing, fix delete refresh issues [#2183](https://github.com/paritytech/parity/pull/2183)
|
||||
- fix global & initial states [#2160](https://github.com/paritytech/parity/pull/2160)
|
||||
- Allow selection & saving of available views [#2131](https://github.com/paritytech/parity/pull/2131)
|
||||
- global/contract events with promisy subscribe/unsubscribe [#2136](https://github.com/paritytech/parity/pull/2136)
|
||||
- Token Registry dApp [#2178](https://github.com/paritytech/parity/pull/2178)
|
||||
- re-usable bytesToHex exposed in api.util [#2174](https://github.com/paritytech/parity/pull/2174)
|
||||
- Webpack optimisations [#2179](https://github.com/paritytech/parity/pull/2179)
|
||||
- cleanup on contract event subscriptions [#2104](https://github.com/paritytech/parity/pull/2104)
|
||||
- move utility functions to api.util [#2105](https://github.com/paritytech/parity/pull/2105)
|
||||
- registry dapp [#2077](https://github.com/paritytech/parity/pull/2077)
|
||||
- mui/FlatButton to ui/Button [#2129](https://github.com/paritytech/parity/pull/2129)
|
||||
- address delete functionality [#2128](https://github.com/paritytech/parity/pull/2128)
|
||||
- contract deployment updates [#2106](https://github.com/paritytech/parity/pull/2106)
|
||||
- contract events, indexed string fix [#2108](https://github.com/paritytech/parity/pull/2108)
|
||||
- Bumping jsonrpc-core & jsonrpc-http-server [#2162](https://github.com/paritytech/parity/pull/2162)
|
||||
- gitlab testing & build processes [#2090](https://github.com/paritytech/parity/pull/2090)
|
||||
- Misc small UI fixes (recently broken) [#2101](https://github.com/paritytech/parity/pull/2101)
|
||||
- Bump clippy & Fix warnings [#2109](https://github.com/paritytech/parity/pull/2109)
|
||||
- Import command summary [#2102](https://github.com/paritytech/parity/pull/2102)
|
||||
- check for existence of deprecated ethash file before attempting delete [#2103](https://github.com/paritytech/parity/pull/2103)
|
||||
- shapeshift Promise API library [#2088](https://github.com/paritytech/parity/pull/2088)
|
||||
- fund account via ShapeShift [#2099](https://github.com/paritytech/parity/pull/2099)
|
||||
- Get bigint on crates.io [#2078](https://github.com/paritytech/parity/pull/2078)
|
||||
- Enable sealing if Engine provides internal sealing given author [#2084](https://github.com/paritytech/parity/pull/2084)
|
||||
- Config files [#2070](https://github.com/paritytech/parity/pull/2070)
|
||||
- re-add lodash plugin to babel config [#2092](https://github.com/paritytech/parity/pull/2092)
|
||||
- Remove old cache data [#2081](https://github.com/paritytech/parity/pull/2081)
|
||||
- Logs limit & log_index bug [#2073](https://github.com/paritytech/parity/pull/2073)
|
||||
- flatten store, muiTheme & api providers [#2087](https://github.com/paritytech/parity/pull/2087)
|
||||
- add babel es2016 & es2017 presets [#2083](https://github.com/paritytech/parity/pull/2083)
|
||||
- remove all '<name>/index' imports in API [#2089](https://github.com/paritytech/parity/pull/2089)
|
||||
- add missing GPL headers to all files [#2086](https://github.com/paritytech/parity/pull/2086)
|
||||
- readme cleanups [#2085](https://github.com/paritytech/parity/pull/2085)
|
||||
- gavcoin global import of parity api [#2082](https://github.com/paritytech/parity/pull/2082)
|
||||
- Fixing removal from gas price when moving future->current [#2076](https://github.com/paritytech/parity/pull/2076)
|
||||
- Split internal sealing from work preparation [#2071](https://github.com/paritytech/parity/pull/2071)
|
||||
- ensure the target folder doesn't exist before renaming [#2074](https://github.com/paritytech/parity/pull/2074)
|
||||
- Get rid of 'Dapp is being downloaded' page [#2055](https://github.com/paritytech/parity/pull/2055)
|
||||
- fix failing master build: update tests to new init_restore signature. [#2069](https://github.com/paritytech/parity/pull/2069)
|
||||
- Local snapshot restore [#2058](https://github.com/paritytech/parity/pull/2058)
|
||||
- import: keep informant going until finished [#2065](https://github.com/paritytech/parity/pull/2065)
|
||||
- Add a few tests for the snapshot service [#2059](https://github.com/paritytech/parity/pull/2059)
|
||||
- IPC tweaks [#2046](https://github.com/paritytech/parity/pull/2046)
|
||||
- Update arm* Docker [#2064](https://github.com/paritytech/parity/pull/2064)
|
||||
- Fetching any content-addressed content [#2050](https://github.com/paritytech/parity/pull/2050)
|
||||
- Use proper database configuration in snapshots. [#2052](https://github.com/paritytech/parity/pull/2052)
|
||||
- periodic snapshot tweaks [#2054](https://github.com/paritytech/parity/pull/2054)
|
||||
- ethkey-cli [#2057](https://github.com/paritytech/parity/pull/2057)
|
||||
- Forward ethstore-cli feature [#2056](https://github.com/paritytech/parity/pull/2056)
|
||||
- handling invalid spec jsons properly, additional tests, closes #1840 [#2049](https://github.com/paritytech/parity/pull/2049)
|
||||
- Periodic snapshots [#2044](https://github.com/paritytech/parity/pull/2044)
|
||||
- Snapshot sync [#2047](https://github.com/paritytech/parity/pull/2047)
|
||||
- Nice error pages for Dapps & Signer [#2033](https://github.com/paritytech/parity/pull/2033)
|
||||
- Add a few small snapshot tests [#2038](https://github.com/paritytech/parity/pull/2038)
|
||||
- facelift for traces, added errors [#2042](https://github.com/paritytech/parity/pull/2042)
|
||||
- Fetching content from HTTPS using `rustls` [#2024](https://github.com/paritytech/parity/pull/2024)
|
||||
- Skipping log when there are no transactions were sent [#2045](https://github.com/paritytech/parity/pull/2045)
|
||||
- rlp as separate crate [#2034](https://github.com/paritytech/parity/pull/2034)
|
||||
- Fixing uint serialization [#2037](https://github.com/paritytech/parity/pull/2037)
|
||||
- Fixing new transactions propagation [#2039](https://github.com/paritytech/parity/pull/2039)
|
||||
- Propagating transactions to peers on timer. [#2035](https://github.com/paritytech/parity/pull/2035)
|
||||
- Remove Populatable and BytesConvertable traits [#2019](https://github.com/paritytech/parity/pull/2019)
|
||||
- fixed #1933 [#1979](https://github.com/paritytech/parity/pull/1979)
|
||||
- Synchronization tweaks for IPC services [#2028](https://github.com/paritytech/parity/pull/2028)
|
||||
- Asynchronous RPC support [#2017](https://github.com/paritytech/parity/pull/2017)
|
||||
- Disable ArchiveDB counter check [#2016](https://github.com/paritytech/parity/pull/2016)
|
||||
- always process trie death row on commit, add more tracing [#2025](https://github.com/paritytech/parity/pull/2025)
|
||||
- fixed transaction addresses mapping, fixes #1971 [#2026](https://github.com/paritytech/parity/pull/2026)
|
||||
- Adding tests for dapps server. [#2021](https://github.com/paritytech/parity/pull/2021)
|
||||
- builtin trait refactoring [#2018](https://github.com/paritytech/parity/pull/2018)
|
||||
- Start parity with systemd [#1967](https://github.com/paritytech/parity/pull/1967)
|
||||
- Control service for IPC [#2013](https://github.com/paritytech/parity/pull/2013)
|
||||
- LRU cache for dapps [#2006](https://github.com/paritytech/parity/pull/2006)
|
||||
- CLI for valid hosts for dapps server [#2005](https://github.com/paritytech/parity/pull/2005)
|
||||
- Make the block header struct's internals private [#2000](https://github.com/paritytech/parity/pull/2000)
|
||||
- Take control of recovered snapshots, start restoration asynchronously [#2010](https://github.com/paritytech/parity/pull/2010)
|
||||
- remove internal locking from DBTransaction [#2003](https://github.com/paritytech/parity/pull/2003)
|
||||
- Snapshot optimizations [#1991](https://github.com/paritytech/parity/pull/1991)
|
||||
- Revert removing ecies [#2009](https://github.com/paritytech/parity/pull/2009)
|
||||
- small blooms optimization [#1998](https://github.com/paritytech/parity/pull/1998)
|
||||
- protection from adding empty traces && assertion in traces db [#1994](https://github.com/paritytech/parity/pull/1994)
|
||||
- Stratum IPC service [#1959](https://github.com/paritytech/parity/pull/1959)
|
||||
- Signature cleanup [#1921](https://github.com/paritytech/parity/pull/1921)
|
||||
- Fixed discovery skipping some nodes [#1996](https://github.com/paritytech/parity/pull/1996)
|
||||
- Trie query recording and AccountDB factory for no mangling [#1944](https://github.com/paritytech/parity/pull/1944)
|
||||
- Validating sha3 of a dapp bundle [#1993](https://github.com/paritytech/parity/pull/1993)
|
||||
- Improve eth_getWork timeout test rpc_get_work_should_timeout [#1992](https://github.com/paritytech/parity/pull/1992)
|
||||
- Resolving URLs from contract [#1964](https://github.com/paritytech/parity/pull/1964)
|
||||
- Add timeout for eth_getWork call [#1975](https://github.com/paritytech/parity/pull/1975)
|
||||
- CLI for Signer interface [#1980](https://github.com/paritytech/parity/pull/1980)
|
||||
- IPC timeout multiplied [#1990](https://github.com/paritytech/parity/pull/1990)
|
||||
- Use relative path for IPC sockets [#1983](https://github.com/paritytech/parity/pull/1983)
|
||||
- Market-orientated transaction pricing [#1963](https://github.com/paritytech/parity/pull/1963)
|
||||
- Bump clippy [#1982](https://github.com/paritytech/parity/pull/1982)
|
||||
- Fixing mutual recursive types serialization [#1977](https://github.com/paritytech/parity/pull/1977)
|
||||
- Fix open on FreeBSD [#1984](https://github.com/paritytech/parity/pull/1984)
|
||||
- Upgrade hyper dependency to 0.9 [#1973](https://github.com/paritytech/parity/pull/1973)
|
||||
- Create network-specific nodes files [#1970](https://github.com/paritytech/parity/pull/1970)
|
||||
- Getting rid of syntex [#1965](https://github.com/paritytech/parity/pull/1965)
|
||||
- Remove binary specification from hypervisor [#1960](https://github.com/paritytech/parity/pull/1960)
|
||||
- Stratum protocol general [#1954](https://github.com/paritytech/parity/pull/1954)
|
||||
- keep track of first block in blockchain [#1937](https://github.com/paritytech/parity/pull/1937)
|
||||
- introduce ethcore/state module [#1953](https://github.com/paritytech/parity/pull/1953)
|
||||
- Apply settings to column families [#1956](https://github.com/paritytech/parity/pull/1956)
|
||||
- move column family constants into db module [#1955](https://github.com/paritytech/parity/pull/1955)
|
||||
- ECIES without MAC [#1948](https://github.com/paritytech/parity/pull/1948)
|
||||
- Fix canny warnings [#1951](https://github.com/paritytech/parity/pull/1951)
|
||||
- Fetchable dapps [#1949](https://github.com/paritytech/parity/pull/1949)
|
||||
- remove impossible panickers related to infallible db transaction [#1947](https://github.com/paritytech/parity/pull/1947)
|
||||
- Minor optimizations [#1943](https://github.com/paritytech/parity/pull/1943)
|
||||
- remove randomness from bigint benches, fix warnings [#1945](https://github.com/paritytech/parity/pull/1945)
|
||||
- Fix several RPCs [#1926](https://github.com/paritytech/parity/pull/1926)
|
||||
- Bump clippy, fix warnings [#1939](https://github.com/paritytech/parity/pull/1939)
|
||||
- DB WAL size limit [#1935](https://github.com/paritytech/parity/pull/1935)
|
||||
- Use explicit global namespaces in codegen [#1928](https://github.com/paritytech/parity/pull/1928)
|
||||
- Fix build on master [#1934](https://github.com/paritytech/parity/pull/1934)
|
||||
- IPC on by default [#1927](https://github.com/paritytech/parity/pull/1927)
|
||||
- fix util benches compilation [#1931](https://github.com/paritytech/parity/pull/1931)
|
||||
- Update gitlab-ci [#1929](https://github.com/paritytech/parity/pull/1929)
|
||||
- ethkey and ethstore use hash structures from bigint [#1851](https://github.com/paritytech/parity/pull/1851)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,616 +0,0 @@
|
||||
Note: Parity 1.6 reached End-of-Life on 2017-10-15 (EOL).
|
||||
|
||||
## Parity [v1.6.10](https://github.com/paritytech/parity/releases/tag/v1.6.10) (2017-07-25)
|
||||
|
||||
This is a hotfix release for the stable channel addressing the recent [multi-signature wallet vulnerability](https://blog.parity.io/security-alert-high-2/). Note, upgrading is not mandatory, and all future multi-sig wallets created by any version of Parity are secure.
|
||||
|
||||
All Changes:
|
||||
|
||||
- Backports for stable [#6116](https://github.com/paritytech/parity/pull/6116)
|
||||
- Remove chunk to restore from pending set only upon successful import [#6112](https://github.com/paritytech/parity/pull/6112)
|
||||
- Blacklist bad snapshot manifest hashes upon failure [#5874](https://github.com/paritytech/parity/pull/5874)
|
||||
- Bump snap version and tweak importing detection logic [#6079](https://github.com/paritytech/parity/pull/6079) (modified to work)
|
||||
- Fix docker build for stable [#6118](https://github.com/paritytech/parity/pull/6118)
|
||||
- Update wallet library binaries [#6108](https://github.com/paritytech/parity/pull/6108)
|
||||
- Backported wallet fix [#6104](https://github.com/paritytech/parity/pull/6104)
|
||||
- Fix initialisation bug. ([#6102](https://github.com/paritytech/parity/pull/6102))
|
||||
- Update wallet library modifiers ([#6103](https://github.com/paritytech/parity/pull/6103))
|
||||
- Bump to v1.6.10
|
||||
|
||||
## Parity [v1.6.9](https://github.com/paritytech/parity/releases/tag/v1.6.9) (2017-07-16)
|
||||
|
||||
This is a first stable release of 1.6 series. It contains a number of minor fixes and introduces the `--reseal-on-uncles` option for miners.
|
||||
|
||||
Full list of changes:
|
||||
|
||||
- Backports [#6061](https://github.com/paritytech/parity/pull/6061)
|
||||
- Ethereum Classic Monetary Policy [#5741](https://github.com/paritytech/parity/pull/5741)
|
||||
- Update rewards for uncle miners for ECIP1017
|
||||
- Fix an off-by-one error in ECIP1017 era calculation
|
||||
- `ecip1017_era_rounds` missing from EthashParams when run in build bot
|
||||
- strip out ecip1017_eras_block_reward function and add unit test
|
||||
- JS precompiled set to stable
|
||||
- Backports [#6060](https://github.com/paritytech/parity/pull/6060)
|
||||
- --reseal-on-uncle [#5940](https://github.com/paritytech/parity/pull/5940)
|
||||
- Optimized uncle check
|
||||
- Additional uncle check
|
||||
- Updated comment
|
||||
- Bump to v1.6.9
|
||||
- CLI: Export error message and less verbose peer counter. [#5870](https://github.com/paritytech/parity/pull/5870)
|
||||
- Removed numbed of active connections from informant
|
||||
- Print error message when fatdb is required
|
||||
- Remove peers from UI
|
||||
|
||||
## Parity [v1.6.8](https://github.com/paritytech/parity/releases/tag/v1.6.8) (2017-06-08)
|
||||
|
||||
This release addresses:
|
||||
|
||||
- a rare condition where quickly creating a new account was generating an account not matching the recovery phrase.
|
||||
- compressed RLP strings caused wrong/empty transaction receipts on Classic network.
|
||||
- blacklisting the _empty phrase_ account from UI and RPC on non-development chains. See also [this blog post](https://blog.parity.io/restoring-blank-seed-phrase/).
|
||||
- canceling transactions that didn't have a condition.
|
||||
- the updated Expanse fork block and chain ID.
|
||||
|
||||
Full changelog:
|
||||
|
||||
- Backporting to beta [#5791](https://github.com/paritytech/parity/pull/5791)
|
||||
- Bump to v1.6.8
|
||||
- Update expanse json with fork at block 600000 [#5351](https://github.com/paritytech/parity/pull/5351)
|
||||
- Update expanse json with fork at block 600000
|
||||
- Update exp chainID to 2
|
||||
- Bumped mio [#5763](https://github.com/paritytech/parity/pull/5763)
|
||||
- Fixed default UI port for mac installer [#5782](https://github.com/paritytech/parity/pull/5782)
|
||||
- Blacklist empty phrase account. [#5730](https://github.com/paritytech/parity/pull/5730)
|
||||
- Update Cid/multihash/ring/tinykeccak [#5785](https://github.com/paritytech/parity/pull/5785)
|
||||
- Updating ring,multihash,tiny-keccak
|
||||
- Updating CID in ipfs.
|
||||
- Disable compression for RLP strings [#5786](https://github.com/paritytech/parity/pull/5786)
|
||||
- Beta Backports [#5789](https://github.com/paritytech/parity/pull/5789)
|
||||
- Fix local transactions without condition. [#5716](https://github.com/paritytech/parity/pull/5716)
|
||||
- Block invalid account name creation [#5784](https://github.com/paritytech/parity/pull/5784)
|
||||
- Additional non-empty phrase check (fromNew)
|
||||
- Explicit canCreate check in create (not only on UI)
|
||||
- BN instance check (fixes Geth imports)
|
||||
- Fixup tests after better checks
|
||||
- Recover from empty phrase in dev mode [#5698](https://github.com/paritytech/parity/pull/5698)
|
||||
- Add dev chain to isTest
|
||||
- Fix signer
|
||||
- Fix no condition transactions
|
||||
- Fix case: old parity
|
||||
- Fix propTypes.
|
||||
|
||||
## Parity [v1.6.7](https://github.com/paritytech/parity/releases/tag/v1.6.7) (2017-05-18)
|
||||
|
||||
This release addresses:
|
||||
|
||||
- potential usability issues with [import and recovery of existing accounts](https://blog.parity.io/restoring-blank-seed-phrase/).
|
||||
- canceling scheduled transactions via RPC or UI.
|
||||
- warp sync issues with the Kovan network.
|
||||
|
||||
Full changelog:
|
||||
|
||||
- Backporting to beta [#5657](https://github.com/paritytech/parity/pull/5657)
|
||||
- Add CHANGELOG.md [#5513](https://github.com/paritytech/parity/pull/5513)
|
||||
- Reorg into blocks before minimum history [#5558](https://github.com/paritytech/parity/pull/5558)
|
||||
- Bump to v1.6.7
|
||||
- Cancel Transaction [#5656](https://github.com/paritytech/parity/pull/5656)
|
||||
- option to disable persistent txqueue [#5544](https://github.com/paritytech/parity/pull/5544)
|
||||
- Remove transaction RPC [#4949](https://github.com/paritytech/parity/pull/4949)
|
||||
- Cancel tx JS [#4958](https://github.com/paritytech/parity/pull/4958)
|
||||
- Updating documentation for RPCs [#5392](https://github.com/paritytech/parity/pull/5392)
|
||||
- Backport Recover button [#5654](https://github.com/paritytech/parity/pull/5654)
|
||||
- Backport [#5645](https://github.com/paritytech/parity/pull/5645)
|
||||
- Add monotonic step to Kovan [#5630](https://github.com/paritytech/parity/pull/5630)
|
||||
- Add monotonic transition to kovan [#5587](https://github.com/paritytech/parity/pull/5587)
|
||||
- Fix ethsign [#5600](https://github.com/paritytech/parity/pull/5600)
|
||||
- Registry backports [#5445](https://github.com/paritytech/parity/pull/5445)
|
||||
- Fixes to the Registry dapp [#4984](https://github.com/paritytech/parity/pull/4984)
|
||||
- Fix references to api outside of `parity.js` [#4981](https://github.com/paritytech/parity/pull/4981)
|
||||
|
||||
## Parity [v1.6.6](https://github.com/paritytech/parity/releases/tag/v1.6.6) (2017-04-11)
|
||||
|
||||
This release brings warp sync support for kovan network.
|
||||
|
||||
- Beta Backports [#5434](https://github.com/paritytech/parity/pull/5434)
|
||||
- Bump to v1.6.6
|
||||
- Strict validation transitions [#4988](https://github.com/paritytech/parity/pull/4988)
|
||||
- Ability to make validation stricter
|
||||
- Fix consensus
|
||||
- Remove logger
|
||||
- Fix eth_sign showing as wallet account [#5309](https://github.com/paritytech/parity/pull/5309)
|
||||
- DefaultProps for account
|
||||
- Pass signing account
|
||||
- Update tests for Connect(...)
|
||||
- Add new seed nodes [#5345](https://github.com/paritytech/parity/pull/5345)
|
||||
- Kovan warp sync fixed
|
||||
- Aura eip155 validation transition [#5363](https://github.com/paritytech/parity/pull/5363)
|
||||
- Add eip155 validation
|
||||
- Add transition block
|
||||
- Default eip155 validation [#5350](https://github.com/paritytech/parity/pull/5350)
|
||||
- Backport syntax libs update [#5316](https://github.com/paritytech/parity/pull/5316)
|
||||
|
||||
## Parity [v1.6.5](https://github.com/paritytech/parity/releases/tag/v1.6.5) (2017-03-28)
|
||||
|
||||
This release contains the following changes:
|
||||
|
||||
- Warp sync snapshot format improvements.
|
||||
- Fix for Firefox UI issues.
|
||||
- Fix for restoring from a file snapshot.
|
||||
- Fix for auto-updater error handling.
|
||||
- Updated configuration for [Ropsten revival](https://github.com/ethereum/ropsten/blob/master/revival.md). Make sure to delete old Ropsten blockchain first with `parity db kill --chain ropsten`. After that you can sync normally with `parity --chain ropsten`.
|
||||
|
||||
Full changes:
|
||||
|
||||
- Beta Backports [#5299](https://github.com/paritytech/parity/pull/5299)
|
||||
- Fix FireFox overflows [#5000](https://github.com/paritytech/parity/pull/5000)
|
||||
- Max width for container
|
||||
- Set min-width
|
||||
- Switching ValidatorSet [#4961](https://github.com/paritytech/parity/pull/4961)
|
||||
- Add multi validator set
|
||||
- Nicer comment
|
||||
- Validate in constructor
|
||||
- Reporting
|
||||
- Avoid clogging up tmp when updater dir has bad permissions. [#5024](https://github.com/paritytech/parity/pull/5024)
|
||||
- Force earliest era set in snapshot restore [#5021](https://github.com/paritytech/parity/pull/5021)
|
||||
- Bumb to v1.6.5
|
||||
- Fine grained snapshot chunking
|
||||
- Ropsten revival
|
||||
- Fix validator contract syncing [#4789](https://github.com/paritytech/parity/pull/4789) [#5011](https://github.com/paritytech/parity/pull/5011)
|
||||
- Make validator set aware of various states
|
||||
- Fix updater build
|
||||
- Clean up contract call
|
||||
- Failing sync test
|
||||
- Adjust tests
|
||||
- Nicer indent
|
||||
- Revert bound divisor
|
||||
|
||||
## Parity [v1.6.4](https://github.com/paritytech/parity/releases/tag/v1.6.4) (2017-03-22)
|
||||
|
||||
A number of issues fixed in this release:
|
||||
|
||||
- Ledger device connectivity issues for some users on Windows.
|
||||
- Improved vault usability.
|
||||
- Stratum mining no longer requires `--force-sealing`.
|
||||
- `evm` binary has been renamed to `parity-evm` to avoid conflict with cpp-ethereum package.
|
||||
|
||||
Full Changes:
|
||||
|
||||
- Backporting to beta [#4995](https://github.com/paritytech/parity/pull/4995)
|
||||
- Bump to v1.6.4
|
||||
- Ensure sealing work enabled if notifier registed
|
||||
- Fix condition check
|
||||
- Always send full chunks [#4960](https://github.com/paritytech/parity/pull/4960)
|
||||
- Bump nanomsg [#4965](https://github.com/paritytech/parity/pull/4965)
|
||||
- Renaming evm binary to avoid conflicts. [#4899](https://github.com/paritytech/parity/pull/4899)
|
||||
- Beta UI backports [#4993](https://github.com/paritytech/parity/pull/4993)
|
||||
- Update js-precompiled 20170314-121823
|
||||
- Attach hardware wallets already in addressbook [#4912](https://github.com/paritytech/parity/pull/4912)
|
||||
- Attach hardware wallets already in addressbook
|
||||
- Only set values changed
|
||||
- Add Vaults logic to First Run [#4894](https://github.com/paritytech/parity/issues/4894) [#4914](https://github.com/paritytech/parity/pull/4914)
|
||||
- Add ability to configure Secure API (for [#4885](https://github.com/paritytech/parity/issues/4885)) [#4922](https://github.com/paritytech/parity/pull/4922)
|
||||
- Add z-index to small modals as well [#4923](https://github.com/paritytech/parity/pull/4923)
|
||||
- Eth_sign where account === undefined [#4964](https://github.com/paritytech/parity/pull/4964)
|
||||
- Update for case where account === undefined
|
||||
- Update tests to not mask account === undefined
|
||||
- Default account = {} where undefined (thanks [@tomusdrw](https://github.com/tomusdrw))
|
||||
- Fix Password Dialog forms style issue [#4968](https://github.com/paritytech/parity/pull/4968)
|
||||
|
||||
## Parity [v1.6.3](https://github.com/paritytech/parity/releases/tag/v1.6.3) (2017-03-14)
|
||||
|
||||
This release fixes issue compatibility with Safari on MacOS.
|
||||
|
||||
- Safari fixes [#4902](https://github.com/paritytech/parity/pull/4902)
|
||||
- Add intitial max-width to sections
|
||||
- Move background z-index to -1
|
||||
|
||||
## Parity [v1.6.2](https://github.com/paritytech/parity/releases/tag/v1.6.2) (2017-03-13)
|
||||
|
||||
A major release introducing a few new features:
|
||||
|
||||
- Revamped UI.
|
||||
- Account Vaults.
|
||||
- Support for Ledger hardware wallet devices.
|
||||
- Stratum protocol for PoW mining.
|
||||
- A new MacOS installer. Parity for MacOS now includes a Menu Bar icon that allows controlling Parity service.
|
||||
- Disk backed transaction store. Pending transactions are now saved to disk and won't get lost when Parity is restarted.
|
||||
- Improved memory management.
|
||||
|
||||
See the [blog post](https://blog.parity.io/announcing-parity-1-6/) for more details.
|
||||
|
||||
Full Changes:
|
||||
|
||||
- Fix auto-updater beta [#4868](https://github.com/paritytech/parity/pull/4868)
|
||||
- Beta UI backports [#4855](https://github.com/paritytech/parity/pull/4855)
|
||||
- Added React Hot Reload to dapps + TokenDeplpoy fix ([#4846](https://github.com/paritytech/parity/pull/4846))
|
||||
- Fix method decoding ([#4845](https://github.com/paritytech/parity/pull/4845))
|
||||
- Fix contract deployment method decoding in Signer
|
||||
- Linting
|
||||
- Fix TxViewer when no `to` (contract deployment) ([#4847](https://github.com/paritytech/parity/pull/4847))
|
||||
- Added React Hot Reload to dapps + TokenDeplpoy fix
|
||||
- Fixes to the LocalTx dapp
|
||||
- Don't send the nonce for mined transactions
|
||||
- Don't encode empty to values for options
|
||||
- Pull steps from actual available steps ([#4848](https://github.com/paritytech/parity/pull/4848))
|
||||
- Wait for the value to have changed in the input ([#4844](https://github.com/paritytech/parity/pull/4844))
|
||||
- Backport Regsirty changes from [#4589](https://github.com/paritytech/parity/pull/4589)
|
||||
- Test fixes for [#4589](https://github.com/paritytech/parity/pull/4589)
|
||||
- Beta Simple score [#4852](https://github.com/paritytech/parity/pull/4852)
|
||||
- Simple score
|
||||
- Ignore part of a test
|
||||
- Backporting to beta [#4840](https://github.com/paritytech/parity/pull/4840)
|
||||
- Fixes to the Registry dapp ([#4838](https://github.com/paritytech/parity/pull/4838))
|
||||
- Fix wrong ABI methods
|
||||
- Fix comparison
|
||||
- Bump to v1.6.1
|
||||
- Show token icons on list summary pages ([#4826](https://github.com/paritytech/parity/pull/4826)) [#4827](https://github.com/paritytech/parity/pull/4827)
|
||||
- Adjust balance overlay margins (no jumps)
|
||||
- Img only balances, small verifications
|
||||
- Invalid tests removed
|
||||
- Always wrap display (Thanks [@ngotchac](https://github.com/ngotchac))
|
||||
- Update tests to reflect reality
|
||||
- Beta Engine backports [#4806](https://github.com/paritytech/parity/pull/4806)
|
||||
- Calibrate before rejection
|
||||
- Change flag name
|
||||
- Add eip155
|
||||
- Make network_id default
|
||||
- Beta UI backports [#4823](https://github.com/paritytech/parity/pull/4823)
|
||||
- Better logic for contract deployments ([#4821](https://github.com/paritytech/parity/pull/4821))
|
||||
- Beta UI backports [#4818](https://github.com/paritytech/parity/pull/4818)
|
||||
- Update the key ([#4817](https://github.com/paritytech/parity/pull/4817))
|
||||
- Adjust selection colours/display ([#4811](https://github.com/paritytech/parity/pull/4811))
|
||||
- Adjust selection colours to match with mui
|
||||
- allow -> disable (simplify selections)
|
||||
- Only use top-border
|
||||
- Overlay selection line
|
||||
- Slightly more muted unselected
|
||||
- Restore address icon
|
||||
- Fix default values for contract queries
|
||||
- Beta UI backports [#4809](https://github.com/paritytech/parity/pull/4809)
|
||||
- Update Wallet to new Wallet Code ([#4805](https://github.com/paritytech/parity/pull/4805))
|
||||
- Update Wallet Version
|
||||
- Update Wallet Library
|
||||
- Update Wallets Bytecodes
|
||||
- Typo
|
||||
- Separate Deploy in Contract API
|
||||
- Use the new Wallet ABI // Update wallet code
|
||||
- WIP .// Deploy from Wallet
|
||||
- Update Wallet contract
|
||||
- Contract Deployment for Wallet
|
||||
- Working deployments for Single Owned Wallet contracts
|
||||
- Linting
|
||||
- Create a Wallet from a Wallet
|
||||
- Linting
|
||||
- Fix Signer transactions // Add Gas Used for transactions
|
||||
- Deploy wallet contract fix
|
||||
- Fix too high gas estimate for Wallet Contract Deploys
|
||||
- Final piece ; deploying from Wallet owned by wallet
|
||||
- Update Wallet Code
|
||||
- Updated the Wallet Codes
|
||||
- Fixing Wallet Deployments
|
||||
- Add Support for older wallets
|
||||
- Linting
|
||||
- SMS Faucet ([#4774](https://github.com/paritytech/parity/pull/4774))
|
||||
- Faucet
|
||||
- Remove flakey button-index testing
|
||||
- Only display faucet when sms verified (mainnet)
|
||||
- Simplify availability checks
|
||||
- WIP
|
||||
- Resuest from verified -> verified
|
||||
- Update endpoint, display response text
|
||||
- Error icon on errors
|
||||
- Parse hash text response
|
||||
- Use /api/:address endpoint
|
||||
- Hash -> data
|
||||
- Adjust sms-certified message
|
||||
- Fix SectionList hovering issue ([#4749](https://github.com/paritytech/parity/pull/4749))
|
||||
- Fix SectionList Items hover when <3 items
|
||||
- Even easier...
|
||||
- Lint (new)
|
||||
- Update ETC bootnodes [#4794](https://github.com/paritytech/parity/pull/4794)
|
||||
- Update comments and reg ABI [#4787](https://github.com/paritytech/parity/pull/4787)
|
||||
- Optimize signature for fallback function. [#4780](https://github.com/paritytech/parity/pull/4780)
|
||||
- Rephrasing token generation screen. [#4777](https://github.com/paritytech/parity/pull/4777)
|
||||
- Etherscan links based on netVersion identifier [#4772](https://github.com/paritytech/parity/pull/4772)
|
||||
- Update README.md [#4762](https://github.com/paritytech/parity/pull/4762)
|
||||
- Fix invalid props to verification code [#4766](https://github.com/paritytech/parity/pull/4766)
|
||||
- Extend authority round consensus test [#4756](https://github.com/paritytech/parity/pull/4756)
|
||||
- Revert last hyper "fix" [#4752](https://github.com/paritytech/parity/pull/4752)
|
||||
- Vault Management UI (round 3) [#4652](https://github.com/paritytech/parity/pull/4652)
|
||||
- Update SelectionList indicators [#4736](https://github.com/paritytech/parity/pull/4736)
|
||||
- Update testnet detection [#4746](https://github.com/paritytech/parity/pull/4746)
|
||||
- Fix Portal in Portal ESC issue [#4745](https://github.com/paritytech/parity/pull/4745)
|
||||
- Update wiki [#4743](https://github.com/paritytech/parity/pull/4743)
|
||||
- Account selector close operations [#4728](https://github.com/paritytech/parity/pull/4728)
|
||||
- Fix Account Selection in Signer [#4744](https://github.com/paritytech/parity/pull/4744)
|
||||
- Support both V1 & V2 DataChanged events in registry [#4734](https://github.com/paritytech/parity/pull/4734)
|
||||
- Add info on forks. [#4733](https://github.com/paritytech/parity/pull/4733)
|
||||
- Add registry addr [#4732](https://github.com/paritytech/parity/pull/4732)
|
||||
- UI support for hardware wallets [#4539](https://github.com/paritytech/parity/pull/4539)
|
||||
- S/delete/forget/ for wallets [#4729](https://github.com/paritytech/parity/pull/4729)
|
||||
- New chains [#4720](https://github.com/paritytech/parity/pull/4720)
|
||||
- Enable --warp by default [#4719](https://github.com/paritytech/parity/pull/4719)
|
||||
- Update Uglify (fix to 2.8.2) to fix binary builds [#4723](https://github.com/paritytech/parity/pull/4723)
|
||||
- Extract i18n strings in modals/* [#4706](https://github.com/paritytech/parity/pull/4706)
|
||||
- Provide uncle size where available in RPC [#4713](https://github.com/paritytech/parity/pull/4713)
|
||||
- EC math functions [#4696](https://github.com/paritytech/parity/pull/4696)
|
||||
- Add registrar fields [#4716](https://github.com/paritytech/parity/pull/4716)
|
||||
- Extract i18n strings in views/* [#4695](https://github.com/paritytech/parity/pull/4695)
|
||||
- Removing network=disable from config files [#4715](https://github.com/paritytech/parity/pull/4715)
|
||||
- Fast in-place migration for adding and removing column families [#4687](https://github.com/paritytech/parity/pull/4687)
|
||||
- Display badges on summary view [#4689](https://github.com/paritytech/parity/pull/4689)
|
||||
- Consistent file uploads [#4699](https://github.com/paritytech/parity/pull/4699)
|
||||
- Rename https://mkr.market -> https://oasisdex.com [#4701](https://github.com/paritytech/parity/pull/4701)
|
||||
- Stop copy & clickthrough from list summaries [#4700](https://github.com/paritytech/parity/pull/4700)
|
||||
- Display ... for address summary overflows [#4691](https://github.com/paritytech/parity/pull/4691)
|
||||
- Less agressive grayscale/opacity in SelectionList [#4688](https://github.com/paritytech/parity/pull/4688)
|
||||
- Propagate trie errors upwards from State [#4655](https://github.com/paritytech/parity/pull/4655)
|
||||
- Generic state backend [#4632](https://github.com/paritytech/parity/pull/4632)
|
||||
- Enhance dialog layouts (round 1) [#4637](https://github.com/paritytech/parity/pull/4637)
|
||||
- Vault Management UI (round 2) [#4631](https://github.com/paritytech/parity/pull/4631)
|
||||
- Fix Portal broad event stopper [#4674](https://github.com/paritytech/parity/pull/4674)
|
||||
- Custom dev chain presets [#4671](https://github.com/paritytech/parity/pull/4671)
|
||||
- Max gas limit and min gas price [#4661](https://github.com/paritytech/parity/pull/4661)
|
||||
- Align list displays with SectionList (UI consistency) [#4621](https://github.com/paritytech/parity/pull/4621)
|
||||
- Add SelectionList component to DRY up [#4639](https://github.com/paritytech/parity/pull/4639)
|
||||
- I18n NL linting updates [#4662](https://github.com/paritytech/parity/pull/4662)
|
||||
- Misc. small UI fixes [#4657](https://github.com/paritytech/parity/pull/4657)
|
||||
- More CLI settings for IPFS API [#4608](https://github.com/paritytech/parity/pull/4608)
|
||||
- Fix Tendermint deadlock [#4654](https://github.com/paritytech/parity/pull/4654)
|
||||
- Nl translations [#4649](https://github.com/paritytech/parity/pull/4649)
|
||||
- Update transaction condition documentation [#4659](https://github.com/paritytech/parity/pull/4659)
|
||||
- Bump hyper versions [#4645](https://github.com/paritytech/parity/pull/4645)
|
||||
- Sane updater [#4658](https://github.com/paritytech/parity/pull/4658)
|
||||
- Remainder of RPC APIs implemented for the light client [#4594](https://github.com/paritytech/parity/pull/4594)
|
||||
- Preserve vault meta when changing pwd [#4650](https://github.com/paritytech/parity/pull/4650)
|
||||
- Fix Geth account import [#4641](https://github.com/paritytech/parity/pull/4641)
|
||||
- Tweak some checks. [#4633](https://github.com/paritytech/parity/pull/4633)
|
||||
- Attempt to fix subscribeToEvents test [#4638](https://github.com/paritytech/parity/pull/4638)
|
||||
- Fix selection value from RadioButtons [#4636](https://github.com/paritytech/parity/pull/4636)
|
||||
- Convert all remaining Modals to use Portal (UI consistency) [#4625](https://github.com/paritytech/parity/pull/4625)
|
||||
- Default account selection update [#4609](https://github.com/paritytech/parity/pull/4609)
|
||||
- Display ETH balance in overlay account selector [#4588](https://github.com/paritytech/parity/pull/4588)
|
||||
- Fixed minor grammar mistake in readme [#4627](https://github.com/paritytech/parity/pull/4627)
|
||||
- Extract newly available i18n strings [#4623](https://github.com/paritytech/parity/pull/4623)
|
||||
- Save pending local transactions in the database [#4566](https://github.com/paritytech/parity/pull/4566)
|
||||
- Bump CID version to allow compilation on all platforms [#4614](https://github.com/paritytech/parity/pull/4614)
|
||||
- Vault Management UI (first round) [#4446](https://github.com/paritytech/parity/pull/4446)
|
||||
- Let Engine decide if it seals internally [#4613](https://github.com/paritytech/parity/pull/4613)
|
||||
- Show only known accounts/wallets/addresses on Home [#4612](https://github.com/paritytech/parity/pull/4612)
|
||||
- Proper default accounts RPCs [#4580](https://github.com/paritytech/parity/pull/4580)
|
||||
- Hash-fetch errors in case upstream returns non-200 [#4599](https://github.com/paritytech/parity/pull/4599)
|
||||
- Added pending transaction info to eth_getTransactionByHash [#4570](https://github.com/paritytech/parity/pull/4570)
|
||||
- Secret store - initial version [#4567](https://github.com/paritytech/parity/pull/4567)
|
||||
- Handle invalid ABI retrieved from address_book gracefully [#4606](https://github.com/paritytech/parity/pull/4606)
|
||||
- Optimize key directory reloads [#4583](https://github.com/paritytech/parity/pull/4583)
|
||||
- Revert Double Click on Accounts to close in Signer Bar [#4590](https://github.com/paritytech/parity/pull/4590)
|
||||
- IPFS MVP [#4545](https://github.com/paritytech/parity/pull/4545)
|
||||
- Networking fixes [#4563](https://github.com/paritytech/parity/pull/4563)
|
||||
- Remove eth_compile* RPCs [#4577](https://github.com/paritytech/parity/pull/4577)
|
||||
- Ledger wallet signing fixed [#4578](https://github.com/paritytech/parity/pull/4578)
|
||||
- Remove vertx from Webpack config [#4576](https://github.com/paritytech/parity/pull/4576)
|
||||
- Better display of tags [#4564](https://github.com/paritytech/parity/pull/4564)
|
||||
- Added vaults support to `ethstore-cli` [#4532](https://github.com/paritytech/parity/pull/4532)
|
||||
- Fixed font URLs [#4579](https://github.com/paritytech/parity/pull/4579)
|
||||
- Explicitly set seconds to 0 from selector [#4559](https://github.com/paritytech/parity/pull/4559)
|
||||
- Fixes evmbin compilation and adding to standard build. [#4561](https://github.com/paritytech/parity/pull/4561)
|
||||
- Alias for personal_sendTransaction [#4554](https://github.com/paritytech/parity/pull/4554)
|
||||
- Key derivation in ethstore & rpc [#4515](https://github.com/paritytech/parity/pull/4515)
|
||||
- Skip OOG check for simple transfers [#4558](https://github.com/paritytech/parity/pull/4558)
|
||||
- Light Client transaction queue, initial LightDispatcher [#4501](https://github.com/paritytech/parity/pull/4501)
|
||||
- Fixes BadgeReg Middleware [#4556](https://github.com/paritytech/parity/pull/4556)
|
||||
- Fix pasting of value in Input fields [#4555](https://github.com/paritytech/parity/pull/4555)
|
||||
- Tooltips with react-intl [#4549](https://github.com/paritytech/parity/pull/4549)
|
||||
- Close on double-click for Signer Account selection [#4540](https://github.com/paritytech/parity/pull/4540)
|
||||
- Signer provenance [#4477](https://github.com/paritytech/parity/pull/4477)
|
||||
- Fix console dapp [#4544](https://github.com/paritytech/parity/pull/4544)
|
||||
- Extract i18n string into i18n/_defaults (base of translations) [#4514](https://github.com/paritytech/parity/pull/4514)
|
||||
- Fix contract queries bug [#4534](https://github.com/paritytech/parity/pull/4534)
|
||||
- Fixing namespace of couple methods in console. [#4538](https://github.com/paritytech/parity/pull/4538)
|
||||
- Home landing page [#4178](https://github.com/paritytech/parity/pull/4178)
|
||||
- Bump JSON RPC crates versions [#4530](https://github.com/paritytech/parity/pull/4530)
|
||||
- Update rust version in README [#4531](https://github.com/paritytech/parity/pull/4531)
|
||||
- Lower default pruning history and memory [#4528](https://github.com/paritytech/parity/pull/4528)
|
||||
- Serde 0.9 [#4508](https://github.com/paritytech/parity/pull/4508)
|
||||
- Fixes to Token Deploy dapp [#4513](https://github.com/paritytech/parity/pull/4513)
|
||||
- Fixed receipt decoding [#4521](https://github.com/paritytech/parity/pull/4521)
|
||||
- Several fixes to the Wallet in general [#4504](https://github.com/paritytech/parity/pull/4504)
|
||||
- Use the current contract name for Solidity compilation [#4510](https://github.com/paritytech/parity/pull/4510)
|
||||
- Preparation for Light client RPC [#4485](https://github.com/paritytech/parity/pull/4485)
|
||||
- Fix Dutch translation [#4509](https://github.com/paritytech/parity/pull/4509)
|
||||
- Fixed a warning and bumped libusb-sys [#4507](https://github.com/paritytech/parity/pull/4507)
|
||||
- Fix TnC overflows on small screens [#4505](https://github.com/paritytech/parity/pull/4505)
|
||||
- Fix no data sent in TxQueue dapp [#4502](https://github.com/paritytech/parity/pull/4502)
|
||||
- Ledger wallet support [#4486](https://github.com/paritytech/parity/pull/4486)
|
||||
- Add new Componennt for Token Images [#4498](https://github.com/paritytech/parity/pull/4498)
|
||||
- Fix address and accounts links [#4491](https://github.com/paritytech/parity/pull/4491)
|
||||
- Fix Token Reg Dapp issues in Firefox [#4489](https://github.com/paritytech/parity/pull/4489)
|
||||
- Parity.js interfaces for vaults [#4497](https://github.com/paritytech/parity/pull/4497)
|
||||
- Initial Dutch translations [#4484](https://github.com/paritytech/parity/pull/4484)
|
||||
- Fix key.meta.vault for root dir keys && read vault.meta without vault key [#4482](https://github.com/paritytech/parity/pull/4482)
|
||||
- Arbitrary labels for extended keys (u32, H256 built-in) [#4438](https://github.com/paritytech/parity/pull/4438)
|
||||
- Fix ethstore build [#4492](https://github.com/paritytech/parity/pull/4492)
|
||||
- Fixed compilation of ethstore-cli [#4493](https://github.com/paritytech/parity/pull/4493)
|
||||
- Build embedded Parity JS properly and separatly [#4426](https://github.com/paritytech/parity/pull/4426)
|
||||
- Static link for snappy [#4487](https://github.com/paritytech/parity/pull/4487)
|
||||
- Work with string numbers in contract (Fixes #4472) [#4478](https://github.com/paritytech/parity/pull/4478)
|
||||
- Metadata support for vaults [#4475](https://github.com/paritytech/parity/pull/4475)
|
||||
- Sort gas price corpus when hitting genesis [#4470](https://github.com/paritytech/parity/pull/4470)
|
||||
- Fixing CORS headers for parity.web3.site [#4461](https://github.com/paritytech/parity/pull/4461)
|
||||
- Make signing compatible with geth. [#4468](https://github.com/paritytech/parity/pull/4468)
|
||||
- Handle registry not found errors [#4465](https://github.com/paritytech/parity/pull/4465)
|
||||
- Fix Portal scrolling getting stuck [#4455](https://github.com/paritytech/parity/pull/4455)
|
||||
- Fix AccountCard stretch to 100% [#4450](https://github.com/paritytech/parity/pull/4450)
|
||||
- Include total difficulty in CHTs and hide implementation details from consumers [#4428](https://github.com/paritytech/parity/pull/4428)
|
||||
- Fix RLP encoding for types recursively calling `RlpStream::append` [#4362](https://github.com/paritytech/parity/pull/4362)
|
||||
- Open popup without attempting inline [#4440](https://github.com/paritytech/parity/pull/4440)
|
||||
- Fixing histogram again ([#4464](https://github.com/paritytech/parity/issues/4464)) port from beta [#4467](https://github.com/paritytech/parity/pull/4467)
|
||||
- Vaults RPCs [#4366](https://github.com/paritytech/parity/pull/4366)
|
||||
- Ethkey - extended keys [#4377](https://github.com/paritytech/parity/pull/4377)
|
||||
- Use secure websocket from HTTPS clients [#4436](https://github.com/paritytech/parity/pull/4436)
|
||||
- RPC middleware: Informant & Client.keep_alive [#4384](https://github.com/paritytech/parity/pull/4384)
|
||||
- Fix eth_sign/parity_postSign [#4432](https://github.com/paritytech/parity/pull/4432)
|
||||
- Web view with web3.site support [#4313](https://github.com/paritytech/parity/pull/4313)
|
||||
- Extend Portal component with title, buttons & steps (as per Modal) [#4392](https://github.com/paritytech/parity/pull/4392)
|
||||
- Extension installation overlay [#4423](https://github.com/paritytech/parity/pull/4423)
|
||||
- Add block & timestamp conditions to Signer [#4411](https://github.com/paritytech/parity/pull/4411)
|
||||
- Transaction timestamp condition [#4419](https://github.com/paritytech/parity/pull/4419)
|
||||
- Poll for defaultAccount to update dapp & overlay subscriptions [#4417](https://github.com/paritytech/parity/pull/4417)
|
||||
- Validate dapps accounts with address book [#4407](https://github.com/paritytech/parity/pull/4407)
|
||||
- Dapps use defaultAccount instead of own selectors [#4386](https://github.com/paritytech/parity/pull/4386)
|
||||
- Fix lock and rename tracing [#4403](https://github.com/paritytech/parity/pull/4403)
|
||||
- Restarting fetch client every now and then [#4399](https://github.com/paritytech/parity/pull/4399)
|
||||
- Perform a sync between Rust and JS when generating markdown instead of in spec tests [#4408](https://github.com/paritytech/parity/pull/4408)
|
||||
- Registry dapp: make lookup use lower case [#4409](https://github.com/paritytech/parity/pull/4409)
|
||||
- Available Dapp selection alignment with Permissions (Portal) [#4374](https://github.com/paritytech/parity/pull/4374)
|
||||
- More permissive verification process [#4317](https://github.com/paritytech/parity/pull/4317)
|
||||
- Fix ParityBar account selection overflows [#4405](https://github.com/paritytech/parity/pull/4405)
|
||||
- Mac binaries signing [#4397](https://github.com/paritytech/parity/pull/4397)
|
||||
- Revert "remove [ci skip]" [#4398](https://github.com/paritytech/parity/pull/4398)
|
||||
- Registry, s/a the owner/the owner/ [#4391](https://github.com/paritytech/parity/pull/4391)
|
||||
- Fixing invalid address in docs [#4388](https://github.com/paritytech/parity/pull/4388)
|
||||
- Remove [ci skip] [#4381](https://github.com/paritytech/parity/pull/4381)
|
||||
- Fixing estimate gas in case histogram is not available [#4387](https://github.com/paritytech/parity/pull/4387)
|
||||
- Default Account selector in Signer overlay [#4375](https://github.com/paritytech/parity/pull/4375)
|
||||
- Fixing web3 in console [#4382](https://github.com/paritytech/parity/pull/4382)
|
||||
- Add parity_defaultAccount RPC (with subscription) [#4383](https://github.com/paritytech/parity/pull/4383)
|
||||
- Full JSON-RPC docs + sync tests. [#4335](https://github.com/paritytech/parity/pull/4335)
|
||||
- Expose util as Api.util [#4372](https://github.com/paritytech/parity/pull/4372)
|
||||
- Dapp Account Selection & Defaults [#4355](https://github.com/paritytech/parity/pull/4355)
|
||||
- Publish @parity/jsonrpc [#4365](https://github.com/paritytech/parity/pull/4365)
|
||||
- Fix signing [#4363](https://github.com/paritytech/parity/pull/4363)
|
||||
- Fixing embedded bar not closing in chrome extension [#4367](https://github.com/paritytech/parity/pull/4367)
|
||||
- Update AccountCard for re-use [#4350](https://github.com/paritytech/parity/pull/4350)
|
||||
- Add proper event listener to Portal [#4359](https://github.com/paritytech/parity/pull/4359)
|
||||
- Optional from field in Transaction Requests [#4332](https://github.com/paritytech/parity/pull/4332)
|
||||
- Rust 1.14 in README [ci-skip] [#4361](https://github.com/paritytech/parity/pull/4361)
|
||||
- Fix JournalDB::earliest_era on empty database [#4316](https://github.com/paritytech/parity/pull/4316)
|
||||
- Fixed race condition deadlock on fetching enode URL [#4354](https://github.com/paritytech/parity/pull/4354)
|
||||
- Allow Portal to be used as top-level modal [#4338](https://github.com/paritytech/parity/pull/4338)
|
||||
- Fix postsign [#4347](https://github.com/paritytech/parity/pull/4347)
|
||||
- Renaming signAndSendTransaction to sendTransaction [#4351](https://github.com/paritytech/parity/pull/4351)
|
||||
- Add api.util.encodeMethodCall to parity.js [#4330](https://github.com/paritytech/parity/pull/4330)
|
||||
- Initial commit for vaults [#4312](https://github.com/paritytech/parity/pull/4312)
|
||||
- Returning default account as coinbase + allow altering sender in signer [#4323](https://github.com/paritytech/parity/pull/4323)
|
||||
- Persistent tracking of dapps [#4302](https://github.com/paritytech/parity/pull/4302)
|
||||
- Exposing all RPCs over dapps port as CLI option [#4346](https://github.com/paritytech/parity/pull/4346)
|
||||
- New macOS App [#4345](https://github.com/paritytech/parity/pull/4345)
|
||||
- Display QrCode for accounts, addresses & contracts [#4329](https://github.com/paritytech/parity/pull/4329)
|
||||
- Add QrCode & Copy to ShapeShift [#4322](https://github.com/paritytech/parity/pull/4322)
|
||||
- Parity.js api.parity.chainStatus should handle { blockGap: null } [#4327](https://github.com/paritytech/parity/pull/4327)
|
||||
- DeleteAccount & LoadContract modal updates [#4320](https://github.com/paritytech/parity/pull/4320)
|
||||
- Split Tab from TabBar [#4318](https://github.com/paritytech/parity/pull/4318)
|
||||
- Contracts interface expansion [#4307](https://github.com/paritytech/parity/pull/4307)
|
||||
- HistoryStore for tracking relevant routes [#4305](https://github.com/paritytech/parity/pull/4305)
|
||||
- Split Dapp icon into ui/DappIcon (re-use) [#4308](https://github.com/paritytech/parity/pull/4308)
|
||||
- Add a Playground for the UI Components [#4301](https://github.com/paritytech/parity/pull/4301)
|
||||
- Update CreateWallet with FormattedMessage [#4298](https://github.com/paritytech/parity/pull/4298)
|
||||
- Update dates for new PRs missed [#4306](https://github.com/paritytech/parity/pull/4306)
|
||||
- EIP-98: Optional transaction state root [#4296](https://github.com/paritytech/parity/pull/4296)
|
||||
- Fix whitespace [#4299](https://github.com/paritytech/parity/pull/4299)
|
||||
- Attempt to fix console. [#4294](https://github.com/paritytech/parity/pull/4294)
|
||||
- Ui/SectionList component [#4292](https://github.com/paritytech/parity/pull/4292)
|
||||
- Stratum up [#4233](https://github.com/paritytech/parity/pull/4233)
|
||||
- Logging transaction duration [#4297](https://github.com/paritytech/parity/pull/4297)
|
||||
- Generic engine utilities [#4258](https://github.com/paritytech/parity/pull/4258)
|
||||
- JSON-RPC interfaces with documentation [#4276](https://github.com/paritytech/parity/pull/4276)
|
||||
- Dont decode seal fields [#4263](https://github.com/paritytech/parity/pull/4263)
|
||||
- Skip misbehaving test until properly fixed [#4283](https://github.com/paritytech/parity/pull/4283)
|
||||
- Additional logs for own transactions [#4278](https://github.com/paritytech/parity/pull/4278)
|
||||
- Ensure write lock isn't held when calling handlers [#4285](https://github.com/paritytech/parity/pull/4285)
|
||||
- Feature selector [#4074](https://github.com/paritytech/parity/pull/4074)
|
||||
- AccountCreate updates [#3988](https://github.com/paritytech/parity/pull/3988)
|
||||
- Extended JS interface -> Markdown generator [#4275](https://github.com/paritytech/parity/pull/4275)
|
||||
- Added 3 warpnodes for ropsten [#4289](https://github.com/paritytech/parity/pull/4289)
|
||||
- Ledger Communication JS toolkit [#4268](https://github.com/paritytech/parity/pull/4268)
|
||||
- ValidatorSet reporting [#4208](https://github.com/paritytech/parity/pull/4208)
|
||||
- Add support for api.subscribe('parity_accountsInfo') [#4273](https://github.com/paritytech/parity/pull/4273)
|
||||
- Display AccountCard name via IdentityName [#4235](https://github.com/paritytech/parity/pull/4235)
|
||||
- Dapp visibility save/load tests [#4150](https://github.com/paritytech/parity/pull/4150)
|
||||
- Fix wrong output format of peers [#4270](https://github.com/paritytech/parity/pull/4270)
|
||||
- Chain scoring [#4218](https://github.com/paritytech/parity/pull/4218)
|
||||
- Rust 1.14 for windows builds [#4269](https://github.com/paritytech/parity/pull/4269)
|
||||
- Eslint formatting updates [#4234](https://github.com/paritytech/parity/pull/4234)
|
||||
- Embeddable ParityBar [#4222](https://github.com/paritytech/parity/pull/4222)
|
||||
- Update deb-build.sh to fix libssl dependency [#4260](https://github.com/paritytech/parity/pull/4260)
|
||||
- Integration with zgp whitelist contract [#4215](https://github.com/paritytech/parity/pull/4215)
|
||||
- Adjust the location of the signer snippet [#4155](https://github.com/paritytech/parity/pull/4155)
|
||||
- Fix wrong token handling [#4254](https://github.com/paritytech/parity/pull/4254)
|
||||
- Additional building-block UI components [#4239](https://github.com/paritytech/parity/pull/4239)
|
||||
- Bump package.json to 0.3.0 (1.6 track) [#4244](https://github.com/paritytech/parity/pull/4244)
|
||||
- Disable incoming ETH notifications [#4243](https://github.com/paritytech/parity/pull/4243)
|
||||
- Memory-based pruning history size [#4114](https://github.com/paritytech/parity/pull/4114)
|
||||
- Common EngineSigner [#4189](https://github.com/paritytech/parity/pull/4189)
|
||||
- Verification: don't request a code twice [#4221](https://github.com/paritytech/parity/pull/4221)
|
||||
- S/Delete Contract/Forget Contract/ [#4237](https://github.com/paritytech/parity/pull/4237)
|
||||
- Light protocol syncing improvements [#4212](https://github.com/paritytech/parity/pull/4212)
|
||||
- LES Peer Info [#4195](https://github.com/paritytech/parity/pull/4195)
|
||||
- Don't panic on uknown git commit hash [#4231](https://github.com/paritytech/parity/pull/4231)
|
||||
- Cache registry reverses in local storage [#4182](https://github.com/paritytech/parity/pull/4182)
|
||||
- Update version numbers in README [#4223](https://github.com/paritytech/parity/pull/4223)
|
||||
- CHT calculations for full nodes [#4181](https://github.com/paritytech/parity/pull/4181)
|
||||
- Use single source of info for dapp meta (build & display) [#4217](https://github.com/paritytech/parity/pull/4217)
|
||||
- Non-secure API for DappReg [#4216](https://github.com/paritytech/parity/pull/4216)
|
||||
- Console now has admin [#4220](https://github.com/paritytech/parity/pull/4220)
|
||||
- Verification: add mainnet BadgeReg ids [#4190](https://github.com/paritytech/parity/pull/4190)
|
||||
- Fixing minimal transaction queue price [#4204](https://github.com/paritytech/parity/pull/4204)
|
||||
- Remove unnecessary Engine method [#4184](https://github.com/paritytech/parity/pull/4184)
|
||||
- Fixed --base-path on windows [#4193](https://github.com/paritytech/parity/pull/4193)
|
||||
- Fixing etherscan price parsing [#4202](https://github.com/paritytech/parity/pull/4202)
|
||||
- LES: Better timeouts + Track failed requests [#4093](https://github.com/paritytech/parity/pull/4093)
|
||||
- ESLint additional rules [#4186](https://github.com/paritytech/parity/pull/4186)
|
||||
- JsonRPC bump for IPC fix [#4200](https://github.com/paritytech/parity/pull/4200)
|
||||
- Poll for upgrades as part of global status (long) [#4197](https://github.com/paritytech/parity/pull/4197)
|
||||
- Updater fixes [#4196](https://github.com/paritytech/parity/pull/4196)
|
||||
- Prevent duplicate incoming connections [#4180](https://github.com/paritytech/parity/pull/4180)
|
||||
- Minor typo to ensure it updates only when synced. [#4188](https://github.com/paritytech/parity/pull/4188)
|
||||
- Minor refactor for clarity [#4174](https://github.com/paritytech/parity/pull/4174)
|
||||
- Secret - from hash function, also validate data [#4159](https://github.com/paritytech/parity/pull/4159)
|
||||
- Gas_limit for blocks, mined by Parity will be divisible by 37 [#4154](https://github.com/paritytech/parity/pull/4154)
|
||||
- Support HTML5-routed dapps [#4173](https://github.com/paritytech/parity/pull/4173)
|
||||
- Fix subscribeToEvents test [#4166](https://github.com/paritytech/parity/pull/4166)
|
||||
- Fix dapps not loading [#4170](https://github.com/paritytech/parity/pull/4170)
|
||||
- Fix broken token images [#4169](https://github.com/paritytech/parity/pull/4169)
|
||||
- Bumping hyper [#4167](https://github.com/paritytech/parity/pull/4167)
|
||||
- Icarus -> update, increase web timeout. [#4165](https://github.com/paritytech/parity/pull/4165)
|
||||
- Add a password strength component [#4153](https://github.com/paritytech/parity/pull/4153)
|
||||
- Stop flickering + added loader in AddressSelector [#4149](https://github.com/paritytech/parity/pull/4149)
|
||||
- On demand LES request [#4036](https://github.com/paritytech/parity/pull/4036)
|
||||
- Ropsten fork detection [#4163](https://github.com/paritytech/parity/pull/4163)
|
||||
- Pull in console dapp as builtin [#4145](https://github.com/paritytech/parity/pull/4145)
|
||||
- Optimized hash lookups [#4144](https://github.com/paritytech/parity/pull/4144)
|
||||
- UnverifiedTransaction type [#4134](https://github.com/paritytech/parity/pull/4134)
|
||||
- Verification: check if server is running [#4140](https://github.com/paritytech/parity/pull/4140)
|
||||
- Remove onSubmit of current (no auto-change on password edit) [#4151](https://github.com/paritytech/parity/pull/4151)
|
||||
- Trim spaces from InputAddress [#4126](https://github.com/paritytech/parity/pull/4126)
|
||||
- Don't pop-up notifications after network switch [#4076](https://github.com/paritytech/parity/pull/4076)
|
||||
- Use estimateGas error (as per updated implementation) [#4131](https://github.com/paritytech/parity/pull/4131)
|
||||
- Improvements and optimisations to estimate_gas [#4142](https://github.com/paritytech/parity/pull/4142)
|
||||
- New jsonrpc-core with futures and metadata support [#3859](https://github.com/paritytech/parity/pull/3859)
|
||||
- Reenable mainnet update server. [#4137](https://github.com/paritytech/parity/pull/4137)
|
||||
- Temporarily skip failing test [#4138](https://github.com/paritytech/parity/pull/4138)
|
||||
- Refactor VoteCollector [#4101](https://github.com/paritytech/parity/pull/4101)
|
||||
- Another minor estimation fix [#4133](https://github.com/paritytech/parity/pull/4133)
|
||||
- Add proper label to method decoding inputs [#4136](https://github.com/paritytech/parity/pull/4136)
|
||||
- Remove bindActionCreators({}, dispatch) (empty, unneeded) [#4135](https://github.com/paritytech/parity/pull/4135)
|
||||
- Better contract error log reporting & handling [#4128](https://github.com/paritytech/parity/pull/4128)
|
||||
- Fix broken Transfer : total account balance [#4127](https://github.com/paritytech/parity/pull/4127)
|
||||
- Test harness for lightsync [#4109](https://github.com/paritytech/parity/pull/4109)
|
||||
- Fix call/estimate_gas [#4121](https://github.com/paritytech/parity/pull/4121)
|
||||
- Fixing decoding ABI with signatures in names [#4125](https://github.com/paritytech/parity/pull/4125)
|
||||
- Get rid of unsafe code in ethkey, propagate incorrect Secret errors. [#4119](https://github.com/paritytech/parity/pull/4119)
|
||||
- Basic tests for subscribeToEvents [#4115](https://github.com/paritytech/parity/pull/4115)
|
||||
- Auto-detect hex encoded bytes in sha3 [#4108](https://github.com/paritytech/parity/pull/4108)
|
||||
- Use binary chop to estimate gas accurately [#4100](https://github.com/paritytech/parity/pull/4100)
|
||||
- V1.6 in master [#4113](https://github.com/paritytech/parity/pull/4113)
|
||||
- Ignore get_price_info test by default. [#4112](https://github.com/paritytech/parity/pull/4112)
|
||||
- Fix wrong information logging [#4106](https://github.com/paritytech/parity/pull/4106)
|
||||
- Avoid comms with not-yet-active release update server. [#4111](https://github.com/paritytech/parity/pull/4111)
|
||||
- Update Transfer logic + Better logging [#4098](https://github.com/paritytech/parity/pull/4098)
|
||||
- Fix Signer : wrong account on reload [#4104](https://github.com/paritytech/parity/pull/4104)
|
||||
- Cache registry reverses, completion in address selector [#4066](https://github.com/paritytech/parity/pull/4066)
|
||||
- Validator/authority contract [#3937](https://github.com/paritytech/parity/pull/3937)
|
||||
- No reorg limit for ancient blocks [#4099](https://github.com/paritytech/parity/pull/4099)
|
||||
- Update registration after every write [#4102](https://github.com/paritytech/parity/pull/4102)
|
||||
- Default to no auto-update. [#4092](https://github.com/paritytech/parity/pull/4092)
|
||||
- Don't remove out of date local transactions [#4094](https://github.com/paritytech/parity/pull/4094)
|
||||
@@ -1,832 +0,0 @@
|
||||
Note: Parity 1.7 reached End-of-Life on 2018-01-25 (EOL).
|
||||
|
||||
### Parity [v1.7.13](https://github.com/paritytech/parity/releases/tag/v1.7.13) (2018-01-23)
|
||||
|
||||
Parity 1.7.13 is a bug-fix release to improve stability of PoA-networks. Users on Kovan or other Aura-based networks are advised to upgrade as this release fixes an issue introduced with 1.7.12 that causes Proof-of-Authority nodes to stop synchronizing the chain.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- AuRa fix for 1.7.x series ([#7666](https://github.com/paritytech/parity/pull/7666))
|
||||
- Fix Temporarily Invalid blocks handling ([#7613](https://github.com/paritytech/parity/pull/7613))
|
||||
- Handle temporarily invalid blocks in sync.
|
||||
- Fix tests.
|
||||
- Bump rustc-serialize
|
||||
- Bump version.
|
||||
- Update .gitlab-ci.yml
|
||||
- Fix lint
|
||||
- Remove slash from gitlab ci script to fix builds
|
||||
- Start build.
|
||||
|
||||
### Parity [v1.7.12](https://github.com/paritytech/parity/releases/tag/v1.7.12) (2018-01-09)
|
||||
|
||||
Parity 1.7.12 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Fix stable builds for rustc 1.23.0 ([#7504](https://github.com/paritytech/parity/pull/7504))
|
||||
- Missing AuRa backports ([#7499](https://github.com/paritytech/parity/pull/7499)
|
||||
- Wait for future blocks in AuRa ([#7368](https://github.com/paritytech/parity/pull/7368))
|
||||
- Mark future blocks as temporarily invalid.
|
||||
- Don't check max.
|
||||
- Advance AuRa step as far as we can and prevent invalid blocks. ([#7451](https://github.com/paritytech/parity/pull/7451))
|
||||
- Advance AuRa step as far as we can.
|
||||
- Wait for future blocks.
|
||||
- Problem: AuRa's unsafeties around step duration ([#7282](https://github.com/paritytech/parity/pull/7282))
|
||||
- Fix tests.
|
||||
- Detect different node, same-key signing in aura ([#7245](https://github.com/paritytech/parity/pull/7245))
|
||||
- Detect different node, same-key signing in aura
|
||||
- Reduce scope of warning
|
||||
- Backports ([#7496](https://github.com/paritytech/parity/pull/7496))
|
||||
- Advance AuRa step as far as we can. ([#7451](https://github.com/paritytech/parity/pull/7451))
|
||||
- Advance AuRa step as far as we can.
|
||||
- Wait for future blocks.
|
||||
- Fixed panic when io is not available for export block, closes [#7486](https://github.com/paritytech/parity/issue/7486) ([#7495](https://github.com/paritytech/parity/pull/7495))
|
||||
- Update Parity Mainnet Bootnodes ([#7476](https://github.com/paritytech/parity/pull/7476))
|
||||
- Replace the Azure HDD bootnodes with the new ones :)
|
||||
- Bump version to 1.7.12
|
||||
|
||||
### Parity [v1.7.11](https://github.com/paritytech/parity/releases/tag/v1.7.11) (2017-12-29)
|
||||
|
||||
Parity 1.7.11 changes the default behavior of JSON-RPC CORS setting, and updates bootnodes for the Kovan and Foundation networks.
|
||||
|
||||
Note: The default value of `--jsonrpc-cors` option has been altered to disallow (potentially malicious) websites from accessing the low-sensitivity RPCs (viewing exposed accounts, proposing transactions for signing). Currently domains need to be whitelisted manually. To bring back previous behaviour run with `--jsonrpc-cors all` or `--jsonrpc-cors http://example.com`.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Stable Bootnodes and Warpnodes ([#7298](https://github.com/paritytech/parity/pull/7298))
|
||||
- New warp enodes ([#7287](https://github.com/paritytech/parity/pull/7287))
|
||||
- New warp enodes
|
||||
- Added one more warp enode; replaced spaces with tabs
|
||||
- Bump stable to 1.7.11
|
||||
- Update kovan boot nodes ([#7296](https://github.com/paritytech/parity/pull/7296))
|
||||
- Fix Cargo.lock
|
||||
- Updating mainnet bootnodes.
|
||||
- Update bootnodes ([#7363](https://github.com/paritytech/parity/pull/7363))
|
||||
- Updating mainnet bootnodes.
|
||||
- Add additional parity-beta bootnodes.
|
||||
- Restore old parity bootnodes and update foudation bootnodes
|
||||
- Ethstore optimizations ([#6827](https://github.com/paritytech/parity/pull/6827)) ([#6844](https://github.com/paritytech/parity/pull/6844)) ([#7347](https://github.com/paritytech/parity/pull/7347))
|
||||
- Fix default CORS. ([#7389](https://github.com/paritytech/parity/pull/7389))
|
||||
|
||||
### Parity [v1.7.10](https://github.com/paritytech/parity/releases/tag/v1.7.10) (2017-12-11)
|
||||
|
||||
Parity 1.7.10 applies fixes for Proof-of-Authority networks and schedules the Kovan-Byzantium hard-fork.
|
||||
|
||||
- The Kovan testnet will fork on block `5067000` at `Thu Dec 14 2017 05:40:03 UTC`.
|
||||
- This enables Byzantium features on Kovan.
|
||||
- This disables uncles on Kovan for stability reasons.
|
||||
- Proof-of-Authority networks are advised to set `maximumUncleCount` to 0 in a future `maximumUncleCountTransition` for stability reasons. See the [Kovan chain spec](https://github.com/paritytech/parity/blob/master/ethcore/res/ethereum/kovan.json) for an example. New PoA networks created with Parity will have this feature enabled by default.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports and HF block update ([#7243](https://github.com/paritytech/parity/pull/7243))
|
||||
- Reduce max block timestamp drift to 15 seconds ([#7240](https://github.com/paritytech/parity/pull/7240))
|
||||
- Add test for block timestamp validation within allowed drift
|
||||
- Update kovan HF block number. ([#7259](https://github.com/paritytech/parity/pull/7259))
|
||||
- [stable] Backports and Kovan HF ([#7235](https://github.com/paritytech/parity/pull/7235))
|
||||
- Escape inifinite loop in estimte_gas ([#7075](https://github.com/paritytech/parity/pull/7075))
|
||||
- Disable uncles by default ([#7006](https://github.com/paritytech/parity/pull/7006))
|
||||
- Maximum uncle count transition ([#7196](https://github.com/paritytech/parity/pull/7196))
|
||||
- Enable delayed maximum_uncle_count activation.
|
||||
- Fix tests.
|
||||
- Defer kovan HF.
|
||||
- Bump version.
|
||||
- Kovan HF.
|
||||
- Update Kovan HF block.
|
||||
- Fix compilation issues.
|
||||
- Fix aura test.
|
||||
- Add missing byzantium builtins.
|
||||
- Fix tests.
|
||||
- Bump version for installers.
|
||||
- Increase allowed time drift to 10s. ([#7238](https://github.com/paritytech/parity/pull/7238))
|
||||
|
||||
### Parity [v1.7.9](https://github.com/paritytech/parity/releases/tag/v1.7.9) (2017-11-14)
|
||||
|
||||
Parity 1.7.9 removes the ability to deploy built-in multi-signature wallets.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Bump to v1.7.9 ([#7047](https://github.com/paritytech/parity/pull/7047))
|
||||
- Disallow built-in multi-sig deploy (only watch) ([#7017](https://github.com/paritytech/parity/pull/7017))
|
||||
|
||||
### Parity [v1.7.8](https://github.com/paritytech/parity/releases/tag/v1.7.8) (2017-10-26)
|
||||
|
||||
Parity 1.7.8 fixes a critical Byzantium consensus issue. Update is highly recommended.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Refactor static context check in CREATE ([#6889](https://github.com/paritytech/parity/pull/6889))
|
||||
- Bump to v1.7.8 ([#6890](https://github.com/paritytech/parity/pull/6890))
|
||||
|
||||
## Parity [v1.7.7](https://github.com/paritytech/parity/releases/tag/v1.7.7) (2017-10-15)
|
||||
|
||||
Parity 1.7.7 fixes an issue with auto-update system. Updating is recommended, but not required for Byzantium.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Fix auto-update ([#6769](https://github.com/paritytech/parity/pull/6759))
|
||||
- Bump to v1.7.7
|
||||
- Updated ethabi to fix auto-update
|
||||
- Bumped fork block number for auto-update ([#6754](https://github.com/paritytech/parity/pull/6754))
|
||||
|
||||
## Parity [v1.7.6](https://github.com/paritytech/parity/releases/tag/v1.7.6) (2017-10-13)
|
||||
|
||||
Parity 1.7.6 includes a critical consensus-relevant fix for the Byzantium hard-fork. Please upgrade your Ethereum client before block number `4_370_000`.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Fixed modexp gas calculation overflow ([#6746](https://github.com/paritytech/parity/pull/6746))
|
||||
- Fixed modexp gas calculation overflow ([#6741](https://github.com/paritytech/parity/pull/6741))
|
||||
- Bump to v1.7.6
|
||||
|
||||
## Parity [v1.7.5](https://github.com/paritytech/parity/releases/tag/v1.7.5) (2017-10-12)
|
||||
|
||||
Parity 1.7.5 includes a critical consensus-relevant fix for the Byzantium hard-fork. Please upgrade your Ethereum client before block number `4_370_000`.
|
||||
|
||||
Parity 1.7.5 is the first stable release of the 1.7 branch. With this release the support for 1.6 releases ends. Please upgrade your stable nodes to 1.7.5.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backport stable - Fixes Badges ([#6731](https://github.com/paritytech/parity/pull/6731))
|
||||
- Fix badges not showing up ([#6730](https://github.com/paritytech/parity/pull/6730))
|
||||
- Always fetch meta data first [badges]
|
||||
- Backport ([#6726](https://github.com/paritytech/parity/pull/6726))
|
||||
- Check vouch status on appId in addition to contentHash ([#6719](https://github.com/paritytech/parity/pull/6719))
|
||||
- Check vouch status on appId in addition to contentHash
|
||||
- Simplify var expansion
|
||||
- Merge [#6725](https://github.com/paritytech/parity/pull/6725)
|
||||
- Update new token fetching
|
||||
- Working Certifications Monitoring
|
||||
- Update on Certification / Revoke
|
||||
- Fix none-fetched tokens value display
|
||||
- Fix tests
|
||||
- Add updated MethodDecoding from master
|
||||
- v1.7.5 stabilized
|
||||
- Backport ([#6724](https://github.com/paritytech/parity/pull/6724))
|
||||
- Fixed RETURNDATA out of bounds check ([#6718](https://github.com/paritytech/parity/pull/6718))
|
||||
- Prevent going offline when restoring or taking snapshot ([#6694](https://github.com/paritytech/parity/pull/6694))
|
||||
- Bump to v1.7.5
|
||||
- Trigger beta js build & release ([#6721](https://github.com/paritytech/parity/pull/6721))
|
||||
|
||||
## Parity [v1.7.4](https://github.com/paritytech/parity/releases/tag/v1.7.4) (2017-10-11)
|
||||
|
||||
Parity 1.7.4 includes a critical consensus-relevant fix for the Byzantium hard-fork. Please upgrade your Ethereum client before block number `4_370_000`.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backport ([#6715](https://github.com/paritytech/parity/pull/6715))
|
||||
- Fix estimate gas if from is not provided. ([#6714](https://github.com/paritytech/parity/pull/6714))
|
||||
- Display vouched overlay on dapps ([#6710](https://github.com/paritytech/parity/pull/6710))
|
||||
- Add vouch overlays to dapps
|
||||
- Cleanup address
|
||||
- Only run where we have a contentHash
|
||||
- Backporting ([#6712](https://github.com/paritytech/parity/pull/6712))
|
||||
- Bump to v1.7.4
|
||||
- Fixed potential exp len overflow ([#6686](https://github.com/paritytech/parity/pull/6686))
|
||||
- Fix warp sync blockers detection ([#6691](https://github.com/paritytech/parity/pull/6691))
|
||||
- Backport ([#6713](https://github.com/paritytech/parity/pull/6713))
|
||||
- Allow signer signing display of markdown ([#6707](https://github.com/paritytech/parity/pull/6707))
|
||||
- Fix default values for address input ([#6701](https://github.com/paritytech/parity/pull/6701))
|
||||
- Fix asciiToHex for characters < 0x10 ([#6702](https://github.com/paritytech/parity/pull/6702))
|
||||
|
||||
## Parity [v1.7.3](https://github.com/paritytech/parity/releases/tag/v1.7.3) (2017-10-09)
|
||||
|
||||
Parity 1.7.3 enables the Byzantium fork for Ethereum main network on Block 4_370_000 and offers a variety of bug fixes and stability improvements. Among them:
|
||||
|
||||
- Fixed network protocol version negotiation with Geth nodes v1.7.1+.
|
||||
- Fixed `RETURNDATA` size for built-ins. (Built-ins in some cases overwrite only a portion of the output memory slice.)
|
||||
- Multisig Wallet View now loads if multiple transactions happened within one block.
|
||||
- Improved stability of snapshot-sycns (warp).
|
||||
- Revised timeout and batch size constants for bigger blocks.
|
||||
- Renamed RPC receipt `statusCode` field to `status`.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backporting ([#6676](https://github.com/paritytech/parity/pull/6676))
|
||||
- Fix wallet view ([#6597](https://github.com/paritytech/parity/pull/6597))
|
||||
- Add safe fail for empty logs
|
||||
- Filter transactions
|
||||
- Add more logging
|
||||
- Fix Wallet Creation and wallet tx list
|
||||
- Remove logs
|
||||
- Prevent selecting twice same wallet owner
|
||||
- Fix tests
|
||||
- Remove unused props
|
||||
- Disallow pasting recovery phrases on first run ([#6602](https://github.com/paritytech/parity/pull/6602))
|
||||
- Fix disallowing paste of recovery phrase on first run, ref [#6581](https://github.com/paritytech/parity/issues/6581)
|
||||
- Allow the leader of CATS pasting recovery phrases.
|
||||
- Updated systemd files for linux ([#6592](https://github.com/paritytech/parity/pull/6592))
|
||||
- Previous version put $BASE directory in root directory.
|
||||
- This version clearly explains how to run as root or as specific user.
|
||||
- Additional configuration:
|
||||
- send SIGHUP for clean exit,
|
||||
- restart on fail.
|
||||
- Tested on Ubuntu 16.04.3 LTS with 4.10.0-33-generic x86_64 kernel
|
||||
- Don't expose port 80 for parity anymore ([#6633](https://github.com/paritytech/parity/pull/6633))
|
||||
- Backporting ([#6675](https://github.com/paritytech/parity/pull/6675))
|
||||
- Required validators >= num owners ([#6551](https://github.com/paritytech/parity/pull/6551))
|
||||
- Debounce sync status. ([#6572](https://github.com/paritytech/parity/pull/6572))
|
||||
- Fixed network protocol version negotiation ([#6649](https://github.com/paritytech/parity/pull/6649))
|
||||
- Renamed RPC receipt statusCode field to status ([#6650](https://github.com/paritytech/parity/pull/6650))
|
||||
- Fixed RETURNDATA size for built-ins ([#6652](https://github.com/paritytech/parity/pull/6652))
|
||||
- Byzantium fork block number ([#6661](https://github.com/paritytech/parity/pull/6661))
|
||||
- Refreshing block number on status view ([#6610](https://github.com/paritytech/parity/pull/6610))
|
||||
- Tweaked block download timeouts ([#6595](https://github.com/paritytech/parity/pull/6595))
|
||||
- Backports ([#6563](https://github.com/paritytech/parity/pull/6563))
|
||||
- Sync progress and error handling fixes ([#6560](https://github.com/paritytech/parity/pull/6560))
|
||||
- Fixed receipt serialization and RPC ([#6555](https://github.com/paritytech/parity/pull/6555))
|
||||
- Bump to v1.7.3
|
||||
|
||||
## Parity [v1.7.2](https://github.com/paritytech/parity/releases/tag/v1.7.2) (2017-09-18)
|
||||
|
||||
Parity 1.7.2 is a bug-fix release to improve performance and stability. Among others, it addresses the following:
|
||||
|
||||
- Byzantium fork support for the Ropsten and Foundation networks.
|
||||
- Added support for the ConsenSys and Gnosis multi-signature wallets.
|
||||
- Significantly increased token registry and token balance lookup performance.
|
||||
- Fixed issues with the health status indicator in the wallet.
|
||||
- Tweaked warp-sync to quickly catch up with chains fallen back more than 10,000 blocks.
|
||||
- Fixes to the Chrome extension and macOS installer upgrades.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Fix output from eth_call. ([#6538](https://github.com/paritytech/parity/pull/6538))
|
||||
- Ropsten fork ([#6532](https://github.com/paritytech/parity/pull/6532))
|
||||
- Byzantium updates ([#6529](https://github.com/paritytech/parity/pull/6529))
|
||||
- Fix modexp bug: return 0 if base=0 ([#6424](https://github.com/paritytech/parity/pull/6424))
|
||||
- Running state test using parity-evm ([#6355](https://github.com/paritytech/parity/pull/6355))
|
||||
- Initial version of state tests.
|
||||
- Refactor state to support tracing.
|
||||
- Unify TransactResult.
|
||||
- Add test.
|
||||
- Byzantium updates ([#5855](https://github.com/paritytech/parity/pull/5855))
|
||||
- EIP-211 updates
|
||||
- Benchmarks
|
||||
- Blockhash instruction gas cost updated
|
||||
- More benches
|
||||
- EIP-684
|
||||
- EIP-649
|
||||
- EIP-658
|
||||
- Updated some tests
|
||||
- Modexp fixes
|
||||
- STATICCALL fixes
|
||||
- Pairing fixes
|
||||
- More STATICALL fixes
|
||||
- Use paritytech/bn
|
||||
- Fixed REVERTing of contract creation
|
||||
- Fixed more tests
|
||||
- Fixed more tests
|
||||
- Blockchain tests
|
||||
- Enable previously broken tests
|
||||
- Transition test
|
||||
- Updated tests
|
||||
- Fixed modexp reading huge numbers
|
||||
- Enabled max_code_size test
|
||||
- Review fixes
|
||||
- Updated pairing pricing
|
||||
- Missing commas (style)
|
||||
- Update test.rs
|
||||
- Small improvements
|
||||
- Eip161abc
|
||||
- Fix extension detection ([#6452](https://github.com/paritytech/parity/pull/6452)) ([#6524](https://github.com/paritytech/parity/pull/6524))
|
||||
- Fix extension detection.
|
||||
- Fix mobx quirks.
|
||||
- Update submodule.
|
||||
- Fix detecting hardware wallets. ([#6509](https://github.com/paritytech/parity/pull/6509))
|
||||
- Allow hardware device reads without lock. ([#6517](https://github.com/paritytech/parity/pull/6517))
|
||||
- Backports [#6497](https://github.com/paritytech/parity/pull/6497)
|
||||
- Fix slow balances ([#6471](https://github.com/paritytech/parity/pull/6471))
|
||||
- Update token updates
|
||||
- Update token info fetching
|
||||
- Update logger
|
||||
- Minor fixes to updates and notifications for balances
|
||||
- Use Pubsub
|
||||
- Fix timeout.
|
||||
- Use pubsub for status.
|
||||
- Fix signer subscription.
|
||||
- Process tokens in chunks.
|
||||
- Fix tokens loaded by chunks
|
||||
- Dispatch tokens asap
|
||||
- Fix chunks processing.
|
||||
- Better filter options
|
||||
- Parallel log fetching.
|
||||
- Fix signer polling.
|
||||
- Fix initial block query.
|
||||
- Token balances updates : the right(er) way
|
||||
- Better tokens info fetching
|
||||
- Fixes in token data fetching
|
||||
- Only fetch what's needed (tokens)
|
||||
- Fix linting issues
|
||||
- Update wasm-tests.
|
||||
- Fixing balances fetching
|
||||
- Fix requests tracking in UI
|
||||
- Fix request watching
|
||||
- Update the Logger
|
||||
- PR Grumbles Fixes
|
||||
- Eth_call returns output of contract creations ([#6420](https://github.com/paritytech/parity/pull/6420))
|
||||
- Eth_call returns output of contract creations
|
||||
- Fix parameters order.
|
||||
- Save outputs for light client as well.
|
||||
- Don't accept transactions above block gas limit.
|
||||
- Expose health status over RPC ([#6274](https://github.com/paritytech/parity/pull/6274))
|
||||
- Node-health to a separate crate.
|
||||
- Initialize node_health outside of dapps.
|
||||
- Expose health over RPC.
|
||||
- Bring back 412 and fix JS.
|
||||
- Add health to workspace and tests.
|
||||
- Fix compilation without default features.
|
||||
- Fix borked merge.
|
||||
- Revert to generics to avoid virtual calls.
|
||||
- Fix node-health tests.
|
||||
- Add missing trailing comma.
|
||||
- Fixing/removing failing JS tests.
|
||||
- Do not activate genesis epoch in immediate transition validator contract ([#6349](https://github.com/paritytech/parity/pull/6349))
|
||||
- Fix memory tracing.
|
||||
- Add test to cover that.
|
||||
- Ensure balances of constructor accounts are kept
|
||||
- Test balance of spec-constructed account is kept
|
||||
- Fix warning spam. [#6369](https://github.com/paritytech/parity/pull/6369)
|
||||
- Bump to 1.7.2
|
||||
- Fix eth_call [#6366](https://github.com/paritytech/parity/pull/6366)
|
||||
- Backporting [#6352](https://github.com/paritytech/parity/pull/6352)
|
||||
- Better check the created accounts before showing Startup Wizard [#6331](https://github.com/paritytech/parity/pull/6331)
|
||||
- Tweaked snapshot params [#6344](https://github.com/paritytech/parity/pull/6344)
|
||||
- Increase default gas limit for eth_call [#6337](https://github.com/paritytech/parity/pull/6337)
|
||||
- Fix balance increase.
|
||||
- Cap gas limit for dapp-originating requests.
|
||||
- Backports [#6333](https://github.com/paritytech/parity/pull/6333)
|
||||
- Overflow check in addition
|
||||
- Unexpose methods on UI RPC. [#6295](https://github.com/paritytech/parity/pull/6295)
|
||||
- Add more descriptive error when signing/decrypting using hw wallet.
|
||||
- Format instant change proofs correctly
|
||||
- Propagate stratum submit share error upstream [#6260](https://github.com/paritytech/parity/pull/6260)
|
||||
- Updated jsonrpc [#6264](https://github.com/paritytech/parity/pull/6264)
|
||||
- Using multiple NTP servers [#6173](https://github.com/paritytech/parity/pull/6173)
|
||||
- Small improvements to time estimation.
|
||||
- Allow multiple NTP servers to be used.
|
||||
- Removing boxing.
|
||||
- Update list of servers and add reference.
|
||||
- Fix dapps CSP when UI is exposed externally [#6178](https://github.com/paritytech/parity/pull/6178)
|
||||
- Allow embeding on any page when ui-hosts=all and fix dev_ui
|
||||
- Fix cache path when using --base-path [#6212](https://github.com/paritytech/parity/pull/6212)
|
||||
- Bump to v1.7.1
|
||||
- UI backports [#6332](https://github.com/paritytech/parity/pull/6332)
|
||||
- Time should not contribue to overall status. [#6276](https://github.com/paritytech/parity/pull/6276)
|
||||
- Add warning to web browser and fix links. [#6232](https://github.com/paritytech/parity/pull/6232)
|
||||
- Extension fixes [#6284](https://github.com/paritytech/parity/pull/6284)
|
||||
- Fix token symbols in extension.
|
||||
- Allow connections from firefox extension.
|
||||
- Add support for ConsenSys multisig wallet [#6153](https://github.com/paritytech/parity/pull/6153)
|
||||
- First draft of ConsenSys wallet
|
||||
- Fix transfer store // WIP Consensys Wallet
|
||||
- Rename walletABI JSON file
|
||||
- Fix wrong daylimit in wallet modal
|
||||
- Confirm/Revoke ConsensysWallet txs
|
||||
- Change of settings for the Multisig Wallet
|
||||
- Update README for beta [#6270](https://github.com/paritytech/parity/pull/6270)
|
||||
- Fixed macOS installer upgrade [#6221](https://github.com/paritytech/parity/pull/6221)
|
||||
|
||||
## Parity [v1.7.0](https://github.com/paritytech/parity/releases/tag/v1.7.0) (2017-07-28)
|
||||
|
||||
Parity 1.7.0 is a major release introducing several important features:
|
||||
|
||||
- **Experimental [Light client](https://github.com/paritytech/parity/wiki/The-Parity-Light-Protocol-(PIP)) support**. Start Parity with `--light` to enable light mode. Please, note: The wallet UI integration for the light client is not included, yet.
|
||||
- **Experimental web wallet**. A hosted version of Parity that keeps the keys and signs transactions using your browser storage. Try it at https://wallet.parity.io or run your own with `--public-node`.
|
||||
- **WASM contract support**. Private networks can run contracts compiled into WASM bytecode. _More information and documentation to follow_.
|
||||
- **DApps and RPC server merge**. DApp and RPC are now available through a single API endpoint. DApp server related settings are deprecated.
|
||||
- **Export accounts from the wallet**. Backing up your keys can now simply be managed through the wallet interface.
|
||||
- **PoA/Kovan validator set contract**. The PoA network validator-set management via smart contract is now supported by warp and, in the near future, light sync.
|
||||
- **PubSub API**. https://github.com/paritytech/parity/wiki/JSONRPC-Parity-Pub-Sub-module
|
||||
- **Signer apps for IOS and Android**.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports [#6163](https://github.com/paritytech/parity/pull/6163)
|
||||
- Light client improvements ([#6156](https://github.com/paritytech/parity/pull/6156))
|
||||
- No seal checking
|
||||
- Import command and --no-seal-check for light client
|
||||
- Fix eth_call
|
||||
- Tweak registry dapps lookup
|
||||
- Ignore failed requests to non-server peers
|
||||
- Fix connecting to wildcard addresses. ([#6167](https://github.com/paritytech/parity/pull/6167))
|
||||
- Don't display an overlay in case the time sync check fails. ([#6164](https://github.com/paritytech/parity/pull/6164))
|
||||
- Small improvements to time estimation.
|
||||
- Temporarily disable NTP time check by default.
|
||||
- Light client fixes ([#6148](https://github.com/paritytech/parity/pull/6148)) [#6151](https://github.com/paritytech/parity/pull/6151)
|
||||
- Light client fixes
|
||||
- Fix memory-lru-cache
|
||||
- Clear pending reqs on disconnect
|
||||
- Filter tokens logs from current block, not genesis ([#6128](https://github.com/paritytech/parity/pull/6128)) [#6141](https://github.com/paritytech/parity/pull/6141)
|
||||
- Fix QR scanner returning null on confirm [#6122](https://github.com/paritytech/parity/pull/6122)
|
||||
- Check QR before lowercase ([#6119](https://github.com/paritytech/parity/pull/6119)) [#6120](https://github.com/paritytech/parity/pull/6120)
|
||||
- Remove chunk to restore from pending set only upon successful import [#6117](https://github.com/paritytech/parity/pull/6117)
|
||||
- Fixed node address detection on incoming connection [#6094](https://github.com/paritytech/parity/pull/6094)
|
||||
- Place RETURNDATA behind block number gate [#6095](https://github.com/paritytech/parity/pull/6095)
|
||||
- Update wallet library binaries [#6108](https://github.com/paritytech/parity/pull/6108)
|
||||
- Backported wallet fix [#6105](https://github.com/paritytech/parity/pull/6105)
|
||||
- Fix initialisation bug. ([#6102](https://github.com/paritytech/parity/pull/6102))
|
||||
- Update wallet library modifiers ([#6103](https://github.com/paritytech/parity/pull/6103))
|
||||
- Place RETURNDATA behind block number gate [#6095](https://github.com/paritytech/parity/pull/6095)
|
||||
- Fixed node address detection on incoming connection [#6094](https://github.com/paritytech/parity/pull/6094)
|
||||
- Bump snap version and tweak importing detection logic ([#6079](https://github.com/paritytech/parity/pull/6079)) [#6081](https://github.com/paritytech/parity/pull/6081)
|
||||
- bump last tick just before printing info and restore sync detection
|
||||
- bump kovan snapshot version
|
||||
- Fixed sync tests
|
||||
- Fixed rpc tests
|
||||
- Acquire client report under lock in informant [#6071](https://github.com/paritytech/parity/pull/6071)
|
||||
- Show busy indicator on Address forget [#6069](https://github.com/paritytech/parity/pull/6069)
|
||||
- Add CSP for worker-src ([#6059](https://github.com/paritytech/parity/pull/6059)) [#6064](https://github.com/paritytech/parity/pull/6064)
|
||||
- Specify worker-src seperately, add blob
|
||||
- Upgrade react-qr-scan to latest version
|
||||
- Set release channel to beta
|
||||
- Limit transaction queue memory & limit future queue [#6038](https://github.com/paritytech/parity/pull/6038)
|
||||
- Fix CI build issue [#6050](https://github.com/paritytech/parity/pull/6050)
|
||||
- New contract PoA sync fixes [#5991](https://github.com/paritytech/parity/pull/5991)
|
||||
- Fixed link to Multisig Contract Wallet on master [#5984](https://github.com/paritytech/parity/pull/5984)
|
||||
- Ethcore crate split part 1 [#6041](https://github.com/paritytech/parity/pull/6041)
|
||||
- Fix status icon [#6039](https://github.com/paritytech/parity/pull/6039)
|
||||
- Errors & warnings for inappropriate RPCs [#6029](https://github.com/paritytech/parity/pull/6029)
|
||||
- Add missing CSP for web3.site [#5992](https://github.com/paritytech/parity/pull/5992)
|
||||
- Remove cargo install --git from README.md [#6037](https://github.com/paritytech/parity/pull/6037)
|
||||
- Node Health warnings [#5951](https://github.com/paritytech/parity/pull/5951)
|
||||
- RPC cpu pool [#6023](https://github.com/paritytech/parity/pull/6023)
|
||||
- Use crates.io dependencies for parity-wasm [#6036](https://github.com/paritytech/parity/pull/6036)
|
||||
- Add test for loading the chain specs [#6028](https://github.com/paritytech/parity/pull/6028)
|
||||
- Whitelist APIs for generic Pub-Sub [#5840](https://github.com/paritytech/parity/pull/5840)
|
||||
- WASM contracts MVP [#5679](https://github.com/paritytech/parity/pull/5679)
|
||||
- Fix valid QR scan not advancing [#6033](https://github.com/paritytech/parity/pull/6033)
|
||||
- --reseal-on-uncle [#5940](https://github.com/paritytech/parity/pull/5940)
|
||||
- Support comments in reserved peers file ([#6004](https://github.com/paritytech/parity/pull/6004)) [#6012](https://github.com/paritytech/parity/pull/6012)
|
||||
- Add new md tnc [#5937](https://github.com/paritytech/parity/pull/5937)
|
||||
- Fix output of parity-evm in case of bad instruction [#5955](https://github.com/paritytech/parity/pull/5955)
|
||||
- Don't send notifications to unsubscribed clients of PubSub [#5960](https://github.com/paritytech/parity/pull/5960)
|
||||
- Proper light client informant and more verification of imported headers [#5897](https://github.com/paritytech/parity/pull/5897)
|
||||
- New Kovan bootnodes [#6017](https://github.com/paritytech/parity/pull/6017)
|
||||
- Use standard paths for Ethash cache [#5881](https://github.com/paritytech/parity/pull/5881)
|
||||
- Defer code hash calculation. [#5959](https://github.com/paritytech/parity/pull/5959)
|
||||
- Fix first run wizard. [#6000](https://github.com/paritytech/parity/pull/6000)
|
||||
- migration to serde 1.0 [#5996](https://github.com/paritytech/parity/pull/5996)
|
||||
- SecretStore: generating signatures [#5764](https://github.com/paritytech/parity/pull/5764)
|
||||
- bigint upgraded to version 3.0 [#5986](https://github.com/paritytech/parity/pull/5986)
|
||||
- config: don't allow dev chain with force sealing option [#5965](https://github.com/paritytech/parity/pull/5965)
|
||||
- Update lockfile for miniz-sys and gcc [#5969](https://github.com/paritytech/parity/pull/5969)
|
||||
- Clean up function naming in RPC error module [#5995](https://github.com/paritytech/parity/pull/5995)
|
||||
- Fix underflow in gas calculation [#5975](https://github.com/paritytech/parity/pull/5975)
|
||||
- PubSub for parity-js [#5830](https://github.com/paritytech/parity/pull/5830)
|
||||
- Report whether a peer was kept from `Handler::on_connect` [#5958](https://github.com/paritytech/parity/pull/5958)
|
||||
- Implement skeleton for transaction index and epoch transition proof PIP messages [#5908](https://github.com/paritytech/parity/pull/5908)
|
||||
- TransactionQueue improvements [#5917](https://github.com/paritytech/parity/pull/5917)
|
||||
- constant time HMAC comparison and clarify docs in ethkey [#5952](https://github.com/paritytech/parity/pull/5952)
|
||||
- Avoid pre-computing jump destinations [#5954](https://github.com/paritytech/parity/pull/5954)
|
||||
- Upgrade elastic array [#5949](https://github.com/paritytech/parity/pull/5949)
|
||||
- PoA: Wait for transition finality before applying [#5774](https://github.com/paritytech/parity/pull/5774)
|
||||
- Logs Pub-Sub [#5705](https://github.com/paritytech/parity/pull/5705)
|
||||
- Add the command to install the parity snap [#5945](https://github.com/paritytech/parity/pull/5945)
|
||||
- Reduce unnecessary allocations [#5944](https://github.com/paritytech/parity/pull/5944)
|
||||
- Clarify confusing messages. [#5935](https://github.com/paritytech/parity/pull/5935)
|
||||
- Content Security Policy [#5790](https://github.com/paritytech/parity/pull/5790)
|
||||
- CLI: Export error message and less verbose peer counter. [#5870](https://github.com/paritytech/parity/pull/5870)
|
||||
- network: make it more explicit about StreamToken and TimerToken [#5939](https://github.com/paritytech/parity/pull/5939)
|
||||
- sync: make it more idiomatic rust [#5938](https://github.com/paritytech/parity/pull/5938)
|
||||
- Prioritize accounts over address book [#5909](https://github.com/paritytech/parity/pull/5909)
|
||||
- Fixing failing compilation of RPC test on master. [#5916](https://github.com/paritytech/parity/pull/5916)
|
||||
- Empty local middleware, until explicitly requested [#5912](https://github.com/paritytech/parity/pull/5912)
|
||||
- Cancel propagated TX [#5899](https://github.com/paritytech/parity/pull/5899)
|
||||
- fix minor race condition in aura seal generation [#5910](https://github.com/paritytech/parity/pull/5910)
|
||||
- Docs for Pub-Sub, optional parameter for parity_subscribe [#5833](https://github.com/paritytech/parity/pull/5833)
|
||||
- Fix gas editor doubling-up on gas [#5820](https://github.com/paritytech/parity/pull/5820)
|
||||
- Information about used paths added to general output block [#5904](https://github.com/paritytech/parity/pull/5904)
|
||||
- Domain-locked web tokens. [#5894](https://github.com/paritytech/parity/pull/5894)
|
||||
- Removed panic handlers [#5895](https://github.com/paritytech/parity/pull/5895)
|
||||
- Latest changes from Rust RocksDB binding merged [#5905](https://github.com/paritytech/parity/pull/5905)
|
||||
- Adjust keyethereum/secp256 aliasses [#5903](https://github.com/paritytech/parity/pull/5903)
|
||||
- Keyethereum fs dependency [#5902](https://github.com/paritytech/parity/pull/5902)
|
||||
- Ethereum Classic Monetary Policy [#5741](https://github.com/paritytech/parity/pull/5741)
|
||||
- Initial token should allow full access. [#5873](https://github.com/paritytech/parity/pull/5873)
|
||||
- Fixed account selection for Dapps on public node [#5856](https://github.com/paritytech/parity/pull/5856)
|
||||
- blacklist bad snapshot manifest hashes upon failure [#5874](https://github.com/paritytech/parity/pull/5874)
|
||||
- Fix wrongly called timeouts [#5838](https://github.com/paritytech/parity/pull/5838)
|
||||
- ArchiveDB and other small fixes [#5867](https://github.com/paritytech/parity/pull/5867)
|
||||
- convert try!() to ? [#5866](https://github.com/paritytech/parity/pull/5866)
|
||||
- Make config file optional in systemd [#5847](https://github.com/paritytech/parity/pull/5847)
|
||||
- EIP-116 (214), [#4833](https://github.com/paritytech/parity/issues/4833) [#4851](https://github.com/paritytech/parity/pull/4851)
|
||||
- all executables are workspace members [#5865](https://github.com/paritytech/parity/pull/5865)
|
||||
- minor optimizations of the modexp builtin [#5860](https://github.com/paritytech/parity/pull/5860)
|
||||
- three small commits for HashDB and MemoryDB [#5766](https://github.com/paritytech/parity/pull/5766)
|
||||
- use rust 1.18's retain to boost the purge performance [#5801](https://github.com/paritytech/parity/pull/5801)
|
||||
- Allow IPFS server to accept POST requests [#5858](https://github.com/paritytech/parity/pull/5858)
|
||||
- Dutch i18n from [#5802](https://github.com/paritytech/parity/issues/5802) for master [#5836](https://github.com/paritytech/parity/pull/5836)
|
||||
- Typos in token deploy dapp ui [#5851](https://github.com/paritytech/parity/pull/5851)
|
||||
- A CLI flag to allow fast transaction signing when account is unlocked. [#5778](https://github.com/paritytech/parity/pull/5778)
|
||||
- Removing `additional` field from EVM instructions [#5821](https://github.com/paritytech/parity/pull/5821)
|
||||
- Don't fail on wrong log decoding [#5813](https://github.com/paritytech/parity/pull/5813)
|
||||
- Use randomized subscription ids for PubSub [#5756](https://github.com/paritytech/parity/pull/5756)
|
||||
- Fixed mem write for empty slice [#5827](https://github.com/paritytech/parity/pull/5827)
|
||||
- Fix party technologies [#5810](https://github.com/paritytech/parity/pull/5810)
|
||||
- Revert "Fixed mem write for empty slice" [#5826](https://github.com/paritytech/parity/pull/5826)
|
||||
- Fixed mem write for empty slice [#5825](https://github.com/paritytech/parity/pull/5825)
|
||||
- Fix JS tests [#5822](https://github.com/paritytech/parity/pull/5822)
|
||||
- Bump native-tls and openssl crates. [#5817](https://github.com/paritytech/parity/pull/5817)
|
||||
- Public node using WASM [#5734](https://github.com/paritytech/parity/pull/5734)
|
||||
- enforce block signer == author field in PoA [#5808](https://github.com/paritytech/parity/pull/5808)
|
||||
- Fix stack display in evmbin. [#5733](https://github.com/paritytech/parity/pull/5733)
|
||||
- Disable UI if it's not compiled in. [#5773](https://github.com/paritytech/parity/pull/5773)
|
||||
- Require phrase confirmation. [#5731](https://github.com/paritytech/parity/pull/5731)
|
||||
- Duration limit made optional for EthashParams [#5777](https://github.com/paritytech/parity/pull/5777)
|
||||
- Update Changelog for 1.6.8 [#5798](https://github.com/paritytech/parity/pull/5798)
|
||||
- Replace Ethcore comany name in T&C and some other places [#5796](https://github.com/paritytech/parity/pull/5796)
|
||||
- PubSub for IPC. [#5800](https://github.com/paritytech/parity/pull/5800)
|
||||
- Fix terminology distributed -> decentralized applications [#5797](https://github.com/paritytech/parity/pull/5797)
|
||||
- Disable compression for RLP strings [#5786](https://github.com/paritytech/parity/pull/5786)
|
||||
- update the source for the snapcraft package [#5781](https://github.com/paritytech/parity/pull/5781)
|
||||
- Fixed default UI port for mac installer [#5782](https://github.com/paritytech/parity/pull/5782)
|
||||
- Block invalid account name creation [#5784](https://github.com/paritytech/parity/pull/5784)
|
||||
- Update Cid/multihash/ring/tinykeccak [#5785](https://github.com/paritytech/parity/pull/5785)
|
||||
- use NULL_RLP, remove NULL_RLP_STATIC [#5742](https://github.com/paritytech/parity/pull/5742)
|
||||
- Blacklist empty phrase account. [#5730](https://github.com/paritytech/parity/pull/5730)
|
||||
- EIP-211 RETURNDATACOPY and RETURNDATASIZE [#5678](https://github.com/paritytech/parity/pull/5678)
|
||||
- Bump mio [#5763](https://github.com/paritytech/parity/pull/5763)
|
||||
- Fixing UI issues after UI server refactor [#5710](https://github.com/paritytech/parity/pull/5710)
|
||||
- Fix WS server expose issue. [#5728](https://github.com/paritytech/parity/pull/5728)
|
||||
- Fix local transactions without condition. [#5716](https://github.com/paritytech/parity/pull/5716)
|
||||
- Bump parity-wordlist. [#5748](https://github.com/paritytech/parity/pull/5748)
|
||||
- two small changes in evm [#5700](https://github.com/paritytech/parity/pull/5700)
|
||||
- Evmbin: JSON format printing pre-state. [#5712](https://github.com/paritytech/parity/pull/5712)
|
||||
- Recover from empty phrase in dev mode [#5698](https://github.com/paritytech/parity/pull/5698)
|
||||
- EIP-210 BLOCKHASH changes [#5505](https://github.com/paritytech/parity/pull/5505)
|
||||
- fixes typo [#5708](https://github.com/paritytech/parity/pull/5708)
|
||||
- Bump rocksdb [#5707](https://github.com/paritytech/parity/pull/5707)
|
||||
- Fixed --datadir option [#5697](https://github.com/paritytech/parity/pull/5697)
|
||||
- rpc -> weak to arc [#5688](https://github.com/paritytech/parity/pull/5688)
|
||||
- typo fix [#5699](https://github.com/paritytech/parity/pull/5699)
|
||||
- Revamping parity-evmbin [#5696](https://github.com/paritytech/parity/pull/5696)
|
||||
- Update dependencies and bigint api [#5685](https://github.com/paritytech/parity/pull/5685)
|
||||
- UI server refactoring [#5580](https://github.com/paritytech/parity/pull/5580)
|
||||
- Fix from/into electrum in ethkey [#5686](https://github.com/paritytech/parity/pull/5686)
|
||||
- Add unit tests [#5668](https://github.com/paritytech/parity/pull/5668)
|
||||
- Guanqun add unit tests [#5671](https://github.com/paritytech/parity/pull/5671)
|
||||
- Parity-PubSub as a separate API. [#5676](https://github.com/paritytech/parity/pull/5676)
|
||||
- EIP-140 REVERT opcode [#5477](https://github.com/paritytech/parity/pull/5477)
|
||||
- Update CHANGELOG for 1.6.7 [#5683](https://github.com/paritytech/parity/pull/5683)
|
||||
- Updated docs slightly. [#5674](https://github.com/paritytech/parity/pull/5674)
|
||||
- Fix build [#5684](https://github.com/paritytech/parity/pull/5684)
|
||||
- Back-references for the on-demand service [#5573](https://github.com/paritytech/parity/pull/5573)
|
||||
- Dynamically adjust PIP request costs based on gathered data [#5603](https://github.com/paritytech/parity/pull/5603)
|
||||
- use cargo workspace [#5601](https://github.com/paritytech/parity/pull/5601)
|
||||
- Latest headers Pub-Sub [#5655](https://github.com/paritytech/parity/pull/5655)
|
||||
- improved dockerfile builds [#5659](https://github.com/paritytech/parity/pull/5659)
|
||||
- Adding CLI options: port shift and unsafe expose. [#5677](https://github.com/paritytech/parity/pull/5677)
|
||||
- Report missing author in Aura [#5583](https://github.com/paritytech/parity/pull/5583)
|
||||
- typo fix [#5669](https://github.com/paritytech/parity/pull/5669)
|
||||
- Remove public middleware (temporary) [#5665](https://github.com/paritytech/parity/pull/5665)
|
||||
- Remove additional polyfill [#5663](https://github.com/paritytech/parity/pull/5663)
|
||||
- Importing accounts from files. [#5644](https://github.com/paritytech/parity/pull/5644)
|
||||
- remove the deprecated options in rustfmt.toml [#5616](https://github.com/paritytech/parity/pull/5616)
|
||||
- Update the Console dapp [#5602](https://github.com/paritytech/parity/pull/5602)
|
||||
- Create an account for chain=dev [#5612](https://github.com/paritytech/parity/pull/5612)
|
||||
- Use babel-runtime as opposed to babel-polyfill [#5662](https://github.com/paritytech/parity/pull/5662)
|
||||
- Connection dialog timestamp info [#5554](https://github.com/paritytech/parity/pull/5554)
|
||||
- use copy_from_slice instead of for loop [#5647](https://github.com/paritytech/parity/pull/5647)
|
||||
- Light friendly dapps [#5634](https://github.com/paritytech/parity/pull/5634)
|
||||
- Add Recover button to Accounts and warnings [#5645](https://github.com/paritytech/parity/pull/5645)
|
||||
- Update eth_sign docs. [#5631](https://github.com/paritytech/parity/pull/5631)
|
||||
- Proper signer Pub-Sub for pending requests. [#5594](https://github.com/paritytech/parity/pull/5594)
|
||||
- Bump bigint to 1.0.5 [#5641](https://github.com/paritytech/parity/pull/5641)
|
||||
- PoA warp implementation [#5488](https://github.com/paritytech/parity/pull/5488)
|
||||
- Improve on-demand dispatch and add support for batch requests [#5419](https://github.com/paritytech/parity/pull/5419)
|
||||
- Use default account for sending transactions [#5588](https://github.com/paritytech/parity/pull/5588)
|
||||
- Add peer management to the Status tab [#5566](https://github.com/paritytech/parity/pull/5566)
|
||||
- Add monotonic step transition [#5587](https://github.com/paritytech/parity/pull/5587)
|
||||
- Decrypting for external accounts. [#5581](https://github.com/paritytech/parity/pull/5581)
|
||||
- only enable warp sync when engine supports it [#5595](https://github.com/paritytech/parity/pull/5595)
|
||||
- fix the doc of installing rust [#5586](https://github.com/paritytech/parity/pull/5586)
|
||||
- Small fixes [#5584](https://github.com/paritytech/parity/pull/5584)
|
||||
- SecretStore: remove session on master node [#5545](https://github.com/paritytech/parity/pull/5545)
|
||||
- run-clean [#5607](https://github.com/paritytech/parity/pull/5607)
|
||||
- relicense RLP to MIT/Apache2 [#5591](https://github.com/paritytech/parity/pull/5591)
|
||||
- Fix eth_sign signature encoding. [#5597](https://github.com/paritytech/parity/pull/5597)
|
||||
- Check pending request on Node local transactions [#5564](https://github.com/paritytech/parity/pull/5564)
|
||||
- Add tooltips on ActionBar [#5562](https://github.com/paritytech/parity/pull/5562)
|
||||
- Can't deploy without compiling Contract [#5593](https://github.com/paritytech/parity/pull/5593)
|
||||
- Add a warning when node is syncing [#5565](https://github.com/paritytech/parity/pull/5565)
|
||||
- Update registry middleware [#5585](https://github.com/paritytech/parity/pull/5585)
|
||||
- Set block condition to BigNumber in MethodDecoding [#5592](https://github.com/paritytech/parity/pull/5592)
|
||||
- Load the sources immediately in Contract Dev [#5575](https://github.com/paritytech/parity/pull/5575)
|
||||
- Remove formal verification messages in Dev Contract [#5574](https://github.com/paritytech/parity/pull/5574)
|
||||
- Fix event params decoding when no names for parameters [#5567](https://github.com/paritytech/parity/pull/5567)
|
||||
- Do not convert to Dates twice [#5563](https://github.com/paritytech/parity/pull/5563)
|
||||
- Fix Multisig wallet settings [#5560](https://github.com/paritytech/parity/pull/5560)
|
||||
- Typo [#5547](https://github.com/paritytech/parity/pull/5547)
|
||||
- Generic PubSub implementation [#5456](https://github.com/paritytech/parity/pull/5456)
|
||||
- Fix CI paths. [#5570](https://github.com/paritytech/parity/pull/5570)
|
||||
- reorg into blocks before minimum history [#5558](https://github.com/paritytech/parity/pull/5558)
|
||||
- EIP-86 update [#5506](https://github.com/paritytech/parity/pull/5506)
|
||||
- Secretstore RPCs + integration [#5439](https://github.com/paritytech/parity/pull/5439)
|
||||
- Fixes Parity Bar position [#5557](https://github.com/paritytech/parity/pull/5557)
|
||||
- Fixes invalid log in BadgeReg events [#5556](https://github.com/paritytech/parity/pull/5556)
|
||||
- Fix issues in Contract Development view [#5555](https://github.com/paritytech/parity/pull/5555)
|
||||
- Added missing methods [#5542](https://github.com/paritytech/parity/pull/5542)
|
||||
- option to disable persistent txqueue [#5544](https://github.com/paritytech/parity/pull/5544)
|
||||
- Bump jsonrpc [#5552](https://github.com/paritytech/parity/pull/5552)
|
||||
- Retrieve block headers only for header-only info [#5480](https://github.com/paritytech/parity/pull/5480)
|
||||
- add snap to CI [#5519](https://github.com/paritytech/parity/pull/5519)
|
||||
- Pass additional data when reporting [#5527](https://github.com/paritytech/parity/pull/5527)
|
||||
- Calculate post-constructors state root in spec at load time [#5523](https://github.com/paritytech/parity/pull/5523)
|
||||
- Fix utf8 decoding [#5533](https://github.com/paritytech/parity/pull/5533)
|
||||
- Add CHANGELOG.md [#5513](https://github.com/paritytech/parity/pull/5513)
|
||||
- Change all occurrences of ethcore.io into parity.io [#5528](https://github.com/paritytech/parity/pull/5528)
|
||||
- Memory usage optimization [#5526](https://github.com/paritytech/parity/pull/5526)
|
||||
- Compose transaction RPC. [#5524](https://github.com/paritytech/parity/pull/5524)
|
||||
- Support external eth_sign [#5481](https://github.com/paritytech/parity/pull/5481)
|
||||
- Treat block numbers as strings, not BigNums. [#5449](https://github.com/paritytech/parity/pull/5449)
|
||||
- npm cleanups [#5512](https://github.com/paritytech/parity/pull/5512)
|
||||
- Export acc js [#4973](https://github.com/paritytech/parity/pull/4973)
|
||||
- YARN [#5395](https://github.com/paritytech/parity/pull/5395)
|
||||
- Fix linting issues [#5511](https://github.com/paritytech/parity/pull/5511)
|
||||
- Chinese Translation [#5460](https://github.com/paritytech/parity/pull/5460)
|
||||
- Fixing secretstore TODOs - part 2 [#5416](https://github.com/paritytech/parity/pull/5416)
|
||||
- fix json format of state snapshot [#5504](https://github.com/paritytech/parity/pull/5504)
|
||||
- Bump jsonrpc version [#5489](https://github.com/paritytech/parity/pull/5489)
|
||||
- Groundwork for generalized warp sync [#5454](https://github.com/paritytech/parity/pull/5454)
|
||||
- Add the packaging metadata to build the parity snap [#5496](https://github.com/paritytech/parity/pull/5496)
|
||||
- Cancel tx JS [#4958](https://github.com/paritytech/parity/pull/4958)
|
||||
- EIP-212 (bn128 curve pairing) [#5307](https://github.com/paritytech/parity/pull/5307)
|
||||
- fix panickers in tree-route [#5479](https://github.com/paritytech/parity/pull/5479)
|
||||
- Update links to etherscan.io [#5455](https://github.com/paritytech/parity/pull/5455)
|
||||
- Refresh UI on nodeKind changes, e.g. personal -> public [#5312](https://github.com/paritytech/parity/pull/5312)
|
||||
- Correct contract address for EIP-86 [#5473](https://github.com/paritytech/parity/pull/5473)
|
||||
- Force two decimals for USD conversion rate [#5471](https://github.com/paritytech/parity/pull/5471)
|
||||
- Refactoring of Tokens & Balances [#5372](https://github.com/paritytech/parity/pull/5372)
|
||||
- Background-repeat round [#5475](https://github.com/paritytech/parity/pull/5475)
|
||||
- nl i18n updated [#5461](https://github.com/paritytech/parity/pull/5461)
|
||||
- Show ETH value (even 0) if ETH transfer in transaction list [#5406](https://github.com/paritytech/parity/pull/5406)
|
||||
- Store the pending requests per network version [#5405](https://github.com/paritytech/parity/pull/5405)
|
||||
- Use in-memory database for tests [#5451](https://github.com/paritytech/parity/pull/5451)
|
||||
- WebSockets RPC server [#5425](https://github.com/paritytech/parity/pull/5425)
|
||||
- Added missing docs [#5452](https://github.com/paritytech/parity/pull/5452)
|
||||
- Tests and tweaks for public node middleware [#5417](https://github.com/paritytech/parity/pull/5417)
|
||||
- Fix removal of hash-mismatched files. [#5440](https://github.com/paritytech/parity/pull/5440)
|
||||
- parity_getBlockHeaderByNumber and LightFetch utility [#5383](https://github.com/paritytech/parity/pull/5383)
|
||||
- New state tests [#5418](https://github.com/paritytech/parity/pull/5418)
|
||||
- Fix buffer length for QR code gen. [#5447](https://github.com/paritytech/parity/pull/5447)
|
||||
- Add raw hash signing [#5423](https://github.com/paritytech/parity/pull/5423)
|
||||
- Filters and block RPCs for the light client [#5320](https://github.com/paritytech/parity/pull/5320)
|
||||
- Work around mismatch for QR checksum [#5374](https://github.com/paritytech/parity/pull/5374)
|
||||
- easy to use conversion from and to string for ethstore::Crypto [#5437](https://github.com/paritytech/parity/pull/5437)
|
||||
- Tendermint fixes [#5415](https://github.com/paritytech/parity/pull/5415)
|
||||
- Adrianbrink lightclientcache branch. [#5428](https://github.com/paritytech/parity/pull/5428)
|
||||
- Add caching to HeaderChain struct [#5403](https://github.com/paritytech/parity/pull/5403)
|
||||
- Add decryption to the UI (in the Signer) [#5422](https://github.com/paritytech/parity/pull/5422)
|
||||
- Add CIDv0 RPC [#5414](https://github.com/paritytech/parity/pull/5414)
|
||||
- Updating documentation for RPCs [#5392](https://github.com/paritytech/parity/pull/5392)
|
||||
- Fixing secretstore TODOs - part 1 [#5386](https://github.com/paritytech/parity/pull/5386)
|
||||
- Fixing disappearing content. [#5399](https://github.com/paritytech/parity/pull/5399)
|
||||
- Snapshot chunks packed by size [#5318](https://github.com/paritytech/parity/pull/5318)
|
||||
- APIs wildcards and simple arithmetic. [#5402](https://github.com/paritytech/parity/pull/5402)
|
||||
- Fixing compilation without dapps. [#5410](https://github.com/paritytech/parity/pull/5410)
|
||||
- Don't use port 8080 anymore [#5397](https://github.com/paritytech/parity/pull/5397)
|
||||
- Quick'n'dirty CLI for the light client [#5002](https://github.com/paritytech/parity/pull/5002)
|
||||
- set gas limit before proving transactions [#5401](https://github.com/paritytech/parity/pull/5401)
|
||||
- Public node: perf and fixes [#5390](https://github.com/paritytech/parity/pull/5390)
|
||||
- Straight download path in the readme [#5393](https://github.com/paritytech/parity/pull/5393)
|
||||
- On-chain ACL checker for secretstore [#5015](https://github.com/paritytech/parity/pull/5015)
|
||||
- Allow empty-encoded values from QR encoding [#5385](https://github.com/paritytech/parity/pull/5385)
|
||||
- Update npm build for new inclusions [#5381](https://github.com/paritytech/parity/pull/5381)
|
||||
- Fix for Ubuntu Dockerfile [#5356](https://github.com/paritytech/parity/pull/5356)
|
||||
- Secretstore over network [#4974](https://github.com/paritytech/parity/pull/4974)
|
||||
- Dapps and RPC server merge [#5365](https://github.com/paritytech/parity/pull/5365)
|
||||
- trigger js build release [#5379](https://github.com/paritytech/parity/pull/5379)
|
||||
- Update expanse json with fork at block 600000 [#5351](https://github.com/paritytech/parity/pull/5351)
|
||||
- Futures-based native wrappers for contract ABIs [#5341](https://github.com/paritytech/parity/pull/5341)
|
||||
- Kovan warp sync fixed [#5337](https://github.com/paritytech/parity/pull/5337)
|
||||
- Aura eip155 validation transition [#5362](https://github.com/paritytech/parity/pull/5362)
|
||||
- Shared wordlist for brain wallets [#5331](https://github.com/paritytech/parity/pull/5331)
|
||||
- Allow signing via Qr [#4881](https://github.com/paritytech/parity/pull/4881)
|
||||
- Allow entry of url or hash for DappReg meta [#5360](https://github.com/paritytech/parity/pull/5360)
|
||||
- Adjust tx overlay colours [#5353](https://github.com/paritytech/parity/pull/5353)
|
||||
- Add ability to disallow API subscriptions [#5366](https://github.com/paritytech/parity/pull/5366)
|
||||
- EIP-213 (bn128 curve operations) [#4999](https://github.com/paritytech/parity/pull/4999)
|
||||
- Fix analize output file name [#5357](https://github.com/paritytech/parity/pull/5357)
|
||||
- Add default eip155 validation [#5346](https://github.com/paritytech/parity/pull/5346)
|
||||
- Add new seed nodes for Classic chain [#5345](https://github.com/paritytech/parity/pull/5345)
|
||||
- Shared wordlist for frontend [#5336](https://github.com/paritytech/parity/pull/5336)
|
||||
- fix rpc tests [#5338](https://github.com/paritytech/parity/pull/5338)
|
||||
- Public node with accounts and signing in Frontend [#5304](https://github.com/paritytech/parity/pull/5304)
|
||||
- Rename Status/Status -> Status/NodeStatus [#5332](https://github.com/paritytech/parity/pull/5332)
|
||||
- Updating paths to repos. [#5330](https://github.com/paritytech/parity/pull/5330)
|
||||
- Separate status for canceled local transactions. [#5319](https://github.com/paritytech/parity/pull/5319)
|
||||
- Cleanup the Status View [#5317](https://github.com/paritytech/parity/pull/5317)
|
||||
- Update UI minimised requests [#5324](https://github.com/paritytech/parity/pull/5324)
|
||||
- Order signer transactions FIFO [#5321](https://github.com/paritytech/parity/pull/5321)
|
||||
- updating dependencies [#5028](https://github.com/paritytech/parity/pull/5028)
|
||||
- Minimise transactions progress [#4942](https://github.com/paritytech/parity/pull/4942)
|
||||
- Fix eth_sign showing as wallet account [#5309](https://github.com/paritytech/parity/pull/5309)
|
||||
- Ropsten revival [#5302](https://github.com/paritytech/parity/pull/5302)
|
||||
- Strict validation transitions [#4988](https://github.com/paritytech/parity/pull/4988)
|
||||
- Fix default list sorting [#5303](https://github.com/paritytech/parity/pull/5303)
|
||||
- Use unique owners for multisig wallets [#5298](https://github.com/paritytech/parity/pull/5298)
|
||||
- Copy all existing i18n strings into zh (as-is translation aid) [#5305](https://github.com/paritytech/parity/pull/5305)
|
||||
- Fix booleans in Typedinput [#5295](https://github.com/paritytech/parity/pull/5295)
|
||||
- node kind RPC [#5025](https://github.com/paritytech/parity/pull/5025)
|
||||
- Fix the use of MobX in playground [#5294](https://github.com/paritytech/parity/pull/5294)
|
||||
- Fine grained snapshot chunking [#5019](https://github.com/paritytech/parity/pull/5019)
|
||||
- Add lint:i18n to find missing & extra keys [#5290](https://github.com/paritytech/parity/pull/5290)
|
||||
- Scaffolding for zh translations, including first-round by @btceth [#5289](https://github.com/paritytech/parity/pull/5289)
|
||||
- JS package bumps [#5287](https://github.com/paritytech/parity/pull/5287)
|
||||
- Auto-extract new i18n strings (update) [#5288](https://github.com/paritytech/parity/pull/5288)
|
||||
- eip100b [#5027](https://github.com/paritytech/parity/pull/5027)
|
||||
- Set earliest era in snapshot restoration [#5021](https://github.com/paritytech/parity/pull/5021)
|
||||
- Avoid clogging up tmp when updater dir has bad permissions. [#5024](https://github.com/paritytech/parity/pull/5024)
|
||||
- Resilient warp sync [#5018](https://github.com/paritytech/parity/pull/5018)
|
||||
- Create webpack analysis files (size) [#5009](https://github.com/paritytech/parity/pull/5009)
|
||||
- Dispatch an open event on drag of Parity Bar [#4987](https://github.com/paritytech/parity/pull/4987)
|
||||
- Various installer and tray apps fixes [#4970](https://github.com/paritytech/parity/pull/4970)
|
||||
- Export account RPC [#4967](https://github.com/paritytech/parity/pull/4967)
|
||||
- Switching ValidatorSet [#4961](https://github.com/paritytech/parity/pull/4961)
|
||||
- Implement PIP messages, request builder, and handlers [#4945](https://github.com/paritytech/parity/pull/4945)
|
||||
- auto lint [#5003](https://github.com/paritytech/parity/pull/5003)
|
||||
- Fix FireFox overflows [#5000](https://github.com/paritytech/parity/pull/5000)
|
||||
- Show busy indicator, focus first field in password change [#4997](https://github.com/paritytech/parity/pull/4997)
|
||||
- Consistent store naming in the Signer components [#4996](https://github.com/paritytech/parity/pull/4996)
|
||||
- second (and last) part of rlp refactor [#4901](https://github.com/paritytech/parity/pull/4901)
|
||||
- Double click to select account creation type [#4986](https://github.com/paritytech/parity/pull/4986)
|
||||
- Fixes to the Registry dapp [#4984](https://github.com/paritytech/parity/pull/4984)
|
||||
- Extend api.util [#4979](https://github.com/paritytech/parity/pull/4979)
|
||||
- Updating JSON-RPC crates [#4934](https://github.com/paritytech/parity/pull/4934)
|
||||
- splitting part of util into smaller crates [#4956](https://github.com/paritytech/parity/pull/4956)
|
||||
- Updating syntex et al [#4983](https://github.com/paritytech/parity/pull/4983)
|
||||
- EIP198 and built-in activation [#4926](https://github.com/paritytech/parity/pull/4926)
|
||||
- Fix MethodDecoding for Arrays [#4977](https://github.com/paritytech/parity/pull/4977)
|
||||
- Try to fix WS race condition connection [#4976](https://github.com/paritytech/parity/pull/4976)
|
||||
- eth_sign where account === undefined [#4964](https://github.com/paritytech/parity/pull/4964)
|
||||
- Fix references to api outside of `parity.js` [#4981](https://github.com/paritytech/parity/pull/4981)
|
||||
- Fix Password Dialog form overflow [#4968](https://github.com/paritytech/parity/pull/4968)
|
||||
- Changing Mutex into RwLock for transaction queue [#4951](https://github.com/paritytech/parity/pull/4951)
|
||||
- Disable max seal period for external sealing [#4927](https://github.com/paritytech/parity/pull/4927)
|
||||
- Attach hardware wallets already in addressbook [#4912](https://github.com/paritytech/parity/pull/4912)
|
||||
- rlp serialization refactor [#4873](https://github.com/paritytech/parity/pull/4873)
|
||||
- Bump nanomsg [#4965](https://github.com/paritytech/parity/pull/4965)
|
||||
- Fixed multi-chunk ledger transactions on windows [#4960](https://github.com/paritytech/parity/pull/4960)
|
||||
- Fix outputs in Contract Constant Queries [#4953](https://github.com/paritytech/parity/pull/4953)
|
||||
- systemd: Start parity after network.target [#4952](https://github.com/paritytech/parity/pull/4952)
|
||||
- Remove transaction RPC [#4949](https://github.com/paritytech/parity/pull/4949)
|
||||
- Swap out ethcore.io url for parity.io [#4947](https://github.com/paritytech/parity/pull/4947)
|
||||
- Don't remove confirmed requests to early. [#4933](https://github.com/paritytech/parity/pull/4933)
|
||||
- Ensure sealing work enabled in miner once subscribers added [#4930](https://github.com/paritytech/parity/pull/4930)
|
||||
- Add z-index to small modals as well [#4923](https://github.com/paritytech/parity/pull/4923)
|
||||
- Bump nanomsg [#4946](https://github.com/paritytech/parity/pull/4946)
|
||||
- Bumping multihash and libc [#4943](https://github.com/paritytech/parity/pull/4943)
|
||||
- Edit ETH value, gas and gas price in Contract Deployment [#4919](https://github.com/paritytech/parity/pull/4919)
|
||||
- Add ability to configure Secure API [#4922](https://github.com/paritytech/parity/pull/4922)
|
||||
- Add Token image from URL [#4916](https://github.com/paritytech/parity/pull/4916)
|
||||
- Use the registry fee in Token Deployment dapp [#4915](https://github.com/paritytech/parity/pull/4915)
|
||||
- Add reseal max period [#4903](https://github.com/paritytech/parity/pull/4903)
|
||||
- Detect rust compiler version in Parity build script, closes 4742 [#4907](https://github.com/paritytech/parity/pull/4907)
|
||||
- Add Vaults logic to First Run [#4914](https://github.com/paritytech/parity/pull/4914)
|
||||
- Updated gcc and rayon crates to remove outdated num_cpus dependency [#4909](https://github.com/paritytech/parity/pull/4909)
|
||||
- Renaming evm binary to avoid conflicts. [#4899](https://github.com/paritytech/parity/pull/4899)
|
||||
- Better error handling for traces RPC [#4849](https://github.com/paritytech/parity/pull/4849)
|
||||
- Safari SectionList fix [#4895](https://github.com/paritytech/parity/pull/4895)
|
||||
- Safari Dialog scrolling fix [#4893](https://github.com/paritytech/parity/pull/4893)
|
||||
- Spelling :) [#4900](https://github.com/paritytech/parity/pull/4900)
|
||||
- Additional kovan params [#4892](https://github.com/paritytech/parity/pull/4892)
|
||||
- trigger js-precompiled build [#4898](https://github.com/paritytech/parity/pull/4898)
|
||||
- Recalculate receipt roots in close_and_lock [#4884](https://github.com/paritytech/parity/pull/4884)
|
||||
- Reload UI on network switch [#4864](https://github.com/paritytech/parity/pull/4864)
|
||||
- Update parity-ui-precompiled with branch [#4850](https://github.com/paritytech/parity/pull/4850)
|
||||
- OSX Installer is no longer experimental [#4882](https://github.com/paritytech/parity/pull/4882)
|
||||
- Chain-selection from UI [#4859](https://github.com/paritytech/parity/pull/4859)
|
||||
- removed redundant (and unused) FromJson trait [#4871](https://github.com/paritytech/parity/pull/4871)
|
||||
- fix typos and grammar [#4880](https://github.com/paritytech/parity/pull/4880)
|
||||
- Remove old experimental remote-db code [#4872](https://github.com/paritytech/parity/pull/4872)
|
||||
- removed redundant FixedHash trait, fixes [#4029](https://github.com/paritytech/parity/issues/4029) [#4866](https://github.com/paritytech/parity/pull/4866)
|
||||
- Reference JSON-RPC more changes-friendly [#4870](https://github.com/paritytech/parity/pull/4870)
|
||||
- Better handling of Solidity compliation [#4860](https://github.com/paritytech/parity/pull/4860)
|
||||
- Go through contract links in Transaction List display [#4863](https://github.com/paritytech/parity/pull/4863)
|
||||
- Fix Gas Price Selector Tooltips [#4865](https://github.com/paritytech/parity/pull/4865)
|
||||
- Fix auto-updater [#4867](https://github.com/paritytech/parity/pull/4867)
|
||||
- Make the UI work offline [#4861](https://github.com/paritytech/parity/pull/4861)
|
||||
- Subscribe to accounts info in Signer / ParityBar [#4856](https://github.com/paritytech/parity/pull/4856)
|
||||
- Don't link libsnappy explicitly [#4841](https://github.com/paritytech/parity/pull/4841)
|
||||
- Fix paste in Inputs [#4854](https://github.com/paritytech/parity/pull/4854)
|
||||
- Extract i18n from shared UI components [#4834](https://github.com/paritytech/parity/pull/4834)
|
||||
- Fix paste in Inputs [#4844](https://github.com/paritytech/parity/pull/4844)
|
||||
- Pull contract deployment title from available steps [#4848](https://github.com/paritytech/parity/pull/4848)
|
||||
- Supress USB error message [#4839](https://github.com/paritytech/parity/pull/4839)
|
||||
- Fix getTransactionCount in --geth mode [#4837](https://github.com/paritytech/parity/pull/4837)
|
||||
- CI: test coverage (for core and js) [#4832](https://github.com/paritytech/parity/pull/4832)
|
||||
- Lowering threshold for transactions above gas limit [#4831](https://github.com/paritytech/parity/pull/4831)
|
||||
- Fix TxViewer when no `to` (contract deployment) [#4847](https://github.com/paritytech/parity/pull/4847)
|
||||
- Fix method decoding [#4845](https://github.com/paritytech/parity/pull/4845)
|
||||
- Add React Hot Reload to dapps + TokenDeploy fix [#4846](https://github.com/paritytech/parity/pull/4846)
|
||||
- Dapps show multiple times in some cases [#4843](https://github.com/paritytech/parity/pull/4843)
|
||||
- Fixes to the Registry dapp [#4838](https://github.com/paritytech/parity/pull/4838)
|
||||
- Show token icons on list summary pages [#4826](https://github.com/paritytech/parity/pull/4826)
|
||||
- Calibrate step before rejection [#4800](https://github.com/paritytech/parity/pull/4800)
|
||||
- Add replay protection [#4808](https://github.com/paritytech/parity/pull/4808)
|
||||
- Better icon on windows [#4804](https://github.com/paritytech/parity/pull/4804)
|
||||
- Better logic for contract deployments detection [#4821](https://github.com/paritytech/parity/pull/4821)
|
||||
- Fix wrong default values for contract queries inputs [#4819](https://github.com/paritytech/parity/pull/4819)
|
||||
- Adjust selection colours/display [#4811](https://github.com/paritytech/parity/pull/4811)
|
||||
- Update the Wallet Library Registry key [#4817](https://github.com/paritytech/parity/pull/4817)
|
||||
- Update Wallet to new Wallet Code [#4805](https://github.com/paritytech/parity/pull/4805)
|
||||
@@ -1,578 +0,0 @@
|
||||
Note: Parity 1.8 reached End-of-Life on 2018-03-22 (EOL).
|
||||
|
||||
## Parity [v1.8.11](https://github.com/paritytech/parity/releases/tag/v1.8.11) (2018-03-01)
|
||||
|
||||
Parity 1.8.11 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Bump stable to 1.8.11 ([#8010](https://github.com/paritytech/parity/pull/8010))
|
||||
- Stable Backports ([#8008](https://github.com/paritytech/parity/pull/8008))
|
||||
- Reject too large packets in snapshot sync. ([#7977](https://github.com/paritytech/parity/pull/7977))
|
||||
- Increase max download limit to 128MB ([#7965](https://github.com/paritytech/parity/pull/7965))
|
||||
- Calculate proper keccak256/sha3 using parity. ([#7953](https://github.com/paritytech/parity/pull/7953))
|
||||
- Bump WebSockets ([#7952](https://github.com/paritytech/parity/pull/7952))
|
||||
|
||||
## Parity [v1.8.10](https://github.com/paritytech/parity/releases/tag/v1.8.10) (2018-02-20)
|
||||
|
||||
Parity 1.8.10 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Bump react-qr-reader ([#7941)](https://github.com/paritytech/parity/pull/7941))
|
||||
- Bump react-qr-reader
|
||||
- Explicit add webrtc-adapter, non-napa qrcode-generator
|
||||
- Fix feature=final ([#7914)](https://github.com/paritytech/parity/pull/7914))
|
||||
- Fix snap build stable ([#7897)](https://github.com/paritytech/parity/pull/7897))
|
||||
- Backport core PRs to stable ([#7892)](https://github.com/paritytech/parity/pull/7892))
|
||||
- Update back-references more aggressively after answering from cache ([#7578)](https://github.com/paritytech/parity/pull/7578))
|
||||
- Store updater metadata in a single place ([#7832)](https://github.com/paritytech/parity/pull/7832))
|
||||
- Flush keyfiles. Resolves [#7632](https://github.com/paritytech/parity/issues/7632) ([#7868)](https://github.com/paritytech/parity/pull/7868))
|
||||
- Fix wallet import ([#7873)](https://github.com/paritytech/parity/pull/7873))
|
||||
- Backport Master CI PRs to Stable ([#7889)](https://github.com/paritytech/parity/pull/7889))
|
||||
- Add binary identifiers and sha256sum to builds ([#7830)](https://github.com/paritytech/parity/pull/7830))
|
||||
- Fix checksums and auto-update push ([#7846)](https://github.com/paritytech/parity/pull/7846))
|
||||
- Update gitlab-build.sh ([#7855)](https://github.com/paritytech/parity/pull/7855))
|
||||
- Fix installer binary names for macos and windows ([#7881)](https://github.com/paritytech/parity/pull/7881))
|
||||
- Update gitlab-test.sh ([#7883)](https://github.com/paritytech/parity/pull/7883))
|
||||
- Fix snapcraft nightly ([#7884)](https://github.com/paritytech/parity/pull/7884))
|
||||
- Bump stable to 1.8.10
|
||||
- Make track stable
|
||||
|
||||
## Parity [v1.8.9](https://github.com/paritytech/parity/releases/tag/v1.8.9) (2018-02-02)
|
||||
|
||||
Parity 1.8.9 is a bug-fix release to improve performance and stability. It restores ERC-20 token balances and adds additional bootnodes for the Ropsten test network.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Update gitlab-build.sh
|
||||
- Backports stable ([#7779](https://github.com/paritytech/parity/pull/7779))
|
||||
- Bump stable to 1.8.9
|
||||
- Update ropsten.json ([#7776](https://github.com/paritytech/parity/pull/7776))
|
||||
- Fix tokenAddress reference ([#7777](https://github.com/paritytech/parity/pull/7777))
|
||||
- Snapcraft push stable
|
||||
|
||||
## Parity [v1.8.8](https://github.com/paritytech/parity/releases/tag/v1.8.8) (2018-02-01)
|
||||
|
||||
Parity 1.8.8 is a bug-fix release to improve performance and stability. It restores ERC-20 token balances, improves networking, fixes database corruptions on client shutdown, and fixes issues with the `--password` command-line flag. Happy syncing!
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Gitlab stable ([#7768](https://github.com/paritytech/parity/pull/7768))
|
||||
- Fix snapcraft build for stable
|
||||
- Initial support push snap packages to snapcraft.io
|
||||
- Edge-devel
|
||||
- Snapcraft push ans fix build ([#7767](https://github.com/paritytech/parity/pull/7767))
|
||||
- Fix snapcraft build for stable
|
||||
- Initial support push snap packages to snapcraft.io
|
||||
- Edge-devel
|
||||
- Remove snapcraft.yml from scripts
|
||||
- Resolve conflicts
|
||||
- Token filter balances (throttle) ([#7755](https://github.com/paritytech/parity/pull/7755))
|
||||
- Fix snapcraft build (stable) ([#7763](https://github.com/paritytech/parity/pull/7763))
|
||||
- Fix snapcraft build for stable
|
||||
- Fix snapcraft build (stable)
|
||||
- [Stable] Backports ([#7758](https://github.com/paritytech/parity/pull/7758))
|
||||
- Filter-out nodes.json ([#7716](https://github.com/paritytech/parity/pull/7716))
|
||||
- Filter-out nodes.json
|
||||
- Network: sort node table nodes by failure ratio
|
||||
- Network: fix node table tests
|
||||
- Network: fit node failure percentage into buckets of 5%
|
||||
- Network: consider number of attempts in sorting of node table
|
||||
- Network: fix node table grumbles
|
||||
- Fix client not being dropped on shutdown ([#7695](https://github.com/paritytech/parity/pull/7695))
|
||||
- Parity: wait for client to drop on shutdown
|
||||
- Parity: fix grumbles in shutdown wait
|
||||
- Parity: increase shutdown timeouts
|
||||
- Wrap --help output to 120 characters ([#7626](https://github.com/paritytech/parity/pull/7626))
|
||||
- Update Clap dependency and remove workarounds
|
||||
- WIP
|
||||
- Remove line breaks in help messages for now
|
||||
- Multiple values can only be separated by commas (closes [#7428](https://github.com/paritytech/parity/issues/7428))
|
||||
- Grumbles; refactor repeating code; add constant
|
||||
- Use a single Wrapper rather than allocate a new one for each call
|
||||
- Wrap --help to 120 characters rather than 100 characters
|
||||
- Use explicit branch name in push ([#7757](https://github.com/paritytech/parity/pull/7757))
|
||||
- Bump stable to 1.8.8 ([#7752](https://github.com/paritytech/parity/pull/7752))
|
||||
- Fix js-release in stable ([#7682](https://github.com/paritytech/parity/pull/7682))
|
||||
- Update Info.plist
|
||||
- Fix conditions in gitlab-test ([#7675](https://github.com/paritytech/parity/pull/7675))
|
||||
- Remove cargo cache
|
||||
|
||||
## Parity [v1.8.7](https://github.com/paritytech/parity/releases/tag/v1.8.7) (2018-01-24)
|
||||
|
||||
Parity 1.8.7 is the first stable release of the 1.8 channel. It includes various bug and stability fixes. Users on Kovan or other Aura-based networks are advised to upgrade as this release fixes an issue introduced with 1.8.6 and 1.7.12 that causes Proof-of-Authority nodes to stop synchronizing the chain.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Bump stable version ([#7665](https://github.com/paritytech/parity/pull/7665))
|
||||
- Bump stable to 1.8.7
|
||||
- Backports to stable ([#7661](https://github.com/paritytech/parity/pull/7661))
|
||||
- Fixed delegatecall's from/to ([#7568](https://github.com/paritytech/parity/pull/7568))
|
||||
- Fixed delegatecall's from/to, closes [#7166](https://github.com/paritytech/parity/issues/7166)
|
||||
- Added tests for delegatecall traces, [#7167](https://github.com/paritytech/parity/issues/7167)
|
||||
- Fix Temporarily Invalid blocks handling ([#7613](https://github.com/paritytech/parity/pull/7613))
|
||||
- Handle temporarily invalid blocks in sync.
|
||||
- Fix tests.
|
||||
- Improve handling of RocksDB corruption ([#7630](https://github.com/paritytech/parity/pull/7630))
|
||||
- Kvdb-rocksdb: update rust-rocksdb version
|
||||
- Kvdb-rocksdb: mark corruptions and attempt repair on db open
|
||||
- Kvdb-rocksdb: better corruption detection on open
|
||||
- Kvdb-rocksdb: add corruption_file_name const
|
||||
- Kvdb-rocksdb: rename mark_corruption to check_for_corruption
|
||||
- Add docker build for stable and cargo cache ([#7672](https://github.com/paritytech/parity/pull/7672))
|
||||
- Fix snapcraft build for stable ([#7669](https://github.com/paritytech/parity/pull/7669))
|
||||
- Update .gitlab-ci.yml ([#7599](https://github.com/paritytech/parity/pull/7599))
|
||||
- Fix cache:key
|
||||
- Make 1.8 stable ([#7532](https://github.com/paritytech/parity/pull/7532))
|
||||
- Bump 1.8 to stable
|
||||
- Make js-precompiled stable
|
||||
|
||||
## Parity [v1.8.6](https://github.com/paritytech/parity/releases/tag/v1.8.6) (2018-01-10)
|
||||
|
||||
Parity 1.8.6 fixes a critical issue with the database eventually filling up user's disks. Upgrading is highly recommended as it will significantly improve your user experience. As a bonus, this release should enable users with slower hard-disk drives to catch up with the latest block again. Also, warp-sync performance was significantly improved. Please note, that the initial database compaction after upgrading might temporarily reduce the node's performance.
|
||||
|
||||
In addition to our gas price histogram, this version now allows you to dynamically set the default gas price as percentile from the last 100 blocks (it defaults to median: `50`).
|
||||
|
||||
--gas-price-percentile=[PCT] Set PCT percentile gas price value from
|
||||
last 100 blocks as default gas price
|
||||
when sending transactions.
|
||||
|
||||
Last but not least, this release also fixes consensus issues with the Expanse chain enabling Byzantium. If you run Parity configured for Expanse, you might have to resync your chain after the upgrade.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- RocksDB fix ([#7508](https://github.com/paritytech/parity/pull/7508))
|
||||
- Kvdb: update rust-rocksdb version
|
||||
- Backports to beta ([#7434](https://github.com/paritytech/parity/pull/7434))
|
||||
- Wait for future blocks in AuRa ([#7368](https://github.com/paritytech/parity/pull/7368))
|
||||
- Mark future blocks as temporarily invalid.
|
||||
- Don't check max.
|
||||
- Fix tracing failed calls. ([#7412](https://github.com/paritytech/parity/pull/7412))
|
||||
- Problem: sending any Whisper message fails ([#7421](https://github.com/paritytech/parity/pull/7421))
|
||||
- Strict config parsing ([#7433](https://github.com/paritytech/parity/pull/7433))
|
||||
- Problem: AuRa's unsafeties around step duration ([#7282](https://github.com/paritytech/parity/pull/7282))
|
||||
- Remove expanse chain ([#7437](https://github.com/paritytech/parity/pull/7437))
|
||||
- Remove expanse from available chains
|
||||
- Remove all EXP references from old wallet
|
||||
- Fix tests
|
||||
- Remove expanse chain ([#7437](https://github.com/paritytech/parity/pull/7437))
|
||||
- Expanse Byzantium update w/ correct metropolis difficulty increment divisor ([#7463](https://github.com/paritytech/parity/pull/7463))
|
||||
- Byzantium Update for Expanse
|
||||
- Expip2 changes - update duration limit
|
||||
- Fix missing EXPIP-2 fields
|
||||
- Format numbers as hex
|
||||
- Fix compilation errors
|
||||
- Group expanse chain spec fields together
|
||||
- Set metropolisDifficultyIncrementDivisor for Expanse
|
||||
- Revert #7437
|
||||
- Add Expanse block 900_000 hash checkpoint
|
||||
- Advance AuRa step as far as we can and prevent invalid blocks. ([#7451](https://github.com/paritytech/parity/pull/7451))
|
||||
- Advance AuRa step as far as we can.
|
||||
- Wait for future blocks.
|
||||
- Fixed panic when io is not available for export block, closes [#7486](https://github.com/paritytech/parity/issues/7486) ([#7495](https://github.com/paritytech/parity/pull/7495))
|
||||
- Update Parity Mainnet Bootnodes ([#7476](https://github.com/paritytech/parity/pull/7476))
|
||||
- Replace the Azure HDD bootnodes with the new ones :)
|
||||
- Expose default gas price percentile configuration in CLI ([#7497](https://github.com/paritytech/parity/pull/7497))
|
||||
- Expose gas price percentile.
|
||||
- Fix light eth_call.
|
||||
- Fix gas_price in light client
|
||||
- Backport nonces reservations ([#7439](https://github.com/paritytech/parity/pull/7439))
|
||||
- Reserve nonces for signing ([#6834](https://github.com/paritytech/parity/pull/6834))
|
||||
- Nonce future - reserve and dispatch
|
||||
- Single thread nonce tests
|
||||
- Track status of reserved nonces.
|
||||
- Initialization of nonce reservations.
|
||||
- Prospective Signer
|
||||
- Fix cli tests.
|
||||
- Fix nonce reservation ([#7025](https://github.com/paritytech/parity/pull/7025))
|
||||
- Use nonce reservation per address
|
||||
- Create hashmap in RPC Apis
|
||||
- Garbage collect hashmap entries.
|
||||
- HashMap::retain
|
||||
- Bump beta to 1.8.6 ([#7442](https://github.com/paritytech/parity/pull/7442))
|
||||
- KVDB backports ([#7438](https://github.com/paritytech/parity/pull/7438))
|
||||
- Separated kvdb into 3 crates: kvdb, kvdb-memorydb && kvdb-rocksdb ([#6720](https://github.com/paritytech/parity/pull/6720))
|
||||
- Separated kvdb into 3 crates: kvdb, kvdb-memorydb && kvdb-rocksdb, ref [#6693](https://github.com/paritytech/parity/issues/6693)
|
||||
- Fixed kvdb-memorydb && kvdb-rocksdb authors
|
||||
- Fixed wrong kvdb import in json_tests
|
||||
- Util tests use kvdb_memorydb instead of kvdb_rocksdb, closes [#6739](https://github.com/paritytech/parity/issues/6739)
|
||||
- Renamed kvdb_memorydb::in_memory -> kvdb_memorydb::create
|
||||
- Docs
|
||||
- Removed redundant mut from kvdb-memorydb
|
||||
- Upgrade to RocksDB 5.8.8 and tune settings to reduce space amplification ([#7348](https://github.com/paritytech/parity/pull/7348))
|
||||
- kvdb-rocksdb: update to RocksDB 5.8.8
|
||||
- kvdb-rocksdb: tune RocksDB options
|
||||
- Switch to level-style compaction
|
||||
- Increase default block size (16K), and use bigger blocks for HDDs (64K)
|
||||
- Increase default file size base (64MB SSDs, 256MB HDDs)
|
||||
- Create a single block cache shared across all column families
|
||||
- Tune compaction settings using RocksDB helper functions, taking into account
|
||||
- Memory budget spread across all columns
|
||||
- Configure backgrounds jobs based on the number of CPUs
|
||||
- Set some default recommended settings
|
||||
- ethcore: remove unused config blockchain.db_cache_size
|
||||
- parity: increase default value for db_cache_size
|
||||
- kvdb-rocksdb: enable compression on all levels
|
||||
- kvdb-rocksdb: set global db_write_bufer_size
|
||||
- kvdb-rocksdb: reduce db_write_bufer_size to force earlier flushing
|
||||
- kvdb-rocksdb: use master branch for rust-rocksdb dependency
|
||||
|
||||
## Parity [v1.8.5](https://github.com/paritytech/parity/releases/tag/v1.8.5) (2017-12-29)
|
||||
|
||||
Parity 1.8.5 changes the default behavior of JSON-RPC CORS setting, detects same-key engine signers in Aura networks, and updates bootnodes for the Kovan and Foundation networks.
|
||||
|
||||
Note: The default value of `--jsonrpc-cors` option has been altered to disallow (potentially malicious) websites from accessing the low-sensitivity RPCs (viewing exposed accounts, proposing transactions for signing). Currently domains need to be whitelisted manually. To bring back previous behaviour run with `--jsonrpc-cors all` or `--jsonrpc-cors http://example.com`.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Beta Backports ([#7297](https://github.com/paritytech/parity/pull/7297))
|
||||
- New warp enodes ([#7287](https://github.com/paritytech/parity/pull/7287))
|
||||
- New warp enodes
|
||||
- Added one more warp enode; replaced spaces with tabs
|
||||
- Bump beta to 1.8.5
|
||||
- Update kovan boot nodes
|
||||
- Detect different node, same-key signing in aura ([#7245](https://github.com/paritytech/parity/pull/7245))
|
||||
- Detect different node, same-key signing in aura
|
||||
- Reduce scope of warning
|
||||
- Fix Cargo.lock
|
||||
- Updating mainnet bootnodes.
|
||||
- Update bootnodes ([#7363](https://github.com/paritytech/parity/pull/7363))
|
||||
- Updating mainnet bootnodes.
|
||||
- Add additional parity-beta bootnodes.
|
||||
- Restore old parity bootnodes and update foudation bootnodes
|
||||
- Fix default CORS. ([#7388](https://github.com/paritytech/parity/pull/7388))
|
||||
|
||||
## Parity [v1.8.4](https://github.com/paritytech/parity/releases/tag/v1.8.4) (2017-12-12)
|
||||
|
||||
Parity 1.8.4 applies fixes for Proof-of-Authority networks and schedules the Kovan-Byzantium hard-fork.
|
||||
|
||||
- The Kovan testnet will fork on block `5067000` at `Thu Dec 14 2017 05:40:03 UTC`.
|
||||
- This enables Byzantium features on Kovan.
|
||||
- This disables uncles on Kovan for stability reasons.
|
||||
- Proof-of-Authority networks are advised to set `maximumUncleCount` to 0 in a future `maximumUncleCountTransition` for stability reasons.
|
||||
- See the [Kovan chain spec](https://github.com/paritytech/parity/blob/master/ethcore/res/ethereum/kovan.json) for an example.
|
||||
- New PoA networks created with Parity will have this feature enabled by default.
|
||||
|
||||
Furthermore, this release includes the ECIP-1039 Monetary policy rounding specification for Ethereum Classic, reduces the maximum Ethash-block timestamp drift to 15 seconds, and fixes various bugs for WASM and the RPC APIs.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Beta Backports and HF block update ([#7244](https://github.com/paritytech/parity/pull/7244))
|
||||
- Reduce max block timestamp drift to 15 seconds ([#7240](https://github.com/paritytech/parity/pull/7240))
|
||||
- Add test for block timestamp validation within allowed drift
|
||||
- Update kovan HF block number.
|
||||
- Beta Kovan HF ([#7234](https://github.com/paritytech/parity/pull/7234))
|
||||
- Kovan HF.
|
||||
- Bump version.
|
||||
- Fix aura difficulty race ([#7198](https://github.com/paritytech/parity/pull/7198))
|
||||
- Fix test key
|
||||
- Extract out score calculation
|
||||
- Fix build
|
||||
- Update kovan HF block number.
|
||||
- Add missing byzantium builtins.
|
||||
- Bump installers versions.
|
||||
- Increase allowed time drift to 10s. ([#7238](https://github.com/paritytech/parity/pull/7238))
|
||||
- Beta Backports ([#7197](https://github.com/paritytech/parity/pull/7197))
|
||||
- Maximum uncle count transition ([#7196](https://github.com/paritytech/parity/pull/7196))
|
||||
- Enable delayed maximum_uncle_count activation.
|
||||
- Fix tests.
|
||||
- Defer kovan HF.
|
||||
- Disable uncles by default ([#7006](https://github.com/paritytech/parity/pull/7006))
|
||||
- Escape inifinite loop in estimte_gas ([#7075](https://github.com/paritytech/parity/pull/7075))
|
||||
- ECIP-1039: Monetary policy rounding specification ([#7067](https://github.com/paritytech/parity/pull/7067))
|
||||
- WASM Remove blockhash error ([#7121](https://github.com/paritytech/parity/pull/7121))
|
||||
- Remove blockhash error
|
||||
- Update tests.
|
||||
- WASM storage_read and storage_write don't return anything ([#7110](https://github.com/paritytech/parity/pull/7110))
|
||||
- WASM parse payload from panics ([#7097](https://github.com/paritytech/parity/pull/7097))
|
||||
- Fix no-default-features. ([#7096](https://github.com/paritytech/parity/pull/7096))
|
||||
|
||||
## Parity [v1.8.3](https://github.com/paritytech/parity/releases/tag/v1.8.3) (2017-11-15)
|
||||
|
||||
Parity 1.8.3 contains several bug-fixes and removes the ability to deploy built-in multi-signature wallets.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports to beta ([#7043](https://github.com/paritytech/parity/pull/7043))
|
||||
- pwasm-std update ([#7018](https://github.com/paritytech/parity/pull/7018))
|
||||
- Version 1.8.3
|
||||
- Make CLI arguments parsing more backwards compatible ([#7004](https://github.com/paritytech/parity/pull/7004))
|
||||
- Skip nonce check for gas estimation ([#6997](https://github.com/paritytech/parity/pull/6997))
|
||||
- Events in WASM runtime ([#6967](https://github.com/paritytech/parity/pull/6967))
|
||||
- Return decoded seal fields. ([#6932](https://github.com/paritytech/parity/pull/6932))
|
||||
- Fix serialization of status in transaction receipts. ([#6926](https://github.com/paritytech/parity/pull/6926))
|
||||
- Windows fixes ([#6921](https://github.com/paritytech/parity/pull/6921))
|
||||
- Disallow built-in multi-sig deploy (only watch) ([#7014](https://github.com/paritytech/parity/pull/7014))
|
||||
- Add hint in ActionParams for splitting code/data ([#6968](https://github.com/paritytech/parity/pull/6968))
|
||||
- Action params and embedded params handling
|
||||
- Fix name-spaces
|
||||
|
||||
## Parity [v1.8.2](https://github.com/paritytech/parity/releases/tag/v1.8.2) (2017-10-26)
|
||||
|
||||
Parity 1.8.2 fixes an important potential consensus issue and a few additional minor issues:
|
||||
|
||||
- `blockNumber` transaction field is now returned correctly in RPC calls.
|
||||
- Possible crash when `--force-sealing` option is used.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Beta Backports ([#6891](https://github.com/paritytech/parity/pull/6891))
|
||||
- Bump to v1.8.2
|
||||
- Refactor static context check in CREATE. ([#6886](https://github.com/paritytech/parity/pull/6886))
|
||||
- Refactor static context check in CREATE.
|
||||
- Fix wasm.
|
||||
- Fix serialization of non-localized transactions ([#6868](https://github.com/paritytech/parity/pull/6868))
|
||||
- Fix serialization of non-localized transactions.
|
||||
- Return proper SignedTransactions representation.
|
||||
- Allow force sealing and reseal=0 for non-dev chains. ([#6878](https://github.com/paritytech/parity/pull/6878))
|
||||
|
||||
## Parity [v1.8.1](https://github.com/paritytech/parity/releases/tag/v1.8.1) (2017-10-20)
|
||||
|
||||
Parity 1.8.1 fixes several bugs with token balances, tweaks snapshot-sync, improves the performance of nodes with huge amounts of accounts and changes the Trezor account derivation path.
|
||||
|
||||
**Important Note**: The **Trezor** account derivation path was changed in this release ([#6815](https://github.com/paritytech/parity/pull/6815)) to always use the first account (`m/44'/60'/0'/0/0` instead of `m/44'/60'/0'/0`). This way we enable compatibility with other Ethereum wallets supporting Trezor hardware-wallets. However, **action is required** before upgrading, if you have funds on your Parity Trezor wallet. If you already upgraded to 1.8.1, please downgrade to 1.8.0 first to recover the funds with the following steps:
|
||||
|
||||
1. Make sure you have 1.8.0-beta and your Trezor plugged in.
|
||||
2. Create a new standard Parity account. Make sure you have backups of the recovery phrase and don't forget the password.
|
||||
3. Move your funds from the Trezor hardware-wallet account to the freshly generated Parity account.
|
||||
4. Upgrade to 1.8.1-beta and plug in your Trezor.
|
||||
5. Move your funds from your Parity account to the new Trezor account.
|
||||
6. Keep using Parity as normal.
|
||||
|
||||
If you don't want to downgrade or move your funds off your Trezor-device, you can also use the official Trezor application or other wallets allowing to select the derivation path to access the funds.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Add ECIP1017 to Morden config ([#6845](https://github.com/paritytech/parity/pull/6845))
|
||||
- Ethstore optimizations ([#6844](https://github.com/paritytech/parity/pull/6844))
|
||||
- Bumb to v1.8.1 ([#6843](https://github.com/paritytech/parity/pull/6843))
|
||||
- Backport ([#6837](https://github.com/paritytech/parity/pull/6837))
|
||||
- Tweaked snapshot sync threshold ([#6829](https://github.com/paritytech/parity/pull/6829))
|
||||
- Change keypath derivation logic ([#6815](https://github.com/paritytech/parity/pull/6815))
|
||||
- Refresh cached tokens based on registry info & random balances ([#6824](https://github.com/paritytech/parity/pull/6824))
|
||||
- Refresh cached tokens based on registry info & random balances ([#6818](https://github.com/paritytech/parity/pull/6818))
|
||||
- Don't display errored token images
|
||||
|
||||
## Parity [v1.8.0](https://github.com/paritytech/parity/releases/tag/v1.8.0) (2017-10-15)
|
||||
|
||||
We are happy to announce our newest Parity 1.8 release. Among others, it enables the following features:
|
||||
|
||||
- Full Whisper v6 integration
|
||||
- Trezor hardware-wallet support
|
||||
- WASM contract support
|
||||
- PICOPS KYC-certified accounts and vouching for community-dapps
|
||||
- Light client compatibility for Proof-of-Authority networks
|
||||
- Transaction permissioning and permissioned p2p-connections
|
||||
- Full Byzantium-fork compatibility
|
||||
- Full Musicoin MCIP-3 UBI-fork compatibility
|
||||
|
||||
Further, users upgrading from 1.7 should acknowledge the following changes:
|
||||
|
||||
- The chain-engine was further abstracted and chain-specs need to be upgraded. [#6134](https://github.com/paritytech/parity/pull/6134) [#6591](https://github.com/paritytech/parity/pull/6591)
|
||||
- `network_id` was renamed to `chain_id` where applicable. [#6345](https://github.com/paritytech/parity/pull/6345)
|
||||
- `trace_filter` RPC method now comes with pagination. [#6312](https://github.com/paritytech/parity/pull/6312)
|
||||
- Added tracing of rewards on closing blocks. [#6194](https://github.com/paritytech/parity/pull/6194)
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Updated ethabi to fix auto-update ([#6771](https://github.com/paritytech/parity/pull/6771))
|
||||
- Fixed kovan chain validation ([#6760](https://github.com/paritytech/parity/pull/6760))
|
||||
- Fixed kovan chain validation
|
||||
- Fork detection
|
||||
- Fixed typo
|
||||
- Bumped fork block number for auto-update ([#6755](https://github.com/paritytech/parity/pull/6755))
|
||||
- CLI: Reject invalid argument values rather than ignore them ([#6747](https://github.com/paritytech/parity/pull/6747))
|
||||
- Fixed modexp gas calculation overflow ([#6745](https://github.com/paritytech/parity/pull/6745))
|
||||
- Backport beta - Fixes Badges ([#6732](https://github.com/paritytech/parity/pull/6732))
|
||||
- Fix badges not showing up ([#6730](https://github.com/paritytech/parity/pull/6730))
|
||||
- Always fetch meta data first [badges]
|
||||
- Bump to v1.8.0 in beta
|
||||
- Fix tokens and badges ([#6725](https://github.com/paritytech/parity/pull/6725))
|
||||
- Update new token fetching
|
||||
- Working Certifications Monitoring
|
||||
- Update on Certification / Revoke
|
||||
- Fix none-fetched tokens value display
|
||||
- Fix tests
|
||||
- Check vouch status on appId in addition to contentHash ([#6719](https://github.com/paritytech/parity/pull/6719))
|
||||
- Check vouch status on appId in addition to contentHash
|
||||
- Simplify var expansion
|
||||
- Prevent going offline when restoring or taking a snapshot [#6694](https://github.com/paritytech/parity/pull/6694)
|
||||
- Graceful exit when invalid CLI flags are passed (#6485) [#6711](https://github.com/paritytech/parity/pull/6711)
|
||||
- Fixed RETURNDATA out of bounds check [#6718](https://github.com/paritytech/parity/pull/6718)
|
||||
- Display vouched overlay on dapps [#6710](https://github.com/paritytech/parity/pull/6710)
|
||||
- Fix gas estimation if `from` is not provided. [#6714](https://github.com/paritytech/parity/pull/6714)
|
||||
- Emulate signer pubsub on public node [#6708](https://github.com/paritytech/parity/pull/6708)
|
||||
- Removes dependency on rustc_serialize (#5988) [#6705](https://github.com/paritytech/parity/pull/6705)
|
||||
- Fixed potential modexp exp len overflow [#6686](https://github.com/paritytech/parity/pull/6686)
|
||||
- Fix asciiToHex for characters < 0x10 [#6702](https://github.com/paritytech/parity/pull/6702)
|
||||
- Fix address input [#6701](https://github.com/paritytech/parity/pull/6701)
|
||||
- Allow signer signing display of markdown [#6707](https://github.com/paritytech/parity/pull/6707)
|
||||
- Fixed build warnings [#6664](https://github.com/paritytech/parity/pull/6664)
|
||||
- Fix warp sync blockers detection [#6691](https://github.com/paritytech/parity/pull/6691)
|
||||
- Difficulty tests [#6687](https://github.com/paritytech/parity/pull/6687)
|
||||
- Separate migrations from util [#6690](https://github.com/paritytech/parity/pull/6690)
|
||||
- Changelog for 1.7.3 [#6678](https://github.com/paritytech/parity/pull/6678)
|
||||
- WASM gas schedule [#6638](https://github.com/paritytech/parity/pull/6638)
|
||||
- Fix wallet view [#6597](https://github.com/paritytech/parity/pull/6597)
|
||||
- Byzantium fork block number [#6660](https://github.com/paritytech/parity/pull/6660)
|
||||
- Fixed RETURNDATA size for built-ins [#6652](https://github.com/paritytech/parity/pull/6652)
|
||||
- Light Client: fetch transactions/receipts by transaction hash [#6641](https://github.com/paritytech/parity/pull/6641)
|
||||
- Add Musicoin and MCIP-3 UBI hardfork. [#6621](https://github.com/paritytech/parity/pull/6621)
|
||||
- fix 1.8 backcompat: revert to manual encoding/decoding of transition proofs [#6665](https://github.com/paritytech/parity/pull/6665)
|
||||
- Tweaked block download timeouts (#6595) [#6655](https://github.com/paritytech/parity/pull/6655)
|
||||
- Renamed RPC receipt statusCode field to status [#6650](https://github.com/paritytech/parity/pull/6650)
|
||||
- SecretStore: session level timeout [#6631](https://github.com/paritytech/parity/pull/6631)
|
||||
- SecretStore: ShareRemove of 'isolated' nodes [#6630](https://github.com/paritytech/parity/pull/6630)
|
||||
- SecretStore: exclusive sessions [#6624](https://github.com/paritytech/parity/pull/6624)
|
||||
- Fixed network protocol version negotiation [#6649](https://github.com/paritytech/parity/pull/6649)
|
||||
- Updated systemd files for linux (Resolves #6592) [#6598](https://github.com/paritytech/parity/pull/6598)
|
||||
- move additional_params to machine, fixes registry on non-ethash chains [#6646](https://github.com/paritytech/parity/pull/6646)
|
||||
- Fix Token Transfer in transaction list [#6589](https://github.com/paritytech/parity/pull/6589)
|
||||
- Update jsonrpc dependencies and rewrite dapps to futures. [#6522](https://github.com/paritytech/parity/pull/6522)
|
||||
- Balance queries implemented in WASM runtime [#6639](https://github.com/paritytech/parity/pull/6639)
|
||||
- Don't expose port 80 for parity anymore [#6633](https://github.com/paritytech/parity/pull/6633)
|
||||
- WASM Runtime refactoring [#6596](https://github.com/paritytech/parity/pull/6596)
|
||||
- Fix compilation [#6625](https://github.com/paritytech/parity/pull/6625)
|
||||
- Downgrade futures to suppress warnings. [#6620](https://github.com/paritytech/parity/pull/6620)
|
||||
- Add pagination for trace_filter rpc method [#6312](https://github.com/paritytech/parity/pull/6312)
|
||||
- Disallow pasting recovery phrases on first run [#6602](https://github.com/paritytech/parity/pull/6602)
|
||||
- fix typo: Unkown => Unknown [#6559](https://github.com/paritytech/parity/pull/6559)
|
||||
- SecretStore: administrative sessions prototypes [#6605](https://github.com/paritytech/parity/pull/6605)
|
||||
- fix parity.io link 404 [#6617](https://github.com/paritytech/parity/pull/6617)
|
||||
- SecretStore: add node to existing session poc + discussion [#6480](https://github.com/paritytech/parity/pull/6480)
|
||||
- Generalize engine trait [#6591](https://github.com/paritytech/parity/pull/6591)
|
||||
- Add RPC eth_chainId for querying the current blockchain chain ID [#6329](https://github.com/paritytech/parity/pull/6329)
|
||||
- Debounce sync status. [#6572](https://github.com/paritytech/parity/pull/6572)
|
||||
- [Public Node] Disable tx scheduling and hardware wallets [#6588](https://github.com/paritytech/parity/pull/6588)
|
||||
- Use memmap for dag cache [#6193](https://github.com/paritytech/parity/pull/6193)
|
||||
- Rename Requests to Batch [#6582](https://github.com/paritytech/parity/pull/6582)
|
||||
- Use host as ws/dapps url if present. [#6566](https://github.com/paritytech/parity/pull/6566)
|
||||
- Sync progress and error handling fixes [#6560](https://github.com/paritytech/parity/pull/6560)
|
||||
- Fixed receipt serialization and RPC [#6555](https://github.com/paritytech/parity/pull/6555)
|
||||
- Fix number of confirmations for transaction [#6552](https://github.com/paritytech/parity/pull/6552)
|
||||
- Fix #6540 [#6556](https://github.com/paritytech/parity/pull/6556)
|
||||
- Fix failing hardware tests [#6553](https://github.com/paritytech/parity/pull/6553)
|
||||
- Required validators >= num owners in Wallet Creation [#6551](https://github.com/paritytech/parity/pull/6551)
|
||||
- Random cleanups / improvements to a state [#6472](https://github.com/paritytech/parity/pull/6472)
|
||||
- Changelog for 1.7.2 [#6363](https://github.com/paritytech/parity/pull/6363)
|
||||
- Ropsten fork [#6533](https://github.com/paritytech/parity/pull/6533)
|
||||
- Byzantium updates [#5855](https://github.com/paritytech/parity/pull/5855)
|
||||
- Fix extension detection [#6452](https://github.com/paritytech/parity/pull/6452)
|
||||
- Downgrade futures to supress warnings [#6521](https://github.com/paritytech/parity/pull/6521)
|
||||
- separate trie from util and make its dependencies into libs [#6478](https://github.com/paritytech/parity/pull/6478)
|
||||
- WASM sha3 test [#6512](https://github.com/paritytech/parity/pull/6512)
|
||||
- Fix broken JavaScript tests [#6498](https://github.com/paritytech/parity/pull/6498)
|
||||
- SecretStore: use random key to encrypt channel + session-level nonce [#6470](https://github.com/paritytech/parity/pull/6470)
|
||||
- Trezor Support [#6403](https://github.com/paritytech/parity/pull/6403)
|
||||
- Fix compiler warning [#6491](https://github.com/paritytech/parity/pull/6491)
|
||||
- Fix typo [#6505](https://github.com/paritytech/parity/pull/6505)
|
||||
- WASM: added math overflow test [#6474](https://github.com/paritytech/parity/pull/6474)
|
||||
- Fix slow balances [#6471](https://github.com/paritytech/parity/pull/6471)
|
||||
- WASM runtime update [#6467](https://github.com/paritytech/parity/pull/6467)
|
||||
- Compatibility with whisper v6 [#6179](https://github.com/paritytech/parity/pull/6179)
|
||||
- light-poa round 2: allow optional casting of engine client to full client [#6468](https://github.com/paritytech/parity/pull/6468)
|
||||
- Moved attributes under docs [#6475](https://github.com/paritytech/parity/pull/6475)
|
||||
- cleanup util dependencies [#6464](https://github.com/paritytech/parity/pull/6464)
|
||||
- removed redundant earlymergedb trace guards [#6463](https://github.com/paritytech/parity/pull/6463)
|
||||
- UtilError utilizes error_chain! [#6461](https://github.com/paritytech/parity/pull/6461)
|
||||
- fixed master [#6465](https://github.com/paritytech/parity/pull/6465)
|
||||
- Refactor and port CLI from Docopt to Clap (#2066) [#6356](https://github.com/paritytech/parity/pull/6356)
|
||||
- Add language selector in production [#6317](https://github.com/paritytech/parity/pull/6317)
|
||||
- eth_call returns output of contract creations [#6420](https://github.com/paritytech/parity/pull/6420)
|
||||
- Refactor: Don't reexport bigint from util [#6459](https://github.com/paritytech/parity/pull/6459)
|
||||
- Transaction permissioning [#6441](https://github.com/paritytech/parity/pull/6441)
|
||||
- Added missing SecretStore tests - signing session [#6411](https://github.com/paritytech/parity/pull/6411)
|
||||
- Light-client sync for contract-based PoA [#6370](https://github.com/paritytech/parity/pull/6370)
|
||||
- triehash is separated from util [#6428](https://github.com/paritytech/parity/pull/6428)
|
||||
- remove re-export of parking_lot in util [#6435](https://github.com/paritytech/parity/pull/6435)
|
||||
- fix modexp bug: return 0 if base is zero [#6424](https://github.com/paritytech/parity/pull/6424)
|
||||
- separate semantic_version from util [#6438](https://github.com/paritytech/parity/pull/6438)
|
||||
- move timer.rs to ethcore [#6437](https://github.com/paritytech/parity/pull/6437)
|
||||
- remove re-export of ansi_term in util [#6433](https://github.com/paritytech/parity/pull/6433)
|
||||
- Pub sub blocks [#6139](https://github.com/paritytech/parity/pull/6139)
|
||||
- replace trait Hashable with fn keccak [#6423](https://github.com/paritytech/parity/pull/6423)
|
||||
- add more hash backward compatibility test for bloom [#6425](https://github.com/paritytech/parity/pull/6425)
|
||||
- remove the redundant hasher in Bloom [#6404](https://github.com/paritytech/parity/pull/6404)
|
||||
- Remove re-export of HeapSizeOf in util (part of #6418) [#6419](https://github.com/paritytech/parity/pull/6419)
|
||||
- Rewards on closing blocks [#6194](https://github.com/paritytech/parity/pull/6194)
|
||||
- ensure balances of constructor accounts are kept [#6413](https://github.com/paritytech/parity/pull/6413)
|
||||
- removed recursion from triedbmut::lookup [#6394](https://github.com/paritytech/parity/pull/6394)
|
||||
- do not activate genesis epoch in immediate transition validator contract [#6349](https://github.com/paritytech/parity/pull/6349)
|
||||
- Use git for the snap version [#6271](https://github.com/paritytech/parity/pull/6271)
|
||||
- Permissioned p2p connections [#6359](https://github.com/paritytech/parity/pull/6359)
|
||||
- Don't accept transactions above block gas limit. [#6408](https://github.com/paritytech/parity/pull/6408)
|
||||
- Fix memory tracing. [#6399](https://github.com/paritytech/parity/pull/6399)
|
||||
- earlydb optimizations [#6393](https://github.com/paritytech/parity/pull/6393)
|
||||
- Optimized PlainHasher hashing. Trie insertions are >15 faster [#6321](https://github.com/paritytech/parity/pull/6321)
|
||||
- Trie optimizations [#6389](https://github.com/paritytech/parity/pull/6389)
|
||||
- small optimizations for triehash [#6392](https://github.com/paritytech/parity/pull/6392)
|
||||
- Bring back IPFS tests. [#6398](https://github.com/paritytech/parity/pull/6398)
|
||||
- Running state test using parity-evm [#6355](https://github.com/paritytech/parity/pull/6355)
|
||||
- Wasm math tests extended [#6354](https://github.com/paritytech/parity/pull/6354)
|
||||
- Expose health status over RPC [#6274](https://github.com/paritytech/parity/pull/6274)
|
||||
- fix bloom bitvecjournal storage allocation [#6390](https://github.com/paritytech/parity/pull/6390)
|
||||
- fixed pending block panic [#6391](https://github.com/paritytech/parity/pull/6391)
|
||||
- Infoline less opaque for UI/visibility [#6364](https://github.com/paritytech/parity/pull/6364)
|
||||
- Fix eth_call. [#6365](https://github.com/paritytech/parity/pull/6365)
|
||||
- updated bigint [#6341](https://github.com/paritytech/parity/pull/6341)
|
||||
- Optimize trie iter by avoiding redundant copying [#6347](https://github.com/paritytech/parity/pull/6347)
|
||||
- Only keep a single rocksdb debug log file [#6346](https://github.com/paritytech/parity/pull/6346)
|
||||
- Tweaked snapshot params [#6344](https://github.com/paritytech/parity/pull/6344)
|
||||
- Rename network_id to chain_id where applicable. [#6345](https://github.com/paritytech/parity/pull/6345)
|
||||
- Itertools are no longer reexported from util, optimized triedb iter [#6322](https://github.com/paritytech/parity/pull/6322)
|
||||
- Better check the created accounts before showing Startup Wizard [#6331](https://github.com/paritytech/parity/pull/6331)
|
||||
- Better error messages for invalid types in RPC [#6311](https://github.com/paritytech/parity/pull/6311)
|
||||
- fix panic in parity-evm json tracer [#6338](https://github.com/paritytech/parity/pull/6338)
|
||||
- WASM math test [#6305](https://github.com/paritytech/parity/pull/6305)
|
||||
- rlp_derive [#6125](https://github.com/paritytech/parity/pull/6125)
|
||||
- Fix --chain parsing in parity-evm. [#6314](https://github.com/paritytech/parity/pull/6314)
|
||||
- Unexpose RPC methods on :8180 [#6295](https://github.com/paritytech/parity/pull/6295)
|
||||
- Ignore errors from dappsUrl when starting UI. [#6296](https://github.com/paritytech/parity/pull/6296)
|
||||
- updated bigint with optimized mul and from_big_indian [#6323](https://github.com/paritytech/parity/pull/6323)
|
||||
- SecretStore: bunch of fixes and improvements [#6168](https://github.com/paritytech/parity/pull/6168)
|
||||
- Master requires rust 1.19 [#6308](https://github.com/paritytech/parity/pull/6308)
|
||||
- Add more descriptive error when signing/decrypting using hw wallet. [#6302](https://github.com/paritytech/parity/pull/6302)
|
||||
- Increase default gas limit for eth_call. [#6299](https://github.com/paritytech/parity/pull/6299)
|
||||
- rust-toolchain file on master [#6266](https://github.com/paritytech/parity/pull/6266)
|
||||
- Migrate wasm-tests to updated runtime [#6278](https://github.com/paritytech/parity/pull/6278)
|
||||
- Extension fixes [#6284](https://github.com/paritytech/parity/pull/6284)
|
||||
- Fix a hash displayed in tooltip when signing arbitrary data [#6283](https://github.com/paritytech/parity/pull/6283)
|
||||
- Time should not contribue to overall status. [#6276](https://github.com/paritytech/parity/pull/6276)
|
||||
- Add --to and --gas-price to evmbin [#6277](https://github.com/paritytech/parity/pull/6277)
|
||||
- Fix dapps CSP when UI is exposed externally [#6178](https://github.com/paritytech/parity/pull/6178)
|
||||
- Add warning to web browser and fix links. [#6232](https://github.com/paritytech/parity/pull/6232)
|
||||
- Update Settings/Proxy view to match entries in proxy.pac [#4771](https://github.com/paritytech/parity/pull/4771)
|
||||
- Dapp refresh [#5752](https://github.com/paritytech/parity/pull/5752)
|
||||
- Add support for ConsenSys multisig wallet [#6153](https://github.com/paritytech/parity/pull/6153)
|
||||
- updated jsonrpc [#6264](https://github.com/paritytech/parity/pull/6264)
|
||||
- SecretStore: encrypt messages using private key from key store [#6146](https://github.com/paritytech/parity/pull/6146)
|
||||
- Wasm storage read test [#6255](https://github.com/paritytech/parity/pull/6255)
|
||||
- propagate stratum submit share error upstream [#6260](https://github.com/paritytech/parity/pull/6260)
|
||||
- Using multiple NTP servers [#6173](https://github.com/paritytech/parity/pull/6173)
|
||||
- Add GitHub issue templates. [#6259](https://github.com/paritytech/parity/pull/6259)
|
||||
- format instant change proofs correctly [#6241](https://github.com/paritytech/parity/pull/6241)
|
||||
- price-info does not depend on util [#6231](https://github.com/paritytech/parity/pull/6231)
|
||||
- native-contracts crate does not depend on util any more [#6233](https://github.com/paritytech/parity/pull/6233)
|
||||
- Bump master to 1.8.0 [#6256](https://github.com/paritytech/parity/pull/6256)
|
||||
- SecretStore: do not cache ACL contract + on-chain key servers configuration [#6107](https://github.com/paritytech/parity/pull/6107)
|
||||
- Fix the README badges [#6229](https://github.com/paritytech/parity/pull/6229)
|
||||
- updated tiny-keccak to 1.3 [#6248](https://github.com/paritytech/parity/pull/6248)
|
||||
- Small grammatical error [#6244](https://github.com/paritytech/parity/pull/6244)
|
||||
- Multi-call RPC [#6195](https://github.com/paritytech/parity/pull/6195)
|
||||
- InstantSeal fix [#6223](https://github.com/paritytech/parity/pull/6223)
|
||||
- Untrusted RLP length overflow check [#6227](https://github.com/paritytech/parity/pull/6227)
|
||||
- Chainspec validation [#6197](https://github.com/paritytech/parity/pull/6197)
|
||||
- Fix cache path when using --base-path [#6212](https://github.com/paritytech/parity/pull/6212)
|
||||
- removed std reexports from util && fixed broken tests [#6187](https://github.com/paritytech/parity/pull/6187)
|
||||
- WASM MVP continued [#6132](https://github.com/paritytech/parity/pull/6132)
|
||||
- Decouple virtual machines [#6184](https://github.com/paritytech/parity/pull/6184)
|
||||
- Realloc test added [#6177](https://github.com/paritytech/parity/pull/6177)
|
||||
- Re-enable wallets, fixed forgetting accounts [#6196](https://github.com/paritytech/parity/pull/6196)
|
||||
- Move more params to the common section. [#6134](https://github.com/paritytech/parity/pull/6134)
|
||||
- Whisper js [#6161](https://github.com/paritytech/parity/pull/6161)
|
||||
- typo in uninstaller [#6185](https://github.com/paritytech/parity/pull/6185)
|
||||
- fix #6052. honor --no-color for signer command [#6100](https://github.com/paritytech/parity/pull/6100)
|
||||
- Refactor --allow-ips to handle custom ip-ranges [#6144](https://github.com/paritytech/parity/pull/6144)
|
||||
- Update Changelog for 1.6.10 and 1.7.0 [#6183](https://github.com/paritytech/parity/pull/6183)
|
||||
- Fix unsoundness in ethash's unsafe code [#6140](https://github.com/paritytech/parity/pull/6140)
|
||||
@@ -1,533 +0,0 @@
|
||||
Note: Parity 1.9 reached End-of-Life on 2018-05-09 (EOL).
|
||||
|
||||
## Parity [v1.9.7](https://github.com/paritytech/parity/releases/tag/v1.9.7) (2018-04-23)
|
||||
|
||||
Parity 1.9.7 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Update Parity stable to 1.9.7 + Backports ([#8456](https://github.com/paritytech/parity/pull/8456))
|
||||
- Update Parity stable to 1.9.7
|
||||
- Allow 32-bit pipelines to fail ([#8454](https://github.com/paritytech/parity/pull/8454))
|
||||
- Disable 32-bit targets for Gitlab
|
||||
- Rename Linux pipelines
|
||||
- Update wasmi ([#8452](https://github.com/paritytech/parity/pull/8452))
|
||||
- Revert Cargo lock update from master
|
||||
- Fix Cargo.lock
|
||||
- Backports ([#8449](https://github.com/paritytech/parity/pull/8449))
|
||||
- Use forked app_dirs crate for reverted Windows dir behavior ([#8438](https://github.com/paritytech/parity/pull/8438))
|
||||
- Remove unused app_dirs dependency in CLI
|
||||
- Use forked app_dirs crate for reverted Windows dir behavior
|
||||
- Remove Tendermint extra_info due to seal inconsistencies ([#8367](https://github.com/paritytech/parity/pull/8367))
|
||||
- Improve VM executor stack size estimation rules ([#8439](https://github.com/paritytech/parity/pull/8439))
|
||||
- Improve VM executor stack size estimation rules
|
||||
- Typo: docs add "(Debug build)" comment
|
||||
- Fix an off by one typo and set minimal stack size
|
||||
- Use saturating_sub to avoid potential overflow
|
||||
- Upgrade crossbeam to 0.3
|
||||
|
||||
## Parity [v1.9.6](https://github.com/paritytech/parity/releases/tag/v1.9.6) (2018-04-16)
|
||||
|
||||
Parity 1.9.6 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Bump app_dirs, fixes [#8315](https://github.com/paritytech/parity/issues/8315) ([#8355](https://github.com/paritytech/parity/pull/8355))
|
||||
- Fix Cargo lock
|
||||
- Backports ([#8352](https://github.com/paritytech/parity/pull/8352))
|
||||
- Update musicoin spec in line with gmc v2.6.2 ([#8242](https://github.com/paritytech/parity/pull/8242))
|
||||
- Supress TemporaryInvalid verification failures. ([#8256](https://github.com/paritytech/parity/pull/8256))
|
||||
- Include suicided accounts in state diff ([#8297](https://github.com/paritytech/parity/pull/8297))
|
||||
- Include suicided accounts in state diff
|
||||
- Shorten form match -> if let
|
||||
- Test suicide trace diff in State
|
||||
- Replace_home for password_files, reserved_peers and log_file ([#8324](https://github.com/paritytech/parity/pull/8324))
|
||||
- Replace_home for password_files, reserved_peers and log_file
|
||||
- Typo: arg_log_file is Option
|
||||
- Bump version in util/version
|
||||
- Bump stable to 1.9.6 ([#8348](https://github.com/paritytech/parity/pull/8348))
|
||||
- WASM libraries bump ([#8219](https://github.com/paritytech/parity/pull/8219))
|
||||
- Bump wasm libs ([#8171](https://github.com/paritytech/parity/pull/8171))
|
||||
- Bump wasmi version ([#8209](https://github.com/paritytech/parity/pull/8209))
|
||||
- Updated jsonrpc to include latest backports (1.9) ([#8182](https://github.com/paritytech/parity/pull/8182))
|
||||
- Updated jsonrpc to include latest backports (1.9)
|
||||
- Update dependencies.
|
||||
|
||||
## Parity [v1.9.5](https://github.com/paritytech/parity/releases/tag/v1.9.5) (2018-03-21)
|
||||
|
||||
Parity 1.9.5 is a bug-fix release to improve performance and stability. This release marks the 1.9 track _stable_.
|
||||
|
||||
We are excited to announce support for **Wasm Smart Contracts on Kovan network**. The hard-fork to activate the Wasm-VM will take place on block `6600000`.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Do a meaningful commit that does not contain the words "ci" or "skip"
|
||||
- Triggering build for stable.
|
||||
- Postpone Kovan hard fork ([#8137](https://github.com/paritytech/parity/pull/8137)) ([#8152](https://github.com/paritytech/parity/pull/8152))
|
||||
- Postpone Kovan hard fork ([#8137](https://github.com/paritytech/parity/pull/8137))
|
||||
- ethcore: postpone Kovan hard fork
|
||||
- util: update version fork metadata
|
||||
- WASM libraries bump ([#7970](https://github.com/paritytech/parity/pull/7970))
|
||||
- update wasmi, parity-wasm, wasm-utils to latest version
|
||||
- Update to new wasmi & error handling
|
||||
- also utilize new stack limiter
|
||||
- fix typo
|
||||
- replace dependency url
|
||||
- Cargo.lock update
|
||||
- Fix scripts. Force JS rebuild. ([#8144](https://github.com/paritytech/parity/pull/8144))
|
||||
- Stable Backports ([#8133](https://github.com/paritytech/parity/pull/8133))
|
||||
- updater: apply exponential backoff after download failure ([#8059](https://github.com/paritytech/parity/pull/8059))
|
||||
- updater: apply exponential backoff after download failure
|
||||
- updater: reset backoff on new release
|
||||
- Limit incoming connections. ([#8060](https://github.com/paritytech/parity/pull/8060))
|
||||
- Limit ingress connections
|
||||
- Optimized handshakes logging
|
||||
- Max code size on Kovan ([#8067](https://github.com/paritytech/parity/pull/8067))
|
||||
- Enable code size limit on kovan
|
||||
- Fix formatting.
|
||||
- add some dos protection ([#8084](https://github.com/paritytech/parity/pull/8084))
|
||||
- more dos protection ([#8104](https://github.com/paritytech/parity/pull/8104))
|
||||
- Const time comparison ([#8113](https://github.com/paritytech/parity/pull/8113))
|
||||
- Use `subtle::slices_equal` for constant time comparison.
|
||||
- Also update the existing version of subtle in `ethcrypto` from
|
||||
- 0.1 to 0.5
|
||||
- Test specifically for InvalidPassword error.
|
||||
- revert removing blooms ([#8066](https://github.com/paritytech/parity/pull/8066))
|
||||
- Revert "fix traces, removed bloomchain crate, closes [#7228](https://github.com/paritytech/parity/pull/7228), closes [#7167](https://github.com/paritytech/parity/pull/7167)"
|
||||
- Revert "fixed broken logs ([#7934](https://github.com/paritytech/parity/pull/7934))"
|
||||
- fixed broken logs
|
||||
- bring back old lock order
|
||||
- remove migration v13
|
||||
- revert CURRENT_VERSION to 12 in migration.rs
|
||||
- Fix compilation.
|
||||
- Check one step deeper if we're on release track branches
|
||||
- add missing pr
|
||||
- Fix blooms?
|
||||
- Fix tests compiilation.
|
||||
- Fix size.
|
||||
- Check one step deeper if we're on release track branches ([#8134](https://github.com/paritytech/parity/pull/8134)) ([#8140](https://github.com/paritytech/parity/pull/8140))
|
||||
- Trigger js build. ([#8121](https://github.com/paritytech/parity/pull/8121))
|
||||
- Stable backports ([#8055](https://github.com/paritytech/parity/pull/8055))
|
||||
- CI: Fix cargo cache ([#7968](https://github.com/paritytech/parity/pull/7968))
|
||||
- Fix cache
|
||||
Blocking waiting for file lock on the registry index
|
||||
- Only clean locked cargo cache on windows
|
||||
- fixed ethstore sign ([#8026](https://github.com/paritytech/parity/pull/8026))
|
||||
- fix cache & snapcraft CI build ([#8052](https://github.com/paritytech/parity/pull/8052))
|
||||
- Add MCIP-6 Byzyantium transition to Musicoin spec ([#7841](https://github.com/paritytech/parity/pull/7841))
|
||||
- Add test chain spec for musicoin byzantium testnet
|
||||
- Add MCIP-6 Byzyantium transition to Musicoin spec
|
||||
- Update mcip6_byz.json
|
||||
- ethcore: update musicoin byzantium block number
|
||||
- ethcore: update musicoin bootnodes
|
||||
- Update musicoin.json
|
||||
- More bootnodes.
|
||||
- Optimize JS build ([#8093](https://github.com/paritytech/parity/pull/8093))
|
||||
- Extract common chunks plugin.
|
||||
- Fix common CSS.
|
||||
- Fix js push for stable.
|
||||
- Remove arguments to getPlugins.
|
||||
- Stable Backports ([#8058](https://github.com/paritytech/parity/pull/8058))
|
||||
- fixed parsing ethash seals and verify_block_undordered ([#8031](https://github.com/paritytech/parity/pull/8031))
|
||||
- fix for verify_block_basic crashing on invalid transaction rlp ([#8032](https://github.com/paritytech/parity/pull/8032))
|
||||
- Make 1.9 stable ([#8023](https://github.com/paritytech/parity/pull/8023))
|
||||
- Make 1.9 stable
|
||||
- Bump stable to 1.9.5
|
||||
- Fix gitlab builds
|
||||
|
||||
## Parity [v1.9.4](https://github.com/paritytech/parity/releases/tag/v1.9.4) (2018-03-01)
|
||||
|
||||
Parity 1.9.4 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Bump beta to 1.9.4 ([#8016](https://github.com/paritytech/parity/pull/8016))
|
||||
- Beta Backports ([#8011](https://github.com/paritytech/parity/pull/8011))
|
||||
- Fix traces, removed bloomchain crate ([#7979](https://github.com/paritytech/parity/pull/7979))
|
||||
- Reject too large packets in snapshot sync. ([#7977](https://github.com/paritytech/parity/pull/7977))
|
||||
- Fixed broken logs ([#7934](https://github.com/paritytech/parity/pull/7934))
|
||||
- Increase max download limit to 128MB ([#7965](https://github.com/paritytech/parity/pull/7965))
|
||||
- Calculate proper keccak256/sha3 using parity. ([#7953](https://github.com/paritytech/parity/pull/7953))
|
||||
- Bump WebSockets ([#7952](https://github.com/paritytech/parity/pull/7952))
|
||||
- Hardware-wallet/usb-subscribe-refactor ([#7860](https://github.com/paritytech/parity/pull/7860))
|
||||
- Make block generator easier to use ([#7888](https://github.com/paritytech/parity/pull/7888))
|
||||
|
||||
## Parity [v1.9.3](https://github.com/paritytech/parity/releases/tag/v1.9.3) (2018-02-20)
|
||||
|
||||
Parity 1.9.3 is a bug-fix release to improve performance and stability.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports ([#7945](https://github.com/paritytech/parity/pull/7945))
|
||||
- ECIP 1041 - Remove Difficulty Bomb ([#7905](https://github.com/paritytech/parity/pull/7905))
|
||||
- spec: Validate required divisor fields are not 0 ([#7933](https://github.com/paritytech/parity/pull/7933))
|
||||
- Kovan WASM fork code ([#7849](https://github.com/paritytech/parity/pull/7849))
|
||||
- Gitlab Cargo Cache ([#7944](https://github.com/paritytech/parity/pull/7944))
|
||||
- Bump react-qr-reader ([#7943](https://github.com/paritytech/parity/pull/7943))
|
||||
- Update react-qr-reader
|
||||
- Explicit webrtc-adapter dependency (package-lock workaround)
|
||||
- Iframe with allow (QR, new Chrome policy)
|
||||
- Backport of [#7844](https://github.com/paritytech/parity/pull/7844) and [#7917](https://github.com/paritytech/parity/pull/7917) to beta ([#7940](https://github.com/paritytech/parity/pull/7940))
|
||||
- Randomize the peer we dispatch to
|
||||
- Fix a division by zero in light client RPC handler
|
||||
- Wallet allowJsEval: true ([#7913](https://github.com/paritytech/parity/pull/7913))
|
||||
- Wallet allowJsEval: true
|
||||
- Fix unsafe wallet.
|
||||
- Enable unsafe-eval for all dapps.
|
||||
- Fix CSP for dapps that require eval. ([#7867](https://github.com/paritytech/parity/pull/7867)) ([#7903](https://github.com/paritytech/parity/pull/7903))
|
||||
- Add allowJsEval to manifest.
|
||||
- Enable 'unsafe-eval' if requested in manifest.
|
||||
- Fix snap build beta ([#7895](https://github.com/paritytech/parity/pull/7895))
|
||||
- Fix snapcraft grade to stable ([#7894](https://github.com/paritytech/parity/pull/7894))
|
||||
- Backport Master CI PRs to Beta ([#7890](https://github.com/paritytech/parity/pull/7890))
|
||||
- Add binary identifiers and sha256sum to builds ([#7830](https://github.com/paritytech/parity/pull/7830))
|
||||
- Fix checksums and auto-update push ([#7846](https://github.com/paritytech/parity/pull/7846))
|
||||
- Update gitlab-build.sh ([#7855](https://github.com/paritytech/parity/pull/7855))
|
||||
- Fix installer binary names for macos and windows ([#7881](https://github.com/paritytech/parity/pull/7881))
|
||||
- Update gitlab-test.sh ([#7883](https://github.com/paritytech/parity/pull/7883))
|
||||
- Fix snapcraft nightly ([#7884](https://github.com/paritytech/parity/pull/7884))
|
||||
- Backport Core PRs to beta ([#7891](https://github.com/paritytech/parity/pull/7891))
|
||||
- Update back-references more aggressively after answering from cache ([#7578](https://github.com/paritytech/parity/pull/7578))
|
||||
- Updated WASM Runtime & new interpreter (wasmi) ([#7796](https://github.com/paritytech/parity/pull/7796))
|
||||
- Adjust storage update evm-style ([#7812](https://github.com/paritytech/parity/pull/7812))
|
||||
- Add new EF ropstens nodes ([#7824](https://github.com/paritytech/parity/pull/7824))
|
||||
- Store updater metadata in a single place ([#7832](https://github.com/paritytech/parity/pull/7832))
|
||||
- WASM: Disable internal memory ([#7842](https://github.com/paritytech/parity/pull/7842))
|
||||
- Add a timeout for light client sync requests ([#7848](https://github.com/paritytech/parity/pull/7848))
|
||||
- Flush keyfiles. Resolves [#7632](https://github.com/paritytech/parity/issues/7632) ([#7868](https://github.com/paritytech/parity/pull/7868))
|
||||
- Fix wallet import ([#7873](https://github.com/paritytech/parity/pull/7873))
|
||||
|
||||
## Parity [v1.9.2](https://github.com/paritytech/parity/releases/tag/v1.9.2) (2018-02-02)
|
||||
|
||||
Parity 1.9.2 is a bug-fix release to improve performance and stability. It adds additional bootnodes for the Ropsten test network.
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Backports beta ([#7780](https://github.com/paritytech/parity/pull/7780))
|
||||
- Bump beta to 1.9.2
|
||||
- Update ropsten.json ([#7776](https://github.com/paritytech/parity/pull/7776))
|
||||
- Snapcraft push beta
|
||||
|
||||
## Parity [v1.9.1](https://github.com/paritytech/parity/releases/tag/v1.9.1) (2018-02-01)
|
||||
|
||||
Parity 1.9.1 is a bug-fix release to improve performance and stability. It restores ERC-20 token balances, improves networking, fixes database corruptions on client shutdown, and fixes issues with the `--password` command-line flag. Happy syncing, fellow Ethereans!
|
||||
|
||||
In addition, this stabilizes Kovan and other Proof-of-Authority networks. If you run a network with AuRa engine, updating is highly encouraged!
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Beta Backports ([#7756](https://github.com/paritytech/parity/pull/7756))
|
||||
- Filter-out nodes.json ([#7716](https://github.com/paritytech/parity/pull/7716))
|
||||
- Filter-out nodes.json
|
||||
- network: sort node table nodes by failure ratio
|
||||
- network: fix node table tests
|
||||
- network: fit node failure percentage into buckets of 5%
|
||||
- network: consider number of attempts in sorting of node table
|
||||
- network: fix node table grumbles
|
||||
- Fix client not being dropped on shutdown ([#7695](https://github.com/paritytech/parity/pull/7695))
|
||||
- parity: wait for client to drop on shutdown
|
||||
- parity: fix grumbles in shutdown wait
|
||||
- parity: increase shutdown timeouts
|
||||
- Wrap --help output to 120 characters ([#7626](https://github.com/paritytech/parity/pull/7626))
|
||||
- Update Clap dependency and remove workarounds
|
||||
- WIP
|
||||
- Remove line breaks in help messages for now
|
||||
- Multiple values can only be separated by commas (closes [#7428](https://github.com/paritytech/parity/issues/7428))
|
||||
- Grumbles; refactor repeating code; add constant
|
||||
- Use a single Wrapper rather than allocate a new one for each call
|
||||
- Wrap --help to 120 characters rather than 100 characte
|
||||
- Token filter balances (throttle) ([#7742](https://github.com/paritytech/parity/pull/7742))
|
||||
- Token filter balances (throttle)
|
||||
- Cleanups
|
||||
- Remove unused uniq
|
||||
- Update @parity/shared to 2.2.23
|
||||
- Remove unused code paths
|
||||
- Bump beta to 1.9.1 ([#7751](https://github.com/paritytech/parity/pull/7751))
|
||||
- Explicitly add branch name ([#7754](https://github.com/paritytech/parity/pull/7754))
|
||||
- Explicitly add branch name
|
||||
- Fix cargo update branch to beta
|
||||
- Revert revert revert ([#7715](https://github.com/paritytech/parity/pull/7715))
|
||||
- This reverts commit 568dc33.
|
||||
|
||||
## Parity [v1.9.0](https://github.com/paritytech/parity/releases/tag/v1.9.0) "Velocity" (2018-01-25)
|
||||
|
||||
We are happy to announce our newest Parity 1.9 release. Among others, it enables the following features:
|
||||
|
||||
- It integrates the fully reworked Parity Wallet and DApps browser (a.k.a. "UI 2.0", [#6819](https://github.com/paritytech/parity/pull/6819)).
|
||||
- It enables devp2p snappy compression ([#6683](https://github.com/paritytech/parity/pull/6683)).
|
||||
- AuRa Proof-of-Authority chains now disable uncles by default ([#7006](https://github.com/paritytech/parity/pull/7006)). Existing PoA chains can go through a "maximum uncle count transition" to achieve more stability ([#7196](https://github.com/paritytech/parity/pull/7196)).
|
||||
- Added Expanse's Byzantium hard-fork ([#7463](https://github.com/paritytech/parity/pull/7463)).
|
||||
- Added support for Ellaism chain ([#7222](https://github.com/paritytech/parity/pull/7222)).
|
||||
|
||||
Further, users upgrading from 1.8 should acknowledge the following changes:
|
||||
|
||||
- Fixed DELEGATECALL's from/to field ([#7568](https://github.com/paritytech/parity/pull/7568)).
|
||||
- Set zero nonce and gas price for calls by default ([#6954](https://github.com/paritytech/parity/pull/6954)).
|
||||
- Create pending blocks with all transactions from the queue ([#6942](https://github.com/paritytech/parity/pull/6942)).
|
||||
- Remove RPC parameter leniency now that Mist formats correctly ([#6651](https://github.com/paritytech/parity/pull/6651)). Parity stops accepting decimal-formatted block numbers and stops parsing the empty string as empty bytes.
|
||||
- Public nodes do not support the user interface anymore. If you are running a public node, please stay on the 1.8 branch of the stable releases.
|
||||
|
||||
Additional noteworthy changes:
|
||||
|
||||
- `ethstore` and `ethkey` have been significantly improved ([#6961](https://github.com/paritytech/parity/pull/6961)):
|
||||
- `ethstore` now supports brute forcing pre-sale wallets given a password list for recovery.
|
||||
- `ethkey` now supports multi-threaded generation of prefix-matching addresses.
|
||||
- `ethkey` now supports prefix-matching brain wallets.
|
||||
- `ethkey` now supports brain-wallets recovery-phrases lookup. This helps to find a correct phrase if you know the address you want to get yet you made a typo backing the phrase up, or forgot a word.
|
||||
|
||||
Read more about Parity 1.9 in our [blog post](http://paritytech.io/velocity-the-fastest-parity-released/).
|
||||
|
||||
The full list of included changes:
|
||||
|
||||
- Add scroll when when too many accounts ([#7677](https://github.com/paritytech/parity/pull/7677)) ([#7679](https://github.com/paritytech/parity/pull/7679))
|
||||
- Update installer.nsi
|
||||
- Fix conditions in gitlab-test ([#7676](https://github.com/paritytech/parity/pull/7676))
|
||||
- Fix conditions in gitlab-test
|
||||
- Update gitlab-test.sh
|
||||
- Remove cargo cache
|
||||
- Backports to beta ([#7660](https://github.com/paritytech/parity/pull/7660))
|
||||
- Improve handling of RocksDB corruption ([#7630](https://github.com/paritytech/parity/pull/7630))
|
||||
- Kvdb-rocksdb: update rust-rocksdb version
|
||||
- Kvdb-rocksdb: mark corruptions and attempt repair on db open
|
||||
- Kvdb-rocksdb: better corruption detection on open
|
||||
- Kvdb-rocksdb: add corruption_file_name const
|
||||
- Kvdb-rocksdb: rename mark_corruption to check_for_corruption
|
||||
- Hardening of CSP ([#7621](https://github.com/paritytech/parity/pull/7621))
|
||||
- Fixed delegatecall's from/to ([#7568](https://github.com/paritytech/parity/pull/7568))
|
||||
- Fixed delegatecall's from/to, closes [#7166](https://github.com/paritytech/parity/issues/7166)
|
||||
- Added tests for delegatecall traces, [#7167](https://github.com/paritytech/parity/issues/7167)
|
||||
- Light client RPCs ([#7603](https://github.com/paritytech/parity/pull/7603))
|
||||
- Implement registrar.
|
||||
- Implement eth_getCode
|
||||
- Don't wait for providers.
|
||||
- Don't wait for providers.
|
||||
- Fix linting and wasm tests.
|
||||
- Problem: AttachedProtocols don't get registered ([#7610](https://github.com/paritytech/parity/pull/7610))
|
||||
- Fix Temporarily Invalid blocks handling ([#7613](https://github.com/paritytech/parity/pull/7613))
|
||||
- Handle temporarily invalid blocks in sync.
|
||||
- Fix tests.
|
||||
- Add docker build for beta ([#7671](https://github.com/paritytech/parity/pull/7671))
|
||||
- Add docker build for beta
|
||||
- Add cargo cache
|
||||
- Fix snapcraft build for beta ([#7670](https://github.com/paritytech/parity/pull/7670))
|
||||
- Update Parity.pkgproj
|
||||
- update gitlab build from master
|
||||
- Update references to dapp sources ([#7634](https://github.com/paritytech/parity/pull/7634)) ([#7636](https://github.com/paritytech/parity/pull/7636))
|
||||
- Update tokenreg ([#7618](https://github.com/paritytech/parity/pull/7618)) ([#7619](https://github.com/paritytech/parity/pull/7619))
|
||||
- Fix cache:key ([#7598](https://github.com/paritytech/parity/pull/7598))
|
||||
- Make 1.9 beta ([#7533](https://github.com/paritytech/parity/pull/7533))
|
||||
- Trigger js-precompiled ([#7535](https://github.com/paritytech/parity/pull/7535))
|
||||
- RocksDB fix ([#7512](https://github.com/paritytech/parity/pull/7512))
|
||||
- Update js-api ([#7510](https://github.com/paritytech/parity/pull/7510))
|
||||
- Expose default gas price percentile configuration in CLI ([#7497](https://github.com/paritytech/parity/pull/7497))
|
||||
- Use https connection ([#7503](https://github.com/paritytech/parity/pull/7503))
|
||||
- More thorough changes detection ([#7472](https://github.com/paritytech/parity/pull/7472))
|
||||
- Fix small layout issues ([#7500](https://github.com/paritytech/parity/pull/7500))
|
||||
- Show all accounts on Topbar ([#7498](https://github.com/paritytech/parity/pull/7498))
|
||||
- Update Parity Mainnet Bootnodes ([#7476](https://github.com/paritytech/parity/pull/7476))
|
||||
- Fixed panic when io is not available for export block ([#7495](https://github.com/paritytech/parity/pull/7495))
|
||||
- Advance AuRa step as far as we can and prevent invalid blocks. ([#7451](https://github.com/paritytech/parity/pull/7451))
|
||||
- Update package-lock in js-old ([#7494](https://github.com/paritytech/parity/pull/7494))
|
||||
- Update issue template and readme ([#7450](https://github.com/paritytech/parity/pull/7450))
|
||||
- Update package-lock.json pinned versions ([#7492](https://github.com/paritytech/parity/pull/7492))
|
||||
- Explicit pre-precompiled push checkout ([#7474](https://github.com/paritytech/parity/pull/7474))
|
||||
- Trigger js-precompiled ([#7473](https://github.com/paritytech/parity/pull/7473))
|
||||
- Expanse Byzantium update w/ correct metropolis difficulty increment divisor ([#7463](https://github.com/paritytech/parity/pull/7463))
|
||||
- Updated icons ([#7469](https://github.com/paritytech/parity/pull/7469))
|
||||
- Cleanup certifications ([#7454](https://github.com/paritytech/parity/pull/7454))
|
||||
- Fix css lint (updated stylelint) ([#7471](https://github.com/paritytech/parity/pull/7471))
|
||||
- Upgrade markdown-loader & marked ([#7467](https://github.com/paritytech/parity/pull/7467))
|
||||
- Remove JS test for removed code ([#7461](https://github.com/paritytech/parity/pull/7461))
|
||||
- Pull in dapp-status ([#7457](https://github.com/paritytech/parity/pull/7457))
|
||||
- Bump openssl crate ([#7455](https://github.com/paritytech/parity/pull/7455))
|
||||
- Signer updates from global Redux state ([#7452](https://github.com/paritytech/parity/pull/7452))
|
||||
- Remove expanse chain ([#7437](https://github.com/paritytech/parity/pull/7437))
|
||||
- Store tokens with repeatable id ([#7435](https://github.com/paritytech/parity/pull/7435))
|
||||
- Strict config parsing ([#7433](https://github.com/paritytech/parity/pull/7433))
|
||||
- Upgrade to RocksDB 5.8.8 and tune settings to reduce space amplification ([#7348](https://github.com/paritytech/parity/pull/7348))
|
||||
- Fix status layout ([#7432](https://github.com/paritytech/parity/pull/7432))
|
||||
- Fix tracing failed calls. ([#7412](https://github.com/paritytech/parity/pull/7412))
|
||||
- Problem: sending any Whisper message fails ([#7421](https://github.com/paritytech/parity/pull/7421))
|
||||
- Wait for future blocks in AuRa ([#7368](https://github.com/paritytech/parity/pull/7368))
|
||||
- Fix final feature. ([#7426](https://github.com/paritytech/parity/pull/7426))
|
||||
- Use RwLock for state DB ([#7425](https://github.com/paritytech/parity/pull/7425))
|
||||
- Update branding on UI ([#7370](https://github.com/paritytech/parity/pull/7370))
|
||||
- Changelog for 1.8.5 and 1.7.11 ([#7401](https://github.com/paritytech/parity/pull/7401))
|
||||
- Added checking tx-type using transactions permission contract for miners ([#7359](https://github.com/paritytech/parity/pull/7359))
|
||||
- Standalone dir crate, replaces [#7383](https://github.com/paritytech/parity/issues/7383) ([#7409](https://github.com/paritytech/parity/pull/7409))
|
||||
- SecretStore: secretstore_signRawHash method ([#7336](https://github.com/paritytech/parity/pull/7336))
|
||||
- SecretStore: return error 404 when there's no key shares for given key on all nodes ([#7331](https://github.com/paritytech/parity/pull/7331))
|
||||
- SecretStore: PoA integration initial version ([#7101](https://github.com/paritytech/parity/pull/7101))
|
||||
- Update bootnodes ([#7363](https://github.com/paritytech/parity/pull/7363))
|
||||
- Fix default CORS settings. ([#7387](https://github.com/paritytech/parity/pull/7387))
|
||||
- Fix version ([#7390](https://github.com/paritytech/parity/pull/7390))
|
||||
- Wasm runtime update ([#7356](https://github.com/paritytech/parity/pull/7356))
|
||||
- Parity-version pr reopen ([#7136](https://github.com/paritytech/parity/pull/7136))
|
||||
- Get rid of clippy remainings. ([#7355](https://github.com/paritytech/parity/pull/7355))
|
||||
- Avoid using ok_or with allocated argument ([#7357](https://github.com/paritytech/parity/pull/7357))
|
||||
- Make accounts refresh time configurable. ([#7345](https://github.com/paritytech/parity/pull/7345))
|
||||
- Enable traces for DEV chain ([#7327](https://github.com/paritytech/parity/pull/7327))
|
||||
- Problem: AuRa's unsafeties around step duration ([#7282](https://github.com/paritytech/parity/pull/7282))
|
||||
- Problem: Cargo.toml file contains [project] key ([#7346](https://github.com/paritytech/parity/pull/7346))
|
||||
- Fix broken flex modal layouts ([#7343](https://github.com/paritytech/parity/pull/7343))
|
||||
- Fix dappIcon & Fix Signer Pending ([#7338](https://github.com/paritytech/parity/pull/7338))
|
||||
- Fix wallet token/badge icons not showing up ([#7333](https://github.com/paritytech/parity/pull/7333))
|
||||
- Add Ellaism coin in chain config ([#7222](https://github.com/paritytech/parity/pull/7222))
|
||||
- Update bootnodes ([#7296](https://github.com/paritytech/parity/pull/7296))
|
||||
- Adds `personal_signTransaction` RPC method ([#6991](https://github.com/paritytech/parity/pull/6991))
|
||||
- Fix double initialization of embeded providers. ([#7326](https://github.com/paritytech/parity/pull/7326))
|
||||
- Transaction Pool re-implementation ([#6994](https://github.com/paritytech/parity/pull/6994))
|
||||
- UI package bump ([#7318](https://github.com/paritytech/parity/pull/7318))
|
||||
- Test framework and basic test for whisper ([#7011](https://github.com/paritytech/parity/pull/7011))
|
||||
- CI js-precompiled trigger ([#7316](https://github.com/paritytech/parity/pull/7316))
|
||||
- Fix inject.js & Signer store duplication ([#7299](https://github.com/paritytech/parity/pull/7299))
|
||||
- Detect different node, same-key signing in aura ([#7245](https://github.com/paritytech/parity/pull/7245))
|
||||
- New warp enodes ([#7287](https://github.com/paritytech/parity/pull/7287))
|
||||
- CSS fixes for v1 ([#7285](https://github.com/paritytech/parity/pull/7285))
|
||||
- Wallet subscriptions & refresh ([#7283](https://github.com/paritytech/parity/pull/7283))
|
||||
- Update inject web3 dependencies ([#7286](https://github.com/paritytech/parity/pull/7286))
|
||||
- Some padding around dapp image ([#7276](https://github.com/paritytech/parity/pull/7276))
|
||||
- Expand available middleware methods ([#7275](https://github.com/paritytech/parity/pull/7275))
|
||||
- Inject parity script to all dapps // Expand dapps to any ZIP file ([#7260](https://github.com/paritytech/parity/pull/7260))
|
||||
- New Homepage ([#7266](https://github.com/paritytech/parity/pull/7266))
|
||||
- Update kovan HF block number. ([#7259](https://github.com/paritytech/parity/pull/7259))
|
||||
- CHANGELOG for 1.7.10 and 1.8.4 ([#7265](https://github.com/paritytech/parity/pull/7265))
|
||||
- Remove extraneous id hashing ([#7269](https://github.com/paritytech/parity/pull/7269))
|
||||
- Simplify status + content display overlaps/page fixing ([#7264](https://github.com/paritytech/parity/pull/7264))
|
||||
- UI redirect to 127.0.0.1 when localhost requested ([#7236](https://github.com/paritytech/parity/pull/7236))
|
||||
- Usability improvements to security token Dialog [#7112](https://github.com/paritytech/parity/issues/7112) ([#7134](https://github.com/paritytech/parity/pull/7134))
|
||||
- Don't display unneeded notifications ([#7237](https://github.com/paritytech/parity/pull/7237))
|
||||
- Reduce max block timestamp drift to 15 seconds ([#7240](https://github.com/paritytech/parity/pull/7240))
|
||||
- Increase allowed time drift to 10s. ([#7238](https://github.com/paritytech/parity/pull/7238))
|
||||
- Improve building from source ([#7239](https://github.com/paritytech/parity/pull/7239))
|
||||
- Fix/Update method permissions ([#7233](https://github.com/paritytech/parity/pull/7233))
|
||||
- Fix aura difficulty race ([#7198](https://github.com/paritytech/parity/pull/7198))
|
||||
- Dependency updates ([#7226](https://github.com/paritytech/parity/pull/7226))
|
||||
- Display all dapps (shell) & wallet tabs (v1) by default ([#7213](https://github.com/paritytech/parity/pull/7213))
|
||||
- Rework dapps list ([#7206](https://github.com/paritytech/parity/pull/7206))
|
||||
- Add contributing guidelines and code of conduct. ([#7157](https://github.com/paritytech/parity/pull/7157))
|
||||
- Make Signing Requests more visible ([#7204](https://github.com/paritytech/parity/pull/7204))
|
||||
- Send each log as a separate notification ([#7175](https://github.com/paritytech/parity/pull/7175))
|
||||
- Deleting a mistake comment in calc difficulty ([#7154](https://github.com/paritytech/parity/pull/7154))
|
||||
- Maximum uncle count transition ([#7196](https://github.com/paritytech/parity/pull/7196))
|
||||
- Update FirstRun for UI-2 ([#7195](https://github.com/paritytech/parity/pull/7195))
|
||||
- Update mocha import stubs ([#7191](https://github.com/paritytech/parity/pull/7191))
|
||||
- Escape inifinite loop in estimte_gas ([#7075](https://github.com/paritytech/parity/pull/7075))
|
||||
- New account selector UI in top bar ([#7179](https://github.com/paritytech/parity/pull/7179))
|
||||
- Removed ethcore-util dependency from ethcore-network ([#7180](https://github.com/paritytech/parity/pull/7180))
|
||||
- WASM test runner utility upgrade ([#7147](https://github.com/paritytech/parity/pull/7147))
|
||||
- React 16 ([#7174](https://github.com/paritytech/parity/pull/7174))
|
||||
- Assorted improvements for ethstore and ethkey ([#6961](https://github.com/paritytech/parity/pull/6961))
|
||||
- Delete unused package.json (dist bundles) ([#7173](https://github.com/paritytech/parity/pull/7173))
|
||||
- Remove *.css.map & *.js.map ([#7168](https://github.com/paritytech/parity/pull/7168))
|
||||
- Use git flag to remove old js artifacts ([#7165](https://github.com/paritytech/parity/pull/7165))
|
||||
- Cleanup JS build artifacts ([#7164](https://github.com/paritytech/parity/pull/7164))
|
||||
- Fixes typo in user config path ([#7159](https://github.com/paritytech/parity/pull/7159))
|
||||
- Pull in new dapp-{methods,visible} dapps ([#7150](https://github.com/paritytech/parity/pull/7150))
|
||||
- WASM test runner utility ([#7142](https://github.com/paritytech/parity/pull/7142))
|
||||
- WASM Remove blockhash error ([#7121](https://github.com/paritytech/parity/pull/7121))
|
||||
- ECIP-1039: Monetary policy rounding specification ([#7067](https://github.com/paritytech/parity/pull/7067))
|
||||
- Fixed `RotatingLogger` after migrating to new arrayvec ([#7129](https://github.com/paritytech/parity/pull/7129))
|
||||
- Push to correct shell branch ([#7135](https://github.com/paritytech/parity/pull/7135))
|
||||
- Update js-precompiled ref, trigger JS build ([#7132](https://github.com/paritytech/parity/pull/7132))
|
||||
- Fixed build && test ([#7128](https://github.com/paritytech/parity/pull/7128))
|
||||
- Update packages, pull in compiled-only repos ([#7125](https://github.com/paritytech/parity/pull/7125))
|
||||
- Cleanup top bar, add Home icon for navigation ([#7118](https://github.com/paritytech/parity/pull/7118))
|
||||
- WASM storage_read and storage_write don't return anything ([#7110](https://github.com/paritytech/parity/pull/7110))
|
||||
- Local dapp development URL ([#7100](https://github.com/paritytech/parity/pull/7100))
|
||||
- Remove unused and duplicated files in js-old ([#7082](https://github.com/paritytech/parity/pull/7082))
|
||||
- Optimize & group dapp requests ([#7083](https://github.com/paritytech/parity/pull/7083))
|
||||
- WASM parse payload from panics ([#7097](https://github.com/paritytech/parity/pull/7097))
|
||||
- Fix no-default-features. ([#7096](https://github.com/paritytech/parity/pull/7096))
|
||||
- Updated eth-secp256k1 ([#7090](https://github.com/paritytech/parity/pull/7090))
|
||||
- Improve Github Issue Template ([#7099](https://github.com/paritytech/parity/pull/7099))
|
||||
- Changes necessary to upload crates to crates.io ([#7020](https://github.com/paritytech/parity/pull/7020))
|
||||
- Reopened 6860 - iterate over both buffered and unbuffered database entries ([#7048](https://github.com/paritytech/parity/pull/7048))
|
||||
- SecretStore: servers set change session api ([#6925](https://github.com/paritytech/parity/pull/6925))
|
||||
- Disable uncles by default ([#7006](https://github.com/paritytech/parity/pull/7006))
|
||||
- Squashed ethcore-network changes which introduce error-chain ([#7040](https://github.com/paritytech/parity/pull/7040))
|
||||
- Removed redundant imports ([#7057](https://github.com/paritytech/parity/pull/7057))
|
||||
- CHANGELOG for 1.7.8, 1.7.9, 1.8.2, and 1.8.3 ([#7055](https://github.com/paritytech/parity/pull/7055))
|
||||
- Properly display Signer errors (Snackbar display popup) ([#7053](https://github.com/paritytech/parity/pull/7053))
|
||||
- Add the desktop file for the snap ([#7059](https://github.com/paritytech/parity/pull/7059))
|
||||
- Small performance gain in allocations ([#7054](https://github.com/paritytech/parity/pull/7054))
|
||||
- Bump JSON-RPC version ([#7051](https://github.com/paritytech/parity/pull/7051))
|
||||
- Fix nonce reservation ([#7025](https://github.com/paritytech/parity/pull/7025))
|
||||
- Fixed ethstore-cli output ([#7052](https://github.com/paritytech/parity/pull/7052))
|
||||
- Add mui for embed compilation ([#7049](https://github.com/paritytech/parity/pull/7049))
|
||||
- Update the snap metadata to keep working strictly confined ([#6993](https://github.com/paritytech/parity/pull/6993))
|
||||
- Remove unused js packages (dapp cleanups) ([#7046](https://github.com/paritytech/parity/pull/7046))
|
||||
- Gitlog location update ([#7042](https://github.com/paritytech/parity/pull/7042))
|
||||
- Move git logging to .git-release.log ([#7041](https://github.com/paritytech/parity/pull/7041))
|
||||
- Start from rust root in release update step ([#7039](https://github.com/paritytech/parity/pull/7039))
|
||||
- Complete token merge, remove unused files ([#7037](https://github.com/paritytech/parity/pull/7037))
|
||||
- Add missing cargo-push.sh shell variable ([#7036](https://github.com/paritytech/parity/pull/7036))
|
||||
- Fix npm start script ([#7034](https://github.com/paritytech/parity/pull/7034))
|
||||
- Update executable flags on release scripts ([#7035](https://github.com/paritytech/parity/pull/7035))
|
||||
- Fix v1 precompiled ([#7033](https://github.com/paritytech/parity/pull/7033))
|
||||
- Push precompiled to correct branch (v1) ([#7031](https://github.com/paritytech/parity/pull/7031))
|
||||
- Update v1 Wallet Dapp ([#6935](https://github.com/paritytech/parity/pull/6935))
|
||||
- WASM tests update ([#7018](https://github.com/paritytech/parity/pull/7018))
|
||||
- Events in WASM runtime ([#6967](https://github.com/paritytech/parity/pull/6967))
|
||||
- Adds validate_node_url() and refactors boot node check ([#6907](https://github.com/paritytech/parity/pull/6907)) ([#6970](https://github.com/paritytech/parity/pull/6970))
|
||||
- Fix windows build (with ui rebuild) ([#7016](https://github.com/paritytech/parity/pull/7016))
|
||||
- Make CLI arguments parsing more backwards compatible ([#7004](https://github.com/paritytech/parity/pull/7004))
|
||||
- Fixes for parity-extension ([#6990](https://github.com/paritytech/parity/pull/6990))
|
||||
- Update ethcore-bigint ([#6992](https://github.com/paritytech/parity/pull/6992))
|
||||
- Get local transactions by hash in the light client ([#6874](https://github.com/paritytech/parity/pull/6874))
|
||||
- Warn when blacklisted account present in store ([#6875](https://github.com/paritytech/parity/pull/6875))
|
||||
- Skip nonce check for gas estimation ([#6997](https://github.com/paritytech/parity/pull/6997))
|
||||
- Creating pending block with all transactions from the queue ([#6942](https://github.com/paritytech/parity/pull/6942))
|
||||
- Removes `MAX_TX_TO_IMPORT` from `ChainSync` ([#6976](https://github.com/paritytech/parity/pull/6976))
|
||||
- SecretStore: versioned keys ([#6910](https://github.com/paritytech/parity/pull/6910))
|
||||
- Removes `FUTURE_QUEUE_LIMITS_SHIFT` ([#6962](https://github.com/paritytech/parity/pull/6962))
|
||||
- Set zero nonce and gas price for calls by default ([#6954](https://github.com/paritytech/parity/pull/6954))
|
||||
- Add hint in ActionParams for splitting code/data ([#6957](https://github.com/paritytech/parity/pull/6957))
|
||||
- Return decoded seal fields. ([#6932](https://github.com/paritytech/parity/pull/6932))
|
||||
- Fix serialization of status in transaction receipts. ([#6926](https://github.com/paritytech/parity/pull/6926))
|
||||
- Reserve nonces for signing ([#6834](https://github.com/paritytech/parity/pull/6834))
|
||||
- Windows fixes ([#6921](https://github.com/paritytech/parity/pull/6921))
|
||||
- Don't add {css,js}.map from dapps ([#6931](https://github.com/paritytech/parity/pull/6931))
|
||||
- Fix JSON tracing for sub-calls. ([#6842](https://github.com/paritytech/parity/pull/6842))
|
||||
- Shell updates (bonds, updated Dapps) ([#6897](https://github.com/paritytech/parity/pull/6897))
|
||||
- Fix [#6228](https://github.com/paritytech/parity/issues/6228): do not display eth price in cli for etc ([#6877](https://github.com/paritytech/parity/pull/6877))
|
||||
- Fix mining help ([#6885](https://github.com/paritytech/parity/pull/6885))
|
||||
- Refactor static context check in CREATE. ([#6886](https://github.com/paritytech/parity/pull/6886))
|
||||
- Cleanup some configuration options ([#6878](https://github.com/paritytech/parity/pull/6878))
|
||||
- Fix serialization of non-localized transactions ([#6868](https://github.com/paritytech/parity/pull/6868))
|
||||
- Updated ntp to version 0.3 ([#6854](https://github.com/paritytech/parity/pull/6854))
|
||||
- Align README with 1.8 and prepare CHANGELOG with 1.8.1 ([#6833](https://github.com/paritytech/parity/pull/6833))
|
||||
- Return error on timed unlock ([#6777](https://github.com/paritytech/parity/pull/6777))
|
||||
- Fix dapps tests in master ([#6866](https://github.com/paritytech/parity/pull/6866))
|
||||
- Ethstore optimizations ([#6827](https://github.com/paritytech/parity/pull/6827))
|
||||
- Add ECIP1017 to Morden config ([#6810](https://github.com/paritytech/parity/pull/6810))
|
||||
- Remove all package publishing to npm ([#6838](https://github.com/paritytech/parity/pull/6838))
|
||||
- Util crates use tempdir crate instead of devtools to create temp path ([#6807](https://github.com/paritytech/parity/pull/6807))
|
||||
- Trigger js build ([#6836](https://github.com/paritytech/parity/pull/6836))
|
||||
- Clean-up scripts. ([#6832](https://github.com/paritytech/parity/pull/6832))
|
||||
- Tweaked snapshot sync threshold ([#6829](https://github.com/paritytech/parity/pull/6829))
|
||||
- Integrate UI 2 ([#6819](https://github.com/paritytech/parity/pull/6819))
|
||||
- Refresh cached tokens based on registry info & random balances ([#6818](https://github.com/paritytech/parity/pull/6818))
|
||||
- Change keypath derivation logic ([#6815](https://github.com/paritytech/parity/pull/6815))
|
||||
- Refactors journaldb as a separate crate ([#6801](https://github.com/paritytech/parity/pull/6801))
|
||||
- Trigger UI build. ([#6817](https://github.com/paritytech/parity/pull/6817))
|
||||
- Bumped more crate versions ([#6809](https://github.com/paritytech/parity/pull/6809))
|
||||
- Fix RPC compilation warnings. ([#6808](https://github.com/paritytech/parity/pull/6808))
|
||||
- Remove internal ipc ([#6795](https://github.com/paritytech/parity/pull/6795))
|
||||
- Consistent KeyValueDB errors ([#6792](https://github.com/paritytech/parity/pull/6792))
|
||||
- Squash remaining warnings ([#6789](https://github.com/paritytech/parity/pull/6789))
|
||||
- Forward-port [#6754](https://github.com/paritytech/parity/issues/6754) [#6755](https://github.com/paritytech/parity/issues/6755) ([#6785](https://github.com/paritytech/parity/pull/6785))
|
||||
- Removed duplicated versions of clippy ([#6776](https://github.com/paritytech/parity/pull/6776))
|
||||
- Updated ethabi to version 4.0 ([#6742](https://github.com/paritytech/parity/pull/6742))
|
||||
- Updated rpc_cli and parity to rpassword 1.0 ([#6774](https://github.com/paritytech/parity/pull/6774))
|
||||
- Fix sign data typo ([#6750](https://github.com/paritytech/parity/pull/6750))
|
||||
- Refactoring/cache 6693 ([#6772](https://github.com/paritytech/parity/pull/6772))
|
||||
- Fix CHANGLOG for 1.8.0 ([#6751](https://github.com/paritytech/parity/pull/6751))
|
||||
- Removes redundant `mut` in service.rs.in ([#6775](https://github.com/paritytech/parity/pull/6775))
|
||||
- Remove redundant `mut` ([#6773](https://github.com/paritytech/parity/pull/6773))
|
||||
- Fixed kovan chain validation ([#6758](https://github.com/paritytech/parity/pull/6758))
|
||||
- Removed redundant evm deps ([#6757](https://github.com/paritytech/parity/pull/6757))
|
||||
- Fixed modexp gas calculation overflow ([#6741](https://github.com/paritytech/parity/pull/6741))
|
||||
- Use cc 1.0 instead of gcc ([#6733](https://github.com/paritytech/parity/pull/6733))
|
||||
- Version bump to 1.9.0 ([#6727](https://github.com/paritytech/parity/pull/6727))
|
||||
- Fix badges not showing up ([#6730](https://github.com/paritytech/parity/pull/6730))
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 7.9 KiB |
@@ -1,20 +1,11 @@
|
||||
[package]
|
||||
name = "ethash"
|
||||
version = "1.12.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
version = "1.0.0"
|
||||
authors = ["arkpar <arkadiy@ethcore.io"]
|
||||
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
crunchy = "0.1.0"
|
||||
either = "1.0.0"
|
||||
ethereum-types = "0.4"
|
||||
keccak-hash = "0.1"
|
||||
log = "0.4"
|
||||
memmap = "0.6"
|
||||
parking_lot = "0.6"
|
||||
log = "0.3"
|
||||
sha3 = { path = "../util/sha3" }
|
||||
primal = "0.2.3"
|
||||
|
||||
[dev-dependencies]
|
||||
tempdir = "0.3"
|
||||
|
||||
[features]
|
||||
benches = []
|
||||
|
||||
@@ -1,355 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use compute::Light;
|
||||
use either::Either;
|
||||
use keccak::{H256, keccak_512};
|
||||
use memmap::MmapMut;
|
||||
use parking_lot::Mutex;
|
||||
use seed_compute::SeedHashCompute;
|
||||
|
||||
use shared::{ETHASH_CACHE_ROUNDS, NODE_BYTES, NODE_DWORDS, Node, epoch, get_cache_size, to_hex};
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::fs;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::slice;
|
||||
use std::sync::Arc;
|
||||
|
||||
type Cache = Either<Vec<Node>, MmapMut>;
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Copy)]
|
||||
pub enum OptimizeFor {
|
||||
Cpu,
|
||||
Memory,
|
||||
}
|
||||
|
||||
impl Default for OptimizeFor {
|
||||
fn default() -> Self {
|
||||
OptimizeFor::Cpu
|
||||
}
|
||||
}
|
||||
|
||||
fn byte_size(cache: &Cache) -> usize {
|
||||
use self::Either::{Left, Right};
|
||||
|
||||
match *cache {
|
||||
Left(ref vec) => vec.len() * NODE_BYTES,
|
||||
Right(ref mmap) => mmap.len(),
|
||||
}
|
||||
}
|
||||
|
||||
fn new_buffer(path: &Path, num_nodes: usize, ident: &H256, optimize_for: OptimizeFor) -> Cache {
|
||||
let memmap = match optimize_for {
|
||||
OptimizeFor::Cpu => None,
|
||||
OptimizeFor::Memory => make_memmapped_cache(path, num_nodes, ident).ok(),
|
||||
};
|
||||
|
||||
memmap.map(Either::Right).unwrap_or_else(|| {
|
||||
Either::Left(make_memory_cache(num_nodes, ident))
|
||||
})
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct NodeCacheBuilder {
|
||||
// TODO: Remove this locking and just use an `Rc`?
|
||||
seedhash: Arc<Mutex<SeedHashCompute>>,
|
||||
optimize_for: OptimizeFor,
|
||||
}
|
||||
|
||||
// TODO: Abstract the "optimize for" logic
|
||||
pub struct NodeCache {
|
||||
builder: NodeCacheBuilder,
|
||||
cache_dir: Cow<'static, Path>,
|
||||
cache_path: PathBuf,
|
||||
epoch: u64,
|
||||
cache: Cache,
|
||||
}
|
||||
|
||||
impl NodeCacheBuilder {
|
||||
pub fn light(&self, cache_dir: &Path, block_number: u64) -> Light {
|
||||
Light::new_with_builder(self, cache_dir, block_number)
|
||||
}
|
||||
|
||||
pub fn light_from_file(&self, cache_dir: &Path, block_number: u64) -> io::Result<Light> {
|
||||
Light::from_file_with_builder(self, cache_dir, block_number)
|
||||
}
|
||||
|
||||
pub fn new<T: Into<Option<OptimizeFor>>>(optimize_for: T) -> Self {
|
||||
NodeCacheBuilder {
|
||||
seedhash: Arc::new(Mutex::new(SeedHashCompute::default())),
|
||||
optimize_for: optimize_for.into().unwrap_or_default(),
|
||||
}
|
||||
}
|
||||
|
||||
fn block_number_to_ident(&self, block_number: u64) -> H256 {
|
||||
self.seedhash.lock().hash_block_number(block_number)
|
||||
}
|
||||
|
||||
fn epoch_to_ident(&self, epoch: u64) -> H256 {
|
||||
self.seedhash.lock().hash_epoch(epoch)
|
||||
}
|
||||
|
||||
pub fn from_file<P: Into<Cow<'static, Path>>>(
|
||||
&self,
|
||||
cache_dir: P,
|
||||
block_number: u64,
|
||||
) -> io::Result<NodeCache> {
|
||||
let cache_dir = cache_dir.into();
|
||||
let ident = self.block_number_to_ident(block_number);
|
||||
|
||||
let path = cache_path(cache_dir.as_ref(), &ident);
|
||||
|
||||
let cache = cache_from_path(&path, self.optimize_for)?;
|
||||
let expected_cache_size = get_cache_size(block_number);
|
||||
|
||||
if byte_size(&cache) == expected_cache_size {
|
||||
Ok(NodeCache {
|
||||
builder: self.clone(),
|
||||
epoch: epoch(block_number),
|
||||
cache_dir: cache_dir,
|
||||
cache_path: path,
|
||||
cache: cache,
|
||||
})
|
||||
} else {
|
||||
Err(io::Error::new(
|
||||
io::ErrorKind::InvalidData,
|
||||
"Node cache is of incorrect size",
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_cache<P: Into<Cow<'static, Path>>>(
|
||||
&self,
|
||||
cache_dir: P,
|
||||
block_number: u64,
|
||||
) -> NodeCache {
|
||||
let cache_dir = cache_dir.into();
|
||||
let ident = self.block_number_to_ident(block_number);
|
||||
|
||||
let cache_size = get_cache_size(block_number);
|
||||
|
||||
// We use `debug_assert` since it is impossible for `get_cache_size` to return an unaligned
|
||||
// value with the current implementation. If the implementation changes, CI will catch it.
|
||||
debug_assert!(cache_size % NODE_BYTES == 0, "Unaligned cache size");
|
||||
let num_nodes = cache_size / NODE_BYTES;
|
||||
|
||||
let path = cache_path(cache_dir.as_ref(), &ident);
|
||||
let nodes = new_buffer(&path, num_nodes, &ident, self.optimize_for);
|
||||
|
||||
NodeCache {
|
||||
builder: self.clone(),
|
||||
epoch: epoch(block_number),
|
||||
cache_dir: cache_dir.into(),
|
||||
cache_path: path,
|
||||
cache: nodes,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl NodeCache {
|
||||
pub fn cache_path(&self) -> &Path {
|
||||
&self.cache_path
|
||||
}
|
||||
|
||||
pub fn flush(&mut self) -> io::Result<()> {
|
||||
if let Some(last) = self.epoch.checked_sub(2).map(|ep| {
|
||||
cache_path(self.cache_dir.as_ref(), &self.builder.epoch_to_ident(ep))
|
||||
})
|
||||
{
|
||||
fs::remove_file(last).unwrap_or_else(|error| match error.kind() {
|
||||
io::ErrorKind::NotFound => (),
|
||||
_ => warn!("Error removing stale DAG cache: {:?}", error),
|
||||
});
|
||||
}
|
||||
|
||||
consume_cache(&mut self.cache, &self.cache_path)
|
||||
}
|
||||
}
|
||||
|
||||
fn make_memmapped_cache(path: &Path, num_nodes: usize, ident: &H256) -> io::Result<MmapMut> {
|
||||
use std::fs::OpenOptions;
|
||||
|
||||
let file = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.create(true)
|
||||
.open(&path)?;
|
||||
file.set_len((num_nodes * NODE_BYTES) as _)?;
|
||||
|
||||
let mut memmap = unsafe { MmapMut::map_mut(&file)? };
|
||||
|
||||
unsafe { initialize_memory(memmap.as_mut_ptr() as *mut Node, num_nodes, ident) };
|
||||
|
||||
Ok(memmap)
|
||||
}
|
||||
|
||||
fn make_memory_cache(num_nodes: usize, ident: &H256) -> Vec<Node> {
|
||||
let mut nodes: Vec<Node> = Vec::with_capacity(num_nodes);
|
||||
// Use uninit instead of unnecessarily writing `size_of::<Node>() * num_nodes` 0s
|
||||
unsafe {
|
||||
initialize_memory(nodes.as_mut_ptr(), num_nodes, ident);
|
||||
nodes.set_len(num_nodes);
|
||||
}
|
||||
|
||||
nodes
|
||||
}
|
||||
|
||||
fn cache_path<'a, P: Into<Cow<'a, Path>>>(path: P, ident: &H256) -> PathBuf {
|
||||
let mut buf = path.into().into_owned();
|
||||
buf.push(to_hex(ident));
|
||||
buf
|
||||
}
|
||||
|
||||
fn consume_cache(cache: &mut Cache, path: &Path) -> io::Result<()> {
|
||||
use std::fs::OpenOptions;
|
||||
|
||||
match *cache {
|
||||
Either::Left(ref mut vec) => {
|
||||
let mut file = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.create(true)
|
||||
.open(&path)?;
|
||||
|
||||
let buf = unsafe {
|
||||
slice::from_raw_parts_mut(vec.as_mut_ptr() as *mut u8, vec.len() * NODE_BYTES)
|
||||
};
|
||||
|
||||
file.write_all(buf).map(|_| ())
|
||||
}
|
||||
Either::Right(ref mmap) => {
|
||||
mmap.flush()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn cache_from_path(path: &Path, optimize_for: OptimizeFor) -> io::Result<Cache> {
|
||||
let memmap = match optimize_for {
|
||||
OptimizeFor::Cpu => None,
|
||||
OptimizeFor::Memory => {
|
||||
let file = fs::OpenOptions::new().read(true).write(true).create(true).open(path)?;
|
||||
unsafe { MmapMut::map_mut(&file).ok() }
|
||||
},
|
||||
};
|
||||
|
||||
memmap.map(Either::Right).ok_or(()).or_else(|_| {
|
||||
read_from_path(path).map(Either::Left)
|
||||
})
|
||||
}
|
||||
|
||||
fn read_from_path(path: &Path) -> io::Result<Vec<Node>> {
|
||||
use std::fs::File;
|
||||
use std::mem;
|
||||
|
||||
let mut file = File::open(path)?;
|
||||
|
||||
let mut nodes: Vec<u8> = Vec::with_capacity(file.metadata().map(|m| m.len() as _).unwrap_or(
|
||||
NODE_BYTES * 1_000_000,
|
||||
));
|
||||
file.read_to_end(&mut nodes)?;
|
||||
|
||||
nodes.shrink_to_fit();
|
||||
|
||||
if nodes.len() % NODE_BYTES != 0 || nodes.capacity() % NODE_BYTES != 0 {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
"Node cache is not a multiple of node size",
|
||||
));
|
||||
}
|
||||
|
||||
let out: Vec<Node> = unsafe {
|
||||
Vec::from_raw_parts(
|
||||
nodes.as_mut_ptr() as *mut _,
|
||||
nodes.len() / NODE_BYTES,
|
||||
nodes.capacity() / NODE_BYTES,
|
||||
)
|
||||
};
|
||||
|
||||
mem::forget(nodes);
|
||||
|
||||
Ok(out)
|
||||
}
|
||||
|
||||
impl AsRef<[Node]> for NodeCache {
|
||||
fn as_ref(&self) -> &[Node] {
|
||||
match self.cache {
|
||||
Either::Left(ref vec) => vec,
|
||||
Either::Right(ref mmap) => unsafe {
|
||||
let bytes = mmap.as_ptr();
|
||||
// This isn't a safety issue, so we can keep this a debug lint. We don't care about
|
||||
// people manually messing with the files unless it can cause unsafety, but if we're
|
||||
// generating incorrect files then we want to catch that in CI.
|
||||
debug_assert_eq!(mmap.len() % NODE_BYTES, 0);
|
||||
slice::from_raw_parts(bytes as _, mmap.len() / NODE_BYTES)
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This takes a raw pointer and a counter because `memory` may be uninitialized. `memory` _must_ be
|
||||
// a pointer to the beginning of an allocated but possibly-uninitialized block of
|
||||
// `num_nodes * NODE_BYTES` bytes
|
||||
//
|
||||
// We have to use raw pointers to read/write uninit, using "normal" indexing causes LLVM to freak
|
||||
// out. It counts as a read and causes all writes afterwards to be elided. Yes, really. I know, I
|
||||
// want to refactor this to use less `unsafe` as much as the next rustacean.
|
||||
unsafe fn initialize_memory(memory: *mut Node, num_nodes: usize, ident: &H256) {
|
||||
let dst = memory as *mut u8;
|
||||
|
||||
debug_assert_eq!(ident.len(), 32);
|
||||
keccak_512::unchecked(dst, NODE_BYTES, ident.as_ptr(), ident.len());
|
||||
|
||||
for i in 1..num_nodes {
|
||||
// We use raw pointers here, see above
|
||||
let dst = memory.offset(i as _) as *mut u8;
|
||||
let src = memory.offset(i as isize - 1) as *mut u8;
|
||||
|
||||
keccak_512::unchecked(dst, NODE_BYTES, src, NODE_BYTES);
|
||||
}
|
||||
|
||||
// Now this is initialized, we can treat it as a slice.
|
||||
let nodes: &mut [Node] = slice::from_raw_parts_mut(memory, num_nodes);
|
||||
|
||||
// For `unroll!`, see below. If the literal in `unroll!` is not the same as the RHS here then
|
||||
// these have got out of sync! Don't let this happen!
|
||||
debug_assert_eq!(NODE_DWORDS, 8);
|
||||
|
||||
// This _should_ get unrolled by the compiler, since it's not using the loop variable.
|
||||
for _ in 0..ETHASH_CACHE_ROUNDS {
|
||||
for i in 0..num_nodes {
|
||||
let data_idx = (num_nodes - 1 + i) % num_nodes;
|
||||
let idx = nodes.get_unchecked_mut(i).as_words()[0] as usize % num_nodes;
|
||||
|
||||
let data = {
|
||||
let mut data: Node = nodes.get_unchecked(data_idx).clone();
|
||||
let rhs: &Node = nodes.get_unchecked(idx);
|
||||
|
||||
unroll! {
|
||||
for w in 0..8 {
|
||||
*data.as_dwords_mut().get_unchecked_mut(w) ^=
|
||||
*rhs.as_dwords().get_unchecked(w);
|
||||
}
|
||||
}
|
||||
|
||||
data
|
||||
};
|
||||
|
||||
keccak_512::write(&data.bytes, &mut nodes.get_unchecked_mut(i).bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
@@ -19,45 +19,79 @@
|
||||
|
||||
// TODO: fix endianess for big endian
|
||||
|
||||
use keccak::{keccak_512, keccak_256, H256};
|
||||
use cache::{NodeCache, NodeCacheBuilder};
|
||||
use seed_compute::SeedHashCompute;
|
||||
use shared::*;
|
||||
use std::io;
|
||||
use primal::is_prime;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use sha3;
|
||||
use std::slice;
|
||||
use std::path::PathBuf;
|
||||
use std::io::{Read, Write, self};
|
||||
use std::fs::{self, File};
|
||||
|
||||
use std::{mem, ptr};
|
||||
use std::path::Path;
|
||||
pub const ETHASH_EPOCH_LENGTH: u64 = 30000;
|
||||
pub const ETHASH_CACHE_ROUNDS: usize = 3;
|
||||
pub const ETHASH_MIX_BYTES: usize = 128;
|
||||
pub const ETHASH_ACCESSES: usize = 64;
|
||||
pub const ETHASH_DATASET_PARENTS: u32 = 256;
|
||||
|
||||
const DATASET_BYTES_INIT: u64 = 1 << 30;
|
||||
const DATASET_BYTES_GROWTH: u64 = 1 << 23;
|
||||
const CACHE_BYTES_INIT: u64 = 1 << 24;
|
||||
const CACHE_BYTES_GROWTH: u64 = 1 << 17;
|
||||
const NODE_WORDS: usize = 64 / 4;
|
||||
const NODE_BYTES: usize = 64;
|
||||
const MIX_WORDS: usize = ETHASH_MIX_BYTES / 4;
|
||||
const MIX_NODES: usize = MIX_WORDS / NODE_WORDS;
|
||||
const FNV_PRIME: u32 = 0x01000193;
|
||||
const FNV_PRIME: u32 = 0x01000193;
|
||||
|
||||
/// Computation result
|
||||
pub struct ProofOfWork {
|
||||
/// Difficulty boundary
|
||||
pub value: H256,
|
||||
/// Mix
|
||||
pub mix_hash: H256,
|
||||
pub mix_hash: H256
|
||||
}
|
||||
|
||||
struct Node {
|
||||
bytes: [u8; NODE_BYTES],
|
||||
}
|
||||
|
||||
impl Default for Node {
|
||||
fn default() -> Self {
|
||||
Node { bytes: [0u8; NODE_BYTES] }
|
||||
}
|
||||
}
|
||||
|
||||
impl Clone for Node {
|
||||
fn clone(&self) -> Self {
|
||||
Node { bytes: *&self.bytes }
|
||||
}
|
||||
}
|
||||
|
||||
impl Node {
|
||||
#[inline]
|
||||
fn as_words(&self) -> &[u32; NODE_WORDS] {
|
||||
unsafe { mem::transmute(&self.bytes) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn as_words_mut(&mut self) -> &mut [u32; NODE_WORDS] {
|
||||
unsafe { mem::transmute(&mut self.bytes) }
|
||||
}
|
||||
}
|
||||
|
||||
pub type H256 = [u8; 32];
|
||||
|
||||
pub struct Light {
|
||||
block_number: u64,
|
||||
cache: NodeCache,
|
||||
cache: Vec<Node>,
|
||||
}
|
||||
|
||||
/// Light cache structure
|
||||
/// Light cache structur
|
||||
impl Light {
|
||||
pub fn new_with_builder(
|
||||
builder: &NodeCacheBuilder,
|
||||
cache_dir: &Path,
|
||||
block_number: u64,
|
||||
) -> Self {
|
||||
let cache = builder.new_cache(cache_dir.to_path_buf(), block_number);
|
||||
|
||||
Light {
|
||||
block_number: block_number,
|
||||
cache: cache,
|
||||
}
|
||||
/// Create a new light cache for a given block number
|
||||
pub fn new(block_number: u64) -> Light {
|
||||
light_new(block_number)
|
||||
}
|
||||
|
||||
/// Calculate the light boundary data
|
||||
@@ -67,32 +101,87 @@ impl Light {
|
||||
light_compute(self, header_hash, nonce)
|
||||
}
|
||||
|
||||
pub fn from_file_with_builder(
|
||||
builder: &NodeCacheBuilder,
|
||||
cache_dir: &Path,
|
||||
block_number: u64,
|
||||
) -> io::Result<Self> {
|
||||
let cache = builder.from_file(cache_dir.to_path_buf(), block_number)?;
|
||||
pub fn file_path(block_number: u64) -> PathBuf {
|
||||
let mut home = ::std::env::home_dir().unwrap();
|
||||
home.push(".ethash");
|
||||
home.push("light");
|
||||
let seed_hash = get_seedhash(block_number);
|
||||
home.push(to_hex(&seed_hash));
|
||||
home
|
||||
}
|
||||
|
||||
pub fn from_file(block_number: u64) -> io::Result<Light> {
|
||||
let path = Light::file_path(block_number);
|
||||
let mut file = try!(File::open(path));
|
||||
|
||||
let cache_size = get_cache_size(block_number);
|
||||
if try!(file.metadata()).len() != cache_size as u64 {
|
||||
return Err(io::Error::new(io::ErrorKind::Other, "Cache file size mismatch"));
|
||||
}
|
||||
let num_nodes = cache_size / NODE_BYTES;
|
||||
let mut nodes: Vec<Node> = Vec::new();
|
||||
nodes.resize(num_nodes, unsafe { mem::uninitialized() });
|
||||
let buf = unsafe { slice::from_raw_parts_mut(nodes.as_mut_ptr() as *mut u8, cache_size) };
|
||||
try!(file.read_exact(buf));
|
||||
Ok(Light {
|
||||
cache: nodes,
|
||||
block_number: block_number,
|
||||
cache: cache,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn to_file(&mut self) -> io::Result<&Path> {
|
||||
self.cache.flush()?;
|
||||
Ok(self.cache.cache_path())
|
||||
pub fn to_file(&self) -> io::Result<()> {
|
||||
let path = Light::file_path(self.block_number);
|
||||
try!(fs::create_dir_all(path.parent().unwrap()));
|
||||
let mut file = try!(File::create(path));
|
||||
|
||||
let cache_size = self.cache.len() * NODE_BYTES;
|
||||
let buf = unsafe { slice::from_raw_parts(self.cache.as_ptr() as *const u8, cache_size) };
|
||||
try!(file.write(buf));
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn slow_hash_block_number(block_number: u64) -> H256 {
|
||||
SeedHashCompute::resume_compute_seedhash([0u8; 32], 0, block_number / ETHASH_EPOCH_LENGTH)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn fnv_hash(x: u32, y: u32) -> u32 {
|
||||
return x.wrapping_mul(FNV_PRIME) ^ y;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn sha3_512(input: &[u8], output: &mut [u8]) {
|
||||
unsafe { sha3::sha3_512(output.as_mut_ptr(), output.len(), input.as_ptr(), input.len()) };
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_cache_size(block_number: u64) -> usize {
|
||||
let mut sz: u64 = CACHE_BYTES_INIT + CACHE_BYTES_GROWTH * (block_number / ETHASH_EPOCH_LENGTH);
|
||||
sz = sz - NODE_BYTES as u64;
|
||||
while !is_prime(sz / NODE_BYTES as u64) {
|
||||
sz = sz - 2 * NODE_BYTES as u64;
|
||||
}
|
||||
sz as usize
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_data_size(block_number: u64) -> usize {
|
||||
let mut sz: u64 = DATASET_BYTES_INIT + DATASET_BYTES_GROWTH * (block_number / ETHASH_EPOCH_LENGTH);
|
||||
sz = sz - ETHASH_MIX_BYTES as u64;
|
||||
while !is_prime(sz / ETHASH_MIX_BYTES as u64) {
|
||||
sz = sz - 2 * ETHASH_MIX_BYTES as u64;
|
||||
}
|
||||
sz as usize
|
||||
}
|
||||
|
||||
#[inline]
|
||||
/// Given the `block_number`, determine the seed hash for Ethash.
|
||||
pub fn get_seedhash(block_number: u64) -> H256 {
|
||||
let epochs = block_number / ETHASH_EPOCH_LENGTH;
|
||||
let mut ret: H256 = [0u8; 32];
|
||||
for _ in 0..epochs {
|
||||
unsafe { sha3::sha3_256(ret[..].as_mut_ptr(), 32, ret[..].as_ptr(), 32) };
|
||||
}
|
||||
ret
|
||||
}
|
||||
|
||||
/// Difficulty quick check for POW preverification
|
||||
///
|
||||
/// `header_hash` The hash of the header
|
||||
@@ -100,27 +189,17 @@ fn fnv_hash(x: u32, y: u32) -> u32 {
|
||||
/// `mix_hash` The mix digest hash
|
||||
/// Boundary recovered from mix hash
|
||||
pub fn quick_get_difficulty(header_hash: &H256, nonce: u64, mix_hash: &H256) -> H256 {
|
||||
unsafe {
|
||||
// This is safe - the `keccak_512` call below reads the first 40 bytes (which we explicitly set
|
||||
// with two `copy_nonoverlapping` calls) but writes the first 64, and then we explicitly write
|
||||
// the next 32 bytes before we read the whole thing with `keccak_256`.
|
||||
//
|
||||
// This cannot be elided by the compiler as it doesn't know the implementation of
|
||||
// `keccak_512`.
|
||||
let mut buf: [u8; 64 + 32] = mem::uninitialized();
|
||||
let mut buf = [0u8; 64 + 32];
|
||||
unsafe { ptr::copy_nonoverlapping(header_hash.as_ptr(), buf.as_mut_ptr(), 32) };
|
||||
unsafe { ptr::copy_nonoverlapping(mem::transmute(&nonce), buf[32..].as_mut_ptr(), 8) };
|
||||
|
||||
ptr::copy_nonoverlapping(header_hash.as_ptr(), buf.as_mut_ptr(), 32);
|
||||
ptr::copy_nonoverlapping(&nonce as *const u64 as *const u8, buf[32..].as_mut_ptr(), 8);
|
||||
unsafe { sha3::sha3_512(buf.as_mut_ptr(), 64, buf.as_ptr(), 40) };
|
||||
unsafe { ptr::copy_nonoverlapping(mix_hash.as_ptr(), buf[64..].as_mut_ptr(), 32) };
|
||||
|
||||
keccak_512::unchecked(buf.as_mut_ptr(), 64, buf.as_ptr(), 40);
|
||||
ptr::copy_nonoverlapping(mix_hash.as_ptr(), buf[64..].as_mut_ptr(), 32);
|
||||
|
||||
// This is initialized in `keccak_256`
|
||||
let mut hash: [u8; 32] = mem::uninitialized();
|
||||
keccak_256::unchecked(hash.as_mut_ptr(), hash.len(), buf.as_ptr(), buf.len());
|
||||
|
||||
hash
|
||||
}
|
||||
let mut hash = [0u8; 32];
|
||||
unsafe { sha3::sha3_256(hash.as_mut_ptr(), hash.len(), buf.as_ptr(), buf.len()) };
|
||||
hash.as_mut_ptr();
|
||||
hash
|
||||
}
|
||||
|
||||
/// Calculate the light client data
|
||||
@@ -132,285 +211,174 @@ pub fn light_compute(light: &Light, header_hash: &H256, nonce: u64) -> ProofOfWo
|
||||
hash_compute(light, full_size, header_hash, nonce)
|
||||
}
|
||||
|
||||
fn hash_compute(light: &Light, full_size: usize, header_hash: &H256, nonce: u64) -> ProofOfWork {
|
||||
macro_rules! make_const_array {
|
||||
($n:expr, $value:expr) => {{
|
||||
// We use explicit lifetimes to ensure that val's borrow is invalidated until the
|
||||
// transmuted val dies.
|
||||
unsafe fn make_const_array<T, U>(val: &mut [T]) -> &mut [U; $n] {
|
||||
use ::std::mem;
|
||||
|
||||
debug_assert_eq!(val.len() * mem::size_of::<T>(), $n * mem::size_of::<U>());
|
||||
&mut *(val.as_mut_ptr() as *mut [U; $n])
|
||||
}
|
||||
|
||||
make_const_array($value)
|
||||
}}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
struct MixBuf {
|
||||
half_mix: Node,
|
||||
compress_bytes: [u8; MIX_WORDS],
|
||||
};
|
||||
|
||||
fn hash_compute(light: &Light, full_size: usize, header_hash: &H256, nonce: u64) -> ProofOfWork {
|
||||
if full_size % MIX_WORDS != 0 {
|
||||
panic!("Unaligned full size");
|
||||
}
|
||||
// pack hash and nonce together into first 40 bytes of s_mix
|
||||
let mut s_mix: [Node; MIX_NODES + 1] = [ Node::default(), Node::default(), Node::default() ];
|
||||
unsafe { ptr::copy_nonoverlapping(header_hash.as_ptr(), s_mix.get_unchecked_mut(0).bytes.as_mut_ptr(), 32) };
|
||||
unsafe { ptr::copy_nonoverlapping(mem::transmute(&nonce), s_mix.get_unchecked_mut(0).bytes[32..].as_mut_ptr(), 8) };
|
||||
|
||||
// You may be asking yourself: what in the name of Crypto Jesus is going on here? So: we need
|
||||
// `half_mix` and `compress_bytes` in a single array later down in the code (we hash them
|
||||
// together to create `value`) so that we can hash the full array. However, we do a bunch of
|
||||
// reading and writing to these variables first. We originally allocated two arrays and then
|
||||
// stuck them together with `ptr::copy_nonoverlapping` at the end, but this method is
|
||||
// _significantly_ faster - by my benchmarks, a consistent 3-5%. This is the most ridiculous
|
||||
// optimization I have ever done and I am so sorry. I can only chalk it up to cache locality
|
||||
// improvements, since I can't imagine that 3-5% of our runtime is taken up by catting two
|
||||
// arrays together.
|
||||
let mut buf: MixBuf = MixBuf {
|
||||
half_mix: unsafe {
|
||||
// Pack `header_hash` and `nonce` together
|
||||
// We explicitly write the first 40 bytes, leaving the last 24 as uninitialized. Then
|
||||
// `keccak_512` reads the first 40 bytes (4th parameter) and overwrites the entire array,
|
||||
// leaving it fully initialized.
|
||||
let mut out: [u8; NODE_BYTES] = mem::uninitialized();
|
||||
// compute sha3-512 hash and replicate across mix
|
||||
unsafe {
|
||||
sha3::sha3_512(s_mix.get_unchecked_mut(0).bytes.as_mut_ptr(), NODE_BYTES, s_mix.get_unchecked(0).bytes.as_ptr(), 40);
|
||||
let (f_mix, mut mix) = s_mix.split_at_mut(1);
|
||||
for w in 0..MIX_WORDS {
|
||||
*mix.get_unchecked_mut(0).as_words_mut().get_unchecked_mut(w) = *f_mix.get_unchecked(0).as_words().get_unchecked(w % NODE_WORDS);
|
||||
}
|
||||
|
||||
ptr::copy_nonoverlapping(header_hash.as_ptr(), out.as_mut_ptr(), header_hash.len());
|
||||
ptr::copy_nonoverlapping(
|
||||
&nonce as *const u64 as *const u8,
|
||||
out[header_hash.len()..].as_mut_ptr(),
|
||||
mem::size_of::<u64>(),
|
||||
);
|
||||
let page_size = 4 * MIX_WORDS;
|
||||
let num_full_pages = (full_size / page_size) as u32;
|
||||
|
||||
// compute keccak-512 hash and replicate across mix
|
||||
keccak_512::unchecked(
|
||||
out.as_mut_ptr(),
|
||||
NODE_BYTES,
|
||||
out.as_ptr(),
|
||||
header_hash.len() + mem::size_of::<u64>(),
|
||||
);
|
||||
|
||||
Node { bytes: out }
|
||||
},
|
||||
// This is fully initialized before being read, see `let mut compress = ...` below
|
||||
compress_bytes: unsafe { mem::uninitialized() },
|
||||
};
|
||||
|
||||
let mut mix: [_; MIX_NODES] = [buf.half_mix.clone(), buf.half_mix.clone()];
|
||||
|
||||
let page_size = 4 * MIX_WORDS;
|
||||
let num_full_pages = (full_size / page_size) as u32;
|
||||
// deref once for better performance
|
||||
let cache: &[Node] = light.cache.as_ref();
|
||||
let first_val = buf.half_mix.as_words()[0];
|
||||
|
||||
debug_assert_eq!(MIX_NODES, 2);
|
||||
debug_assert_eq!(NODE_WORDS, 16);
|
||||
|
||||
for i in 0..ETHASH_ACCESSES as u32 {
|
||||
let index = {
|
||||
// This is trivially safe, but does not work on big-endian. The safety of this is
|
||||
// asserted in debug builds (see the definition of `make_const_array!`).
|
||||
let mix_words: &mut [u32; MIX_WORDS] =
|
||||
unsafe { make_const_array!(MIX_WORDS, &mut mix) };
|
||||
|
||||
fnv_hash(first_val ^ i, mix_words[i as usize % MIX_WORDS]) % num_full_pages
|
||||
};
|
||||
|
||||
unroll! {
|
||||
// MIX_NODES
|
||||
for n in 0..2 {
|
||||
let tmp_node = calculate_dag_item(
|
||||
index * MIX_NODES as u32 + n as u32,
|
||||
cache,
|
||||
);
|
||||
|
||||
unroll! {
|
||||
// NODE_WORDS
|
||||
for w in 0..16 {
|
||||
mix[n].as_words_mut()[w] =
|
||||
fnv_hash(
|
||||
mix[n].as_words()[w],
|
||||
tmp_node.as_words()[w],
|
||||
);
|
||||
}
|
||||
for i in 0..(ETHASH_ACCESSES as u32) {
|
||||
let index = fnv_hash(f_mix.get_unchecked(0).as_words().get_unchecked(0) ^ i, *mix.get_unchecked(0).as_words().get_unchecked((i as usize) % MIX_WORDS)) % num_full_pages;
|
||||
for n in 0..MIX_NODES {
|
||||
let tmp_node = calculate_dag_item(index * MIX_NODES as u32 + n as u32, light);
|
||||
for w in 0..NODE_WORDS {
|
||||
*mix.get_unchecked_mut(n).as_words_mut().get_unchecked_mut(w) = fnv_hash(*mix.get_unchecked(n).as_words().get_unchecked(w), *tmp_node.as_words().get_unchecked(w));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// compress mix
|
||||
for i in 0..(MIX_WORDS / 4) {
|
||||
let w = i * 4;
|
||||
let mut reduction = *mix.get_unchecked(0).as_words().get_unchecked(w + 0);
|
||||
reduction = reduction.wrapping_mul(FNV_PRIME) ^ *mix.get_unchecked(0).as_words().get_unchecked(w + 1);
|
||||
reduction = reduction.wrapping_mul(FNV_PRIME) ^ *mix.get_unchecked(0).as_words().get_unchecked(w + 2);
|
||||
reduction = reduction.wrapping_mul(FNV_PRIME) ^ *mix.get_unchecked(0).as_words().get_unchecked(w + 3);
|
||||
*mix.get_unchecked_mut(0).as_words_mut().get_unchecked_mut(i) = reduction;
|
||||
}
|
||||
|
||||
let mut mix_hash = [0u8; 32];
|
||||
let mut buf = [0u8; 32 + 64];
|
||||
ptr::copy_nonoverlapping(f_mix.get_unchecked_mut(0).bytes.as_ptr(), buf.as_mut_ptr(), 64);
|
||||
ptr::copy_nonoverlapping(mix.get_unchecked_mut(0).bytes.as_ptr(), buf[64..].as_mut_ptr(), 32);
|
||||
ptr::copy_nonoverlapping(mix.get_unchecked_mut(0).bytes.as_ptr(), mix_hash.as_mut_ptr(), 32);
|
||||
let mut value: H256 = [0u8; 32];
|
||||
sha3::sha3_256(value.as_mut_ptr(), value.len(), buf.as_ptr(), buf.len());
|
||||
ProofOfWork {
|
||||
mix_hash: mix_hash,
|
||||
value: value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let mix_words: [u32; MIX_WORDS] = unsafe { mem::transmute(mix) };
|
||||
fn calculate_dag_item(node_index: u32, light: &Light) -> Node {
|
||||
unsafe {
|
||||
let num_parent_nodes = light.cache.len();
|
||||
let cache_nodes = &light.cache;
|
||||
let init = cache_nodes.get_unchecked(node_index as usize % num_parent_nodes);
|
||||
let mut ret = init.clone();
|
||||
*ret.as_words_mut().get_unchecked_mut(0) ^= node_index;
|
||||
sha3::sha3_512(ret.bytes.as_mut_ptr(), ret.bytes.len(), ret.bytes.as_ptr(), ret.bytes.len());
|
||||
|
||||
{
|
||||
// This is an uninitialized buffer to begin with, but we iterate precisely `compress.len()`
|
||||
// times and set each index, leaving the array fully initialized. THIS ONLY WORKS ON LITTLE-
|
||||
// ENDIAN MACHINES. See a future PR to make this and the rest of the code work correctly on
|
||||
// big-endian arches like mips.
|
||||
let compress: &mut [u32; MIX_WORDS / 4] =
|
||||
unsafe { make_const_array!(MIX_WORDS / 4, &mut buf.compress_bytes) };
|
||||
for i in 0..ETHASH_DATASET_PARENTS {
|
||||
let parent_index = fnv_hash(node_index ^ i, *ret.as_words().get_unchecked(i as usize % NODE_WORDS)) % num_parent_nodes as u32;
|
||||
let parent = cache_nodes.get_unchecked(parent_index as usize);
|
||||
for w in 0..NODE_WORDS {
|
||||
*ret.as_words_mut().get_unchecked_mut(w) = fnv_hash(*ret.as_words().get_unchecked(w), *parent.as_words().get_unchecked(w));
|
||||
}
|
||||
}
|
||||
sha3::sha3_512(ret.bytes.as_mut_ptr(), ret.bytes.len(), ret.bytes.as_ptr(), ret.bytes.len());
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
// Compress mix
|
||||
debug_assert_eq!(MIX_WORDS / 4, 8);
|
||||
unroll! {
|
||||
for i in 0..8 {
|
||||
let w = i * 4;
|
||||
fn light_new(block_number: u64) -> Light {
|
||||
let seedhash = get_seedhash(block_number);
|
||||
let cache_size = get_cache_size(block_number);
|
||||
|
||||
let mut reduction = mix_words[w + 0];
|
||||
reduction = reduction.wrapping_mul(FNV_PRIME) ^ mix_words[w + 1];
|
||||
reduction = reduction.wrapping_mul(FNV_PRIME) ^ mix_words[w + 2];
|
||||
reduction = reduction.wrapping_mul(FNV_PRIME) ^ mix_words[w + 3];
|
||||
compress[i] = reduction;
|
||||
if cache_size % NODE_BYTES != 0 {
|
||||
panic!("Unaligned cache size");
|
||||
}
|
||||
let num_nodes = cache_size / NODE_BYTES;
|
||||
|
||||
let mut nodes = Vec::with_capacity(num_nodes);
|
||||
nodes.resize(num_nodes, Node::default());
|
||||
unsafe {
|
||||
sha3_512(&seedhash[0..32], &mut nodes.get_unchecked_mut(0).bytes);
|
||||
for i in 1..num_nodes {
|
||||
sha3::sha3_512(nodes.get_unchecked_mut(i).bytes.as_mut_ptr(), NODE_BYTES, nodes.get_unchecked(i - 1).bytes.as_ptr(), NODE_BYTES);
|
||||
}
|
||||
|
||||
for _ in 0..ETHASH_CACHE_ROUNDS {
|
||||
for i in 0..num_nodes {
|
||||
let idx = *nodes.get_unchecked_mut(i).as_words().get_unchecked(0) as usize % num_nodes;
|
||||
let mut data = nodes.get_unchecked((num_nodes - 1 + i) % num_nodes).clone();
|
||||
for w in 0..NODE_WORDS {
|
||||
*data.as_words_mut().get_unchecked_mut(w) ^= *nodes.get_unchecked(idx).as_words().get_unchecked(w) ;
|
||||
}
|
||||
sha3_512(&data.bytes, &mut nodes.get_unchecked_mut(i).bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let mix_hash = buf.compress_bytes;
|
||||
|
||||
let value: H256 = {
|
||||
// We can interpret the buffer as an array of `u8`s, since it's `repr(C)`.
|
||||
let read_ptr: *const u8 = &buf as *const MixBuf as *const u8;
|
||||
// We overwrite the second half since `keccak_256` has an internal buffer and so allows
|
||||
// overlapping arrays as input.
|
||||
let write_ptr: *mut u8 = &mut buf.compress_bytes as *mut [u8; 32] as *mut u8;
|
||||
unsafe {
|
||||
keccak_256::unchecked(
|
||||
write_ptr,
|
||||
buf.compress_bytes.len(),
|
||||
read_ptr,
|
||||
buf.half_mix.bytes.len() + buf.compress_bytes.len(),
|
||||
);
|
||||
}
|
||||
buf.compress_bytes
|
||||
};
|
||||
|
||||
ProofOfWork { mix_hash: mix_hash, value: value }
|
||||
}
|
||||
|
||||
// TODO: Use the `simd` crate
|
||||
fn calculate_dag_item(node_index: u32, cache: &[Node]) -> Node {
|
||||
let num_parent_nodes = cache.len();
|
||||
let mut ret = cache[node_index as usize % num_parent_nodes].clone();
|
||||
ret.as_words_mut()[0] ^= node_index;
|
||||
|
||||
keccak_512::inplace(ret.as_bytes_mut());
|
||||
|
||||
debug_assert_eq!(NODE_WORDS, 16);
|
||||
for i in 0..ETHASH_DATASET_PARENTS as u32 {
|
||||
let parent_index = fnv_hash(node_index ^ i, ret.as_words()[i as usize % NODE_WORDS]) %
|
||||
num_parent_nodes as u32;
|
||||
let parent = &cache[parent_index as usize];
|
||||
|
||||
unroll! {
|
||||
for w in 0..16 {
|
||||
ret.as_words_mut()[w] = fnv_hash(ret.as_words()[w], parent.as_words()[w]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
keccak_512::inplace(ret.as_bytes_mut());
|
||||
|
||||
ret
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use std::fs;
|
||||
use tempdir::TempDir;
|
||||
|
||||
#[test]
|
||||
fn test_get_cache_size() {
|
||||
// https://github.com/ethereum/wiki/wiki/Ethash/ef6b93f9596746a088ea95d01ca2778be43ae68f#data-sizes
|
||||
assert_eq!(16776896usize, get_cache_size(0));
|
||||
assert_eq!(16776896usize, get_cache_size(1));
|
||||
assert_eq!(16776896usize, get_cache_size(ETHASH_EPOCH_LENGTH - 1));
|
||||
assert_eq!(16907456usize, get_cache_size(ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(16907456usize, get_cache_size(ETHASH_EPOCH_LENGTH + 1));
|
||||
assert_eq!(284950208usize, get_cache_size(2046 * ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(285081536usize, get_cache_size(2047 * ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(285081536usize, get_cache_size(2048 * ETHASH_EPOCH_LENGTH - 1));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_data_size() {
|
||||
// https://github.com/ethereum/wiki/wiki/Ethash/ef6b93f9596746a088ea95d01ca2778be43ae68f#data-sizes
|
||||
assert_eq!(1073739904usize, get_data_size(0));
|
||||
assert_eq!(1073739904usize, get_data_size(1));
|
||||
assert_eq!(1073739904usize, get_data_size(ETHASH_EPOCH_LENGTH - 1));
|
||||
assert_eq!(1082130304usize, get_data_size(ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(1082130304usize, get_data_size(ETHASH_EPOCH_LENGTH + 1));
|
||||
assert_eq!(18236833408usize, get_data_size(2046 * ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(18245220736usize, get_data_size(2047 * ETHASH_EPOCH_LENGTH));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_difficulty_test() {
|
||||
let hash = [
|
||||
0xf5, 0x7e, 0x6f, 0x3a, 0xcf, 0xc0, 0xdd, 0x4b, 0x5b, 0xf2, 0xbe, 0xe4, 0x0a, 0xb3,
|
||||
0x35, 0x8a, 0xa6, 0x87, 0x73, 0xa8, 0xd0, 0x9f, 0x5e, 0x59, 0x5e, 0xab, 0x55, 0x94,
|
||||
0x05, 0x52, 0x7d, 0x72,
|
||||
];
|
||||
let mix_hash = [
|
||||
0x1f, 0xff, 0x04, 0xce, 0xc9, 0x41, 0x73, 0xfd, 0x59, 0x1e, 0x3d, 0x89, 0x60, 0xce,
|
||||
0x6b, 0xdf, 0x8b, 0x19, 0x71, 0x04, 0x8c, 0x71, 0xff, 0x93, 0x7b, 0xb2, 0xd3, 0x2a,
|
||||
0x64, 0x31, 0xab, 0x6d,
|
||||
];
|
||||
let nonce = 0xd7b3ac70a301a249;
|
||||
let boundary_good = [
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0x9b, 0x6c, 0x69, 0xbc, 0x2c, 0xe2, 0xa2,
|
||||
0x4a, 0x8e, 0x95, 0x69, 0xef, 0xc7, 0xd7, 0x1b, 0x33, 0x35, 0xdf, 0x36, 0x8c, 0x9a,
|
||||
0xe9, 0x7e, 0x53, 0x84,
|
||||
];
|
||||
assert_eq!(quick_get_difficulty(&hash, nonce, &mix_hash)[..], boundary_good[..]);
|
||||
let boundary_bad = [
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3a, 0x9b, 0x6c, 0x69, 0xbc, 0x2c, 0xe2, 0xa2,
|
||||
0x4a, 0x8e, 0x95, 0x69, 0xef, 0xc7, 0xd7, 0x1b, 0x33, 0x35, 0xdf, 0x36, 0x8c, 0x9a,
|
||||
0xe9, 0x7e, 0x53, 0x84,
|
||||
];
|
||||
assert!(quick_get_difficulty(&hash, nonce, &mix_hash)[..] != boundary_bad[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_light_compute() {
|
||||
let hash = [
|
||||
0xf5, 0x7e, 0x6f, 0x3a, 0xcf, 0xc0, 0xdd, 0x4b, 0x5b, 0xf2, 0xbe, 0xe4, 0x0a, 0xb3,
|
||||
0x35, 0x8a, 0xa6, 0x87, 0x73, 0xa8, 0xd0, 0x9f, 0x5e, 0x59, 0x5e, 0xab, 0x55, 0x94,
|
||||
0x05, 0x52, 0x7d, 0x72,
|
||||
];
|
||||
let mix_hash = [
|
||||
0x1f, 0xff, 0x04, 0xce, 0xc9, 0x41, 0x73, 0xfd, 0x59, 0x1e, 0x3d, 0x89, 0x60, 0xce,
|
||||
0x6b, 0xdf, 0x8b, 0x19, 0x71, 0x04, 0x8c, 0x71, 0xff, 0x93, 0x7b, 0xb2, 0xd3, 0x2a,
|
||||
0x64, 0x31, 0xab, 0x6d,
|
||||
];
|
||||
let boundary = [
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0x9b, 0x6c, 0x69, 0xbc, 0x2c, 0xe2, 0xa2,
|
||||
0x4a, 0x8e, 0x95, 0x69, 0xef, 0xc7, 0xd7, 0x1b, 0x33, 0x35, 0xdf, 0x36, 0x8c, 0x9a,
|
||||
0xe9, 0x7e, 0x53, 0x84,
|
||||
];
|
||||
let nonce = 0xd7b3ac70a301a249;
|
||||
|
||||
let tempdir = TempDir::new("").unwrap();
|
||||
// difficulty = 0x085657254bd9u64;
|
||||
let light = NodeCacheBuilder::new(None).light(tempdir.path(), 486382);
|
||||
let result = light_compute(&light, &hash, nonce);
|
||||
assert_eq!(result.mix_hash[..], mix_hash[..]);
|
||||
assert_eq!(result.value[..], boundary[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_drop_old_data() {
|
||||
let tempdir = TempDir::new("").unwrap();
|
||||
let builder = NodeCacheBuilder::new(None);
|
||||
let first = builder.light(tempdir.path(), 0).to_file().unwrap().to_owned();
|
||||
|
||||
let second = builder.light(tempdir.path(), ETHASH_EPOCH_LENGTH).to_file().unwrap().to_owned();
|
||||
assert!(fs::metadata(&first).is_ok());
|
||||
|
||||
let _ = builder.light(tempdir.path(), ETHASH_EPOCH_LENGTH * 2).to_file();
|
||||
assert!(fs::metadata(&first).is_err());
|
||||
assert!(fs::metadata(&second).is_ok());
|
||||
|
||||
let _ = builder.light(tempdir.path(), ETHASH_EPOCH_LENGTH * 3).to_file();
|
||||
assert!(fs::metadata(&second).is_err());
|
||||
Light {
|
||||
cache: nodes,
|
||||
block_number: block_number,
|
||||
}
|
||||
}
|
||||
|
||||
static CHARS: &'static[u8] = b"0123456789abcdef";
|
||||
fn to_hex(bytes: &[u8]) -> String {
|
||||
let mut v = Vec::with_capacity(bytes.len() * 2);
|
||||
for &byte in bytes.iter() {
|
||||
v.push(CHARS[(byte >> 4) as usize]);
|
||||
v.push(CHARS[(byte & 0xf) as usize]);
|
||||
}
|
||||
|
||||
unsafe {
|
||||
String::from_utf8_unchecked(v)
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_cache_size() {
|
||||
// https://github.com/ethereum/wiki/wiki/Ethash/ef6b93f9596746a088ea95d01ca2778be43ae68f#data-sizes
|
||||
assert_eq!(16776896usize, get_cache_size(0));
|
||||
assert_eq!(16776896usize, get_cache_size(1));
|
||||
assert_eq!(16776896usize, get_cache_size(ETHASH_EPOCH_LENGTH - 1));
|
||||
assert_eq!(16907456usize, get_cache_size(ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(16907456usize, get_cache_size(ETHASH_EPOCH_LENGTH + 1));
|
||||
assert_eq!(284950208usize, get_cache_size(2046 * ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(285081536usize, get_cache_size(2047 * ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(285081536usize, get_cache_size(2048 * ETHASH_EPOCH_LENGTH - 1));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_data_size() {
|
||||
// https://github.com/ethereum/wiki/wiki/Ethash/ef6b93f9596746a088ea95d01ca2778be43ae68f#data-sizes
|
||||
assert_eq!(1073739904usize, get_data_size(0));
|
||||
assert_eq!(1073739904usize, get_data_size(1));
|
||||
assert_eq!(1073739904usize, get_data_size(ETHASH_EPOCH_LENGTH - 1));
|
||||
assert_eq!(1082130304usize, get_data_size(ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(1082130304usize, get_data_size(ETHASH_EPOCH_LENGTH + 1));
|
||||
assert_eq!(18236833408usize, get_data_size(2046 * ETHASH_EPOCH_LENGTH));
|
||||
assert_eq!(18245220736usize, get_data_size(2047 * ETHASH_EPOCH_LENGTH));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_difficulty_test() {
|
||||
let hash = [0xf5, 0x7e, 0x6f, 0x3a, 0xcf, 0xc0, 0xdd, 0x4b, 0x5b, 0xf2, 0xbe, 0xe4, 0x0a, 0xb3, 0x35, 0x8a, 0xa6, 0x87, 0x73, 0xa8, 0xd0, 0x9f, 0x5e, 0x59, 0x5e, 0xab, 0x55, 0x94, 0x05, 0x52, 0x7d, 0x72];
|
||||
let mix_hash = [0x1f, 0xff, 0x04, 0xce, 0xc9, 0x41, 0x73, 0xfd, 0x59, 0x1e, 0x3d, 0x89, 0x60, 0xce, 0x6b, 0xdf, 0x8b, 0x19, 0x71, 0x04, 0x8c, 0x71, 0xff, 0x93, 0x7b, 0xb2, 0xd3, 0x2a, 0x64, 0x31, 0xab, 0x6d ];
|
||||
let nonce = 0xd7b3ac70a301a249;
|
||||
let boundary_good = [0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0x9b, 0x6c, 0x69, 0xbc, 0x2c, 0xe2, 0xa2, 0x4a, 0x8e, 0x95, 0x69, 0xef, 0xc7, 0xd7, 0x1b, 0x33, 0x35, 0xdf, 0x36, 0x8c, 0x9a, 0xe9, 0x7e, 0x53, 0x84];
|
||||
assert_eq!(quick_get_difficulty(&hash, nonce, &mix_hash)[..], boundary_good[..]);
|
||||
let boundary_bad = [0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3a, 0x9b, 0x6c, 0x69, 0xbc, 0x2c, 0xe2, 0xa2, 0x4a, 0x8e, 0x95, 0x69, 0xef, 0xc7, 0xd7, 0x1b, 0x33, 0x35, 0xdf, 0x36, 0x8c, 0x9a, 0xe9, 0x7e, 0x53, 0x84];
|
||||
assert!(quick_get_difficulty(&hash, nonce, &mix_hash)[..] != boundary_bad[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_light_compute() {
|
||||
let hash = [0xf5, 0x7e, 0x6f, 0x3a, 0xcf, 0xc0, 0xdd, 0x4b, 0x5b, 0xf2, 0xbe, 0xe4, 0x0a, 0xb3, 0x35, 0x8a, 0xa6, 0x87, 0x73, 0xa8, 0xd0, 0x9f, 0x5e, 0x59, 0x5e, 0xab, 0x55, 0x94, 0x05, 0x52, 0x7d, 0x72];
|
||||
let mix_hash = [0x1f, 0xff, 0x04, 0xce, 0xc9, 0x41, 0x73, 0xfd, 0x59, 0x1e, 0x3d, 0x89, 0x60, 0xce, 0x6b, 0xdf, 0x8b, 0x19, 0x71, 0x04, 0x8c, 0x71, 0xff, 0x93, 0x7b, 0xb2, 0xd3, 0x2a, 0x64, 0x31, 0xab, 0x6d ];
|
||||
let boundary = [0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0x9b, 0x6c, 0x69, 0xbc, 0x2c, 0xe2, 0xa2, 0x4a, 0x8e, 0x95, 0x69, 0xef, 0xc7, 0xd7, 0x1b, 0x33, 0x35, 0xdf, 0x36, 0x8c, 0x9a, 0xe9, 0x7e, 0x53, 0x84];
|
||||
let nonce = 0xd7b3ac70a301a249;
|
||||
// difficulty = 0x085657254bd9u64;
|
||||
let light = Light::new(486382);
|
||||
let result = light_compute(&light, &hash, nonce);
|
||||
assert_eq!(result.mix_hash[..], mix_hash[..]);
|
||||
assert_eq!(result.value[..], boundary[..]);
|
||||
}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
extern crate keccak_hash as hash;
|
||||
|
||||
pub type H256 = [u8; 32];
|
||||
|
||||
pub mod keccak_512 {
|
||||
use super::hash;
|
||||
|
||||
pub use self::hash::keccak_512_unchecked as unchecked;
|
||||
|
||||
pub fn write(input: &[u8], output: &mut [u8]) {
|
||||
hash::keccak_512(input, output);
|
||||
}
|
||||
|
||||
pub fn inplace(input: &mut [u8]) {
|
||||
// This is safe since `keccak_*` uses an internal buffer and copies the result to the output. This
|
||||
// means that we can reuse the input buffer for both input and output.
|
||||
unsafe {
|
||||
hash::keccak_512_unchecked(input.as_mut_ptr(), input.len(), input.as_ptr(), input.len());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod keccak_256 {
|
||||
use super::hash;
|
||||
|
||||
pub use self::hash::keccak_256_unchecked as unchecked;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn write(input: &[u8], output: &mut [u8]) {
|
||||
hash::keccak_256(input, output);
|
||||
}
|
||||
|
||||
pub fn inplace(input: &mut [u8]) {
|
||||
// This is safe since `keccak_*` uses an internal buffer and copies the result to the output. This
|
||||
// means that we can reuse the input buffer for both input and output.
|
||||
unsafe {
|
||||
hash::keccak_256_unchecked(input.as_mut_ptr(), input.len(), input.as_ptr(), input.len());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
@@ -14,40 +14,19 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#![cfg_attr(feature = "benches", feature(test))]
|
||||
|
||||
extern crate either;
|
||||
extern crate ethereum_types;
|
||||
extern crate memmap;
|
||||
extern crate parking_lot;
|
||||
//! Ethash implementation
|
||||
//! See https://github.com/ethereum/wiki/wiki/Ethash
|
||||
extern crate primal;
|
||||
|
||||
#[macro_use]
|
||||
extern crate crunchy;
|
||||
extern crate sha3;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate tempdir;
|
||||
|
||||
mod compute;
|
||||
mod seed_compute;
|
||||
mod cache;
|
||||
mod keccak;
|
||||
mod shared;
|
||||
|
||||
pub use cache::{NodeCacheBuilder, OptimizeFor};
|
||||
pub use compute::{ProofOfWork, quick_get_difficulty, slow_hash_block_number};
|
||||
use compute::Light;
|
||||
use ethereum_types::{U256, U512};
|
||||
use keccak::H256;
|
||||
use parking_lot::Mutex;
|
||||
pub use seed_compute::SeedHashCompute;
|
||||
pub use shared::ETHASH_EPOCH_LENGTH;
|
||||
use std::mem;
|
||||
use std::path::{Path, PathBuf};
|
||||
use compute::Light;
|
||||
pub use compute::{get_seedhash, quick_get_difficulty, H256, ProofOfWork, ETHASH_EPOCH_LENGTH};
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
struct LightCache {
|
||||
recent_epoch: Option<u64>,
|
||||
@@ -58,17 +37,13 @@ struct LightCache {
|
||||
|
||||
/// Light/Full cache manager.
|
||||
pub struct EthashManager {
|
||||
nodecache_builder: NodeCacheBuilder,
|
||||
cache: Mutex<LightCache>,
|
||||
cache_dir: PathBuf,
|
||||
}
|
||||
|
||||
impl EthashManager {
|
||||
/// Create a new new instance of ethash manager
|
||||
pub fn new<T: Into<Option<OptimizeFor>>>(cache_dir: &Path, optimize_for: T) -> EthashManager {
|
||||
pub fn new() -> EthashManager {
|
||||
EthashManager {
|
||||
cache_dir: cache_dir.to_path_buf(),
|
||||
nodecache_builder: NodeCacheBuilder::new(optimize_for.into().unwrap_or_default()),
|
||||
cache: Mutex::new(LightCache {
|
||||
recent_epoch: None,
|
||||
recent: None,
|
||||
@@ -86,41 +61,30 @@ impl EthashManager {
|
||||
pub fn compute_light(&self, block_number: u64, header_hash: &H256, nonce: u64) -> ProofOfWork {
|
||||
let epoch = block_number / ETHASH_EPOCH_LENGTH;
|
||||
let light = {
|
||||
let mut lights = self.cache.lock();
|
||||
let mut lights = self.cache.lock().unwrap();
|
||||
let light = match lights.recent_epoch.clone() {
|
||||
Some(ref e) if *e == epoch => lights.recent.clone(),
|
||||
_ => match lights.prev_epoch.clone() {
|
||||
Some(e) if e == epoch => {
|
||||
// don't swap if recent is newer.
|
||||
if lights.recent_epoch > lights.prev_epoch {
|
||||
None
|
||||
} else {
|
||||
// swap
|
||||
let t = lights.prev_epoch;
|
||||
lights.prev_epoch = lights.recent_epoch;
|
||||
lights.recent_epoch = t;
|
||||
let t = lights.prev.clone();
|
||||
lights.prev = lights.recent.clone();
|
||||
lights.recent = t;
|
||||
lights.recent.clone()
|
||||
}
|
||||
// swap
|
||||
let t = lights.prev_epoch;
|
||||
lights.prev_epoch = lights.recent_epoch;
|
||||
lights.recent_epoch = t;
|
||||
let t = lights.prev.clone();
|
||||
lights.prev = lights.recent.clone();
|
||||
lights.recent = t;
|
||||
lights.recent.clone()
|
||||
}
|
||||
_ => None,
|
||||
},
|
||||
}
|
||||
};
|
||||
match light {
|
||||
None => {
|
||||
let light = match self.nodecache_builder.light_from_file(
|
||||
&self.cache_dir,
|
||||
block_number,
|
||||
) {
|
||||
let light = match Light::from_file(block_number) {
|
||||
Ok(light) => Arc::new(light),
|
||||
Err(e) => {
|
||||
debug!("Light cache file not found for {}:{}", block_number, e);
|
||||
let mut light = self.nodecache_builder.light(
|
||||
&self.cache_dir,
|
||||
block_number,
|
||||
);
|
||||
let light = Light::new(block_number);
|
||||
if let Err(e) = light.to_file() {
|
||||
warn!("Light cache file write error: {}", e);
|
||||
}
|
||||
@@ -131,185 +95,25 @@ impl EthashManager {
|
||||
lights.prev = mem::replace(&mut lights.recent, Some(light.clone()));
|
||||
light
|
||||
}
|
||||
Some(light) => light,
|
||||
Some(light) => light
|
||||
}
|
||||
};
|
||||
light.compute(header_hash, nonce)
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert an Ethash boundary to its original difficulty. Basically just `f(x) = 2^256 / x`.
|
||||
pub fn boundary_to_difficulty(boundary: ðereum_types::H256) -> U256 {
|
||||
difficulty_to_boundary_aux(&**boundary)
|
||||
}
|
||||
|
||||
/// Convert an Ethash difficulty to the target boundary. Basically just `f(x) = 2^256 / x`.
|
||||
pub fn difficulty_to_boundary(difficulty: &U256) -> ethereum_types::H256 {
|
||||
difficulty_to_boundary_aux(difficulty).into()
|
||||
}
|
||||
|
||||
fn difficulty_to_boundary_aux<T: Into<U512>>(difficulty: T) -> ethereum_types::U256 {
|
||||
let difficulty = difficulty.into();
|
||||
|
||||
assert!(!difficulty.is_zero());
|
||||
|
||||
if difficulty == U512::one() {
|
||||
U256::max_value()
|
||||
} else {
|
||||
// difficulty > 1, so result should never overflow 256 bits
|
||||
U256::from((U512::one() << 256) / difficulty)
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_lru() {
|
||||
use tempdir::TempDir;
|
||||
|
||||
let tempdir = TempDir::new("").unwrap();
|
||||
let ethash = EthashManager::new(tempdir.path(), None);
|
||||
let ethash = EthashManager::new();
|
||||
let hash = [0u8; 32];
|
||||
ethash.compute_light(1, &hash, 1);
|
||||
ethash.compute_light(50000, &hash, 1);
|
||||
assert_eq!(ethash.cache.lock().recent_epoch.unwrap(), 1);
|
||||
assert_eq!(ethash.cache.lock().prev_epoch.unwrap(), 0);
|
||||
assert_eq!(ethash.cache.lock().unwrap().recent_epoch.unwrap(), 1);
|
||||
assert_eq!(ethash.cache.lock().unwrap().prev_epoch.unwrap(), 0);
|
||||
ethash.compute_light(1, &hash, 1);
|
||||
assert_eq!(ethash.cache.lock().recent_epoch.unwrap(), 0);
|
||||
assert_eq!(ethash.cache.lock().prev_epoch.unwrap(), 1);
|
||||
assert_eq!(ethash.cache.lock().unwrap().recent_epoch.unwrap(), 0);
|
||||
assert_eq!(ethash.cache.lock().unwrap().prev_epoch.unwrap(), 1);
|
||||
ethash.compute_light(70000, &hash, 1);
|
||||
assert_eq!(ethash.cache.lock().recent_epoch.unwrap(), 2);
|
||||
assert_eq!(ethash.cache.lock().prev_epoch.unwrap(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_difficulty_to_boundary() {
|
||||
use ethereum_types::H256;
|
||||
use std::str::FromStr;
|
||||
|
||||
assert_eq!(difficulty_to_boundary(&U256::from(1)), H256::from(U256::max_value()));
|
||||
assert_eq!(difficulty_to_boundary(&U256::from(2)), H256::from_str("8000000000000000000000000000000000000000000000000000000000000000").unwrap());
|
||||
assert_eq!(difficulty_to_boundary(&U256::from(4)), H256::from_str("4000000000000000000000000000000000000000000000000000000000000000").unwrap());
|
||||
assert_eq!(difficulty_to_boundary(&U256::from(32)), H256::from_str("0800000000000000000000000000000000000000000000000000000000000000").unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_difficulty_to_boundary_regression() {
|
||||
use ethereum_types::H256;
|
||||
|
||||
// the last bit was originally being truncated when performing the conversion
|
||||
// https://github.com/paritytech/parity-ethereum/issues/8397
|
||||
for difficulty in 1..9 {
|
||||
assert_eq!(U256::from(difficulty), boundary_to_difficulty(&difficulty_to_boundary(&difficulty.into())));
|
||||
assert_eq!(H256::from(difficulty), difficulty_to_boundary(&boundary_to_difficulty(&difficulty.into())));
|
||||
assert_eq!(U256::from(difficulty), boundary_to_difficulty(&boundary_to_difficulty(&difficulty.into()).into()));
|
||||
assert_eq!(H256::from(difficulty), difficulty_to_boundary(&difficulty_to_boundary(&difficulty.into()).into()));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_difficulty_to_boundary_panics_on_zero() {
|
||||
difficulty_to_boundary(&U256::from(0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_boundary_to_difficulty_panics_on_zero() {
|
||||
boundary_to_difficulty(ðereum_types::H256::from(0));
|
||||
}
|
||||
|
||||
#[cfg(feature = "benches")]
|
||||
mod benchmarks {
|
||||
extern crate test;
|
||||
|
||||
use self::test::Bencher;
|
||||
use cache::{NodeCacheBuilder, OptimizeFor};
|
||||
use compute::{Light, light_compute};
|
||||
|
||||
const HASH: [u8; 32] = [0xf5, 0x7e, 0x6f, 0x3a, 0xcf, 0xc0, 0xdd, 0x4b, 0x5b, 0xf2, 0xbe,
|
||||
0xe4, 0x0a, 0xb3, 0x35, 0x8a, 0xa6, 0x87, 0x73, 0xa8, 0xd0, 0x9f,
|
||||
0x5e, 0x59, 0x5e, 0xab, 0x55, 0x94, 0x05, 0x52, 0x7d, 0x72];
|
||||
const NONCE: u64 = 0xd7b3ac70a301a249;
|
||||
|
||||
#[bench]
|
||||
fn bench_light_compute_memmap(b: &mut Bencher) {
|
||||
use std::env;
|
||||
|
||||
let builder = NodeCacheBuilder::new(OptimizeFor::Memory);
|
||||
let light = builder.light(&env::temp_dir(), 486382);
|
||||
|
||||
b.iter(|| light_compute(&light, &HASH, NONCE));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_light_compute_memory(b: &mut Bencher) {
|
||||
use std::env;
|
||||
|
||||
let builder = NodeCacheBuilder::new(OptimizeFor::Cpu);
|
||||
let light = builder.light(&env::temp_dir(), 486382);
|
||||
|
||||
b.iter(|| light_compute(&light, &HASH, NONCE));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
#[ignore]
|
||||
fn bench_light_new_round_trip_memmap(b: &mut Bencher) {
|
||||
use std::env;
|
||||
|
||||
b.iter(|| {
|
||||
let builder = NodeCacheBuilder::new(OptimizeFor::Memory);
|
||||
let light = builder.light(&env::temp_dir(), 486382);
|
||||
light_compute(&light, &HASH, NONCE);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
#[ignore]
|
||||
fn bench_light_new_round_trip_memory(b: &mut Bencher) {
|
||||
use std::env;
|
||||
|
||||
b.iter(|| {
|
||||
let builder = NodeCacheBuilder::new(OptimizeFor::Cpu);
|
||||
let light = builder.light(&env::temp_dir(), 486382);
|
||||
light_compute(&light, &HASH, NONCE);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_light_from_file_round_trip_memory(b: &mut Bencher) {
|
||||
use std::env;
|
||||
|
||||
let dir = env::temp_dir();
|
||||
let height = 486382;
|
||||
{
|
||||
let builder = NodeCacheBuilder::new(OptimizeFor::Cpu);
|
||||
let mut dummy = builder.light(&dir, height);
|
||||
dummy.to_file().unwrap();
|
||||
}
|
||||
|
||||
b.iter(|| {
|
||||
let builder = NodeCacheBuilder::new(OptimizeFor::Cpu);
|
||||
let light = builder.light_from_file(&dir, 486382).unwrap();
|
||||
light_compute(&light, &HASH, NONCE);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_light_from_file_round_trip_memmap(b: &mut Bencher) {
|
||||
use std::env;
|
||||
|
||||
let dir = env::temp_dir();
|
||||
let height = 486382;
|
||||
|
||||
{
|
||||
let builder = NodeCacheBuilder::new(OptimizeFor::Memory);
|
||||
let mut dummy = builder.light(&dir, height);
|
||||
dummy.to_file().unwrap();
|
||||
}
|
||||
|
||||
b.iter(|| {
|
||||
let builder = NodeCacheBuilder::new(OptimizeFor::Memory);
|
||||
let light = builder.light_from_file(&dir, 486382).unwrap();
|
||||
light_compute(&light, &HASH, NONCE);
|
||||
});
|
||||
}
|
||||
assert_eq!(ethash.cache.lock().unwrap().recent_epoch.unwrap(), 2);
|
||||
assert_eq!(ethash.cache.lock().unwrap().prev_epoch.unwrap(), 0);
|
||||
}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use shared;
|
||||
use keccak::{keccak_256, H256};
|
||||
|
||||
use std::cell::Cell;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct SeedHashCompute {
|
||||
prev_epoch: Cell<u64>,
|
||||
prev_seedhash: Cell<H256>,
|
||||
}
|
||||
|
||||
impl SeedHashCompute {
|
||||
#[inline]
|
||||
fn reset_cache(&self) {
|
||||
self.prev_epoch.set(0);
|
||||
self.prev_seedhash.set([0u8; 32]);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn hash_block_number(&self, block_number: u64) -> H256 {
|
||||
self.hash_epoch(shared::epoch(block_number))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn hash_epoch(&self, epoch: u64) -> H256 {
|
||||
if epoch < self.prev_epoch.get() {
|
||||
// can't build on previous hash if requesting an older block
|
||||
self.reset_cache();
|
||||
}
|
||||
if epoch > self.prev_epoch.get() {
|
||||
let seed_hash = SeedHashCompute::resume_compute_seedhash(
|
||||
self.prev_seedhash.get(),
|
||||
self.prev_epoch.get(),
|
||||
epoch,
|
||||
);
|
||||
self.prev_seedhash.set(seed_hash);
|
||||
self.prev_epoch.set(epoch);
|
||||
}
|
||||
self.prev_seedhash.get()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn resume_compute_seedhash(mut hash: H256, start_epoch: u64, end_epoch: u64) -> H256 {
|
||||
for _ in start_epoch..end_epoch {
|
||||
keccak_256::inplace(&mut hash);
|
||||
}
|
||||
hash
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::SeedHashCompute;
|
||||
|
||||
#[test]
|
||||
fn test_seed_compute_once() {
|
||||
let seed_compute = SeedHashCompute::default();
|
||||
let hash = [241, 175, 44, 134, 39, 121, 245, 239, 228, 236, 43, 160, 195, 152, 46, 7, 199, 5, 253, 147, 241, 206, 98, 43, 3, 104, 17, 40, 192, 79, 106, 162];
|
||||
assert_eq!(seed_compute.hash_block_number(486382), hash);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_seed_compute_zero() {
|
||||
let seed_compute = SeedHashCompute::default();
|
||||
assert_eq!(seed_compute.hash_block_number(0), [0u8; 32]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_seed_compute_after_older() {
|
||||
let seed_compute = SeedHashCompute::default();
|
||||
// calculating an older value first shouldn't affect the result
|
||||
let _ = seed_compute.hash_block_number(50000);
|
||||
let hash = [241, 175, 44, 134, 39, 121, 245, 239, 228, 236, 43, 160, 195, 152, 46, 7, 199, 5, 253, 147, 241, 206, 98, 43, 3, 104, 17, 40, 192, 79, 106, 162];
|
||||
assert_eq!(seed_compute.hash_block_number(486382), hash);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_seed_compute_after_newer() {
|
||||
let seed_compute = SeedHashCompute::default();
|
||||
// calculating an newer value first shouldn't affect the result
|
||||
let _ = seed_compute.hash_block_number(972764);
|
||||
let hash = [241, 175, 44, 134, 39, 121, 245, 239, 228, 236, 43, 160, 195, 152, 46, 7, 199, 5, 253, 147, 241, 206, 98, 43, 3, 104, 17, 40, 192, 79, 106, 162];
|
||||
assert_eq!(seed_compute.hash_block_number(486382), hash);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,149 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use primal::is_prime;
|
||||
|
||||
pub const DATASET_BYTES_INIT: u64 = 1 << 30;
|
||||
pub const DATASET_BYTES_GROWTH: u64 = 1 << 23;
|
||||
pub const CACHE_BYTES_INIT: u64 = 1 << 24;
|
||||
pub const CACHE_BYTES_GROWTH: u64 = 1 << 17;
|
||||
|
||||
pub const ETHASH_EPOCH_LENGTH: u64 = 30000;
|
||||
pub const ETHASH_CACHE_ROUNDS: usize = 3;
|
||||
pub const ETHASH_MIX_BYTES: usize = 128;
|
||||
pub const ETHASH_ACCESSES: usize = 64;
|
||||
pub const ETHASH_DATASET_PARENTS: u32 = 256;
|
||||
pub const NODE_DWORDS: usize = NODE_WORDS / 2;
|
||||
pub const NODE_WORDS: usize = NODE_BYTES / 4;
|
||||
pub const NODE_BYTES: usize = 64;
|
||||
|
||||
pub fn epoch(block_number: u64) -> u64 {
|
||||
block_number / ETHASH_EPOCH_LENGTH
|
||||
}
|
||||
|
||||
static CHARS: &'static [u8] = b"0123456789abcdef";
|
||||
pub fn to_hex(bytes: &[u8]) -> String {
|
||||
let mut v = Vec::with_capacity(bytes.len() * 2);
|
||||
for &byte in bytes.iter() {
|
||||
v.push(CHARS[(byte >> 4) as usize]);
|
||||
v.push(CHARS[(byte & 0xf) as usize]);
|
||||
}
|
||||
|
||||
unsafe { String::from_utf8_unchecked(v) }
|
||||
}
|
||||
|
||||
pub fn get_cache_size(block_number: u64) -> usize {
|
||||
// TODO: Memoise
|
||||
let mut sz: u64 = CACHE_BYTES_INIT + CACHE_BYTES_GROWTH * (block_number / ETHASH_EPOCH_LENGTH);
|
||||
sz = sz - NODE_BYTES as u64;
|
||||
while !is_prime(sz / NODE_BYTES as u64) {
|
||||
sz = sz - 2 * NODE_BYTES as u64;
|
||||
}
|
||||
sz as usize
|
||||
}
|
||||
|
||||
pub fn get_data_size(block_number: u64) -> usize {
|
||||
// TODO: Memoise
|
||||
let mut sz: u64 = DATASET_BYTES_INIT + DATASET_BYTES_GROWTH * (block_number / ETHASH_EPOCH_LENGTH);
|
||||
sz = sz - ETHASH_MIX_BYTES as u64;
|
||||
while !is_prime(sz / ETHASH_MIX_BYTES as u64) {
|
||||
sz = sz - 2 * ETHASH_MIX_BYTES as u64;
|
||||
}
|
||||
sz as usize
|
||||
}
|
||||
|
||||
pub type NodeBytes = [u8; NODE_BYTES];
|
||||
pub type NodeWords = [u32; NODE_WORDS];
|
||||
pub type NodeDwords = [u64; NODE_DWORDS];
|
||||
|
||||
macro_rules! static_assert_size_eq {
|
||||
(@inner $a:ty, $b:ty, $($rest:ty),*) => {
|
||||
fn first() {
|
||||
static_assert_size_eq!($a, $b);
|
||||
}
|
||||
|
||||
fn second() {
|
||||
static_assert_size_eq!($b, $($rest),*);
|
||||
}
|
||||
};
|
||||
(@inner $a:ty, $b:ty) => {
|
||||
unsafe {
|
||||
let val: $b = ::std::mem::uninitialized();
|
||||
let _: $a = ::std::mem::transmute(val);
|
||||
}
|
||||
};
|
||||
($($rest:ty),*) => {
|
||||
static_assert_size_eq!(size_eq: $($rest),*);
|
||||
};
|
||||
($name:ident : $($rest:ty),*) => {
|
||||
#[allow(dead_code)]
|
||||
fn $name() {
|
||||
static_assert_size_eq!(@inner $($rest),*);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static_assert_size_eq!(Node, NodeBytes, NodeWords, NodeDwords);
|
||||
|
||||
#[repr(C)]
|
||||
pub union Node {
|
||||
pub dwords: NodeDwords,
|
||||
pub words: NodeWords,
|
||||
pub bytes: NodeBytes,
|
||||
}
|
||||
|
||||
impl Clone for Node {
|
||||
fn clone(&self) -> Self {
|
||||
unsafe { Node { bytes: *&self.bytes } }
|
||||
}
|
||||
}
|
||||
|
||||
// We use `inline(always)` because I was experiencing an 100% slowdown and `perf` showed that these
|
||||
// calls were taking up ~30% of the runtime. Adding these annotations fixes the issue. Remove at
|
||||
// your peril, if and only if you have benchmarks to prove that this doesn't reintroduce the
|
||||
// performance regression. It's not caused by the `debug_assert_eq!` either, your guess is as good
|
||||
// as mine.
|
||||
impl Node {
|
||||
#[inline(always)]
|
||||
pub fn as_bytes(&self) -> &NodeBytes {
|
||||
unsafe { &self.bytes }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn as_bytes_mut(&mut self) -> &mut NodeBytes {
|
||||
unsafe { &mut self.bytes }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn as_words(&self) -> &NodeWords {
|
||||
unsafe { &self.words }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn as_words_mut(&mut self) -> &mut NodeWords {
|
||||
unsafe { &mut self.words }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn as_dwords(&self) -> &NodeDwords {
|
||||
unsafe { &self.dwords }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn as_dwords_mut(&mut self) -> &mut NodeDwords {
|
||||
unsafe { &mut self.dwords }
|
||||
}
|
||||
}
|
||||
@@ -1,110 +1,32 @@
|
||||
[package]
|
||||
description = "Ethcore library"
|
||||
homepage = "http://parity.io"
|
||||
homepage = "http://ethcore.io"
|
||||
license = "GPL-3.0"
|
||||
name = "ethcore"
|
||||
version = "1.12.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
version = "1.0.2"
|
||||
authors = ["Ethcore <admin@ethcore.io>"]
|
||||
|
||||
[dependencies]
|
||||
ansi_term = "0.10"
|
||||
blooms-db = { path = "../util/blooms-db" }
|
||||
bn = { git = "https://github.com/paritytech/bn", default-features = false }
|
||||
byteorder = "1.0"
|
||||
common-types = { path = "types" }
|
||||
crossbeam = "0.3"
|
||||
log = "0.3"
|
||||
env_logger = "0.3"
|
||||
rustc-serialize = "0.3"
|
||||
heapsize = "0.3"
|
||||
rust-crypto = "0.2.34"
|
||||
time = "0.1"
|
||||
ethcore-util = { path = "../util" }
|
||||
evmjit = { path = "../evmjit", optional = true }
|
||||
ethash = { path = "../ethash" }
|
||||
ethcore-bloom-journal = { path = "../util/bloom" }
|
||||
parity-bytes = "0.1"
|
||||
hashdb = "0.2.1"
|
||||
memorydb = "0.2.1"
|
||||
patricia-trie = "0.2"
|
||||
patricia-trie-ethereum = { path = "../util/patricia-trie-ethereum" }
|
||||
parity-crypto = "0.1"
|
||||
error-chain = { version = "0.12", default-features = false }
|
||||
ethcore-io = { path = "../util/io" }
|
||||
ethcore-logger = { path = "../logger" }
|
||||
ethcore-miner = { path = "../miner" }
|
||||
ethcore-stratum = { path = "./stratum", optional = true }
|
||||
ethcore-transaction = { path = "./transaction" }
|
||||
ethereum-types = "0.4"
|
||||
memory-cache = { path = "../util/memory_cache" }
|
||||
ethabi = "5.1.2"
|
||||
ethabi-derive = "5.1.3"
|
||||
ethabi-contract = "5.1.1"
|
||||
num_cpus = "0.2"
|
||||
clippy = { version = "0.0.54", optional = true }
|
||||
crossbeam = "0.1.5"
|
||||
lazy_static = "0.1"
|
||||
ethcore-devtools = { path = "../devtools" }
|
||||
ethjson = { path = "../json" }
|
||||
ethkey = { path = "../ethkey" }
|
||||
ethstore = { path = "../ethstore" }
|
||||
evm = { path = "evm" }
|
||||
heapsize = "0.4"
|
||||
itertools = "0.5"
|
||||
lazy_static = "1.0"
|
||||
log = "0.4"
|
||||
lru-cache = "0.1"
|
||||
num = { version = "0.1", default-features = false, features = ["bigint"] }
|
||||
num_cpus = "1.2"
|
||||
parity-machine = { path = "../machine" }
|
||||
parking_lot = "0.6"
|
||||
rayon = "1.0"
|
||||
rand = "0.4"
|
||||
rlp = { version = "0.2.4", features = ["ethereum"] }
|
||||
rlp_compress = { path = "../util/rlp_compress" }
|
||||
rlp_derive = { path = "../util/rlp_derive" }
|
||||
kvdb = "0.1"
|
||||
kvdb-memorydb = "0.1"
|
||||
parity-snappy = "0.1"
|
||||
stop-guard = { path = "../util/stop-guard" }
|
||||
macros = { path = "../util/macros" }
|
||||
rustc-hex = "1.0"
|
||||
stats = { path = "../util/stats" }
|
||||
trace-time = "0.1"
|
||||
using_queue = { path = "../util/using_queue" }
|
||||
vm = { path = "vm" }
|
||||
wasm = { path = "wasm" }
|
||||
keccak-hash = "0.1"
|
||||
triehash-ethereum = { version = "0.2", path = "../util/triehash-ethereum" }
|
||||
unexpected = { path = "../util/unexpected" }
|
||||
journaldb = { path = "../util/journaldb" }
|
||||
keccak-hasher = { path = "../util/keccak-hasher" }
|
||||
kvdb-rocksdb = "0.1.3"
|
||||
tempdir = {version="0.3", optional = true}
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "windows", target_os = "android"))'.dependencies]
|
||||
hardware-wallet = { path = "../hw" }
|
||||
|
||||
[target.'cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows", target_os = "android")))'.dependencies]
|
||||
fake-hardware-wallet = { path = "../util/fake-hardware-wallet" }
|
||||
|
||||
[dev-dependencies]
|
||||
tempdir = "0.3"
|
||||
trie-standardmap = "0.1"
|
||||
|
||||
[features]
|
||||
parity = ["work-notify", "price-info", "stratum"]
|
||||
# Large optional features that are enabled by default for Parity,
|
||||
# but might be omitted for other dependent crates.
|
||||
work-notify = ["ethcore-miner/work-notify"]
|
||||
price-info = ["ethcore-miner/price-info"]
|
||||
stratum = ["ethcore-stratum"]
|
||||
|
||||
# Disables seal verification for mined blocks.
|
||||
# This allows you to submit any seal via RPC to test and benchmark
|
||||
# how fast pending block get's created while running on the mainnet.
|
||||
miner-debug = []
|
||||
# Display EVM debug traces.
|
||||
evm-debug = ["evm/evm-debug"]
|
||||
# Display EVM debug traces when running tests.
|
||||
evm-debug-tests = ["evm-debug", "evm/evm-debug-tests"]
|
||||
# Measure time of transaction execution.
|
||||
# Whenever the transaction execution time (in millis) exceeds the value of
|
||||
# SLOW_TX_DURATION env variable (provided compile time!)
|
||||
# EVM debug traces are printed.
|
||||
slow-blocks = []
|
||||
# Run JSON consensus tests.
|
||||
json-tests = ["ethcore-transaction/json-tests", "test-helpers", "tempdir"]
|
||||
# Run memory/cpu heavy tests.
|
||||
jit = ["evmjit"]
|
||||
evm-debug = []
|
||||
json-tests = []
|
||||
test-heavy = []
|
||||
# Compile benches
|
||||
benches = []
|
||||
# Compile test helpers
|
||||
test-helpers = ["tempdir"]
|
||||
dev = ["clippy"]
|
||||
default = []
|
||||
|
||||
@@ -1,658 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#![feature(test)]
|
||||
extern crate test;
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
extern crate ethcore;
|
||||
extern crate ethereum_types;
|
||||
extern crate parity_bytes as bytes;
|
||||
extern crate rustc_hex;
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use bytes::BytesRef;
|
||||
use ethcore::builtin::Builtin;
|
||||
use ethcore::machine::EthereumMachine;
|
||||
use ethereum_types::{Address, U256};
|
||||
use ethcore::ethereum::new_byzantium_test_machine;
|
||||
use rustc_hex::FromHex;
|
||||
use self::test::Bencher;
|
||||
|
||||
lazy_static! {
|
||||
static ref BYZANTIUM_MACHINE: EthereumMachine = new_byzantium_test_machine();
|
||||
}
|
||||
|
||||
struct BuiltinBenchmark<'a> {
|
||||
builtin: &'a Builtin,
|
||||
input: Vec<u8>,
|
||||
expected: Vec<u8>,
|
||||
}
|
||||
|
||||
impl<'a> BuiltinBenchmark<'a> {
|
||||
fn new(builtin_address: &'static str, input: &str, expected: &str) -> BuiltinBenchmark<'a> {
|
||||
let builtins = BYZANTIUM_MACHINE.builtins();
|
||||
|
||||
let builtin = builtins.get(&builtin_address.into()).unwrap().clone();
|
||||
let input = FromHex::from_hex(input).unwrap();
|
||||
let expected = FromHex::from_hex(expected).unwrap();
|
||||
|
||||
BuiltinBenchmark {
|
||||
builtin, input, expected
|
||||
}
|
||||
}
|
||||
|
||||
fn gas_cost(&self) -> U256 {
|
||||
self.builtin.cost(&self.input)
|
||||
}
|
||||
|
||||
fn run(&self, b: &mut Bencher) {
|
||||
let mut output = vec![0; self.expected.len()];
|
||||
|
||||
b.iter(|| {
|
||||
self.builtin.execute(&self.input, &mut BytesRef::Fixed(&mut output)).unwrap();
|
||||
});
|
||||
|
||||
assert_eq!(self.expected[..], output[..]);
|
||||
}
|
||||
}
|
||||
|
||||
fn bench(
|
||||
builtin_address: &'static str,
|
||||
input: &str,
|
||||
expected: &str,
|
||||
b: &mut Bencher,
|
||||
) {
|
||||
let bench = BuiltinBenchmark::new(builtin_address, input, expected);
|
||||
|
||||
println!("gas cost: {}", bench.gas_cost());
|
||||
bench.run(b);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn ecrecover(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000001", // ecrecover
|
||||
"38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
|
||||
"000000000000000000000000ceaccac640adf55b2028469bd36ba501f28b699d",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn sha256(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000002", // sha256
|
||||
"38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
|
||||
"811c7003375852fabd0d362e40e68607a12bdabae61a7d068fe5fdd1dbbf2a5d",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn ripemd(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000003", // ripemd
|
||||
"38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
|
||||
"0000000000000000000000009215b8d9882ff46f0dfde6684d78e831467f65e6",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn identity(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000004", // identity
|
||||
"38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
|
||||
"38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_eip_example1(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002003fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2efffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_eip_example2(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2efffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",
|
||||
"0000000000000000000000000000000000000000000000000000000000000000",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_1_square(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb502fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b",
|
||||
"60008f1614cc01dcfb6bfb09c625cf90b47d4468db81b5f8b7a39d42f332eab9b2da8f2d95311648a8f243f4bb13cfb3d8f7f2a3c014122ebb3ed41b02783adc",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_1_qube(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb503fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b",
|
||||
"4834a46ba565db27903b1c720c9d593e84e4cbd6ad2e64b31885d944f68cd801f92225a8961c952ddf2797fa4701b330c85c4b363798100b921a1a22a46a7fec",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_1_pow0x10001(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb5010001fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b",
|
||||
"c36d804180c35d4426b57b50c5bfcca5c01856d104564cd513b461d3c8b8409128a5573e416d0ebe38f5f736766d9dc27143e4da981dfa4d67f7dc474cbee6d2",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_2_square(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf5102e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087",
|
||||
"981dd99c3b113fae3e3eaa9435c0dc96779a23c12a53d1084b4f67b0b053a27560f627b873e3f16ad78f28c94f14b6392def26e4d8896c5e3c984e50fa0b3aa44f1da78b913187c6128baa9340b1e9c9a0fd02cb78885e72576da4a8f7e5a113e173a7a2889fde9d407bd9f06eb05bc8fc7b4229377a32941a02bf4edcc06d70",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_2_qube(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf5103e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087",
|
||||
"d89ceb68c32da4f6364978d62aaa40d7b09b59ec61eb3c0159c87ec3a91037f7dc6967594e530a69d049b64adfa39c8fa208ea970cfe4b7bcd359d345744405afe1cbf761647e32b3184c7fbe87cee8c6c7ff3b378faba6c68b83b6889cb40f1603ee68c56b4c03d48c595c826c041112dc941878f8c5be828154afd4a16311f",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_2_pow0x10001(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf51010001e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087",
|
||||
"ad85e8ef13fd1dd46eae44af8b91ad1ccae5b7a1c92944f92a19f21b0b658139e0cabe9c1f679507c2de354bf2c91ebd965d1e633978a830d517d2f6f8dd5fd58065d58559de7e2334a878f8ec6992d9b9e77430d4764e863d77c0f87beede8f2f7f2ab2e7222f85cc9d98b8467f4bb72e87ef2882423ebdb6daf02dddac6db2",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_3_square(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb02d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d",
|
||||
"affc7507ea6d84751ec6b3f0d7b99dbcc263f33330e450d1b3ff0bc3d0874320bf4edd57debd587306988157958cb3cfd369cc0c9c198706f635c9e0f15d047df5cb44d03e2727f26b083c4ad8485080e1293f171c1ed52aef5993a5815c35108e848c951cf1e334490b4a539a139e57b68f44fee583306f5b85ffa57206b3ee5660458858534e5386b9584af3c7f67806e84c189d695e5eb96e1272d06ec2df5dc5fabc6e94b793718c60c36be0a4d031fc84cd658aa72294b2e16fc240aef70cb9e591248e38bd49c5a554d1afa01f38dab72733092f7555334bbef6c8c430119840492380aa95fa025dcf699f0a39669d812b0c6946b6091e6e235337b6f8",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_3_qube(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb03d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d",
|
||||
"1b280ecd6a6bf906b806d527c2a831e23b238f89da48449003a88ac3ac7150d6a5e9e6b3be4054c7da11dd1e470ec29a606f5115801b5bf53bc1900271d7c3ff3cd5ed790d1c219a9800437a689f2388ba1a11d68f6a8e5b74e9a3b1fac6ee85fc6afbac599f93c391f5dc82a759e3c6c0ab45ce3f5d25d9b0c1bf94cf701ea6466fc9a478dacc5754e593172b5111eeba88557048bceae401337cd4c1182ad9f700852bc8c99933a193f0b94cf1aedbefc48be3bc93ef5cb276d7c2d5462ac8bb0c8fe8923a1db2afe1c6b90d59c534994a6a633f0ead1d638fdc293486bb634ff2c8ec9e7297c04241a61c37e3ae95b11d53343d4ba2b4cc33d2cfa7eb705e",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_3_pow0x10001(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb010001d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d",
|
||||
"37843d7c67920b5f177372fa56e2a09117df585f81df8b300fba245b1175f488c99476019857198ed459ed8d9799c377330e49f4180c4bf8e8f66240c64f65ede93d601f957b95b83efdee1e1bfde74169ff77002eaf078c71815a9220c80b2e3b3ff22c2f358111d816ebf83c2999026b6de50bfc711ff68705d2f40b753424aefc9f70f08d908b5a20276ad613b4ab4309a3ea72f0c17ea9df6b3367d44fb3acab11c333909e02e81ea2ed404a712d3ea96bba87461720e2d98723e7acd0520ac1a5212dbedcd8dc0c1abf61d4719e319ff4758a774790b8d463cdfe131d1b2dcfee52d002694e98e720cb6ae7ccea353bc503269ba35f0f63bf8d7b672a76",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_4_square(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b8102df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f",
|
||||
"8a5aea5f50dcc03dc7a7a272b5aeebc040554dbc1ffe36753c4fc75f7ed5f6c2cc0de3a922bf96c78bf0643a73025ad21f45a4a5cadd717612c511ab2bff1190fe5f1ae05ba9f8fe3624de1de2a817da6072ddcdb933b50216811dbe6a9ca79d3a3c6b3a476b079fd0d05f04fb154e2dd3e5cb83b148a006f2bcbf0042efb2ae7b916ea81b27aac25c3bf9a8b6d35440062ad8eae34a83f3ffa2cc7b40346b62174a4422584f72f95316f6b2bee9ff232ba9739301c97c99a9ded26c45d72676eb856ad6ecc81d36a6de36d7f9dafafee11baa43a4b0d5e4ecffa7b9b7dcefd58c397dd373e6db4acd2b2c02717712e6289bed7c813b670c4a0c6735aa7f3b0f1ce556eae9fcc94b501b2c8781ba50a8c6220e8246371c3c7359fe4ef9da786ca7d98256754ca4e496be0a9174bedbecb384bdf470779186d6a833f068d2838a88d90ef3ad48ff963b67c39cc5a3ee123baf7bf3125f64e77af7f30e105d72c4b9b5b237ed251e4c122c6d8c1405e736299c3afd6db16a28c6a9cfa68241e53de4cd388271fe534a6a9b0dbea6171d170db1b89858468885d08fecbd54c8e471c3e25d48e97ba450b96d0d87e00ac732aaa0d3ce4309c1064bd8a4c0808a97e0143e43a24cfa847635125cd41c13e0574487963e9d725c01375db99c31da67b4cf65eff555f0c0ac416c727ff8d438ad7c42030551d68c2e7adda0abb1ca7c10",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_4_qube(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b8103df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f",
|
||||
"5a2664252aba2d6e19d9600da582cdd1f09d7a890ac48e6b8da15ae7c6ff1856fc67a841ac2314d283ffa3ca81a0ecf7c27d89ef91a5a893297928f5da0245c99645676b481b7e20a566ee6a4f2481942bee191deec5544600bb2441fd0fb19e2ee7d801ad8911c6b7750affec367a4b29a22942c0f5f4744a4e77a8b654da2a82571037099e9c6d930794efe5cdca73c7b6c0844e386bdca8ea01b3d7807146bb81365e2cdc6475f8c23e0ff84463126189dc9789f72bbce2e3d2d114d728a272f1345122de23df54c922ec7a16e5c2a8f84da8871482bd258c20a7c09bbcd64c7a96a51029bbfe848736a6ba7bf9d931a9b7de0bcaf3635034d4958b20ae9ab3a95a147b0421dd5f7ebff46c971010ebfc4adbbe0ad94d5498c853e7142c450d8c71de4b2f84edbf8acd2e16d00c8115b150b1c30e553dbb82635e781379fe2a56360420ff7e9f70cc64c00aba7e26ed13c7c19622865ae07248daced36416080f35f8cc157a857ed70ea4f347f17d1bee80fa038abd6e39b1ba06b97264388b21364f7c56e192d4b62d9b161405f32ab1e2594e86243e56fcf2cb30d21adef15b9940f91af681da24328c883d892670c6aa47940867a81830a82b82716895db810df1b834640abefb7db2092dd92912cb9a735175bc447be40a503cf22dfe565b4ed7a3293ca0dfd63a507430b323ee248ec82e843b673c97ad730728cebc",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_4_pow0x10001(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b81010001df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f",
|
||||
"bed8b970c4a34849fc6926b08e40e20b21c15ed68d18f228904878d4370b56322d0da5789da0318768a374758e6375bfe4641fca5285ec7171828922160f48f5ca7efbfee4d5148612c38ad683ae4e3c3a053d2b7c098cf2b34f2cb19146eadd53c86b2d7ccf3d83b2c370bfb840913ee3879b1057a6b4e07e110b6bcd5e958bc71a14798c91d518cc70abee264b0d25a4110962a764b364ac0b0dd1ee8abc8426d775ec0f22b7e47b32576afaf1b5a48f64573ed1c5c29f50ab412188d9685307323d990802b81dacc06c6e05a1e901830ba9fcc67688dc29c5e27bde0a6e845ca925f5454b6fb3747edfaa2a5820838fb759eadf57f7cb5cec57fc213ddd8a4298fa079c3c0f472b07fb15aa6a7f0a3780bd296ff6a62e58ef443870b02260bd4fd2bbc98255674b8e1f1f9f8d33c7170b0ebbea4523b695911abbf26e41885344823bd0587115fdd83b721a4e8457a31c9a84b3d3520a07e0e35df7f48e5a9d534d0ec7feef1ff74de6a11e7f93eab95175b6ce22c68d78a642ad642837897ec11349205d8593ac19300207572c38d29ca5dfa03bc14cdbc32153c80e5cc3e739403d34c75915e49beb43094cc6dcafb3665b305ddec9286934ae66ec6b777ca528728c851318eb0f207b39f1caaf96db6eeead6b55ed08f451939314577d42bcc9f97c0b52d0234f88fd07e4c1d7780fdebc025cfffcb572cb27a8c33963",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_5_square(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf02e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad",
|
||||
"d61fe4e3f32ac260915b5b03b78a86d11bfc41d973fce5b0cc59035cf8289a8a2e3878ea15fa46565b0d806e2f85b53873ea20ed653869b688adf83f3ef444535bf91598ff7e80f334fb782539b92f39f55310cc4b35349ab7b278346eda9bc37c0d8acd3557fae38197f412f8d9e57ce6a76b7205c23564cab06e5615be7c6f05c3d05ec690cba91da5e89d55b152ff8dd2157dc5458190025cf94b1ad98f7cbe64e9482faba95e6b33844afc640892872b44a9932096508f4a782a4805323808f23e54b6ff9b841dbfa87db3505ae4f687972c18ea0f0d0af89d36c1c2a5b14560c153c3fee406f5cf15cfd1c0bb45d767426d465f2f14c158495069d0c5955a00150707862ecaae30624ebacdd8ac33e4e6aab3ff90b6ba445a84689386b9e945d01823a65874444316e83767290fcff630d2477f49d5d8ffdd200e08ee1274270f86ed14c687895f6caf5ce528bd970c20d2408a9ba66216324c6a011ac4999098362dbd98a038129a2d40c8da6ab88318aa3046cb660327cc44236d9e5d2163bd0959062195c51ed93d0088b6f92051fc99050ece2538749165976233697ab4b610385366e5ce0b02ad6b61c168ecfbedcdf74278a38de340fd7a5fead8e588e294795f9b011e2e60377a89e25c90e145397cdeabc60fd32444a6b7642a611a83c464d8b8976666351b4865c37b02e6dc21dbcdf5f930341707b618cc0f03c3122646b3385c9df9f2ec730eec9d49e7dfc9153b6e6289da8c4f0ebea9ccc1b751948e3bb7171c9e4d57423b0eeeb79095c030cb52677b3f7e0b45c30f645391f3f9c957afa549c4e0b2465b03c67993cd200b1af01035962edbc4c9e89b31c82ac121987d6529dafdeef67a132dc04b6dc68e77f22862040b75e2ceb9ff16da0fca534e6db7bd12fa7b7f51b6c08c1e23dfcdb7acbd2da0b51c87ffbced065a612e9b1c8bba9b7e2d8d7a2f04fcc4aaf355b60d764879a76b5e16762d5f2f55d585d0c8e82df6940960cddfb72c91dfa71f6b4e1c6ca25dfc39a878e998a663c04fe29d5e83b9586d047b4d7ff70a9f0d44f127e7d741685ca75f11629128d916a0ffef4be586a30c4b70389cc746e84ebf177c01ee8a4511cfbb9d1ecf7f7b33c7dd8177896e10bbc82f838dcd6db7ac67de62bf46b6a640fb580c5d1d2708f3862e3d2b645d0d18e49ef088053e3a220adc0e033c2afcfe61c90e32151152eb3caaf746c5e377d541cafc6cbb0cc0fa48b5caf1728f2e1957f5addfc234f1a9d89e40d49356c9172d0561a695fce6dab1d412321bbf407f63766ffd7b6b3d79bcfa07991c5a9709849c1008689e3b47c50d613980bec239fb64185249d055b30375ccb4354d71fe4d05648fbf6c80634dfc3575f2f24abb714c1e4c95e8896763bf4316e954c7ad19e5780ab7a040ca6fb9271f90a8b22ae738daf6cb",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_5_qube(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf03e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad",
|
||||
"5f9c70ec884926a89461056ad20ac4c30155e817f807e4d3f5bb743d789c83386762435c3627773fa77da5144451f2a8aad8adba88e0b669f5377c5e9bad70e45c86fe952b613f015a9953b8a5de5eaee4566acf98d41e327d93a35bd5cef4607d025e58951167957df4ff9b1627649d3943805472e5e293d3efb687cfd1e503faafeb2840a3e3b3f85d016051a58e1c9498aab72e63b748d834b31eb05d85dcde65e27834e266b85c75cc4ec0135135e0601cb93eeeb6e0010c8ceb65c4c319623c5e573a2c8c9fbbf7df68a930beb412d3f4dfd146175484f45d7afaa0d2e60684af9b34730f7c8438465ad3e1d0c3237336722f2aa51095bd5759f4b8ab4dda111b684aa3dac62a761722e7ae43495b7709933512c81c4e3c9133a51f7ce9f2b51fcec064f65779666960b4e45df3900f54311f5613e8012dd1b8efd359eda31a778264c72aa8bb419d862734d769076bce2810011989a45374e5c5d8729fec21427f0bf397eacbb4220f603cf463a4b0c94efd858ffd9768cd60d6ce68d755e0fbad007ce5c2223d70c7018345a102e4ab3c60a13a9e7794303156d4c2063e919f2153c13961fb324c80b240742f47773a7a8e25b3e3fb19b00ce839346c6eb3c732fbc6b888df0b1fe0a3d07b053a2e9402c267b2d62f794d8a2840526e3ade15ce2264496ccd7519571dfde47f7a4bb16292241c20b2be59f3f8fb4f6383f232d838c5a22d8c95b6834d9d2ca493f5a505ebe8899503b0e8f9b19e6e2dd81c1628b80016d02097e0134de51054c4e7674824d4d758760fc52377d2cad145e259aa2ffaf54139e1a66b1e0c1c191e32ac59474c6b526f5b3ba07d3e5ec286eddf531fcd5292869be58c9f22ef91026159f7cf9d05ef66b4299f4da48cc1635bf2243051d342d378a22c83390553e873713c0454ce5f3234397111ac3fe3207b86f0ed9fc025c81903e1748103692074f83824fda6341be4f95ff00b0a9a208c267e12fa01825054cc0513629bf3dbb56dc5b90d4316f87654a8be18227978ea0a8a522760cad620d0d14fd38920fb7321314062914275a5f99f677145a6979b156bd82ecd36f23f8e1273cc2759ecc0b2c69d94dad5211d1bed939dd87ed9e07b91d49713a6e16ade0a98aea789f04994e318e4ff2c8a188cd8d43aeb52c6daa3bc29b4af50ea82a247c5cd67b573b34cbadcc0a376d3bbd530d50367b42705d870f2e27a8197ef46070528bfe408360faa2ebb8bf76e9f388572842bcb119f4d84ee34ae31f5cc594f23705a49197b181fb78ed1ec99499c690f843a4d0cf2e226d118e9372271054fbabdcc5c92ae9fefaef0589cd0e722eaf30c1703ec4289c7fd81beaa8a455ccee5298e31e2080c10c366a6fcf56f7d13582ad0bcad037c612b710fc595b70fbefaaca23623b60c6c39b11beb8e5843b6b3dac60f",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
#[bench]
|
||||
fn modexp_nagydani_5_pow0x10001(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000005", // modexp
|
||||
"000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf010001e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad",
|
||||
"5a0eb2bdf0ac1cae8e586689fa16cd4b07dfdedaec8a110ea1fdb059dd5253231b6132987598dfc6e11f86780428982d50cf68f67ae452622c3b336b537ef3298ca645e8f89ee39a26758206a5a3f6409afc709582f95274b57b71fae5c6b74619ae6f089a5393c5b79235d9caf699d23d88fb873f78379690ad8405e34c19f5257d596580c7a6a7206a3712825afe630c76b31cdb4a23e7f0632e10f14f4e282c81a66451a26f8df2a352b5b9f607a7198449d1b926e27036810368e691a74b91c61afa73d9d3b99453e7c8b50fd4f09c039a2f2feb5c419206694c31b92df1d9586140cb3417b38d0c503c7b508cc2ed12e813a1c795e9829eb39ee78eeaf360a169b491a1d4e419574e712402de9d48d54c1ae5e03739b7156615e8267e1fb0a897f067afd11fb33f6e24182d7aaaaa18fe5bc1982f20d6b871e5a398f0f6f718181d31ec225cfa9a0a70124ed9a70031bdf0c1c7829f708b6e17d50419ef361cf77d99c85f44607186c8d683106b8bd38a49b5d0fb503b397a83388c5678dcfcc737499d84512690701ed621a6f0172aecf037184ddf0f2453e4053024018e5ab2e30d6d5363b56e8b41509317c99042f517247474ab3abc848e00a07f69c254f46f2a05cf6ed84e5cc906a518fdcfdf2c61ce731f24c5264f1a25fc04934dc28aec112134dd523f70115074ca34e3807aa4cb925147f3a0ce152d323bd8c675ace446d0fd1ae30c4b57f0eb2c23884bc18f0964c0114796c5b6d080c3d89175665fbf63a6381a6a9da39ad070b645c8bb1779506da14439a9f5b5d481954764ea114fac688930bc68534d403cff4210673b6a6ff7ae416b7cd41404c3d3f282fcd193b86d0f54d0006c2a503b40d5c3930da980565b8f9630e9493a79d1c03e74e5f93ac8e4dc1a901ec5e3b3e57049124c7b72ea345aa359e782285d9e6a5c144a378111dd02c40855ff9c2be9b48425cb0b2fd62dc8678fd151121cf26a65e917d65d8e0dacfae108eb5508b601fb8ffa370be1f9a8b749a2d12eeab81f41079de87e2d777994fa4d28188c579ad327f9957fb7bdecec5c680844dd43cb57cf87aeb763c003e65011f73f8c63442df39a92b946a6bd968a1c1e4d5fa7d88476a68bd8e20e5b70a99259c7d3f85fb1b65cd2e93972e6264e74ebf289b8b6979b9b68a85cd5b360c1987f87235c3c845d62489e33acf85d53fa3561fe3a3aee18924588d9c6eba4edb7a4d106b31173e42929f6f0c48c80ce6a72d54eca7c0fe870068b7a7c89c63cdda593f5b32d3cb4ea8a32c39f00ab449155757172d66763ed9527019d6de6c9f2416aa6203f4d11c9ebee1e1d3845099e55504446448027212616167eb36035726daa7698b075286f5379cd3e93cb3e0cf4f9cb8d017facbb5550ed32d5ec5400ae57e47e2bf78d1eaeff9480cc765ceff39db500",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_chfast1(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"18b18acfb4c2c30276db5411368e7185b311dd124691610c5d3b74034e093dc9063c909c4720840cb5134cb9f59fa749755796819658d32efc0d288198f3726607c2b7f58a84bd6145f00c9c2bc0bb1a187f20ff2c92963a88019e7c6a014eed06614e20c147e940f2d70da3f74c9a17df361706a4485c742bd6788478fa17d7",
|
||||
"2243525c5efd4b9c3d3c45ac0ca3fe4dd85e830a4ce6b65fa1eeaee202839703301d1d33be6da8e509df21cc35964723180eed7532537db9ae5e7d48f195c915",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_chfast2(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"2243525c5efd4b9c3d3c45ac0ca3fe4dd85e830a4ce6b65fa1eeaee202839703301d1d33be6da8e509df21cc35964723180eed7532537db9ae5e7d48f195c91518b18acfb4c2c30276db5411368e7185b311dd124691610c5d3b74034e093dc9063c909c4720840cb5134cb9f59fa749755796819658d32efc0d288198f37266",
|
||||
"2bd3e6d0f3b142924f5ca7b49ce5b9d54c4703d7ae5648e61d02268b1a0a9fb721611ce0a6af85915e2f1d70300909ce2e49dfad4a4619c8390cae66cefdb204",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio1(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio2(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio3(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio4(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"",
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio5(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio6(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio7(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio8(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio9(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio10(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio11(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
||||
"030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd315ed738c0e0a7c92e7845f96b2ae9c0a68a6a449e3538fc7ff3ebf7a5a18a2c4",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio12(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd315ed738c0e0a7c92e7845f96b2ae9c0a68a6a449e3538fc7ff3ebf7a5a18a2c4",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio13(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa901e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98",
|
||||
"15bf2bb17880144b5d1cd2b1f46eff9d617bffd1ca57c37fb5a49bd84e53cf66049c797f9ce0d17083deb32b5e36f2ea2a212ee036598dd7624c168993d1355f",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_add_cdetrio14(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000006", // alt_bn128_add
|
||||
"17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa901e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa92e83f8d734803fc370eba25ed1f6b8768bd6d83887b87165fc2434fe11a830cb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_mul_chfast1(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000007", // alt_bn128_mul
|
||||
"2bd3e6d0f3b142924f5ca7b49ce5b9d54c4703d7ae5648e61d02268b1a0a9fb721611ce0a6af85915e2f1d70300909ce2e49dfad4a4619c8390cae66cefdb20400000000000000000000000000000000000000000000000011138ce750fa15c2",
|
||||
"070a8d6a982153cae4be29d434e8faef8a47b274a053f5a4ee2a6c9c13c31e5c031b8ce914eba3a9ffb989f9cdd5b0f01943074bf4f0f315690ec3cec6981afc",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_mul_chfast2(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000007", // alt_bn128_mul
|
||||
"070a8d6a982153cae4be29d434e8faef8a47b274a053f5a4ee2a6c9c13c31e5c031b8ce914eba3a9ffb989f9cdd5b0f01943074bf4f0f315690ec3cec6981afc30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd46",
|
||||
"025a6f4181d2b4ea8b724290ffb40156eb0adb514c688556eb79cdea0752c2bb2eff3f31dea215f1eb86023a133a996eb6300b44da664d64251d05381bb8a02e",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_mul_chfast3(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000007", // alt_bn128_mul
|
||||
"025a6f4181d2b4ea8b724290ffb40156eb0adb514c688556eb79cdea0752c2bb2eff3f31dea215f1eb86023a133a996eb6300b44da664d64251d05381bb8a02e183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea3",
|
||||
"14789d0d4a730b354403b5fac948113739e276c23e0258d8596ee72f9cd9d3230af18a63153e0ec25ff9f2951dd3fa90ed0197bfef6e2a1a62b5095b9d2b4a27",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_mul_cdetrio1(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000007", // alt_bn128_mul
|
||||
"1a87b0584ce92f4593d161480614f2989035225609f08058ccfa3d0f940febe31a2f3c951f6dadcc7ee9007dff81504b0fcd6d7cf59996efdc33d92bf7f9f8f6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"2cde5879ba6f13c0b5aa4ef627f159a3347df9722efce88a9afbb20b763b4c411aa7e43076f6aee272755a7f9b84832e71559ba0d2e0b17d5f9f01755e5b0d11",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_mul_cdetrio6(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000007", // alt_bn128_mul
|
||||
"17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa901e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"29e587aadd7c06722aabba753017c093f70ba7eb1f1c0104ec0564e7e3e21f6022b1143f6a41008e7755c71c3d00b6b915d386de21783ef590486d8afa8453b1",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_mul_cdetrio11(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000007", // alt_bn128_mul
|
||||
"039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"00a1a234d08efaa2616607e31eca1980128b00b415c845ff25bba3afcb81dc00242077290ed33906aeb8e42fd98c41bcb9057ba03421af3f2d08cfc441186024",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_jeff1(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"1c76476f4def4bb94541d57ebba1193381ffa7aa76ada664dd31c16024c43f593034dd2920f673e204fee2811c678745fc819b55d3e9d294e45c9b03a76aef41209dd15ebff5d46c4bd888e51a93cf99a7329636c63514396b4a452003a35bf704bf11ca01483bfa8b34b43561848d28905960114c8ac04049af4b6315a416782bb8324af6cfc93537a2ad1a445cfd0ca2a71acd7ac41fadbf933c2a51be344d120a2a4cf30c1bf9845f20c6fe39e07ea2cce61f0c9bb048165fe5e4de877550111e129f1cf1097710d41c4ac70fcdfa5ba2023c6ff1cbeac322de49d1b6df7c2032c61a830e3c17286de9462bf242fca2883585b93870a73853face6a6bf411198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_jeff2(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"2eca0c7238bf16e83e7a1e6c5d49540685ff51380f309842a98561558019fc0203d3260361bb8451de5ff5ecd17f010ff22f5c31cdf184e9020b06fa5997db841213d2149b006137fcfb23036606f848d638d576a120ca981b5b1a5f9300b3ee2276cf730cf493cd95d64677bbb75fc42db72513a4c1e387b476d056f80aa75f21ee6226d31426322afcda621464d0611d226783262e21bb3bc86b537e986237096df1f82dff337dd5972e32a8ad43e28a78a96a823ef1cd4debe12b6552ea5f06967a1237ebfeca9aaae0d6d0bab8e28c198c5a339ef8a2407e31cdac516db922160fa257a5fd5b280642ff47b65eca77e626cb685c84fa6d3b6882a283ddd1198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_jeff3(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"0f25929bcb43d5a57391564615c9e70a992b10eafa4db109709649cf48c50dd216da2f5cb6be7a0aa72c440c53c9bbdfec6c36c7d515536431b3a865468acbba2e89718ad33c8bed92e210e81d1853435399a271913a6520736a4729cf0d51eb01a9e2ffa2e92599b68e44de5bcf354fa2642bd4f26b259daa6f7ce3ed57aeb314a9a87b789a58af499b314e13c3d65bede56c07ea2d418d6874857b70763713178fb49a2d6cd347dc58973ff49613a20757d0fcc22079f9abd10c3baee245901b9e027bd5cfc2cb5db82d4dc9677ac795ec500ecd47deee3b5da006d6d049b811d7511c78158de484232fc68daf8a45cf217d1c2fae693ff5871e8752d73b21198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_jeff4(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"2f2ea0b3da1e8ef11914acf8b2e1b32d99df51f5f4f206fc6b947eae860eddb6068134ddb33dc888ef446b648d72338684d678d2eb2371c61a50734d78da4b7225f83c8b6ab9de74e7da488ef02645c5a16a6652c3c71a15dc37fe3a5dcb7cb122acdedd6308e3bb230d226d16a105295f523a8a02bfc5e8bd2da135ac4c245d065bbad92e7c4e31bf3757f1fe7362a63fbfee50e7dc68da116e67d600d9bf6806d302580dc0661002994e7cd3a7f224e7ddc27802777486bf80f40e4ca3cfdb186bac5188a98c45e6016873d107f5cd131f3a3e339d0375e58bd6219347b008122ae2b09e539e152ec5364e7e2204b03d11d3caa038bfc7cd499f8176aacbee1f39e4e4afc4bc74790a4a028aff2c3d2538731fb755edefd8cb48d6ea589b5e283f150794b6736f670d6a1033f9b46c6f5204f50813eb85c8dc4b59db1c5d39140d97ee4d2b36d99bc49974d18ecca3e7ad51011956051b464d9e27d46cc25e0764bb98575bd466d32db7b15f582b2d5c452b36aa394b789366e5e3ca5aabd415794ab061441e51d01e94640b7e3084a07e02c78cf3103c542bc5b298669f211b88da1679b0b64a63b7e0e7bfe52aae524f73a55be7fe70c7e9bfc94b4cf0da1213d2149b006137fcfb23036606f848d638d576a120ca981b5b1a5f9300b3ee2276cf730cf493cd95d64677bbb75fc42db72513a4c1e387b476d056f80aa75f21ee6226d31426322afcda621464d0611d226783262e21bb3bc86b537e986237096df1f82dff337dd5972e32a8ad43e28a78a96a823ef1cd4debe12b6552ea5f",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_jeff5(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"20a754d2071d4d53903e3b31a7e98ad6882d58aec240ef981fdf0a9d22c5926a29c853fcea789887315916bbeb89ca37edb355b4f980c9a12a94f30deeed30211213d2149b006137fcfb23036606f848d638d576a120ca981b5b1a5f9300b3ee2276cf730cf493cd95d64677bbb75fc42db72513a4c1e387b476d056f80aa75f21ee6226d31426322afcda621464d0611d226783262e21bb3bc86b537e986237096df1f82dff337dd5972e32a8ad43e28a78a96a823ef1cd4debe12b6552ea5f1abb4a25eb9379ae96c84fff9f0540abcfc0a0d11aeda02d4f37e4baf74cb0c11073b3ff2cdbb38755f8691ea59e9606696b3ff278acfc098fa8226470d03869217cee0a9ad79a4493b5253e2e4e3a39fc2df38419f230d341f60cb064a0ac290a3d76f140db8418ba512272381446eb73958670f00cf46f1d9e64cba057b53c26f64a8ec70387a13e41430ed3ee4a7db2059cc5fc13c067194bcc0cb49a98552fd72bd9edb657346127da132e5b82ab908f5816c826acb499e22f2412d1a2d70f25929bcb43d5a57391564615c9e70a992b10eafa4db109709649cf48c50dd2198a1f162a73261f112401aa2db79c7dab1533c9935c77290a6ce3b191f2318d198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_jeff6(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"1c76476f4def4bb94541d57ebba1193381ffa7aa76ada664dd31c16024c43f593034dd2920f673e204fee2811c678745fc819b55d3e9d294e45c9b03a76aef41209dd15ebff5d46c4bd888e51a93cf99a7329636c63514396b4a452003a35bf704bf11ca01483bfa8b34b43561848d28905960114c8ac04049af4b6315a416782bb8324af6cfc93537a2ad1a445cfd0ca2a71acd7ac41fadbf933c2a51be344d120a2a4cf30c1bf9845f20c6fe39e07ea2cce61f0c9bb048165fe5e4de877550111e129f1cf1097710d41c4ac70fcdfa5ba2023c6ff1cbeac322de49d1b6df7c103188585e2364128fe25c70558f1560f4f9350baf3959e603cc91486e110936198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa",
|
||||
"0000000000000000000000000000000000000000000000000000000000000000",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_empty_data(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_one_point(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa",
|
||||
"0000000000000000000000000000000000000000000000000000000000000000",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_two_point_match_2(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_two_point_match_3(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_two_point_match_4(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"105456a333e6d636854f987ea7bb713dfd0ae8371a72aea313ae0c32c0bf10160cf031d41b41557f3e7e3ba0c51bebe5da8e6ecd855ec50fc87efcdeac168bcc0476be093a6d2b4bbf907172049874af11e1b6267606e00804d3ff0037ec57fd3010c68cb50161b7d1d96bb71edfec9880171954e56871abf3d93cc94d745fa114c059d74e5b6c4ec14ae5864ebe23a71781d86c29fb8fb6cce94f70d3de7a2101b33461f39d9e887dbb100f170a2345dde3c07e256d1dfa2b657ba5cd030427000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000021a2c3013d2ea92e13c800cde68ef56a294b883f6ac35d25f587c09b1b3c635f7290158a80cd3d66530f74dc94c94adb88f5cdb481acca997b6e60071f08a115f2f997f3dbd66a7afe07fe7862ce239edba9e05c5afff7f8a1259c9733b2dfbb929d1691530ca701b4a106054688728c9972c8512e9789e9567aae23e302ccd75",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_ten_point_match_1(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_ten_point_match_2(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alt_bn128_pairing_ten_point_match_3(b: &mut Bencher) {
|
||||
bench(
|
||||
"0000000000000000000000000000000000000008", // alt_bn128_pairing
|
||||
"105456a333e6d636854f987ea7bb713dfd0ae8371a72aea313ae0c32c0bf10160cf031d41b41557f3e7e3ba0c51bebe5da8e6ecd855ec50fc87efcdeac168bcc0476be093a6d2b4bbf907172049874af11e1b6267606e00804d3ff0037ec57fd3010c68cb50161b7d1d96bb71edfec9880171954e56871abf3d93cc94d745fa114c059d74e5b6c4ec14ae5864ebe23a71781d86c29fb8fb6cce94f70d3de7a2101b33461f39d9e887dbb100f170a2345dde3c07e256d1dfa2b657ba5cd030427000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000021a2c3013d2ea92e13c800cde68ef56a294b883f6ac35d25f587c09b1b3c635f7290158a80cd3d66530f74dc94c94adb88f5cdb481acca997b6e60071f08a115f2f997f3dbd66a7afe07fe7862ce239edba9e05c5afff7f8a1259c9733b2dfbb929d1691530ca701b4a106054688728c9972c8512e9789e9567aae23e302ccd75",
|
||||
"0000000000000000000000000000000000000000000000000000000000000001",
|
||||
b,
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
[package]
|
||||
name = "evm"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
bit-set = "0.4"
|
||||
parity-bytes = "0.1"
|
||||
ethereum-types = "0.4"
|
||||
heapsize = "0.4"
|
||||
lazy_static = "1.0"
|
||||
log = "0.4"
|
||||
vm = { path = "../vm" }
|
||||
keccak-hash = "0.1"
|
||||
parking_lot = "0.6"
|
||||
memory-cache = { path = "../../util/memory_cache" }
|
||||
|
||||
[dev-dependencies]
|
||||
rustc-hex = "1.0"
|
||||
|
||||
[features]
|
||||
evm-debug = []
|
||||
evm-debug-tests = ["evm-debug"]
|
||||
@@ -1,129 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! benchmarking for EVM
|
||||
//! should be started with:
|
||||
//! ```bash
|
||||
//! multirust run nightly cargo bench
|
||||
//! ```
|
||||
|
||||
extern crate test;
|
||||
|
||||
use self::test::{Bencher, black_box};
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use vm::ActionParams;
|
||||
use evm::{self, Factory, VMType};
|
||||
use evm::tests::FakeExt;
|
||||
|
||||
#[bench]
|
||||
fn simple_loop_log0_usize(b: &mut Bencher) {
|
||||
simple_loop_log0(U256::from(::std::usize::MAX), b)
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn simple_loop_log0_u256(b: &mut Bencher) {
|
||||
simple_loop_log0(!U256::zero(), b)
|
||||
}
|
||||
|
||||
fn simple_loop_log0(gas: U256, b: &mut Bencher) {
|
||||
let mut vm = Factory::new(VMType::Interpreter).create(gas);
|
||||
let mut ext = FakeExt::new();
|
||||
|
||||
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
|
||||
let code = black_box(
|
||||
"62ffffff5b600190036000600fa0600357".from_hex().unwrap()
|
||||
);
|
||||
|
||||
b.iter(|| {
|
||||
let mut params = ActionParams::default();
|
||||
params.address = address.clone();
|
||||
params.gas = gas;
|
||||
params.code = Some(code.clone());
|
||||
|
||||
result(vm.exec(params, &mut ext))
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn mem_gas_calculation_same_usize(b: &mut Bencher) {
|
||||
mem_gas_calculation_same(U256::from(::std::usize::MAX), b)
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn mem_gas_calculation_same_u256(b: &mut Bencher) {
|
||||
mem_gas_calculation_same(!U256::zero(), b)
|
||||
}
|
||||
|
||||
fn mem_gas_calculation_same(gas: U256, b: &mut Bencher) {
|
||||
let mut vm = Factory::new(VMType::Interpreter).create(gas);
|
||||
let mut ext = FakeExt::new();
|
||||
|
||||
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
|
||||
|
||||
b.iter(|| {
|
||||
let code = black_box(
|
||||
"6110006001556001546000555b610fff805560016000540380600055600c57".from_hex().unwrap()
|
||||
);
|
||||
|
||||
let mut params = ActionParams::default();
|
||||
params.address = address.clone();
|
||||
params.gas = gas;
|
||||
params.code = Some(code.clone());
|
||||
|
||||
result(vm.exec(params, &mut ext))
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn mem_gas_calculation_increasing_usize(b: &mut Bencher) {
|
||||
mem_gas_calculation_increasing(U256::from(::std::usize::MAX), b)
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn mem_gas_calculation_increasing_u256(b: &mut Bencher) {
|
||||
mem_gas_calculation_increasing(!U256::zero(), b)
|
||||
}
|
||||
|
||||
fn mem_gas_calculation_increasing(gas: U256, b: &mut Bencher) {
|
||||
let mut vm = Factory::new(VMType::Interpreter).create(gas);
|
||||
let mut ext = FakeExt::new();
|
||||
|
||||
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
|
||||
|
||||
b.iter(|| {
|
||||
let code = black_box(
|
||||
"6110006001556001546000555b610fff60005401805560016000540380600055600c57".from_hex().unwrap()
|
||||
);
|
||||
|
||||
let mut params = ActionParams::default();
|
||||
params.address = address.clone();
|
||||
params.gas = gas;
|
||||
params.code = Some(code.clone());
|
||||
|
||||
result(vm.exec(params, &mut ext))
|
||||
});
|
||||
}
|
||||
|
||||
fn result(r: evm::Result<evm::GasLeft>) -> U256 {
|
||||
match r {
|
||||
Ok(evm::GasLeft::Known(v)) => v,
|
||||
Ok(evm::GasLeft::NeedsReturn(v, _)) => v,
|
||||
_ => U256::zero(),
|
||||
}
|
||||
}
|
||||
@@ -1,207 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Evm interface.
|
||||
|
||||
use std::{ops, cmp, fmt};
|
||||
use ethereum_types::{U128, U256, U512};
|
||||
use vm::{Ext, Result, ReturnData, GasLeft, Error};
|
||||
|
||||
/// Finalization result. Gas Left: either it is a known value, or it needs to be computed by processing
|
||||
/// a return instruction.
|
||||
#[derive(Debug)]
|
||||
pub struct FinalizationResult {
|
||||
/// Final amount of gas left.
|
||||
pub gas_left: U256,
|
||||
/// Apply execution state changes or revert them.
|
||||
pub apply_state: bool,
|
||||
/// Return data buffer.
|
||||
pub return_data: ReturnData,
|
||||
}
|
||||
|
||||
/// Types that can be "finalized" using an EVM.
|
||||
///
|
||||
/// In practice, this is just used to define an inherent impl on
|
||||
/// `Reult<GasLeft<'a>>`.
|
||||
pub trait Finalize {
|
||||
/// Consume the externalities, call return if necessary, and produce call result.
|
||||
fn finalize<E: Ext>(self, ext: E) -> Result<FinalizationResult>;
|
||||
}
|
||||
|
||||
impl Finalize for Result<GasLeft> {
|
||||
fn finalize<E: Ext>(self, ext: E) -> Result<FinalizationResult> {
|
||||
match self {
|
||||
Ok(GasLeft::Known(gas_left)) => Ok(FinalizationResult { gas_left: gas_left, apply_state: true, return_data: ReturnData::empty() }),
|
||||
Ok(GasLeft::NeedsReturn { gas_left, data, apply_state }) => ext.ret(&gas_left, &data, apply_state).map(|gas_left| FinalizationResult {
|
||||
gas_left: gas_left,
|
||||
apply_state: apply_state,
|
||||
return_data: data,
|
||||
}),
|
||||
Err(err) => Err(err),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Finalize for Error {
|
||||
fn finalize<E: Ext>(self, _ext: E) -> Result<FinalizationResult> {
|
||||
Err(self)
|
||||
}
|
||||
}
|
||||
|
||||
/// Cost calculation type. For low-gas usage we calculate costs using usize instead of U256
|
||||
pub trait CostType: Sized + From<usize> + Copy
|
||||
+ ops::Mul<Output=Self> + ops::Div<Output=Self> + ops::Add<Output=Self> +ops::Sub<Output=Self>
|
||||
+ ops::Shr<usize, Output=Self> + ops::Shl<usize, Output=Self>
|
||||
+ cmp::Ord + fmt::Debug {
|
||||
/// Converts this cost into `U256`
|
||||
fn as_u256(&self) -> U256;
|
||||
/// Tries to fit `U256` into this `Cost` type
|
||||
fn from_u256(val: U256) -> Result<Self>;
|
||||
/// Convert to usize (may panic)
|
||||
fn as_usize(&self) -> usize;
|
||||
/// Add with overflow
|
||||
fn overflow_add(self, other: Self) -> (Self, bool);
|
||||
/// Multiple with overflow
|
||||
fn overflow_mul(self, other: Self) -> (Self, bool);
|
||||
/// Single-step full multiplication and shift: `(self*other) >> shr`
|
||||
/// Should not overflow on intermediate steps
|
||||
fn overflow_mul_shr(self, other: Self, shr: usize) -> (Self, bool);
|
||||
}
|
||||
|
||||
impl CostType for U256 {
|
||||
fn as_u256(&self) -> U256 {
|
||||
*self
|
||||
}
|
||||
|
||||
fn from_u256(val: U256) -> Result<Self> {
|
||||
Ok(val)
|
||||
}
|
||||
|
||||
fn as_usize(&self) -> usize {
|
||||
self.as_u64() as usize
|
||||
}
|
||||
|
||||
fn overflow_add(self, other: Self) -> (Self, bool) {
|
||||
self.overflowing_add(other)
|
||||
}
|
||||
|
||||
fn overflow_mul(self, other: Self) -> (Self, bool) {
|
||||
self.overflowing_mul(other)
|
||||
}
|
||||
|
||||
fn overflow_mul_shr(self, other: Self, shr: usize) -> (Self, bool) {
|
||||
let x = self.full_mul(other);
|
||||
let U512(parts) = x;
|
||||
let overflow = (parts[4] | parts[5] | parts[6] | parts[7]) > 0;
|
||||
let U512(parts) = x >> shr;
|
||||
(
|
||||
U256([parts[0], parts[1], parts[2], parts[3]]),
|
||||
overflow
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl CostType for usize {
|
||||
fn as_u256(&self) -> U256 {
|
||||
U256::from(*self)
|
||||
}
|
||||
|
||||
fn from_u256(val: U256) -> Result<Self> {
|
||||
let res = val.low_u64() as usize;
|
||||
|
||||
// validate if value fits into usize
|
||||
if U256::from(res) != val {
|
||||
return Err(Error::OutOfGas);
|
||||
}
|
||||
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
fn as_usize(&self) -> usize {
|
||||
*self
|
||||
}
|
||||
|
||||
fn overflow_add(self, other: Self) -> (Self, bool) {
|
||||
self.overflowing_add(other)
|
||||
}
|
||||
|
||||
fn overflow_mul(self, other: Self) -> (Self, bool) {
|
||||
self.overflowing_mul(other)
|
||||
}
|
||||
|
||||
fn overflow_mul_shr(self, other: Self, shr: usize) -> (Self, bool) {
|
||||
let (c, o) = U128::from(self).overflowing_mul(U128::from(other));
|
||||
let U128(parts) = c;
|
||||
let overflow = o | (parts[1] > 0);
|
||||
let U128(parts) = c >> shr;
|
||||
let result = parts[0] as usize;
|
||||
let overflow = overflow | (parts[0] > result as u64);
|
||||
(result, overflow)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ethereum_types::U256;
|
||||
use super::CostType;
|
||||
|
||||
#[test]
|
||||
fn should_calculate_overflow_mul_shr_without_overflow() {
|
||||
// given
|
||||
let num = 1048576;
|
||||
|
||||
// when
|
||||
let (res1, o1) = U256::from(num).overflow_mul_shr(U256::from(num), 20);
|
||||
let (res2, o2) = num.overflow_mul_shr(num, 20);
|
||||
|
||||
// then
|
||||
assert_eq!(res1, U256::from(num));
|
||||
assert!(!o1);
|
||||
assert_eq!(res2, num);
|
||||
assert!(!o2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_calculate_overflow_mul_shr_with_overflow() {
|
||||
// given
|
||||
let max = u64::max_value();
|
||||
let num1 = U256([max, max, max, max]);
|
||||
let num2 = usize::max_value();
|
||||
|
||||
// when
|
||||
let (res1, o1) = num1.overflow_mul_shr(num1, 256);
|
||||
let (res2, o2) = num2.overflow_mul_shr(num2, 64);
|
||||
|
||||
// then
|
||||
assert_eq!(res2, num2 - 1);
|
||||
assert!(o2);
|
||||
|
||||
assert_eq!(res1, !U256::zero() - U256::one());
|
||||
assert!(o1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_validate_u256_to_usize_conversion() {
|
||||
// given
|
||||
let v = U256::from(usize::max_value()) + U256::from(1);
|
||||
|
||||
// when
|
||||
let res = usize::from_u256(v);
|
||||
|
||||
// then
|
||||
assert!(res.is_err());
|
||||
}
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Evm factory.
|
||||
//!
|
||||
use std::sync::Arc;
|
||||
use vm::{Vm, Schedule};
|
||||
use ethereum_types::U256;
|
||||
use super::vm::ActionParams;
|
||||
use super::interpreter::SharedCache;
|
||||
use super::vmtype::VMType;
|
||||
|
||||
/// Evm factory. Creates appropriate Evm.
|
||||
#[derive(Clone)]
|
||||
pub struct Factory {
|
||||
evm: VMType,
|
||||
evm_cache: Arc<SharedCache>,
|
||||
}
|
||||
|
||||
impl Factory {
|
||||
/// Create fresh instance of VM
|
||||
/// Might choose implementation depending on supplied gas.
|
||||
pub fn create(&self, params: ActionParams, schedule: &Schedule, depth: usize) -> Box<Vm> {
|
||||
match self.evm {
|
||||
VMType::Interpreter => if Self::can_fit_in_usize(¶ms.gas) {
|
||||
Box::new(super::interpreter::Interpreter::<usize>::new(params, self.evm_cache.clone(), schedule, depth))
|
||||
} else {
|
||||
Box::new(super::interpreter::Interpreter::<U256>::new(params, self.evm_cache.clone(), schedule, depth))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Create new instance of specific `VMType` factory, with a size in bytes
|
||||
/// for caching jump destinations.
|
||||
pub fn new(evm: VMType, cache_size: usize) -> Self {
|
||||
Factory {
|
||||
evm: evm,
|
||||
evm_cache: Arc::new(SharedCache::new(cache_size)),
|
||||
}
|
||||
}
|
||||
|
||||
fn can_fit_in_usize(gas: &U256) -> bool {
|
||||
gas == &U256::from(gas.low_u64() as usize)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Factory {
|
||||
/// Returns native rust evm factory
|
||||
fn default() -> Factory {
|
||||
Factory {
|
||||
evm: VMType::Interpreter,
|
||||
evm_cache: Arc::new(SharedCache::default()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_create_vm() {
|
||||
use vm::Ext;
|
||||
use vm::tests::FakeExt;
|
||||
use bytes::Bytes;
|
||||
|
||||
let mut params = ActionParams::default();
|
||||
params.code = Some(Arc::new(Bytes::default()));
|
||||
let ext = FakeExt::new();
|
||||
let _vm = Factory::default().create(params, ext.schedule(), ext.depth());
|
||||
}
|
||||
|
||||
/// Create tests by injecting different VM factories
|
||||
#[macro_export]
|
||||
macro_rules! evm_test(
|
||||
($name_test: ident: $name_int: ident) => {
|
||||
#[test]
|
||||
fn $name_int() {
|
||||
$name_test(Factory::new(VMType::Interpreter, 1024 * 32));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/// Create ignored tests by injecting different VM factories
|
||||
#[macro_export]
|
||||
macro_rules! evm_test_ignore(
|
||||
($name_test: ident: $name_int: ident) => {
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[cfg(feature = "ignored-tests")]
|
||||
fn $name_int() {
|
||||
$name_test(Factory::new(VMType::Interpreter, 1024 * 32));
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -1,644 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! VM Instructions list and utility functions
|
||||
|
||||
pub use self::Instruction::*;
|
||||
|
||||
macro_rules! enum_with_from_u8 {
|
||||
(
|
||||
$( #[$enum_attr:meta] )*
|
||||
pub enum $name:ident {
|
||||
$( $( #[$variant_attr:meta] )* $variant:ident = $discriminator:expr ),+,
|
||||
}
|
||||
) => {
|
||||
$( #[$enum_attr] )*
|
||||
pub enum $name {
|
||||
$( $( #[$variant_attr] )* $variant = $discriminator ),+,
|
||||
}
|
||||
|
||||
impl $name {
|
||||
#[doc = "Convert from u8 to the given enum"]
|
||||
pub fn from_u8(value: u8) -> Option<Self> {
|
||||
match value {
|
||||
$( $discriminator => Some($variant) ),+,
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
enum_with_from_u8! {
|
||||
#[doc = "Virtual machine bytecode instruction."]
|
||||
#[repr(u8)]
|
||||
#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Debug)]
|
||||
pub enum Instruction {
|
||||
#[doc = "halts execution"]
|
||||
STOP = 0x00,
|
||||
#[doc = "addition operation"]
|
||||
ADD = 0x01,
|
||||
#[doc = "mulitplication operation"]
|
||||
MUL = 0x02,
|
||||
#[doc = "subtraction operation"]
|
||||
SUB = 0x03,
|
||||
#[doc = "integer division operation"]
|
||||
DIV = 0x04,
|
||||
#[doc = "signed integer division operation"]
|
||||
SDIV = 0x05,
|
||||
#[doc = "modulo remainder operation"]
|
||||
MOD = 0x06,
|
||||
#[doc = "signed modulo remainder operation"]
|
||||
SMOD = 0x07,
|
||||
#[doc = "unsigned modular addition"]
|
||||
ADDMOD = 0x08,
|
||||
#[doc = "unsigned modular multiplication"]
|
||||
MULMOD = 0x09,
|
||||
#[doc = "exponential operation"]
|
||||
EXP = 0x0a,
|
||||
#[doc = "extend length of signed integer"]
|
||||
SIGNEXTEND = 0x0b,
|
||||
|
||||
#[doc = "less-than comparision"]
|
||||
LT = 0x10,
|
||||
#[doc = "greater-than comparision"]
|
||||
GT = 0x11,
|
||||
#[doc = "signed less-than comparision"]
|
||||
SLT = 0x12,
|
||||
#[doc = "signed greater-than comparision"]
|
||||
SGT = 0x13,
|
||||
#[doc = "equality comparision"]
|
||||
EQ = 0x14,
|
||||
#[doc = "simple not operator"]
|
||||
ISZERO = 0x15,
|
||||
#[doc = "bitwise AND operation"]
|
||||
AND = 0x16,
|
||||
#[doc = "bitwise OR operation"]
|
||||
OR = 0x17,
|
||||
#[doc = "bitwise XOR operation"]
|
||||
XOR = 0x18,
|
||||
#[doc = "bitwise NOT opertation"]
|
||||
NOT = 0x19,
|
||||
#[doc = "retrieve single byte from word"]
|
||||
BYTE = 0x1a,
|
||||
#[doc = "shift left operation"]
|
||||
SHL = 0x1b,
|
||||
#[doc = "logical shift right operation"]
|
||||
SHR = 0x1c,
|
||||
#[doc = "arithmetic shift right operation"]
|
||||
SAR = 0x1d,
|
||||
|
||||
#[doc = "compute SHA3-256 hash"]
|
||||
SHA3 = 0x20,
|
||||
|
||||
#[doc = "get address of currently executing account"]
|
||||
ADDRESS = 0x30,
|
||||
#[doc = "get balance of the given account"]
|
||||
BALANCE = 0x31,
|
||||
#[doc = "get execution origination address"]
|
||||
ORIGIN = 0x32,
|
||||
#[doc = "get caller address"]
|
||||
CALLER = 0x33,
|
||||
#[doc = "get deposited value by the instruction/transaction responsible for this execution"]
|
||||
CALLVALUE = 0x34,
|
||||
#[doc = "get input data of current environment"]
|
||||
CALLDATALOAD = 0x35,
|
||||
#[doc = "get size of input data in current environment"]
|
||||
CALLDATASIZE = 0x36,
|
||||
#[doc = "copy input data in current environment to memory"]
|
||||
CALLDATACOPY = 0x37,
|
||||
#[doc = "get size of code running in current environment"]
|
||||
CODESIZE = 0x38,
|
||||
#[doc = "copy code running in current environment to memory"]
|
||||
CODECOPY = 0x39,
|
||||
#[doc = "get price of gas in current environment"]
|
||||
GASPRICE = 0x3a,
|
||||
#[doc = "get external code size (from another contract)"]
|
||||
EXTCODESIZE = 0x3b,
|
||||
#[doc = "copy external code (from another contract)"]
|
||||
EXTCODECOPY = 0x3c,
|
||||
#[doc = "get the size of the return data buffer for the last call"]
|
||||
RETURNDATASIZE = 0x3d,
|
||||
#[doc = "copy return data buffer to memory"]
|
||||
RETURNDATACOPY = 0x3e,
|
||||
#[doc = "return the keccak256 hash of contract code"]
|
||||
EXTCODEHASH = 0x3f,
|
||||
|
||||
#[doc = "get hash of most recent complete block"]
|
||||
BLOCKHASH = 0x40,
|
||||
#[doc = "get the block's coinbase address"]
|
||||
COINBASE = 0x41,
|
||||
#[doc = "get the block's timestamp"]
|
||||
TIMESTAMP = 0x42,
|
||||
#[doc = "get the block's number"]
|
||||
NUMBER = 0x43,
|
||||
#[doc = "get the block's difficulty"]
|
||||
DIFFICULTY = 0x44,
|
||||
#[doc = "get the block's gas limit"]
|
||||
GASLIMIT = 0x45,
|
||||
|
||||
#[doc = "remove item from stack"]
|
||||
POP = 0x50,
|
||||
#[doc = "load word from memory"]
|
||||
MLOAD = 0x51,
|
||||
#[doc = "save word to memory"]
|
||||
MSTORE = 0x52,
|
||||
#[doc = "save byte to memory"]
|
||||
MSTORE8 = 0x53,
|
||||
#[doc = "load word from storage"]
|
||||
SLOAD = 0x54,
|
||||
#[doc = "save word to storage"]
|
||||
SSTORE = 0x55,
|
||||
#[doc = "alter the program counter"]
|
||||
JUMP = 0x56,
|
||||
#[doc = "conditionally alter the program counter"]
|
||||
JUMPI = 0x57,
|
||||
#[doc = "get the program counter"]
|
||||
PC = 0x58,
|
||||
#[doc = "get the size of active memory"]
|
||||
MSIZE = 0x59,
|
||||
#[doc = "get the amount of available gas"]
|
||||
GAS = 0x5a,
|
||||
#[doc = "set a potential jump destination"]
|
||||
JUMPDEST = 0x5b,
|
||||
|
||||
#[doc = "place 1 byte item on stack"]
|
||||
PUSH1 = 0x60,
|
||||
#[doc = "place 2 byte item on stack"]
|
||||
PUSH2 = 0x61,
|
||||
#[doc = "place 3 byte item on stack"]
|
||||
PUSH3 = 0x62,
|
||||
#[doc = "place 4 byte item on stack"]
|
||||
PUSH4 = 0x63,
|
||||
#[doc = "place 5 byte item on stack"]
|
||||
PUSH5 = 0x64,
|
||||
#[doc = "place 6 byte item on stack"]
|
||||
PUSH6 = 0x65,
|
||||
#[doc = "place 7 byte item on stack"]
|
||||
PUSH7 = 0x66,
|
||||
#[doc = "place 8 byte item on stack"]
|
||||
PUSH8 = 0x67,
|
||||
#[doc = "place 9 byte item on stack"]
|
||||
PUSH9 = 0x68,
|
||||
#[doc = "place 10 byte item on stack"]
|
||||
PUSH10 = 0x69,
|
||||
#[doc = "place 11 byte item on stack"]
|
||||
PUSH11 = 0x6a,
|
||||
#[doc = "place 12 byte item on stack"]
|
||||
PUSH12 = 0x6b,
|
||||
#[doc = "place 13 byte item on stack"]
|
||||
PUSH13 = 0x6c,
|
||||
#[doc = "place 14 byte item on stack"]
|
||||
PUSH14 = 0x6d,
|
||||
#[doc = "place 15 byte item on stack"]
|
||||
PUSH15 = 0x6e,
|
||||
#[doc = "place 16 byte item on stack"]
|
||||
PUSH16 = 0x6f,
|
||||
#[doc = "place 17 byte item on stack"]
|
||||
PUSH17 = 0x70,
|
||||
#[doc = "place 18 byte item on stack"]
|
||||
PUSH18 = 0x71,
|
||||
#[doc = "place 19 byte item on stack"]
|
||||
PUSH19 = 0x72,
|
||||
#[doc = "place 20 byte item on stack"]
|
||||
PUSH20 = 0x73,
|
||||
#[doc = "place 21 byte item on stack"]
|
||||
PUSH21 = 0x74,
|
||||
#[doc = "place 22 byte item on stack"]
|
||||
PUSH22 = 0x75,
|
||||
#[doc = "place 23 byte item on stack"]
|
||||
PUSH23 = 0x76,
|
||||
#[doc = "place 24 byte item on stack"]
|
||||
PUSH24 = 0x77,
|
||||
#[doc = "place 25 byte item on stack"]
|
||||
PUSH25 = 0x78,
|
||||
#[doc = "place 26 byte item on stack"]
|
||||
PUSH26 = 0x79,
|
||||
#[doc = "place 27 byte item on stack"]
|
||||
PUSH27 = 0x7a,
|
||||
#[doc = "place 28 byte item on stack"]
|
||||
PUSH28 = 0x7b,
|
||||
#[doc = "place 29 byte item on stack"]
|
||||
PUSH29 = 0x7c,
|
||||
#[doc = "place 30 byte item on stack"]
|
||||
PUSH30 = 0x7d,
|
||||
#[doc = "place 31 byte item on stack"]
|
||||
PUSH31 = 0x7e,
|
||||
#[doc = "place 32 byte item on stack"]
|
||||
PUSH32 = 0x7f,
|
||||
|
||||
#[doc = "copies the highest item in the stack to the top of the stack"]
|
||||
DUP1 = 0x80,
|
||||
#[doc = "copies the second highest item in the stack to the top of the stack"]
|
||||
DUP2 = 0x81,
|
||||
#[doc = "copies the third highest item in the stack to the top of the stack"]
|
||||
DUP3 = 0x82,
|
||||
#[doc = "copies the 4th highest item in the stack to the top of the stack"]
|
||||
DUP4 = 0x83,
|
||||
#[doc = "copies the 5th highest item in the stack to the top of the stack"]
|
||||
DUP5 = 0x84,
|
||||
#[doc = "copies the 6th highest item in the stack to the top of the stack"]
|
||||
DUP6 = 0x85,
|
||||
#[doc = "copies the 7th highest item in the stack to the top of the stack"]
|
||||
DUP7 = 0x86,
|
||||
#[doc = "copies the 8th highest item in the stack to the top of the stack"]
|
||||
DUP8 = 0x87,
|
||||
#[doc = "copies the 9th highest item in the stack to the top of the stack"]
|
||||
DUP9 = 0x88,
|
||||
#[doc = "copies the 10th highest item in the stack to the top of the stack"]
|
||||
DUP10 = 0x89,
|
||||
#[doc = "copies the 11th highest item in the stack to the top of the stack"]
|
||||
DUP11 = 0x8a,
|
||||
#[doc = "copies the 12th highest item in the stack to the top of the stack"]
|
||||
DUP12 = 0x8b,
|
||||
#[doc = "copies the 13th highest item in the stack to the top of the stack"]
|
||||
DUP13 = 0x8c,
|
||||
#[doc = "copies the 14th highest item in the stack to the top of the stack"]
|
||||
DUP14 = 0x8d,
|
||||
#[doc = "copies the 15th highest item in the stack to the top of the stack"]
|
||||
DUP15 = 0x8e,
|
||||
#[doc = "copies the 16th highest item in the stack to the top of the stack"]
|
||||
DUP16 = 0x8f,
|
||||
|
||||
#[doc = "swaps the highest and second highest value on the stack"]
|
||||
SWAP1 = 0x90,
|
||||
#[doc = "swaps the highest and third highest value on the stack"]
|
||||
SWAP2 = 0x91,
|
||||
#[doc = "swaps the highest and 4th highest value on the stack"]
|
||||
SWAP3 = 0x92,
|
||||
#[doc = "swaps the highest and 5th highest value on the stack"]
|
||||
SWAP4 = 0x93,
|
||||
#[doc = "swaps the highest and 6th highest value on the stack"]
|
||||
SWAP5 = 0x94,
|
||||
#[doc = "swaps the highest and 7th highest value on the stack"]
|
||||
SWAP6 = 0x95,
|
||||
#[doc = "swaps the highest and 8th highest value on the stack"]
|
||||
SWAP7 = 0x96,
|
||||
#[doc = "swaps the highest and 9th highest value on the stack"]
|
||||
SWAP8 = 0x97,
|
||||
#[doc = "swaps the highest and 10th highest value on the stack"]
|
||||
SWAP9 = 0x98,
|
||||
#[doc = "swaps the highest and 11th highest value on the stack"]
|
||||
SWAP10 = 0x99,
|
||||
#[doc = "swaps the highest and 12th highest value on the stack"]
|
||||
SWAP11 = 0x9a,
|
||||
#[doc = "swaps the highest and 13th highest value on the stack"]
|
||||
SWAP12 = 0x9b,
|
||||
#[doc = "swaps the highest and 14th highest value on the stack"]
|
||||
SWAP13 = 0x9c,
|
||||
#[doc = "swaps the highest and 15th highest value on the stack"]
|
||||
SWAP14 = 0x9d,
|
||||
#[doc = "swaps the highest and 16th highest value on the stack"]
|
||||
SWAP15 = 0x9e,
|
||||
#[doc = "swaps the highest and 17th highest value on the stack"]
|
||||
SWAP16 = 0x9f,
|
||||
|
||||
#[doc = "Makes a log entry, no topics."]
|
||||
LOG0 = 0xa0,
|
||||
#[doc = "Makes a log entry, 1 topic."]
|
||||
LOG1 = 0xa1,
|
||||
#[doc = "Makes a log entry, 2 topics."]
|
||||
LOG2 = 0xa2,
|
||||
#[doc = "Makes a log entry, 3 topics."]
|
||||
LOG3 = 0xa3,
|
||||
#[doc = "Makes a log entry, 4 topics."]
|
||||
LOG4 = 0xa4,
|
||||
|
||||
#[doc = "create a new account with associated code"]
|
||||
CREATE = 0xf0,
|
||||
#[doc = "message-call into an account"]
|
||||
CALL = 0xf1,
|
||||
#[doc = "message-call with another account's code only"]
|
||||
CALLCODE = 0xf2,
|
||||
#[doc = "halt execution returning output data"]
|
||||
RETURN = 0xf3,
|
||||
#[doc = "like CALLCODE but keeps caller's value and sender"]
|
||||
DELEGATECALL = 0xf4,
|
||||
#[doc = "create a new account and set creation address to sha3(sender + sha3(init code)) % 2**160"]
|
||||
CREATE2 = 0xf5,
|
||||
#[doc = "stop execution and revert state changes. Return output data."]
|
||||
REVERT = 0xfd,
|
||||
#[doc = "like CALL but it does not take value, nor modify the state"]
|
||||
STATICCALL = 0xfa,
|
||||
#[doc = "halt execution and register account for later deletion"]
|
||||
SUICIDE = 0xff,
|
||||
}
|
||||
}
|
||||
|
||||
impl Instruction {
|
||||
/// Returns true if given instruction is `PUSHN` instruction.
|
||||
pub fn is_push(&self) -> bool {
|
||||
*self >= PUSH1 && *self <= PUSH32
|
||||
}
|
||||
|
||||
/// Returns number of bytes to read for `PUSHN` instruction
|
||||
/// PUSH1 -> 1
|
||||
pub fn push_bytes(&self) -> Option<usize> {
|
||||
if self.is_push() {
|
||||
Some(((*self as u8) - (PUSH1 as u8) + 1) as usize)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Returns stack position of item to duplicate
|
||||
/// DUP1 -> 0
|
||||
pub fn dup_position(&self) -> Option<usize> {
|
||||
if *self >= DUP1 && *self <= DUP16 {
|
||||
Some(((*self as u8) - (DUP1 as u8)) as usize)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Returns stack position of item to SWAP top with
|
||||
/// SWAP1 -> 1
|
||||
pub fn swap_position(&self) -> Option<usize> {
|
||||
if *self >= SWAP1 && *self <= SWAP16 {
|
||||
Some(((*self as u8) - (SWAP1 as u8) + 1) as usize)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns number of topics to take from stack
|
||||
/// LOG0 -> 0
|
||||
pub fn log_topics(&self) -> Option<usize> {
|
||||
if *self >= LOG0 && *self <= LOG4 {
|
||||
Some(((*self as u8) - (LOG0 as u8)) as usize)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the instruction info.
|
||||
pub fn info(&self) -> &'static InstructionInfo {
|
||||
INSTRUCTIONS[*self as usize].as_ref().expect("A instruction is defined in Instruction enum, but it is not found in InstructionInfo struct; this indicates a logic failure in the code.")
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Copy)]
|
||||
pub enum GasPriceTier {
|
||||
/// 0 Zero
|
||||
Zero,
|
||||
/// 2 Quick
|
||||
Base,
|
||||
/// 3 Fastest
|
||||
VeryLow,
|
||||
/// 5 Fast
|
||||
Low,
|
||||
/// 8 Mid
|
||||
Mid,
|
||||
/// 10 Slow
|
||||
High,
|
||||
/// 20 Ext
|
||||
Ext,
|
||||
/// Multiparam or otherwise special
|
||||
Special,
|
||||
}
|
||||
|
||||
impl GasPriceTier {
|
||||
/// Returns the index in schedule for specific `GasPriceTier`
|
||||
pub fn idx(&self) -> usize {
|
||||
match self {
|
||||
&GasPriceTier::Zero => 0,
|
||||
&GasPriceTier::Base => 1,
|
||||
&GasPriceTier::VeryLow => 2,
|
||||
&GasPriceTier::Low => 3,
|
||||
&GasPriceTier::Mid => 4,
|
||||
&GasPriceTier::High => 5,
|
||||
&GasPriceTier::Ext => 6,
|
||||
&GasPriceTier::Special => 7,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// EVM instruction information.
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct InstructionInfo {
|
||||
/// Mnemonic name.
|
||||
pub name: &'static str,
|
||||
/// Number of stack arguments.
|
||||
pub args: usize,
|
||||
/// Number of returned stack items.
|
||||
pub ret: usize,
|
||||
/// Gas price tier.
|
||||
pub tier: GasPriceTier
|
||||
}
|
||||
|
||||
impl InstructionInfo {
|
||||
/// Create new instruction info.
|
||||
pub fn new(name: &'static str, args: usize, ret: usize, tier: GasPriceTier) -> Self {
|
||||
InstructionInfo {
|
||||
name: name,
|
||||
args: args,
|
||||
ret: ret,
|
||||
tier: tier
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
/// Static instruction table.
|
||||
static ref INSTRUCTIONS: [Option<InstructionInfo>; 0x100] = {
|
||||
let mut arr = [None; 0x100];
|
||||
arr[STOP as usize] = Some(InstructionInfo::new("STOP", 0, 0, GasPriceTier::Zero));
|
||||
arr[ADD as usize] = Some(InstructionInfo::new("ADD", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[SUB as usize] = Some(InstructionInfo::new("SUB", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[MUL as usize] = Some(InstructionInfo::new("MUL", 2, 1, GasPriceTier::Low));
|
||||
arr[DIV as usize] = Some(InstructionInfo::new("DIV", 2, 1, GasPriceTier::Low));
|
||||
arr[SDIV as usize] = Some(InstructionInfo::new("SDIV", 2, 1, GasPriceTier::Low));
|
||||
arr[MOD as usize] = Some(InstructionInfo::new("MOD", 2, 1, GasPriceTier::Low));
|
||||
arr[SMOD as usize] = Some(InstructionInfo::new("SMOD", 2, 1, GasPriceTier::Low));
|
||||
arr[EXP as usize] = Some(InstructionInfo::new("EXP", 2, 1, GasPriceTier::Special));
|
||||
arr[NOT as usize] = Some(InstructionInfo::new("NOT", 1, 1, GasPriceTier::VeryLow));
|
||||
arr[LT as usize] = Some(InstructionInfo::new("LT", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[GT as usize] = Some(InstructionInfo::new("GT", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[SLT as usize] = Some(InstructionInfo::new("SLT", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[SGT as usize] = Some(InstructionInfo::new("SGT", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[EQ as usize] = Some(InstructionInfo::new("EQ", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[ISZERO as usize] = Some(InstructionInfo::new("ISZERO", 1, 1, GasPriceTier::VeryLow));
|
||||
arr[AND as usize] = Some(InstructionInfo::new("AND", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[OR as usize] = Some(InstructionInfo::new("OR", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[XOR as usize] = Some(InstructionInfo::new("XOR", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[BYTE as usize] = Some(InstructionInfo::new("BYTE", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[SHL as usize] = Some(InstructionInfo::new("SHL", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[SHR as usize] = Some(InstructionInfo::new("SHR", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[SAR as usize] = Some(InstructionInfo::new("SAR", 2, 1, GasPriceTier::VeryLow));
|
||||
arr[ADDMOD as usize] = Some(InstructionInfo::new("ADDMOD", 3, 1, GasPriceTier::Mid));
|
||||
arr[MULMOD as usize] = Some(InstructionInfo::new("MULMOD", 3, 1, GasPriceTier::Mid));
|
||||
arr[SIGNEXTEND as usize] = Some(InstructionInfo::new("SIGNEXTEND", 2, 1, GasPriceTier::Low));
|
||||
arr[RETURNDATASIZE as usize] = Some(InstructionInfo::new("RETURNDATASIZE", 0, 1, GasPriceTier::Base));
|
||||
arr[RETURNDATACOPY as usize] = Some(InstructionInfo::new("RETURNDATACOPY", 3, 0, GasPriceTier::VeryLow));
|
||||
arr[SHA3 as usize] = Some(InstructionInfo::new("SHA3", 2, 1, GasPriceTier::Special));
|
||||
arr[ADDRESS as usize] = Some(InstructionInfo::new("ADDRESS", 0, 1, GasPriceTier::Base));
|
||||
arr[BALANCE as usize] = Some(InstructionInfo::new("BALANCE", 1, 1, GasPriceTier::Special));
|
||||
arr[ORIGIN as usize] = Some(InstructionInfo::new("ORIGIN", 0, 1, GasPriceTier::Base));
|
||||
arr[CALLER as usize] = Some(InstructionInfo::new("CALLER", 0, 1, GasPriceTier::Base));
|
||||
arr[CALLVALUE as usize] = Some(InstructionInfo::new("CALLVALUE", 0, 1, GasPriceTier::Base));
|
||||
arr[CALLDATALOAD as usize] = Some(InstructionInfo::new("CALLDATALOAD", 1, 1, GasPriceTier::VeryLow));
|
||||
arr[CALLDATASIZE as usize] = Some(InstructionInfo::new("CALLDATASIZE", 0, 1, GasPriceTier::Base));
|
||||
arr[CALLDATACOPY as usize] = Some(InstructionInfo::new("CALLDATACOPY", 3, 0, GasPriceTier::VeryLow));
|
||||
arr[EXTCODEHASH as usize] = Some(InstructionInfo::new("EXTCODEHASH", 1, 1, GasPriceTier::Special));
|
||||
arr[CODESIZE as usize] = Some(InstructionInfo::new("CODESIZE", 0, 1, GasPriceTier::Base));
|
||||
arr[CODECOPY as usize] = Some(InstructionInfo::new("CODECOPY", 3, 0, GasPriceTier::VeryLow));
|
||||
arr[GASPRICE as usize] = Some(InstructionInfo::new("GASPRICE", 0, 1, GasPriceTier::Base));
|
||||
arr[EXTCODESIZE as usize] = Some(InstructionInfo::new("EXTCODESIZE", 1, 1, GasPriceTier::Special));
|
||||
arr[EXTCODECOPY as usize] = Some(InstructionInfo::new("EXTCODECOPY", 4, 0, GasPriceTier::Special));
|
||||
arr[BLOCKHASH as usize] = Some(InstructionInfo::new("BLOCKHASH", 1, 1, GasPriceTier::Ext));
|
||||
arr[COINBASE as usize] = Some(InstructionInfo::new("COINBASE", 0, 1, GasPriceTier::Base));
|
||||
arr[TIMESTAMP as usize] = Some(InstructionInfo::new("TIMESTAMP", 0, 1, GasPriceTier::Base));
|
||||
arr[NUMBER as usize] = Some(InstructionInfo::new("NUMBER", 0, 1, GasPriceTier::Base));
|
||||
arr[DIFFICULTY as usize] = Some(InstructionInfo::new("DIFFICULTY", 0, 1, GasPriceTier::Base));
|
||||
arr[GASLIMIT as usize] = Some(InstructionInfo::new("GASLIMIT", 0, 1, GasPriceTier::Base));
|
||||
arr[POP as usize] = Some(InstructionInfo::new("POP", 1, 0, GasPriceTier::Base));
|
||||
arr[MLOAD as usize] = Some(InstructionInfo::new("MLOAD", 1, 1, GasPriceTier::VeryLow));
|
||||
arr[MSTORE as usize] = Some(InstructionInfo::new("MSTORE", 2, 0, GasPriceTier::VeryLow));
|
||||
arr[MSTORE8 as usize] = Some(InstructionInfo::new("MSTORE8", 2, 0, GasPriceTier::VeryLow));
|
||||
arr[SLOAD as usize] = Some(InstructionInfo::new("SLOAD", 1, 1, GasPriceTier::Special));
|
||||
arr[SSTORE as usize] = Some(InstructionInfo::new("SSTORE", 2, 0, GasPriceTier::Special));
|
||||
arr[JUMP as usize] = Some(InstructionInfo::new("JUMP", 1, 0, GasPriceTier::Mid));
|
||||
arr[JUMPI as usize] = Some(InstructionInfo::new("JUMPI", 2, 0, GasPriceTier::High));
|
||||
arr[PC as usize] = Some(InstructionInfo::new("PC", 0, 1, GasPriceTier::Base));
|
||||
arr[MSIZE as usize] = Some(InstructionInfo::new("MSIZE", 0, 1, GasPriceTier::Base));
|
||||
arr[GAS as usize] = Some(InstructionInfo::new("GAS", 0, 1, GasPriceTier::Base));
|
||||
arr[JUMPDEST as usize] = Some(InstructionInfo::new("JUMPDEST", 0, 0, GasPriceTier::Special));
|
||||
arr[PUSH1 as usize] = Some(InstructionInfo::new("PUSH1", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH2 as usize] = Some(InstructionInfo::new("PUSH2", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH3 as usize] = Some(InstructionInfo::new("PUSH3", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH4 as usize] = Some(InstructionInfo::new("PUSH4", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH5 as usize] = Some(InstructionInfo::new("PUSH5", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH6 as usize] = Some(InstructionInfo::new("PUSH6", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH7 as usize] = Some(InstructionInfo::new("PUSH7", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH8 as usize] = Some(InstructionInfo::new("PUSH8", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH9 as usize] = Some(InstructionInfo::new("PUSH9", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH10 as usize] = Some(InstructionInfo::new("PUSH10", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH11 as usize] = Some(InstructionInfo::new("PUSH11", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH12 as usize] = Some(InstructionInfo::new("PUSH12", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH13 as usize] = Some(InstructionInfo::new("PUSH13", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH14 as usize] = Some(InstructionInfo::new("PUSH14", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH15 as usize] = Some(InstructionInfo::new("PUSH15", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH16 as usize] = Some(InstructionInfo::new("PUSH16", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH17 as usize] = Some(InstructionInfo::new("PUSH17", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH18 as usize] = Some(InstructionInfo::new("PUSH18", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH19 as usize] = Some(InstructionInfo::new("PUSH19", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH20 as usize] = Some(InstructionInfo::new("PUSH20", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH21 as usize] = Some(InstructionInfo::new("PUSH21", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH22 as usize] = Some(InstructionInfo::new("PUSH22", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH23 as usize] = Some(InstructionInfo::new("PUSH23", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH24 as usize] = Some(InstructionInfo::new("PUSH24", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH25 as usize] = Some(InstructionInfo::new("PUSH25", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH26 as usize] = Some(InstructionInfo::new("PUSH26", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH27 as usize] = Some(InstructionInfo::new("PUSH27", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH28 as usize] = Some(InstructionInfo::new("PUSH28", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH29 as usize] = Some(InstructionInfo::new("PUSH29", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH30 as usize] = Some(InstructionInfo::new("PUSH30", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH31 as usize] = Some(InstructionInfo::new("PUSH31", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[PUSH32 as usize] = Some(InstructionInfo::new("PUSH32", 0, 1, GasPriceTier::VeryLow));
|
||||
arr[DUP1 as usize] = Some(InstructionInfo::new("DUP1", 1, 2, GasPriceTier::VeryLow));
|
||||
arr[DUP2 as usize] = Some(InstructionInfo::new("DUP2", 2, 3, GasPriceTier::VeryLow));
|
||||
arr[DUP3 as usize] = Some(InstructionInfo::new("DUP3", 3, 4, GasPriceTier::VeryLow));
|
||||
arr[DUP4 as usize] = Some(InstructionInfo::new("DUP4", 4, 5, GasPriceTier::VeryLow));
|
||||
arr[DUP5 as usize] = Some(InstructionInfo::new("DUP5", 5, 6, GasPriceTier::VeryLow));
|
||||
arr[DUP6 as usize] = Some(InstructionInfo::new("DUP6", 6, 7, GasPriceTier::VeryLow));
|
||||
arr[DUP7 as usize] = Some(InstructionInfo::new("DUP7", 7, 8, GasPriceTier::VeryLow));
|
||||
arr[DUP8 as usize] = Some(InstructionInfo::new("DUP8", 8, 9, GasPriceTier::VeryLow));
|
||||
arr[DUP9 as usize] = Some(InstructionInfo::new("DUP9", 9, 10, GasPriceTier::VeryLow));
|
||||
arr[DUP10 as usize] = Some(InstructionInfo::new("DUP10", 10, 11, GasPriceTier::VeryLow));
|
||||
arr[DUP11 as usize] = Some(InstructionInfo::new("DUP11", 11, 12, GasPriceTier::VeryLow));
|
||||
arr[DUP12 as usize] = Some(InstructionInfo::new("DUP12", 12, 13, GasPriceTier::VeryLow));
|
||||
arr[DUP13 as usize] = Some(InstructionInfo::new("DUP13", 13, 14, GasPriceTier::VeryLow));
|
||||
arr[DUP14 as usize] = Some(InstructionInfo::new("DUP14", 14, 15, GasPriceTier::VeryLow));
|
||||
arr[DUP15 as usize] = Some(InstructionInfo::new("DUP15", 15, 16, GasPriceTier::VeryLow));
|
||||
arr[DUP16 as usize] = Some(InstructionInfo::new("DUP16", 16, 17, GasPriceTier::VeryLow));
|
||||
arr[SWAP1 as usize] = Some(InstructionInfo::new("SWAP1", 2, 2, GasPriceTier::VeryLow));
|
||||
arr[SWAP2 as usize] = Some(InstructionInfo::new("SWAP2", 3, 3, GasPriceTier::VeryLow));
|
||||
arr[SWAP3 as usize] = Some(InstructionInfo::new("SWAP3", 4, 4, GasPriceTier::VeryLow));
|
||||
arr[SWAP4 as usize] = Some(InstructionInfo::new("SWAP4", 5, 5, GasPriceTier::VeryLow));
|
||||
arr[SWAP5 as usize] = Some(InstructionInfo::new("SWAP5", 6, 6, GasPriceTier::VeryLow));
|
||||
arr[SWAP6 as usize] = Some(InstructionInfo::new("SWAP6", 7, 7, GasPriceTier::VeryLow));
|
||||
arr[SWAP7 as usize] = Some(InstructionInfo::new("SWAP7", 8, 8, GasPriceTier::VeryLow));
|
||||
arr[SWAP8 as usize] = Some(InstructionInfo::new("SWAP8", 9, 9, GasPriceTier::VeryLow));
|
||||
arr[SWAP9 as usize] = Some(InstructionInfo::new("SWAP9", 10, 10, GasPriceTier::VeryLow));
|
||||
arr[SWAP10 as usize] = Some(InstructionInfo::new("SWAP10", 11, 11, GasPriceTier::VeryLow));
|
||||
arr[SWAP11 as usize] = Some(InstructionInfo::new("SWAP11", 12, 12, GasPriceTier::VeryLow));
|
||||
arr[SWAP12 as usize] = Some(InstructionInfo::new("SWAP12", 13, 13, GasPriceTier::VeryLow));
|
||||
arr[SWAP13 as usize] = Some(InstructionInfo::new("SWAP13", 14, 14, GasPriceTier::VeryLow));
|
||||
arr[SWAP14 as usize] = Some(InstructionInfo::new("SWAP14", 15, 15, GasPriceTier::VeryLow));
|
||||
arr[SWAP15 as usize] = Some(InstructionInfo::new("SWAP15", 16, 16, GasPriceTier::VeryLow));
|
||||
arr[SWAP16 as usize] = Some(InstructionInfo::new("SWAP16", 17, 17, GasPriceTier::VeryLow));
|
||||
arr[LOG0 as usize] = Some(InstructionInfo::new("LOG0", 2, 0, GasPriceTier::Special));
|
||||
arr[LOG1 as usize] = Some(InstructionInfo::new("LOG1", 3, 0, GasPriceTier::Special));
|
||||
arr[LOG2 as usize] = Some(InstructionInfo::new("LOG2", 4, 0, GasPriceTier::Special));
|
||||
arr[LOG3 as usize] = Some(InstructionInfo::new("LOG3", 5, 0, GasPriceTier::Special));
|
||||
arr[LOG4 as usize] = Some(InstructionInfo::new("LOG4", 6, 0, GasPriceTier::Special));
|
||||
arr[CREATE as usize] = Some(InstructionInfo::new("CREATE", 3, 1, GasPriceTier::Special));
|
||||
arr[CALL as usize] = Some(InstructionInfo::new("CALL", 7, 1, GasPriceTier::Special));
|
||||
arr[CALLCODE as usize] = Some(InstructionInfo::new("CALLCODE", 7, 1, GasPriceTier::Special));
|
||||
arr[RETURN as usize] = Some(InstructionInfo::new("RETURN", 2, 0, GasPriceTier::Zero));
|
||||
arr[DELEGATECALL as usize] = Some(InstructionInfo::new("DELEGATECALL", 6, 1, GasPriceTier::Special));
|
||||
arr[STATICCALL as usize] = Some(InstructionInfo::new("STATICCALL", 6, 1, GasPriceTier::Special));
|
||||
arr[SUICIDE as usize] = Some(InstructionInfo::new("SUICIDE", 1, 0, GasPriceTier::Special));
|
||||
arr[CREATE2 as usize] = Some(InstructionInfo::new("CREATE2", 4, 1, GasPriceTier::Special));
|
||||
arr[REVERT as usize] = Some(InstructionInfo::new("REVERT", 2, 0, GasPriceTier::Zero));
|
||||
arr
|
||||
};
|
||||
}
|
||||
|
||||
/// Maximal number of topics for log instructions
|
||||
pub const MAX_NO_OF_TOPICS: usize = 4;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_is_push() {
|
||||
assert!(PUSH1.is_push());
|
||||
assert!(PUSH32.is_push());
|
||||
assert!(!DUP1.is_push());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_push_bytes() {
|
||||
assert_eq!(PUSH1.push_bytes(), Some(1));
|
||||
assert_eq!(PUSH3.push_bytes(), Some(3));
|
||||
assert_eq!(PUSH32.push_bytes(), Some(32));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_dup_position() {
|
||||
assert_eq!(DUP1.dup_position(), Some(0));
|
||||
assert_eq!(DUP5.dup_position(), Some(4));
|
||||
assert_eq!(DUP10.dup_position(), Some(9));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_swap_position() {
|
||||
assert_eq!(SWAP1.swap_position(), Some(1));
|
||||
assert_eq!(SWAP5.swap_position(), Some(5));
|
||||
assert_eq!(SWAP10.swap_position(), Some(10));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_log_topics() {
|
||||
assert_eq!(LOG0.log_topics(), Some(0));
|
||||
assert_eq!(LOG2.log_topics(), Some(2));
|
||||
assert_eq!(LOG4.log_topics(), Some(4));
|
||||
}
|
||||
}
|
||||
@@ -1,485 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::cmp;
|
||||
use ethereum_types::{U256, H256};
|
||||
use super::u256_to_address;
|
||||
|
||||
use {evm, vm};
|
||||
use instructions::{self, Instruction, InstructionInfo};
|
||||
use interpreter::stack::Stack;
|
||||
use vm::Schedule;
|
||||
|
||||
macro_rules! overflowing {
|
||||
($x: expr) => {{
|
||||
let (v, overflow) = $x;
|
||||
if overflow { return Err(vm::Error::OutOfGas); }
|
||||
v
|
||||
}}
|
||||
}
|
||||
|
||||
enum Request<Cost: ::evm::CostType> {
|
||||
Gas(Cost),
|
||||
GasMem(Cost, Cost),
|
||||
GasMemProvide(Cost, Cost, Option<U256>),
|
||||
GasMemCopy(Cost, Cost, Cost)
|
||||
}
|
||||
|
||||
pub struct InstructionRequirements<Cost> {
|
||||
pub gas_cost: Cost,
|
||||
pub provide_gas: Option<Cost>,
|
||||
pub memory_total_gas: Cost,
|
||||
pub memory_required_size: usize,
|
||||
}
|
||||
|
||||
pub struct Gasometer<Gas> {
|
||||
pub current_gas: Gas,
|
||||
pub current_mem_gas: Gas,
|
||||
}
|
||||
|
||||
impl<Gas: evm::CostType> Gasometer<Gas> {
|
||||
|
||||
pub fn new(current_gas: Gas) -> Self {
|
||||
Gasometer {
|
||||
current_gas: current_gas,
|
||||
current_mem_gas: Gas::from(0),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn verify_gas(&self, gas_cost: &Gas) -> vm::Result<()> {
|
||||
match &self.current_gas < gas_cost {
|
||||
true => Err(vm::Error::OutOfGas),
|
||||
false => Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// How much gas is provided to a CALL/CREATE, given that we need to deduct `needed` for this operation
|
||||
/// and that we `requested` some.
|
||||
pub fn gas_provided(&self, schedule: &Schedule, needed: Gas, requested: Option<U256>) -> vm::Result<Gas> {
|
||||
// Try converting requested gas to `Gas` (`U256/u64`)
|
||||
// but in EIP150 even if we request more we should never fail from OOG
|
||||
let requested = requested.map(Gas::from_u256);
|
||||
|
||||
match schedule.sub_gas_cap_divisor {
|
||||
Some(cap_divisor) if self.current_gas >= needed => {
|
||||
let gas_remaining = self.current_gas - needed;
|
||||
let max_gas_provided = match cap_divisor {
|
||||
64 => gas_remaining - (gas_remaining >> 6),
|
||||
cap_divisor => gas_remaining - gas_remaining / Gas::from(cap_divisor),
|
||||
};
|
||||
|
||||
if let Some(Ok(r)) = requested {
|
||||
Ok(cmp::min(r, max_gas_provided))
|
||||
} else {
|
||||
Ok(max_gas_provided)
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
if let Some(r) = requested {
|
||||
r
|
||||
} else if self.current_gas >= needed {
|
||||
Ok(self.current_gas - needed)
|
||||
} else {
|
||||
Ok(0.into())
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Determine how much gas is used by the given instruction, given the machine's state.
|
||||
///
|
||||
/// We guarantee that the final element of the returned tuple (`provided`) will be `Some`
|
||||
/// iff the `instruction` is one of `CREATE`, or any of the `CALL` variants. In this case,
|
||||
/// it will be the amount of gas that the current context provides to the child context.
|
||||
pub fn requirements(
|
||||
&mut self,
|
||||
ext: &vm::Ext,
|
||||
instruction: Instruction,
|
||||
info: &InstructionInfo,
|
||||
stack: &Stack<U256>,
|
||||
current_mem_size: usize,
|
||||
) -> vm::Result<InstructionRequirements<Gas>> {
|
||||
let schedule = ext.schedule();
|
||||
let tier = info.tier.idx();
|
||||
let default_gas = Gas::from(schedule.tier_step_gas[tier]);
|
||||
|
||||
let cost = match instruction {
|
||||
instructions::JUMPDEST => {
|
||||
Request::Gas(Gas::from(1))
|
||||
},
|
||||
instructions::SSTORE => {
|
||||
let address = H256::from(stack.peek(0));
|
||||
let newval = stack.peek(1);
|
||||
let val = U256::from(&*ext.storage_at(&address)?);
|
||||
|
||||
let gas = if schedule.eip1283 {
|
||||
let orig = U256::from(&*ext.initial_storage_at(&address)?);
|
||||
calculate_eip1283_sstore_gas(schedule, &orig, &val, &newval)
|
||||
} else {
|
||||
if val.is_zero() && !newval.is_zero() {
|
||||
schedule.sstore_set_gas
|
||||
} else {
|
||||
// Refund for below case is added when actually executing sstore
|
||||
// !is_zero(&val) && is_zero(newval)
|
||||
schedule.sstore_reset_gas
|
||||
}
|
||||
};
|
||||
Request::Gas(Gas::from(gas))
|
||||
},
|
||||
instructions::SLOAD => {
|
||||
Request::Gas(Gas::from(schedule.sload_gas))
|
||||
},
|
||||
instructions::BALANCE => {
|
||||
Request::Gas(Gas::from(schedule.balance_gas))
|
||||
},
|
||||
instructions::EXTCODESIZE => {
|
||||
Request::Gas(Gas::from(schedule.extcodesize_gas))
|
||||
},
|
||||
instructions::EXTCODEHASH => {
|
||||
Request::Gas(Gas::from(schedule.extcodehash_gas))
|
||||
},
|
||||
instructions::SUICIDE => {
|
||||
let mut gas = Gas::from(schedule.suicide_gas);
|
||||
|
||||
let is_value_transfer = !ext.origin_balance()?.is_zero();
|
||||
let address = u256_to_address(stack.peek(0));
|
||||
if (
|
||||
!schedule.no_empty && !ext.exists(&address)?
|
||||
) || (
|
||||
schedule.no_empty && is_value_transfer && !ext.exists_and_not_null(&address)?
|
||||
) {
|
||||
gas = overflowing!(gas.overflow_add(schedule.suicide_to_new_account_cost.into()));
|
||||
}
|
||||
|
||||
Request::Gas(gas)
|
||||
},
|
||||
instructions::MSTORE | instructions::MLOAD => {
|
||||
Request::GasMem(default_gas, mem_needed_const(stack.peek(0), 32)?)
|
||||
},
|
||||
instructions::MSTORE8 => {
|
||||
Request::GasMem(default_gas, mem_needed_const(stack.peek(0), 1)?)
|
||||
},
|
||||
instructions::RETURN | instructions::REVERT => {
|
||||
Request::GasMem(default_gas, mem_needed(stack.peek(0), stack.peek(1))?)
|
||||
},
|
||||
instructions::SHA3 => {
|
||||
let words = overflowing!(to_word_size(Gas::from_u256(*stack.peek(1))?));
|
||||
let gas = overflowing!(Gas::from(schedule.sha3_gas).overflow_add(overflowing!(Gas::from(schedule.sha3_word_gas).overflow_mul(words))));
|
||||
Request::GasMem(gas, mem_needed(stack.peek(0), stack.peek(1))?)
|
||||
},
|
||||
instructions::CALLDATACOPY | instructions::CODECOPY | instructions::RETURNDATACOPY => {
|
||||
Request::GasMemCopy(default_gas, mem_needed(stack.peek(0), stack.peek(2))?, Gas::from_u256(*stack.peek(2))?)
|
||||
},
|
||||
instructions::EXTCODECOPY => {
|
||||
Request::GasMemCopy(schedule.extcodecopy_base_gas.into(), mem_needed(stack.peek(1), stack.peek(3))?, Gas::from_u256(*stack.peek(3))?)
|
||||
},
|
||||
instructions::LOG0 | instructions::LOG1 | instructions::LOG2 | instructions::LOG3 | instructions::LOG4 => {
|
||||
let no_of_topics = instruction.log_topics().expect("log_topics always return some for LOG* instructions; qed");
|
||||
let log_gas = schedule.log_gas + schedule.log_topic_gas * no_of_topics;
|
||||
|
||||
let data_gas = overflowing!(Gas::from_u256(*stack.peek(1))?.overflow_mul(Gas::from(schedule.log_data_gas)));
|
||||
let gas = overflowing!(data_gas.overflow_add(Gas::from(log_gas)));
|
||||
Request::GasMem(gas, mem_needed(stack.peek(0), stack.peek(1))?)
|
||||
},
|
||||
instructions::CALL | instructions::CALLCODE => {
|
||||
let mut gas = Gas::from(schedule.call_gas);
|
||||
let mem = cmp::max(
|
||||
mem_needed(stack.peek(5), stack.peek(6))?,
|
||||
mem_needed(stack.peek(3), stack.peek(4))?
|
||||
);
|
||||
|
||||
let address = u256_to_address(stack.peek(1));
|
||||
let is_value_transfer = !stack.peek(2).is_zero();
|
||||
|
||||
if instruction == instructions::CALL && (
|
||||
(!schedule.no_empty && !ext.exists(&address)?)
|
||||
||
|
||||
(schedule.no_empty && is_value_transfer && !ext.exists_and_not_null(&address)?)
|
||||
) {
|
||||
gas = overflowing!(gas.overflow_add(schedule.call_new_account_gas.into()));
|
||||
}
|
||||
|
||||
if is_value_transfer {
|
||||
gas = overflowing!(gas.overflow_add(schedule.call_value_transfer_gas.into()));
|
||||
}
|
||||
|
||||
let requested = *stack.peek(0);
|
||||
|
||||
Request::GasMemProvide(gas, mem, Some(requested))
|
||||
},
|
||||
instructions::DELEGATECALL | instructions::STATICCALL => {
|
||||
let gas = Gas::from(schedule.call_gas);
|
||||
let mem = cmp::max(
|
||||
mem_needed(stack.peek(4), stack.peek(5))?,
|
||||
mem_needed(stack.peek(2), stack.peek(3))?
|
||||
);
|
||||
let requested = *stack.peek(0);
|
||||
|
||||
Request::GasMemProvide(gas, mem, Some(requested))
|
||||
},
|
||||
instructions::CREATE => {
|
||||
let start = stack.peek(1);
|
||||
let len = stack.peek(2);
|
||||
|
||||
let gas = Gas::from(schedule.create_gas);
|
||||
let mem = mem_needed(start, len)?;
|
||||
|
||||
Request::GasMemProvide(gas, mem, None)
|
||||
},
|
||||
instructions::CREATE2 => {
|
||||
let start = stack.peek(1);
|
||||
let len = stack.peek(2);
|
||||
|
||||
let base = Gas::from(schedule.create_gas);
|
||||
let word = overflowing!(to_word_size(Gas::from_u256(*len)?));
|
||||
let word_gas = overflowing!(Gas::from(schedule.sha3_word_gas).overflow_mul(word));
|
||||
let gas = overflowing!(base.overflow_add(word_gas));
|
||||
let mem = mem_needed(start, len)?;
|
||||
|
||||
Request::GasMemProvide(gas, mem, None)
|
||||
},
|
||||
instructions::EXP => {
|
||||
let expon = stack.peek(1);
|
||||
let bytes = ((expon.bits() + 7) / 8) as usize;
|
||||
let gas = Gas::from(schedule.exp_gas + schedule.exp_byte_gas * bytes);
|
||||
Request::Gas(gas)
|
||||
},
|
||||
instructions::BLOCKHASH => {
|
||||
Request::Gas(Gas::from(schedule.blockhash_gas))
|
||||
},
|
||||
_ => Request::Gas(default_gas),
|
||||
};
|
||||
|
||||
Ok(match cost {
|
||||
Request::Gas(gas) => {
|
||||
InstructionRequirements {
|
||||
gas_cost: gas,
|
||||
provide_gas: None,
|
||||
memory_required_size: 0,
|
||||
memory_total_gas: self.current_mem_gas,
|
||||
}
|
||||
},
|
||||
Request::GasMem(gas, mem_size) => {
|
||||
let (mem_gas_cost, new_mem_gas, new_mem_size) = self.mem_gas_cost(schedule, current_mem_size, &mem_size)?;
|
||||
let gas = overflowing!(gas.overflow_add(mem_gas_cost));
|
||||
InstructionRequirements {
|
||||
gas_cost: gas,
|
||||
provide_gas: None,
|
||||
memory_required_size: new_mem_size,
|
||||
memory_total_gas: new_mem_gas,
|
||||
}
|
||||
},
|
||||
Request::GasMemProvide(gas, mem_size, requested) => {
|
||||
let (mem_gas_cost, new_mem_gas, new_mem_size) = self.mem_gas_cost(schedule, current_mem_size, &mem_size)?;
|
||||
let gas = overflowing!(gas.overflow_add(mem_gas_cost));
|
||||
let provided = self.gas_provided(schedule, gas, requested)?;
|
||||
let total_gas = overflowing!(gas.overflow_add(provided));
|
||||
|
||||
InstructionRequirements {
|
||||
gas_cost: total_gas,
|
||||
provide_gas: Some(provided),
|
||||
memory_required_size: new_mem_size,
|
||||
memory_total_gas: new_mem_gas,
|
||||
}
|
||||
},
|
||||
Request::GasMemCopy(gas, mem_size, copy) => {
|
||||
let (mem_gas_cost, new_mem_gas, new_mem_size) = self.mem_gas_cost(schedule, current_mem_size, &mem_size)?;
|
||||
let copy = overflowing!(to_word_size(copy));
|
||||
let copy_gas = overflowing!(Gas::from(schedule.copy_gas).overflow_mul(copy));
|
||||
let gas = overflowing!(gas.overflow_add(copy_gas));
|
||||
let gas = overflowing!(gas.overflow_add(mem_gas_cost));
|
||||
|
||||
InstructionRequirements {
|
||||
gas_cost: gas,
|
||||
provide_gas: None,
|
||||
memory_required_size: new_mem_size,
|
||||
memory_total_gas: new_mem_gas,
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
fn mem_gas_cost(&self, schedule: &Schedule, current_mem_size: usize, mem_size: &Gas) -> vm::Result<(Gas, Gas, usize)> {
|
||||
let gas_for_mem = |mem_size: Gas| {
|
||||
let s = mem_size >> 5;
|
||||
// s * memory_gas + s * s / quad_coeff_div
|
||||
let a = overflowing!(s.overflow_mul(Gas::from(schedule.memory_gas)));
|
||||
|
||||
// Calculate s*s/quad_coeff_div
|
||||
assert_eq!(schedule.quad_coeff_div, 512);
|
||||
let b = overflowing!(s.overflow_mul_shr(s, 9));
|
||||
Ok(overflowing!(a.overflow_add(b)))
|
||||
};
|
||||
|
||||
let current_mem_size = Gas::from(current_mem_size);
|
||||
let req_mem_size_rounded = overflowing!(to_word_size(*mem_size)) << 5;
|
||||
|
||||
let (mem_gas_cost, new_mem_gas) = if req_mem_size_rounded > current_mem_size {
|
||||
let new_mem_gas = gas_for_mem(req_mem_size_rounded)?;
|
||||
(new_mem_gas - self.current_mem_gas, new_mem_gas)
|
||||
} else {
|
||||
(Gas::from(0), self.current_mem_gas)
|
||||
};
|
||||
|
||||
Ok((mem_gas_cost, new_mem_gas, req_mem_size_rounded.as_usize()))
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn mem_needed_const<Gas: evm::CostType>(mem: &U256, add: usize) -> vm::Result<Gas> {
|
||||
Gas::from_u256(overflowing!(mem.overflowing_add(U256::from(add))))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn mem_needed<Gas: evm::CostType>(offset: &U256, size: &U256) -> vm::Result<Gas> {
|
||||
if size.is_zero() {
|
||||
return Ok(Gas::from(0));
|
||||
}
|
||||
|
||||
Gas::from_u256(overflowing!(offset.overflowing_add(*size)))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn add_gas_usize<Gas: evm::CostType>(value: Gas, num: usize) -> (Gas, bool) {
|
||||
value.overflow_add(Gas::from(num))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn to_word_size<Gas: evm::CostType>(value: Gas) -> (Gas, bool) {
|
||||
let (gas, overflow) = add_gas_usize(value, 31);
|
||||
if overflow {
|
||||
return (gas, overflow);
|
||||
}
|
||||
|
||||
(gas >> 5, false)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn calculate_eip1283_sstore_gas<Gas: evm::CostType>(schedule: &Schedule, original: &U256, current: &U256, new: &U256) -> Gas {
|
||||
Gas::from(
|
||||
if current == new {
|
||||
// 1. If current value equals new value (this is a no-op), 200 gas is deducted.
|
||||
schedule.sload_gas
|
||||
} else {
|
||||
// 2. If current value does not equal new value
|
||||
if original == current {
|
||||
// 2.1. If original value equals current value (this storage slot has not been changed by the current execution context)
|
||||
if original.is_zero() {
|
||||
// 2.1.1. If original value is 0, 20000 gas is deducted.
|
||||
schedule.sstore_set_gas
|
||||
} else {
|
||||
// 2.1.2. Otherwise, 5000 gas is deducted.
|
||||
schedule.sstore_reset_gas
|
||||
|
||||
// 2.1.2.1. If new value is 0, add 15000 gas to refund counter.
|
||||
}
|
||||
} else {
|
||||
// 2.2. If original value does not equal current value (this storage slot is dirty), 200 gas is deducted. Apply both of the following clauses.
|
||||
schedule.sload_gas
|
||||
|
||||
// 2.2.1. If original value is not 0
|
||||
// 2.2.1.1. If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0.
|
||||
// 2.2.1.2. If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter.
|
||||
|
||||
// 2.2.2. If original value equals new value (this storage slot is reset)
|
||||
// 2.2.2.1. If original value is 0, add 19800 gas to refund counter.
|
||||
// 2.2.2.2. Otherwise, add 4800 gas to refund counter.
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
pub fn handle_eip1283_sstore_clears_refund(ext: &mut vm::Ext, original: &U256, current: &U256, new: &U256) {
|
||||
let sstore_clears_schedule = ext.schedule().sstore_refund_gas;
|
||||
|
||||
if current == new {
|
||||
// 1. If current value equals new value (this is a no-op), 200 gas is deducted.
|
||||
} else {
|
||||
// 2. If current value does not equal new value
|
||||
if original == current {
|
||||
// 2.1. If original value equals current value (this storage slot has not been changed by the current execution context)
|
||||
if original.is_zero() {
|
||||
// 2.1.1. If original value is 0, 20000 gas is deducted.
|
||||
} else {
|
||||
// 2.1.2. Otherwise, 5000 gas is deducted.
|
||||
if new.is_zero() {
|
||||
// 2.1.2.1. If new value is 0, add 15000 gas to refund counter.
|
||||
ext.add_sstore_refund(sstore_clears_schedule);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 2.2. If original value does not equal current value (this storage slot is dirty), 200 gas is deducted. Apply both of the following clauses.
|
||||
|
||||
if !original.is_zero() {
|
||||
// 2.2.1. If original value is not 0
|
||||
if current.is_zero() {
|
||||
// 2.2.1.1. If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0.
|
||||
ext.sub_sstore_refund(sstore_clears_schedule);
|
||||
} else if new.is_zero() {
|
||||
// 2.2.1.2. If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter.
|
||||
ext.add_sstore_refund(sstore_clears_schedule);
|
||||
}
|
||||
}
|
||||
|
||||
if original == new {
|
||||
// 2.2.2. If original value equals new value (this storage slot is reset)
|
||||
if original.is_zero() {
|
||||
// 2.2.2.1. If original value is 0, add 19800 gas to refund counter.
|
||||
let refund = ext.schedule().sstore_set_gas - ext.schedule().sload_gas;
|
||||
ext.add_sstore_refund(refund);
|
||||
} else {
|
||||
// 2.2.2.2. Otherwise, add 4800 gas to refund counter.
|
||||
let refund = ext.schedule().sstore_reset_gas - ext.schedule().sload_gas;
|
||||
ext.add_sstore_refund(refund);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mem_gas_cost() {
|
||||
// given
|
||||
let gasometer = Gasometer::<U256>::new(U256::zero());
|
||||
let schedule = Schedule::default();
|
||||
let current_mem_size = 5;
|
||||
let mem_size = !U256::zero();
|
||||
|
||||
// when
|
||||
let result = gasometer.mem_gas_cost(&schedule, current_mem_size, &mem_size);
|
||||
|
||||
// then
|
||||
if result.is_ok() {
|
||||
assert!(false, "Should fail with OutOfGas");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_calculate_mem_cost() {
|
||||
// given
|
||||
let gasometer = Gasometer::<usize>::new(0);
|
||||
let schedule = Schedule::default();
|
||||
let current_mem_size = 0;
|
||||
let mem_size = 5;
|
||||
|
||||
// when
|
||||
let (mem_cost, new_mem_gas, mem_size) = gasometer.mem_gas_cost(&schedule, current_mem_size, &mem_size).unwrap();
|
||||
|
||||
// then
|
||||
assert_eq!(mem_cost, 3);
|
||||
assert_eq!(new_mem_gas, 3);
|
||||
assert_eq!(mem_size, 32);
|
||||
}
|
||||
@@ -1,164 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
pub use self::inner::*;
|
||||
|
||||
#[macro_use]
|
||||
#[cfg(not(feature = "evm-debug"))]
|
||||
mod inner {
|
||||
macro_rules! evm_debug {
|
||||
($x: expr) => {}
|
||||
}
|
||||
|
||||
pub struct EvmInformant;
|
||||
impl EvmInformant {
|
||||
pub fn new(_depth: usize) -> Self {
|
||||
EvmInformant {}
|
||||
}
|
||||
pub fn done(&mut self) {}
|
||||
}
|
||||
}
|
||||
|
||||
#[macro_use]
|
||||
#[cfg(feature = "evm-debug")]
|
||||
mod inner {
|
||||
use std::iter;
|
||||
use std::collections::HashMap;
|
||||
use std::time::{Instant, Duration};
|
||||
|
||||
use ethereum_types::U256;
|
||||
|
||||
use interpreter::stack::Stack;
|
||||
use instructions::{Instruction, InstructionInfo, INSTRUCTIONS};
|
||||
use CostType;
|
||||
|
||||
macro_rules! evm_debug {
|
||||
($x: expr) => {
|
||||
$x
|
||||
}
|
||||
}
|
||||
|
||||
fn print(data: String) {
|
||||
if cfg!(feature = "evm-debug-tests") {
|
||||
println!("{}", data);
|
||||
} else {
|
||||
debug!(target: "evm", "{}", data);
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EvmInformant {
|
||||
spacing: String,
|
||||
last_instruction: Instant,
|
||||
stats: HashMap<Instruction, Stats>,
|
||||
}
|
||||
|
||||
impl EvmInformant {
|
||||
|
||||
fn color(instruction: Instruction, name: &str) -> String {
|
||||
let c = instruction as usize % 6;
|
||||
let colors = [31, 34, 33, 32, 35, 36];
|
||||
format!("\x1B[1;{}m{}\x1B[0m", colors[c], name)
|
||||
}
|
||||
|
||||
fn as_micro(duration: &Duration) -> u64 {
|
||||
let mut sec = duration.as_secs();
|
||||
let subsec = duration.subsec_nanos() as u64;
|
||||
sec = sec.saturating_mul(1_000_000u64);
|
||||
sec += subsec / 1_000;
|
||||
sec
|
||||
}
|
||||
|
||||
pub fn new(depth: usize) -> Self {
|
||||
EvmInformant {
|
||||
spacing: iter::repeat(".").take(depth).collect(),
|
||||
last_instruction: Instant::now(),
|
||||
stats: HashMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn before_instruction<Cost: CostType>(&mut self, pc: usize, instruction: Instruction, info: &InstructionInfo, current_gas: &Cost, stack: &Stack<U256>) {
|
||||
let time = self.last_instruction.elapsed();
|
||||
self.last_instruction = Instant::now();
|
||||
|
||||
print(format!("{}[0x{:<3x}][{:>19}(0x{:<2x}) Gas Left: {:6?} (Previous took: {:10}μs)",
|
||||
&self.spacing,
|
||||
pc,
|
||||
Self::color(instruction, info.name),
|
||||
instruction,
|
||||
current_gas,
|
||||
Self::as_micro(&time),
|
||||
));
|
||||
|
||||
if info.args > 0 {
|
||||
for (idx, item) in stack.peek_top(info.args).iter().enumerate() {
|
||||
print(format!("{} |{:2}: {:?}", self.spacing, idx, item));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn after_instruction(&mut self, instruction: Instruction) {
|
||||
let stats = self.stats.entry(instruction).or_insert_with(|| Stats::default());
|
||||
let took = self.last_instruction.elapsed();
|
||||
stats.note(took);
|
||||
}
|
||||
|
||||
pub fn done(&mut self) {
|
||||
// Print out stats
|
||||
let infos = &*INSTRUCTIONS;
|
||||
|
||||
let mut stats: Vec<(_,_)> = self.stats.drain().collect();
|
||||
stats.sort_by(|ref a, ref b| b.1.avg().cmp(&a.1.avg()));
|
||||
|
||||
print(format!("\n{}-------OPCODE STATS:", self.spacing));
|
||||
for (instruction, stats) in stats.into_iter() {
|
||||
let info = infos[instruction as usize];
|
||||
print(format!("{}-------{:>19}(0x{:<2x}) count: {:4}, avg: {:10}μs",
|
||||
self.spacing,
|
||||
Self::color(instruction, info.name),
|
||||
instruction,
|
||||
stats.count,
|
||||
stats.avg(),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct Stats {
|
||||
count: u64,
|
||||
total_duration: Duration,
|
||||
}
|
||||
|
||||
impl Default for Stats {
|
||||
fn default() -> Self {
|
||||
Stats {
|
||||
count: 0,
|
||||
total_duration: Duration::from_secs(0),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Stats {
|
||||
fn note(&mut self, took: Duration) {
|
||||
self.count += 1;
|
||||
self.total_duration += took;
|
||||
}
|
||||
|
||||
fn avg(&self) -> u64 {
|
||||
EvmInformant::as_micro(&self.total_duration) / self.count
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,200 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use ethereum_types::U256;
|
||||
use vm::ReturnData;
|
||||
|
||||
const MAX_RETURN_WASTE_BYTES: usize = 16384;
|
||||
|
||||
pub trait Memory {
|
||||
/// Retrieve current size of the memory
|
||||
fn size(&self) -> usize;
|
||||
/// Resize (shrink or expand) the memory to specified size (fills 0)
|
||||
fn resize(&mut self, new_size: usize);
|
||||
/// Resize the memory only if its smaller
|
||||
fn expand(&mut self, new_size: usize);
|
||||
/// Write single byte to memory
|
||||
fn write_byte(&mut self, offset: U256, value: U256);
|
||||
/// Write a word to memory. Does not resize memory!
|
||||
fn write(&mut self, offset: U256, value: U256);
|
||||
/// Read a word from memory
|
||||
fn read(&self, offset: U256) -> U256;
|
||||
/// Write slice of bytes to memory. Does not resize memory!
|
||||
fn write_slice(&mut self, offset: U256, &[u8]);
|
||||
/// Retrieve part of the memory between offset and offset + size
|
||||
fn read_slice(&self, offset: U256, size: U256) -> &[u8];
|
||||
/// Retrieve writeable part of memory
|
||||
fn writeable_slice(&mut self, offset: U256, size: U256) -> &mut[u8];
|
||||
fn dump(&self);
|
||||
/// Convert memory into return data.
|
||||
fn into_return_data(self, offset: U256, size: U256) -> ReturnData;
|
||||
}
|
||||
|
||||
/// Checks whether offset and size is valid memory range
|
||||
pub fn is_valid_range(off: usize, size: usize) -> bool {
|
||||
// When size is zero we haven't actually expanded the memory
|
||||
let overflow = off.overflowing_add(size).1;
|
||||
size > 0 && !overflow
|
||||
}
|
||||
|
||||
impl Memory for Vec<u8> {
|
||||
fn dump(&self) {
|
||||
println!("MemoryDump:");
|
||||
for i in self.iter() {
|
||||
println!("{:02x} ", i);
|
||||
}
|
||||
println!("");
|
||||
}
|
||||
|
||||
fn size(&self) -> usize {
|
||||
self.len()
|
||||
}
|
||||
|
||||
fn read_slice(&self, init_off_u: U256, init_size_u: U256) -> &[u8] {
|
||||
let off = init_off_u.low_u64() as usize;
|
||||
let size = init_size_u.low_u64() as usize;
|
||||
if !is_valid_range(off, size) {
|
||||
&self[0..0]
|
||||
} else {
|
||||
&self[off..off+size]
|
||||
}
|
||||
}
|
||||
|
||||
fn read(&self, offset: U256) -> U256 {
|
||||
let off = offset.low_u64() as usize;
|
||||
U256::from(&self[off..off+32])
|
||||
}
|
||||
|
||||
fn writeable_slice(&mut self, offset: U256, size: U256) -> &mut [u8] {
|
||||
let off = offset.low_u64() as usize;
|
||||
let s = size.low_u64() as usize;
|
||||
if !is_valid_range(off, s) {
|
||||
&mut self[0..0]
|
||||
} else {
|
||||
&mut self[off..off+s]
|
||||
}
|
||||
}
|
||||
|
||||
fn write_slice(&mut self, offset: U256, slice: &[u8]) {
|
||||
if !slice.is_empty() {
|
||||
let off = offset.low_u64() as usize;
|
||||
self[off..off+slice.len()].copy_from_slice(slice);
|
||||
}
|
||||
}
|
||||
|
||||
fn write(&mut self, offset: U256, value: U256) {
|
||||
let off = offset.low_u64() as usize;
|
||||
value.to_big_endian(&mut self[off..off+32]);
|
||||
}
|
||||
|
||||
fn write_byte(&mut self, offset: U256, value: U256) {
|
||||
let off = offset.low_u64() as usize;
|
||||
let val = value.low_u64() as u64;
|
||||
self[off] = val as u8;
|
||||
}
|
||||
|
||||
fn resize(&mut self, new_size: usize) {
|
||||
self.resize(new_size, 0);
|
||||
}
|
||||
|
||||
fn expand(&mut self, size: usize) {
|
||||
if size > self.len() {
|
||||
Memory::resize(self, size)
|
||||
}
|
||||
}
|
||||
|
||||
fn into_return_data(mut self, offset: U256, size: U256) -> ReturnData {
|
||||
let mut offset = offset.low_u64() as usize;
|
||||
let size = size.low_u64() as usize;
|
||||
|
||||
if !is_valid_range(offset, size) {
|
||||
return ReturnData::empty();
|
||||
}
|
||||
|
||||
if self.len() - size > MAX_RETURN_WASTE_BYTES {
|
||||
if offset == 0 {
|
||||
self.truncate(size);
|
||||
self.shrink_to_fit();
|
||||
} else {
|
||||
self = self[offset..(offset + size)].to_vec();
|
||||
offset = 0;
|
||||
}
|
||||
}
|
||||
ReturnData::new(self, offset, size)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ethereum_types::U256;
|
||||
use super::Memory;
|
||||
|
||||
#[test]
|
||||
fn test_memory_read_and_write() {
|
||||
// given
|
||||
let mem: &mut Memory = &mut vec![];
|
||||
mem.resize(0x80 + 32);
|
||||
|
||||
// when
|
||||
mem.write(U256::from(0x80), U256::from(0xabcdef));
|
||||
|
||||
// then
|
||||
assert_eq!(mem.read(U256::from(0x80)), U256::from(0xabcdef));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_memory_read_and_write_byte() {
|
||||
// given
|
||||
let mem: &mut Memory = &mut vec![];
|
||||
mem.resize(32);
|
||||
|
||||
// when
|
||||
mem.write_byte(U256::from(0x1d), U256::from(0xab));
|
||||
mem.write_byte(U256::from(0x1e), U256::from(0xcd));
|
||||
mem.write_byte(U256::from(0x1f), U256::from(0xef));
|
||||
|
||||
// then
|
||||
assert_eq!(mem.read(U256::from(0x00)), U256::from(0xabcdef));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_memory_read_slice_and_write_slice() {
|
||||
let mem: &mut Memory = &mut vec![];
|
||||
mem.resize(32);
|
||||
|
||||
{
|
||||
let slice = "abcdefghijklmnopqrstuvwxyz012345".as_bytes();
|
||||
mem.write_slice(U256::from(0), slice);
|
||||
|
||||
assert_eq!(mem.read_slice(U256::from(0), U256::from(32)), slice);
|
||||
}
|
||||
|
||||
// write again
|
||||
{
|
||||
let slice = "67890".as_bytes();
|
||||
mem.write_slice(U256::from(0x1), slice);
|
||||
|
||||
assert_eq!(mem.read_slice(U256::from(0), U256::from(7)), "a67890g".as_bytes());
|
||||
}
|
||||
|
||||
// write empty slice out of bounds
|
||||
{
|
||||
let slice = [];
|
||||
mem.write_slice(U256::from(0x1000), &slice);
|
||||
assert_eq!(mem.size(), 32);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,112 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::sync::Arc;
|
||||
use hash::KECCAK_EMPTY;
|
||||
use heapsize::HeapSizeOf;
|
||||
use ethereum_types::H256;
|
||||
use parking_lot::Mutex;
|
||||
use memory_cache::MemoryLruCache;
|
||||
use bit_set::BitSet;
|
||||
use super::super::instructions::{self, Instruction};
|
||||
|
||||
const DEFAULT_CACHE_SIZE: usize = 4 * 1024 * 1024;
|
||||
|
||||
// stub for a HeapSizeOf implementation.
|
||||
struct Bits(Arc<BitSet>);
|
||||
|
||||
impl HeapSizeOf for Bits {
|
||||
fn heap_size_of_children(&self) -> usize {
|
||||
// dealing in bits here
|
||||
self.0.capacity() * 8
|
||||
}
|
||||
}
|
||||
|
||||
/// Global cache for EVM interpreter
|
||||
pub struct SharedCache {
|
||||
jump_destinations: Mutex<MemoryLruCache<H256, Bits>>,
|
||||
}
|
||||
|
||||
impl SharedCache {
|
||||
/// Create a jump destinations cache with a maximum size in bytes
|
||||
/// to cache.
|
||||
pub fn new(max_size: usize) -> Self {
|
||||
SharedCache {
|
||||
jump_destinations: Mutex::new(MemoryLruCache::new(max_size)),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get jump destinations bitmap for a contract.
|
||||
pub fn jump_destinations(&self, code_hash: &Option<H256>, code: &[u8]) -> Arc<BitSet> {
|
||||
if let Some(ref code_hash) = code_hash {
|
||||
if code_hash == &KECCAK_EMPTY {
|
||||
return Self::find_jump_destinations(code);
|
||||
}
|
||||
|
||||
if let Some(d) = self.jump_destinations.lock().get_mut(code_hash) {
|
||||
return d.0.clone();
|
||||
}
|
||||
}
|
||||
|
||||
let d = Self::find_jump_destinations(code);
|
||||
|
||||
if let Some(ref code_hash) = code_hash {
|
||||
self.jump_destinations.lock().insert(*code_hash, Bits(d.clone()));
|
||||
}
|
||||
|
||||
d
|
||||
}
|
||||
|
||||
fn find_jump_destinations(code: &[u8]) -> Arc<BitSet> {
|
||||
let mut jump_dests = BitSet::with_capacity(code.len());
|
||||
let mut position = 0;
|
||||
|
||||
while position < code.len() {
|
||||
let instruction = Instruction::from_u8(code[position]);
|
||||
|
||||
if let Some(instruction) = instruction {
|
||||
if instruction == instructions::JUMPDEST {
|
||||
jump_dests.insert(position);
|
||||
} else if let Some(push_bytes) = instruction.push_bytes() {
|
||||
position += push_bytes;
|
||||
}
|
||||
}
|
||||
position += 1;
|
||||
}
|
||||
|
||||
jump_dests.shrink_to_fit();
|
||||
Arc::new(jump_dests)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for SharedCache {
|
||||
fn default() -> Self {
|
||||
SharedCache::new(DEFAULT_CACHE_SIZE)
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_find_jump_destinations() {
|
||||
use rustc_hex::FromHex;
|
||||
// given
|
||||
let code = "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b01600055".from_hex().unwrap();
|
||||
|
||||
// when
|
||||
let valid_jump_destinations = SharedCache::find_jump_destinations(&code);
|
||||
|
||||
// then
|
||||
assert!(valid_jump_destinations.contains(66));
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::fmt;
|
||||
use instructions;
|
||||
|
||||
/// Stack trait with VM-friendly API
|
||||
pub trait Stack<T> {
|
||||
/// Returns `Stack[len(Stack) - no_from_top]`
|
||||
fn peek(&self, no_from_top: usize) -> &T;
|
||||
/// Swaps Stack[len(Stack)] and Stack[len(Stack) - no_from_top]
|
||||
fn swap_with_top(&mut self, no_from_top: usize);
|
||||
/// Returns true if Stack has at least `no_of_elems` elements
|
||||
fn has(&self, no_of_elems: usize) -> bool;
|
||||
/// Get element from top and remove it from Stack. Panics if stack is empty.
|
||||
fn pop_back(&mut self) -> T;
|
||||
/// Get (up to `instructions::MAX_NO_OF_TOPICS`) elements from top and remove them from Stack. Panics if stack is empty.
|
||||
fn pop_n(&mut self, no_of_elems: usize) -> &[T];
|
||||
/// Add element on top of the Stack
|
||||
fn push(&mut self, elem: T);
|
||||
/// Get number of elements on Stack
|
||||
fn size(&self) -> usize;
|
||||
/// Returns all data on stack.
|
||||
fn peek_top(&self, no_of_elems: usize) -> &[T];
|
||||
}
|
||||
|
||||
pub struct VecStack<S> {
|
||||
stack: Vec<S>,
|
||||
logs: [S; instructions::MAX_NO_OF_TOPICS]
|
||||
}
|
||||
|
||||
impl<S : Copy> VecStack<S> {
|
||||
pub fn with_capacity(capacity: usize, zero: S) -> Self {
|
||||
VecStack {
|
||||
stack: Vec::with_capacity(capacity),
|
||||
logs: [zero; instructions::MAX_NO_OF_TOPICS]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<S : fmt::Display> Stack<S> for VecStack<S> {
|
||||
fn peek(&self, no_from_top: usize) -> &S {
|
||||
&self.stack[self.stack.len() - no_from_top - 1]
|
||||
}
|
||||
|
||||
fn swap_with_top(&mut self, no_from_top: usize) {
|
||||
let len = self.stack.len();
|
||||
self.stack.swap(len - no_from_top - 1, len - 1);
|
||||
}
|
||||
|
||||
fn has(&self, no_of_elems: usize) -> bool {
|
||||
self.stack.len() >= no_of_elems
|
||||
}
|
||||
|
||||
fn pop_back(&mut self) -> S {
|
||||
let val = self.stack.pop();
|
||||
match val {
|
||||
Some(x) => x,
|
||||
None => panic!("Tried to pop from empty stack.")
|
||||
}
|
||||
}
|
||||
|
||||
fn pop_n(&mut self, no_of_elems: usize) -> &[S] {
|
||||
assert!(no_of_elems <= instructions::MAX_NO_OF_TOPICS);
|
||||
|
||||
for i in 0..no_of_elems {
|
||||
self.logs[i] = self.pop_back();
|
||||
}
|
||||
&self.logs[0..no_of_elems]
|
||||
}
|
||||
|
||||
fn push(&mut self, elem: S) {
|
||||
self.stack.push(elem);
|
||||
}
|
||||
|
||||
fn size(&self) -> usize {
|
||||
self.stack.len()
|
||||
}
|
||||
|
||||
fn peek_top(&self, no_from_top: usize) -> &[S] {
|
||||
assert!(self.stack.len() >= no_from_top, "peek_top asked for more items than exist.");
|
||||
&self.stack[self.stack.len() - no_from_top .. self.stack.len()]
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Ethereum virtual machine.
|
||||
|
||||
extern crate bit_set;
|
||||
extern crate ethereum_types;
|
||||
extern crate parking_lot;
|
||||
extern crate heapsize;
|
||||
extern crate vm;
|
||||
extern crate keccak_hash as hash;
|
||||
extern crate memory_cache;
|
||||
extern crate parity_bytes as bytes;
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
#[cfg_attr(feature = "evm-debug", macro_use)]
|
||||
extern crate log;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate rustc_hex;
|
||||
|
||||
pub mod evm;
|
||||
pub mod interpreter;
|
||||
|
||||
#[macro_use]
|
||||
pub mod factory;
|
||||
mod vmtype;
|
||||
mod instructions;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
#[cfg(all(feature = "benches", test))]
|
||||
mod benches;
|
||||
|
||||
pub use vm::{
|
||||
Schedule, CleanDustMode, EnvInfo, CallType, ActionParams, Ext,
|
||||
ContractCreateResult, MessageCallResult, CreateContractAddress,
|
||||
GasLeft, ReturnData
|
||||
};
|
||||
pub use self::evm::{Finalize, FinalizationResult, CostType};
|
||||
pub use self::instructions::{InstructionInfo, Instruction};
|
||||
pub use self::vmtype::VMType;
|
||||
pub use self::factory::Factory;
|
||||
@@ -1,45 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::fmt;
|
||||
|
||||
/// Type of EVM to use.
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum VMType {
|
||||
/// RUST EVM
|
||||
Interpreter
|
||||
}
|
||||
|
||||
impl fmt::Display for VMType {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", match *self {
|
||||
VMType::Interpreter => "INT"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for VMType {
|
||||
fn default() -> Self {
|
||||
VMType::Interpreter
|
||||
}
|
||||
}
|
||||
|
||||
impl VMType {
|
||||
/// Return all possible VMs (Interpreter)
|
||||
pub fn all() -> Vec<VMType> {
|
||||
vec![VMType::Interpreter]
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
[package]
|
||||
description = "Parity Light Client Implementation"
|
||||
homepage = "http://parity.io"
|
||||
license = "GPL-3.0"
|
||||
name = "ethcore-light"
|
||||
version = "1.12.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
ethcore = { path = ".."}
|
||||
parity-bytes = "0.1"
|
||||
ethcore-transaction = { path = "../transaction" }
|
||||
ethereum-types = "0.4"
|
||||
memorydb = "0.2.1"
|
||||
patricia-trie = "0.2"
|
||||
patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" }
|
||||
ethcore-network = { path = "../../util/network" }
|
||||
ethcore-io = { path = "../../util/io" }
|
||||
hashdb = "0.2.1"
|
||||
heapsize = "0.4"
|
||||
vm = { path = "../vm" }
|
||||
fastmap = { path = "../../util/fastmap" }
|
||||
rlp = { version = "0.2.4", features = ["ethereum"] }
|
||||
rlp_derive = { path = "../../util/rlp_derive" }
|
||||
smallvec = "0.6"
|
||||
futures = "0.1"
|
||||
rand = "0.4"
|
||||
itertools = "0.5"
|
||||
bincode = "0.8.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
parking_lot = "0.6"
|
||||
stats = { path = "../../util/stats" }
|
||||
keccak-hash = "0.1"
|
||||
keccak-hasher = { path = "../../util/keccak-hasher" }
|
||||
triehash-ethereum = { version = "0.2", path = "../../util/triehash-ethereum" }
|
||||
kvdb = "0.1"
|
||||
memory-cache = { path = "../../util/memory_cache" }
|
||||
error-chain = { version = "0.12", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
ethcore = { path = "..", features = ["test-helpers"] }
|
||||
kvdb-memorydb = "0.1"
|
||||
tempdir = "0.3"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
@@ -1,193 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Cache for data fetched from the network.
|
||||
//!
|
||||
//! Stores ancient block headers, bodies, receipts, and total difficulties.
|
||||
//! Furthermore, stores a "gas price corpus" of relative recency, which is a sorted
|
||||
//! vector of all gas prices from a recent range of blocks.
|
||||
|
||||
use ethcore::encoded;
|
||||
use ethcore::header::BlockNumber;
|
||||
use ethcore::receipt::Receipt;
|
||||
|
||||
use stats::Corpus;
|
||||
use std::time::{Instant, Duration};
|
||||
use heapsize::HeapSizeOf;
|
||||
use ethereum_types::{H256, U256};
|
||||
use memory_cache::MemoryLruCache;
|
||||
|
||||
/// Configuration for how much data to cache.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub struct CacheSizes {
|
||||
/// Maximum size, in bytes, of cached headers.
|
||||
pub headers: usize,
|
||||
/// Maximum size, in bytes, of cached canonical hashes.
|
||||
pub canon_hashes: usize,
|
||||
/// Maximum size, in bytes, of cached block bodies.
|
||||
pub bodies: usize,
|
||||
/// Maximum size, in bytes, of cached block receipts.
|
||||
pub receipts: usize,
|
||||
/// Maximum size, in bytes, of cached chain score for the block.
|
||||
pub chain_score: usize,
|
||||
}
|
||||
|
||||
impl Default for CacheSizes {
|
||||
fn default() -> Self {
|
||||
const MB: usize = 1024 * 1024;
|
||||
CacheSizes {
|
||||
headers: 10 * MB,
|
||||
canon_hashes: 3 * MB,
|
||||
bodies: 20 * MB,
|
||||
receipts: 10 * MB,
|
||||
chain_score: 7 * MB,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The light client data cache.
|
||||
///
|
||||
/// Note that almost all getter methods take `&mut self` due to the necessity to update
|
||||
/// the underlying LRU-caches on read.
|
||||
/// [LRU-cache](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29)
|
||||
pub struct Cache {
|
||||
headers: MemoryLruCache<H256, encoded::Header>,
|
||||
canon_hashes: MemoryLruCache<BlockNumber, H256>,
|
||||
bodies: MemoryLruCache<H256, encoded::Body>,
|
||||
receipts: MemoryLruCache<H256, Vec<Receipt>>,
|
||||
chain_score: MemoryLruCache<H256, U256>,
|
||||
corpus: Option<(Corpus<U256>, Instant)>,
|
||||
corpus_expiration: Duration,
|
||||
}
|
||||
|
||||
impl Cache {
|
||||
/// Create a new data cache with the given sizes and gas price corpus expiration time.
|
||||
pub fn new(sizes: CacheSizes, corpus_expiration: Duration) -> Self {
|
||||
Cache {
|
||||
headers: MemoryLruCache::new(sizes.headers),
|
||||
canon_hashes: MemoryLruCache::new(sizes.canon_hashes),
|
||||
bodies: MemoryLruCache::new(sizes.bodies),
|
||||
receipts: MemoryLruCache::new(sizes.receipts),
|
||||
chain_score: MemoryLruCache::new(sizes.chain_score),
|
||||
corpus: None,
|
||||
corpus_expiration,
|
||||
}
|
||||
}
|
||||
|
||||
/// Query header by hash.
|
||||
pub fn block_header(&mut self, hash: &H256) -> Option<encoded::Header> {
|
||||
self.headers.get_mut(hash).cloned()
|
||||
}
|
||||
|
||||
/// Query hash by number.
|
||||
pub fn block_hash(&mut self, num: BlockNumber) -> Option<H256> {
|
||||
self.canon_hashes.get_mut(&num).map(|h| *h)
|
||||
}
|
||||
|
||||
/// Query block body by block hash.
|
||||
pub fn block_body(&mut self, hash: &H256) -> Option<encoded::Body> {
|
||||
self.bodies.get_mut(hash).cloned()
|
||||
}
|
||||
|
||||
/// Query block receipts by block hash.
|
||||
pub fn block_receipts(&mut self, hash: &H256) -> Option<Vec<Receipt>> {
|
||||
self.receipts.get_mut(hash).cloned()
|
||||
}
|
||||
|
||||
/// Query chain score by block hash.
|
||||
pub fn chain_score(&mut self, hash: &H256) -> Option<U256> {
|
||||
self.chain_score.get_mut(hash).map(|h| *h)
|
||||
}
|
||||
|
||||
/// Cache the given header.
|
||||
pub fn insert_block_header(&mut self, hash: H256, hdr: encoded::Header) {
|
||||
self.headers.insert(hash, hdr);
|
||||
}
|
||||
|
||||
/// Cache the given canonical block hash.
|
||||
pub fn insert_block_hash(&mut self, num: BlockNumber, hash: H256) {
|
||||
self.canon_hashes.insert(num, hash);
|
||||
}
|
||||
|
||||
/// Cache the given block body.
|
||||
pub fn insert_block_body(&mut self, hash: H256, body: encoded::Body) {
|
||||
self.bodies.insert(hash, body);
|
||||
}
|
||||
|
||||
/// Cache the given block receipts.
|
||||
pub fn insert_block_receipts(&mut self, hash: H256, receipts: Vec<Receipt>) {
|
||||
self.receipts.insert(hash, receipts);
|
||||
}
|
||||
|
||||
/// Cache the given chain scoring.
|
||||
pub fn insert_chain_score(&mut self, hash: H256, score: U256) {
|
||||
self.chain_score.insert(hash, score);
|
||||
}
|
||||
|
||||
/// Get gas price corpus, if recent enough.
|
||||
pub fn gas_price_corpus(&self) -> Option<Corpus<U256>> {
|
||||
let now = Instant::now();
|
||||
|
||||
self.corpus.as_ref().and_then(|&(ref corpus, ref tm)| {
|
||||
if *tm + self.corpus_expiration >= now {
|
||||
Some(corpus.clone())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// Set the cached gas price corpus.
|
||||
pub fn set_gas_price_corpus(&mut self, corpus: Corpus<U256>) {
|
||||
self.corpus = Some((corpus, Instant::now()))
|
||||
}
|
||||
|
||||
/// Get the memory used.
|
||||
pub fn mem_used(&self) -> usize {
|
||||
self.heap_size_of_children()
|
||||
}
|
||||
}
|
||||
|
||||
impl HeapSizeOf for Cache {
|
||||
fn heap_size_of_children(&self) -> usize {
|
||||
self.headers.current_size()
|
||||
+ self.canon_hashes.current_size()
|
||||
+ self.bodies.current_size()
|
||||
+ self.receipts.current_size()
|
||||
+ self.chain_score.current_size()
|
||||
// TODO: + corpus
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::Cache;
|
||||
use std::time::Duration;
|
||||
|
||||
#[test]
|
||||
fn corpus_inaccessible() {
|
||||
let mut cache = Cache::new(Default::default(), Duration::from_secs(5 * 3600));
|
||||
|
||||
cache.set_gas_price_corpus(vec![].into());
|
||||
assert_eq!(cache.gas_price_corpus(), Some(vec![].into()));
|
||||
|
||||
{
|
||||
let corpus_time = &mut cache.corpus.as_mut().unwrap().1;
|
||||
*corpus_time = *corpus_time - Duration::from_secs(6 * 3600);
|
||||
}
|
||||
assert!(cache.gas_price_corpus().is_none());
|
||||
}
|
||||
}
|
||||
@@ -1,212 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Canonical hash trie definitions and helper functions.
|
||||
//!
|
||||
//! Each CHT is a trie mapping block numbers to canonical hashes and total difficulty.
|
||||
//! One is generated for every `SIZE` blocks, allowing us to discard those blocks in
|
||||
//! favor of the trie root. When the "ancient" blocks need to be accessed, we simply
|
||||
//! request an inclusion proof of a specific block number against the trie with the
|
||||
//! root has. A correct proof implies that the claimed block is identical to the one
|
||||
//! we discarded.
|
||||
|
||||
use ethcore::ids::BlockId;
|
||||
use ethereum_types::{H256, U256};
|
||||
use hashdb::HashDB;
|
||||
use keccak_hasher::KeccakHasher;
|
||||
use memorydb::MemoryDB;
|
||||
use bytes::Bytes;
|
||||
use trie::{TrieMut, Trie, Recorder};
|
||||
use ethtrie::{self, TrieDB, TrieDBMut};
|
||||
use rlp::{RlpStream, Rlp};
|
||||
|
||||
// encode a key.
|
||||
macro_rules! key {
|
||||
($num: expr) => { ::rlp::encode(&$num) }
|
||||
}
|
||||
|
||||
macro_rules! val {
|
||||
($hash: expr, $td: expr) => {{
|
||||
let mut stream = RlpStream::new_list(2);
|
||||
stream.append(&$hash).append(&$td);
|
||||
stream.drain()
|
||||
}}
|
||||
}
|
||||
|
||||
/// The size of each CHT.
|
||||
pub const SIZE: u64 = 2048;
|
||||
|
||||
/// A canonical hash trie. This is generic over any database it can query.
|
||||
/// See module docs for more details.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CHT<DB: HashDB<KeccakHasher>> {
|
||||
db: DB,
|
||||
root: H256, // the root of this CHT.
|
||||
number: u64,
|
||||
}
|
||||
|
||||
impl<DB: HashDB<KeccakHasher>> CHT<DB> {
|
||||
/// Query the root of the CHT.
|
||||
pub fn root(&self) -> H256 { self.root }
|
||||
|
||||
/// Query the number of the CHT.
|
||||
pub fn number(&self) -> u64 { self.number }
|
||||
|
||||
/// Generate an inclusion proof for the entry at a specific block.
|
||||
/// Nodes before level `from_level` will be omitted.
|
||||
/// Returns an error on an incomplete trie, and `Ok(None)` on an unprovable request.
|
||||
pub fn prove(&self, num: u64, from_level: u32) -> ethtrie::Result<Option<Vec<Bytes>>> {
|
||||
if block_to_cht_number(num) != Some(self.number) { return Ok(None) }
|
||||
|
||||
let mut recorder = Recorder::with_depth(from_level);
|
||||
let t = TrieDB::new(&self.db, &self.root)?;
|
||||
t.get_with(&key!(num), &mut recorder)?;
|
||||
|
||||
Ok(Some(recorder.drain().into_iter().map(|x| x.data).collect()))
|
||||
}
|
||||
}
|
||||
|
||||
/// Block information necessary to build a CHT.
|
||||
pub struct BlockInfo {
|
||||
/// The block's hash.
|
||||
pub hash: H256,
|
||||
/// The block's parent's hash.
|
||||
pub parent_hash: H256,
|
||||
/// The block's total difficulty.
|
||||
pub total_difficulty: U256,
|
||||
}
|
||||
|
||||
/// Build an in-memory CHT from a closure which provides necessary information
|
||||
/// about blocks. If the fetcher ever fails to provide the info, the CHT
|
||||
/// will not be generated.
|
||||
pub fn build<F>(cht_num: u64, mut fetcher: F) -> Option<CHT<MemoryDB<KeccakHasher>>>
|
||||
where F: FnMut(BlockId) -> Option<BlockInfo>
|
||||
{
|
||||
let mut db = MemoryDB::<KeccakHasher>::new();
|
||||
|
||||
// start from the last block by number and work backwards.
|
||||
let last_num = start_number(cht_num + 1) - 1;
|
||||
let mut id = BlockId::Number(last_num);
|
||||
|
||||
let mut root = H256::default();
|
||||
|
||||
{
|
||||
let mut t = TrieDBMut::new(&mut db, &mut root);
|
||||
for blk_num in (0..SIZE).map(|n| last_num - n) {
|
||||
let info = match fetcher(id) {
|
||||
Some(info) => info,
|
||||
None => return None,
|
||||
};
|
||||
|
||||
id = BlockId::Hash(info.parent_hash);
|
||||
t.insert(&key!(blk_num), &val!(info.hash, info.total_difficulty))
|
||||
.expect("fresh in-memory database is infallible; qed");
|
||||
}
|
||||
}
|
||||
|
||||
Some(CHT {
|
||||
db,
|
||||
root,
|
||||
number: cht_num,
|
||||
})
|
||||
}
|
||||
|
||||
/// Compute a CHT root from an iterator of (hash, td) pairs. Fails if shorter than
|
||||
/// SIZE items. The items are assumed to proceed sequentially from `start_number(cht_num)`.
|
||||
/// Discards the trie's nodes.
|
||||
pub fn compute_root<I>(cht_num: u64, iterable: I) -> Option<H256>
|
||||
where I: IntoIterator<Item=(H256, U256)>
|
||||
{
|
||||
let mut v = Vec::with_capacity(SIZE as usize);
|
||||
let start_num = start_number(cht_num) as usize;
|
||||
|
||||
for (i, (h, td)) in iterable.into_iter().take(SIZE as usize).enumerate() {
|
||||
v.push((key!(i + start_num).into_vec(), val!(h, td).into_vec()))
|
||||
}
|
||||
|
||||
if v.len() == SIZE as usize {
|
||||
Some(::triehash::trie_root(v))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// Check a proof for a CHT.
|
||||
/// Given a set of a trie nodes, a number to query, and a trie root,
|
||||
/// verify the given trie branch and extract the canonical hash and total difficulty.
|
||||
// TODO: better support for partially-checked queries.
|
||||
pub fn check_proof(proof: &[Bytes], num: u64, root: H256) -> Option<(H256, U256)> {
|
||||
let mut db = MemoryDB::<KeccakHasher>::new();
|
||||
|
||||
for node in proof { db.insert(&node[..]); }
|
||||
let res = match TrieDB::new(&db, &root) {
|
||||
Err(_) => return None,
|
||||
Ok(trie) => trie.get_with(&key!(num), |val: &[u8]| {
|
||||
let rlp = Rlp::new(val);
|
||||
rlp.val_at::<H256>(0)
|
||||
.and_then(|h| rlp.val_at::<U256>(1).map(|td| (h, td)))
|
||||
.ok()
|
||||
})
|
||||
};
|
||||
|
||||
match res {
|
||||
Ok(Some(Some((hash, td)))) => Some((hash, td)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert a block number to a CHT number.
|
||||
/// Returns `None` for `block_num` == 0, `Some` otherwise.
|
||||
pub fn block_to_cht_number(block_num: u64) -> Option<u64> {
|
||||
match block_num {
|
||||
0 => None,
|
||||
n => Some((n - 1) / SIZE),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the starting block of a given CHT.
|
||||
/// CHT 0 includes block 1...SIZE,
|
||||
/// CHT 1 includes block SIZE + 1 ... 2*SIZE
|
||||
/// More generally: CHT N includes block (1 + N*SIZE)...((N+1)*SIZE).
|
||||
/// This is because the genesis hash is assumed to be known
|
||||
/// and including it would be redundant.
|
||||
pub fn start_number(cht_num: u64) -> u64 {
|
||||
(cht_num * SIZE) + 1
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn size_is_lt_usize() {
|
||||
// to ensure safe casting on the target platform.
|
||||
assert!(::cht::SIZE < usize::max_value() as u64)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn block_to_cht_number() {
|
||||
assert!(::cht::block_to_cht_number(0).is_none());
|
||||
assert_eq!(::cht::block_to_cht_number(1).unwrap(), 0);
|
||||
assert_eq!(::cht::block_to_cht_number(::cht::SIZE + 1).unwrap(), 1);
|
||||
assert_eq!(::cht::block_to_cht_number(::cht::SIZE).unwrap(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn start_number() {
|
||||
assert_eq!(::cht::start_number(0), 1);
|
||||
assert_eq!(::cht::start_number(1), ::cht::SIZE + 1);
|
||||
assert_eq!(::cht::start_number(2), ::cht::SIZE * 2 + 1);
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Trait for fetching chain data.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use ethcore::encoded;
|
||||
use ethcore::engines::{EthEngine, StateDependentProof};
|
||||
use ethcore::machine::EthereumMachine;
|
||||
use ethcore::header::Header;
|
||||
use ethcore::receipt::Receipt;
|
||||
use futures::future::IntoFuture;
|
||||
use ethereum_types::H256;
|
||||
|
||||
/// Provides full chain data.
|
||||
pub trait ChainDataFetcher: Send + Sync + 'static {
|
||||
/// Error type when data unavailable.
|
||||
type Error: ::std::fmt::Debug;
|
||||
|
||||
/// Future for fetching block body.
|
||||
type Body: IntoFuture<Item=encoded::Block, Error=Self::Error>;
|
||||
/// Future for fetching block receipts.
|
||||
type Receipts: IntoFuture<Item=Vec<Receipt>, Error=Self::Error>;
|
||||
/// Future for fetching epoch transition
|
||||
type Transition: IntoFuture<Item=Vec<u8>, Error=Self::Error>;
|
||||
|
||||
/// Fetch a block body.
|
||||
fn block_body(&self, header: &Header) -> Self::Body;
|
||||
|
||||
/// Fetch block receipts.
|
||||
fn block_receipts(&self, header: &Header) -> Self::Receipts;
|
||||
|
||||
/// Fetch epoch transition proof at given header.
|
||||
fn epoch_transition(
|
||||
&self,
|
||||
_hash: H256,
|
||||
_engine: Arc<EthEngine>,
|
||||
_checker: Arc<StateDependentProof<EthereumMachine>>
|
||||
) -> Self::Transition;
|
||||
}
|
||||
|
||||
/// Fetcher implementation which cannot fetch anything.
|
||||
pub struct Unavailable;
|
||||
|
||||
/// Create a fetcher which has all data unavailable.
|
||||
pub fn unavailable() -> Unavailable { Unavailable }
|
||||
|
||||
impl ChainDataFetcher for Unavailable {
|
||||
type Error = &'static str;
|
||||
|
||||
type Body = Result<encoded::Block, &'static str>;
|
||||
type Receipts = Result<Vec<Receipt>, &'static str>;
|
||||
type Transition = Result<Vec<u8>, &'static str>;
|
||||
|
||||
fn block_body(&self, _header: &Header) -> Self::Body {
|
||||
Err("fetching block bodies unavailable")
|
||||
}
|
||||
|
||||
fn block_receipts(&self, _header: &Header) -> Self::Receipts {
|
||||
Err("fetching block receipts unavailable")
|
||||
}
|
||||
|
||||
fn epoch_transition(
|
||||
&self,
|
||||
_hash: H256,
|
||||
_engine: Arc<EthEngine>,
|
||||
_checker: Arc<StateDependentProof<EthereumMachine>>
|
||||
) -> Self::Transition {
|
||||
Err("fetching epoch transition proofs unavailable")
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,620 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Light client implementation. Stores data from light sync
|
||||
|
||||
use std::sync::{Weak, Arc};
|
||||
|
||||
use ethcore::block_status::BlockStatus;
|
||||
use ethcore::client::{ClientReport, EnvInfo, ClientIoMessage};
|
||||
use ethcore::engines::{epoch, EthEngine, EpochChange, EpochTransition, Proof};
|
||||
use ethcore::machine::EthereumMachine;
|
||||
use ethcore::error::{Error, BlockImportError};
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::header::{BlockNumber, Header};
|
||||
use ethcore::verification::queue::{self, HeaderQueue};
|
||||
use ethcore::blockchain_info::BlockChainInfo;
|
||||
use ethcore::spec::{Spec, SpecHardcodedSync};
|
||||
use ethcore::encoded;
|
||||
use io::IoChannel;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use ethereum_types::{H256, U256};
|
||||
use futures::{IntoFuture, Future};
|
||||
|
||||
use kvdb::KeyValueDB;
|
||||
|
||||
use self::fetch::ChainDataFetcher;
|
||||
use self::header_chain::{AncestryIter, HeaderChain, HardcodedSync};
|
||||
|
||||
use cache::Cache;
|
||||
|
||||
pub use self::service::Service;
|
||||
|
||||
mod header_chain;
|
||||
mod service;
|
||||
|
||||
pub mod fetch;
|
||||
|
||||
/// Configuration for the light client.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Config {
|
||||
/// Verification queue config.
|
||||
pub queue: queue::Config,
|
||||
/// Chain column in database.
|
||||
pub chain_column: Option<u32>,
|
||||
/// Should it do full verification of blocks?
|
||||
pub verify_full: bool,
|
||||
/// Should it check the seal of blocks?
|
||||
pub check_seal: bool,
|
||||
/// Disable hardcoded sync.
|
||||
pub no_hardcoded_sync: bool,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Config {
|
||||
Config {
|
||||
queue: Default::default(),
|
||||
chain_column: None,
|
||||
verify_full: true,
|
||||
check_seal: true,
|
||||
no_hardcoded_sync: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Trait for interacting with the header chain abstractly.
|
||||
pub trait LightChainClient: Send + Sync {
|
||||
/// Adds a new `LightChainNotify` listener.
|
||||
fn add_listener(&self, listener: Weak<LightChainNotify>);
|
||||
|
||||
/// Get chain info.
|
||||
fn chain_info(&self) -> BlockChainInfo;
|
||||
|
||||
/// Queue header to be verified. Required that all headers queued have their
|
||||
/// parent queued prior.
|
||||
fn queue_header(&self, header: Header) -> Result<H256, BlockImportError>;
|
||||
|
||||
/// Attempt to get a block hash by block id.
|
||||
fn block_hash(&self, id: BlockId) -> Option<H256>;
|
||||
|
||||
/// Attempt to get block header by block id.
|
||||
fn block_header(&self, id: BlockId) -> Option<encoded::Header>;
|
||||
|
||||
/// Get the best block header.
|
||||
fn best_block_header(&self) -> encoded::Header;
|
||||
|
||||
/// Get a block's chain score by ID.
|
||||
fn score(&self, id: BlockId) -> Option<U256>;
|
||||
|
||||
/// Get an iterator over a block and its ancestry.
|
||||
fn ancestry_iter<'a>(&'a self, start: BlockId) -> Box<Iterator<Item=encoded::Header> + 'a>;
|
||||
|
||||
/// Get the signing chain ID.
|
||||
fn signing_chain_id(&self) -> Option<u64>;
|
||||
|
||||
/// Get environment info for execution at a given block.
|
||||
/// Fails if that block's header is not stored.
|
||||
fn env_info(&self, id: BlockId) -> Option<EnvInfo>;
|
||||
|
||||
/// Get a handle to the consensus engine.
|
||||
fn engine(&self) -> &Arc<EthEngine>;
|
||||
|
||||
/// Query whether a block is known.
|
||||
fn is_known(&self, hash: &H256) -> bool;
|
||||
|
||||
/// Clear the queue.
|
||||
fn clear_queue(&self);
|
||||
|
||||
/// Flush the queue.
|
||||
fn flush_queue(&self);
|
||||
|
||||
/// Get queue info.
|
||||
fn queue_info(&self) -> queue::QueueInfo;
|
||||
|
||||
/// Get the `i`th CHT root.
|
||||
fn cht_root(&self, i: usize) -> Option<H256>;
|
||||
|
||||
/// Get a report of import activity since the last call.
|
||||
fn report(&self) -> ClientReport;
|
||||
}
|
||||
|
||||
/// An actor listening to light chain events.
|
||||
pub trait LightChainNotify: Send + Sync {
|
||||
/// Notifies about imported headers.
|
||||
fn new_headers(&self, good: &[H256]);
|
||||
}
|
||||
|
||||
/// Something which can be treated as a `LightChainClient`.
|
||||
pub trait AsLightClient {
|
||||
/// The kind of light client this can be treated as.
|
||||
type Client: LightChainClient;
|
||||
|
||||
/// Access the underlying light client.
|
||||
fn as_light_client(&self) -> &Self::Client;
|
||||
}
|
||||
|
||||
impl<T: LightChainClient> AsLightClient for T {
|
||||
type Client = Self;
|
||||
|
||||
fn as_light_client(&self) -> &Self { self }
|
||||
}
|
||||
|
||||
/// Light client implementation.
|
||||
pub struct Client<T> {
|
||||
queue: HeaderQueue,
|
||||
engine: Arc<EthEngine>,
|
||||
chain: HeaderChain,
|
||||
report: RwLock<ClientReport>,
|
||||
import_lock: Mutex<()>,
|
||||
db: Arc<KeyValueDB>,
|
||||
listeners: RwLock<Vec<Weak<LightChainNotify>>>,
|
||||
fetcher: T,
|
||||
verify_full: bool,
|
||||
}
|
||||
|
||||
impl<T: ChainDataFetcher> Client<T> {
|
||||
/// Create a new `Client`.
|
||||
pub fn new(
|
||||
config: Config,
|
||||
db: Arc<KeyValueDB>,
|
||||
chain_col: Option<u32>,
|
||||
spec: &Spec,
|
||||
fetcher: T,
|
||||
io_channel: IoChannel<ClientIoMessage>,
|
||||
cache: Arc<Mutex<Cache>>
|
||||
) -> Result<Self, Error> {
|
||||
Ok(Self {
|
||||
queue: HeaderQueue::new(config.queue, spec.engine.clone(), io_channel, config.check_seal),
|
||||
engine: spec.engine.clone(),
|
||||
chain: {
|
||||
let hs_cfg = if config.no_hardcoded_sync { HardcodedSync::Deny } else { HardcodedSync::Allow };
|
||||
HeaderChain::new(db.clone(), chain_col, &spec, cache, hs_cfg)?
|
||||
},
|
||||
report: RwLock::new(ClientReport::default()),
|
||||
import_lock: Mutex::new(()),
|
||||
db,
|
||||
listeners: RwLock::new(vec![]),
|
||||
fetcher,
|
||||
verify_full: config.verify_full,
|
||||
})
|
||||
}
|
||||
|
||||
/// Generates the specifications for hardcoded sync. This is typically only called manually
|
||||
/// from time to time by a Parity developer in order to update the chain specifications.
|
||||
///
|
||||
/// Returns `None` if we are at the genesis block.
|
||||
pub fn read_hardcoded_sync(&self) -> Result<Option<SpecHardcodedSync>, Error> {
|
||||
self.chain.read_hardcoded_sync()
|
||||
}
|
||||
|
||||
/// Adds a new `LightChainNotify` listener.
|
||||
pub fn add_listener(&self, listener: Weak<LightChainNotify>) {
|
||||
self.listeners.write().push(listener);
|
||||
}
|
||||
|
||||
/// Import a header to the queue for additional verification.
|
||||
pub fn import_header(&self, header: Header) -> Result<H256, BlockImportError> {
|
||||
self.queue.import(header).map_err(Into::into)
|
||||
}
|
||||
|
||||
/// Inquire about the status of a given header.
|
||||
pub fn status(&self, hash: &H256) -> BlockStatus {
|
||||
match self.queue.status(hash) {
|
||||
queue::Status::Unknown => self.chain.status(hash),
|
||||
other => other.into(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the chain info.
|
||||
pub fn chain_info(&self) -> BlockChainInfo {
|
||||
let best_hdr = self.chain.best_header();
|
||||
let best_td = self.chain.best_block().total_difficulty;
|
||||
|
||||
let first_block = self.chain.first_block();
|
||||
let genesis_hash = self.chain.genesis_hash();
|
||||
|
||||
BlockChainInfo {
|
||||
total_difficulty: best_td,
|
||||
pending_total_difficulty: best_td + self.queue.total_difficulty(),
|
||||
genesis_hash,
|
||||
best_block_hash: best_hdr.hash(),
|
||||
best_block_number: best_hdr.number(),
|
||||
best_block_timestamp: best_hdr.timestamp(),
|
||||
ancient_block_hash: if first_block.is_some() { Some(genesis_hash) } else { None },
|
||||
ancient_block_number: if first_block.is_some() { Some(0) } else { None },
|
||||
first_block_hash: first_block.as_ref().map(|first| first.hash),
|
||||
first_block_number: first_block.as_ref().map(|first| first.number),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the header queue info.
|
||||
pub fn queue_info(&self) -> queue::QueueInfo {
|
||||
self.queue.queue_info()
|
||||
}
|
||||
|
||||
/// Attempt to get a block hash by block id.
|
||||
pub fn block_hash(&self, id: BlockId) -> Option<H256> {
|
||||
self.chain.block_hash(id)
|
||||
}
|
||||
|
||||
/// Get a block header by Id.
|
||||
pub fn block_header(&self, id: BlockId) -> Option<encoded::Header> {
|
||||
self.chain.block_header(id)
|
||||
}
|
||||
|
||||
/// Get the best block header.
|
||||
pub fn best_block_header(&self) -> encoded::Header {
|
||||
self.chain.best_header()
|
||||
}
|
||||
|
||||
/// Get a block's chain score.
|
||||
pub fn score(&self, id: BlockId) -> Option<U256> {
|
||||
self.chain.score(id)
|
||||
}
|
||||
|
||||
/// Get an iterator over a block and its ancestry.
|
||||
pub fn ancestry_iter(&self, start: BlockId) -> AncestryIter {
|
||||
self.chain.ancestry_iter(start)
|
||||
}
|
||||
|
||||
/// Get the signing chain id.
|
||||
pub fn signing_chain_id(&self) -> Option<u64> {
|
||||
self.engine.signing_chain_id(&self.latest_env_info())
|
||||
}
|
||||
|
||||
/// Flush the header queue.
|
||||
pub fn flush_queue(&self) {
|
||||
self.queue.flush()
|
||||
}
|
||||
|
||||
/// Get the `i`th CHT root.
|
||||
pub fn cht_root(&self, i: usize) -> Option<H256> {
|
||||
self.chain.cht_root(i)
|
||||
}
|
||||
|
||||
/// Import a set of pre-verified headers from the queue.
|
||||
pub fn import_verified(&self) {
|
||||
const MAX: usize = 256;
|
||||
|
||||
let _lock = self.import_lock.lock();
|
||||
|
||||
let mut bad = Vec::new();
|
||||
let mut good = Vec::new();
|
||||
for verified_header in self.queue.drain(MAX) {
|
||||
let (num, hash) = (verified_header.number(), verified_header.hash());
|
||||
trace!(target: "client", "importing block {}", num);
|
||||
|
||||
if self.verify_full && !self.check_header(&mut bad, &verified_header) {
|
||||
continue
|
||||
}
|
||||
|
||||
let write_proof_result = match self.check_epoch_signal(&verified_header) {
|
||||
Ok(Some(proof)) => self.write_pending_proof(&verified_header, proof),
|
||||
Ok(None) => Ok(()),
|
||||
Err(e) =>
|
||||
panic!("Unable to fetch epoch transition proof: {:?}", e),
|
||||
};
|
||||
|
||||
if let Err(e) = write_proof_result {
|
||||
warn!(target: "client", "Error writing pending transition proof to DB: {:?} \
|
||||
The node may not be able to synchronize further.", e);
|
||||
}
|
||||
|
||||
let epoch_proof = self.engine.is_epoch_end(
|
||||
&verified_header,
|
||||
&|h| self.chain.block_header(BlockId::Hash(h)).and_then(|hdr| hdr.decode().ok()),
|
||||
&|h| self.chain.pending_transition(h),
|
||||
);
|
||||
|
||||
let mut tx = self.db.transaction();
|
||||
let pending = match self.chain.insert(&mut tx, &verified_header, epoch_proof) {
|
||||
Ok(pending) => {
|
||||
good.push(hash);
|
||||
self.report.write().blocks_imported += 1;
|
||||
pending
|
||||
}
|
||||
Err(e) => {
|
||||
debug!(target: "client", "Error importing header {:?}: {:?}", (num, hash), e);
|
||||
bad.push(hash);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
self.db.write_buffered(tx);
|
||||
self.chain.apply_pending(pending);
|
||||
}
|
||||
|
||||
if let Err(e) = self.db.flush() {
|
||||
panic!("Database flush failed: {}. Check disk health and space.", e);
|
||||
}
|
||||
|
||||
self.queue.mark_as_bad(&bad);
|
||||
self.queue.mark_as_good(&good);
|
||||
|
||||
self.notify(|listener| listener.new_headers(&good));
|
||||
}
|
||||
|
||||
/// Get a report about blocks imported.
|
||||
pub fn report(&self) -> ClientReport {
|
||||
self.report.read().clone()
|
||||
}
|
||||
|
||||
/// Get blockchain mem usage in bytes.
|
||||
pub fn chain_mem_used(&self) -> usize {
|
||||
use heapsize::HeapSizeOf;
|
||||
|
||||
self.chain.heap_size_of_children()
|
||||
}
|
||||
|
||||
/// Get a handle to the verification engine.
|
||||
pub fn engine(&self) -> &Arc<EthEngine> {
|
||||
&self.engine
|
||||
}
|
||||
|
||||
/// Get the latest environment info.
|
||||
pub fn latest_env_info(&self) -> EnvInfo {
|
||||
self.env_info(BlockId::Latest)
|
||||
.expect("Best block header and recent hashes always stored; qed")
|
||||
}
|
||||
|
||||
/// Get environment info for a given block.
|
||||
pub fn env_info(&self, id: BlockId) -> Option<EnvInfo> {
|
||||
let header = match self.block_header(id) {
|
||||
Some(hdr) => hdr,
|
||||
None => return None,
|
||||
};
|
||||
|
||||
Some(EnvInfo {
|
||||
number: header.number(),
|
||||
author: header.author(),
|
||||
timestamp: header.timestamp(),
|
||||
difficulty: header.difficulty(),
|
||||
last_hashes: self.build_last_hashes(header.parent_hash()),
|
||||
gas_used: Default::default(),
|
||||
gas_limit: header.gas_limit(),
|
||||
})
|
||||
}
|
||||
|
||||
fn build_last_hashes(&self, mut parent_hash: H256) -> Arc<Vec<H256>> {
|
||||
let mut v = Vec::with_capacity(256);
|
||||
for _ in 0..255 {
|
||||
v.push(parent_hash);
|
||||
match self.block_header(BlockId::Hash(parent_hash)) {
|
||||
Some(header) => parent_hash = header.hash(),
|
||||
None => break,
|
||||
}
|
||||
}
|
||||
|
||||
Arc::new(v)
|
||||
}
|
||||
|
||||
fn notify<F: Fn(&LightChainNotify)>(&self, f: F) {
|
||||
for listener in &*self.listeners.read() {
|
||||
if let Some(listener) = listener.upgrade() {
|
||||
f(&*listener)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return false if should skip, true otherwise. may push onto bad if
|
||||
// should skip.
|
||||
fn check_header(&self, bad: &mut Vec<H256>, verified_header: &Header) -> bool {
|
||||
let hash = verified_header.hash();
|
||||
let parent_header = match self.chain.block_header(BlockId::Hash(*verified_header.parent_hash())) {
|
||||
Some(header) => header,
|
||||
None => {
|
||||
trace!(target: "client", "No parent for block ({}, {})",
|
||||
verified_header.number(), hash);
|
||||
return false // skip import of block with missing parent.
|
||||
}
|
||||
};
|
||||
|
||||
// Verify Block Family
|
||||
|
||||
let verify_family_result = {
|
||||
parent_header.decode()
|
||||
.map_err(|dec_err| dec_err.into())
|
||||
.and_then(|decoded| {
|
||||
self.engine.verify_block_family(&verified_header, &decoded)
|
||||
})
|
||||
|
||||
};
|
||||
if let Err(e) = verify_family_result {
|
||||
warn!(target: "client", "Stage 3 block verification failed for #{} ({})\nError: {:?}",
|
||||
verified_header.number(), verified_header.hash(), e);
|
||||
bad.push(hash);
|
||||
return false;
|
||||
};
|
||||
|
||||
// "external" verification.
|
||||
let verify_external_result = self.engine.verify_block_external(&verified_header);
|
||||
if let Err(e) = verify_external_result {
|
||||
warn!(target: "client", "Stage 4 block verification failed for #{} ({})\nError: {:?}",
|
||||
verified_header.number(), verified_header.hash(), e);
|
||||
|
||||
bad.push(hash);
|
||||
return false;
|
||||
};
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
fn check_epoch_signal(&self, verified_header: &Header) -> Result<Option<Proof<EthereumMachine>>, T::Error> {
|
||||
use ethcore::machine::{AuxiliaryRequest, AuxiliaryData};
|
||||
|
||||
let mut block: Option<Vec<u8>> = None;
|
||||
let mut receipts: Option<Vec<_>> = None;
|
||||
|
||||
loop {
|
||||
|
||||
let is_signal = {
|
||||
let auxiliary = AuxiliaryData {
|
||||
bytes: block.as_ref().map(|x| &x[..]),
|
||||
receipts: receipts.as_ref().map(|x| &x[..]),
|
||||
};
|
||||
|
||||
self.engine.signals_epoch_end(verified_header, auxiliary)
|
||||
};
|
||||
|
||||
// check with any auxiliary data fetched so far
|
||||
match is_signal {
|
||||
EpochChange::No => return Ok(None),
|
||||
EpochChange::Yes(proof) => return Ok(Some(proof)),
|
||||
EpochChange::Unsure(unsure) => {
|
||||
let (b, r) = match unsure {
|
||||
AuxiliaryRequest::Body =>
|
||||
(Some(self.fetcher.block_body(verified_header)), None),
|
||||
AuxiliaryRequest::Receipts =>
|
||||
(None, Some(self.fetcher.block_receipts(verified_header))),
|
||||
AuxiliaryRequest::Both => (
|
||||
Some(self.fetcher.block_body(verified_header)),
|
||||
Some(self.fetcher.block_receipts(verified_header)),
|
||||
),
|
||||
};
|
||||
|
||||
if let Some(b) = b {
|
||||
block = Some(b.into_future().wait()?.into_inner());
|
||||
}
|
||||
|
||||
if let Some(r) = r {
|
||||
receipts = Some(r.into_future().wait()?);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// attempts to fetch the epoch proof from the network until successful.
|
||||
fn write_pending_proof(&self, header: &Header, proof: Proof<EthereumMachine>) -> Result<(), T::Error> {
|
||||
let proof = match proof {
|
||||
Proof::Known(known) => known,
|
||||
Proof::WithState(state_dependent) => {
|
||||
self.fetcher.epoch_transition(
|
||||
header.hash(),
|
||||
self.engine.clone(),
|
||||
state_dependent
|
||||
).into_future().wait()?
|
||||
}
|
||||
};
|
||||
|
||||
let mut batch = self.db.transaction();
|
||||
self.chain.insert_pending_transition(&mut batch, header.hash(), &epoch::PendingTransition {
|
||||
proof,
|
||||
});
|
||||
self.db.write_buffered(batch);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ChainDataFetcher> LightChainClient for Client<T> {
|
||||
fn add_listener(&self, listener: Weak<LightChainNotify>) {
|
||||
Client::add_listener(self, listener)
|
||||
}
|
||||
|
||||
fn chain_info(&self) -> BlockChainInfo { Client::chain_info(self) }
|
||||
|
||||
fn queue_header(&self, header: Header) -> Result<H256, BlockImportError> {
|
||||
self.import_header(header)
|
||||
}
|
||||
|
||||
fn block_hash(&self, id: BlockId) -> Option<H256> {
|
||||
Client::block_hash(self, id)
|
||||
}
|
||||
|
||||
fn block_header(&self, id: BlockId) -> Option<encoded::Header> {
|
||||
Client::block_header(self, id)
|
||||
}
|
||||
|
||||
fn best_block_header(&self) -> encoded::Header {
|
||||
Client::best_block_header(self)
|
||||
}
|
||||
|
||||
fn score(&self, id: BlockId) -> Option<U256> {
|
||||
Client::score(self, id)
|
||||
}
|
||||
|
||||
fn ancestry_iter<'a>(&'a self, start: BlockId) -> Box<Iterator<Item=encoded::Header> + 'a> {
|
||||
Box::new(Client::ancestry_iter(self, start))
|
||||
}
|
||||
|
||||
fn signing_chain_id(&self) -> Option<u64> {
|
||||
Client::signing_chain_id(self)
|
||||
}
|
||||
|
||||
fn env_info(&self, id: BlockId) -> Option<EnvInfo> {
|
||||
Client::env_info(self, id)
|
||||
}
|
||||
|
||||
fn engine(&self) -> &Arc<EthEngine> {
|
||||
Client::engine(self)
|
||||
}
|
||||
|
||||
fn is_known(&self, hash: &H256) -> bool {
|
||||
self.status(hash) == BlockStatus::InChain
|
||||
}
|
||||
|
||||
fn clear_queue(&self) {
|
||||
self.queue.clear()
|
||||
}
|
||||
|
||||
fn flush_queue(&self) {
|
||||
Client::flush_queue(self);
|
||||
}
|
||||
|
||||
fn queue_info(&self) -> queue::QueueInfo {
|
||||
self.queue.queue_info()
|
||||
}
|
||||
|
||||
fn cht_root(&self, i: usize) -> Option<H256> {
|
||||
Client::cht_root(self, i)
|
||||
}
|
||||
|
||||
fn report(&self) -> ClientReport {
|
||||
Client::report(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ChainDataFetcher> ::ethcore::client::ChainInfo for Client<T> {
|
||||
fn chain_info(&self) -> BlockChainInfo {
|
||||
Client::chain_info(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ChainDataFetcher> ::ethcore::client::EngineClient for Client<T> {
|
||||
fn update_sealing(&self) { }
|
||||
fn submit_seal(&self, _block_hash: H256, _seal: Vec<Vec<u8>>) { }
|
||||
fn broadcast_consensus_message(&self, _message: Vec<u8>) { }
|
||||
|
||||
fn epoch_transition_for(&self, parent_hash: H256) -> Option<EpochTransition> {
|
||||
self.chain.epoch_transition_for(parent_hash).map(|(hdr, proof)| EpochTransition {
|
||||
block_hash: hdr.hash(),
|
||||
block_number: hdr.number(),
|
||||
proof,
|
||||
})
|
||||
}
|
||||
|
||||
fn as_full_client(&self) -> Option<&::ethcore::client::BlockChainClient> {
|
||||
None
|
||||
}
|
||||
|
||||
fn block_number(&self, id: BlockId) -> Option<BlockNumber> {
|
||||
self.block_header(id).map(|hdr| hdr.number())
|
||||
}
|
||||
|
||||
fn block_header(&self, id: BlockId) -> Option<encoded::Header> {
|
||||
Client::block_header(self, id)
|
||||
}
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Minimal IO service for light client.
|
||||
//! Just handles block import messages and passes them to the client.
|
||||
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ethcore::client::ClientIoMessage;
|
||||
use ethcore::{db, BlockChainDB};
|
||||
use ethcore::error::Error as CoreError;
|
||||
use ethcore::spec::Spec;
|
||||
use io::{IoContext, IoError, IoHandler, IoService};
|
||||
|
||||
use cache::Cache;
|
||||
use parking_lot::Mutex;
|
||||
|
||||
use super::{ChainDataFetcher, LightChainNotify, Client, Config as ClientConfig};
|
||||
|
||||
/// Errors on service initialization.
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
/// Core error.
|
||||
Core(CoreError),
|
||||
/// I/O service error.
|
||||
Io(IoError),
|
||||
}
|
||||
|
||||
impl From<CoreError> for Error {
|
||||
#[inline]
|
||||
fn from(err: CoreError) -> Error {
|
||||
Error::Core(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
Error::Core(ref msg) => write!(f, "Core error: {}", msg),
|
||||
Error::Io(ref err) => write!(f, "I/O service error: {}", err),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Light client service.
|
||||
pub struct Service<T> {
|
||||
client: Arc<Client<T>>,
|
||||
io_service: IoService<ClientIoMessage>,
|
||||
}
|
||||
|
||||
impl<T: ChainDataFetcher> Service<T> {
|
||||
/// Start the service: initialize I/O workers and client itself.
|
||||
pub fn start(config: ClientConfig, spec: &Spec, fetcher: T, db: Arc<BlockChainDB>, cache: Arc<Mutex<Cache>>) -> Result<Self, Error> {
|
||||
let io_service = IoService::<ClientIoMessage>::start().map_err(Error::Io)?;
|
||||
let client = Arc::new(Client::new(config,
|
||||
db.key_value().clone(),
|
||||
db::COL_LIGHT_CHAIN,
|
||||
spec,
|
||||
fetcher,
|
||||
io_service.channel(),
|
||||
cache,
|
||||
)?);
|
||||
|
||||
io_service.register_handler(Arc::new(ImportBlocks(client.clone()))).map_err(Error::Io)?;
|
||||
spec.engine.register_client(Arc::downgrade(&client) as _);
|
||||
|
||||
Ok(Service {
|
||||
client,
|
||||
io_service,
|
||||
})
|
||||
}
|
||||
|
||||
/// Set the actor to be notified on certain chain events
|
||||
pub fn add_notify(&self, notify: Arc<LightChainNotify>) {
|
||||
self.client.add_listener(Arc::downgrade(¬ify));
|
||||
}
|
||||
|
||||
/// Register an I/O handler on the service.
|
||||
pub fn register_handler(&self, handler: Arc<IoHandler<ClientIoMessage> + Send>) -> Result<(), IoError> {
|
||||
self.io_service.register_handler(handler)
|
||||
}
|
||||
|
||||
/// Get a handle to the client.
|
||||
pub fn client(&self) -> &Arc<Client<T>> {
|
||||
&self.client
|
||||
}
|
||||
}
|
||||
|
||||
struct ImportBlocks<T>(Arc<Client<T>>);
|
||||
|
||||
impl<T: ChainDataFetcher> IoHandler<ClientIoMessage> for ImportBlocks<T> {
|
||||
fn message(&self, _io: &IoContext<ClientIoMessage>, message: &ClientIoMessage) {
|
||||
if let ClientIoMessage::BlockVerified = *message {
|
||||
self.0.import_verified();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::Service;
|
||||
use ethcore::spec::Spec;
|
||||
|
||||
use std::sync::Arc;
|
||||
use cache::Cache;
|
||||
use client::fetch;
|
||||
use std::time::Duration;
|
||||
use parking_lot::Mutex;
|
||||
use ethcore::test_helpers;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let db = test_helpers::new_db();
|
||||
let spec = Spec::new_test();
|
||||
let cache = Arc::new(Mutex::new(Cache::new(Default::default(), Duration::from_secs(6 * 3600))));
|
||||
|
||||
Service::start(Default::default(), &spec, fetch::unavailable(), db, cache).unwrap();
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Light client logic and implementation.
|
||||
//!
|
||||
//! A "light" client stores very little chain-related data locally
|
||||
//! unlike a full node, which stores all blocks, headers, receipts, and more.
|
||||
//!
|
||||
//! This enables the client to have a much lower resource footprint in
|
||||
//! exchange for the cost of having to ask the network for state data
|
||||
//! while responding to queries. This makes a light client unsuitable for
|
||||
//! low-latency applications, but perfectly suitable for simple everyday
|
||||
//! use-cases like sending transactions from a personal account.
|
||||
//!
|
||||
//! The light client performs a header-only sync, doing verification and pruning
|
||||
//! historical blocks. Upon pruning, batches of 2048 blocks have a number => (hash, TD)
|
||||
//! mapping sealed into "canonical hash tries" which can later be used to verify
|
||||
//! historical block queries from peers.
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
pub mod client;
|
||||
pub mod cht;
|
||||
pub mod net;
|
||||
pub mod on_demand;
|
||||
pub mod transaction_queue;
|
||||
pub mod cache;
|
||||
pub mod provider;
|
||||
|
||||
mod types;
|
||||
|
||||
pub use self::cache::Cache;
|
||||
pub use self::provider::{Provider, MAX_HEADERS_PER_REQUEST};
|
||||
pub use self::transaction_queue::TransactionQueue;
|
||||
pub use types::request as request;
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
extern crate bincode;
|
||||
extern crate ethcore_io as io;
|
||||
extern crate ethcore_network as network;
|
||||
extern crate parity_bytes as bytes;
|
||||
extern crate ethcore_transaction as transaction;
|
||||
extern crate ethereum_types;
|
||||
extern crate ethcore;
|
||||
extern crate hashdb;
|
||||
extern crate heapsize;
|
||||
extern crate futures;
|
||||
extern crate itertools;
|
||||
extern crate keccak_hasher;
|
||||
extern crate memorydb;
|
||||
extern crate patricia_trie as trie;
|
||||
extern crate patricia_trie_ethereum as ethtrie;
|
||||
extern crate fastmap;
|
||||
extern crate rand;
|
||||
extern crate rlp;
|
||||
extern crate parking_lot;
|
||||
#[macro_use]
|
||||
extern crate rlp_derive;
|
||||
extern crate serde;
|
||||
extern crate smallvec;
|
||||
extern crate stats;
|
||||
extern crate vm;
|
||||
extern crate keccak_hash as hash;
|
||||
extern crate triehash_ethereum as triehash;
|
||||
extern crate kvdb;
|
||||
extern crate memory_cache;
|
||||
#[macro_use]
|
||||
extern crate error_chain;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate kvdb_memorydb;
|
||||
#[cfg(test)]
|
||||
extern crate tempdir;
|
||||
@@ -1,193 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! I/O and event context generalizations.
|
||||
|
||||
use network::{NetworkContext, PeerId, NodeId};
|
||||
|
||||
use super::{Announcement, LightProtocol, ReqId};
|
||||
use super::error::Error;
|
||||
use request::NetworkRequests as Requests;
|
||||
|
||||
/// An I/O context which allows sending and receiving packets as well as
|
||||
/// disconnecting peers. This is used as a generalization of the portions
|
||||
/// of a p2p network which the light protocol structure makes use of.
|
||||
pub trait IoContext {
|
||||
/// Send a packet to a specific peer.
|
||||
fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec<u8>);
|
||||
|
||||
/// Respond to a peer's message. Only works if this context is a byproduct
|
||||
/// of a packet handler.
|
||||
fn respond(&self, packet_id: u8, packet_body: Vec<u8>);
|
||||
|
||||
/// Disconnect a peer.
|
||||
fn disconnect_peer(&self, peer: PeerId);
|
||||
|
||||
/// Disable a peer -- this is a disconnect + a time-out.
|
||||
fn disable_peer(&self, peer: PeerId);
|
||||
|
||||
/// Get a peer's protocol version.
|
||||
fn protocol_version(&self, peer: PeerId) -> Option<u8>;
|
||||
|
||||
/// Persistent peer id
|
||||
fn persistent_peer_id(&self, peer: PeerId) -> Option<NodeId>;
|
||||
|
||||
/// Whether given peer id is reserved peer
|
||||
fn is_reserved_peer(&self, peer: PeerId) -> bool;
|
||||
}
|
||||
|
||||
impl<T> IoContext for T where T: ?Sized + NetworkContext {
|
||||
fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec<u8>) {
|
||||
if let Err(e) = self.send(peer, packet_id, packet_body) {
|
||||
debug!(target: "pip", "Error sending packet to peer {}: {}", peer, e);
|
||||
}
|
||||
}
|
||||
|
||||
fn respond(&self, packet_id: u8, packet_body: Vec<u8>) {
|
||||
if let Err(e) = self.respond(packet_id, packet_body) {
|
||||
debug!(target: "pip", "Error responding to peer message: {}", e);
|
||||
}
|
||||
}
|
||||
|
||||
fn disconnect_peer(&self, peer: PeerId) {
|
||||
trace!(target: "pip", "Initiating disconnect of peer {}", peer);
|
||||
NetworkContext::disconnect_peer(self, peer);
|
||||
}
|
||||
|
||||
fn disable_peer(&self, peer: PeerId) {
|
||||
trace!(target: "pip", "Initiating disable of peer {}", peer);
|
||||
NetworkContext::disable_peer(self, peer);
|
||||
}
|
||||
|
||||
fn protocol_version(&self, peer: PeerId) -> Option<u8> {
|
||||
self.protocol_version(self.subprotocol_name(), peer)
|
||||
}
|
||||
|
||||
fn persistent_peer_id(&self, peer: PeerId) -> Option<NodeId> {
|
||||
self.session_info(peer).and_then(|info| info.id)
|
||||
}
|
||||
|
||||
fn is_reserved_peer(&self, peer: PeerId) -> bool {
|
||||
NetworkContext::is_reserved_peer(self, peer)
|
||||
}
|
||||
}
|
||||
|
||||
/// Basic context for the protocol.
|
||||
pub trait BasicContext {
|
||||
/// Returns the relevant's peer persistent Id (aka NodeId).
|
||||
fn persistent_peer_id(&self, peer: PeerId) -> Option<NodeId>;
|
||||
|
||||
/// Make a request from a peer.
|
||||
///
|
||||
/// Fails on: nonexistent peer, network error, peer not server,
|
||||
/// insufficient credits. Does not check capabilities before sending.
|
||||
/// On success, returns a request id which can later be coordinated
|
||||
/// with an event.
|
||||
fn request_from(&self, peer: PeerId, request: Requests) -> Result<ReqId, Error>;
|
||||
|
||||
/// Make an announcement of new capabilities to the rest of the peers.
|
||||
// TODO: maybe just put this on a timer in LightProtocol?
|
||||
fn make_announcement(&self, announcement: Announcement);
|
||||
|
||||
/// Disconnect a peer.
|
||||
fn disconnect_peer(&self, peer: PeerId);
|
||||
|
||||
/// Disable a peer.
|
||||
fn disable_peer(&self, peer: PeerId);
|
||||
}
|
||||
|
||||
/// Context for a protocol event which has a peer ID attached.
|
||||
pub trait EventContext: BasicContext {
|
||||
/// Get the peer relevant to the event e.g. message sender,
|
||||
/// disconnected/connected peer.
|
||||
fn peer(&self) -> PeerId;
|
||||
|
||||
/// Treat the event context as a basic context.
|
||||
fn as_basic(&self) -> &BasicContext;
|
||||
}
|
||||
|
||||
/// Basic context.
|
||||
pub struct TickCtx<'a> {
|
||||
/// Io context to enable dispatch.
|
||||
pub io: &'a IoContext,
|
||||
/// Protocol implementation.
|
||||
pub proto: &'a LightProtocol,
|
||||
}
|
||||
|
||||
impl<'a> BasicContext for TickCtx<'a> {
|
||||
fn persistent_peer_id(&self, id: PeerId) -> Option<NodeId> {
|
||||
self.io.persistent_peer_id(id)
|
||||
}
|
||||
|
||||
fn request_from(&self, peer: PeerId, requests: Requests) -> Result<ReqId, Error> {
|
||||
self.proto.request_from(self.io, peer, requests)
|
||||
}
|
||||
|
||||
fn make_announcement(&self, announcement: Announcement) {
|
||||
self.proto.make_announcement(self.io, announcement);
|
||||
}
|
||||
|
||||
fn disconnect_peer(&self, peer: PeerId) {
|
||||
self.io.disconnect_peer(peer);
|
||||
}
|
||||
|
||||
fn disable_peer(&self, peer: PeerId) {
|
||||
self.io.disable_peer(peer);
|
||||
}
|
||||
}
|
||||
|
||||
/// Concrete implementation of `EventContext` over the light protocol struct and
|
||||
/// an io context.
|
||||
pub struct Ctx<'a> {
|
||||
/// Io context to enable immediate response to events.
|
||||
pub io: &'a IoContext,
|
||||
/// Protocol implementation.
|
||||
pub proto: &'a LightProtocol,
|
||||
/// Relevant peer for event.
|
||||
pub peer: PeerId,
|
||||
}
|
||||
|
||||
impl<'a> BasicContext for Ctx<'a> {
|
||||
fn persistent_peer_id(&self, id: PeerId) -> Option<NodeId> {
|
||||
self.io.persistent_peer_id(id)
|
||||
}
|
||||
|
||||
fn request_from(&self, peer: PeerId, requests: Requests) -> Result<ReqId, Error> {
|
||||
self.proto.request_from(self.io, peer, requests)
|
||||
}
|
||||
|
||||
fn make_announcement(&self, announcement: Announcement) {
|
||||
self.proto.make_announcement(self.io, announcement);
|
||||
}
|
||||
|
||||
fn disconnect_peer(&self, peer: PeerId) {
|
||||
self.io.disconnect_peer(peer);
|
||||
}
|
||||
|
||||
fn disable_peer(&self, peer: PeerId) {
|
||||
self.io.disable_peer(peer);
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> EventContext for Ctx<'a> {
|
||||
fn peer(&self) -> PeerId {
|
||||
self.peer
|
||||
}
|
||||
|
||||
fn as_basic(&self) -> &BasicContext {
|
||||
&*self
|
||||
}
|
||||
}
|
||||
@@ -1,124 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Defines error types and levels of punishment to use upon
|
||||
//! encountering.
|
||||
|
||||
use std::fmt;
|
||||
use {rlp, network};
|
||||
|
||||
/// Levels of punishment.
|
||||
///
|
||||
/// Currently just encompasses two different kinds of disconnect and
|
||||
/// no punishment, but this is where reputation systems might come into play.
|
||||
// In ascending order
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum Punishment {
|
||||
/// Perform no punishment.
|
||||
None,
|
||||
/// Disconnect the peer, but don't prevent them from reconnecting.
|
||||
Disconnect,
|
||||
/// Disconnect the peer and prevent them from reconnecting.
|
||||
Disable,
|
||||
}
|
||||
|
||||
/// Kinds of errors which can be encountered in the course of LES.
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
/// An RLP decoding error.
|
||||
Rlp(rlp::DecoderError),
|
||||
/// A network error.
|
||||
Network(network::Error),
|
||||
/// Out of credits.
|
||||
NoCredits,
|
||||
/// Unrecognized packet code.
|
||||
UnrecognizedPacket(u8),
|
||||
/// Unexpected handshake.
|
||||
UnexpectedHandshake,
|
||||
/// Peer on wrong network (wrong NetworkId or genesis hash)
|
||||
WrongNetwork,
|
||||
/// Unknown peer.
|
||||
UnknownPeer,
|
||||
/// Unsolicited response.
|
||||
UnsolicitedResponse,
|
||||
/// Bad back-reference in request.
|
||||
BadBackReference,
|
||||
/// Not a server.
|
||||
NotServer,
|
||||
/// Unsupported protocol version.
|
||||
UnsupportedProtocolVersion(u8),
|
||||
/// Bad protocol version.
|
||||
BadProtocolVersion,
|
||||
/// Peer is overburdened.
|
||||
Overburdened,
|
||||
/// No handler kept the peer.
|
||||
RejectedByHandlers,
|
||||
}
|
||||
|
||||
impl Error {
|
||||
/// What level of punishment does this error warrant?
|
||||
pub fn punishment(&self) -> Punishment {
|
||||
match *self {
|
||||
Error::Rlp(_) => Punishment::Disable,
|
||||
Error::Network(_) => Punishment::None,
|
||||
Error::NoCredits => Punishment::Disable,
|
||||
Error::UnrecognizedPacket(_) => Punishment::Disconnect,
|
||||
Error::UnexpectedHandshake => Punishment::Disconnect,
|
||||
Error::WrongNetwork => Punishment::Disable,
|
||||
Error::UnknownPeer => Punishment::Disconnect,
|
||||
Error::UnsolicitedResponse => Punishment::Disable,
|
||||
Error::BadBackReference => Punishment::Disable,
|
||||
Error::NotServer => Punishment::Disable,
|
||||
Error::UnsupportedProtocolVersion(_) => Punishment::Disable,
|
||||
Error::BadProtocolVersion => Punishment::Disable,
|
||||
Error::Overburdened => Punishment::None,
|
||||
Error::RejectedByHandlers => Punishment::Disconnect,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<rlp::DecoderError> for Error {
|
||||
fn from(err: rlp::DecoderError) -> Self {
|
||||
Error::Rlp(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<network::Error> for Error {
|
||||
fn from(err: network::Error) -> Self {
|
||||
Error::Network(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
Error::Rlp(ref err) => err.fmt(f),
|
||||
Error::Network(ref err) => err.fmt(f),
|
||||
Error::NoCredits => write!(f, "Out of request credits"),
|
||||
Error::UnrecognizedPacket(code) => write!(f, "Unrecognized packet: 0x{:x}", code),
|
||||
Error::UnexpectedHandshake => write!(f, "Unexpected handshake"),
|
||||
Error::WrongNetwork => write!(f, "Wrong network"),
|
||||
Error::UnknownPeer => write!(f, "Unknown peer"),
|
||||
Error::UnsolicitedResponse => write!(f, "Peer provided unsolicited data"),
|
||||
Error::BadBackReference => write!(f, "Bad back-reference in request."),
|
||||
Error::NotServer => write!(f, "Peer not a server."),
|
||||
Error::UnsupportedProtocolVersion(pv) => write!(f, "Unsupported protocol version: {}", pv),
|
||||
Error::BadProtocolVersion => write!(f, "Bad protocol version in handshake"),
|
||||
Error::Overburdened => write!(f, "Peer overburdened"),
|
||||
Error::RejectedByHandlers => write!(f, "No handler kept this peer"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,282 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Request load timer and distribution manager.
|
||||
//!
|
||||
//! This uses empirical samples of the length of time taken to respond
|
||||
//! to requests in order to inform request credit costs.
|
||||
//!
|
||||
//! The average request time is determined by an exponential moving average
|
||||
//! of the mean request times during the last `MOVING_SAMPLE_SIZE` time periods of
|
||||
//! length `TIME_PERIOD_MS`, with the exception that time periods where no data is
|
||||
//! gathered are excluded.
|
||||
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
use std::fs::File;
|
||||
use std::path::PathBuf;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use request::{CompleteRequest, Kind};
|
||||
|
||||
use bincode;
|
||||
use parking_lot::{RwLock, Mutex};
|
||||
|
||||
/// Number of time periods samples should be kept for.
|
||||
pub const MOVING_SAMPLE_SIZE: usize = 256;
|
||||
|
||||
/// Stores rolling load timer samples.
|
||||
// TODO: switch to bigint if possible (FP casts aren't available)
|
||||
pub trait SampleStore: Send + Sync {
|
||||
/// Load samples.
|
||||
fn load(&self) -> HashMap<Kind, VecDeque<u64>>;
|
||||
|
||||
/// Store all samples.
|
||||
fn store(&self, samples: &HashMap<Kind, VecDeque<u64>>);
|
||||
}
|
||||
|
||||
// get a hardcoded, arbitrarily determined (but intended overestimate)
|
||||
// of the time it takes to serve a request of the given kind.
|
||||
//
|
||||
// TODO: seed this with empirical data.
|
||||
fn hardcoded_serve_time(kind: Kind) -> Duration {
|
||||
Duration::new(0, match kind {
|
||||
Kind::Headers => 500_000,
|
||||
Kind::HeaderProof => 500_000,
|
||||
Kind::TransactionIndex => 500_000,
|
||||
Kind::Receipts => 1_000_000,
|
||||
Kind::Body => 1_000_000,
|
||||
Kind::Account => 1_500_000,
|
||||
Kind::Storage => 2_000_000,
|
||||
Kind::Code => 1_500_000,
|
||||
Kind::Execution => 250, // per gas.
|
||||
Kind::Signal => 500_000,
|
||||
})
|
||||
}
|
||||
|
||||
/// A no-op store.
|
||||
pub struct NullStore;
|
||||
|
||||
impl SampleStore for NullStore {
|
||||
fn load(&self) -> HashMap<Kind, VecDeque<u64>> { HashMap::new() }
|
||||
fn store(&self, _samples: &HashMap<Kind, VecDeque<u64>>) { }
|
||||
}
|
||||
|
||||
/// Request load distributions.
|
||||
pub struct LoadDistribution {
|
||||
active_period: RwLock<HashMap<Kind, Mutex<(u64, u64)>>>,
|
||||
samples: RwLock<HashMap<Kind, VecDeque<u64>>>,
|
||||
}
|
||||
|
||||
impl LoadDistribution {
|
||||
/// Load rolling samples from the given store.
|
||||
pub fn load(store: &SampleStore) -> Self {
|
||||
let mut samples = store.load();
|
||||
|
||||
for kind_samples in samples.values_mut() {
|
||||
while kind_samples.len() > MOVING_SAMPLE_SIZE {
|
||||
kind_samples.pop_front();
|
||||
}
|
||||
}
|
||||
|
||||
LoadDistribution {
|
||||
active_period: RwLock::new(HashMap::new()),
|
||||
samples: RwLock::new(samples),
|
||||
}
|
||||
}
|
||||
|
||||
/// Begin a timer.
|
||||
pub fn begin_timer<'a>(&'a self, req: &CompleteRequest) -> LoadTimer<'a> {
|
||||
let kind = req.kind();
|
||||
let n = match *req {
|
||||
CompleteRequest::Headers(ref req) => req.max,
|
||||
CompleteRequest::Execution(ref req) => req.gas.low_u64(),
|
||||
_ => 1,
|
||||
};
|
||||
|
||||
LoadTimer {
|
||||
start: Instant::now(),
|
||||
n,
|
||||
dist: self,
|
||||
kind,
|
||||
}
|
||||
}
|
||||
|
||||
/// Calculate EMA of load for a specific request kind.
|
||||
/// If there is no data for the given request kind, no EMA will be calculated,
|
||||
/// but a hardcoded time will be returned.
|
||||
pub fn expected_time(&self, kind: Kind) -> Duration {
|
||||
let samples = self.samples.read();
|
||||
samples.get(&kind).and_then(|s| {
|
||||
if s.is_empty() { return None }
|
||||
|
||||
let alpha: f64 = 1_f64 / s.len() as f64;
|
||||
let start = *s.front().expect("length known to be non-zero; qed") as f64;
|
||||
let ema = s.iter().skip(1).fold(start, |a, &c| {
|
||||
(alpha * c as f64) + ((1.0 - alpha) * a)
|
||||
});
|
||||
|
||||
Some(Duration::from_nanos(ema as u64))
|
||||
}).unwrap_or_else(move || hardcoded_serve_time(kind))
|
||||
}
|
||||
|
||||
/// End the current time period. Provide a store to
|
||||
pub fn end_period(&self, store: &SampleStore) {
|
||||
let active_period = self.active_period.read();
|
||||
let mut samples = self.samples.write();
|
||||
|
||||
for (&kind, set) in active_period.iter() {
|
||||
let (elapsed, n) = ::std::mem::replace(&mut *set.lock(), (0, 0));
|
||||
if n == 0 { continue }
|
||||
|
||||
let kind_samples = samples.entry(kind)
|
||||
.or_insert_with(|| VecDeque::with_capacity(MOVING_SAMPLE_SIZE));
|
||||
|
||||
if kind_samples.len() == MOVING_SAMPLE_SIZE { kind_samples.pop_front(); }
|
||||
kind_samples.push_back(elapsed / n);
|
||||
}
|
||||
|
||||
store.store(&*samples);
|
||||
}
|
||||
|
||||
fn update(&self, kind: Kind, elapsed: Duration, n: u64) {
|
||||
macro_rules! update_counters {
|
||||
($counters: expr) => {
|
||||
$counters.0 = $counters.0.saturating_add({ elapsed.as_secs() * 1_000_000_000 + elapsed.subsec_nanos() as u64 });
|
||||
$counters.1 = $counters.1.saturating_add(n);
|
||||
}
|
||||
};
|
||||
|
||||
{
|
||||
let set = self.active_period.read();
|
||||
if let Some(counters) = set.get(&kind) {
|
||||
let mut counters = counters.lock();
|
||||
update_counters!(counters);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let mut set = self.active_period.write();
|
||||
let counters = set
|
||||
.entry(kind)
|
||||
.or_insert_with(|| Mutex::new((0, 0)));
|
||||
|
||||
update_counters!(counters.get_mut());
|
||||
}
|
||||
}
|
||||
|
||||
/// A timer for a single request.
|
||||
/// On drop, this will update the distribution.
|
||||
pub struct LoadTimer<'a> {
|
||||
start: Instant,
|
||||
n: u64,
|
||||
dist: &'a LoadDistribution,
|
||||
kind: Kind,
|
||||
}
|
||||
|
||||
impl<'a> Drop for LoadTimer<'a> {
|
||||
fn drop(&mut self) {
|
||||
let elapsed = self.start.elapsed();
|
||||
self.dist.update(self.kind, elapsed, self.n);
|
||||
}
|
||||
}
|
||||
|
||||
/// A store which writes directly to a file.
|
||||
pub struct FileStore(pub PathBuf);
|
||||
|
||||
impl SampleStore for FileStore {
|
||||
fn load(&self) -> HashMap<Kind, VecDeque<u64>> {
|
||||
File::open(&self.0)
|
||||
.map_err(|e| Box::new(bincode::ErrorKind::IoError(e)))
|
||||
.and_then(|mut file| bincode::deserialize_from(&mut file, bincode::Infinite))
|
||||
.unwrap_or_else(|_| HashMap::new())
|
||||
}
|
||||
|
||||
fn store(&self, samples: &HashMap<Kind, VecDeque<u64>>) {
|
||||
let res = File::create(&self.0)
|
||||
.map_err(|e| Box::new(bincode::ErrorKind::IoError(e)))
|
||||
.and_then(|mut file| bincode::serialize_into(&mut file, samples, bincode::Infinite));
|
||||
|
||||
if let Err(e) = res {
|
||||
warn!(target: "pip", "Error writing light request timing samples to file: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use request::Kind;
|
||||
|
||||
#[test]
|
||||
fn hardcoded_before_data() {
|
||||
let dist = LoadDistribution::load(&NullStore);
|
||||
assert_eq!(dist.expected_time(Kind::Headers), hardcoded_serve_time(Kind::Headers));
|
||||
|
||||
dist.update(Kind::Headers, Duration::new(0, 100_000), 100);
|
||||
dist.end_period(&NullStore);
|
||||
|
||||
assert_eq!(dist.expected_time(Kind::Headers), Duration::new(0, 1000));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn moving_average() {
|
||||
let dist = LoadDistribution::load(&NullStore);
|
||||
|
||||
let mut sum = 0;
|
||||
|
||||
for (i, x) in (0..10).map(|x| x * 10_000).enumerate() {
|
||||
dist.update(Kind::Headers, Duration::new(0, x), 1);
|
||||
dist.end_period(&NullStore);
|
||||
|
||||
sum += x;
|
||||
if i == 0 { continue }
|
||||
|
||||
let moving_average = dist.expected_time(Kind::Headers);
|
||||
|
||||
// should be weighted below the maximum entry.
|
||||
let arith_average = (sum as f64 / (i + 1) as f64) as u32;
|
||||
assert!(moving_average < Duration::new(0, x));
|
||||
|
||||
// when there are only 2 entries, they should be equal due to choice of
|
||||
// ALPHA = 1/N.
|
||||
// otherwise, the weight should be below the arithmetic mean because the much
|
||||
// smaller previous values are discounted less.
|
||||
if i == 1 {
|
||||
assert_eq!(moving_average, Duration::new(0, arith_average));
|
||||
} else {
|
||||
assert!(moving_average < Duration::new(0, arith_average))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn file_store() {
|
||||
let tempdir = ::tempdir::TempDir::new("").unwrap();
|
||||
let path = tempdir.path().join("file");
|
||||
let store = FileStore(path);
|
||||
|
||||
let mut samples = store.load();
|
||||
assert!(samples.is_empty());
|
||||
samples.insert(Kind::Headers, vec![5, 2, 7, 2, 2, 4].into());
|
||||
samples.insert(Kind::Execution, vec![1, 1, 100, 250].into());
|
||||
|
||||
store.store(&samples);
|
||||
|
||||
let dup = store.load();
|
||||
|
||||
assert_eq!(samples, dup);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,455 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Request credit management.
|
||||
//!
|
||||
//! Every request in the light protocol leads to a reduction
|
||||
//! of the requester's amount of credits as a rate-limiting mechanism.
|
||||
//! The amount of credits will recharge at a set rate.
|
||||
//!
|
||||
//! This module provides an interface for configuration of
|
||||
//! costs and recharge rates of request credits.
|
||||
//!
|
||||
//! Current default costs are picked completely arbitrarily, not based
|
||||
//! on any empirical timings or mathematical models.
|
||||
|
||||
use request::{self, Request};
|
||||
use super::error::Error;
|
||||
|
||||
use rlp::{Rlp, RlpStream, Decodable, Encodable, DecoderError};
|
||||
use ethereum_types::U256;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
/// Credits value.
|
||||
///
|
||||
/// Produced and recharged using `FlowParams`.
|
||||
/// Definitive updates can be made as well -- these will reset the recharge
|
||||
/// point to the time of the update.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Credits {
|
||||
estimate: U256,
|
||||
recharge_point: Instant,
|
||||
}
|
||||
|
||||
impl Credits {
|
||||
/// Get the current amount of credits..
|
||||
pub fn current(&self) -> U256 { self.estimate }
|
||||
|
||||
/// Make a definitive update.
|
||||
/// This will be the value obtained after receiving
|
||||
/// a response to a request.
|
||||
pub fn update_to(&mut self, value: U256) {
|
||||
self.estimate = value;
|
||||
self.recharge_point = Instant::now();
|
||||
}
|
||||
|
||||
/// Maintain ratio to current limit against an old limit.
|
||||
pub fn maintain_ratio(&mut self, old_limit: U256, new_limit: U256) {
|
||||
self.estimate = (new_limit * self.estimate) / old_limit;
|
||||
}
|
||||
|
||||
/// Attempt to apply the given cost to the amount of credits.
|
||||
///
|
||||
/// If successful, the cost will be deducted successfully.
|
||||
///
|
||||
/// If unsuccessful, the structure will be unaltered an an
|
||||
/// error will be produced.
|
||||
pub fn deduct_cost(&mut self, cost: U256) -> Result<(), Error> {
|
||||
if cost > self.estimate {
|
||||
Err(Error::NoCredits)
|
||||
} else {
|
||||
self.estimate = self.estimate - cost;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A cost table, mapping requests to base and per-request costs.
|
||||
/// Costs themselves may be missing.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct CostTable {
|
||||
base: U256, // cost per packet.
|
||||
headers: Option<U256>, // cost per header
|
||||
transaction_index: Option<U256>,
|
||||
body: Option<U256>,
|
||||
receipts: Option<U256>,
|
||||
account: Option<U256>,
|
||||
storage: Option<U256>,
|
||||
code: Option<U256>,
|
||||
header_proof: Option<U256>,
|
||||
transaction_proof: Option<U256>, // cost per gas.
|
||||
epoch_signal: Option<U256>,
|
||||
}
|
||||
|
||||
impl CostTable {
|
||||
fn costs_set(&self) -> usize {
|
||||
let mut num_set = 0;
|
||||
|
||||
{
|
||||
let mut incr_if_set = |cost: &Option<_>| if cost.is_some() { num_set += 1 };
|
||||
incr_if_set(&self.headers);
|
||||
incr_if_set(&self.transaction_index);
|
||||
incr_if_set(&self.body);
|
||||
incr_if_set(&self.receipts);
|
||||
incr_if_set(&self.account);
|
||||
incr_if_set(&self.storage);
|
||||
incr_if_set(&self.code);
|
||||
incr_if_set(&self.header_proof);
|
||||
incr_if_set(&self.transaction_proof);
|
||||
incr_if_set(&self.epoch_signal);
|
||||
}
|
||||
|
||||
num_set
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for CostTable {
|
||||
fn default() -> Self {
|
||||
// arbitrarily chosen constants.
|
||||
CostTable {
|
||||
base: 100_000.into(),
|
||||
headers: Some(10000.into()),
|
||||
transaction_index: Some(10000.into()),
|
||||
body: Some(15000.into()),
|
||||
receipts: Some(5000.into()),
|
||||
account: Some(25000.into()),
|
||||
storage: Some(25000.into()),
|
||||
code: Some(20000.into()),
|
||||
header_proof: Some(15000.into()),
|
||||
transaction_proof: Some(2.into()),
|
||||
epoch_signal: Some(10000.into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Encodable for CostTable {
|
||||
fn rlp_append(&self, s: &mut RlpStream) {
|
||||
fn append_cost(s: &mut RlpStream, cost: &Option<U256>, kind: request::Kind) {
|
||||
if let Some(ref cost) = *cost {
|
||||
s.begin_list(2);
|
||||
// hack around https://github.com/paritytech/parity-ethereum/issues/4356
|
||||
Encodable::rlp_append(&kind, s);
|
||||
s.append(cost);
|
||||
}
|
||||
}
|
||||
|
||||
s.begin_list(1 + self.costs_set()).append(&self.base);
|
||||
append_cost(s, &self.headers, request::Kind::Headers);
|
||||
append_cost(s, &self.transaction_index, request::Kind::TransactionIndex);
|
||||
append_cost(s, &self.body, request::Kind::Body);
|
||||
append_cost(s, &self.receipts, request::Kind::Receipts);
|
||||
append_cost(s, &self.account, request::Kind::Account);
|
||||
append_cost(s, &self.storage, request::Kind::Storage);
|
||||
append_cost(s, &self.code, request::Kind::Code);
|
||||
append_cost(s, &self.header_proof, request::Kind::HeaderProof);
|
||||
append_cost(s, &self.transaction_proof, request::Kind::Execution);
|
||||
append_cost(s, &self.epoch_signal, request::Kind::Signal);
|
||||
}
|
||||
}
|
||||
|
||||
impl Decodable for CostTable {
|
||||
fn decode(rlp: &Rlp) -> Result<Self, DecoderError> {
|
||||
let base = rlp.val_at(0)?;
|
||||
|
||||
let mut headers = None;
|
||||
let mut transaction_index = None;
|
||||
let mut body = None;
|
||||
let mut receipts = None;
|
||||
let mut account = None;
|
||||
let mut storage = None;
|
||||
let mut code = None;
|
||||
let mut header_proof = None;
|
||||
let mut transaction_proof = None;
|
||||
let mut epoch_signal = None;
|
||||
|
||||
for cost_list in rlp.iter().skip(1) {
|
||||
let cost = cost_list.val_at(1)?;
|
||||
match cost_list.val_at(0)? {
|
||||
request::Kind::Headers => headers = Some(cost),
|
||||
request::Kind::TransactionIndex => transaction_index = Some(cost),
|
||||
request::Kind::Body => body = Some(cost),
|
||||
request::Kind::Receipts => receipts = Some(cost),
|
||||
request::Kind::Account => account = Some(cost),
|
||||
request::Kind::Storage => storage = Some(cost),
|
||||
request::Kind::Code => code = Some(cost),
|
||||
request::Kind::HeaderProof => header_proof = Some(cost),
|
||||
request::Kind::Execution => transaction_proof = Some(cost),
|
||||
request::Kind::Signal => epoch_signal = Some(cost),
|
||||
}
|
||||
}
|
||||
|
||||
let table = CostTable {
|
||||
base,
|
||||
headers,
|
||||
transaction_index,
|
||||
body,
|
||||
receipts,
|
||||
account,
|
||||
storage,
|
||||
code,
|
||||
header_proof,
|
||||
transaction_proof,
|
||||
epoch_signal,
|
||||
};
|
||||
|
||||
if table.costs_set() == 0 {
|
||||
Err(DecoderError::Custom("no cost types set."))
|
||||
} else {
|
||||
Ok(table)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Handles costs, recharge, limits of request credits.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct FlowParams {
|
||||
costs: CostTable,
|
||||
limit: U256,
|
||||
recharge: U256,
|
||||
}
|
||||
|
||||
impl FlowParams {
|
||||
/// Create new flow parameters from a request cost table,
|
||||
/// credit limit, and (minimum) rate of recharge.
|
||||
pub fn new(limit: U256, costs: CostTable, recharge: U256) -> Self {
|
||||
FlowParams {
|
||||
costs,
|
||||
limit,
|
||||
recharge,
|
||||
}
|
||||
}
|
||||
|
||||
/// Create new flow parameters from ,
|
||||
/// proportion of total capacity which should be given to a peer,
|
||||
/// and stored capacity a peer can accumulate.
|
||||
pub fn from_request_times<F: Fn(::request::Kind) -> Duration>(
|
||||
request_time: F,
|
||||
load_share: f64,
|
||||
max_stored: Duration
|
||||
) -> Self {
|
||||
use request::Kind;
|
||||
|
||||
let load_share = load_share.abs();
|
||||
|
||||
let recharge: u64 = 100_000_000;
|
||||
let max = {
|
||||
let sec = max_stored.as_secs().saturating_mul(recharge);
|
||||
let nanos = (max_stored.subsec_nanos() as u64).saturating_mul(recharge) / 1_000_000_000;
|
||||
sec + nanos
|
||||
};
|
||||
|
||||
let cost_for_kind = |kind| {
|
||||
// how many requests we can handle per second
|
||||
let rq_dur = request_time(kind);
|
||||
let second_duration = {
|
||||
let as_ns = rq_dur.as_secs() as f64 * 1_000_000_000f64 + rq_dur.subsec_nanos() as f64;
|
||||
1_000_000_000f64 / as_ns
|
||||
};
|
||||
|
||||
// scale by share of the load given to this peer.
|
||||
let serve_per_second = second_duration * load_share;
|
||||
let serve_per_second = serve_per_second.max(1.0 / 10_000.0);
|
||||
|
||||
// as a percentage of the recharge per second.
|
||||
Some(U256::from((recharge as f64 / serve_per_second) as u64))
|
||||
};
|
||||
|
||||
let costs = CostTable {
|
||||
base: 0.into(),
|
||||
headers: cost_for_kind(Kind::Headers),
|
||||
transaction_index: cost_for_kind(Kind::TransactionIndex),
|
||||
body: cost_for_kind(Kind::Body),
|
||||
receipts: cost_for_kind(Kind::Receipts),
|
||||
account: cost_for_kind(Kind::Account),
|
||||
storage: cost_for_kind(Kind::Storage),
|
||||
code: cost_for_kind(Kind::Code),
|
||||
header_proof: cost_for_kind(Kind::HeaderProof),
|
||||
transaction_proof: cost_for_kind(Kind::Execution),
|
||||
epoch_signal: cost_for_kind(Kind::Signal),
|
||||
};
|
||||
|
||||
FlowParams {
|
||||
costs,
|
||||
limit: max.into(),
|
||||
recharge: recharge.into(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create effectively infinite flow params.
|
||||
pub fn free() -> Self {
|
||||
let free_cost: Option<U256> = Some(0.into());
|
||||
FlowParams {
|
||||
limit: (!0_u64).into(),
|
||||
recharge: 1.into(),
|
||||
costs: CostTable {
|
||||
base: 0.into(),
|
||||
headers: free_cost,
|
||||
transaction_index: free_cost,
|
||||
body: free_cost,
|
||||
receipts: free_cost,
|
||||
account: free_cost,
|
||||
storage: free_cost,
|
||||
code: free_cost,
|
||||
header_proof: free_cost,
|
||||
transaction_proof: free_cost,
|
||||
epoch_signal: free_cost,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a reference to the credit limit.
|
||||
pub fn limit(&self) -> &U256 { &self.limit }
|
||||
|
||||
/// Get a reference to the cost table.
|
||||
pub fn cost_table(&self) -> &CostTable { &self.costs }
|
||||
|
||||
/// Get the base cost of a request.
|
||||
pub fn base_cost(&self) -> U256 { self.costs.base }
|
||||
|
||||
/// Get a reference to the recharge rate.
|
||||
pub fn recharge_rate(&self) -> &U256 { &self.recharge }
|
||||
|
||||
/// Compute the actual cost of a request, given the kind of request
|
||||
/// and number of requests made.
|
||||
pub fn compute_cost(&self, request: &Request) -> Option<U256> {
|
||||
match *request {
|
||||
Request::Headers(ref req) => self.costs.headers.map(|c| c * U256::from(req.max)),
|
||||
Request::HeaderProof(_) => self.costs.header_proof,
|
||||
Request::TransactionIndex(_) => self.costs.transaction_index,
|
||||
Request::Body(_) => self.costs.body,
|
||||
Request::Receipts(_) => self.costs.receipts,
|
||||
Request::Account(_) => self.costs.account,
|
||||
Request::Storage(_) => self.costs.storage,
|
||||
Request::Code(_) => self.costs.code,
|
||||
Request::Execution(ref req) => self.costs.transaction_proof.map(|c| c * req.gas),
|
||||
Request::Signal(_) => self.costs.epoch_signal,
|
||||
}
|
||||
}
|
||||
|
||||
/// Compute the cost of a set of requests.
|
||||
/// This is the base cost plus the cost of each individual request.
|
||||
pub fn compute_cost_multi(&self, requests: &[Request]) -> Option<U256> {
|
||||
let mut cost = self.costs.base;
|
||||
for request in requests {
|
||||
match self.compute_cost(request) {
|
||||
Some(c) => cost = cost + c,
|
||||
None => return None,
|
||||
}
|
||||
}
|
||||
|
||||
Some(cost)
|
||||
}
|
||||
|
||||
/// Create initial credits.
|
||||
pub fn create_credits(&self) -> Credits {
|
||||
Credits {
|
||||
estimate: self.limit,
|
||||
recharge_point: Instant::now(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Recharge the given credits based on time passed since last
|
||||
/// update.
|
||||
pub fn recharge(&self, credits: &mut Credits) {
|
||||
let now = Instant::now();
|
||||
|
||||
// recompute and update only in terms of full seconds elapsed
|
||||
// in order to keep the estimate as an underestimate.
|
||||
let elapsed = (now - credits.recharge_point).as_secs();
|
||||
credits.recharge_point += Duration::from_secs(elapsed);
|
||||
|
||||
let elapsed: U256 = elapsed.into();
|
||||
|
||||
credits.estimate = ::std::cmp::min(self.limit, credits.estimate + (elapsed * self.recharge));
|
||||
}
|
||||
|
||||
/// Refund some credits which were previously deducted.
|
||||
/// Does not update the recharge timestamp.
|
||||
pub fn refund(&self, credits: &mut Credits, refund_amount: U256) {
|
||||
credits.estimate = credits.estimate + refund_amount;
|
||||
|
||||
if credits.estimate > self.limit {
|
||||
credits.estimate = self.limit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for FlowParams {
|
||||
fn default() -> Self {
|
||||
FlowParams {
|
||||
limit: 50_000_000.into(),
|
||||
costs: CostTable::default(),
|
||||
recharge: 100_000.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn should_serialize_cost_table() {
|
||||
let costs = CostTable::default();
|
||||
let serialized = ::rlp::encode(&costs);
|
||||
|
||||
let new_costs: CostTable = ::rlp::decode(&*serialized).unwrap();
|
||||
|
||||
assert_eq!(costs, new_costs);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn credits_mechanism() {
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
let flow_params = FlowParams::new(100.into(), Default::default(), 20.into());
|
||||
let mut credits = flow_params.create_credits();
|
||||
|
||||
assert!(credits.deduct_cost(101.into()).is_err());
|
||||
assert!(credits.deduct_cost(10.into()).is_ok());
|
||||
|
||||
thread::sleep(Duration::from_secs(1));
|
||||
|
||||
flow_params.recharge(&mut credits);
|
||||
|
||||
assert_eq!(credits.estimate, 100.into());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scale_by_load_share_and_time() {
|
||||
let flow_params = FlowParams::from_request_times(
|
||||
|_| Duration::new(0, 10_000),
|
||||
0.05,
|
||||
Duration::from_secs(60),
|
||||
);
|
||||
|
||||
let flow_params2 = FlowParams::from_request_times(
|
||||
|_| Duration::new(0, 10_000),
|
||||
0.1,
|
||||
Duration::from_secs(60),
|
||||
);
|
||||
|
||||
let flow_params3 = FlowParams::from_request_times(
|
||||
|_| Duration::new(0, 5_000),
|
||||
0.05,
|
||||
Duration::from_secs(60),
|
||||
);
|
||||
|
||||
assert_eq!(flow_params2.costs, flow_params3.costs);
|
||||
assert_eq!(flow_params.costs.headers.unwrap(), flow_params2.costs.headers.unwrap() * 2u32);
|
||||
}
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Pending request set.
|
||||
//!
|
||||
//! Stores pending requests and does timeout computation according to the rule
|
||||
//! that only the earliest submitted request within the structure may time out.
|
||||
//!
|
||||
//! Whenever a request becomes the earliest, its timeout period begins at that moment.
|
||||
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::iter::FromIterator;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use request::Request;
|
||||
use request::NetworkRequests as Requests;
|
||||
use net::{timeout, ReqId};
|
||||
use ethereum_types::U256;
|
||||
|
||||
// Request set entry: requests + cost.
|
||||
#[derive(Debug)]
|
||||
struct Entry(Requests, U256);
|
||||
|
||||
/// Request set.
|
||||
#[derive(Debug)]
|
||||
pub struct RequestSet {
|
||||
counter: u64,
|
||||
cumulative_cost: U256,
|
||||
base: Option<Instant>,
|
||||
ids: HashMap<ReqId, u64>,
|
||||
reqs: BTreeMap<u64, Entry>,
|
||||
}
|
||||
|
||||
impl Default for RequestSet {
|
||||
fn default() -> Self {
|
||||
RequestSet {
|
||||
counter: 0,
|
||||
cumulative_cost: 0.into(),
|
||||
base: None,
|
||||
ids: HashMap::new(),
|
||||
reqs: BTreeMap::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl RequestSet {
|
||||
/// Push requests onto the stack.
|
||||
pub fn insert(&mut self, req_id: ReqId, req: Requests, cost: U256, now: Instant) {
|
||||
let counter = self.counter;
|
||||
self.cumulative_cost = self.cumulative_cost + cost;
|
||||
|
||||
self.ids.insert(req_id, counter);
|
||||
self.reqs.insert(counter, Entry(req, cost));
|
||||
|
||||
if self.reqs.keys().next().map_or(true, |x| *x == counter) {
|
||||
self.base = Some(now);
|
||||
}
|
||||
|
||||
self.counter += 1;
|
||||
}
|
||||
|
||||
/// Remove a set of requests from the stack.
|
||||
pub fn remove(&mut self, req_id: ReqId, now: Instant) -> Option<Requests> {
|
||||
let id = match self.ids.remove(&req_id) {
|
||||
Some(id) => id,
|
||||
None => return None,
|
||||
};
|
||||
|
||||
let Entry(req, cost) = self.reqs.remove(&id).expect("entry in `ids` implies entry in `reqs`; qed");
|
||||
|
||||
match self.reqs.keys().next() {
|
||||
Some(k) if *k > id => self.base = Some(now),
|
||||
None => self.base = None,
|
||||
_ => {}
|
||||
}
|
||||
|
||||
self.cumulative_cost = self.cumulative_cost - cost;
|
||||
Some(req)
|
||||
}
|
||||
|
||||
/// Check for timeout against the given time. Returns true if
|
||||
/// has timed out, false otherwise.
|
||||
pub fn check_timeout(&self, now: Instant) -> bool {
|
||||
let base = match self.base.as_ref().cloned() {
|
||||
Some(base) => base,
|
||||
None => return false,
|
||||
};
|
||||
|
||||
let first_req = self.reqs.values().next()
|
||||
.expect("base existing implies `reqs` non-empty; qed");
|
||||
|
||||
base + compute_timeout(&first_req.0) <= now
|
||||
}
|
||||
|
||||
/// Collect all pending request ids.
|
||||
pub fn collect_ids<F>(&self) -> F where F: FromIterator<ReqId> {
|
||||
self.ids.keys().cloned().collect()
|
||||
}
|
||||
|
||||
/// Number of requests in the set.
|
||||
pub fn len(&self) -> usize {
|
||||
self.ids.len()
|
||||
}
|
||||
|
||||
/// Whether the set is empty.
|
||||
pub fn is_empty(&self) -> bool { self.len() == 0 }
|
||||
|
||||
/// The cumulative cost of all requests in the set.
|
||||
// this may be useful later for load balancing.
|
||||
#[allow(dead_code)]
|
||||
pub fn cumulative_cost(&self) -> U256 { self.cumulative_cost }
|
||||
}
|
||||
|
||||
// helper to calculate timeout for a specific set of requests.
|
||||
// it's a base amount + some amount per request.
|
||||
fn compute_timeout(reqs: &Requests) -> Duration {
|
||||
Duration::from_millis(reqs.requests().iter().fold(timeout::BASE, |tm, req| {
|
||||
tm + match *req {
|
||||
Request::Headers(_) => timeout::HEADERS,
|
||||
Request::HeaderProof(_) => timeout::HEADER_PROOF,
|
||||
Request::TransactionIndex(_) => timeout::TRANSACTION_INDEX,
|
||||
Request::Receipts(_) => timeout::RECEIPT,
|
||||
Request::Body(_) => timeout::BODY,
|
||||
Request::Account(_) => timeout::PROOF,
|
||||
Request::Storage(_) => timeout::PROOF,
|
||||
Request::Code(_) => timeout::CONTRACT_CODE,
|
||||
Request::Execution(_) => timeout::TRANSACTION_PROOF,
|
||||
Request::Signal(_) => timeout::EPOCH_SIGNAL,
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use net::ReqId;
|
||||
use request::Builder;
|
||||
use std::time::{Instant, Duration};
|
||||
use super::{RequestSet, compute_timeout};
|
||||
|
||||
#[test]
|
||||
fn multi_timeout() {
|
||||
let test_begin = Instant::now();
|
||||
let mut req_set = RequestSet::default();
|
||||
|
||||
let the_req = Builder::default().build();
|
||||
let req_time = compute_timeout(&the_req);
|
||||
req_set.insert(ReqId(0), the_req.clone(), 0.into(), test_begin);
|
||||
req_set.insert(ReqId(1), the_req, 0.into(), test_begin + Duration::from_secs(1));
|
||||
|
||||
assert_eq!(req_set.base, Some(test_begin));
|
||||
|
||||
let test_end = test_begin + req_time;
|
||||
assert!(req_set.check_timeout(test_end));
|
||||
|
||||
req_set.remove(ReqId(0), test_begin + Duration::from_secs(1)).unwrap();
|
||||
assert!(!req_set.check_timeout(test_end));
|
||||
assert!(req_set.check_timeout(test_end + Duration::from_secs(1)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cumulative_cost() {
|
||||
let the_req = Builder::default().build();
|
||||
let test_begin = Instant::now();
|
||||
let test_end = test_begin + Duration::from_secs(1);
|
||||
let mut req_set = RequestSet::default();
|
||||
|
||||
for i in 0..5 {
|
||||
req_set.insert(ReqId(i), the_req.clone(), 1.into(), test_begin);
|
||||
assert_eq!(req_set.cumulative_cost, (i + 1).into());
|
||||
}
|
||||
|
||||
for i in (0..5).rev() {
|
||||
assert!(req_set.remove(ReqId(i), test_end).is_some());
|
||||
assert_eq!(req_set.cumulative_cost, i.into());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,575 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Peer status and capabilities.
|
||||
|
||||
use ethereum_types::{H256, U256};
|
||||
use rlp::{DecoderError, Encodable, Decodable, RlpStream, Rlp};
|
||||
|
||||
use super::request_credits::FlowParams;
|
||||
|
||||
// recognized handshake/announcement keys.
|
||||
// unknown keys are to be skipped, known keys have a defined order.
|
||||
// their string values are defined in the LES spec.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Ord, PartialOrd)]
|
||||
enum Key {
|
||||
ProtocolVersion,
|
||||
NetworkId,
|
||||
HeadTD,
|
||||
HeadHash,
|
||||
HeadNum,
|
||||
GenesisHash,
|
||||
ServeHeaders,
|
||||
ServeChainSince,
|
||||
ServeStateSince,
|
||||
TxRelay,
|
||||
BufferLimit,
|
||||
BufferCostTable,
|
||||
BufferRechargeRate,
|
||||
}
|
||||
|
||||
impl Key {
|
||||
// get the string value of this key.
|
||||
fn as_str(self) -> &'static str {
|
||||
match self {
|
||||
Key::ProtocolVersion => "protocolVersion",
|
||||
Key::NetworkId => "networkId",
|
||||
Key::HeadTD => "headTd",
|
||||
Key::HeadHash => "headHash",
|
||||
Key::HeadNum => "headNum",
|
||||
Key::GenesisHash => "genesisHash",
|
||||
Key::ServeHeaders => "serveHeaders",
|
||||
Key::ServeChainSince => "serveChainSince",
|
||||
Key::ServeStateSince => "serveStateSince",
|
||||
Key::TxRelay => "txRelay",
|
||||
Key::BufferLimit => "flowControl/BL",
|
||||
Key::BufferCostTable => "flowControl/MRC",
|
||||
Key::BufferRechargeRate => "flowControl/MRR",
|
||||
}
|
||||
}
|
||||
|
||||
// try to parse the key value from a string.
|
||||
fn from_str(s: &str) -> Option<Self> {
|
||||
match s {
|
||||
"protocolVersion" => Some(Key::ProtocolVersion),
|
||||
"networkId" => Some(Key::NetworkId),
|
||||
"headTd" => Some(Key::HeadTD),
|
||||
"headHash" => Some(Key::HeadHash),
|
||||
"headNum" => Some(Key::HeadNum),
|
||||
"genesisHash" => Some(Key::GenesisHash),
|
||||
"serveHeaders" => Some(Key::ServeHeaders),
|
||||
"serveChainSince" => Some(Key::ServeChainSince),
|
||||
"serveStateSince" => Some(Key::ServeStateSince),
|
||||
"txRelay" => Some(Key::TxRelay),
|
||||
"flowControl/BL" => Some(Key::BufferLimit),
|
||||
"flowControl/MRC" => Some(Key::BufferCostTable),
|
||||
"flowControl/MRR" => Some(Key::BufferRechargeRate),
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// helper for decoding key-value pairs in the handshake or an announcement.
|
||||
struct Parser<'a> {
|
||||
pos: usize,
|
||||
rlp: &'a Rlp<'a>,
|
||||
}
|
||||
|
||||
impl<'a> Parser<'a> {
|
||||
// expect a specific next key, and decode the value.
|
||||
// error on unexpected key or invalid value.
|
||||
fn expect<T: Decodable>(&mut self, key: Key) -> Result<T, DecoderError> {
|
||||
self.expect_raw(key).and_then(|item| item.as_val())
|
||||
}
|
||||
|
||||
// expect a specific next key, and get the value's RLP.
|
||||
// if the key isn't found, the position isn't advanced.
|
||||
fn expect_raw(&mut self, key: Key) -> Result<Rlp<'a>, DecoderError> {
|
||||
trace!(target: "les", "Expecting key {}", key.as_str());
|
||||
let pre_pos = self.pos;
|
||||
if let Some((k, val)) = self.get_next()? {
|
||||
if k == key { return Ok(val) }
|
||||
}
|
||||
|
||||
self.pos = pre_pos;
|
||||
Err(DecoderError::Custom("Missing expected key"))
|
||||
}
|
||||
|
||||
// get the next key and value RLP.
|
||||
fn get_next(&mut self) -> Result<Option<(Key, Rlp<'a>)>, DecoderError> {
|
||||
while self.pos < self.rlp.item_count()? {
|
||||
let pair = self.rlp.at(self.pos)?;
|
||||
let k: String = pair.val_at(0)?;
|
||||
|
||||
self.pos += 1;
|
||||
match Key::from_str(&k) {
|
||||
Some(key) => return Ok(Some((key , pair.at(1)?))),
|
||||
None => continue,
|
||||
}
|
||||
}
|
||||
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
// Helper for encoding a key-value pair
|
||||
fn encode_pair<T: Encodable>(key: Key, val: &T) -> Vec<u8> {
|
||||
let mut s = RlpStream::new_list(2);
|
||||
s.append(&key.as_str()).append(val);
|
||||
s.out()
|
||||
}
|
||||
|
||||
// Helper for encoding a flag.
|
||||
fn encode_flag(key: Key) -> Vec<u8> {
|
||||
let mut s = RlpStream::new_list(2);
|
||||
s.append(&key.as_str()).append_empty_data();
|
||||
s.out()
|
||||
}
|
||||
|
||||
/// A peer status message.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Status {
|
||||
/// Protocol version.
|
||||
pub protocol_version: u32,
|
||||
/// Network id of this peer.
|
||||
pub network_id: u64,
|
||||
/// Total difficulty of the head of the chain.
|
||||
pub head_td: U256,
|
||||
/// Hash of the best block.
|
||||
pub head_hash: H256,
|
||||
/// Number of the best block.
|
||||
pub head_num: u64,
|
||||
/// Genesis hash
|
||||
pub genesis_hash: H256,
|
||||
/// Last announced chain head and reorg depth to common ancestor.
|
||||
pub last_head: Option<(H256, u64)>,
|
||||
}
|
||||
|
||||
impl Status {
|
||||
/// Update the status from an announcement.
|
||||
pub fn update_from(&mut self, announcement: &Announcement) {
|
||||
self.last_head = Some((self.head_hash, announcement.reorg_depth));
|
||||
self.head_td = announcement.head_td;
|
||||
self.head_hash = announcement.head_hash;
|
||||
self.head_num = announcement.head_num;
|
||||
}
|
||||
}
|
||||
|
||||
/// Peer capabilities.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Capabilities {
|
||||
/// Whether this peer can serve headers
|
||||
pub serve_headers: bool,
|
||||
/// Earliest block number it can serve block/receipt requests for.
|
||||
/// `None` means no requests will be servable.
|
||||
pub serve_chain_since: Option<u64>,
|
||||
/// Earliest block number it can serve state requests for.
|
||||
/// `None` means no requests will be servable.
|
||||
pub serve_state_since: Option<u64>,
|
||||
/// Whether it can relay transactions to the eth network.
|
||||
pub tx_relay: bool,
|
||||
}
|
||||
|
||||
impl Default for Capabilities {
|
||||
fn default() -> Self {
|
||||
Capabilities {
|
||||
serve_headers: true,
|
||||
serve_chain_since: None,
|
||||
serve_state_since: None,
|
||||
tx_relay: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Capabilities {
|
||||
/// Update the capabilities from an announcement.
|
||||
pub fn update_from(&mut self, announcement: &Announcement) {
|
||||
self.serve_headers = self.serve_headers || announcement.serve_headers;
|
||||
self.serve_state_since = self.serve_state_since.or(announcement.serve_state_since);
|
||||
self.serve_chain_since = self.serve_chain_since.or(announcement.serve_chain_since);
|
||||
self.tx_relay = self.tx_relay || announcement.tx_relay;
|
||||
}
|
||||
}
|
||||
|
||||
/// Attempt to parse a handshake message into its three parts:
|
||||
/// - chain status
|
||||
/// - serving capabilities
|
||||
/// - request credit parameters
|
||||
pub fn parse_handshake(rlp: &Rlp) -> Result<(Status, Capabilities, Option<FlowParams>), DecoderError> {
|
||||
let mut parser = Parser {
|
||||
pos: 0,
|
||||
rlp,
|
||||
};
|
||||
|
||||
let status = Status {
|
||||
protocol_version: parser.expect(Key::ProtocolVersion)?,
|
||||
network_id: parser.expect(Key::NetworkId)?,
|
||||
head_td: parser.expect(Key::HeadTD)?,
|
||||
head_hash: parser.expect(Key::HeadHash)?,
|
||||
head_num: parser.expect(Key::HeadNum)?,
|
||||
genesis_hash: parser.expect(Key::GenesisHash)?,
|
||||
last_head: None,
|
||||
};
|
||||
|
||||
let capabilities = Capabilities {
|
||||
serve_headers: parser.expect_raw(Key::ServeHeaders).is_ok(),
|
||||
serve_chain_since: parser.expect(Key::ServeChainSince).ok(),
|
||||
serve_state_since: parser.expect(Key::ServeStateSince).ok(),
|
||||
tx_relay: parser.expect_raw(Key::TxRelay).is_ok(),
|
||||
};
|
||||
|
||||
let flow_params = match (
|
||||
parser.expect(Key::BufferLimit),
|
||||
parser.expect(Key::BufferCostTable),
|
||||
parser.expect(Key::BufferRechargeRate)
|
||||
) {
|
||||
(Ok(bl), Ok(bct), Ok(brr)) => Some(FlowParams::new(bl, bct, brr)),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
Ok((status, capabilities, flow_params))
|
||||
}
|
||||
|
||||
/// Write a handshake, given status, capabilities, and flow parameters.
|
||||
pub fn write_handshake(status: &Status, capabilities: &Capabilities, flow_params: Option<&FlowParams>) -> Vec<u8> {
|
||||
let mut pairs = Vec::new();
|
||||
pairs.push(encode_pair(Key::ProtocolVersion, &status.protocol_version));
|
||||
pairs.push(encode_pair(Key::NetworkId, &(status.network_id as u64)));
|
||||
pairs.push(encode_pair(Key::HeadTD, &status.head_td));
|
||||
pairs.push(encode_pair(Key::HeadHash, &status.head_hash));
|
||||
pairs.push(encode_pair(Key::HeadNum, &status.head_num));
|
||||
pairs.push(encode_pair(Key::GenesisHash, &status.genesis_hash));
|
||||
|
||||
if capabilities.serve_headers {
|
||||
pairs.push(encode_flag(Key::ServeHeaders));
|
||||
}
|
||||
if let Some(ref serve_chain_since) = capabilities.serve_chain_since {
|
||||
pairs.push(encode_pair(Key::ServeChainSince, serve_chain_since));
|
||||
}
|
||||
if let Some(ref serve_state_since) = capabilities.serve_state_since {
|
||||
pairs.push(encode_pair(Key::ServeStateSince, serve_state_since));
|
||||
}
|
||||
if capabilities.tx_relay {
|
||||
pairs.push(encode_flag(Key::TxRelay));
|
||||
}
|
||||
|
||||
if let Some(flow_params) = flow_params {
|
||||
pairs.push(encode_pair(Key::BufferLimit, flow_params.limit()));
|
||||
pairs.push(encode_pair(Key::BufferCostTable, flow_params.cost_table()));
|
||||
pairs.push(encode_pair(Key::BufferRechargeRate, flow_params.recharge_rate()));
|
||||
}
|
||||
|
||||
let mut stream = RlpStream::new_list(pairs.len());
|
||||
|
||||
for pair in pairs {
|
||||
stream.append_raw(&pair, 1);
|
||||
}
|
||||
|
||||
stream.out()
|
||||
}
|
||||
|
||||
/// An announcement of new chain head or capabilities made by a peer.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Announcement {
|
||||
/// Hash of the best block.
|
||||
pub head_hash: H256,
|
||||
/// Number of the best block.
|
||||
pub head_num: u64,
|
||||
/// Head total difficulty
|
||||
pub head_td: U256,
|
||||
/// reorg depth to common ancestor of last announced head.
|
||||
pub reorg_depth: u64,
|
||||
/// optional new header-serving capability. false means "no change"
|
||||
pub serve_headers: bool,
|
||||
/// optional new state-serving capability
|
||||
pub serve_state_since: Option<u64>,
|
||||
/// optional new chain-serving capability
|
||||
pub serve_chain_since: Option<u64>,
|
||||
/// optional new transaction-relay capability. false means "no change"
|
||||
pub tx_relay: bool,
|
||||
// TODO: changes in request credits.
|
||||
}
|
||||
|
||||
/// Parse an announcement.
|
||||
pub fn parse_announcement(rlp: &Rlp) -> Result<Announcement, DecoderError> {
|
||||
let mut last_key = None;
|
||||
|
||||
let mut announcement = Announcement {
|
||||
head_hash: rlp.val_at(0)?,
|
||||
head_num: rlp.val_at(1)?,
|
||||
head_td: rlp.val_at(2)?,
|
||||
reorg_depth: rlp.val_at(3)?,
|
||||
serve_headers: false,
|
||||
serve_state_since: None,
|
||||
serve_chain_since: None,
|
||||
tx_relay: false,
|
||||
};
|
||||
|
||||
let mut parser = Parser {
|
||||
pos: 4,
|
||||
rlp,
|
||||
};
|
||||
|
||||
while let Some((key, item)) = parser.get_next()? {
|
||||
if Some(key) <= last_key { return Err(DecoderError::Custom("Invalid announcement key ordering")) }
|
||||
last_key = Some(key);
|
||||
|
||||
match key {
|
||||
Key::ServeHeaders => announcement.serve_headers = true,
|
||||
Key::ServeStateSince => announcement.serve_state_since = Some(item.as_val()?),
|
||||
Key::ServeChainSince => announcement.serve_chain_since = Some(item.as_val()?),
|
||||
Key::TxRelay => announcement.tx_relay = true,
|
||||
_ => return Err(DecoderError::Custom("Nonsensical key in announcement")),
|
||||
}
|
||||
}
|
||||
|
||||
Ok(announcement)
|
||||
}
|
||||
|
||||
/// Write an announcement out.
|
||||
pub fn write_announcement(announcement: &Announcement) -> Vec<u8> {
|
||||
let mut pairs = Vec::new();
|
||||
if announcement.serve_headers {
|
||||
pairs.push(encode_flag(Key::ServeHeaders));
|
||||
}
|
||||
if let Some(ref serve_chain_since) = announcement.serve_chain_since {
|
||||
pairs.push(encode_pair(Key::ServeChainSince, serve_chain_since));
|
||||
}
|
||||
if let Some(ref serve_state_since) = announcement.serve_state_since {
|
||||
pairs.push(encode_pair(Key::ServeStateSince, serve_state_since));
|
||||
}
|
||||
if announcement.tx_relay {
|
||||
pairs.push(encode_flag(Key::TxRelay));
|
||||
}
|
||||
|
||||
let mut stream = RlpStream::new_list(4 + pairs.len());
|
||||
stream
|
||||
.append(&announcement.head_hash)
|
||||
.append(&announcement.head_num)
|
||||
.append(&announcement.head_td)
|
||||
.append(&announcement.reorg_depth);
|
||||
|
||||
for item in pairs {
|
||||
stream.append_raw(&item, 1);
|
||||
}
|
||||
|
||||
stream.out()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::super::request_credits::FlowParams;
|
||||
use ethereum_types::{U256, H256};
|
||||
use rlp::{RlpStream, Rlp};
|
||||
|
||||
#[test]
|
||||
fn full_handshake() {
|
||||
let status = Status {
|
||||
protocol_version: 1,
|
||||
network_id: 1,
|
||||
head_td: U256::default(),
|
||||
head_hash: H256::default(),
|
||||
head_num: 10,
|
||||
genesis_hash: H256::zero(),
|
||||
last_head: None,
|
||||
};
|
||||
|
||||
let capabilities = Capabilities {
|
||||
serve_headers: true,
|
||||
serve_chain_since: Some(5),
|
||||
serve_state_since: Some(8),
|
||||
tx_relay: true,
|
||||
};
|
||||
|
||||
let flow_params = FlowParams::new(
|
||||
1_000_000.into(),
|
||||
Default::default(),
|
||||
1000.into(),
|
||||
);
|
||||
|
||||
let handshake = write_handshake(&status, &capabilities, Some(&flow_params));
|
||||
|
||||
let (read_status, read_capabilities, read_flow)
|
||||
= parse_handshake(&Rlp::new(&handshake)).unwrap();
|
||||
|
||||
assert_eq!(read_status, status);
|
||||
assert_eq!(read_capabilities, capabilities);
|
||||
assert_eq!(read_flow.unwrap(), flow_params);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn partial_handshake() {
|
||||
let status = Status {
|
||||
protocol_version: 1,
|
||||
network_id: 1,
|
||||
head_td: U256::default(),
|
||||
head_hash: H256::default(),
|
||||
head_num: 10,
|
||||
genesis_hash: H256::zero(),
|
||||
last_head: None,
|
||||
};
|
||||
|
||||
let capabilities = Capabilities {
|
||||
serve_headers: false,
|
||||
serve_chain_since: Some(5),
|
||||
serve_state_since: None,
|
||||
tx_relay: true,
|
||||
};
|
||||
|
||||
let flow_params = FlowParams::new(
|
||||
1_000_000.into(),
|
||||
Default::default(),
|
||||
1000.into(),
|
||||
);
|
||||
|
||||
let handshake = write_handshake(&status, &capabilities, Some(&flow_params));
|
||||
|
||||
let (read_status, read_capabilities, read_flow)
|
||||
= parse_handshake(&Rlp::new(&handshake)).unwrap();
|
||||
|
||||
assert_eq!(read_status, status);
|
||||
assert_eq!(read_capabilities, capabilities);
|
||||
assert_eq!(read_flow.unwrap(), flow_params);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn skip_unknown_keys() {
|
||||
let status = Status {
|
||||
protocol_version: 1,
|
||||
network_id: 1,
|
||||
head_td: U256::default(),
|
||||
head_hash: H256::default(),
|
||||
head_num: 10,
|
||||
genesis_hash: H256::zero(),
|
||||
last_head: None,
|
||||
};
|
||||
|
||||
let capabilities = Capabilities {
|
||||
serve_headers: false,
|
||||
serve_chain_since: Some(5),
|
||||
serve_state_since: None,
|
||||
tx_relay: true,
|
||||
};
|
||||
|
||||
let flow_params = FlowParams::new(
|
||||
1_000_000.into(),
|
||||
Default::default(),
|
||||
1000.into(),
|
||||
);
|
||||
|
||||
let handshake = write_handshake(&status, &capabilities, Some(&flow_params));
|
||||
let interleaved = {
|
||||
let handshake = Rlp::new(&handshake);
|
||||
let mut stream = RlpStream::new_list(handshake.item_count().unwrap_or(0) * 3);
|
||||
|
||||
for item in handshake.iter() {
|
||||
stream.append_raw(item.as_raw(), 1);
|
||||
let (mut s1, mut s2) = (RlpStream::new_list(2), RlpStream::new_list(2));
|
||||
s1.append(&"foo").append_empty_data();
|
||||
s2.append(&"bar").append_empty_data();
|
||||
stream.append_raw(&s1.out(), 1);
|
||||
stream.append_raw(&s2.out(), 1);
|
||||
}
|
||||
|
||||
stream.out()
|
||||
};
|
||||
|
||||
let (read_status, read_capabilities, read_flow)
|
||||
= parse_handshake(&Rlp::new(&interleaved)).unwrap();
|
||||
|
||||
assert_eq!(read_status, status);
|
||||
assert_eq!(read_capabilities, capabilities);
|
||||
assert_eq!(read_flow.unwrap(), flow_params);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn announcement_roundtrip() {
|
||||
let announcement = Announcement {
|
||||
head_hash: H256::random(),
|
||||
head_num: 100_000,
|
||||
head_td: 1_000_000.into(),
|
||||
reorg_depth: 4,
|
||||
serve_headers: false,
|
||||
serve_state_since: Some(99_000),
|
||||
serve_chain_since: Some(1),
|
||||
tx_relay: true,
|
||||
};
|
||||
|
||||
let serialized = write_announcement(&announcement);
|
||||
let read = parse_announcement(&Rlp::new(&serialized)).unwrap();
|
||||
|
||||
assert_eq!(read, announcement);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn keys_out_of_order() {
|
||||
use super::{Key, encode_pair, encode_flag};
|
||||
|
||||
let mut stream = RlpStream::new_list(6);
|
||||
stream
|
||||
.append(&H256::zero())
|
||||
.append(&10_u64)
|
||||
.append(&100_000_u64)
|
||||
.append(&2_u64)
|
||||
.append_raw(&encode_pair(Key::ServeStateSince, &44_u64), 1)
|
||||
.append_raw(&encode_flag(Key::ServeHeaders), 1);
|
||||
|
||||
let out = stream.drain();
|
||||
assert!(parse_announcement(&Rlp::new(&out)).is_err());
|
||||
|
||||
let mut stream = RlpStream::new_list(6);
|
||||
stream
|
||||
.append(&H256::zero())
|
||||
.append(&10_u64)
|
||||
.append(&100_000_u64)
|
||||
.append(&2_u64)
|
||||
.append_raw(&encode_flag(Key::ServeHeaders), 1)
|
||||
.append_raw(&encode_pair(Key::ServeStateSince, &44_u64), 1);
|
||||
|
||||
let out = stream.drain();
|
||||
assert!(parse_announcement(&Rlp::new(&out)).is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn optional_flow() {
|
||||
let status = Status {
|
||||
protocol_version: 1,
|
||||
network_id: 1,
|
||||
head_td: U256::default(),
|
||||
head_hash: H256::default(),
|
||||
head_num: 10,
|
||||
genesis_hash: H256::zero(),
|
||||
last_head: None,
|
||||
};
|
||||
|
||||
let capabilities = Capabilities {
|
||||
serve_headers: true,
|
||||
serve_chain_since: Some(5),
|
||||
serve_state_since: Some(8),
|
||||
tx_relay: true,
|
||||
};
|
||||
|
||||
let handshake = write_handshake(&status, &capabilities, None);
|
||||
|
||||
let (read_status, read_capabilities, read_flow)
|
||||
= parse_handshake(&Rlp::new(&handshake)).unwrap();
|
||||
|
||||
assert_eq!(read_status, status);
|
||||
assert_eq!(read_capabilities, capabilities);
|
||||
assert!(read_flow.is_none());
|
||||
}
|
||||
}
|
||||
@@ -1,814 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Tests for the `LightProtocol` implementation.
|
||||
//! These don't test of the higher level logic on top of
|
||||
|
||||
use ethcore::blockchain_info::BlockChainInfo;
|
||||
use ethcore::client::{EachBlockWith, TestBlockChainClient};
|
||||
use ethcore::encoded;
|
||||
use ethcore::ids::BlockId;
|
||||
use ethereum_types::{H256, U256, Address};
|
||||
use net::{LightProtocol, Params, packet, Peer, Statistics};
|
||||
use net::context::IoContext;
|
||||
use net::status::{Capabilities, Status};
|
||||
use net::load_timer::MOVING_SAMPLE_SIZE;
|
||||
use network::{PeerId, NodeId};
|
||||
use provider::Provider;
|
||||
use request;
|
||||
use request::*;
|
||||
use rlp::{Rlp, RlpStream};
|
||||
use transaction::{Action, PendingTransaction};
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
|
||||
// helper for encoding a single request into a packet.
|
||||
// panics on bad backreference.
|
||||
fn encode_single(request: Request) -> NetworkRequests {
|
||||
let mut builder = Builder::default();
|
||||
builder.push(request).unwrap();
|
||||
builder.build()
|
||||
}
|
||||
|
||||
// helper for making a packet out of `Requests`.
|
||||
fn make_packet(req_id: usize, requests: &NetworkRequests) -> Vec<u8> {
|
||||
let mut stream = RlpStream::new_list(2);
|
||||
stream.append(&req_id).append_list(&requests.requests());
|
||||
stream.out()
|
||||
}
|
||||
|
||||
// expected result from a call.
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
enum Expect {
|
||||
/// Expect to have message sent to peer.
|
||||
Send(PeerId, u8, Vec<u8>),
|
||||
/// Expect this response.
|
||||
Respond(u8, Vec<u8>),
|
||||
/// Expect a punishment (disconnect/disable)
|
||||
Punish(PeerId),
|
||||
/// Expect nothing.
|
||||
Nothing,
|
||||
}
|
||||
|
||||
impl IoContext for Expect {
|
||||
fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec<u8>) {
|
||||
assert_eq!(self, &Expect::Send(peer, packet_id, packet_body));
|
||||
}
|
||||
|
||||
fn respond(&self, packet_id: u8, packet_body: Vec<u8>) {
|
||||
assert_eq!(self, &Expect::Respond(packet_id, packet_body));
|
||||
}
|
||||
|
||||
fn disconnect_peer(&self, peer: PeerId) {
|
||||
assert_eq!(self, &Expect::Punish(peer));
|
||||
}
|
||||
|
||||
fn disable_peer(&self, peer: PeerId) {
|
||||
assert_eq!(self, &Expect::Punish(peer));
|
||||
}
|
||||
|
||||
fn protocol_version(&self, _peer: PeerId) -> Option<u8> {
|
||||
Some(super::MAX_PROTOCOL_VERSION)
|
||||
}
|
||||
|
||||
fn persistent_peer_id(&self, _peer: PeerId) -> Option<NodeId> {
|
||||
None
|
||||
}
|
||||
|
||||
fn is_reserved_peer(&self, peer: PeerId) -> bool {
|
||||
peer == 0xff
|
||||
}
|
||||
}
|
||||
|
||||
// can't implement directly for Arc due to cross-crate orphan rules.
|
||||
struct TestProvider(Arc<TestProviderInner>);
|
||||
|
||||
struct TestProviderInner {
|
||||
client: TestBlockChainClient,
|
||||
}
|
||||
|
||||
impl Provider for TestProvider {
|
||||
fn chain_info(&self) -> BlockChainInfo {
|
||||
self.0.client.chain_info()
|
||||
}
|
||||
|
||||
fn reorg_depth(&self, a: &H256, b: &H256) -> Option<u64> {
|
||||
self.0.client.reorg_depth(a, b)
|
||||
}
|
||||
|
||||
fn earliest_state(&self) -> Option<u64> {
|
||||
None
|
||||
}
|
||||
|
||||
fn block_header(&self, id: BlockId) -> Option<encoded::Header> {
|
||||
self.0.client.block_header(id)
|
||||
}
|
||||
|
||||
fn transaction_index(&self, req: request::CompleteTransactionIndexRequest)
|
||||
-> Option<request::TransactionIndexResponse>
|
||||
{
|
||||
Some(request::TransactionIndexResponse {
|
||||
num: 100,
|
||||
hash: req.hash,
|
||||
index: 55,
|
||||
})
|
||||
}
|
||||
|
||||
fn block_body(&self, req: request::CompleteBodyRequest) -> Option<request::BodyResponse> {
|
||||
self.0.client.block_body(req)
|
||||
}
|
||||
|
||||
fn block_receipts(&self, req: request::CompleteReceiptsRequest) -> Option<request::ReceiptsResponse> {
|
||||
self.0.client.block_receipts(req)
|
||||
}
|
||||
|
||||
fn account_proof(&self, req: request::CompleteAccountRequest) -> Option<request::AccountResponse> {
|
||||
// sort of a leaf node
|
||||
let mut stream = RlpStream::new_list(2);
|
||||
stream.append(&req.address_hash).append_empty_data();
|
||||
Some(AccountResponse {
|
||||
proof: vec![stream.out()],
|
||||
balance: 10.into(),
|
||||
nonce: 100.into(),
|
||||
code_hash: Default::default(),
|
||||
storage_root: Default::default(),
|
||||
})
|
||||
}
|
||||
|
||||
fn storage_proof(&self, req: request::CompleteStorageRequest) -> Option<request::StorageResponse> {
|
||||
Some(StorageResponse {
|
||||
proof: vec![::rlp::encode(&req.key_hash).into_vec()],
|
||||
value: req.key_hash | req.address_hash,
|
||||
})
|
||||
}
|
||||
|
||||
fn contract_code(&self, req: request::CompleteCodeRequest) -> Option<request::CodeResponse> {
|
||||
Some(CodeResponse {
|
||||
code: req.block_hash.iter().chain(req.code_hash.iter()).cloned().collect(),
|
||||
})
|
||||
}
|
||||
|
||||
fn header_proof(&self, _req: request::CompleteHeaderProofRequest) -> Option<request::HeaderProofResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn transaction_proof(&self, _req: request::CompleteExecutionRequest) -> Option<request::ExecutionResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn epoch_signal(&self, _req: request::CompleteSignalRequest) -> Option<request::SignalResponse> {
|
||||
Some(request::SignalResponse {
|
||||
signal: vec![1, 2, 3, 4],
|
||||
})
|
||||
}
|
||||
|
||||
fn transactions_to_propagate(&self) -> Vec<PendingTransaction> {
|
||||
self.0.client.transactions_to_propagate()
|
||||
}
|
||||
}
|
||||
|
||||
fn capabilities() -> Capabilities {
|
||||
Capabilities {
|
||||
serve_headers: true,
|
||||
serve_chain_since: Some(1),
|
||||
serve_state_since: Some(1),
|
||||
tx_relay: true,
|
||||
}
|
||||
}
|
||||
|
||||
fn write_handshake(status: &Status, capabilities: &Capabilities, proto: &LightProtocol) -> Vec<u8> {
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
::net::status::write_handshake(status, capabilities, Some(&*flow_params))
|
||||
}
|
||||
|
||||
fn write_free_handshake(status: &Status, capabilities: &Capabilities, proto: &LightProtocol) -> Vec<u8> {
|
||||
::net::status::write_handshake(status, capabilities, Some(&proto.free_flow_params))
|
||||
}
|
||||
|
||||
// helper for setting up the protocol handler and provider.
|
||||
fn setup(capabilities: Capabilities) -> (Arc<TestProviderInner>, LightProtocol) {
|
||||
let provider = Arc::new(TestProviderInner {
|
||||
client: TestBlockChainClient::new(),
|
||||
});
|
||||
|
||||
let proto = LightProtocol::new(Arc::new(TestProvider(provider.clone())), Params {
|
||||
network_id: 2,
|
||||
config: Default::default(),
|
||||
capabilities: capabilities,
|
||||
sample_store: None,
|
||||
});
|
||||
|
||||
(provider, proto)
|
||||
}
|
||||
|
||||
fn status(chain_info: BlockChainInfo) -> Status {
|
||||
Status {
|
||||
protocol_version: 1,
|
||||
network_id: 2,
|
||||
head_td: chain_info.total_difficulty,
|
||||
head_hash: chain_info.best_block_hash,
|
||||
head_num: chain_info.best_block_number,
|
||||
genesis_hash: chain_info.genesis_hash,
|
||||
last_head: None,
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn handshake_expected() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
|
||||
let status = status(provider.client.chain_info());
|
||||
|
||||
let packet_body = write_handshake(&status, &capabilities, &proto);
|
||||
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reserved_handshake_expected() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
|
||||
let status = status(provider.client.chain_info());
|
||||
|
||||
let packet_body = write_free_handshake(&status, &capabilities, &proto);
|
||||
|
||||
proto.on_connect(0xff, &Expect::Send(0xff, packet::STATUS, packet_body));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn genesis_mismatch() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
|
||||
let mut status = status(provider.client.chain_info());
|
||||
status.genesis_hash = H256::default();
|
||||
|
||||
let packet_body = write_handshake(&status, &capabilities, &proto);
|
||||
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn credit_overflow() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
|
||||
let status = status(provider.client.chain_info());
|
||||
|
||||
{
|
||||
let packet_body = write_handshake(&status, &capabilities, &proto);
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body));
|
||||
}
|
||||
|
||||
{
|
||||
let my_status = write_handshake(&status, &capabilities, &proto);
|
||||
proto.handle_packet(&Expect::Nothing, 1, packet::STATUS, &my_status);
|
||||
}
|
||||
|
||||
// 1 billion requests is far too many for the default flow params.
|
||||
let requests = encode_single(Request::Headers(IncompleteHeadersRequest {
|
||||
start: HashOrNumber::Number(1).into(),
|
||||
max: 1_000_000_000,
|
||||
skip: 0,
|
||||
reverse: false,
|
||||
}));
|
||||
let request = make_packet(111, &requests);
|
||||
|
||||
proto.handle_packet(&Expect::Punish(1), 1, packet::REQUEST, &request);
|
||||
}
|
||||
|
||||
// test the basic request types -- these just make sure that requests are parsed
|
||||
// and sent to the provider correctly as well as testing response formatting.
|
||||
|
||||
#[test]
|
||||
fn get_block_headers() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
let my_status = write_handshake(&cur_status, &capabilities, &proto);
|
||||
|
||||
provider.client.add_blocks(100, EachBlockWith::Nothing);
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
|
||||
{
|
||||
let packet_body = write_handshake(&cur_status, &capabilities, &proto);
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body));
|
||||
proto.handle_packet(&Expect::Nothing, 1, packet::STATUS, &my_status);
|
||||
}
|
||||
|
||||
let request = Request::Headers(IncompleteHeadersRequest {
|
||||
start: HashOrNumber::Number(1).into(),
|
||||
max: 10,
|
||||
skip: 0,
|
||||
reverse: false,
|
||||
});
|
||||
|
||||
let req_id = 111;
|
||||
|
||||
let requests = encode_single(request.clone());
|
||||
let request_body = make_packet(req_id, &requests);
|
||||
|
||||
let response = {
|
||||
let headers: Vec<_> = (0..10).map(|i| provider.client.block_header(BlockId::Number(i + 1)).unwrap()).collect();
|
||||
assert_eq!(headers.len(), 10);
|
||||
|
||||
let new_creds = *flow_params.limit() - flow_params.compute_cost_multi(requests.requests()).unwrap();
|
||||
|
||||
let response = vec![Response::Headers(HeadersResponse { headers })];
|
||||
|
||||
let mut stream = RlpStream::new_list(3);
|
||||
stream.append(&req_id).append(&new_creds).append_list(&response);
|
||||
|
||||
stream.out()
|
||||
};
|
||||
|
||||
let expected = Expect::Respond(packet::RESPONSE, response);
|
||||
proto.handle_packet(&expected, 1, packet::REQUEST, &request_body);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_block_bodies() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
let my_status = write_handshake(&cur_status, &capabilities, &proto);
|
||||
|
||||
provider.client.add_blocks(100, EachBlockWith::Nothing);
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
|
||||
{
|
||||
let packet_body = write_handshake(&cur_status, &capabilities, &proto);
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body));
|
||||
proto.handle_packet(&Expect::Nothing, 1, packet::STATUS, &my_status);
|
||||
}
|
||||
|
||||
let mut builder = Builder::default();
|
||||
let mut bodies = Vec::new();
|
||||
|
||||
for i in 0..10 {
|
||||
let hash = provider.client.block_header(BlockId::Number(i)).unwrap().hash();
|
||||
builder.push(Request::Body(IncompleteBodyRequest {
|
||||
hash: hash.into(),
|
||||
})).unwrap();
|
||||
bodies.push(Response::Body(provider.client.block_body(CompleteBodyRequest {
|
||||
hash: hash,
|
||||
}).unwrap()));
|
||||
}
|
||||
let req_id = 111;
|
||||
let requests = builder.build();
|
||||
let request_body = make_packet(req_id, &requests);
|
||||
|
||||
let response = {
|
||||
let new_creds = *flow_params.limit() - flow_params.compute_cost_multi(requests.requests()).unwrap();
|
||||
|
||||
let mut response_stream = RlpStream::new_list(3);
|
||||
response_stream.append(&req_id).append(&new_creds).append_list(&bodies);
|
||||
response_stream.out()
|
||||
};
|
||||
|
||||
let expected = Expect::Respond(packet::RESPONSE, response);
|
||||
proto.handle_packet(&expected, 1, packet::REQUEST, &request_body);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_block_receipts() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
let my_status = write_handshake(&cur_status, &capabilities, &proto);
|
||||
|
||||
provider.client.add_blocks(1000, EachBlockWith::Nothing);
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
|
||||
{
|
||||
let packet_body = write_handshake(&cur_status, &capabilities, &proto);
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body));
|
||||
proto.handle_packet(&Expect::Nothing, 1, packet::STATUS, &my_status);
|
||||
}
|
||||
|
||||
// find the first 10 block hashes starting with `f` because receipts are only provided
|
||||
// by the test client in that case.
|
||||
let block_hashes: Vec<H256> = (0..1000)
|
||||
.map(|i| provider.client.block_header(BlockId::Number(i)).unwrap().hash())
|
||||
.filter(|hash| format!("{}", hash).starts_with("0xf"))
|
||||
.take(10)
|
||||
.collect();
|
||||
|
||||
let mut builder = Builder::default();
|
||||
let mut receipts = Vec::new();
|
||||
for hash in block_hashes.iter().cloned() {
|
||||
builder.push(Request::Receipts(IncompleteReceiptsRequest { hash: hash.into() })).unwrap();
|
||||
receipts.push(Response::Receipts(provider.client.block_receipts(CompleteReceiptsRequest {
|
||||
hash: hash
|
||||
}).unwrap()));
|
||||
}
|
||||
|
||||
let req_id = 111;
|
||||
let requests = builder.build();
|
||||
let request_body = make_packet(req_id, &requests);
|
||||
|
||||
let response = {
|
||||
assert_eq!(receipts.len(), 10);
|
||||
|
||||
let new_creds = *flow_params.limit() - flow_params.compute_cost_multi(requests.requests()).unwrap();
|
||||
|
||||
let mut response_stream = RlpStream::new_list(3);
|
||||
response_stream.append(&req_id).append(&new_creds).append_list(&receipts);
|
||||
response_stream.out()
|
||||
};
|
||||
|
||||
let expected = Expect::Respond(packet::RESPONSE, response);
|
||||
proto.handle_packet(&expected, 1, packet::REQUEST, &request_body);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_state_proofs() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
|
||||
let provider = TestProvider(provider);
|
||||
|
||||
let cur_status = status(provider.0.client.chain_info());
|
||||
|
||||
{
|
||||
let packet_body = write_handshake(&cur_status, &capabilities, &proto);
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body.clone()));
|
||||
proto.handle_packet(&Expect::Nothing, 1, packet::STATUS, &packet_body);
|
||||
}
|
||||
|
||||
let req_id = 112;
|
||||
let key1: H256 = U256::from(11223344).into();
|
||||
let key2: H256 = U256::from(99988887).into();
|
||||
|
||||
let mut builder = Builder::default();
|
||||
builder.push(Request::Account(IncompleteAccountRequest {
|
||||
block_hash: H256::default().into(),
|
||||
address_hash: key1.into(),
|
||||
})).unwrap();
|
||||
builder.push(Request::Storage(IncompleteStorageRequest {
|
||||
block_hash: H256::default().into(),
|
||||
address_hash: key1.into(),
|
||||
key_hash: key2.into(),
|
||||
})).unwrap();
|
||||
|
||||
let requests = builder.build();
|
||||
|
||||
let request_body = make_packet(req_id, &requests);
|
||||
let response = {
|
||||
let responses = vec![
|
||||
Response::Account(provider.account_proof(CompleteAccountRequest {
|
||||
block_hash: H256::default(),
|
||||
address_hash: key1,
|
||||
}).unwrap()),
|
||||
Response::Storage(provider.storage_proof(CompleteStorageRequest {
|
||||
block_hash: H256::default(),
|
||||
address_hash: key1,
|
||||
key_hash: key2,
|
||||
}).unwrap()),
|
||||
];
|
||||
|
||||
let new_creds = *flow_params.limit() - flow_params.compute_cost_multi(requests.requests()).unwrap();
|
||||
|
||||
let mut response_stream = RlpStream::new_list(3);
|
||||
response_stream.append(&req_id).append(&new_creds).append_list(&responses);
|
||||
response_stream.out()
|
||||
};
|
||||
|
||||
let expected = Expect::Respond(packet::RESPONSE, response);
|
||||
proto.handle_packet(&expected, 1, packet::REQUEST, &request_body);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_contract_code() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
|
||||
{
|
||||
let packet_body = write_handshake(&cur_status, &capabilities, &proto);
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body.clone()));
|
||||
proto.handle_packet(&Expect::Nothing, 1, packet::STATUS, &packet_body);
|
||||
}
|
||||
|
||||
let req_id = 112;
|
||||
let key1: H256 = U256::from(11223344).into();
|
||||
let key2: H256 = U256::from(99988887).into();
|
||||
|
||||
let request = Request::Code(IncompleteCodeRequest {
|
||||
block_hash: key1.into(),
|
||||
code_hash: key2.into(),
|
||||
});
|
||||
|
||||
let requests = encode_single(request.clone());
|
||||
let request_body = make_packet(req_id, &requests);
|
||||
let response = {
|
||||
let response = vec![Response::Code(CodeResponse {
|
||||
code: key1.iter().chain(key2.iter()).cloned().collect(),
|
||||
})];
|
||||
|
||||
let new_creds = *flow_params.limit() - flow_params.compute_cost_multi(requests.requests()).unwrap();
|
||||
|
||||
let mut response_stream = RlpStream::new_list(3);
|
||||
|
||||
response_stream.append(&req_id).append(&new_creds).append_list(&response);
|
||||
response_stream.out()
|
||||
};
|
||||
|
||||
let expected = Expect::Respond(packet::RESPONSE, response);
|
||||
proto.handle_packet(&expected, 1, packet::REQUEST, &request_body);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn epoch_signal() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
|
||||
{
|
||||
let packet_body = write_handshake(&cur_status, &capabilities, &proto);
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body.clone()));
|
||||
proto.handle_packet(&Expect::Nothing, 1, packet::STATUS, &packet_body);
|
||||
}
|
||||
|
||||
let req_id = 112;
|
||||
let request = Request::Signal(request::IncompleteSignalRequest {
|
||||
block_hash: H256([1; 32]).into(),
|
||||
});
|
||||
|
||||
let requests = encode_single(request.clone());
|
||||
let request_body = make_packet(req_id, &requests);
|
||||
|
||||
let response = {
|
||||
let response = vec![Response::Signal(SignalResponse {
|
||||
signal: vec![1, 2, 3, 4],
|
||||
})];
|
||||
|
||||
let limit = *flow_params.limit();
|
||||
let cost = flow_params.compute_cost_multi(requests.requests()).unwrap();
|
||||
|
||||
let new_creds = limit - cost;
|
||||
|
||||
let mut response_stream = RlpStream::new_list(3);
|
||||
response_stream.append(&req_id).append(&new_creds).append_list(&response);
|
||||
|
||||
response_stream.out()
|
||||
};
|
||||
|
||||
let expected = Expect::Respond(packet::RESPONSE, response);
|
||||
proto.handle_packet(&expected, 1, packet::REQUEST, &request_body);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn proof_of_execution() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
|
||||
{
|
||||
let packet_body = write_handshake(&cur_status, &capabilities, &proto);
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body.clone()));
|
||||
proto.handle_packet(&Expect::Nothing, 1, packet::STATUS, &packet_body);
|
||||
}
|
||||
|
||||
let req_id = 112;
|
||||
let mut request = Request::Execution(request::IncompleteExecutionRequest {
|
||||
block_hash: H256::default().into(),
|
||||
from: Address::default(),
|
||||
action: Action::Call(Address::default()),
|
||||
gas: 100.into(),
|
||||
gas_price: 0.into(),
|
||||
value: 0.into(),
|
||||
data: Vec::new(),
|
||||
});
|
||||
|
||||
// first: a valid amount to request execution of.
|
||||
let requests = encode_single(request.clone());
|
||||
let request_body = make_packet(req_id, &requests);
|
||||
|
||||
let response = {
|
||||
let limit = *flow_params.limit();
|
||||
let cost = flow_params.compute_cost_multi(requests.requests()).unwrap();
|
||||
|
||||
let new_creds = limit - cost;
|
||||
|
||||
let mut response_stream = RlpStream::new_list(3);
|
||||
response_stream.append(&req_id).append(&new_creds).begin_list(0);
|
||||
|
||||
response_stream.out()
|
||||
};
|
||||
|
||||
let expected = Expect::Respond(packet::RESPONSE, response);
|
||||
proto.handle_packet(&expected, 1, packet::REQUEST, &request_body);
|
||||
|
||||
// next: way too much requested gas.
|
||||
if let Request::Execution(ref mut req) = request {
|
||||
req.gas = 100_000_000.into();
|
||||
}
|
||||
let req_id = 113;
|
||||
let requests = encode_single(request.clone());
|
||||
let request_body = make_packet(req_id, &requests);
|
||||
|
||||
let expected = Expect::Punish(1);
|
||||
proto.handle_packet(&expected, 1, packet::REQUEST, &request_body);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn id_guard() {
|
||||
use super::request_set::RequestSet;
|
||||
use super::ReqId;
|
||||
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
|
||||
let req_id_1 = ReqId(5143);
|
||||
let req_id_2 = ReqId(1111);
|
||||
|
||||
let req = encode_single(Request::Headers(IncompleteHeadersRequest {
|
||||
start: HashOrNumber::Number(5u64).into(),
|
||||
max: 100,
|
||||
skip: 0,
|
||||
reverse: false,
|
||||
}));
|
||||
|
||||
let peer_id = 9876;
|
||||
|
||||
let mut pending_requests = RequestSet::default();
|
||||
|
||||
pending_requests.insert(req_id_1, req.clone(), 0.into(), Instant::now());
|
||||
pending_requests.insert(req_id_2, req, 1.into(), Instant::now());
|
||||
|
||||
proto.peers.write().insert(peer_id, ::parking_lot::Mutex::new(Peer {
|
||||
local_credits: flow_params.create_credits(),
|
||||
status: status(provider.client.chain_info()),
|
||||
capabilities,
|
||||
remote_flow: Some((flow_params.create_credits(), (&*flow_params).clone())),
|
||||
sent_head: provider.client.chain_info().best_block_hash,
|
||||
last_update: Instant::now(),
|
||||
pending_requests: pending_requests,
|
||||
failed_requests: Vec::new(),
|
||||
propagated_transactions: Default::default(),
|
||||
skip_update: false,
|
||||
local_flow: flow_params,
|
||||
awaiting_acknowledge: None,
|
||||
}));
|
||||
|
||||
// first, malformed responses.
|
||||
{
|
||||
let mut stream = RlpStream::new_list(3);
|
||||
stream.append(&req_id_1.0);
|
||||
stream.append(&4_000_000_usize);
|
||||
stream.begin_list(2).append(&125_usize).append(&3_usize);
|
||||
|
||||
let packet = stream.out();
|
||||
assert!(proto.response(peer_id, &Expect::Nothing, &Rlp::new(&packet)).is_err());
|
||||
}
|
||||
|
||||
// next, do an unexpected response.
|
||||
{
|
||||
let mut stream = RlpStream::new_list(3);
|
||||
stream.append(&10000_usize);
|
||||
stream.append(&3_000_000_usize);
|
||||
stream.begin_list(0);
|
||||
|
||||
let packet = stream.out();
|
||||
assert!(proto.response(peer_id, &Expect::Nothing, &Rlp::new(&packet)).is_err());
|
||||
}
|
||||
|
||||
// lastly, do a valid (but empty) response.
|
||||
{
|
||||
let mut stream = RlpStream::new_list(3);
|
||||
stream.append(&req_id_2.0);
|
||||
stream.append(&3_000_000_usize);
|
||||
stream.begin_list(0);
|
||||
|
||||
let packet = stream.out();
|
||||
assert!(proto.response(peer_id, &Expect::Nothing, &Rlp::new(&packet)).is_ok());
|
||||
}
|
||||
|
||||
let peers = proto.peers.read();
|
||||
if let Some(ref peer_info) = peers.get(&peer_id) {
|
||||
let peer_info = peer_info.lock();
|
||||
assert!(peer_info.pending_requests.collect_ids::<Vec<_>>().is_empty());
|
||||
assert_eq!(peer_info.failed_requests, &[req_id_1]);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_transaction_index() {
|
||||
let capabilities = capabilities();
|
||||
|
||||
let (provider, proto) = setup(capabilities);
|
||||
let flow_params = proto.flow_params.read().clone();
|
||||
|
||||
let cur_status = status(provider.client.chain_info());
|
||||
|
||||
{
|
||||
let packet_body = write_handshake(&cur_status, &capabilities, &proto);
|
||||
proto.on_connect(1, &Expect::Send(1, packet::STATUS, packet_body.clone()));
|
||||
proto.handle_packet(&Expect::Nothing, 1, packet::STATUS, &packet_body);
|
||||
}
|
||||
|
||||
let req_id = 112;
|
||||
let key1: H256 = U256::from(11223344).into();
|
||||
|
||||
let request = Request::TransactionIndex(IncompleteTransactionIndexRequest {
|
||||
hash: key1.into(),
|
||||
});
|
||||
|
||||
let requests = encode_single(request.clone());
|
||||
let request_body = make_packet(req_id, &requests);
|
||||
let response = {
|
||||
let response = vec![Response::TransactionIndex(TransactionIndexResponse {
|
||||
num: 100,
|
||||
hash: key1,
|
||||
index: 55,
|
||||
})];
|
||||
|
||||
let new_creds = *flow_params.limit() - flow_params.compute_cost_multi(requests.requests()).unwrap();
|
||||
|
||||
let mut response_stream = RlpStream::new_list(3);
|
||||
|
||||
response_stream.append(&req_id).append(&new_creds).append_list(&response);
|
||||
response_stream.out()
|
||||
};
|
||||
|
||||
let expected = Expect::Respond(packet::RESPONSE, response);
|
||||
proto.handle_packet(&expected, 1, packet::REQUEST, &request_body);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sync_statistics() {
|
||||
let mut stats = Statistics::new();
|
||||
|
||||
// Empty set should return 1.0
|
||||
assert_eq!(stats.avg_peer_count(), 1.0);
|
||||
|
||||
// Average < 1.0 should return 1.0
|
||||
stats.add_peer_count(0);
|
||||
assert_eq!(stats.avg_peer_count(), 1.0);
|
||||
|
||||
stats = Statistics::new();
|
||||
|
||||
const N: f64 = 50.0;
|
||||
|
||||
for i in 1..(N as usize + 1) {
|
||||
stats.add_peer_count(i);
|
||||
}
|
||||
|
||||
// Compute the average for the sum 1..N
|
||||
assert_eq!(stats.avg_peer_count(), N * (N + 1.0) / 2.0 / N);
|
||||
|
||||
for _ in 1..(MOVING_SAMPLE_SIZE + 1) {
|
||||
stats.add_peer_count(40);
|
||||
}
|
||||
|
||||
// Test that it returns the average of the last
|
||||
// `MOVING_SAMPLE_SIZE` values
|
||||
assert_eq!(stats.avg_peer_count(), 40.0);
|
||||
}
|
||||
@@ -1,482 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! On-demand chain requests over LES. This is a major building block for RPCs.
|
||||
//! The request service is implemented using Futures. Higher level request handlers
|
||||
//! will take the raw data received here and extract meaningful results from it.
|
||||
|
||||
use std::cmp;
|
||||
use std::collections::HashMap;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ethcore::executed::{Executed, ExecutionError};
|
||||
|
||||
use futures::{Poll, Future};
|
||||
use futures::sync::oneshot::{self, Receiver, Canceled};
|
||||
use network::PeerId;
|
||||
use parking_lot::{RwLock, Mutex};
|
||||
use rand;
|
||||
|
||||
use net::{
|
||||
self, Handler, PeerStatus, Status, Capabilities,
|
||||
Announcement, EventContext, BasicContext, ReqId,
|
||||
};
|
||||
use cache::Cache;
|
||||
use request::{self as basic_request, Request as NetworkRequest};
|
||||
use self::request::CheckedRequest;
|
||||
|
||||
pub use self::request::{Request, Response, HeaderRef};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
pub mod request;
|
||||
|
||||
/// The result of execution
|
||||
pub type ExecutionResult = Result<Executed, ExecutionError>;
|
||||
|
||||
// relevant peer info.
|
||||
struct Peer {
|
||||
status: Status,
|
||||
capabilities: Capabilities,
|
||||
}
|
||||
|
||||
impl Peer {
|
||||
// whether this peer can fulfill the necessary capabilities for the given
|
||||
// request.
|
||||
fn can_fulfill(&self, request: &Capabilities) -> bool {
|
||||
let local_caps = &self.capabilities;
|
||||
let can_serve_since = |req, local| {
|
||||
match (req, local) {
|
||||
(Some(request_block), Some(serve_since)) => request_block >= serve_since,
|
||||
(Some(_), None) => false,
|
||||
(None, _) => true,
|
||||
}
|
||||
};
|
||||
|
||||
local_caps.serve_headers >= request.serve_headers &&
|
||||
can_serve_since(request.serve_chain_since, local_caps.serve_chain_since) &&
|
||||
can_serve_since(request.serve_state_since, local_caps.serve_state_since)
|
||||
}
|
||||
}
|
||||
|
||||
// Attempted request info and sender to put received value.
|
||||
struct Pending {
|
||||
requests: basic_request::Batch<CheckedRequest>,
|
||||
net_requests: basic_request::Batch<NetworkRequest>,
|
||||
required_capabilities: Capabilities,
|
||||
responses: Vec<Response>,
|
||||
sender: oneshot::Sender<Vec<Response>>,
|
||||
}
|
||||
|
||||
impl Pending {
|
||||
// answer as many of the given requests from the supplied cache as possible.
|
||||
// TODO: support re-shuffling.
|
||||
fn answer_from_cache(&mut self, cache: &Mutex<Cache>) {
|
||||
while !self.requests.is_complete() {
|
||||
let idx = self.requests.num_answered();
|
||||
match self.requests[idx].respond_local(cache) {
|
||||
Some(response) => {
|
||||
self.requests.supply_response_unchecked(&response);
|
||||
|
||||
// update header and back-references after each from-cache
|
||||
// response to ensure that the requests are left in a consistent
|
||||
// state and increase the likelihood of being able to answer
|
||||
// the next request from cache.
|
||||
self.update_header_refs(idx, &response);
|
||||
self.fill_unanswered();
|
||||
|
||||
self.responses.push(response);
|
||||
}
|
||||
None => break,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update header refs if the given response contains a header future requests require for
|
||||
// verification.
|
||||
// `idx` is the index of the request the response corresponds to.
|
||||
fn update_header_refs(&mut self, idx: usize, response: &Response) {
|
||||
if let Response::HeaderByHash(ref hdr) = *response {
|
||||
// fill the header for all requests waiting on this one.
|
||||
// TODO: could be faster if we stored a map usize => Vec<usize>
|
||||
// but typical use just has one header request that others
|
||||
// depend on.
|
||||
for r in self.requests.iter_mut().skip(idx + 1) {
|
||||
if r.needs_header().map_or(false, |(i, _)| i == idx) {
|
||||
r.provide_header(hdr.clone())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// supply a response.
|
||||
fn supply_response(&mut self, cache: &Mutex<Cache>, response: &basic_request::Response)
|
||||
-> Result<(), basic_request::ResponseError<self::request::Error>>
|
||||
{
|
||||
match self.requests.supply_response(&cache, response) {
|
||||
Ok(response) => {
|
||||
let idx = self.responses.len();
|
||||
self.update_header_refs(idx, &response);
|
||||
self.responses.push(response);
|
||||
Ok(())
|
||||
}
|
||||
Err(e) => Err(e),
|
||||
}
|
||||
}
|
||||
|
||||
// if the requests are complete, send the result and consume self.
|
||||
fn try_complete(self) -> Option<Self> {
|
||||
if self.requests.is_complete() {
|
||||
let _ = self.sender.send(self.responses);
|
||||
None
|
||||
} else {
|
||||
Some(self)
|
||||
}
|
||||
}
|
||||
|
||||
fn fill_unanswered(&mut self) {
|
||||
self.requests.fill_unanswered();
|
||||
}
|
||||
|
||||
// update the cached network requests.
|
||||
fn update_net_requests(&mut self) {
|
||||
use request::IncompleteRequest;
|
||||
|
||||
let mut builder = basic_request::Builder::default();
|
||||
let num_answered = self.requests.num_answered();
|
||||
let mut mapping = move |idx| idx - num_answered;
|
||||
|
||||
for request in self.requests.iter().skip(num_answered) {
|
||||
let mut net_req = request.clone().into_net_request();
|
||||
|
||||
// all back-references with request index less than `num_answered` have
|
||||
// been filled by now. all remaining requests point to nothing earlier
|
||||
// than the next unanswered request.
|
||||
net_req.adjust_refs(&mut mapping);
|
||||
builder.push(net_req)
|
||||
.expect("all back-references to answered requests have been filled; qed");
|
||||
}
|
||||
|
||||
// update pending fields.
|
||||
let capabilities = guess_capabilities(&self.requests[num_answered..]);
|
||||
self.net_requests = builder.build();
|
||||
self.required_capabilities = capabilities;
|
||||
}
|
||||
}
|
||||
|
||||
// helper to guess capabilities required for a given batch of network requests.
|
||||
fn guess_capabilities(requests: &[CheckedRequest]) -> Capabilities {
|
||||
let mut caps = Capabilities {
|
||||
serve_headers: false,
|
||||
serve_chain_since: None,
|
||||
serve_state_since: None,
|
||||
tx_relay: false,
|
||||
};
|
||||
|
||||
let update_since = |current: &mut Option<u64>, new|
|
||||
*current = match *current {
|
||||
Some(x) => Some(::std::cmp::min(x, new)),
|
||||
None => Some(new),
|
||||
};
|
||||
|
||||
for request in requests {
|
||||
match *request {
|
||||
// TODO: might be worth returning a required block number for this also.
|
||||
CheckedRequest::HeaderProof(_, _) =>
|
||||
caps.serve_headers = true,
|
||||
CheckedRequest::HeaderByHash(_, _) =>
|
||||
caps.serve_headers = true,
|
||||
CheckedRequest::HeaderWithAncestors(_, _) =>
|
||||
caps.serve_headers = true,
|
||||
CheckedRequest::TransactionIndex(_, _) => {} // hashes yield no info.
|
||||
CheckedRequest::Signal(_, _) =>
|
||||
caps.serve_headers = true,
|
||||
CheckedRequest::Body(ref req, _) => if let Ok(ref hdr) = req.0.as_ref() {
|
||||
update_since(&mut caps.serve_chain_since, hdr.number());
|
||||
},
|
||||
CheckedRequest::Receipts(ref req, _) => if let Ok(ref hdr) = req.0.as_ref() {
|
||||
update_since(&mut caps.serve_chain_since, hdr.number());
|
||||
},
|
||||
CheckedRequest::Account(ref req, _) => if let Ok(ref hdr) = req.header.as_ref() {
|
||||
update_since(&mut caps.serve_state_since, hdr.number());
|
||||
},
|
||||
CheckedRequest::Code(ref req, _) => if let Ok(ref hdr) = req.header.as_ref() {
|
||||
update_since(&mut caps.serve_state_since, hdr.number());
|
||||
},
|
||||
CheckedRequest::Execution(ref req, _) => if let Ok(ref hdr) = req.header.as_ref() {
|
||||
update_since(&mut caps.serve_state_since, hdr.number());
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
caps
|
||||
}
|
||||
|
||||
/// A future extracting the concrete output type of the generic adapter
|
||||
/// from a vector of responses.
|
||||
pub struct OnResponses<T: request::RequestAdapter> {
|
||||
receiver: Receiver<Vec<Response>>,
|
||||
_marker: PhantomData<T>,
|
||||
}
|
||||
|
||||
impl<T: request::RequestAdapter> Future for OnResponses<T> {
|
||||
type Item = T::Out;
|
||||
type Error = Canceled;
|
||||
|
||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||
self.receiver.poll().map(|async| async.map(T::extract_from))
|
||||
}
|
||||
}
|
||||
|
||||
/// On demand request service. See module docs for more details.
|
||||
/// Accumulates info about all peers' capabilities and dispatches
|
||||
/// requests to them accordingly.
|
||||
// lock in declaration order.
|
||||
pub struct OnDemand {
|
||||
pending: RwLock<Vec<Pending>>,
|
||||
peers: RwLock<HashMap<PeerId, Peer>>,
|
||||
in_transit: RwLock<HashMap<ReqId, Pending>>,
|
||||
cache: Arc<Mutex<Cache>>,
|
||||
no_immediate_dispatch: bool,
|
||||
}
|
||||
|
||||
impl OnDemand {
|
||||
/// Create a new `OnDemand` service with the given cache.
|
||||
pub fn new(cache: Arc<Mutex<Cache>>) -> Self {
|
||||
OnDemand {
|
||||
pending: RwLock::new(Vec::new()),
|
||||
peers: RwLock::new(HashMap::new()),
|
||||
in_transit: RwLock::new(HashMap::new()),
|
||||
cache,
|
||||
no_immediate_dispatch: false,
|
||||
}
|
||||
}
|
||||
|
||||
// make a test version: this doesn't dispatch pending requests
|
||||
// until you trigger it manually.
|
||||
#[cfg(test)]
|
||||
fn new_test(cache: Arc<Mutex<Cache>>) -> Self {
|
||||
let mut me = OnDemand::new(cache);
|
||||
me.no_immediate_dispatch = true;
|
||||
|
||||
me
|
||||
}
|
||||
|
||||
/// Submit a vector of requests to be processed together.
|
||||
///
|
||||
/// Fails if back-references are not coherent.
|
||||
/// The returned vector of responses will correspond to the requests exactly.
|
||||
pub fn request_raw(&self, ctx: &BasicContext, requests: Vec<Request>)
|
||||
-> Result<Receiver<Vec<Response>>, basic_request::NoSuchOutput>
|
||||
{
|
||||
let (sender, receiver) = oneshot::channel();
|
||||
if requests.is_empty() {
|
||||
assert!(sender.send(Vec::new()).is_ok(), "receiver still in scope; qed");
|
||||
return Ok(receiver);
|
||||
}
|
||||
|
||||
let mut builder = basic_request::Builder::default();
|
||||
|
||||
let responses = Vec::with_capacity(requests.len());
|
||||
|
||||
let mut header_producers = HashMap::new();
|
||||
for (i, request) in requests.into_iter().enumerate() {
|
||||
let request = CheckedRequest::from(request);
|
||||
|
||||
// ensure that all requests needing headers will get them.
|
||||
if let Some((idx, field)) = request.needs_header() {
|
||||
// a request chain with a header back-reference is valid only if it both
|
||||
// points to a request that returns a header and has the same back-reference
|
||||
// for the block hash.
|
||||
match header_producers.get(&idx) {
|
||||
Some(ref f) if &field == *f => {}
|
||||
_ => return Err(basic_request::NoSuchOutput),
|
||||
}
|
||||
}
|
||||
if let CheckedRequest::HeaderByHash(ref req, _) = request {
|
||||
header_producers.insert(i, req.0);
|
||||
}
|
||||
|
||||
builder.push(request)?;
|
||||
}
|
||||
|
||||
let requests = builder.build();
|
||||
let net_requests = requests.clone().map_requests(|req| req.into_net_request());
|
||||
let capabilities = guess_capabilities(requests.requests());
|
||||
|
||||
self.submit_pending(ctx, Pending {
|
||||
requests,
|
||||
net_requests,
|
||||
required_capabilities: capabilities,
|
||||
responses,
|
||||
sender,
|
||||
});
|
||||
|
||||
Ok(receiver)
|
||||
}
|
||||
|
||||
/// Submit a strongly-typed batch of requests.
|
||||
///
|
||||
/// Fails if back-reference are not coherent.
|
||||
pub fn request<T>(&self, ctx: &BasicContext, requests: T) -> Result<OnResponses<T>, basic_request::NoSuchOutput>
|
||||
where T: request::RequestAdapter
|
||||
{
|
||||
self.request_raw(ctx, requests.make_requests()).map(|recv| OnResponses {
|
||||
receiver: recv,
|
||||
_marker: PhantomData,
|
||||
})
|
||||
}
|
||||
|
||||
// maybe dispatch pending requests.
|
||||
// sometimes
|
||||
fn attempt_dispatch(&self, ctx: &BasicContext) {
|
||||
if !self.no_immediate_dispatch {
|
||||
self.dispatch_pending(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
// dispatch pending requests, and discard those for which the corresponding
|
||||
// receiver has been dropped.
|
||||
fn dispatch_pending(&self, ctx: &BasicContext) {
|
||||
if self.pending.read().is_empty() { return }
|
||||
let mut pending = self.pending.write();
|
||||
|
||||
debug!(target: "on_demand", "Attempting to dispatch {} pending requests", pending.len());
|
||||
|
||||
// iterate over all pending requests, and check them for hang-up.
|
||||
// then, try and find a peer who can serve it.
|
||||
let peers = self.peers.read();
|
||||
*pending = ::std::mem::replace(&mut *pending, Vec::new()).into_iter()
|
||||
.filter(|pending| !pending.sender.is_canceled())
|
||||
.filter_map(|pending| {
|
||||
// the peer we dispatch to is chosen randomly
|
||||
let num_peers = peers.len();
|
||||
let rng = rand::random::<usize>() % cmp::max(num_peers, 1);
|
||||
for (peer_id, peer) in peers.iter().chain(peers.iter()).skip(rng).take(num_peers) {
|
||||
// TODO: see which requests can be answered by the cache?
|
||||
|
||||
if !peer.can_fulfill(&pending.required_capabilities) {
|
||||
continue
|
||||
}
|
||||
|
||||
match ctx.request_from(*peer_id, pending.net_requests.clone()) {
|
||||
Ok(req_id) => {
|
||||
trace!(target: "on_demand", "Dispatched request {} to peer {}", req_id, peer_id);
|
||||
self.in_transit.write().insert(req_id, pending);
|
||||
return None
|
||||
}
|
||||
Err(net::Error::NoCredits) | Err(net::Error::NotServer) => {}
|
||||
Err(e) => debug!(target: "on_demand", "Error dispatching request to peer: {}", e),
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: maximum number of failures _when we have peers_.
|
||||
Some(pending)
|
||||
})
|
||||
.collect(); // `pending` now contains all requests we couldn't dispatch.
|
||||
|
||||
debug!(target: "on_demand", "Was unable to dispatch {} requests.", pending.len());
|
||||
}
|
||||
|
||||
// submit a pending request set. attempts to answer from cache before
|
||||
// going to the network. if complete, sends response and consumes the struct.
|
||||
fn submit_pending(&self, ctx: &BasicContext, mut pending: Pending) {
|
||||
// answer as many requests from cache as we can, and schedule for dispatch
|
||||
// if incomplete.
|
||||
|
||||
pending.answer_from_cache(&*self.cache);
|
||||
if let Some(mut pending) = pending.try_complete() {
|
||||
pending.update_net_requests();
|
||||
self.pending.write().push(pending);
|
||||
self.attempt_dispatch(ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Handler for OnDemand {
|
||||
fn on_connect(
|
||||
&self,
|
||||
ctx: &EventContext,
|
||||
status: &Status,
|
||||
capabilities: &Capabilities
|
||||
) -> PeerStatus {
|
||||
self.peers.write().insert(
|
||||
ctx.peer(),
|
||||
Peer { status: status.clone(), capabilities: *capabilities }
|
||||
);
|
||||
self.attempt_dispatch(ctx.as_basic());
|
||||
PeerStatus::Kept
|
||||
}
|
||||
|
||||
fn on_disconnect(&self, ctx: &EventContext, unfulfilled: &[ReqId]) {
|
||||
self.peers.write().remove(&ctx.peer());
|
||||
let ctx = ctx.as_basic();
|
||||
|
||||
{
|
||||
let mut pending = self.pending.write();
|
||||
for unfulfilled in unfulfilled {
|
||||
if let Some(unfulfilled) = self.in_transit.write().remove(unfulfilled) {
|
||||
trace!(target: "on_demand", "Attempting to reassign dropped request");
|
||||
pending.push(unfulfilled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.attempt_dispatch(ctx);
|
||||
}
|
||||
|
||||
fn on_announcement(&self, ctx: &EventContext, announcement: &Announcement) {
|
||||
{
|
||||
let mut peers = self.peers.write();
|
||||
if let Some(ref mut peer) = peers.get_mut(&ctx.peer()) {
|
||||
peer.status.update_from(&announcement);
|
||||
peer.capabilities.update_from(&announcement);
|
||||
}
|
||||
}
|
||||
|
||||
self.attempt_dispatch(ctx.as_basic());
|
||||
}
|
||||
|
||||
fn on_responses(&self, ctx: &EventContext, req_id: ReqId, responses: &[basic_request::Response]) {
|
||||
let mut pending = match self.in_transit.write().remove(&req_id) {
|
||||
Some(req) => req,
|
||||
None => return,
|
||||
};
|
||||
|
||||
// for each incoming response
|
||||
// 1. ensure verification data filled.
|
||||
// 2. pending.requests.supply_response
|
||||
// 3. if extracted on-demand response, keep it for later.
|
||||
for response in responses {
|
||||
if let Err(e) = pending.supply_response(&*self.cache, response) {
|
||||
let peer = ctx.peer();
|
||||
debug!(target: "on_demand", "Peer {} gave bad response: {:?}", peer, e);
|
||||
ctx.disable_peer(peer);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pending.fill_unanswered();
|
||||
self.submit_pending(ctx.as_basic(), pending);
|
||||
}
|
||||
|
||||
fn tick(&self, ctx: &BasicContext) {
|
||||
self.attempt_dispatch(ctx)
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,497 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Tests for the on-demand service.
|
||||
|
||||
use cache::Cache;
|
||||
use ethcore::header::Header;
|
||||
use futures::Future;
|
||||
use network::{PeerId, NodeId};
|
||||
use net::*;
|
||||
use ethereum_types::H256;
|
||||
use parking_lot::Mutex;
|
||||
use std::time::Duration;
|
||||
use ::request::{self as basic_request, Response};
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::{request, OnDemand, Peer, HeaderRef};
|
||||
|
||||
// useful contexts to give the service.
|
||||
enum Context {
|
||||
NoOp,
|
||||
WithPeer(PeerId),
|
||||
RequestFrom(PeerId, ReqId),
|
||||
Punish(PeerId),
|
||||
}
|
||||
|
||||
impl EventContext for Context {
|
||||
fn peer(&self) -> PeerId {
|
||||
match *self {
|
||||
Context::WithPeer(id)
|
||||
| Context::RequestFrom(id, _)
|
||||
| Context::Punish(id) => id,
|
||||
_ => panic!("didn't expect to have peer queried."),
|
||||
}
|
||||
}
|
||||
|
||||
fn as_basic(&self) -> &BasicContext { self }
|
||||
}
|
||||
|
||||
impl BasicContext for Context {
|
||||
/// Returns the relevant's peer persistent Id (aka NodeId).
|
||||
fn persistent_peer_id(&self, _: PeerId) -> Option<NodeId> {
|
||||
panic!("didn't expect to provide persistent ID")
|
||||
}
|
||||
|
||||
fn request_from(&self, peer_id: PeerId, _: ::request::NetworkRequests) -> Result<ReqId, Error> {
|
||||
match *self {
|
||||
Context::RequestFrom(id, req_id) => if peer_id == id { Ok(req_id) } else { Err(Error::NoCredits) },
|
||||
_ => panic!("didn't expect to have requests dispatched."),
|
||||
}
|
||||
}
|
||||
|
||||
fn make_announcement(&self, _: Announcement) {
|
||||
panic!("didn't expect to make announcement")
|
||||
}
|
||||
|
||||
fn disconnect_peer(&self, id: PeerId) {
|
||||
self.disable_peer(id)
|
||||
}
|
||||
|
||||
fn disable_peer(&self, peer_id: PeerId) {
|
||||
match *self {
|
||||
Context::Punish(id) if id == peer_id => {},
|
||||
_ => panic!("Unexpectedly punished peer."),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// test harness.
|
||||
struct Harness {
|
||||
service: OnDemand,
|
||||
}
|
||||
|
||||
impl Harness {
|
||||
fn create() -> Self {
|
||||
let cache = Arc::new(Mutex::new(Cache::new(Default::default(), Duration::from_secs(60))));
|
||||
Harness {
|
||||
service: OnDemand::new_test(cache),
|
||||
}
|
||||
}
|
||||
|
||||
fn inject_peer(&self, id: PeerId, peer: Peer) {
|
||||
self.service.peers.write().insert(id, peer);
|
||||
}
|
||||
}
|
||||
|
||||
fn dummy_status() -> Status {
|
||||
Status {
|
||||
protocol_version: 1,
|
||||
network_id: 999,
|
||||
head_td: 1.into(),
|
||||
head_hash: H256::default(),
|
||||
head_num: 1359,
|
||||
genesis_hash: H256::default(),
|
||||
last_head: None,
|
||||
}
|
||||
}
|
||||
|
||||
fn dummy_capabilities() -> Capabilities {
|
||||
Capabilities {
|
||||
serve_headers: true,
|
||||
serve_chain_since: Some(1),
|
||||
serve_state_since: Some(1),
|
||||
tx_relay: true,
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn detects_hangup() {
|
||||
let on_demand = Harness::create().service;
|
||||
let result = on_demand.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![request::HeaderByHash(H256::default().into()).into()],
|
||||
);
|
||||
|
||||
assert_eq!(on_demand.pending.read().len(), 1);
|
||||
drop(result);
|
||||
|
||||
on_demand.dispatch_pending(&Context::NoOp);
|
||||
assert!(on_demand.pending.read().is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn single_request() {
|
||||
let harness = Harness::create();
|
||||
|
||||
let peer_id = 10101;
|
||||
let req_id = ReqId(14426);
|
||||
|
||||
harness.inject_peer(peer_id, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: dummy_capabilities(),
|
||||
});
|
||||
|
||||
let header = Header::default();
|
||||
let encoded = header.encoded();
|
||||
|
||||
let recv = harness.service.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![request::HeaderByHash(header.hash().into()).into()]
|
||||
).unwrap();
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_id, req_id));
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
harness.service.on_responses(
|
||||
&Context::WithPeer(peer_id),
|
||||
req_id,
|
||||
&[Response::Headers(basic_request::HeadersResponse { headers: vec![encoded] })]
|
||||
);
|
||||
|
||||
assert!(recv.wait().is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_capabilities() {
|
||||
let harness = Harness::create();
|
||||
|
||||
let peer_id = 10101;
|
||||
|
||||
let mut capabilities = dummy_capabilities();
|
||||
capabilities.serve_headers = false;
|
||||
|
||||
harness.inject_peer(peer_id, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: capabilities,
|
||||
});
|
||||
|
||||
let _recv = harness.service.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![request::HeaderByHash(H256::default().into()).into()]
|
||||
).unwrap();
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.service.dispatch_pending(&Context::NoOp);
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reassign() {
|
||||
let harness = Harness::create();
|
||||
|
||||
let peer_ids = (10101, 12345);
|
||||
let req_ids = (ReqId(14426), ReqId(555));
|
||||
|
||||
harness.inject_peer(peer_ids.0, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: dummy_capabilities(),
|
||||
});
|
||||
|
||||
let header = Header::default();
|
||||
let encoded = header.encoded();
|
||||
|
||||
let recv = harness.service.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![request::HeaderByHash(header.hash().into()).into()]
|
||||
).unwrap();
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_ids.0, req_ids.0));
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
harness.service.on_disconnect(&Context::WithPeer(peer_ids.0), &[req_ids.0]);
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.inject_peer(peer_ids.1, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: dummy_capabilities(),
|
||||
});
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_ids.1, req_ids.1));
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
harness.service.on_responses(
|
||||
&Context::WithPeer(peer_ids.1),
|
||||
req_ids.1,
|
||||
&[Response::Headers(basic_request::HeadersResponse { headers: vec![encoded] })]
|
||||
);
|
||||
|
||||
assert!(recv.wait().is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn partial_response() {
|
||||
let harness = Harness::create();
|
||||
|
||||
let peer_id = 111;
|
||||
let req_ids = (ReqId(14426), ReqId(555));
|
||||
|
||||
harness.inject_peer(peer_id, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: dummy_capabilities(),
|
||||
});
|
||||
|
||||
let make = |num| {
|
||||
let mut hdr = Header::default();
|
||||
hdr.set_number(num);
|
||||
|
||||
let encoded = hdr.encoded();
|
||||
(hdr, encoded)
|
||||
};
|
||||
|
||||
let (header1, encoded1) = make(5);
|
||||
let (header2, encoded2) = make(23452);
|
||||
|
||||
// request two headers.
|
||||
let recv = harness.service.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![
|
||||
request::HeaderByHash(header1.hash().into()).into(),
|
||||
request::HeaderByHash(header2.hash().into()).into(),
|
||||
],
|
||||
).unwrap();
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_id, req_ids.0));
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
// supply only the first one.
|
||||
harness.service.on_responses(
|
||||
&Context::WithPeer(peer_id),
|
||||
req_ids.0,
|
||||
&[Response::Headers(basic_request::HeadersResponse { headers: vec![encoded1] })]
|
||||
);
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_id, req_ids.1));
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
// supply the next one.
|
||||
harness.service.on_responses(
|
||||
&Context::WithPeer(peer_id),
|
||||
req_ids.1,
|
||||
&[Response::Headers(basic_request::HeadersResponse { headers: vec![encoded2] })]
|
||||
);
|
||||
|
||||
assert!(recv.wait().is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn part_bad_part_good() {
|
||||
let harness = Harness::create();
|
||||
|
||||
let peer_id = 111;
|
||||
let req_ids = (ReqId(14426), ReqId(555));
|
||||
|
||||
harness.inject_peer(peer_id, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: dummy_capabilities(),
|
||||
});
|
||||
|
||||
let make = |num| {
|
||||
let mut hdr = Header::default();
|
||||
hdr.set_number(num);
|
||||
|
||||
let encoded = hdr.encoded();
|
||||
(hdr, encoded)
|
||||
};
|
||||
|
||||
let (header1, encoded1) = make(5);
|
||||
let (header2, encoded2) = make(23452);
|
||||
|
||||
// request two headers.
|
||||
let recv = harness.service.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![
|
||||
request::HeaderByHash(header1.hash().into()).into(),
|
||||
request::HeaderByHash(header2.hash().into()).into(),
|
||||
],
|
||||
).unwrap();
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_id, req_ids.0));
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
// supply only the first one, but followed by the wrong kind of response.
|
||||
// the first header should be processed.
|
||||
harness.service.on_responses(
|
||||
&Context::Punish(peer_id),
|
||||
req_ids.0,
|
||||
&[
|
||||
Response::Headers(basic_request::HeadersResponse { headers: vec![encoded1] }),
|
||||
Response::Receipts(basic_request::ReceiptsResponse { receipts: vec![] } ),
|
||||
]
|
||||
);
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.inject_peer(peer_id, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: dummy_capabilities(),
|
||||
});
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_id, req_ids.1));
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
// supply the next one.
|
||||
harness.service.on_responses(
|
||||
&Context::WithPeer(peer_id),
|
||||
req_ids.1,
|
||||
&[Response::Headers(basic_request::HeadersResponse { headers: vec![encoded2] })]
|
||||
);
|
||||
|
||||
assert!(recv.wait().is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn wrong_kind() {
|
||||
let harness = Harness::create();
|
||||
|
||||
let peer_id = 10101;
|
||||
let req_id = ReqId(14426);
|
||||
|
||||
harness.inject_peer(peer_id, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: dummy_capabilities(),
|
||||
});
|
||||
|
||||
let _recv = harness.service.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![request::HeaderByHash(H256::default().into()).into()]
|
||||
).unwrap();
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_id, req_id));
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
harness.service.on_responses(
|
||||
&Context::Punish(peer_id),
|
||||
req_id,
|
||||
&[Response::Receipts(basic_request::ReceiptsResponse { receipts: vec![] })]
|
||||
);
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn back_references() {
|
||||
let harness = Harness::create();
|
||||
|
||||
let peer_id = 10101;
|
||||
let req_id = ReqId(14426);
|
||||
|
||||
harness.inject_peer(peer_id, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: dummy_capabilities(),
|
||||
});
|
||||
|
||||
let header = Header::default();
|
||||
let encoded = header.encoded();
|
||||
|
||||
let recv = harness.service.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![
|
||||
request::HeaderByHash(header.hash().into()).into(),
|
||||
request::BlockReceipts(HeaderRef::Unresolved(0, header.hash().into())).into(),
|
||||
]
|
||||
).unwrap();
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_id, req_id));
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
harness.service.on_responses(
|
||||
&Context::WithPeer(peer_id),
|
||||
req_id,
|
||||
&[
|
||||
Response::Headers(basic_request::HeadersResponse { headers: vec![encoded] }),
|
||||
Response::Receipts(basic_request::ReceiptsResponse { receipts: vec![] }),
|
||||
]
|
||||
);
|
||||
|
||||
assert!(recv.wait().is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn bad_back_reference() {
|
||||
let harness = Harness::create();
|
||||
|
||||
let header = Header::default();
|
||||
|
||||
let _ = harness.service.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![
|
||||
request::HeaderByHash(header.hash().into()).into(),
|
||||
request::BlockReceipts(HeaderRef::Unresolved(1, header.hash().into())).into(),
|
||||
]
|
||||
).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fill_from_cache() {
|
||||
let harness = Harness::create();
|
||||
|
||||
let peer_id = 10101;
|
||||
let req_id = ReqId(14426);
|
||||
|
||||
harness.inject_peer(peer_id, Peer {
|
||||
status: dummy_status(),
|
||||
capabilities: dummy_capabilities(),
|
||||
});
|
||||
|
||||
let header = Header::default();
|
||||
let encoded = header.encoded();
|
||||
|
||||
let recv = harness.service.request_raw(
|
||||
&Context::NoOp,
|
||||
vec![
|
||||
request::HeaderByHash(header.hash().into()).into(),
|
||||
request::BlockReceipts(HeaderRef::Unresolved(0, header.hash().into())).into(),
|
||||
]
|
||||
).unwrap();
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 1);
|
||||
|
||||
harness.service.dispatch_pending(&Context::RequestFrom(peer_id, req_id));
|
||||
|
||||
assert_eq!(harness.service.pending.read().len(), 0);
|
||||
|
||||
harness.service.on_responses(
|
||||
&Context::WithPeer(peer_id),
|
||||
req_id,
|
||||
&[
|
||||
Response::Headers(basic_request::HeadersResponse { headers: vec![encoded] }),
|
||||
]
|
||||
);
|
||||
|
||||
assert!(recv.wait().is_ok());
|
||||
}
|
||||
@@ -1,410 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! A provider for the PIP protocol. This is typically a full node, who can
|
||||
//! give as much data as necessary to its peers.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use ethcore::blockchain_info::BlockChainInfo;
|
||||
use ethcore::client::{BlockChainClient, ProvingBlockChainClient, ChainInfo, BlockInfo as ClientBlockInfo};
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::encoded;
|
||||
use ethereum_types::H256;
|
||||
use parking_lot::RwLock;
|
||||
use transaction::PendingTransaction;
|
||||
|
||||
use cht::{self, BlockInfo};
|
||||
use client::{LightChainClient, AsLightClient};
|
||||
use transaction_queue::TransactionQueue;
|
||||
|
||||
use request;
|
||||
|
||||
/// Maximum allowed size of a headers request.
|
||||
pub const MAX_HEADERS_PER_REQUEST: u64 = 512;
|
||||
|
||||
/// Defines the operations that a provider for the light subprotocol must fulfill.
|
||||
pub trait Provider: Send + Sync {
|
||||
/// Provide current blockchain info.
|
||||
fn chain_info(&self) -> BlockChainInfo;
|
||||
|
||||
/// Find the depth of a common ancestor between two blocks.
|
||||
/// If either block is unknown or an ancestor can't be found
|
||||
/// then return `None`.
|
||||
fn reorg_depth(&self, a: &H256, b: &H256) -> Option<u64>;
|
||||
|
||||
/// Earliest block where state queries are available.
|
||||
/// If `None`, no state queries are servable.
|
||||
fn earliest_state(&self) -> Option<u64>;
|
||||
|
||||
/// Provide a list of headers starting at the requested block,
|
||||
/// possibly in reverse and skipping `skip` at a time.
|
||||
///
|
||||
/// The returned vector may have any length in the range [0, `max`], but the
|
||||
/// results within must adhere to the `skip` and `reverse` parameters.
|
||||
fn block_headers(&self, req: request::CompleteHeadersRequest) -> Option<request::HeadersResponse> {
|
||||
use request::HashOrNumber;
|
||||
|
||||
if req.max == 0 { return None }
|
||||
|
||||
let best_num = self.chain_info().best_block_number;
|
||||
let start_num = match req.start {
|
||||
HashOrNumber::Number(start_num) => start_num,
|
||||
HashOrNumber::Hash(hash) => match self.block_header(BlockId::Hash(hash)) {
|
||||
None => {
|
||||
trace!(target: "pip_provider", "Unknown block hash {} requested", hash);
|
||||
return None;
|
||||
}
|
||||
Some(header) => {
|
||||
let num = header.number();
|
||||
let canon_hash = self.block_header(BlockId::Number(num))
|
||||
.map(|h| h.hash());
|
||||
|
||||
if req.max == 1 || canon_hash != Some(hash) {
|
||||
// Non-canonical header or single header requested.
|
||||
return Some(::request::HeadersResponse {
|
||||
headers: vec![header],
|
||||
})
|
||||
}
|
||||
|
||||
num
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let max = ::std::cmp::min(MAX_HEADERS_PER_REQUEST, req.max);
|
||||
|
||||
let headers: Vec<_> = (0_u64..max)
|
||||
.map(|x: u64| x.saturating_mul(req.skip.saturating_add(1)))
|
||||
.take_while(|&x| if req.reverse { x < start_num } else { best_num.saturating_sub(start_num) >= x })
|
||||
.map(|x| if req.reverse { start_num.saturating_sub(x) } else { start_num.saturating_add(x) })
|
||||
.map(|x| self.block_header(BlockId::Number(x)))
|
||||
.take_while(|x| x.is_some())
|
||||
.flat_map(|x| x)
|
||||
.collect();
|
||||
|
||||
if headers.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(::request::HeadersResponse { headers })
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a block header by id.
|
||||
fn block_header(&self, id: BlockId) -> Option<encoded::Header>;
|
||||
|
||||
/// Get a transaction index by hash.
|
||||
fn transaction_index(&self, req: request::CompleteTransactionIndexRequest)
|
||||
-> Option<request::TransactionIndexResponse>;
|
||||
|
||||
/// Fulfill a block body request.
|
||||
fn block_body(&self, req: request::CompleteBodyRequest) -> Option<request::BodyResponse>;
|
||||
|
||||
/// Fulfill a request for block receipts.
|
||||
fn block_receipts(&self, req: request::CompleteReceiptsRequest) -> Option<request::ReceiptsResponse>;
|
||||
|
||||
/// Get an account proof.
|
||||
fn account_proof(&self, req: request::CompleteAccountRequest) -> Option<request::AccountResponse>;
|
||||
|
||||
/// Get a storage proof.
|
||||
fn storage_proof(&self, req: request::CompleteStorageRequest) -> Option<request::StorageResponse>;
|
||||
|
||||
/// Provide contract code for the specified (block_hash, code_hash) pair.
|
||||
fn contract_code(&self, req: request::CompleteCodeRequest) -> Option<request::CodeResponse>;
|
||||
|
||||
/// Provide a header proof from a given Canonical Hash Trie as well as the
|
||||
/// corresponding header.
|
||||
fn header_proof(&self, req: request::CompleteHeaderProofRequest) -> Option<request::HeaderProofResponse>;
|
||||
|
||||
/// Provide pending transactions.
|
||||
fn transactions_to_propagate(&self) -> Vec<PendingTransaction>;
|
||||
|
||||
/// Provide a proof-of-execution for the given transaction proof request.
|
||||
/// Returns a vector of all state items necessary to execute the transaction.
|
||||
fn transaction_proof(&self, req: request::CompleteExecutionRequest) -> Option<request::ExecutionResponse>;
|
||||
|
||||
/// Provide epoch signal data at given block hash. This should be just the
|
||||
fn epoch_signal(&self, req: request::CompleteSignalRequest) -> Option<request::SignalResponse>;
|
||||
}
|
||||
|
||||
// Implementation of a light client data provider for a client.
|
||||
impl<T: ProvingBlockChainClient + ?Sized> Provider for T {
|
||||
fn chain_info(&self) -> BlockChainInfo {
|
||||
ChainInfo::chain_info(self)
|
||||
}
|
||||
|
||||
fn reorg_depth(&self, a: &H256, b: &H256) -> Option<u64> {
|
||||
self.tree_route(a, b).map(|route| route.index as u64)
|
||||
}
|
||||
|
||||
fn earliest_state(&self) -> Option<u64> {
|
||||
Some(self.pruning_info().earliest_state)
|
||||
}
|
||||
|
||||
fn block_header(&self, id: BlockId) -> Option<encoded::Header> {
|
||||
ClientBlockInfo::block_header(self, id)
|
||||
}
|
||||
|
||||
fn transaction_index(&self, req: request::CompleteTransactionIndexRequest)
|
||||
-> Option<request::TransactionIndexResponse>
|
||||
{
|
||||
use ethcore::ids::TransactionId;
|
||||
|
||||
self.transaction_receipt(TransactionId::Hash(req.hash)).map(|receipt| request::TransactionIndexResponse {
|
||||
num: receipt.block_number,
|
||||
hash: receipt.block_hash,
|
||||
index: receipt.transaction_index as u64,
|
||||
})
|
||||
}
|
||||
|
||||
fn block_body(&self, req: request::CompleteBodyRequest) -> Option<request::BodyResponse> {
|
||||
BlockChainClient::block_body(self, BlockId::Hash(req.hash))
|
||||
.map(|body| ::request::BodyResponse { body })
|
||||
}
|
||||
|
||||
fn block_receipts(&self, req: request::CompleteReceiptsRequest) -> Option<request::ReceiptsResponse> {
|
||||
BlockChainClient::block_receipts(self, &req.hash)
|
||||
.map(|x| ::request::ReceiptsResponse { receipts: ::rlp::decode_list(&x) })
|
||||
}
|
||||
|
||||
fn account_proof(&self, req: request::CompleteAccountRequest) -> Option<request::AccountResponse> {
|
||||
self.prove_account(req.address_hash, BlockId::Hash(req.block_hash)).map(|(proof, acc)| {
|
||||
::request::AccountResponse {
|
||||
proof,
|
||||
nonce: acc.nonce,
|
||||
balance: acc.balance,
|
||||
code_hash: acc.code_hash,
|
||||
storage_root: acc.storage_root,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn storage_proof(&self, req: request::CompleteStorageRequest) -> Option<request::StorageResponse> {
|
||||
self.prove_storage(req.address_hash, req.key_hash, BlockId::Hash(req.block_hash)).map(|(proof, item) | {
|
||||
::request::StorageResponse {
|
||||
proof,
|
||||
value: item,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn contract_code(&self, req: request::CompleteCodeRequest) -> Option<request::CodeResponse> {
|
||||
self.state_data(&req.code_hash)
|
||||
.map(|code| ::request::CodeResponse { code })
|
||||
}
|
||||
|
||||
fn header_proof(&self, req: request::CompleteHeaderProofRequest) -> Option<request::HeaderProofResponse> {
|
||||
let cht_number = match cht::block_to_cht_number(req.num) {
|
||||
Some(cht_num) => cht_num,
|
||||
None => {
|
||||
debug!(target: "pip_provider", "Requested CHT proof with invalid block number");
|
||||
return None;
|
||||
}
|
||||
};
|
||||
|
||||
let mut needed = None;
|
||||
|
||||
// build the CHT, caching the requested header as we pass through it.
|
||||
let cht = {
|
||||
let block_info = |id| {
|
||||
let hdr = self.block_header(id);
|
||||
let td = self.block_total_difficulty(id);
|
||||
|
||||
match (hdr, td) {
|
||||
(Some(hdr), Some(td)) => {
|
||||
let info = BlockInfo {
|
||||
hash: hdr.hash(),
|
||||
parent_hash: hdr.parent_hash(),
|
||||
total_difficulty: td,
|
||||
};
|
||||
|
||||
if hdr.number() == req.num {
|
||||
needed = Some((hdr, td));
|
||||
}
|
||||
|
||||
Some(info)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
};
|
||||
|
||||
match cht::build(cht_number, block_info) {
|
||||
Some(cht) => cht,
|
||||
None => return None, // incomplete CHT.
|
||||
}
|
||||
};
|
||||
|
||||
let (needed_hdr, needed_td) = needed.expect("`needed` always set in loop, number checked before; qed");
|
||||
|
||||
// prove our result.
|
||||
match cht.prove(req.num, 0) {
|
||||
Ok(Some(proof)) => Some(::request::HeaderProofResponse {
|
||||
proof,
|
||||
hash: needed_hdr.hash(),
|
||||
td: needed_td,
|
||||
}),
|
||||
Ok(None) => None,
|
||||
Err(e) => {
|
||||
debug!(target: "pip_provider", "Error looking up number in freshly-created CHT: {}", e);
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn transaction_proof(&self, req: request::CompleteExecutionRequest) -> Option<request::ExecutionResponse> {
|
||||
use transaction::Transaction;
|
||||
|
||||
let id = BlockId::Hash(req.block_hash);
|
||||
let nonce = match self.nonce(&req.from, id) {
|
||||
Some(nonce) => nonce,
|
||||
None => return None,
|
||||
};
|
||||
let transaction = Transaction {
|
||||
nonce,
|
||||
gas: req.gas,
|
||||
gas_price: req.gas_price,
|
||||
action: req.action,
|
||||
value: req.value,
|
||||
data: req.data,
|
||||
}.fake_sign(req.from);
|
||||
|
||||
self.prove_transaction(transaction, id)
|
||||
.map(|(_, proof)| ::request::ExecutionResponse { items: proof })
|
||||
}
|
||||
|
||||
fn transactions_to_propagate(&self) -> Vec<PendingTransaction> {
|
||||
BlockChainClient::transactions_to_propagate(self)
|
||||
.into_iter()
|
||||
.map(|tx| tx.pending().clone())
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn epoch_signal(&self, req: request::CompleteSignalRequest) -> Option<request::SignalResponse> {
|
||||
self.epoch_signal(req.block_hash).map(|signal| request::SignalResponse {
|
||||
signal,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/// The light client "provider" implementation. This wraps a `LightClient` and
|
||||
/// a light transaction queue.
|
||||
pub struct LightProvider<L> {
|
||||
client: Arc<L>,
|
||||
txqueue: Arc<RwLock<TransactionQueue>>,
|
||||
}
|
||||
|
||||
impl<L> LightProvider<L> {
|
||||
/// Create a new `LightProvider` from the given client and transaction queue.
|
||||
pub fn new(client: Arc<L>, txqueue: Arc<RwLock<TransactionQueue>>) -> Self {
|
||||
LightProvider {
|
||||
client,
|
||||
txqueue,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: draw from cache (shared between this and the RPC layer)
|
||||
impl<L: AsLightClient + Send + Sync> Provider for LightProvider<L> {
|
||||
fn chain_info(&self) -> BlockChainInfo {
|
||||
self.client.as_light_client().chain_info()
|
||||
}
|
||||
|
||||
fn reorg_depth(&self, _a: &H256, _b: &H256) -> Option<u64> {
|
||||
None
|
||||
}
|
||||
|
||||
fn earliest_state(&self) -> Option<u64> {
|
||||
None
|
||||
}
|
||||
|
||||
fn block_header(&self, id: BlockId) -> Option<encoded::Header> {
|
||||
self.client.as_light_client().block_header(id)
|
||||
}
|
||||
|
||||
fn transaction_index(&self, _req: request::CompleteTransactionIndexRequest)
|
||||
-> Option<request::TransactionIndexResponse>
|
||||
{
|
||||
None
|
||||
}
|
||||
|
||||
fn block_body(&self, _req: request::CompleteBodyRequest) -> Option<request::BodyResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn block_receipts(&self, _req: request::CompleteReceiptsRequest) -> Option<request::ReceiptsResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn account_proof(&self, _req: request::CompleteAccountRequest) -> Option<request::AccountResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn storage_proof(&self, _req: request::CompleteStorageRequest) -> Option<request::StorageResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn contract_code(&self, _req: request::CompleteCodeRequest) -> Option<request::CodeResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn header_proof(&self, _req: request::CompleteHeaderProofRequest) -> Option<request::HeaderProofResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn transaction_proof(&self, _req: request::CompleteExecutionRequest) -> Option<request::ExecutionResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn epoch_signal(&self, _req: request::CompleteSignalRequest) -> Option<request::SignalResponse> {
|
||||
None
|
||||
}
|
||||
|
||||
fn transactions_to_propagate(&self) -> Vec<PendingTransaction> {
|
||||
let chain_info = self.chain_info();
|
||||
self.txqueue.read()
|
||||
.ready_transactions(chain_info.best_block_number, chain_info.best_block_timestamp)
|
||||
}
|
||||
}
|
||||
|
||||
impl<L: AsLightClient> AsLightClient for LightProvider<L> {
|
||||
type Client = L::Client;
|
||||
|
||||
fn as_light_client(&self) -> &L::Client {
|
||||
self.client.as_light_client()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ethcore::client::{EachBlockWith, TestBlockChainClient};
|
||||
use super::Provider;
|
||||
|
||||
#[test]
|
||||
fn cht_proof() {
|
||||
let client = TestBlockChainClient::new();
|
||||
client.add_blocks(2000, EachBlockWith::Nothing);
|
||||
|
||||
let req = ::request::CompleteHeaderProofRequest {
|
||||
num: 1500,
|
||||
};
|
||||
|
||||
assert!(client.header_proof(req.clone()).is_none());
|
||||
|
||||
client.add_blocks(48, EachBlockWith::Nothing);
|
||||
|
||||
assert!(client.header_proof(req.clone()).is_some());
|
||||
}
|
||||
}
|
||||
@@ -1,561 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Light Transaction Queue.
|
||||
//!
|
||||
//! Manages local transactions,
|
||||
//! but stores all local transactions, removing only on invalidated nonce.
|
||||
//!
|
||||
//! Under the assumption that light nodes will have a relatively limited set of
|
||||
//! accounts for which they create transactions, this queue is structured in an
|
||||
//! address-wise manner.
|
||||
|
||||
use std::fmt;
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::collections::hash_map::Entry;
|
||||
|
||||
use transaction::{self, Condition, PendingTransaction, SignedTransaction};
|
||||
use ethereum_types::{H256, U256, Address};
|
||||
use fastmap::H256FastMap;
|
||||
|
||||
// Knowledge of an account's current nonce.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
enum CurrentNonce {
|
||||
// Assumed current nonce.
|
||||
Assumed(U256),
|
||||
// Known current nonce.
|
||||
Known(U256),
|
||||
}
|
||||
|
||||
impl CurrentNonce {
|
||||
// whether this nonce is assumed
|
||||
fn is_assumed(&self) -> bool {
|
||||
match *self {
|
||||
CurrentNonce::Assumed(_) => true,
|
||||
CurrentNonce::Known(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
// whether this nonce is known for certain from an external source.
|
||||
fn is_known(&self) -> bool {
|
||||
!self.is_assumed()
|
||||
}
|
||||
|
||||
// the current nonce's value.
|
||||
fn value(&self) -> &U256 {
|
||||
match *self {
|
||||
CurrentNonce::Assumed(ref val) => val,
|
||||
CurrentNonce::Known(ref val) => val,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
struct TransactionInfo {
|
||||
hash: H256,
|
||||
nonce: U256,
|
||||
condition: Option<Condition>,
|
||||
}
|
||||
|
||||
impl<'a> From<&'a PendingTransaction> for TransactionInfo {
|
||||
fn from(tx: &'a PendingTransaction) -> Self {
|
||||
TransactionInfo {
|
||||
hash: tx.hash(),
|
||||
nonce: tx.nonce,
|
||||
condition: tx.condition.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// transactions associated with a specific account.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
struct AccountTransactions {
|
||||
// believed current nonce (gotten from initial given TX or `cull` calls).
|
||||
cur_nonce: CurrentNonce,
|
||||
current: Vec<TransactionInfo>, // ordered "current" transactions (cur_nonce onwards)
|
||||
future: BTreeMap<U256, TransactionInfo>, // "future" transactions.
|
||||
}
|
||||
|
||||
impl AccountTransactions {
|
||||
fn is_empty(&self) -> bool {
|
||||
self.current.is_empty() && self.future.is_empty()
|
||||
}
|
||||
|
||||
fn next_nonce(&self) -> U256 {
|
||||
self.current.last().map(|last| last.nonce + 1)
|
||||
.unwrap_or_else(|| *self.cur_nonce.value())
|
||||
}
|
||||
|
||||
// attempt to move transactions from the future queue into the current queue.
|
||||
fn adjust_future(&mut self) -> Vec<H256> {
|
||||
let mut promoted = Vec::new();
|
||||
let mut next_nonce = self.next_nonce();
|
||||
|
||||
while let Some(tx) = self.future.remove(&next_nonce) {
|
||||
promoted.push(tx.hash);
|
||||
self.current.push(tx);
|
||||
next_nonce = next_nonce + 1;
|
||||
}
|
||||
|
||||
promoted
|
||||
}
|
||||
}
|
||||
|
||||
/// Transaction import result.
|
||||
pub enum ImportDestination {
|
||||
/// Transaction has been imported to the current queue.
|
||||
///
|
||||
/// It's going to be propagated to peers.
|
||||
Current,
|
||||
/// Transaction has been imported to future queue.
|
||||
///
|
||||
/// It means it won't be propagated until the gap is filled.
|
||||
Future,
|
||||
}
|
||||
|
||||
type Listener = Box<Fn(&[H256]) + Send + Sync>;
|
||||
|
||||
/// Light transaction queue. See module docs for more details.
|
||||
#[derive(Default)]
|
||||
pub struct TransactionQueue {
|
||||
by_account: HashMap<Address, AccountTransactions>,
|
||||
by_hash: H256FastMap<PendingTransaction>,
|
||||
listeners: Vec<Listener>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for TransactionQueue {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt.debug_struct("TransactionQueue")
|
||||
.field("by_account", &self.by_account)
|
||||
.field("by_hash", &self.by_hash)
|
||||
.field("listeners", &self.listeners.len())
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl TransactionQueue {
|
||||
/// Import a pending transaction to be queued.
|
||||
pub fn import(&mut self, tx: PendingTransaction) -> Result<ImportDestination, transaction::Error> {
|
||||
let sender = tx.sender();
|
||||
let hash = tx.hash();
|
||||
let nonce = tx.nonce;
|
||||
let tx_info = TransactionInfo::from(&tx);
|
||||
|
||||
if self.by_hash.contains_key(&hash) { return Err(transaction::Error::AlreadyImported) }
|
||||
|
||||
let (res, promoted) = match self.by_account.entry(sender) {
|
||||
Entry::Vacant(entry) => {
|
||||
entry.insert(AccountTransactions {
|
||||
cur_nonce: CurrentNonce::Assumed(nonce),
|
||||
current: vec![tx_info],
|
||||
future: BTreeMap::new(),
|
||||
});
|
||||
|
||||
(ImportDestination::Current, vec![hash])
|
||||
}
|
||||
Entry::Occupied(mut entry) => {
|
||||
let acct_txs = entry.get_mut();
|
||||
if nonce < *acct_txs.cur_nonce.value() {
|
||||
// don't accept txs from before known current nonce.
|
||||
if acct_txs.cur_nonce.is_known() {
|
||||
return Err(transaction::Error::Old)
|
||||
}
|
||||
|
||||
// lower our assumption until corrected later.
|
||||
acct_txs.cur_nonce = CurrentNonce::Assumed(nonce);
|
||||
}
|
||||
|
||||
match acct_txs.current.binary_search_by(|x| x.nonce.cmp(&nonce)) {
|
||||
Ok(idx) => {
|
||||
trace!(target: "txqueue", "Replacing existing transaction from {} with nonce {}",
|
||||
sender, nonce);
|
||||
|
||||
let old = ::std::mem::replace(&mut acct_txs.current[idx], tx_info);
|
||||
self.by_hash.remove(&old.hash);
|
||||
|
||||
(ImportDestination::Current, vec![hash])
|
||||
}
|
||||
Err(idx) => {
|
||||
let cur_len = acct_txs.current.len();
|
||||
let incr_nonce = nonce + 1;
|
||||
|
||||
// current is sorted with one tx per nonce,
|
||||
// so if a tx with given nonce wasn't found that means it is either
|
||||
// earlier in nonce than all other "current" transactions or later.
|
||||
assert!(idx == 0 || idx == cur_len);
|
||||
|
||||
if idx == 0 && acct_txs.current.first().map_or(false, |f| f.nonce != incr_nonce) {
|
||||
let old_cur = ::std::mem::replace(&mut acct_txs.current, vec![tx_info]);
|
||||
|
||||
trace!(target: "txqueue", "Moving {} transactions with nonce > {} to future",
|
||||
old_cur.len(), incr_nonce);
|
||||
|
||||
for future in old_cur {
|
||||
let future_nonce = future.nonce;
|
||||
acct_txs.future.insert(future_nonce, future);
|
||||
}
|
||||
|
||||
(ImportDestination::Current, vec![hash])
|
||||
} else if idx == cur_len && acct_txs.current.last().map_or(false, |f| f.nonce + 1 != nonce) {
|
||||
trace!(target: "txqueue", "Queued future transaction for {}, nonce={}", sender, nonce);
|
||||
let future_nonce = nonce;
|
||||
acct_txs.future.insert(future_nonce, tx_info);
|
||||
|
||||
(ImportDestination::Future, vec![])
|
||||
} else {
|
||||
trace!(target: "txqueue", "Queued current transaction for {}, nonce={}", sender, nonce);
|
||||
|
||||
// insert, then check if we've filled any gaps.
|
||||
acct_txs.current.insert(idx, tx_info);
|
||||
let mut promoted = acct_txs.adjust_future();
|
||||
promoted.insert(0, hash);
|
||||
|
||||
(ImportDestination::Current, promoted)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
self.by_hash.insert(hash, tx);
|
||||
self.notify(&promoted);
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
/// Get pending transaction by hash.
|
||||
pub fn transaction(&self, hash: &H256) -> Option<SignedTransaction> {
|
||||
self.by_hash.get(hash).map(|tx| (&**tx).clone())
|
||||
}
|
||||
|
||||
/// Get the next nonce for a given address based on what's within the queue.
|
||||
/// If the address has no queued transactions, then `None` will be returned
|
||||
/// and the next nonce will have to be deduced via other means.
|
||||
pub fn next_nonce(&self, address: &Address) -> Option<U256> {
|
||||
self.by_account.get(address).map(AccountTransactions::next_nonce)
|
||||
}
|
||||
|
||||
/// Get all transactions ready to be propagated.
|
||||
/// `best_block_number` and `best_block_timestamp` are used to filter out conditionally
|
||||
/// propagated transactions.
|
||||
///
|
||||
/// Returned transactions are batched by sender, in order of ascending nonce.
|
||||
pub fn ready_transactions(&self, best_block_number: u64, best_block_timestamp: u64) -> Vec<PendingTransaction> {
|
||||
self.by_account.values()
|
||||
.flat_map(|acct_txs| {
|
||||
acct_txs.current.iter().take_while(|tx| match tx.condition {
|
||||
None => true,
|
||||
Some(Condition::Number(blk_num)) => blk_num <= best_block_number,
|
||||
Some(Condition::Timestamp(time)) => time <= best_block_timestamp,
|
||||
}).map(|info| info.hash)
|
||||
})
|
||||
.filter_map(|hash| match self.by_hash.get(&hash) {
|
||||
Some(tx) => Some(tx.clone()),
|
||||
None => {
|
||||
warn!(target: "txqueue", "Inconsistency detected between `by_hash` and `by_account`: {} not stored.",
|
||||
hash);
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Get all transactions not ready to be propagated.
|
||||
/// `best_block_number` and `best_block_timestamp` are used to filter out conditionally
|
||||
/// propagated transactions.
|
||||
///
|
||||
/// Returned transactions are batched by sender, in order of ascending nonce.
|
||||
pub fn future_transactions(&self, best_block_number: u64, best_block_timestamp: u64) -> Vec<PendingTransaction> {
|
||||
self.by_account.values()
|
||||
.flat_map(|acct_txs| {
|
||||
acct_txs.current.iter().skip_while(|tx| match tx.condition {
|
||||
None => true,
|
||||
Some(Condition::Number(blk_num)) => blk_num <= best_block_number,
|
||||
Some(Condition::Timestamp(time)) => time <= best_block_timestamp,
|
||||
}).chain(acct_txs.future.values()).map(|info| info.hash)
|
||||
})
|
||||
.filter_map(|hash| match self.by_hash.get(&hash) {
|
||||
Some(tx) => Some(tx.clone()),
|
||||
None => {
|
||||
warn!(target: "txqueue", "Inconsistency detected between `by_hash` and `by_account`: {} not stored.",
|
||||
hash);
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Addresses for which we store transactions.
|
||||
pub fn queued_senders(&self) -> Vec<Address> {
|
||||
self.by_account.keys().cloned().collect()
|
||||
}
|
||||
|
||||
/// Cull out all transactions by the given address which are invalidated by the given nonce.
|
||||
pub fn cull(&mut self, address: Address, cur_nonce: U256) {
|
||||
let mut removed_hashes = vec![];
|
||||
if let Entry::Occupied(mut entry) = self.by_account.entry(address) {
|
||||
{
|
||||
let acct_txs = entry.get_mut();
|
||||
acct_txs.cur_nonce = CurrentNonce::Known(cur_nonce);
|
||||
|
||||
// cull old "future" keys.
|
||||
let old_future: Vec<_> = acct_txs.future.keys().take_while(|&&k| k < cur_nonce).cloned().collect();
|
||||
|
||||
for old in old_future {
|
||||
let hash = acct_txs.future.remove(&old)
|
||||
.expect("key extracted from keys iterator; known to exist; qed")
|
||||
.hash;
|
||||
removed_hashes.push(hash);
|
||||
}
|
||||
|
||||
// then cull from "current".
|
||||
let valid_pos = acct_txs.current.iter().position(|tx| tx.nonce >= cur_nonce);
|
||||
match valid_pos {
|
||||
None =>
|
||||
removed_hashes.extend(acct_txs.current.drain(..).map(|tx| tx.hash)),
|
||||
Some(valid) =>
|
||||
removed_hashes.extend(acct_txs.current.drain(..valid).map(|tx| tx.hash)),
|
||||
}
|
||||
|
||||
// now try and move stuff out of future into current.
|
||||
acct_txs.adjust_future();
|
||||
}
|
||||
|
||||
if entry.get_mut().is_empty() {
|
||||
trace!(target: "txqueue", "No more queued transactions for {} after nonce {}",
|
||||
address, cur_nonce);
|
||||
entry.remove();
|
||||
}
|
||||
}
|
||||
|
||||
trace!(target: "txqueue", "Culled {} old transactions from sender {} (nonce={})",
|
||||
removed_hashes.len(), address, cur_nonce);
|
||||
|
||||
for hash in removed_hashes {
|
||||
self.by_hash.remove(&hash);
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a transaction by hash.
|
||||
pub fn get(&self, hash: &H256) -> Option<&PendingTransaction> {
|
||||
self.by_hash.get(&hash)
|
||||
}
|
||||
|
||||
/// Add a transaction queue listener.
|
||||
pub fn add_listener(&mut self, f: Listener) {
|
||||
self.listeners.push(f);
|
||||
}
|
||||
|
||||
/// Notifies all listeners about new pending transaction.
|
||||
fn notify(&self, hashes: &[H256]) {
|
||||
for listener in &self.listeners {
|
||||
listener(hashes)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::TransactionQueue;
|
||||
use ethereum_types::Address;
|
||||
use transaction::{Transaction, PendingTransaction, Condition};
|
||||
|
||||
#[test]
|
||||
fn queued_senders() {
|
||||
let sender = Address::default();
|
||||
let mut txq = TransactionQueue::default();
|
||||
let tx = Transaction::default().fake_sign(sender);
|
||||
|
||||
txq.import(tx.into()).unwrap();
|
||||
|
||||
assert_eq!(txq.queued_senders(), vec![sender]);
|
||||
|
||||
txq.cull(sender, 1.into());
|
||||
|
||||
assert_eq!(txq.queued_senders(), vec![]);
|
||||
assert!(txq.by_hash.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn next_nonce() {
|
||||
let sender = Address::default();
|
||||
let mut txq = TransactionQueue::default();
|
||||
|
||||
for i in (0..5).chain(10..15) {
|
||||
let mut tx = Transaction::default();
|
||||
tx.nonce = i.into();
|
||||
|
||||
let tx = tx.fake_sign(sender);
|
||||
|
||||
txq.import(tx.into()).unwrap();
|
||||
}
|
||||
|
||||
// current: 0..5, future: 10..15
|
||||
assert_eq!(txq.ready_transactions(0, 0).len(), 5);
|
||||
assert_eq!(txq.next_nonce(&sender).unwrap(), 5.into());
|
||||
|
||||
txq.cull(sender, 8.into());
|
||||
|
||||
// current: empty, future: 10..15
|
||||
assert_eq!(txq.ready_transactions(0, 0).len(), 0);
|
||||
assert_eq!(txq.next_nonce(&sender).unwrap(), 8.into());
|
||||
|
||||
txq.cull(sender, 10.into());
|
||||
|
||||
// current: 10..15, future: empty
|
||||
assert_eq!(txq.ready_transactions(0, 0).len(), 5);
|
||||
assert_eq!(txq.next_nonce(&sender).unwrap(), 15.into());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn current_to_future() {
|
||||
let sender = Address::default();
|
||||
let mut txq = TransactionQueue::default();
|
||||
|
||||
for i in 5..10 {
|
||||
let mut tx = Transaction::default();
|
||||
tx.nonce = i.into();
|
||||
|
||||
let tx = tx.fake_sign(sender);
|
||||
|
||||
txq.import(tx.into()).unwrap();
|
||||
}
|
||||
|
||||
assert_eq!(txq.ready_transactions(0, 0).len(), 5);
|
||||
assert_eq!(txq.next_nonce(&sender).unwrap(), 10.into());
|
||||
|
||||
for i in 0..3 {
|
||||
let mut tx = Transaction::default();
|
||||
tx.nonce = i.into();
|
||||
|
||||
let tx = tx.fake_sign(sender);
|
||||
|
||||
txq.import(tx.into()).unwrap();
|
||||
}
|
||||
|
||||
assert_eq!(txq.ready_transactions(0, 0).len(), 3);
|
||||
assert_eq!(txq.next_nonce(&sender).unwrap(), 3.into());
|
||||
|
||||
for i in 3..5 {
|
||||
let mut tx = Transaction::default();
|
||||
tx.nonce = i.into();
|
||||
|
||||
let tx = tx.fake_sign(sender);
|
||||
|
||||
txq.import(tx.into()).unwrap();
|
||||
}
|
||||
|
||||
assert_eq!(txq.ready_transactions(0, 0).len(), 10);
|
||||
assert_eq!(txq.next_nonce(&sender).unwrap(), 10.into());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn conditional() {
|
||||
let mut txq = TransactionQueue::default();
|
||||
let sender = Address::default();
|
||||
|
||||
for i in 0..5 {
|
||||
let mut tx = Transaction::default();
|
||||
tx.nonce = i.into();
|
||||
let tx = tx.fake_sign(sender);
|
||||
|
||||
txq.import(match i {
|
||||
3 => PendingTransaction::new(tx, Some(Condition::Number(100))),
|
||||
4 => PendingTransaction::new(tx, Some(Condition::Timestamp(1234))),
|
||||
_ => tx.into(),
|
||||
}).unwrap();
|
||||
}
|
||||
|
||||
assert_eq!(txq.ready_transactions(0, 0).len(), 3);
|
||||
assert_eq!(txq.ready_transactions(0, 1234).len(), 3);
|
||||
assert_eq!(txq.ready_transactions(100, 0).len(), 4);
|
||||
assert_eq!(txq.ready_transactions(100, 1234).len(), 5);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cull_from_future() {
|
||||
let sender = Address::default();
|
||||
let mut txq = TransactionQueue::default();
|
||||
|
||||
for i in (0..1).chain(3..10) {
|
||||
let mut tx = Transaction::default();
|
||||
tx.nonce = i.into();
|
||||
|
||||
let tx = tx.fake_sign(sender);
|
||||
|
||||
txq.import(tx.into()).unwrap();
|
||||
}
|
||||
|
||||
txq.cull(sender, 6.into());
|
||||
|
||||
assert_eq!(txq.ready_transactions(0, 0).len(), 4);
|
||||
assert_eq!(txq.next_nonce(&sender).unwrap(), 10.into());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn import_old() {
|
||||
let sender = Address::default();
|
||||
let mut txq = TransactionQueue::default();
|
||||
|
||||
let mut tx_a = Transaction::default();
|
||||
tx_a.nonce = 3.into();
|
||||
|
||||
let mut tx_b = Transaction::default();
|
||||
tx_b.nonce = 2.into();
|
||||
|
||||
txq.import(tx_a.fake_sign(sender).into()).unwrap();
|
||||
txq.cull(sender, 3.into());
|
||||
|
||||
assert!(txq.import(tx_b.fake_sign(sender).into()).is_err())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn replace_is_removed() {
|
||||
let sender = Address::default();
|
||||
let mut txq = TransactionQueue::default();
|
||||
|
||||
let tx_b: PendingTransaction = Transaction::default().fake_sign(sender).into();
|
||||
let tx_a: PendingTransaction = {
|
||||
let mut tx_a = Transaction::default();
|
||||
tx_a.gas_price = tx_b.gas_price + 1;
|
||||
tx_a.fake_sign(sender).into()
|
||||
};
|
||||
|
||||
let hash = tx_a.hash();
|
||||
|
||||
txq.import(tx_a).unwrap();
|
||||
txq.import(tx_b).unwrap();
|
||||
|
||||
assert!(txq.transaction(&hash).is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn future_transactions() {
|
||||
let sender = Address::default();
|
||||
let mut txq = TransactionQueue::default();
|
||||
|
||||
for i in (0..1).chain(3..10) {
|
||||
let mut tx = Transaction::default();
|
||||
tx.nonce = i.into();
|
||||
|
||||
let tx = tx.fake_sign(sender);
|
||||
|
||||
txq.import(tx.into()).unwrap();
|
||||
}
|
||||
|
||||
assert_eq!(txq.future_transactions(0, 0).len(), 7);
|
||||
assert_eq!(txq.next_nonce(&sender).unwrap(), 1.into());
|
||||
}
|
||||
}
|
||||
@@ -1,258 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Request chain builder utility.
|
||||
//! Push requests with `push`. Back-references and data required to verify responses must be
|
||||
//! supplied as well.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use request::{
|
||||
IncompleteRequest, OutputKind, Output, NoSuchOutput, ResponseError, ResponseLike,
|
||||
};
|
||||
|
||||
/// Build chained requests. Push them onto the series with `push`,
|
||||
/// and produce a `Batch` object with `build`. Outputs are checked for consistency.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Builder<T> {
|
||||
output_kinds: HashMap<(usize, usize), OutputKind>,
|
||||
requests: Vec<T>,
|
||||
}
|
||||
|
||||
impl<T> Default for Builder<T> {
|
||||
fn default() -> Self {
|
||||
Builder {
|
||||
output_kinds: HashMap::new(),
|
||||
requests: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: IncompleteRequest> Builder<T> {
|
||||
/// Attempt to push a request onto the request chain. Fails if the request
|
||||
/// references a non-existent output of a prior request.
|
||||
pub fn push(&mut self, request: T) -> Result<(), NoSuchOutput> {
|
||||
request.check_outputs(|req, idx, kind| {
|
||||
match self.output_kinds.get(&(req, idx)) {
|
||||
Some(k) if k == &kind => Ok(()),
|
||||
_ => Err(NoSuchOutput),
|
||||
}
|
||||
})?;
|
||||
let req_idx = self.requests.len();
|
||||
request.note_outputs(|idx, kind| { self.output_kinds.insert((req_idx, idx), kind); });
|
||||
self.requests.push(request);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Get a reference to the output kinds map.
|
||||
pub fn output_kinds(&self) -> &HashMap<(usize, usize), OutputKind> {
|
||||
&self.output_kinds
|
||||
}
|
||||
|
||||
/// Convert this into a "batch" object.
|
||||
pub fn build(self) -> Batch<T> {
|
||||
Batch {
|
||||
outputs: HashMap::new(),
|
||||
requests: self.requests,
|
||||
answered: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Requests pending responses.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Batch<T> {
|
||||
outputs: HashMap<(usize, usize), Output>,
|
||||
requests: Vec<T>,
|
||||
answered: usize,
|
||||
}
|
||||
|
||||
impl<T> Batch<T> {
|
||||
/// Get access to the underlying slice of requests.
|
||||
// TODO: unimplemented -> Vec<Request>, // do we _have to_ allocate?
|
||||
pub fn requests(&self) -> &[T] { &self.requests }
|
||||
|
||||
/// Get the number of answered requests.
|
||||
pub fn num_answered(&self) -> usize { self.answered }
|
||||
|
||||
/// Whether the batch is complete.
|
||||
pub fn is_complete(&self) -> bool {
|
||||
self.answered == self.requests.len()
|
||||
}
|
||||
|
||||
/// Map requests from one type into another.
|
||||
pub fn map_requests<F, U>(self, f: F) -> Batch<U>
|
||||
where F: FnMut(T) -> U, U: IncompleteRequest
|
||||
{
|
||||
Batch {
|
||||
outputs: self.outputs,
|
||||
requests: self.requests.into_iter().map(f).collect(),
|
||||
answered: self.answered,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: IncompleteRequest + Clone> Batch<T> {
|
||||
/// Get the next request as a filled request. Returns `None` when all requests answered.
|
||||
pub fn next_complete(&self) -> Option<T::Complete> {
|
||||
if self.is_complete() {
|
||||
None
|
||||
} else {
|
||||
Some(self.requests[self.answered].clone()
|
||||
.complete()
|
||||
.expect("All outputs checked as invariant of `Batch` object; qed"))
|
||||
}
|
||||
}
|
||||
|
||||
/// Sweep through all unanswered requests, filling them as necessary.
|
||||
pub fn fill_unanswered(&mut self) {
|
||||
let outputs = &mut self.outputs;
|
||||
|
||||
for req in self.requests.iter_mut().skip(self.answered) {
|
||||
req.fill(|req_idx, out_idx| outputs.get(&(req_idx, out_idx)).cloned().ok_or(NoSuchOutput))
|
||||
}
|
||||
}
|
||||
|
||||
/// Supply a response, asserting its correctness.
|
||||
/// Fill outputs based upon it.
|
||||
pub fn supply_response_unchecked<R: ResponseLike>(&mut self, response: &R) {
|
||||
if self.is_complete() { return }
|
||||
|
||||
let outputs = &mut self.outputs;
|
||||
let idx = self.answered;
|
||||
response.fill_outputs(|out_idx, output| {
|
||||
// we don't need to check output kinds here because all back-references
|
||||
// are validated in the builder.
|
||||
// TODO: optimization for only storing outputs we "care about"?
|
||||
outputs.insert((idx, out_idx), output);
|
||||
});
|
||||
|
||||
self.answered += 1;
|
||||
|
||||
// fill as much of the next request as we can.
|
||||
if let Some(ref mut req) = self.requests.get_mut(self.answered) {
|
||||
req.fill(|req_idx, out_idx| outputs.get(&(req_idx, out_idx)).cloned().ok_or(NoSuchOutput))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: super::CheckedRequest + Clone> Batch<T> {
|
||||
/// Supply a response for the next request.
|
||||
/// Fails on: wrong request kind, all requests answered already.
|
||||
pub fn supply_response(&mut self, env: &T::Environment, response: &T::Response)
|
||||
-> Result<T::Extract, ResponseError<T::Error>>
|
||||
{
|
||||
let idx = self.answered;
|
||||
|
||||
// check validity.
|
||||
if idx == self.requests.len() { return Err(ResponseError::Unexpected) }
|
||||
let completed = self.next_complete()
|
||||
.expect("only fails when all requests have been answered; this just checked against; qed");
|
||||
|
||||
let extracted = self.requests[idx]
|
||||
.check_response(&completed, env, response).map_err(ResponseError::Validity)?;
|
||||
|
||||
self.supply_response_unchecked(response);
|
||||
Ok(extracted)
|
||||
}
|
||||
}
|
||||
|
||||
impl Batch<super::Request> {
|
||||
/// For each request, produce a response.
|
||||
/// The responses vector produced goes up to the point where the responder
|
||||
/// first returns `None`, an invalid response, or until all requests have been responded to.
|
||||
pub fn respond_to_all<F>(mut self, responder: F) -> Vec<super::Response>
|
||||
where F: Fn(super::CompleteRequest) -> Option<super::Response>
|
||||
{
|
||||
let mut responses = Vec::new();
|
||||
|
||||
while let Some(response) = self.next_complete().and_then(&responder) {
|
||||
match self.supply_response(&(), &response) {
|
||||
Ok(()) => responses.push(response),
|
||||
Err(e) => {
|
||||
debug!(target: "pip", "produced bad response to request: {:?}", e);
|
||||
return responses;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
responses
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: IncompleteRequest> Deref for Batch<T> {
|
||||
type Target = [T];
|
||||
|
||||
fn deref(&self) -> &[T] {
|
||||
&self.requests[..]
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: IncompleteRequest> DerefMut for Batch<T> {
|
||||
fn deref_mut(&mut self) -> &mut [T] {
|
||||
&mut self.requests[..]
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use request::*;
|
||||
use super::Builder;
|
||||
use ethereum_types::H256;
|
||||
|
||||
#[test]
|
||||
fn all_scalar() {
|
||||
let mut builder = Builder::default();
|
||||
builder.push(Request::HeaderProof(IncompleteHeaderProofRequest {
|
||||
num: 100.into(),
|
||||
})).unwrap();
|
||||
builder.push(Request::Receipts(IncompleteReceiptsRequest {
|
||||
hash: H256::default().into(),
|
||||
})).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn missing_backref() {
|
||||
let mut builder = Builder::default();
|
||||
builder.push(Request::HeaderProof(IncompleteHeaderProofRequest {
|
||||
num: Field::BackReference(100, 3),
|
||||
})).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn wrong_kind() {
|
||||
let mut builder = Builder::default();
|
||||
assert!(builder.push(Request::HeaderProof(IncompleteHeaderProofRequest {
|
||||
num: 100.into(),
|
||||
})).is_ok());
|
||||
builder.push(Request::HeaderProof(IncompleteHeaderProofRequest {
|
||||
num: Field::BackReference(0, 0),
|
||||
})).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn good_backreference() {
|
||||
let mut builder = Builder::default();
|
||||
builder.push(Request::HeaderProof(IncompleteHeaderProofRequest {
|
||||
num: 100.into(), // header proof puts hash at output 0.
|
||||
})).unwrap();
|
||||
builder.push(Request::Receipts(IncompleteReceiptsRequest {
|
||||
hash: Field::BackReference(0, 0),
|
||||
})).unwrap();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
[package]
|
||||
description = "Parity smart network connections"
|
||||
homepage = "http://parity.io"
|
||||
license = "GPL-3.0"
|
||||
name = "node-filter"
|
||||
version = "1.12.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
ethcore = { path = ".."}
|
||||
ethcore-network = { path = "../../util/network" }
|
||||
ethcore-network-devp2p = { path = "../../util/network-devp2p" }
|
||||
ethereum-types = "0.4"
|
||||
log = "0.4"
|
||||
parking_lot = "0.6"
|
||||
ethabi = "5.1.2"
|
||||
ethabi-derive = "5.1.3"
|
||||
ethabi-contract = "5.1.1"
|
||||
lru-cache = "0.1"
|
||||
|
||||
[dev-dependencies]
|
||||
ethcore = { path = "..", features = ["test-helpers"] }
|
||||
kvdb-memorydb = "0.1"
|
||||
ethcore-io = { path = "../../util/io" }
|
||||
tempdir = "0.3"
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"name": "TestNodeFilterContract",
|
||||
"engine": {
|
||||
"authorityRound": {
|
||||
"params": {
|
||||
"stepDuration": 1,
|
||||
"startStep": 2,
|
||||
"validators": {
|
||||
"contract": "0x0000000000000000000000000000000000000005"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"accountStartNonce": "0x0",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x69",
|
||||
"gasLimitBoundDivisor": "0x0400"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"generic": "0xc180"
|
||||
},
|
||||
"difficulty": "0x20000",
|
||||
"author": "0x0000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"extraData": "0x",
|
||||
"gasLimit": "0x222222"
|
||||
},
|
||||
"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": {
|
||||
"balance": "1",
|
||||
"constructor": "6060604052341561000f57600080fd5b5b6012600102600080601160010260001916815260200190815260200160002081600019169055506022600102600080602160010260001916815260200190815260200160002081600019169055506032600102600080603160010260001916815260200190815260200160002081600019169055506042600102600080604160010260001916815260200190815260200160002081600019169055505b5b610155806100bd6000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063994d790a1461003e575b600080fd5b341561004957600080fd5b61008a6004808035600019169060200190919080356000191690602001909190803560001916906020019091908035600019169060200190919050506100a4565b604051808215151515815260200191505060405180910390f35b60006001800285600019161480156100c3575060026001028460001916145b156100d15760019050610121565b60006001028360001916141580156100f157506000600102826000191614155b801561011e5750816000191660008085600019166000191681526020019081526020016000205460001916145b90505b9493505050505600a165627a7a723058202082b8d8667fd397925f39785d8e804540beda0524d28af15921375145dfcc250029"
|
||||
},
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e": { "balance": "1606938044258990275541962092341162602522202993782792835301376" },
|
||||
"0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1": { "balance": "1606938044258990275541962092341162602522202993782792835301376" }
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
[{"constant":true,"inputs":[{"name":"sl","type":"bytes32"},{"name":"sh","type":"bytes32"},{"name":"pl","type":"bytes32"},{"name":"ph","type":"bytes32"}],"name":"connectionAllowed","outputs":[{"name":"res","type":"bool"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"}]
|
||||
@@ -1,152 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Smart contract based node filter.
|
||||
|
||||
extern crate ethabi;
|
||||
extern crate ethcore;
|
||||
extern crate ethcore_network as network;
|
||||
extern crate ethcore_network_devp2p as devp2p;
|
||||
extern crate ethereum_types;
|
||||
extern crate lru_cache;
|
||||
extern crate parking_lot;
|
||||
|
||||
#[macro_use]
|
||||
extern crate ethabi_derive;
|
||||
#[macro_use]
|
||||
extern crate ethabi_contract;
|
||||
#[cfg(test)]
|
||||
extern crate ethcore_io as io;
|
||||
#[cfg(test)]
|
||||
extern crate kvdb_memorydb;
|
||||
#[cfg(test)]
|
||||
extern crate tempdir;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
use std::sync::Weak;
|
||||
|
||||
use lru_cache::LruCache;
|
||||
use parking_lot::Mutex;
|
||||
|
||||
use ethcore::client::{BlockChainClient, BlockId};
|
||||
use ethereum_types::{H256, Address};
|
||||
use network::{ConnectionFilter, ConnectionDirection};
|
||||
use devp2p::NodeId;
|
||||
|
||||
use_contract!(peer_set, "PeerSet", "res/peer_set.json");
|
||||
|
||||
const MAX_CACHE_SIZE: usize = 4096;
|
||||
|
||||
/// Connection filter that uses a contract to manage permissions.
|
||||
pub struct NodeFilter {
|
||||
contract: peer_set::PeerSet,
|
||||
client: Weak<BlockChainClient>,
|
||||
contract_address: Address,
|
||||
permission_cache: Mutex<LruCache<(H256, NodeId), bool>>,
|
||||
}
|
||||
|
||||
impl NodeFilter {
|
||||
/// Create a new instance. Accepts a contract address.
|
||||
pub fn new(client: Weak<BlockChainClient>, contract_address: Address) -> NodeFilter {
|
||||
NodeFilter {
|
||||
contract: peer_set::PeerSet::default(),
|
||||
client,
|
||||
contract_address,
|
||||
permission_cache: Mutex::new(LruCache::new(MAX_CACHE_SIZE)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ConnectionFilter for NodeFilter {
|
||||
fn connection_allowed(&self, own_id: &NodeId, connecting_id: &NodeId, _direction: ConnectionDirection) -> bool {
|
||||
let client = match self.client.upgrade() {
|
||||
Some(client) => client,
|
||||
None => return false,
|
||||
};
|
||||
|
||||
let block_hash = match client.block_hash(BlockId::Latest) {
|
||||
Some(block_hash) => block_hash,
|
||||
None => return false,
|
||||
};
|
||||
|
||||
let key = (block_hash, *connecting_id);
|
||||
|
||||
let mut cache = self.permission_cache.lock();
|
||||
if let Some(res) = cache.get_mut(&key) {
|
||||
return *res;
|
||||
}
|
||||
|
||||
let address = self.contract_address;
|
||||
let own_low = H256::from_slice(&own_id[0..32]);
|
||||
let own_high = H256::from_slice(&own_id[32..64]);
|
||||
let id_low = H256::from_slice(&connecting_id[0..32]);
|
||||
let id_high = H256::from_slice(&connecting_id[32..64]);
|
||||
|
||||
let allowed = self.contract.functions()
|
||||
.connection_allowed()
|
||||
.call(own_low, own_high, id_low, id_high, &|data| client.call_contract(BlockId::Latest, address, data))
|
||||
.unwrap_or_else(|e| {
|
||||
debug!("Error callling peer set contract: {:?}", e);
|
||||
false
|
||||
});
|
||||
|
||||
cache.insert(key, allowed);
|
||||
allowed
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::sync::{Arc, Weak};
|
||||
use ethcore::spec::Spec;
|
||||
use ethcore::client::{BlockChainClient, Client, ClientConfig};
|
||||
use ethcore::miner::Miner;
|
||||
use ethcore::test_helpers;
|
||||
use network::{ConnectionDirection, ConnectionFilter, NodeId};
|
||||
use io::IoChannel;
|
||||
use super::NodeFilter;
|
||||
use tempdir::TempDir;
|
||||
|
||||
/// Contract code: https://gist.github.com/arkpar/467dbcc73cbb85b0997a7a10ffa0695f
|
||||
#[test]
|
||||
fn node_filter() {
|
||||
let contract_addr = "0000000000000000000000000000000000000005".into();
|
||||
let data = include_bytes!("../res/node_filter.json");
|
||||
let tempdir = TempDir::new("").unwrap();
|
||||
let spec = Spec::load(&tempdir.path(), &data[..]).unwrap();
|
||||
let client_db = test_helpers::new_db();
|
||||
|
||||
let client = Client::new(
|
||||
ClientConfig::default(),
|
||||
&spec,
|
||||
client_db,
|
||||
Arc::new(Miner::new_for_tests(&spec, None)),
|
||||
IoChannel::disconnected(),
|
||||
).unwrap();
|
||||
let filter = NodeFilter::new(Arc::downgrade(&client) as Weak<BlockChainClient>, contract_addr);
|
||||
let self1: NodeId = "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002".into();
|
||||
let self2: NodeId = "00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003".into();
|
||||
let node1: NodeId = "00000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000000000000000000000000000000000000012".into();
|
||||
let node2: NodeId = "00000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000022".into();
|
||||
let nodex: NodeId = "77000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000".into();
|
||||
|
||||
assert!(filter.connection_allowed(&self1, &node1, ConnectionDirection::Inbound));
|
||||
assert!(filter.connection_allowed(&self1, &nodex, ConnectionDirection::Inbound));
|
||||
assert!(filter.connection_allowed(&self2, &node1, ConnectionDirection::Inbound));
|
||||
assert!(filter.connection_allowed(&self2, &node2, ConnectionDirection::Inbound));
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
[package]
|
||||
description = "Parity Private Transactions"
|
||||
name = "ethcore-private-tx"
|
||||
version = "1.0.0"
|
||||
license = "GPL-3.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = { version = "0.12", default-features = false }
|
||||
ethabi = "5.1.2"
|
||||
ethabi-derive = "5.1.3"
|
||||
ethabi-contract = "5.1.1"
|
||||
ethcore = { path = ".." }
|
||||
parity-bytes = "0.1"
|
||||
parity-crypto = "0.1"
|
||||
ethcore-io = { path = "../../util/io" }
|
||||
ethcore-logger = { path = "../../logger" }
|
||||
ethcore-miner = { path = "../../miner" }
|
||||
ethcore-transaction = { path = "../transaction" }
|
||||
ethereum-types = "0.4"
|
||||
ethjson = { path = "../../json" }
|
||||
ethkey = { path = "../../ethkey" }
|
||||
fetch = { path = "../../util/fetch" }
|
||||
futures = "0.1"
|
||||
heapsize = "0.4"
|
||||
keccak-hash = "0.1.2"
|
||||
log = "0.4"
|
||||
parking_lot = "0.6"
|
||||
patricia-trie = "0.2"
|
||||
patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" }
|
||||
rand = "0.3"
|
||||
rlp = { version = "0.2.4", features = ["ethereum"] }
|
||||
rlp_derive = { path = "../../util/rlp_derive" }
|
||||
rustc-hex = "1.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
tiny-keccak = "1.4"
|
||||
transaction-pool = "1.13.2"
|
||||
url = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
ethcore = { path = "..", features = ["test-helpers"] }
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
[{"constant": false,"inputs": [{"name": "newState","type": "bytes"},{"name": "v","type": "uint8[]"},{"name": "r","type": "bytes32[]"},{"name": "s","type": "bytes32[]"}],"name": "setState","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [],"name": "code","outputs": [{"name": "","type": "bytes"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "","type": "uint256"}],"name": "validators","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "nonce","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "getValidators","outputs": [{"name": "","type": "address[]"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "state","outputs": [{"name": "","type": "bytes"}],"payable": false,"stateMutability": "view","type": "function"},{"inputs": [{"name": "initialValidators","type": "address[]"},{"name": "initialCode","type": "bytes"},{"name": "initialState","type": "bytes"}],"payable": false,"stateMutability": "nonpayable","type": "constructor"}]
|
||||
@@ -1,276 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Encryption providers.
|
||||
|
||||
use std::io::Read;
|
||||
use std::str::FromStr;
|
||||
use std::iter::repeat;
|
||||
use std::time::{Instant, Duration};
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry;
|
||||
use parking_lot::Mutex;
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethereum_types::{H128, H256, Address};
|
||||
use ethjson;
|
||||
use ethkey::{Signature, Password, Public};
|
||||
use crypto;
|
||||
use futures::Future;
|
||||
use fetch::{Fetch, Client as FetchClient, Method, BodyReader, Request};
|
||||
use bytes::{Bytes, ToPretty};
|
||||
use error::{Error, ErrorKind};
|
||||
use url::Url;
|
||||
use super::find_account_password;
|
||||
|
||||
/// Initialization vector length.
|
||||
const INIT_VEC_LEN: usize = 16;
|
||||
|
||||
/// Duration of storing retrieved keys (in ms)
|
||||
const ENCRYPTION_SESSION_DURATION: u64 = 30 * 1000;
|
||||
|
||||
/// Trait for encryption/decryption operations.
|
||||
pub trait Encryptor: Send + Sync + 'static {
|
||||
/// Generate unique contract key && encrypt passed data. Encryption can only be performed once.
|
||||
fn encrypt(
|
||||
&self,
|
||||
contract_address: &Address,
|
||||
accounts: &AccountProvider,
|
||||
initialisation_vector: &H128,
|
||||
plain_data: &[u8],
|
||||
) -> Result<Bytes, Error>;
|
||||
|
||||
/// Decrypt data using previously generated contract key.
|
||||
fn decrypt(
|
||||
&self,
|
||||
contract_address: &Address,
|
||||
accounts: &AccountProvider,
|
||||
cypher: &[u8],
|
||||
) -> Result<Bytes, Error>;
|
||||
}
|
||||
|
||||
/// Configurtion for key server encryptor
|
||||
#[derive(Default, PartialEq, Debug, Clone)]
|
||||
pub struct EncryptorConfig {
|
||||
/// URL to key server
|
||||
pub base_url: Option<String>,
|
||||
/// Key server's threshold
|
||||
pub threshold: u32,
|
||||
/// Account used for signing requests to key server
|
||||
pub key_server_account: Option<Address>,
|
||||
/// Passwords used to unlock accounts
|
||||
pub passwords: Vec<Password>,
|
||||
}
|
||||
|
||||
struct EncryptionSession {
|
||||
key: Bytes,
|
||||
end_time: Instant,
|
||||
}
|
||||
|
||||
/// SecretStore-based encryption/decryption operations.
|
||||
pub struct SecretStoreEncryptor {
|
||||
config: EncryptorConfig,
|
||||
client: FetchClient,
|
||||
sessions: Mutex<HashMap<Address, EncryptionSession>>,
|
||||
}
|
||||
|
||||
impl SecretStoreEncryptor {
|
||||
/// Create new encryptor
|
||||
pub fn new(config: EncryptorConfig, client: FetchClient) -> Result<Self, Error> {
|
||||
Ok(SecretStoreEncryptor {
|
||||
config,
|
||||
client,
|
||||
sessions: Mutex::default(),
|
||||
})
|
||||
}
|
||||
|
||||
/// Ask secret store for key && decrypt the key.
|
||||
fn retrieve_key(
|
||||
&self,
|
||||
url_suffix: &str,
|
||||
use_post: bool,
|
||||
contract_address: &Address,
|
||||
accounts: &AccountProvider,
|
||||
) -> Result<Bytes, Error> {
|
||||
// check if the key was already cached
|
||||
if let Some(key) = self.obtained_key(contract_address) {
|
||||
return Ok(key);
|
||||
}
|
||||
let contract_address_signature = self.sign_contract_address(contract_address, accounts)?;
|
||||
let requester = self.config.key_server_account.ok_or_else(|| ErrorKind::KeyServerAccountNotSet)?;
|
||||
|
||||
// key id in SS is H256 && we have H160 here => expand with assitional zeros
|
||||
let contract_address_extended: H256 = contract_address.into();
|
||||
let base_url = self.config.base_url.clone().ok_or_else(|| ErrorKind::KeyServerNotSet)?;
|
||||
|
||||
// prepare request url
|
||||
let url = format!("{}/{}/{}{}",
|
||||
base_url,
|
||||
contract_address_extended.to_hex(),
|
||||
contract_address_signature,
|
||||
url_suffix,
|
||||
);
|
||||
|
||||
// send HTTP request
|
||||
let method = if use_post {
|
||||
Method::Post
|
||||
} else {
|
||||
Method::Get
|
||||
};
|
||||
|
||||
let url = Url::from_str(&url).map_err(|e| ErrorKind::Encrypt(e.to_string()))?;
|
||||
let response = self.client.fetch(Request::new(url, method), Default::default()).wait()
|
||||
.map_err(|e| ErrorKind::Encrypt(e.to_string()))?;
|
||||
|
||||
if response.is_not_found() {
|
||||
bail!(ErrorKind::EncryptionKeyNotFound(*contract_address));
|
||||
}
|
||||
|
||||
if !response.is_success() {
|
||||
bail!(ErrorKind::Encrypt(response.status().canonical_reason().unwrap_or("unknown").into()));
|
||||
}
|
||||
|
||||
// read HTTP response
|
||||
let mut result = String::new();
|
||||
BodyReader::new(response).read_to_string(&mut result)?;
|
||||
|
||||
// response is JSON string (which is, in turn, hex-encoded, encrypted Public)
|
||||
let encrypted_bytes: ethjson::bytes::Bytes = result.trim_matches('\"').parse().map_err(|e| ErrorKind::Encrypt(e))?;
|
||||
let password = find_account_password(&self.config.passwords, &*accounts, &requester);
|
||||
|
||||
// decrypt Public
|
||||
let decrypted_bytes = accounts.decrypt(requester, password, &crypto::DEFAULT_MAC, &encrypted_bytes)?;
|
||||
let decrypted_key = Public::from_slice(&decrypted_bytes);
|
||||
|
||||
// and now take x coordinate of Public as a key
|
||||
let key: Bytes = (*decrypted_key)[..INIT_VEC_LEN].into();
|
||||
|
||||
// cache the key in the session and clear expired sessions
|
||||
self.sessions.lock().insert(*contract_address, EncryptionSession{
|
||||
key: key.clone(),
|
||||
end_time: Instant::now() + Duration::from_millis(ENCRYPTION_SESSION_DURATION),
|
||||
});
|
||||
self.clean_expired_sessions();
|
||||
Ok(key)
|
||||
}
|
||||
|
||||
fn clean_expired_sessions(&self) {
|
||||
let mut sessions = self.sessions.lock();
|
||||
sessions.retain(|_, session| session.end_time < Instant::now());
|
||||
}
|
||||
|
||||
fn obtained_key(&self, contract_address: &Address) -> Option<Bytes> {
|
||||
let mut sessions = self.sessions.lock();
|
||||
let stored_session = sessions.entry(*contract_address);
|
||||
match stored_session {
|
||||
Entry::Occupied(session) => {
|
||||
if Instant::now() > session.get().end_time {
|
||||
session.remove_entry();
|
||||
None
|
||||
} else {
|
||||
Some(session.get().key.clone())
|
||||
}
|
||||
}
|
||||
Entry::Vacant(_) => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn sign_contract_address(&self, contract_address: &Address, accounts: &AccountProvider) -> Result<Signature, Error> {
|
||||
// key id in SS is H256 && we have H160 here => expand with assitional zeros
|
||||
let contract_address_extended: H256 = contract_address.into();
|
||||
let key_server_account = self.config.key_server_account.ok_or_else(|| ErrorKind::KeyServerAccountNotSet)?;
|
||||
let password = find_account_password(&self.config.passwords, accounts, &key_server_account);
|
||||
Ok(accounts.sign(key_server_account, password, H256::from_slice(&contract_address_extended))?)
|
||||
}
|
||||
}
|
||||
|
||||
impl Encryptor for SecretStoreEncryptor {
|
||||
fn encrypt(
|
||||
&self,
|
||||
contract_address: &Address,
|
||||
accounts: &AccountProvider,
|
||||
initialisation_vector: &H128,
|
||||
plain_data: &[u8],
|
||||
) -> Result<Bytes, Error> {
|
||||
// retrieve the key, try to generate it if it doesn't exist yet
|
||||
let key = match self.retrieve_key("", false, contract_address, &*accounts) {
|
||||
Ok(key) => Ok(key),
|
||||
Err(Error(ErrorKind::EncryptionKeyNotFound(_), _)) => {
|
||||
trace!(target: "privatetx", "Key for account wasnt found in sstore. Creating. Address: {:?}", contract_address);
|
||||
self.retrieve_key(&format!("/{}", self.config.threshold), true, contract_address, &*accounts)
|
||||
}
|
||||
Err(err) => Err(err),
|
||||
}?;
|
||||
|
||||
// encrypt data
|
||||
let mut cypher = Vec::with_capacity(plain_data.len() + initialisation_vector.len());
|
||||
cypher.extend(repeat(0).take(plain_data.len()));
|
||||
crypto::aes::encrypt_128_ctr(&key, initialisation_vector, plain_data, &mut cypher)
|
||||
.map_err(|e| ErrorKind::Encrypt(e.to_string()))?;
|
||||
cypher.extend_from_slice(&initialisation_vector);
|
||||
|
||||
Ok(cypher)
|
||||
}
|
||||
|
||||
/// Decrypt data using previously generated contract key.
|
||||
fn decrypt(
|
||||
&self,
|
||||
contract_address: &Address,
|
||||
accounts: &AccountProvider,
|
||||
cypher: &[u8],
|
||||
) -> Result<Bytes, Error> {
|
||||
// initialization vector takes INIT_VEC_LEN bytes
|
||||
let cypher_len = cypher.len();
|
||||
if cypher_len < INIT_VEC_LEN {
|
||||
bail!(ErrorKind::Decrypt("Invalid cypher".into()));
|
||||
}
|
||||
|
||||
// retrieve existing key
|
||||
let key = self.retrieve_key("", false, contract_address, accounts)?;
|
||||
|
||||
// use symmetric decryption to decrypt document
|
||||
let (cypher, iv) = cypher.split_at(cypher_len - INIT_VEC_LEN);
|
||||
let mut plain_data = Vec::with_capacity(cypher_len - INIT_VEC_LEN);
|
||||
plain_data.extend(repeat(0).take(cypher_len - INIT_VEC_LEN));
|
||||
crypto::aes::decrypt_128_ctr(&key, &iv, cypher, &mut plain_data)
|
||||
.map_err(|e| ErrorKind::Decrypt(e.to_string()))?;
|
||||
Ok(plain_data)
|
||||
}
|
||||
}
|
||||
|
||||
/// Dummy encryptor.
|
||||
#[derive(Default)]
|
||||
pub struct NoopEncryptor;
|
||||
|
||||
impl Encryptor for NoopEncryptor {
|
||||
fn encrypt(
|
||||
&self,
|
||||
_contract_address: &Address,
|
||||
_accounts: &AccountProvider,
|
||||
_initialisation_vector: &H128,
|
||||
data: &[u8],
|
||||
) -> Result<Bytes, Error> {
|
||||
Ok(data.to_vec())
|
||||
}
|
||||
|
||||
fn decrypt(
|
||||
&self,
|
||||
_contract_address: &Address,
|
||||
_accounts: &AccountProvider,
|
||||
data: &[u8],
|
||||
) -> Result<Bytes, Error> {
|
||||
Ok(data.to_vec())
|
||||
}
|
||||
}
|
||||
@@ -1,209 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use ethereum_types::Address;
|
||||
use rlp::DecoderError;
|
||||
use ethtrie::TrieError;
|
||||
use ethcore::account_provider::SignError;
|
||||
use ethcore::error::{Error as EthcoreError, ExecutionError};
|
||||
use transaction::Error as TransactionError;
|
||||
use ethkey::Error as KeyError;
|
||||
use txpool::Error as TxPoolError;
|
||||
|
||||
error_chain! {
|
||||
foreign_links {
|
||||
Io(::std::io::Error) #[doc = "Error concerning the Rust standard library's IO subsystem."];
|
||||
Decoder(DecoderError) #[doc = "RLP decoding error."];
|
||||
Trie(TrieError) #[doc = "Error concerning TrieDBs."];
|
||||
Txpool(TxPoolError) #[doc = "Tx pool error."];
|
||||
}
|
||||
|
||||
errors {
|
||||
#[doc = "Encryption error."]
|
||||
Encrypt(err: String) {
|
||||
description("Encryption error"),
|
||||
display("Encryption error. ({})", err),
|
||||
}
|
||||
|
||||
#[doc = "Decryption error."]
|
||||
Decrypt(err: String) {
|
||||
description("Decryption error"),
|
||||
display("Decryption error. ({})", err),
|
||||
}
|
||||
|
||||
#[doc = "Address not authorized."]
|
||||
NotAuthorised(address: Address) {
|
||||
description("Address not authorized"),
|
||||
display("Private transaction execution is not authorised for {}", address),
|
||||
}
|
||||
|
||||
#[doc = "Transaction creates more than one contract."]
|
||||
TooManyContracts {
|
||||
description("Transaction creates more than one contract."),
|
||||
display("Private transaction created too many contracts"),
|
||||
}
|
||||
|
||||
#[doc = "Contract call error."]
|
||||
Call(err: String) {
|
||||
description("Contract call error."),
|
||||
display("Contract call error. ({})", err),
|
||||
}
|
||||
|
||||
#[doc = "State is not available."]
|
||||
StatePruned {
|
||||
description("State is not available."),
|
||||
display("State is not available"),
|
||||
}
|
||||
|
||||
#[doc = "State is incorrect."]
|
||||
StateIncorrect {
|
||||
description("State is incorrect."),
|
||||
display("State is incorrect"),
|
||||
}
|
||||
|
||||
#[doc = "Wrong private transaction type."]
|
||||
BadTransactonType {
|
||||
description("Wrong private transaction type."),
|
||||
display("Wrong private transaction type"),
|
||||
}
|
||||
|
||||
#[doc = "Contract does not exist or was not created."]
|
||||
ContractDoesNotExist {
|
||||
description("Contract does not exist or was not created."),
|
||||
display("Contract does not exist or was not created"),
|
||||
}
|
||||
|
||||
#[doc = "Reference to the client is corrupted."]
|
||||
ClientIsMalformed {
|
||||
description("Reference to the client is corrupted."),
|
||||
display("Reference to the client is corrupted"),
|
||||
}
|
||||
|
||||
#[doc = "Queue of private transactions for verification is full."]
|
||||
QueueIsFull {
|
||||
description("Queue of private transactions for verification is full."),
|
||||
display("Queue of private transactions for verification is full"),
|
||||
}
|
||||
|
||||
#[doc = "The transaction already exists in queue of private transactions."]
|
||||
PrivateTransactionAlreadyImported {
|
||||
description("The transaction already exists in queue of private transactions."),
|
||||
display("The transaction already exists in queue of private transactions."),
|
||||
}
|
||||
|
||||
#[doc = "The information about private transaction is not found in the store."]
|
||||
PrivateTransactionNotFound {
|
||||
description("The information about private transaction is not found in the store."),
|
||||
display("The information about private transaction is not found in the store."),
|
||||
}
|
||||
|
||||
#[doc = "Account for signing public transactions not set."]
|
||||
SignerAccountNotSet {
|
||||
description("Account for signing public transactions not set."),
|
||||
display("Account for signing public transactions not set."),
|
||||
}
|
||||
|
||||
#[doc = "Account for validating private transactions not set."]
|
||||
ValidatorAccountNotSet {
|
||||
description("Account for validating private transactions not set."),
|
||||
display("Account for validating private transactions not set."),
|
||||
}
|
||||
|
||||
#[doc = "Account for signing requests to key server not set."]
|
||||
KeyServerAccountNotSet {
|
||||
description("Account for signing requests to key server not set."),
|
||||
display("Account for signing requests to key server not set."),
|
||||
}
|
||||
|
||||
#[doc = "Encryption key is not found on key server."]
|
||||
EncryptionKeyNotFound(address: Address) {
|
||||
description("Encryption key is not found on key server"),
|
||||
display("Encryption key is not found on key server for {}", address),
|
||||
}
|
||||
|
||||
#[doc = "Key server URL is not set."]
|
||||
KeyServerNotSet {
|
||||
description("Key server URL is not set."),
|
||||
display("Key server URL is not set."),
|
||||
}
|
||||
|
||||
#[doc = "VM execution error."]
|
||||
Execution(err: ExecutionError) {
|
||||
description("VM execution error."),
|
||||
display("VM execution error {}", err),
|
||||
}
|
||||
|
||||
#[doc = "General signing error."]
|
||||
Key(err: KeyError) {
|
||||
description("General signing error."),
|
||||
display("General signing error {}", err),
|
||||
}
|
||||
|
||||
#[doc = "Account provider signing error."]
|
||||
Sign(err: SignError) {
|
||||
description("Account provider signing error."),
|
||||
display("Account provider signing error {}", err),
|
||||
}
|
||||
|
||||
#[doc = "Error of transactions processing."]
|
||||
Transaction(err: TransactionError) {
|
||||
description("Error of transactions processing."),
|
||||
display("Error of transactions processing {}", err),
|
||||
}
|
||||
|
||||
#[doc = "General ethcore error."]
|
||||
Ethcore(err: EthcoreError) {
|
||||
description("General ethcore error."),
|
||||
display("General ethcore error {}", err),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<SignError> for Error {
|
||||
fn from(err: SignError) -> Self {
|
||||
ErrorKind::Sign(err).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<KeyError> for Error {
|
||||
fn from(err: KeyError) -> Self {
|
||||
ErrorKind::Key(err).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ExecutionError> for Error {
|
||||
fn from(err: ExecutionError) -> Self {
|
||||
ErrorKind::Execution(err).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<TransactionError> for Error {
|
||||
fn from(err: TransactionError) -> Self {
|
||||
ErrorKind::Transaction(err).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<EthcoreError> for Error {
|
||||
fn from(err: EthcoreError) -> Self {
|
||||
ErrorKind::Ethcore(err).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl<E> From<Box<E>> for Error where Error: From<E> {
|
||||
fn from(err: Box<E>) -> Error {
|
||||
Error::from(*err)
|
||||
}
|
||||
}
|
||||
@@ -1,706 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Private transactions module.
|
||||
|
||||
// Recursion limit required because of
|
||||
// error_chain foreign_links.
|
||||
#![recursion_limit="256"]
|
||||
|
||||
mod encryptor;
|
||||
mod private_transactions;
|
||||
mod messages;
|
||||
mod error;
|
||||
|
||||
extern crate ethcore;
|
||||
extern crate parity_bytes as bytes;
|
||||
extern crate parity_crypto as crypto;
|
||||
extern crate ethcore_io as io;
|
||||
extern crate ethcore_miner;
|
||||
extern crate ethcore_transaction as transaction;
|
||||
extern crate ethabi;
|
||||
extern crate ethereum_types;
|
||||
extern crate ethkey;
|
||||
extern crate ethjson;
|
||||
extern crate fetch;
|
||||
extern crate futures;
|
||||
extern crate heapsize;
|
||||
extern crate keccak_hash as hash;
|
||||
extern crate parking_lot;
|
||||
extern crate patricia_trie as trie;
|
||||
extern crate transaction_pool as txpool;
|
||||
extern crate patricia_trie_ethereum as ethtrie;
|
||||
extern crate rlp;
|
||||
extern crate url;
|
||||
extern crate rustc_hex;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate ethabi_derive;
|
||||
#[macro_use]
|
||||
extern crate ethabi_contract;
|
||||
#[macro_use]
|
||||
extern crate error_chain;
|
||||
#[macro_use]
|
||||
extern crate rlp_derive;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate rand;
|
||||
#[cfg(test)]
|
||||
extern crate ethcore_logger;
|
||||
|
||||
pub use encryptor::{Encryptor, SecretStoreEncryptor, EncryptorConfig, NoopEncryptor};
|
||||
pub use private_transactions::{VerifiedPrivateTransaction, VerificationStore, PrivateTransactionSigningDesc, SigningStore};
|
||||
pub use messages::{PrivateTransaction, SignedPrivateTransaction};
|
||||
pub use error::{Error, ErrorKind};
|
||||
|
||||
use std::sync::{Arc, Weak};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::time::Duration;
|
||||
use ethereum_types::{H128, H256, U256, Address};
|
||||
use hash::keccak;
|
||||
use rlp::*;
|
||||
use parking_lot::RwLock;
|
||||
use bytes::Bytes;
|
||||
use ethkey::{Signature, recover, public_to_address};
|
||||
use io::IoChannel;
|
||||
use ethcore::executive::{Executive, TransactOptions};
|
||||
use ethcore::executed::{Executed};
|
||||
use transaction::{SignedTransaction, Transaction, Action, UnverifiedTransaction};
|
||||
use ethcore::{contract_address as ethcore_contract_address};
|
||||
use ethcore::client::{
|
||||
Client, ChainNotify, ChainRoute, ChainMessageType, ClientIoMessage, BlockId, CallContract
|
||||
};
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::miner::{self, Miner, MinerService, pool_client::NonceCache};
|
||||
use ethcore::trace::{Tracer, VMTracer};
|
||||
use rustc_hex::FromHex;
|
||||
use ethkey::Password;
|
||||
|
||||
// Source avaiable at https://github.com/parity-contracts/private-tx/blob/master/contracts/PrivateContract.sol
|
||||
const DEFAULT_STUB_CONTRACT: &'static str = include_str!("../res/private.evm");
|
||||
|
||||
use_contract!(private, "PrivateContract", "res/private.json");
|
||||
|
||||
/// Initialization vector length.
|
||||
const INIT_VEC_LEN: usize = 16;
|
||||
|
||||
/// Size of nonce cache
|
||||
const NONCE_CACHE_SIZE: usize = 128;
|
||||
|
||||
/// Configurtion for private transaction provider
|
||||
#[derive(Default, PartialEq, Debug, Clone)]
|
||||
pub struct ProviderConfig {
|
||||
/// Accounts that can be used for validation
|
||||
pub validator_accounts: Vec<Address>,
|
||||
/// Account used for signing public transactions created from private transactions
|
||||
pub signer_account: Option<Address>,
|
||||
/// Passwords used to unlock accounts
|
||||
pub passwords: Vec<Password>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
/// Private transaction execution receipt.
|
||||
pub struct Receipt {
|
||||
/// Private transaction hash.
|
||||
pub hash: H256,
|
||||
/// Created contract address if any.
|
||||
pub contract_address: Option<Address>,
|
||||
/// Execution status.
|
||||
pub status_code: u8,
|
||||
}
|
||||
|
||||
/// Manager of private transactions
|
||||
pub struct Provider {
|
||||
encryptor: Box<Encryptor>,
|
||||
validator_accounts: HashSet<Address>,
|
||||
signer_account: Option<Address>,
|
||||
passwords: Vec<Password>,
|
||||
notify: RwLock<Vec<Weak<ChainNotify>>>,
|
||||
transactions_for_signing: RwLock<SigningStore>,
|
||||
transactions_for_verification: VerificationStore,
|
||||
client: Arc<Client>,
|
||||
miner: Arc<Miner>,
|
||||
accounts: Arc<AccountProvider>,
|
||||
channel: IoChannel<ClientIoMessage>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct PrivateExecutionResult<T, V> where T: Tracer, V: VMTracer {
|
||||
code: Option<Bytes>,
|
||||
state: Bytes,
|
||||
contract_address: Option<Address>,
|
||||
result: Executed<T::Output, V::Output>,
|
||||
}
|
||||
|
||||
impl Provider where {
|
||||
/// Create a new provider.
|
||||
pub fn new(
|
||||
client: Arc<Client>,
|
||||
miner: Arc<Miner>,
|
||||
accounts: Arc<AccountProvider>,
|
||||
encryptor: Box<Encryptor>,
|
||||
config: ProviderConfig,
|
||||
channel: IoChannel<ClientIoMessage>,
|
||||
) -> Self {
|
||||
Provider {
|
||||
encryptor,
|
||||
validator_accounts: config.validator_accounts.into_iter().collect(),
|
||||
signer_account: config.signer_account,
|
||||
passwords: config.passwords,
|
||||
notify: RwLock::default(),
|
||||
transactions_for_signing: RwLock::default(),
|
||||
transactions_for_verification: VerificationStore::default(),
|
||||
client,
|
||||
miner,
|
||||
accounts,
|
||||
channel,
|
||||
}
|
||||
}
|
||||
|
||||
// TODO [ToDr] Don't use `ChainNotify` here!
|
||||
// Better to create a separate notification type for this.
|
||||
/// Adds an actor to be notified on certain events
|
||||
pub fn add_notify(&self, target: Arc<ChainNotify>) {
|
||||
self.notify.write().push(Arc::downgrade(&target));
|
||||
}
|
||||
|
||||
fn notify<F>(&self, f: F) where F: Fn(&ChainNotify) {
|
||||
for np in self.notify.read().iter() {
|
||||
if let Some(n) = np.upgrade() {
|
||||
f(&*n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// 1. Create private transaction from the signed transaction
|
||||
/// 2. Executes private transaction
|
||||
/// 3. Save it with state returned on prev step to the queue for signing
|
||||
/// 4. Broadcast corresponding message to the chain
|
||||
pub fn create_private_transaction(&self, signed_transaction: SignedTransaction) -> Result<Receipt, Error> {
|
||||
trace!(target: "privatetx", "Creating private transaction from regular transaction: {:?}", signed_transaction);
|
||||
if self.signer_account.is_none() {
|
||||
warn!(target: "privatetx", "Signing account not set");
|
||||
bail!(ErrorKind::SignerAccountNotSet);
|
||||
}
|
||||
let tx_hash = signed_transaction.hash();
|
||||
match signed_transaction.action {
|
||||
Action::Create => {
|
||||
bail!(ErrorKind::BadTransactonType);
|
||||
}
|
||||
Action::Call(contract) => {
|
||||
let data = signed_transaction.rlp_bytes();
|
||||
let encrypted_transaction = self.encrypt(&contract, &Self::iv_from_transaction(&signed_transaction), &data)?;
|
||||
let private = PrivateTransaction::new(encrypted_transaction, contract);
|
||||
// TODO [ToDr] Using BlockId::Latest is bad here,
|
||||
// the block may change in the middle of execution
|
||||
// causing really weird stuff to happen.
|
||||
// We should retrieve hash and stick to that. IMHO
|
||||
// best would be to change the API and only allow H256 instead of BlockID
|
||||
// in private-tx to avoid such mistakes.
|
||||
let contract_nonce = self.get_contract_nonce(&contract, BlockId::Latest)?;
|
||||
let private_state = self.execute_private_transaction(BlockId::Latest, &signed_transaction)?;
|
||||
trace!(target: "privatetx", "Private transaction created, encrypted transaction: {:?}, private state: {:?}", private, private_state);
|
||||
let contract_validators = self.get_validators(BlockId::Latest, &contract)?;
|
||||
trace!(target: "privatetx", "Required validators: {:?}", contract_validators);
|
||||
let private_state_hash = self.calculate_state_hash(&private_state, contract_nonce);
|
||||
trace!(target: "privatetx", "Hashed effective private state for sender: {:?}", private_state_hash);
|
||||
self.transactions_for_signing.write().add_transaction(private.hash(), signed_transaction, contract_validators, private_state, contract_nonce)?;
|
||||
self.broadcast_private_transaction(private.hash(), private.rlp_bytes().into_vec());
|
||||
Ok(Receipt {
|
||||
hash: tx_hash,
|
||||
contract_address: Some(contract),
|
||||
status_code: 0,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Calculate hash from united private state and contract nonce
|
||||
pub fn calculate_state_hash(&self, state: &Bytes, nonce: U256) -> H256 {
|
||||
let state_hash = keccak(state);
|
||||
let mut state_buf = [0u8; 64];
|
||||
state_buf[..32].clone_from_slice(&state_hash);
|
||||
state_buf[32..].clone_from_slice(&H256::from(nonce));
|
||||
keccak(&state_buf.as_ref())
|
||||
}
|
||||
|
||||
fn pool_client<'a>(&'a self, nonce_cache: &'a NonceCache) -> miner::pool_client::PoolClient<'a, Client> {
|
||||
let engine = self.client.engine();
|
||||
let refuse_service_transactions = true;
|
||||
miner::pool_client::PoolClient::new(
|
||||
&*self.client,
|
||||
nonce_cache,
|
||||
engine,
|
||||
Some(&*self.accounts),
|
||||
refuse_service_transactions,
|
||||
)
|
||||
}
|
||||
|
||||
/// Retrieve and verify the first available private transaction for every sender
|
||||
fn process_verification_queue(&self) -> Result<(), Error> {
|
||||
let nonce_cache = NonceCache::new(NONCE_CACHE_SIZE);
|
||||
let process_transaction = |transaction: &VerifiedPrivateTransaction| -> Result<_, String> {
|
||||
let private_hash = transaction.private_transaction.hash();
|
||||
match transaction.validator_account {
|
||||
None => {
|
||||
trace!(target: "privatetx", "Propagating transaction further");
|
||||
self.broadcast_private_transaction(private_hash, transaction.private_transaction.rlp_bytes().into_vec());
|
||||
return Ok(());
|
||||
}
|
||||
Some(validator_account) => {
|
||||
if !self.validator_accounts.contains(&validator_account) {
|
||||
trace!(target: "privatetx", "Propagating transaction further");
|
||||
self.broadcast_private_transaction(private_hash, transaction.private_transaction.rlp_bytes().into_vec());
|
||||
return Ok(());
|
||||
}
|
||||
let tx_action = transaction.transaction.action.clone();
|
||||
if let Action::Call(contract) = tx_action {
|
||||
// TODO [ToDr] Usage of BlockId::Latest
|
||||
let contract_nonce = self.get_contract_nonce(&contract, BlockId::Latest);
|
||||
if let Err(e) = contract_nonce {
|
||||
bail!("Cannot retrieve contract nonce: {:?}", e);
|
||||
}
|
||||
let contract_nonce = contract_nonce.expect("Error was checked before");
|
||||
let private_state = self.execute_private_transaction(BlockId::Latest, &transaction.transaction);
|
||||
if let Err(e) = private_state {
|
||||
bail!("Cannot retrieve private state: {:?}", e);
|
||||
}
|
||||
let private_state = private_state.expect("Error was checked before");
|
||||
let private_state_hash = self.calculate_state_hash(&private_state, contract_nonce);
|
||||
trace!(target: "privatetx", "Hashed effective private state for validator: {:?}", private_state_hash);
|
||||
let password = find_account_password(&self.passwords, &*self.accounts, &validator_account);
|
||||
let signed_state = self.accounts.sign(validator_account, password, private_state_hash);
|
||||
if let Err(e) = signed_state {
|
||||
bail!("Cannot sign the state: {:?}", e);
|
||||
}
|
||||
let signed_state = signed_state.expect("Error was checked before");
|
||||
let signed_private_transaction = SignedPrivateTransaction::new(private_hash, signed_state, None);
|
||||
trace!(target: "privatetx", "Sending signature for private transaction: {:?}", signed_private_transaction);
|
||||
self.broadcast_signed_private_transaction(signed_private_transaction.hash(), signed_private_transaction.rlp_bytes().into_vec());
|
||||
} else {
|
||||
bail!("Incorrect type of action for the transaction");
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
};
|
||||
let ready_transactions = self.transactions_for_verification.drain(self.pool_client(&nonce_cache));
|
||||
for transaction in ready_transactions {
|
||||
if let Err(e) = process_transaction(&transaction) {
|
||||
warn!(target: "privatetx", "Error: {:?}", e);
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Add signed private transaction into the store
|
||||
/// Creates corresponding public transaction if last required signature collected and sends it to the chain
|
||||
pub fn process_signature(&self, signed_tx: &SignedPrivateTransaction) -> Result<(), Error> {
|
||||
trace!(target: "privatetx", "Processing signed private transaction");
|
||||
let private_hash = signed_tx.private_transaction_hash();
|
||||
let desc = match self.transactions_for_signing.read().get(&private_hash) {
|
||||
None => {
|
||||
// Not our transaction, broadcast further to peers
|
||||
self.broadcast_signed_private_transaction(signed_tx.hash(), signed_tx.rlp_bytes().into_vec());
|
||||
return Ok(());
|
||||
},
|
||||
Some(desc) => desc,
|
||||
};
|
||||
let last = self.last_required_signature(&desc, signed_tx.signature())?;
|
||||
|
||||
if last {
|
||||
let mut signatures = desc.received_signatures.clone();
|
||||
signatures.push(signed_tx.signature());
|
||||
let rsv: Vec<Signature> = signatures.into_iter().map(|sign| sign.into_electrum().into()).collect();
|
||||
//Create public transaction
|
||||
let public_tx = self.public_transaction(
|
||||
desc.state.clone(),
|
||||
&desc.original_transaction,
|
||||
&rsv,
|
||||
desc.original_transaction.nonce,
|
||||
desc.original_transaction.gas_price
|
||||
)?;
|
||||
trace!(target: "privatetx", "Last required signature received, public transaction created: {:?}", public_tx);
|
||||
//Sign and add it to the queue
|
||||
let chain_id = desc.original_transaction.chain_id();
|
||||
let hash = public_tx.hash(chain_id);
|
||||
let signer_account = self.signer_account.ok_or_else(|| ErrorKind::SignerAccountNotSet)?;
|
||||
let password = find_account_password(&self.passwords, &*self.accounts, &signer_account);
|
||||
let signature = self.accounts.sign(signer_account, password, hash)?;
|
||||
let signed = SignedTransaction::new(public_tx.with_signature(signature, chain_id))?;
|
||||
match self.miner.import_own_transaction(&*self.client, signed.into()) {
|
||||
Ok(_) => trace!(target: "privatetx", "Public transaction added to queue"),
|
||||
Err(err) => {
|
||||
warn!(target: "privatetx", "Failed to add transaction to queue, error: {:?}", err);
|
||||
bail!(err);
|
||||
}
|
||||
}
|
||||
//Remove from store for signing
|
||||
if let Err(err) = self.transactions_for_signing.write().remove(&private_hash) {
|
||||
warn!(target: "privatetx", "Failed to remove transaction from signing store, error: {:?}", err);
|
||||
bail!(err);
|
||||
}
|
||||
} else {
|
||||
//Add signature to the store
|
||||
match self.transactions_for_signing.write().add_signature(&private_hash, signed_tx.signature()) {
|
||||
Ok(_) => trace!(target: "privatetx", "Signature stored for private transaction"),
|
||||
Err(err) => {
|
||||
warn!(target: "privatetx", "Failed to add signature to signing store, error: {:?}", err);
|
||||
bail!(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn last_required_signature(&self, desc: &PrivateTransactionSigningDesc, sign: Signature) -> Result<bool, Error> {
|
||||
if desc.received_signatures.contains(&sign) {
|
||||
return Ok(false);
|
||||
}
|
||||
let state_hash = self.calculate_state_hash(&desc.state, desc.contract_nonce);
|
||||
match recover(&sign, &state_hash) {
|
||||
Ok(public) => {
|
||||
let sender = public_to_address(&public);
|
||||
match desc.validators.contains(&sender) {
|
||||
true => {
|
||||
Ok(desc.received_signatures.len() + 1 == desc.validators.len())
|
||||
}
|
||||
false => {
|
||||
warn!(target: "privatetx", "Sender's state doesn't correspond to validator's");
|
||||
bail!(ErrorKind::StateIncorrect);
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
warn!(target: "privatetx", "Sender's state doesn't correspond to validator's, error {:?}", err);
|
||||
bail!(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Broadcast the private transaction message to the chain
|
||||
fn broadcast_private_transaction(&self, transaction_hash: H256, message: Bytes) {
|
||||
self.notify(|notify| notify.broadcast(ChainMessageType::PrivateTransaction(transaction_hash, message.clone())));
|
||||
}
|
||||
|
||||
/// Broadcast signed private transaction message to the chain
|
||||
fn broadcast_signed_private_transaction(&self, transaction_hash: H256, message: Bytes) {
|
||||
self.notify(|notify| notify.broadcast(ChainMessageType::SignedPrivateTransaction(transaction_hash, message.clone())));
|
||||
}
|
||||
|
||||
fn iv_from_transaction(transaction: &SignedTransaction) -> H128 {
|
||||
let nonce = keccak(&transaction.nonce.rlp_bytes());
|
||||
let (iv, _) = nonce.split_at(INIT_VEC_LEN);
|
||||
H128::from_slice(iv)
|
||||
}
|
||||
|
||||
fn iv_from_address(contract_address: &Address) -> H128 {
|
||||
let address = keccak(&contract_address.rlp_bytes());
|
||||
let (iv, _) = address.split_at(INIT_VEC_LEN);
|
||||
H128::from_slice(iv)
|
||||
}
|
||||
|
||||
fn encrypt(&self, contract_address: &Address, initialisation_vector: &H128, data: &[u8]) -> Result<Bytes, Error> {
|
||||
trace!(target: "privatetx", "Encrypt data using key(address): {:?}", contract_address);
|
||||
Ok(self.encryptor.encrypt(contract_address, &*self.accounts, initialisation_vector, data)?)
|
||||
}
|
||||
|
||||
fn decrypt(&self, contract_address: &Address, data: &[u8]) -> Result<Bytes, Error> {
|
||||
trace!(target: "privatetx", "Decrypt data using key(address): {:?}", contract_address);
|
||||
Ok(self.encryptor.decrypt(contract_address, &*self.accounts, data)?)
|
||||
}
|
||||
|
||||
fn get_decrypted_state(&self, address: &Address, block: BlockId) -> Result<Bytes, Error> {
|
||||
let contract = private::PrivateContract::default();
|
||||
let state = contract.functions()
|
||||
.state()
|
||||
.call(&|data| self.client.call_contract(block, *address, data))
|
||||
.map_err(|e| ErrorKind::Call(format!("Contract call failed {:?}", e)))?;
|
||||
|
||||
self.decrypt(address, &state)
|
||||
}
|
||||
|
||||
fn get_decrypted_code(&self, address: &Address, block: BlockId) -> Result<Bytes, Error> {
|
||||
let contract = private::PrivateContract::default();
|
||||
let code = contract.functions()
|
||||
.code()
|
||||
.call(&|data| self.client.call_contract(block, *address, data))
|
||||
.map_err(|e| ErrorKind::Call(format!("Contract call failed {:?}", e)))?;
|
||||
|
||||
self.decrypt(address, &code)
|
||||
}
|
||||
|
||||
pub fn get_contract_nonce(&self, address: &Address, block: BlockId) -> Result<U256, Error> {
|
||||
let contract = private::PrivateContract::default();
|
||||
Ok(contract.functions()
|
||||
.nonce()
|
||||
.call(&|data| self.client.call_contract(block, *address, data))
|
||||
.map_err(|e| ErrorKind::Call(format!("Contract call failed {:?}", e)))?)
|
||||
}
|
||||
|
||||
fn snapshot_to_storage(raw: Bytes) -> HashMap<H256, H256> {
|
||||
let items = raw.len() / 64;
|
||||
(0..items).map(|i| {
|
||||
let offset = i * 64;
|
||||
let key = H256::from_slice(&raw[offset..(offset + 32)]);
|
||||
let value = H256::from_slice(&raw[(offset + 32)..(offset + 64)]);
|
||||
(key, value)
|
||||
}).collect()
|
||||
}
|
||||
|
||||
fn snapshot_from_storage(storage: &HashMap<H256, H256>) -> Bytes {
|
||||
let mut raw = Vec::with_capacity(storage.len() * 64);
|
||||
for (key, value) in storage {
|
||||
raw.extend_from_slice(key);
|
||||
raw.extend_from_slice(value);
|
||||
};
|
||||
raw
|
||||
}
|
||||
|
||||
pub fn execute_private<T, V>(&self, transaction: &SignedTransaction, options: TransactOptions<T, V>, block: BlockId) -> Result<PrivateExecutionResult<T, V>, Error>
|
||||
where
|
||||
T: Tracer,
|
||||
V: VMTracer,
|
||||
{
|
||||
let mut env_info = self.client.env_info(block).ok_or(ErrorKind::StatePruned)?;
|
||||
env_info.gas_limit = transaction.gas;
|
||||
|
||||
let mut state = self.client.state_at(block).ok_or(ErrorKind::StatePruned)?;
|
||||
// TODO: in case of BlockId::Latest these need to operate on the same state
|
||||
let contract_address = match transaction.action {
|
||||
Action::Call(ref contract_address) => {
|
||||
let contract_code = Arc::new(self.get_decrypted_code(contract_address, block)?);
|
||||
let contract_state = self.get_decrypted_state(contract_address, block)?;
|
||||
trace!(target: "privatetx", "Patching contract at {:?}, code: {:?}, state: {:?}", contract_address, contract_code, contract_state);
|
||||
state.patch_account(contract_address, contract_code, Self::snapshot_to_storage(contract_state))?;
|
||||
Some(*contract_address)
|
||||
},
|
||||
Action::Create => None,
|
||||
};
|
||||
|
||||
let engine = self.client.engine();
|
||||
let contract_address = contract_address.or({
|
||||
let sender = transaction.sender();
|
||||
let nonce = state.nonce(&sender)?;
|
||||
let (new_address, _) = ethcore_contract_address(engine.create_address_scheme(env_info.number), &sender, &nonce, &transaction.data);
|
||||
Some(new_address)
|
||||
});
|
||||
let machine = engine.machine();
|
||||
let schedule = machine.schedule(env_info.number);
|
||||
let result = Executive::new(&mut state, &env_info, &machine, &schedule).transact_virtual(transaction, options)?;
|
||||
let (encrypted_code, encrypted_storage) = match contract_address {
|
||||
None => bail!(ErrorKind::ContractDoesNotExist),
|
||||
Some(address) => {
|
||||
let (code, storage) = state.into_account(&address)?;
|
||||
let enc_code = match code {
|
||||
Some(c) => Some(self.encrypt(&address, &Self::iv_from_address(&address), &c)?),
|
||||
None => None,
|
||||
};
|
||||
(enc_code, self.encrypt(&address, &Self::iv_from_transaction(transaction), &Self::snapshot_from_storage(&storage))?)
|
||||
},
|
||||
};
|
||||
trace!(target: "privatetx", "Private contract executed. code: {:?}, state: {:?}, result: {:?}", encrypted_code, encrypted_storage, result.output);
|
||||
Ok(PrivateExecutionResult {
|
||||
code: encrypted_code,
|
||||
state: encrypted_storage,
|
||||
contract_address,
|
||||
result,
|
||||
})
|
||||
}
|
||||
|
||||
fn generate_constructor(validators: &[Address], code: Bytes, storage: Bytes) -> Bytes {
|
||||
let constructor_code = DEFAULT_STUB_CONTRACT.from_hex().expect("Default contract code is valid");
|
||||
let private = private::PrivateContract::default();
|
||||
private.constructor(constructor_code, validators.iter().map(|a| *a).collect::<Vec<Address>>(), code, storage)
|
||||
}
|
||||
|
||||
fn generate_set_state_call(signatures: &[Signature], storage: Bytes) -> Bytes {
|
||||
let private = private::PrivateContract::default();
|
||||
private.functions().set_state().input(
|
||||
storage,
|
||||
signatures.iter().map(|s| {
|
||||
let mut v: [u8; 32] = [0; 32];
|
||||
v[31] = s.v();
|
||||
v
|
||||
}).collect::<Vec<[u8; 32]>>(),
|
||||
signatures.iter().map(|s| s.r()).collect::<Vec<&[u8]>>(),
|
||||
signatures.iter().map(|s| s.s()).collect::<Vec<&[u8]>>()
|
||||
)
|
||||
}
|
||||
|
||||
/// Returns the key from the key server associated with the contract
|
||||
pub fn contract_key_id(&self, contract_address: &Address) -> Result<H256, Error> {
|
||||
//current solution uses contract address extended with 0 as id
|
||||
let contract_address_extended: H256 = contract_address.into();
|
||||
|
||||
Ok(H256::from_slice(&contract_address_extended))
|
||||
}
|
||||
|
||||
/// Create encrypted public contract deployment transaction.
|
||||
pub fn public_creation_transaction(&self, block: BlockId, source: &SignedTransaction, validators: &[Address], gas_price: U256) -> Result<(Transaction, Option<Address>), Error> {
|
||||
if let Action::Call(_) = source.action {
|
||||
bail!(ErrorKind::BadTransactonType);
|
||||
}
|
||||
let sender = source.sender();
|
||||
let state = self.client.state_at(block).ok_or(ErrorKind::StatePruned)?;
|
||||
let nonce = state.nonce(&sender)?;
|
||||
let executed = self.execute_private(source, TransactOptions::with_no_tracing(), block)?;
|
||||
let gas: u64 = 650000 +
|
||||
validators.len() as u64 * 30000 +
|
||||
executed.code.as_ref().map_or(0, |c| c.len() as u64) * 8000 +
|
||||
executed.state.len() as u64 * 8000;
|
||||
Ok((Transaction {
|
||||
nonce: nonce,
|
||||
action: Action::Create,
|
||||
gas: gas.into(),
|
||||
gas_price: gas_price,
|
||||
value: source.value,
|
||||
data: Self::generate_constructor(validators, executed.code.unwrap_or_default(), executed.state)
|
||||
},
|
||||
executed.contract_address))
|
||||
}
|
||||
|
||||
/// Create encrypted public contract deployment transaction. Returns updated encrypted state.
|
||||
pub fn execute_private_transaction(&self, block: BlockId, source: &SignedTransaction) -> Result<Bytes, Error> {
|
||||
if let Action::Create = source.action {
|
||||
bail!(ErrorKind::BadTransactonType);
|
||||
}
|
||||
let result = self.execute_private(source, TransactOptions::with_no_tracing(), block)?;
|
||||
Ok(result.state)
|
||||
}
|
||||
|
||||
/// Create encrypted public transaction from private transaction.
|
||||
pub fn public_transaction(&self, state: Bytes, source: &SignedTransaction, signatures: &[Signature], nonce: U256, gas_price: U256) -> Result<Transaction, Error> {
|
||||
let gas: u64 = 650000 + state.len() as u64 * 8000 + signatures.len() as u64 * 50000;
|
||||
Ok(Transaction {
|
||||
nonce: nonce,
|
||||
action: source.action.clone(),
|
||||
gas: gas.into(),
|
||||
gas_price: gas_price,
|
||||
value: 0.into(),
|
||||
data: Self::generate_set_state_call(signatures, state)
|
||||
})
|
||||
}
|
||||
|
||||
/// Call into private contract.
|
||||
pub fn private_call(&self, block: BlockId, transaction: &SignedTransaction) -> Result<Executed, Error> {
|
||||
let result = self.execute_private(transaction, TransactOptions::with_no_tracing(), block)?;
|
||||
Ok(result.result)
|
||||
}
|
||||
|
||||
/// Returns private validators for a contract.
|
||||
pub fn get_validators(&self, block: BlockId, address: &Address) -> Result<Vec<Address>, Error> {
|
||||
let contract = private::PrivateContract::default();
|
||||
Ok(contract.functions()
|
||||
.get_validators()
|
||||
.call(&|data| self.client.call_contract(block, *address, data))
|
||||
.map_err(|e| ErrorKind::Call(format!("Contract call failed {:?}", e)))?)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Importer {
|
||||
/// Process received private transaction
|
||||
fn import_private_transaction(&self, _rlp: &[u8]) -> Result<H256, Error>;
|
||||
|
||||
/// Add signed private transaction into the store
|
||||
///
|
||||
/// Creates corresponding public transaction if last required signature collected and sends it to the chain
|
||||
fn import_signed_private_transaction(&self, _rlp: &[u8]) -> Result<H256, Error>;
|
||||
}
|
||||
|
||||
// TODO [ToDr] Offload more heavy stuff to the IoService thread.
|
||||
// It seems that a lot of heavy work (verification) is done in this thread anyway
|
||||
// it might actually make sense to decouple it from clientService and just use dedicated thread
|
||||
// for both verification and execution.
|
||||
|
||||
impl Importer for Arc<Provider> {
|
||||
fn import_private_transaction(&self, rlp: &[u8]) -> Result<H256, Error> {
|
||||
trace!(target: "privatetx", "Private transaction received");
|
||||
let private_tx: PrivateTransaction = Rlp::new(rlp).as_val()?;
|
||||
let private_tx_hash = private_tx.hash();
|
||||
let contract = private_tx.contract();
|
||||
let contract_validators = self.get_validators(BlockId::Latest, &contract)?;
|
||||
|
||||
let validation_account = contract_validators
|
||||
.iter()
|
||||
.find(|address| self.validator_accounts.contains(address));
|
||||
|
||||
//extract the original transaction
|
||||
let encrypted_data = private_tx.encrypted();
|
||||
let transaction_bytes = self.decrypt(&contract, &encrypted_data)?;
|
||||
let original_tx: UnverifiedTransaction = Rlp::new(&transaction_bytes).as_val()?;
|
||||
let nonce_cache = NonceCache::new(NONCE_CACHE_SIZE);
|
||||
//add to the queue for further verification
|
||||
self.transactions_for_verification.add_transaction(
|
||||
original_tx,
|
||||
validation_account.map(|&account| account),
|
||||
private_tx,
|
||||
self.pool_client(&nonce_cache),
|
||||
)?;
|
||||
let provider = Arc::downgrade(self);
|
||||
let result = self.channel.send(ClientIoMessage::execute(move |_| {
|
||||
if let Some(provider) = provider.upgrade() {
|
||||
if let Err(e) = provider.process_verification_queue() {
|
||||
warn!(target: "privatetx", "Unable to process the queue: {}", e);
|
||||
}
|
||||
}
|
||||
}));
|
||||
if let Err(e) = result {
|
||||
warn!(target: "privatetx", "Error sending NewPrivateTransaction message: {:?}", e);
|
||||
}
|
||||
Ok(private_tx_hash)
|
||||
}
|
||||
|
||||
fn import_signed_private_transaction(&self, rlp: &[u8]) -> Result<H256, Error> {
|
||||
let tx: SignedPrivateTransaction = Rlp::new(rlp).as_val()?;
|
||||
trace!(target: "privatetx", "Signature for private transaction received: {:?}", tx);
|
||||
let private_hash = tx.private_transaction_hash();
|
||||
let provider = Arc::downgrade(self);
|
||||
let result = self.channel.send(ClientIoMessage::execute(move |_| {
|
||||
if let Some(provider) = provider.upgrade() {
|
||||
if let Err(e) = provider.process_signature(&tx) {
|
||||
warn!(target: "privatetx", "Unable to process the signature: {}", e);
|
||||
}
|
||||
}
|
||||
}));
|
||||
if let Err(e) = result {
|
||||
warn!(target: "privatetx", "Error sending NewSignedPrivateTransaction message: {:?}", e);
|
||||
}
|
||||
Ok(private_hash)
|
||||
}
|
||||
}
|
||||
|
||||
/// Try to unlock account using stored password, return found password if any
|
||||
fn find_account_password(passwords: &Vec<Password>, account_provider: &AccountProvider, account: &Address) -> Option<Password> {
|
||||
for password in passwords {
|
||||
if let Ok(true) = account_provider.test_password(account, password) {
|
||||
return Some(password.clone());
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
impl ChainNotify for Provider {
|
||||
fn new_blocks(&self, imported: Vec<H256>, _invalid: Vec<H256>, _route: ChainRoute, _sealed: Vec<H256>, _proposed: Vec<Bytes>, _duration: Duration) {
|
||||
if !imported.is_empty() {
|
||||
trace!(target: "privatetx", "New blocks imported, try to prune the queue");
|
||||
if let Err(err) = self.process_verification_queue() {
|
||||
warn!(target: "privatetx", "Cannot prune private transactions queue. error: {:?}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use ethereum_types::{H256, U256, Address};
|
||||
use bytes::Bytes;
|
||||
use hash::keccak;
|
||||
use rlp::Encodable;
|
||||
use ethkey::Signature;
|
||||
use transaction::signature::{add_chain_replay_protection, check_replay_protection};
|
||||
|
||||
/// Message with private transaction encrypted
|
||||
#[derive(Default, Debug, Clone, PartialEq, RlpEncodable, RlpDecodable, Eq)]
|
||||
pub struct PrivateTransaction {
|
||||
/// Encrypted data
|
||||
encrypted: Bytes,
|
||||
/// Address of the contract
|
||||
contract: Address,
|
||||
/// Hash
|
||||
hash: H256,
|
||||
}
|
||||
|
||||
impl PrivateTransaction {
|
||||
/// Constructor
|
||||
pub fn new(encrypted: Bytes, contract: Address) -> Self {
|
||||
PrivateTransaction {
|
||||
encrypted,
|
||||
contract,
|
||||
hash: 0.into(),
|
||||
}.compute_hash()
|
||||
}
|
||||
|
||||
fn compute_hash(mut self) -> PrivateTransaction {
|
||||
self.hash = keccak(&*self.rlp_bytes());
|
||||
self
|
||||
}
|
||||
|
||||
/// Hash of the private transaction
|
||||
pub fn hash(&self) -> H256 {
|
||||
self.hash
|
||||
}
|
||||
|
||||
/// Address of the contract
|
||||
pub fn contract(&self) -> Address {
|
||||
self.contract
|
||||
}
|
||||
|
||||
/// Encrypted data
|
||||
pub fn encrypted(&self) -> Bytes {
|
||||
self.encrypted.clone()
|
||||
}
|
||||
}
|
||||
|
||||
/// Message about private transaction's signing
|
||||
#[derive(Default, Debug, Clone, PartialEq, RlpEncodable, RlpDecodable, Eq)]
|
||||
pub struct SignedPrivateTransaction {
|
||||
/// Hash of the corresponding private transaction
|
||||
private_transaction_hash: H256,
|
||||
/// Signature of the validator
|
||||
/// The V field of the signature
|
||||
v: u64,
|
||||
/// The R field of the signature
|
||||
r: U256,
|
||||
/// The S field of the signature
|
||||
s: U256,
|
||||
/// Hash
|
||||
hash: H256,
|
||||
}
|
||||
|
||||
impl SignedPrivateTransaction {
|
||||
/// Construct a signed private transaction message
|
||||
pub fn new(private_transaction_hash: H256, sig: Signature, chain_id: Option<u64>) -> Self {
|
||||
SignedPrivateTransaction {
|
||||
private_transaction_hash: private_transaction_hash,
|
||||
r: sig.r().into(),
|
||||
s: sig.s().into(),
|
||||
v: add_chain_replay_protection(sig.v() as u64, chain_id),
|
||||
hash: 0.into(),
|
||||
}.compute_hash()
|
||||
}
|
||||
|
||||
fn compute_hash(mut self) -> SignedPrivateTransaction {
|
||||
self.hash = keccak(&*self.rlp_bytes());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn standard_v(&self) -> u8 { check_replay_protection(self.v) }
|
||||
|
||||
/// Construct a signature object from the sig.
|
||||
pub fn signature(&self) -> Signature {
|
||||
Signature::from_rsv(&self.r.into(), &self.s.into(), self.standard_v())
|
||||
}
|
||||
|
||||
/// Get the hash of of the original transaction.
|
||||
pub fn private_transaction_hash(&self) -> H256 {
|
||||
self.private_transaction_hash
|
||||
}
|
||||
|
||||
/// Own hash
|
||||
pub fn hash(&self) -> H256 {
|
||||
self.hash
|
||||
}
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::cmp;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
use bytes::Bytes;
|
||||
use ethcore_miner::pool;
|
||||
use ethereum_types::{H256, U256, Address};
|
||||
use heapsize::HeapSizeOf;
|
||||
use ethkey::Signature;
|
||||
use messages::PrivateTransaction;
|
||||
use parking_lot::RwLock;
|
||||
use transaction::{UnverifiedTransaction, SignedTransaction};
|
||||
use txpool;
|
||||
use txpool::{VerifiedTransaction, Verifier};
|
||||
use error::{Error, ErrorKind};
|
||||
|
||||
type Pool = txpool::Pool<VerifiedPrivateTransaction, pool::scoring::NonceAndGasPrice>;
|
||||
|
||||
/// Maximum length for private transactions queues.
|
||||
const MAX_QUEUE_LEN: usize = 8312;
|
||||
|
||||
/// Private transaction stored in queue for verification
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct VerifiedPrivateTransaction {
|
||||
/// Original private transaction
|
||||
pub private_transaction: PrivateTransaction,
|
||||
/// Address that should be used for verification
|
||||
pub validator_account: Option<Address>,
|
||||
/// Resulting verified transaction
|
||||
pub transaction: SignedTransaction,
|
||||
/// Original transaction hash
|
||||
pub transaction_hash: H256,
|
||||
/// Original transaction sender
|
||||
pub transaction_sender: Address,
|
||||
}
|
||||
|
||||
impl txpool::VerifiedTransaction for VerifiedPrivateTransaction {
|
||||
type Hash = H256;
|
||||
type Sender = Address;
|
||||
|
||||
fn hash(&self) -> &H256 {
|
||||
&self.transaction_hash
|
||||
}
|
||||
|
||||
fn mem_usage(&self) -> usize {
|
||||
self.transaction.heap_size_of_children()
|
||||
}
|
||||
|
||||
fn sender(&self) -> &Address {
|
||||
&self.transaction_sender
|
||||
}
|
||||
}
|
||||
|
||||
impl pool::ScoredTransaction for VerifiedPrivateTransaction {
|
||||
fn priority(&self) -> pool::Priority {
|
||||
pool::Priority::Regular
|
||||
}
|
||||
|
||||
/// Gets transaction gas price.
|
||||
fn gas_price(&self) -> &U256 {
|
||||
&self.transaction.gas_price
|
||||
}
|
||||
|
||||
/// Gets transaction nonce.
|
||||
fn nonce(&self) -> U256 {
|
||||
self.transaction.nonce
|
||||
}
|
||||
}
|
||||
|
||||
/// Checks readiness of transactions by looking if the transaction from sender already exists.
|
||||
/// Guarantees only one transaction per sender
|
||||
#[derive(Debug)]
|
||||
pub struct PrivateReadyState<C> {
|
||||
senders: HashSet<Address>,
|
||||
state: C,
|
||||
}
|
||||
|
||||
impl<C> PrivateReadyState<C> {
|
||||
/// Create new State checker, given client interface.
|
||||
pub fn new(
|
||||
state: C,
|
||||
) -> Self {
|
||||
PrivateReadyState {
|
||||
senders: Default::default(),
|
||||
state,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<C: pool::client::NonceClient> txpool::Ready<VerifiedPrivateTransaction> for PrivateReadyState<C> {
|
||||
fn is_ready(&mut self, tx: &VerifiedPrivateTransaction) -> txpool::Readiness {
|
||||
let sender = tx.sender();
|
||||
let state = &self.state;
|
||||
let state_nonce = state.account_nonce(sender);
|
||||
if self.senders.contains(sender) {
|
||||
txpool::Readiness::Future
|
||||
} else {
|
||||
self.senders.insert(*sender);
|
||||
match tx.transaction.nonce.cmp(&state_nonce) {
|
||||
cmp::Ordering::Greater => txpool::Readiness::Future,
|
||||
cmp::Ordering::Less => txpool::Readiness::Stale,
|
||||
cmp::Ordering::Equal => txpool::Readiness::Ready,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Storage for private transactions for verification
|
||||
pub struct VerificationStore {
|
||||
verification_pool: RwLock<Pool>,
|
||||
verification_options: pool::verifier::Options,
|
||||
}
|
||||
|
||||
impl Default for VerificationStore {
|
||||
fn default() -> Self {
|
||||
VerificationStore {
|
||||
verification_pool: RwLock::new(
|
||||
txpool::Pool::new(
|
||||
txpool::NoopListener,
|
||||
pool::scoring::NonceAndGasPrice(pool::PrioritizationStrategy::GasPriceOnly),
|
||||
pool::Options {
|
||||
max_count: MAX_QUEUE_LEN,
|
||||
max_per_sender: MAX_QUEUE_LEN / 10,
|
||||
max_mem_usage: 8 * 1024 * 1024,
|
||||
},
|
||||
)
|
||||
),
|
||||
verification_options: pool::verifier::Options {
|
||||
// TODO [ToDr] This should probably be based on some real values?
|
||||
minimal_gas_price: 0.into(),
|
||||
block_gas_limit: 8_000_000.into(),
|
||||
tx_gas_limit: U256::max_value(),
|
||||
no_early_reject: false,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl VerificationStore {
|
||||
/// Adds private transaction for verification into the store
|
||||
pub fn add_transaction<C: pool::client::Client>(
|
||||
&self,
|
||||
transaction: UnverifiedTransaction,
|
||||
validator_account: Option<Address>,
|
||||
private_transaction: PrivateTransaction,
|
||||
client: C,
|
||||
) -> Result<(), Error> {
|
||||
|
||||
let options = self.verification_options.clone();
|
||||
// Use pool's verifying pipeline for original transaction's verification
|
||||
let verifier = pool::verifier::Verifier::new(client, options, Default::default(), None);
|
||||
let unverified = pool::verifier::Transaction::Unverified(transaction);
|
||||
let verified_tx = verifier.verify_transaction(unverified)?;
|
||||
let signed_tx: SignedTransaction = verified_tx.signed().clone();
|
||||
let signed_hash = signed_tx.hash();
|
||||
let signed_sender = signed_tx.sender();
|
||||
let verified = VerifiedPrivateTransaction {
|
||||
private_transaction,
|
||||
validator_account,
|
||||
transaction: signed_tx,
|
||||
transaction_hash: signed_hash,
|
||||
transaction_sender: signed_sender,
|
||||
};
|
||||
let mut pool = self.verification_pool.write();
|
||||
pool.import(verified)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Drains transactions ready for verification from the pool
|
||||
/// Returns only one transaction per sender because several cannot be verified in a row without verification from other peers
|
||||
pub fn drain<C: pool::client::NonceClient>(&self, client: C) -> Vec<Arc<VerifiedPrivateTransaction>> {
|
||||
let ready = PrivateReadyState::new(client);
|
||||
let transactions: Vec<_> = self.verification_pool.read().pending(ready).collect();
|
||||
let mut pool = self.verification_pool.write();
|
||||
for tx in &transactions {
|
||||
pool.remove(tx.hash(), true);
|
||||
}
|
||||
transactions
|
||||
}
|
||||
}
|
||||
|
||||
/// Desriptor for private transaction stored in queue for signing
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct PrivateTransactionSigningDesc {
|
||||
/// Original unsigned transaction
|
||||
pub original_transaction: SignedTransaction,
|
||||
/// Supposed validators from the contract
|
||||
pub validators: Vec<Address>,
|
||||
/// Already obtained signatures
|
||||
pub received_signatures: Vec<Signature>,
|
||||
/// State after transaction execution to compare further with received from validators
|
||||
pub state: Bytes,
|
||||
/// Build-in nonce of the contract
|
||||
pub contract_nonce: U256,
|
||||
}
|
||||
|
||||
/// Storage for private transactions for signing
|
||||
#[derive(Default)]
|
||||
pub struct SigningStore {
|
||||
/// Transactions and descriptors for signing
|
||||
transactions: HashMap<H256, PrivateTransactionSigningDesc>,
|
||||
}
|
||||
|
||||
impl SigningStore {
|
||||
/// Adds new private transaction into the store for signing
|
||||
pub fn add_transaction(
|
||||
&mut self,
|
||||
private_hash: H256,
|
||||
transaction: SignedTransaction,
|
||||
validators: Vec<Address>,
|
||||
state: Bytes,
|
||||
contract_nonce: U256,
|
||||
) -> Result<(), Error> {
|
||||
if self.transactions.len() > MAX_QUEUE_LEN {
|
||||
bail!(ErrorKind::QueueIsFull);
|
||||
}
|
||||
|
||||
self.transactions.insert(private_hash, PrivateTransactionSigningDesc {
|
||||
original_transaction: transaction.clone(),
|
||||
validators: validators.clone(),
|
||||
received_signatures: Vec::new(),
|
||||
state,
|
||||
contract_nonce,
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Get copy of private transaction's description from the storage
|
||||
pub fn get(&self, private_hash: &H256) -> Option<PrivateTransactionSigningDesc> {
|
||||
self.transactions.get(private_hash).cloned()
|
||||
}
|
||||
|
||||
/// Removes desc from the store (after verification is completed)
|
||||
pub fn remove(&mut self, private_hash: &H256) -> Result<(), Error> {
|
||||
self.transactions.remove(private_hash);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Adds received signature for the stored private transaction
|
||||
pub fn add_signature(&mut self, private_hash: &H256, signature: Signature) -> Result<(), Error> {
|
||||
let desc = self.transactions.get_mut(private_hash).ok_or_else(|| ErrorKind::PrivateTransactionNotFound)?;
|
||||
if !desc.received_signatures.contains(&signature) {
|
||||
desc.received_signatures.push(signature);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user