Compare commits
406 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b428262e7 | ||
|
|
a39aaacb8a | ||
|
|
7d1415a253 | ||
|
|
7aab6b74da | ||
|
|
ebd0fd0117 | ||
|
|
0d63c932af | ||
|
|
0b78a1b5a0 | ||
|
|
0e95db11d4 | ||
|
|
7f3a72bde1 | ||
|
|
3b9b1a8f14 | ||
|
|
a6c4b17303 | ||
|
|
678138f097 | ||
|
|
b4e4038fb5 | ||
|
|
7a8e5976bc | ||
|
|
938c8d8bcd | ||
|
|
3aefa2b960 | ||
|
|
10657d96c4 | ||
|
|
4d66e8d06d | ||
|
|
010cfb7d67 | ||
|
|
f9a8aac036 | ||
|
|
3d28823be7 | ||
|
|
492317abd7 | ||
|
|
ab22d5e278 | ||
|
|
ce5f704dd5 | ||
|
|
696dc05dda | ||
|
|
589083ad7a | ||
|
|
1fda997370 | ||
|
|
7c335e8764 | ||
|
|
5b1d33d5fa | ||
|
|
e435407080 | ||
|
|
b180be7526 | ||
|
|
90fb473d87 | ||
|
|
3650f2d51c | ||
|
|
3090324366 | ||
|
|
130901e820 | ||
|
|
801b8191ef | ||
|
|
469f9c26e7 | ||
|
|
b5f510ead7 | ||
|
|
b4f8bba843 | ||
|
|
2bb79614f6 | ||
|
|
c077dc652d | ||
|
|
1b6f2a3e92 | ||
|
|
9136c81f05 | ||
|
|
912e5599d9 | ||
|
|
ff0095ac5e | ||
|
|
bf9fedc4ee | ||
|
|
78ba54da6b | ||
|
|
c90e279ab5 | ||
|
|
215602de08 | ||
|
|
13b832f959 | ||
|
|
789bb9c852 | ||
|
|
aada1f547b | ||
|
|
60718225ac | ||
|
|
1a2fc03083 | ||
|
|
61e8baee0c | ||
|
|
dbc5f55da9 | ||
|
|
81b7698428 | ||
|
|
4ce4bad383 | ||
|
|
23d25a079b | ||
|
|
d19bdb642e | ||
|
|
2e0246a6c2 | ||
|
|
349098e7b2 | ||
|
|
dc3b1ecdd0 | ||
|
|
7fb33796b1 | ||
|
|
ec886ddefb | ||
|
|
4ded4181a6 | ||
|
|
60691d03e0 | ||
|
|
869fa399b1 | ||
|
|
7af953fd62 | ||
|
|
5acbcb0d57 | ||
|
|
7000c394b2 | ||
|
|
7c0d894ccf | ||
|
|
f092c10de5 | ||
|
|
7f5e6b3a0a | ||
|
|
5e9dc185a5 | ||
|
|
0e94ac0111 | ||
|
|
0b5bbf6048 | ||
|
|
14c9cbd40e | ||
|
|
c4466878cf | ||
|
|
c584221fa2 | ||
|
|
70ba050c06 | ||
|
|
f2281dc38a | ||
|
|
18a2e6265d | ||
|
|
0d593199d0 | ||
|
|
832c4a7565 | ||
|
|
34d22a35dd | ||
|
|
c880716f16 | ||
|
|
f20f4c74d2 | ||
|
|
1fdfa1e6c6 | ||
|
|
4ee49f03df | ||
|
|
52d5278a62 | ||
|
|
35a2b87174 | ||
|
|
664bb2becd | ||
|
|
8865b95818 | ||
|
|
03600dce97 | ||
|
|
8b607efc40 | ||
|
|
9f1af6b3e8 | ||
|
|
c0952ba44b | ||
|
|
9475a2e474 | ||
|
|
5baed0c158 | ||
|
|
97c259858c | ||
|
|
0f90696528 | ||
|
|
ac974a180d | ||
|
|
052380b8de | ||
|
|
23a29439c0 | ||
|
|
a8617e2862 | ||
|
|
6945a6b320 | ||
|
|
b375c9adbf | ||
|
|
88a727739b | ||
|
|
5f3ae4dee3 | ||
|
|
5cbe834024 | ||
|
|
eea5b86cc4 | ||
|
|
09c512abaa | ||
|
|
d42d816e7f | ||
|
|
17effd15ab | ||
|
|
9982eba188 | ||
|
|
aafe527d4a | ||
|
|
e4c53a460e | ||
|
|
ca01596a65 | ||
|
|
4f2415b483 | ||
|
|
f680eacdf2 | ||
|
|
f6dcca3ebb | ||
|
|
1a642fc624 | ||
|
|
c4469514db | ||
|
|
59daf95859 | ||
|
|
3a6e04ba15 | ||
|
|
b26f86d6ff | ||
|
|
570215acae | ||
|
|
a511264433 | ||
|
|
06f25d2b27 | ||
|
|
a3bd355b16 | ||
|
|
1c1cd8b164 | ||
|
|
a898109522 | ||
|
|
3694b10e22 | ||
|
|
39f25d20a8 | ||
|
|
61c1646b43 | ||
|
|
1b9396dcbb | ||
|
|
05be4b5b0e | ||
|
|
f8f8bf0fea | ||
|
|
6643b6a306 | ||
|
|
7036ab26d7 | ||
|
|
9b55169251 | ||
|
|
ff13c9c186 | ||
|
|
879e7305ca | ||
|
|
1ff827b2ea | ||
|
|
e7f1204fa4 | ||
|
|
9a2c4a34ee | ||
|
|
f4c421f77a | ||
|
|
fe84718b55 | ||
|
|
15d71a01d5 | ||
|
|
abe30f2578 | ||
|
|
fdae48547b | ||
|
|
68ca8df22f | ||
|
|
b8da38f4e4 | ||
|
|
1f103ab7f1 | ||
|
|
da6cf33aac | ||
|
|
73f08b376f | ||
|
|
ed34d1fee7 | ||
|
|
e9f4f1d13c | ||
|
|
e5bb330be5 | ||
|
|
e23e22cb81 | ||
|
|
7434026f5f | ||
|
|
5319d33bc6 | ||
|
|
702311b6b2 | ||
|
|
2511bc20e0 | ||
|
|
ce5a6eabae | ||
|
|
581cd97ba1 | ||
|
|
fa2f99641f | ||
|
|
c40f7db1ab | ||
|
|
be1363e943 | ||
|
|
c313039526 | ||
|
|
73db5dda8c | ||
|
|
5a8fb77fb2 | ||
|
|
4b6ebcbb61 | ||
|
|
bc056c41bc | ||
|
|
5b54442a48 | ||
|
|
dc14cce7a9 | ||
|
|
4f278ba715 | ||
|
|
1036fcca36 | ||
|
|
6b286a5dee | ||
|
|
c8ae675b95 | ||
|
|
4186467129 | ||
|
|
726884afcb | ||
|
|
5a2f3e700b | ||
|
|
911fc74346 | ||
|
|
1388f4d27e | ||
|
|
5b87327a43 | ||
|
|
2fc1679886 | ||
|
|
7ba5652bea | ||
|
|
1e9aebbc86 | ||
|
|
61ec361182 | ||
|
|
7781cbbc57 | ||
|
|
f3b806b471 | ||
|
|
6496405f30 | ||
|
|
85a6dc5e8c | ||
|
|
856bbfc9c8 | ||
|
|
ebaa43fa4c | ||
|
|
2d44b3ebea | ||
|
|
984493db30 | ||
|
|
47848769ff | ||
|
|
a8f6f5b974 | ||
|
|
1e13f474cb | ||
|
|
c69c3a9a46 | ||
|
|
3216b143c2 | ||
|
|
cc963d42a0 | ||
|
|
3f95a62e4f | ||
|
|
7f9a9e2e82 | ||
|
|
375ecd4ada | ||
|
|
8875dccd11 | ||
|
|
4c2301fdf6 | ||
|
|
346594c406 | ||
|
|
2609e2db5c | ||
|
|
692d5b4e08 | ||
|
|
c4af7464e5 | ||
|
|
5a1dc3eb8a | ||
|
|
adcbfcf8d6 | ||
|
|
b57607e7d3 | ||
|
|
2f159d4f45 | ||
|
|
93e1040d07 | ||
|
|
403c07c305 | ||
|
|
6253308e2e | ||
|
|
33a014013a | ||
|
|
4637215ab2 | ||
|
|
ceaedbbd7f | ||
|
|
52f8b1a1d7 | ||
|
|
e6d1250185 | ||
|
|
d04e5e49d0 | ||
|
|
a72436f330 | ||
|
|
467403f437 | ||
|
|
bbaac0c6a9 | ||
|
|
753fd4bda3 | ||
|
|
57d2c8c94a | ||
|
|
870ec89e9a | ||
|
|
0c3b70f2fb | ||
|
|
7a367698fe | ||
|
|
c77e99814b | ||
|
|
4ddd69cc55 | ||
|
|
ef4a61c769 | ||
|
|
7dfb5ff5bd | ||
|
|
6b391312ab | ||
|
|
6e62d77e4d | ||
|
|
0281cca9af | ||
|
|
018e2403b1 | ||
|
|
61f4534e2a | ||
|
|
69667317c1 | ||
|
|
530aac0682 | ||
|
|
6e7d8f90b5 | ||
|
|
65bf1086a2 | ||
|
|
98220442b4 | ||
|
|
3c3d2ef2b9 | ||
|
|
67066eb32a | ||
|
|
631df0fe56 | ||
|
|
485870296d | ||
|
|
6e5a1c00dc | ||
|
|
ba487eaaca | ||
|
|
eb0986c3f9 | ||
|
|
baf5be09dc | ||
|
|
f3aed42dd6 | ||
|
|
44531e3009 | ||
|
|
2177a0179e | ||
|
|
e1f333021f | ||
|
|
4040d73c60 | ||
|
|
61bd47ccc1 | ||
|
|
915c366056 | ||
|
|
6888a968f9 | ||
|
|
4e8e5bbb86 | ||
|
|
5752869824 | ||
|
|
39a12622ae | ||
|
|
dca88ff85c | ||
|
|
ab9843cb00 | ||
|
|
72fd1fa58d | ||
|
|
51eac1926f | ||
|
|
c1aed4af45 | ||
|
|
c12447c7c5 | ||
|
|
502bacea82 | ||
|
|
da5ba4ccc8 | ||
|
|
1f2426226b | ||
|
|
c0eb30b604 | ||
|
|
caca3a8048 | ||
|
|
f929419676 | ||
|
|
bc53e78a04 | ||
|
|
3dbea1a7a1 | ||
|
|
644d1db5ef | ||
|
|
07d97d5b26 | ||
|
|
c658b46fe1 | ||
|
|
8a5c9a8c70 | ||
|
|
3e4a525520 | ||
|
|
74ce0f738e | ||
|
|
1073d56245 | ||
|
|
7aa4484a03 | ||
|
|
6c96b60a63 | ||
|
|
ac1900a0fc | ||
|
|
bd3bc5c168 | ||
|
|
9ed43230ca | ||
|
|
7abe9ec4cc | ||
|
|
5ed2527663 | ||
|
|
b87c7cac54 | ||
|
|
0b34579b04 | ||
|
|
31291ebd35 | ||
|
|
e8e0b08f17 | ||
|
|
491ce61a76 | ||
|
|
e12a26dac5 | ||
|
|
7bf1889af1 | ||
|
|
139a2b7b0d | ||
|
|
f230c719d8 | ||
|
|
8703449dfe | ||
|
|
108590d924 | ||
|
|
b2cf5d2958 | ||
|
|
ee5ed44761 | ||
|
|
346913b7f6 | ||
|
|
18a8d2f67f | ||
|
|
3ae10915e4 | ||
|
|
949b9c85ca | ||
|
|
c21c19bd6c | ||
|
|
29125e830b | ||
|
|
1ac4676f4b | ||
|
|
fe5301cebf | ||
|
|
7262601123 | ||
|
|
fcb6cc1e76 | ||
|
|
ff716e7799 | ||
|
|
9c595aff95 | ||
|
|
98dbd1fdc7 | ||
|
|
a6df452841 | ||
|
|
4eab8672b8 | ||
|
|
6e2821b4db | ||
|
|
1564fae011 | ||
|
|
30e40079ca | ||
|
|
65a1d88907 | ||
|
|
e590874a81 | ||
|
|
b28e742683 | ||
|
|
62fdfb937a | ||
|
|
8814195122 | ||
|
|
e2095d4a5d | ||
|
|
78a38e9825 | ||
|
|
712101b63d | ||
|
|
1f18dbb17c | ||
|
|
0d8001adea | ||
|
|
1e44a62494 | ||
|
|
e8b13cb77e | ||
|
|
3f2fd610d9 | ||
|
|
25604dc577 | ||
|
|
0cfc6bf2a6 | ||
|
|
90d7823acb | ||
|
|
b4ae1b6528 | ||
|
|
f442665c46 | ||
|
|
c22498066b | ||
|
|
637883f52b | ||
|
|
f0c0da8551 | ||
|
|
10f42a2b39 | ||
|
|
29baccd857 | ||
|
|
f9814381a7 | ||
|
|
771ea47d37 | ||
|
|
c54beba932 | ||
|
|
a809621f63 | ||
|
|
7ad556346e | ||
|
|
5737c21340 | ||
|
|
77a5ce6bf3 | ||
|
|
fb503f523b | ||
|
|
bf7677ce69 | ||
|
|
1ce8c1cf82 | ||
|
|
4ddccfa5e5 | ||
|
|
5795d332c8 | ||
|
|
823054dc34 | ||
|
|
2ce15f429b | ||
|
|
143411aaf0 | ||
|
|
7d9548400d | ||
|
|
1b1941a896 | ||
|
|
4848c384cd | ||
|
|
d4f38d3894 | ||
|
|
e6acbc5a58 | ||
|
|
8dd4db5d85 | ||
|
|
d436eddc6a | ||
|
|
faf8e9ec6a | ||
|
|
7e6a571cba | ||
|
|
6bee9cd1e4 | ||
|
|
fb2b77e991 | ||
|
|
b914912c06 | ||
|
|
0ce04845de | ||
|
|
073365d5d9 | ||
|
|
3c27587d83 | ||
|
|
dbccc700f1 | ||
|
|
9f90ff2e59 | ||
|
|
4d9c8926b1 | ||
|
|
070695b348 | ||
|
|
c6e97d4dc5 | ||
|
|
a24e78fa92 | ||
|
|
21e0cd7781 | ||
|
|
ed45760425 | ||
|
|
0ca4250bd4 | ||
|
|
5059619947 | ||
|
|
edb228839e | ||
|
|
a9c93c797d | ||
|
|
f826ac35e3 | ||
|
|
9dc512349a | ||
|
|
3ecf16a492 | ||
|
|
584a76ab70 | ||
|
|
e339cde790 | ||
|
|
82a6a0848a | ||
|
|
441cb7980b | ||
|
|
5f523f6966 | ||
|
|
993650f3d6 | ||
|
|
ab330301eb | ||
|
|
bab85dd789 | ||
|
|
acae643a4a | ||
|
|
01f825b0e1 | ||
|
|
796637b31a |
@@ -1,3 +1,3 @@
|
|||||||
[target.x86_64-pc-windows-msvc]
|
[target.x86_64-pc-windows-msvc]
|
||||||
# Link the C runtime statically ; https://github.com/paritytech/parity/issues/6643
|
# Link the C runtime statically ; https://github.com/paritytech/parity-ethereum/issues/6643
|
||||||
rustflags = ["-Ctarget-feature=+crt-static"]
|
rustflags = ["-Ctarget-feature=+crt-static"]
|
||||||
|
|||||||
14
.github/CONTRIBUTING.md
vendored
14
.github/CONTRIBUTING.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Do you have a question?
|
## Do you have a question?
|
||||||
|
|
||||||
Check out our [Basic Usage](https://github.com/paritytech/parity/wiki/Basic-Usage), [Configuration](https://github.com/paritytech/parity/wiki/Configuring-Parity), and [FAQ](https://github.com/paritytech/parity/wiki/FAQ) articles on our [wiki](https://github.com/paritytech/parity/wiki)!
|
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.
|
See also frequently asked questions [tagged with `parity`](https://ethereum.stackexchange.com/questions/tagged/parity?sort=votes&pageSize=50) on Stack Exchange.
|
||||||
|
|
||||||
@@ -10,11 +10,11 @@ See also frequently asked questions [tagged with `parity`](https://ethereum.stac
|
|||||||
|
|
||||||
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.
|
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/issues/new) in our repository and state:
|
Otherwise, just create a [new issue](https://github.com/paritytech/parity-ethereum/issues/new) in our repository and state:
|
||||||
|
|
||||||
- What's your Parity version?
|
- What's your Parity Ethereum version?
|
||||||
- What's your operating system and version?
|
- What's your operating system and version?
|
||||||
- How did you install parity?
|
- How did you install Parity Ethereum?
|
||||||
- Is your node fully synchronized?
|
- Is your node fully synchronized?
|
||||||
- Did you try turning it off and on again?
|
- Did you try turning it off and on again?
|
||||||
|
|
||||||
@@ -22,12 +22,12 @@ Also, try to include **steps to reproduce** the issue and expand on the **actual
|
|||||||
|
|
||||||
## Contribute!
|
## Contribute!
|
||||||
|
|
||||||
If you would like to contribute to Parity, please **fork it**, fix bugs or implement features, and [propose a pull request](https://github.com/paritytech/parity/compare).
|
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://github.com/paritytech/parity/wiki/Coding-guide) in our wiki for more details about hacking on Parity.
|
Please, refer to the [Coding Guide](https://wiki.parity.io/Coding-guide) in our wiki for more details about hacking on Parity.
|
||||||
|
|
||||||
## License.
|
## License.
|
||||||
|
|
||||||
By contributing to Parity, you agree that your contributions will be licensed under the [GPLv3 License](../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.
|
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.
|
||||||
|
|||||||
14
.github/ISSUE_TEMPLATE.md
vendored
14
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,13 +1,11 @@
|
|||||||
_Before filing a new issue, please **provide the following information**._
|
_Before filing a new issue, please **provide the following information**._
|
||||||
|
|
||||||
> I'm running:
|
- **Parity Ethereum version**: 0.0.0
|
||||||
>
|
- **Operating system**: Windows / MacOS / Linux
|
||||||
> - **Which Parity version?**: 0.0.0
|
- **Installation**: homebrew / one-line installer / built from source
|
||||||
> - **Which operating system?**: Windows / MacOS / Linux
|
- **Fully synchronized**: no / yes
|
||||||
> - **How installed?**: via installer / homebrew / binaries / from source
|
- **Network**: ethereum / ropsten / kovan / ...
|
||||||
> - **Are you fully synchronized?**: no / yes
|
- **Restarted**: no / yes
|
||||||
> - **Which network are you connected to?**: ethereum / ropsten / kovan / ...
|
|
||||||
> - **Did you try to restart the node?**: no / yes
|
|
||||||
|
|
||||||
_Your issue description goes here below. Try to include **actual** vs. **expected behavior** and **steps to reproduce** the issue._
|
_Your issue description goes here below. Try to include **actual** vs. **expected behavior** and **steps to reproduce** the issue._
|
||||||
|
|
||||||
|
|||||||
455
.gitlab-ci.yml
455
.gitlab-ci.yml
@@ -1,232 +1,261 @@
|
|||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- push-release
|
|
||||||
- build
|
- build
|
||||||
|
- publish
|
||||||
|
- optional
|
||||||
|
|
||||||
|
image: parity/rust-parity-ethereum-build:xenial
|
||||||
variables:
|
variables:
|
||||||
RUST_BACKTRACE: "1"
|
GIT_STRATEGY: fetch
|
||||||
RUSTFLAGS: ""
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
CARGOFLAGS: ""
|
CI_SERVER_NAME: "GitLab CI"
|
||||||
CI_SERVER_NAME: "GitLab CI"
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||||
cache:
|
|
||||||
key: "$CI_BUILD_STAGE-$CI_BUILD_REF_NAME"
|
.no_git: &no_git # disable git strategy
|
||||||
paths:
|
variables:
|
||||||
- target/
|
GIT_STRATEGY: none
|
||||||
untracked: true
|
GIT_SUBMODULE_STRATEGY: none
|
||||||
linux-amd64:
|
|
||||||
stage: build
|
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
|
||||||
image: parity/rust:gitlab-ci
|
only: &releaseable_branches
|
||||||
only:
|
- stable
|
||||||
- beta
|
- beta
|
||||||
- tags
|
- tags
|
||||||
- stable
|
- schedules
|
||||||
- triggers
|
|
||||||
script:
|
.collect_artifacts: &collect_artifacts
|
||||||
- rustup default stable
|
|
||||||
# ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags 6. binary identifier
|
|
||||||
- scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64 gcc g++ linux
|
|
||||||
tags:
|
|
||||||
- rust-stable
|
|
||||||
artifacts:
|
artifacts:
|
||||||
|
name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"
|
||||||
|
when: on_success
|
||||||
|
expire_in: 1 mos
|
||||||
paths:
|
paths:
|
||||||
- parity.zip
|
- artifacts/
|
||||||
name: "stable-x86_64-unknown-linux-gnu_parity"
|
|
||||||
linux-i686:
|
.docker-cache-status: &docker-cache-status
|
||||||
stage: build
|
variables:
|
||||||
image: parity/rust-i686:gitlab-ci
|
CARGO_HOME: "/ci-cache/parity-ethereum/cargo/${CI_JOB_NAME}"
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 gcc g++ linux
|
|
||||||
tags:
|
|
||||||
- rust-i686
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "i686-unknown-linux-gnu"
|
|
||||||
allow_failure: true
|
|
||||||
linux-armv7:
|
|
||||||
stage: build
|
|
||||||
image: parity/rust-armv7:gitlab-ci
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh armv7-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ linux
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "armv7_unknown_linux_gnueabihf_parity"
|
|
||||||
allow_failure: true
|
|
||||||
linux-armhf:
|
|
||||||
stage: build
|
|
||||||
image: parity/rust-arm:gitlab-ci
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ linux
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "arm-unknown-linux-gnueabihf_parity"
|
|
||||||
allow_failure: true
|
|
||||||
linux-aarch64:
|
|
||||||
stage: build
|
|
||||||
image: parity/rust-arm64:gitlab-ci
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu arm64 aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ linux
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "aarch64-unknown-linux-gnu_parity"
|
|
||||||
linux-snap:
|
|
||||||
stage: build
|
|
||||||
image: parity/snapcraft:gitlab-ci
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh x86_64-unknown-snap-gnu x86_64-unknown-linux-gnu amd64 gcc g++ snap
|
|
||||||
tags:
|
|
||||||
- rust-stable
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "stable-x86_64-unknown-snap-gnu_parity"
|
|
||||||
darwin:
|
|
||||||
stage: build
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos gcc g++ macos
|
|
||||||
tags:
|
|
||||||
- osx
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "x86_64-apple-darwin_parity"
|
|
||||||
windows:
|
|
||||||
cache:
|
|
||||||
key: "%CI_BUILD_STAGE%-%CI_BUILD_REF_NAME%"
|
|
||||||
untracked: true
|
|
||||||
stage: build
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc amd64 "" "" windows
|
|
||||||
tags:
|
|
||||||
- rust-windows
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "x86_64-pc-windows-msvc_parity"
|
|
||||||
android-armv7:
|
|
||||||
stage: build
|
|
||||||
image: parity/parity-android:latest
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- cargo build --target=armv7-linux-androideabi
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
allow_failure: true
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "armv7-linux-androideabi_parity"
|
|
||||||
docker-build:
|
|
||||||
stage: build
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
- master
|
|
||||||
- beta
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
before_script:
|
before_script:
|
||||||
- docker info
|
- SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_error.log RUST_LOG=sccache::server=debug sccache --start-server
|
||||||
script:
|
- sccache -s
|
||||||
- if [ "$CI_BUILD_REF_NAME" == "master" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi
|
after_script:
|
||||||
- echo "Tag:" $DOCKER_TAG
|
- echo "All crate-types:"
|
||||||
- docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
|
- grep 'parse_arguments.*--crate-type' sccache_error.log | sed -re 's/.*"--crate-type", "([^"]+)".*/\1/' | sort | uniq -c
|
||||||
- scripts/docker-build.sh $DOCKER_TAG
|
- echo "Non-cacheable reasons:"
|
||||||
- docker logout
|
- grep CannotCache sccache_error.log | sed -re 's/.*CannotCache\((.+)\).*/\1/' | sort | uniq -c
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- linux-docker
|
||||||
test-coverage:
|
|
||||||
stage: test
|
|
||||||
only:
|
cargo-check 0 3:
|
||||||
- master
|
stage: test
|
||||||
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-test.sh test-coverage
|
- time cargo check --target $CARGO_TARGET --locked --no-default-features
|
||||||
tags:
|
- sccache -s
|
||||||
- kcov
|
|
||||||
allow_failure: true
|
cargo-check 1 3:
|
||||||
test-rust-stable:
|
stage: test
|
||||||
stage: test
|
<<: *docker-cache-status
|
||||||
image: parity/rust:gitlab-ci
|
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-test.sh stable
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features
|
||||||
tags:
|
- sccache -s
|
||||||
- rust-stable
|
|
||||||
test-rust-beta:
|
cargo-check 2 3:
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
<<: *docker-cache-status
|
||||||
- triggers
|
|
||||||
- master
|
|
||||||
image: parity/rust:gitlab-ci
|
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-test.sh beta
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio"
|
||||||
tags:
|
- sccache -s
|
||||||
- rust-beta
|
|
||||||
allow_failure: true
|
cargo-audit:
|
||||||
test-rust-nightly:
|
stage: test
|
||||||
stage: test
|
<<: *docker-cache-status
|
||||||
only:
|
|
||||||
- triggers
|
|
||||||
- master
|
|
||||||
image: parity/rust:gitlab-ci
|
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-test.sh nightly
|
- cargo audit
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
|
validate-chainspecs:
|
||||||
|
stage: test
|
||||||
|
<<: *docker-cache-status
|
||||||
|
script:
|
||||||
|
- ./scripts/gitlab/validate-chainspecs.sh
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
|
test-cpp:
|
||||||
|
stage: build
|
||||||
|
<<: *docker-cache-status
|
||||||
|
script:
|
||||||
|
- ./scripts/gitlab/test-cpp.sh
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
|
test-linux:
|
||||||
|
stage: build
|
||||||
|
<<: *docker-cache-status
|
||||||
|
script:
|
||||||
|
- ./scripts/gitlab/test-linux.sh
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
|
build-android:
|
||||||
|
stage: build
|
||||||
|
image: parity/rust-parity-ethereum-android-build:stretch
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: armv7-linux-androideabi
|
||||||
|
<<: *docker-cache-status
|
||||||
|
<<: *collect_artifacts
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/build-linux.sh
|
||||||
tags:
|
tags:
|
||||||
- rust
|
- linux-docker
|
||||||
- rust-nightly
|
|
||||||
allow_failure: true
|
build-linux: &build-linux
|
||||||
push-release:
|
stage: build
|
||||||
stage: push-release
|
only: *releaseable_branches
|
||||||
|
<<: *docker-cache-status
|
||||||
|
<<: *collect_artifacts
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/build-linux.sh
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
|
build-linux-i386:
|
||||||
|
<<: *build-linux
|
||||||
|
image: parity/rust-parity-ethereum-build:i386
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: i686-unknown-linux-gnu
|
||||||
|
|
||||||
|
build-linux-arm64:
|
||||||
|
<<: *build-linux
|
||||||
|
image: parity/rust-parity-ethereum-build:arm64
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
|
build-linux-armhf:
|
||||||
|
<<: *build-linux
|
||||||
|
image: parity/rust-parity-ethereum-build:armhf
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
||||||
|
|
||||||
|
build-darwin:
|
||||||
|
stage: build
|
||||||
|
only: *releaseable_branches
|
||||||
|
<<: *collect_artifacts
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: x86_64-apple-darwin
|
||||||
|
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
|
||||||
|
CC: gcc
|
||||||
|
CXX: g++
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/build-linux.sh
|
||||||
|
tags:
|
||||||
|
- rust-osx
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
stage: build
|
||||||
|
<<: *collect_artifacts
|
||||||
|
only: *releaseable_branches
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
||||||
|
CARGO_HOME: "C:/ci-cache/parity-ethereum/cargo/$CI_JOB_NAME"
|
||||||
|
GIT_SUBMODULE_STRATEGY: none
|
||||||
|
script:
|
||||||
|
- sh scripts/gitlab/build-windows.sh
|
||||||
|
tags:
|
||||||
|
- rust-windows
|
||||||
|
|
||||||
|
publish-docker:
|
||||||
|
stage: publish
|
||||||
|
only: *releaseable_branches
|
||||||
|
cache: {}
|
||||||
|
dependencies:
|
||||||
|
- build-linux
|
||||||
|
tags:
|
||||||
|
- shell
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/publish-docker.sh parity
|
||||||
|
|
||||||
|
publish-snap: &publish-snap
|
||||||
|
stage: publish
|
||||||
|
only: *releaseable_branches
|
||||||
|
<<: *collect_artifacts
|
||||||
|
image: snapcore/snapcraft
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: amd64
|
||||||
|
cache: {}
|
||||||
|
dependencies:
|
||||||
|
- build-linux
|
||||||
|
tags:
|
||||||
|
- linux-docker
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/publish-snap.sh
|
||||||
|
|
||||||
|
publish-snap-i386:
|
||||||
|
<<: *publish-snap
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: i386
|
||||||
|
dependencies:
|
||||||
|
- build-linux-i386
|
||||||
|
|
||||||
|
publish-snap-arm64:
|
||||||
|
<<: *publish-snap
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: arm64
|
||||||
|
dependencies:
|
||||||
|
- build-linux-arm64
|
||||||
|
|
||||||
|
publish-snap-armhf:
|
||||||
|
<<: *publish-snap
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: armhf
|
||||||
|
dependencies:
|
||||||
|
- build-linux-armhf
|
||||||
|
|
||||||
|
publish-onchain:
|
||||||
|
stage: publish
|
||||||
|
only: *releaseable_branches
|
||||||
|
cache: {}
|
||||||
|
dependencies:
|
||||||
|
- build-linux
|
||||||
|
- build-darwin
|
||||||
|
- build-windows
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/publish-onchain.sh
|
||||||
|
tags:
|
||||||
|
- linux-docker
|
||||||
|
|
||||||
|
publish-awss3-release:
|
||||||
|
image: parity/awscli:latest
|
||||||
|
stage: publish
|
||||||
|
only: *releaseable_branches
|
||||||
|
<<: *no_git
|
||||||
|
cache: {}
|
||||||
|
dependencies:
|
||||||
|
- build-linux
|
||||||
|
- build-darwin
|
||||||
|
- build-windows
|
||||||
|
script:
|
||||||
|
- echo "__________Push binaries to AWS S3____________"
|
||||||
|
- case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
|
||||||
|
(beta|stable|nightly)
|
||||||
|
export BUCKET=releases.parity.io/ethereum;
|
||||||
|
;;
|
||||||
|
(*)
|
||||||
|
export BUCKET=builds-parity;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
- aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
|
||||||
|
- echo "__________Read from S3____________"
|
||||||
|
- aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} --recursive --human-readable --summarize
|
||||||
|
tags:
|
||||||
|
- linux-docker
|
||||||
|
|
||||||
|
publish-docs:
|
||||||
|
stage: publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
- triggers
|
except:
|
||||||
image: parity/rust:gitlab-ci
|
- nightly
|
||||||
|
cache: {}
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-push-release.sh
|
- scripts/gitlab/publish-docs.sh
|
||||||
tags:
|
tags:
|
||||||
- curl
|
- linux-docker
|
||||||
|
|
||||||
|
|||||||
886
CHANGELOG.md
886
CHANGELOG.md
@@ -1,639 +1,279 @@
|
|||||||
## Parity [v1.11.6](https://github.com/paritytech/parity/releases/tag/v1.11.6) (2018-07-09)
|
## Parity-Ethereum [v2.2.5](https://github.com/paritytech/parity-ethereum/releases/tag/v2.2.5) (2018-12-14)
|
||||||
|
Parity-Ethereum 2.2.5-beta is an important release that introduces Constantinople fork at block 7080000 on Mainnet.
|
||||||
|
This release also contains a fix for chains using AuRa + EmptySteps. Read carefully if this applies to you.
|
||||||
|
If you have a chain with`empty_steps` already running, some blocks most likely contain non-strict entries (unordered or duplicated empty steps). In this release`strict_empty_steps_transition` **is enabled by default at block 0** for any chain with `empty_steps`.
|
||||||
|
If your network uses `empty_steps` you **must**:
|
||||||
|
- plan a hard fork and change `strict_empty_steps_transition` to the desire fork block
|
||||||
|
- update the clients of the whole network to 2.2.5-beta / 2.1.10-stable.
|
||||||
|
If for some reason you don't want to do this please set`strict_empty_steps_transition` to `0xfffffffff` to disable it.
|
||||||
|
|
||||||
Parity 1.11.6 is a bug-fix release to improve performance and stability.
|
The full list of included changes:
|
||||||
|
- Backports for beta 2.2.5 ([#10047](https://github.com/paritytech/parity-ethereum/pull/10047))
|
||||||
|
- Bump beta to 2.2.5 ([#10047](https://github.com/paritytech/parity-ethereum/pull/10047))
|
||||||
|
- Fix empty steps ([#9939](https://github.com/paritytech/parity-ethereum/pull/9939))
|
||||||
|
- Prevent sending empty step message twice
|
||||||
|
- Prevent sending empty step and then block in the same step
|
||||||
|
- Don't accept double empty steps
|
||||||
|
- Do basic validation of self-sealed blocks
|
||||||
|
- Strict empty steps validation ([#10041](https://github.com/paritytech/parity-ethereum/pull/10041))
|
||||||
|
- Enables strict verification of empty steps - there can be no duplicates and empty steps should be ordered inside the seal.
|
||||||
|
- Note that authorities won't produce invalid seals after [#9939](https://github.com/paritytech/parity-ethereum/pull/9939), this PR just adds verification to the seal to prevent forging incorrect blocks and potentially causing consensus issues.
|
||||||
|
- This features is enabled by default so any AuRa + EmptySteps chain should set strict_empty_steps_transition fork block number in their spec and upgrade to v2.2.5-beta or v2.1.10-stable.
|
||||||
|
- ethcore: enable constantinople on ethereum ([#10031](https://github.com/paritytech/parity-ethereum/pull/10031))
|
||||||
|
- ethcore: change blockreward to 2e18 for foundation after constantinople
|
||||||
|
- ethcore: delay diff bomb by 2e6 blocks for foundation after constantinople
|
||||||
|
- ethcore: enable eip-{145,1014,1052,1283} for foundation after constantinople
|
||||||
|
- Change test miner max memory to malloc reports. ([#10024](https://github.com/paritytech/parity-ethereum/pull/10024))
|
||||||
|
- Fix: test corpus_inaccessible panic ([#10019](https://github.com/paritytech/parity-ethereum/pull/10019))
|
||||||
|
|
||||||
|
## Parity-Ethereum [v2.2.2](https://github.com/paritytech/parity-ethereum/releases/tag/v2.2.2) (2018-11-29)
|
||||||
|
|
||||||
|
Parity-Ethereum 2.2.2-beta is an exciting release. Among others, it improves sync performance, peering stability, block propagation, and transaction propagation times. Also, a warp-sync no longer removes existing blocks from the database, but rather reuses locally available information to decrease sync times and reduces required bandwidth.
|
||||||
|
|
||||||
|
Before upgrading to 2.2.2, please also verify the validity of your chain specs. Parity Ethereum now denies unknown fields in the specification. To do this, use the chainspec tool:
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo build --release -p chainspec
|
||||||
|
./target/release/chainspec /path/to/spec.json
|
||||||
|
```
|
||||||
|
|
||||||
|
Last but not least, JSONRPC APIs which are not yet accepted as an EIP in the `eth`, `personal`, or `web3` namespace, are now considere experimental as their final specification might change in future. These APIs have to be manually enabled by explicitly running `--jsonrpc-experimental`.
|
||||||
|
|
||||||
The full list of included changes:
|
The full list of included changes:
|
||||||
|
|
||||||
- Beta: 1.11.6 backports ([#9015](https://github.com/paritytech/parity/pull/9015))
|
- Backports For beta 2.2.2 ([#9976](https://github.com/paritytech/parity-ethereum/pull/9976))
|
||||||
- Parity-version: bump beta to 1.11.6
|
- Version: bump beta to 2.2.2
|
||||||
- Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity/pull/8884))
|
- Add experimental RPCs flag ([#9928](https://github.com/paritytech/parity-ethereum/pull/9928))
|
||||||
- Add support for --chain tobalaba
|
- Keep existing blocks when restoring a Snapshot ([#8643](https://github.com/paritytech/parity-ethereum/pull/8643))
|
||||||
- Convert indents to tabs :)
|
- Rename db_restore => client
|
||||||
- Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity/pull/8998))
|
- First step: make it compile!
|
||||||
- Aura: only report after checking for repeated skipped primaries
|
- Second step: working implementation!
|
||||||
- Aura: refactor duplicate code for getting epoch validator set
|
- Refactoring
|
||||||
- Aura: verify_external: report on validator set contract instance
|
- Fix tests
|
||||||
- Aura: use correct validator set epoch number when reporting
|
- Migrate ancient blocks interacting backward
|
||||||
- Aura: use epoch set when verifying blocks
|
- Early return in block migration if snapshot is aborted
|
||||||
- Aura: report skipped primaries when generating seal
|
- Remove RwLock getter (PR Grumble I)
|
||||||
- Aura: handle immediate transitions
|
- Remove dependency on `Client`: only used Traits
|
||||||
- Aura: don't report skipped steps from genesis to first block
|
- Add test for recovering aborted snapshot recovery
|
||||||
- Aura: fix reporting test
|
- Add test for migrating old blocks
|
||||||
- Aura: refactor duplicate code to handle immediate_transitions
|
- Release RwLock earlier
|
||||||
- Aura: let reporting fail on verify_block_basic
|
- Revert Cargo.lock
|
||||||
- Aura: add comment about possible failure of reporting
|
- Update _update ancient block_ logic: set local in `commit`
|
||||||
- Only return error log for rustls ([#9025](https://github.com/paritytech/parity/pull/9025))
|
- Update typo in ethcore/src/snapshot/service.rs
|
||||||
- Transaction Pool improvements ([#8470](https://github.com/paritytech/parity/pull/8470))
|
- Adjust requests costs for light client ([#9925](https://github.com/paritytech/parity-ethereum/pull/9925))
|
||||||
- Don't use ethereum_types in transaction pool.
|
- Pip Table Cost relative to average peers instead of max peers
|
||||||
- Hide internal insertion_id.
|
- Add tracing in PIP new_cost_table
|
||||||
|
- Update stat peer_count
|
||||||
|
- Use number of leeching peers for Light serve costs
|
||||||
|
- Fix test::light_params_load_share_depends_on_max_peers (wrong type)
|
||||||
|
- Remove (now) useless test
|
||||||
|
- Remove `load_share` from LightParams.Config
|
||||||
|
- Add LEECHER_COUNT_FACTOR
|
||||||
|
- Pr Grumble: u64 to u32 for f64 casting
|
||||||
|
- Prevent u32 overflow for avg_peer_count
|
||||||
|
- Add tests for LightSync::Statistics
|
||||||
|
- Fix empty steps ([#9939](https://github.com/paritytech/parity-ethereum/pull/9939))
|
||||||
|
- Don't send empty step twice or empty step then block.
|
||||||
|
- Perform basic validation of locally sealed blocks.
|
||||||
|
- Don't include empty step twice.
|
||||||
|
- Prevent silent errors in daemon mode, closes [#9367](https://github.com/paritytech/parity-ethereum/issues/9367) ([#9946](https://github.com/paritytech/parity-ethereum/pull/9946))
|
||||||
|
- Fix a deadlock ([#9952](https://github.com/paritytech/parity-ethereum/pull/9952))
|
||||||
|
- Update informant:
|
||||||
|
- Decimal in Mgas/s
|
||||||
|
- Print every 5s (not randomly between 5s and 10s)
|
||||||
|
- Fix dead-lock in `blockchain.rs`
|
||||||
|
- Update locks ordering
|
||||||
|
- Fix light client informant while syncing ([#9932](https://github.com/paritytech/parity-ethereum/pull/9932))
|
||||||
|
- Add `is_idle` to LightSync to check importing status
|
||||||
|
- Use SyncStateWrapper to make sure is_idle gets updates
|
||||||
|
- Update is_major_import to use verified queue size as well
|
||||||
|
- Add comment for `is_idle`
|
||||||
|
- Add Debug to `SyncStateWrapper`
|
||||||
|
- `fn get` -> `fn into_inner`
|
||||||
|
- Ci: rearrange pipeline by logic ([#9970](https://github.com/paritytech/parity-ethereum/pull/9970))
|
||||||
|
- Ci: rearrange pipeline by logic
|
||||||
|
- Ci: rename docs script
|
||||||
|
- Fix docker build ([#9971](https://github.com/paritytech/parity-ethereum/pull/9971))
|
||||||
|
- Deny unknown fields for chainspec ([#9972](https://github.com/paritytech/parity-ethereum/pull/9972))
|
||||||
|
- Add deny_unknown_fields to chainspec
|
||||||
|
- Add tests and fix existing one
|
||||||
|
- Remove serde_ignored dependency for chainspec
|
||||||
|
- Fix rpc test eth chain spec
|
||||||
|
- Fix starting_nonce_test spec
|
||||||
|
- Improve block and transaction propagation ([#9954](https://github.com/paritytech/parity-ethereum/pull/9954))
|
||||||
|
- Refactor sync to add priority tasks.
|
||||||
|
- Send priority tasks notifications.
|
||||||
|
- Propagate blocks, optimize transactions.
|
||||||
|
- Implement transaction propagation. Use sync_channel.
|
||||||
|
- Tone down info.
|
||||||
|
- Prevent deadlock by not waiting forever for sync lock.
|
||||||
|
- Fix lock order.
|
||||||
|
- Don't use sync_channel to prevent deadlocks.
|
||||||
- Fix tests.
|
- Fix tests.
|
||||||
- Review grumbles.
|
- Fix unstable peers and slowness in sync ([#9967](https://github.com/paritytech/parity-ethereum/pull/9967))
|
||||||
- Improve should_replace on NonceAndGasPrice ([#8980](https://github.com/paritytech/parity/pull/8980))
|
- Don't sync all peers after each response
|
||||||
- Additional tests for NonceAndGasPrice::should_replace.
|
- Update formating
|
||||||
- Fix should_replace in the distinct sender case.
|
- Fix tests: add `continue_sync` to `Sync_step`
|
||||||
- Use natural priority ordering to simplify should_replace.
|
- Update ethcore/sync/src/chain/mod.rs
|
||||||
- Minimal effective gas price in the queue ([#8934](https://github.com/paritytech/parity/pull/8934))
|
- Fix rpc middlewares
|
||||||
- Minimal effective gas price.
|
- Fix Cargo.lock
|
||||||
- Fix naming, add test
|
- Json: resolve merge in spec
|
||||||
- Fix minimal entry score and add test.
|
- Rpc: fix starting_nonce_test
|
||||||
- Fix worst_transaction.
|
- Ci: allow nightl job to fail
|
||||||
- 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-Ethereum [v2.2.1](https://github.com/paritytech/parity-ethereum/releases/tag/v2.2.1) (2018-11-15)
|
||||||
|
|
||||||
Parity 1.11.5 is a bug-fix release to improve performance and stability.
|
Parity-Ethereum 2.2.1-beta is the first v2.2 release, and might introduce features that break previous work flows, among others:
|
||||||
|
|
||||||
|
- Prevent zero network ID ([#9763](https://github.com/paritytech/parity-ethereum/pull/9763)) and drop support for Olympic testnet ([#9801](https://github.com/paritytech/parity-ethereum/pull/9801)): The Olympic test net is dead for years and never used a chain ID but network ID zero. Parity Ethereum is now preventing the network ID to be zero, thus Olympic support is dropped. Make sure to chose positive non-zero network IDs in future.
|
||||||
|
- Multithreaded snapshot creation ([#9239](https://github.com/paritytech/parity-ethereum/pull/9239)): adds a CLI argument `--snapshot-threads` which specifies the number of threads. This helps improving the performance of full nodes that wish to provide warp-snapshots for the network. The gain in performance comes with a slight drawback in increased snapshot size.
|
||||||
|
- Expose config max-round-blocks-to-import ([#9439](https://github.com/paritytech/parity-ethereum/pull/9439)): Parity Ethereum imports blocks in rounds. If at the end of any round, the queue is not empty, we consider it to be _importing_ and won't notify pubsub. On large re-orgs (10+ blocks), this is possible. The default `max_round_blocks_to_import` is increased to 12 and configurable via the `--max-round-blocks-to-import` CLI flag. With unstable network conditions, it is advised to increase the number. This shouldn't have any noticeable performance impact unless the number is set to really large.
|
||||||
|
- Increase Gas-floor-target and Gas Cap ([#9564](https://github.com/paritytech/parity-ethereum/pull/9564)): the default values for gas floor target are `8_000_000` and gas cap `10_000_000`, similar to Geth 1.8.15+.
|
||||||
|
- Produce portable binaries ([#9725](https://github.com/paritytech/parity-ethereum/pull/9725)): we now produce portable binaries, but it may incur some performance degradation. For ultimate performance it's now better to compile Parity Ethereum from source with `PORTABLE=OFF` environment variable.
|
||||||
|
- RPC: `parity_allTransactionHashes` ([#9745](https://github.com/paritytech/parity-ethereum/pull/9745)): Get all pending transactions from the queue with the high performant `parity_allTransactionHashes` RPC method.
|
||||||
|
- Support `eth_chainId` RPC method ([#9783](https://github.com/paritytech/parity-ethereum/pull/9783)): implements EIP-695 to get the chainID via RPC.
|
||||||
|
- AuRa: finalize blocks ([#9692](https://github.com/paritytech/parity-ethereum/pull/9692)): The AuRa engine was updated to emit ancestry actions to finalize blocks. The full client stores block finality in the database, the engine builds finality from an ancestry of `ExtendedHeader`; `is_epoch_end` was updated to take a vec of recently finalized headers; `is_epoch_end_light` was added which maintains the previous interface and is used by the light client since the client itself doesn't track finality.
|
||||||
|
|
||||||
The full list of included changes:
|
The full list of included changes:
|
||||||
|
|
||||||
- Bump beta to 1.11.5 / Backports ([#8955](https://github.com/paritytech/parity/pull/8955))
|
- Backport to parity 2.2.1 beta ([#9905](https://github.com/paritytech/parity-ethereum/pull/9905))
|
||||||
- Parity-version: bump beta to 1.11.5
|
- Bump version to 2.2.1
|
||||||
- Update ropsten.json ([#8926](https://github.com/paritytech/parity/pull/8926))
|
- Fix: Intermittent failing CI due to addr in use ([#9885](https://github.com/paritytech/parity-ethereum/pull/9885))
|
||||||
- Update hardcoded headers ([#8925](https://github.com/paritytech/parity/pull/8925))
|
- Fix Parity not closing on Ctrl-C ([#9886](https://github.com/paritytech/parity-ethereum/pull/9886))
|
||||||
- Update kovan.json
|
- Fix json tracer overflow ([#9873](https://github.com/paritytech/parity-ethereum/pull/9873))
|
||||||
- Update Kovan to block 7693549
|
- Fix docker script ([#9854](https://github.com/paritytech/parity-ethereum/pull/9854))
|
||||||
- Update foundation.json
|
- Add hardcoded headers for light client ([#9907](https://github.com/paritytech/parity-ethereum/pull/9907))
|
||||||
- Updated to block 5812225
|
- Gitlab-ci: make android release build succeed ([#9743](https://github.com/paritytech/parity-ethereum/pull/9743))
|
||||||
- Update ropsten.json
|
- Allow to seal work on latest block ([#9876](https://github.com/paritytech/parity-ethereum/pull/9876))
|
||||||
- Update to 3465217
|
- Remove rust-toolchain file ([#9906](https://github.com/paritytech/parity-ethereum/pull/9906))
|
||||||
- Scripts: minor improvements ([#8930](https://github.com/paritytech/parity/pull/8930))
|
- Light-fetch: Differentiate between out-of-gas/manual throw and use required gas from response on failure ([#9824](https://github.com/paritytech/parity-ethereum/pull/9824))
|
||||||
- CI: enable 'latest' docker tag on master pipeline
|
- Eip-712 implementation ([#9631](https://github.com/paritytech/parity-ethereum/pull/9631))
|
||||||
- CI: mark both beta and stable as stable snap.
|
- Eip-191 implementation ([#9701](https://github.com/paritytech/parity-ethereum/pull/9701))
|
||||||
- CI: sign all windows binaries
|
- Simplify cargo audit ([#9918](https://github.com/paritytech/parity-ethereum/pull/9918))
|
||||||
- Scripts: fix docker build tag on latest using master ([#8952](https://github.com/paritytech/parity/pull/8952))
|
- Fix performance issue importing Kovan blocks ([#9914](https://github.com/paritytech/parity-ethereum/pull/9914))
|
||||||
- Rpc: cap gas limit of local calls ([#8943](https://github.com/paritytech/parity/pull/8943))
|
- Ci: nuke the gitlab caches ([#9855](https://github.com/paritytech/parity-ethereum/pull/9855))
|
||||||
- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 ([#8984](https://github.com/paritytech/parity/pull/8984))
|
- Backports to parity beta 2.2.0 ([#9820](https://github.com/paritytech/parity-ethereum/pull/9820))
|
||||||
- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530
|
- Ci: remove failing tests for android, windows, and macos ([#9788](https://github.com/paritytech/parity-ethereum/pull/9788))
|
||||||
- Snap: use plugin rust
|
- Implement NoProof for json tests and update tests reference ([#9814](https://github.com/paritytech/parity-ethereum/pull/9814))
|
||||||
- Fix deadlock in blockchain. ([#8977](https://github.com/paritytech/parity/pull/8977))
|
- Move state root verification before gas used ([#9841](https://github.com/paritytech/parity-ethereum/pull/9841))
|
||||||
- Remove js-glue from workspace
|
- Classic.json Bootnode Update ([#9828](https://github.com/paritytech/parity-ethereum/pull/9828))
|
||||||
- This fixes test error on Rust 1.27 but also prevents js-glue from building itself.
|
- Rpc: parity_allTransactionHashes ([#9745](https://github.com/paritytech/parity-ethereum/pull/9745))
|
||||||
- Builtin dapp users can still use js-glue from crates.io.
|
- Revert "prevent zero networkID ([#9763](https://github.com/paritytech/parity-ethereum/pull/9763))" ([#9815](https://github.com/paritytech/parity-ethereum/pull/9815))
|
||||||
- Fix Android build on beta ([#9003](https://github.com/paritytech/parity/pull/9003))
|
- Allow zero chain id in EIP155 signing process ([#9792](https://github.com/paritytech/parity-ethereum/pull/9792))
|
||||||
|
- Add readiness check for docker container ([#9804](https://github.com/paritytech/parity-ethereum/pull/9804))
|
||||||
## Parity [v1.11.4](https://github.com/paritytech/parity/releases/tag/v1.11.4) (2018-06-20)
|
- Insert dev account before unlocking ([#9813](https://github.com/paritytech/parity-ethereum/pull/9813))
|
||||||
|
- Removed "rustup" & added new runner tag ([#9731](https://github.com/paritytech/parity-ethereum/pull/9731))
|
||||||
Parity 1.11.4 is a bug-fix release to improve performance and stability.
|
- Expose config max-round-blocks-to-import ([#9439](https://github.com/paritytech/parity-ethereum/pull/9439))
|
||||||
|
- Aura: finalize blocks ([#9692](https://github.com/paritytech/parity-ethereum/pull/9692))
|
||||||
The full list of included changes:
|
- Sync: retry different peer after empty subchain heads response ([#9753](https://github.com/paritytech/parity-ethereum/pull/9753))
|
||||||
|
- Fix(light-rpc/parity) : Remove unused client ([#9802](https://github.com/paritytech/parity-ethereum/pull/9802))
|
||||||
- Backports ([#8916](https://github.com/paritytech/parity/pull/8916))
|
- Drops support for olympic testnet, closes [#9800](https://github.com/paritytech/parity-ethereum/issues/9800) ([#9801](https://github.com/paritytech/parity-ethereum/pull/9801))
|
||||||
- `Duration_ns: u64 -> duration: Duration` ([#8457](https://github.com/paritytech/parity/pull/8457))
|
- Replace `tokio_core` with `tokio` (`ring` -> 0.13) ([#9657](https://github.com/paritytech/parity-ethereum/pull/9657))
|
||||||
- Duration_ns: u64 -> duration: Duration
|
- Support eth_chainId RPC method ([#9783](https://github.com/paritytech/parity-ethereum/pull/9783))
|
||||||
- Format on millis {:.2} -> {}
|
- Ethcore: bump ropsten forkblock checkpoint ([#9775](https://github.com/paritytech/parity-ethereum/pull/9775))
|
||||||
- Keep all enacted blocks notify in order ([#8524](https://github.com/paritytech/parity/pull/8524))
|
- Docs: changelogs for 2.0.8 and 2.1.3 ([#9758](https://github.com/paritytech/parity-ethereum/pull/9758))
|
||||||
- Keep all enacted blocks notify in order
|
- Prevent zero networkID ([#9763](https://github.com/paritytech/parity-ethereum/pull/9763))
|
||||||
- Collect is unnecessary
|
- Skip seal fields count check when --no-seal-check is used ([#9757](https://github.com/paritytech/parity-ethereum/pull/9757))
|
||||||
- Update ChainNotify to use ChainRouteType
|
- Aura: fix panic on extra_info with unsealed block ([#9755](https://github.com/paritytech/parity-ethereum/pull/9755))
|
||||||
- Fix all ethcore fn defs
|
- Docs: update changelogs ([#9742](https://github.com/paritytech/parity-ethereum/pull/9742))
|
||||||
- Wrap the type within ChainRoute
|
- Removed extra assert in generation_session_is_removed_when_succeeded ([#9738](https://github.com/paritytech/parity-ethereum/pull/9738))
|
||||||
- Fix private-tx and sync api
|
- Make checkpoint_storage_at use plain loop instead of recursion ([#9734](https://github.com/paritytech/parity-ethereum/pull/9734))
|
||||||
- Fix secret_store API
|
- Use signed 256-bit integer for sstore gas refund substate ([#9746](https://github.com/paritytech/parity-ethereum/pull/9746))
|
||||||
- Fix updater API
|
- Heads ref not present for branches beta and stable ([#9741](https://github.com/paritytech/parity-ethereum/pull/9741))
|
||||||
- Fix rpc api
|
- Add Callisto support ([#9534](https://github.com/paritytech/parity-ethereum/pull/9534))
|
||||||
- Fix informant api
|
- Add --force to cargo audit install script ([#9735](https://github.com/paritytech/parity-ethereum/pull/9735))
|
||||||
- Eagerly cache enacted/retracted and remove contain_enacted/retracted
|
- Remove unused expired value from Handshake ([#9732](https://github.com/paritytech/parity-ethereum/pull/9732))
|
||||||
- Fix indent
|
- Add hardcoded headers ([#9730](https://github.com/paritytech/parity-ethereum/pull/9730))
|
||||||
- Tests: should use full expr form for struct constructor
|
- Produce portable binaries ([#9725](https://github.com/paritytech/parity-ethereum/pull/9725))
|
||||||
- Use into_enacted_retracted to further avoid copy
|
- Gitlab ci: releasable_branches: change variables condition to schedule ([#9729](https://github.com/paritytech/parity-ethereum/pull/9729))
|
||||||
- Typo: not a function
|
- Update a few parity-common dependencies ([#9663](https://github.com/paritytech/parity-ethereum/pull/9663))
|
||||||
- Rpc/tests: ChainRoute -> ChainRoute::new
|
- Hf in POA Core (2018-10-22) ([#9724](https://github.com/paritytech/parity-ethereum/pull/9724))
|
||||||
- Handle removed logs in filter changes and add geth compatibility field ([#8796](https://github.com/paritytech/parity/pull/8796))
|
- Schedule nightly builds ([#9717](https://github.com/paritytech/parity-ethereum/pull/9717))
|
||||||
- Add removed geth compatibility field in log
|
- Fix ancient blocks sync ([#9531](https://github.com/paritytech/parity-ethereum/pull/9531))
|
||||||
- Fix mocked tests
|
- Ci: Skip docs job for nightly ([#9693](https://github.com/paritytech/parity-ethereum/pull/9693))
|
||||||
- Add field block hash in PollFilter
|
- Fix (light/provider) : Make `read_only executions` read-only ([#9591](https://github.com/paritytech/parity-ethereum/pull/9591))
|
||||||
- Store last block hash info for log filters
|
- Ethcore: fix detection of major import ([#9552](https://github.com/paritytech/parity-ethereum/pull/9552))
|
||||||
- Implement canon route
|
- Return 0 on error ([#9705](https://github.com/paritytech/parity-ethereum/pull/9705))
|
||||||
- Use canon logs for fetching reorg logs
|
- Ethcore: delay ropsten hardfork ([#9704](https://github.com/paritytech/parity-ethereum/pull/9704))
|
||||||
- Make sure removed flag is set
|
- Make instantSeal engine backwards compatible, closes [#9696](https://github.com/paritytech/parity-ethereum/issues/9696) ([#9700](https://github.com/paritytech/parity-ethereum/pull/9700))
|
||||||
- Address grumbles
|
- Implement CREATE2 gas changes and fix some potential overflowing ([#9694](https://github.com/paritytech/parity-ethereum/pull/9694))
|
||||||
- Fixed AuthorityRound deadlock on shutdown, closes [#8088](https://github.com/paritytech/parity/issues/8088) ([#8803](https://github.com/paritytech/parity/pull/8803))
|
- Don't hash the init_code of CREATE. ([#9688](https://github.com/paritytech/parity-ethereum/pull/9688))
|
||||||
- Ci: Fix docker tags ([#8822](https://github.com/paritytech/parity/pull/8822))
|
- Ethcore: minor optimization of modexp by using LR exponentiation ([#9697](https://github.com/paritytech/parity-ethereum/pull/9697))
|
||||||
- Scripts: enable docker builds for beta and stable
|
- Removed redundant clone before each block import ([#9683](https://github.com/paritytech/parity-ethereum/pull/9683))
|
||||||
- Scripts: docker latest should be beta not master
|
- Add Foundation Bootnodes ([#9666](https://github.com/paritytech/parity-ethereum/pull/9666))
|
||||||
- Scripts: docker latest is master
|
- Docker: run as parity user ([#9689](https://github.com/paritytech/parity-ethereum/pull/9689))
|
||||||
- Ethcore: fix ancient block error msg handling ([#8832](https://github.com/paritytech/parity/pull/8832))
|
- Ethcore: mcip3 block reward contract ([#9605](https://github.com/paritytech/parity-ethereum/pull/9605))
|
||||||
- Disable parallel verification and skip verifiying already imported txs. ([#8834](https://github.com/paritytech/parity/pull/8834))
|
- Verify block syncing responses against requests ([#9670](https://github.com/paritytech/parity-ethereum/pull/9670))
|
||||||
- Reject transactions that are already in pool without verifying them.
|
- Add a new RPC `parity_submitWorkDetail` similar `eth_submitWork` but return block hash ([#9404](https://github.com/paritytech/parity-ethereum/pull/9404))
|
||||||
- Avoid verifying already imported transactions.
|
- Resumable EVM and heap-allocated callstack ([#9360](https://github.com/paritytech/parity-ethereum/pull/9360))
|
||||||
- Fix concurrent access to signer queue ([#8854](https://github.com/paritytech/parity/pull/8854))
|
- Update parity-wordlist library ([#9682](https://github.com/paritytech/parity-ethereum/pull/9682))
|
||||||
- Fix concurrent access to signer queue
|
- Ci: Remove unnecessary pipes ([#9681](https://github.com/paritytech/parity-ethereum/pull/9681))
|
||||||
- Put request back to the queue if confirmation failed
|
- Test.sh: use cargo --target for platforms other than linux, win or mac ([#9650](https://github.com/paritytech/parity-ethereum/pull/9650))
|
||||||
- Typo: fix docs and rename functions to be more specific
|
- Ci: fix push script ([#9679](https://github.com/paritytech/parity-ethereum/pull/9679))
|
||||||
- Change trace info "Transaction" -> "Request"
|
- Hardfork the testnets ([#9562](https://github.com/paritytech/parity-ethereum/pull/9562))
|
||||||
- Don't allocate in expect_valid_rlp unless necessary ([#8867](https://github.com/paritytech/parity/pull/8867))
|
- Calculate sha3 instead of sha256 for push-release. ([#9673](https://github.com/paritytech/parity-ethereum/pull/9673))
|
||||||
- Don't allocate via format! in case there's no error
|
- Ethcore-io retries failed work steal ([#9651](https://github.com/paritytech/parity-ethereum/pull/9651))
|
||||||
- Fix test?
|
- Fix(light_fetch): avoid race with BlockNumber::Latest ([#9665](https://github.com/paritytech/parity-ethereum/pull/9665))
|
||||||
- Fixed ipc leak, closes [#8774](https://github.com/paritytech/parity/issues/8774) ([#8876](https://github.com/paritytech/parity/pull/8876))
|
- Test fix for windows cache name... ([#9658](https://github.com/paritytech/parity-ethereum/pull/9658))
|
||||||
- Add new ovh bootnodes and fix port for foundation bootnode 3.2 ([#8886](https://github.com/paritytech/parity/pull/8886))
|
- Refactor(fetch) : light use only one `DNS` thread ([#9647](https://github.com/paritytech/parity-ethereum/pull/9647))
|
||||||
- Add new ovh bootnodes and fix port for foundation bootnode 3.2
|
- Ethereum libfuzzer integration small change ([#9547](https://github.com/paritytech/parity-ethereum/pull/9547))
|
||||||
- Remove old bootnodes.
|
- Cli: remove reference to --no-ui in --unlock flag help ([#9616](https://github.com/paritytech/parity-ethereum/pull/9616))
|
||||||
- Remove duplicate 1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082
|
- Remove master from releasable branches ([#9655](https://github.com/paritytech/parity-ethereum/pull/9655))
|
||||||
- Block 0 is valid in queries ([#8891](https://github.com/paritytech/parity/pull/8891))
|
- Ethcore/VerificationQueue don't spawn up extra `worker-threads` when explictly specified not to ([#9620](https://github.com/paritytech/parity-ethereum/pull/9620))
|
||||||
- Add ETC Cooperative-run load balanced parity node ([#8892](https://github.com/paritytech/parity/pull/8892))
|
- Rpc: parity_getBlockReceipts ([#9527](https://github.com/paritytech/parity-ethereum/pull/9527))
|
||||||
- Minor fix in chain supplier and light provider ([#8906](https://github.com/paritytech/parity/pull/8906))
|
- Remove unused dependencies ([#9589](https://github.com/paritytech/parity-ethereum/pull/9589))
|
||||||
- Fix chain supplier increment
|
- Ignore key_server_cluster randomly failing tests ([#9639](https://github.com/paritytech/parity-ethereum/pull/9639))
|
||||||
- Fix light provider block_headers
|
- Ethcore: handle vm exception when estimating gas ([#9615](https://github.com/paritytech/parity-ethereum/pull/9615))
|
||||||
- Check whether we need resealing in miner and unwrap has_account in account_provider ([#8853](https://github.com/paritytech/parity/pull/8853))
|
- Fix bad-block reporting no reason ([#9638](https://github.com/paritytech/parity-ethereum/pull/9638))
|
||||||
- Remove unused Result wrap in has_account
|
- Use static call and apparent value transfer for block reward contract code ([#9603](https://github.com/paritytech/parity-ethereum/pull/9603))
|
||||||
- Check whether we need to reseal for external transactions
|
- Hf in POA Sokol (2018-09-19) ([#9607](https://github.com/paritytech/parity-ethereum/pull/9607))
|
||||||
- Fix reference to has_account interface
|
- Bump smallvec to 0.6 in ethcore-light, ethstore and whisper ([#9588](https://github.com/paritytech/parity-ethereum/pull/9588))
|
||||||
- Typo: missing )
|
- Add constantinople conf to EvmTestClient. ([#9570](https://github.com/paritytech/parity-ethereum/pull/9570))
|
||||||
- Refactor duplicates to prepare_and_update_sealing
|
- Fix(network): don't disconnect reserved peers ([#9608](https://github.com/paritytech/parity-ethereum/pull/9608))
|
||||||
- Fix build
|
- Fix failing node-table tests on mac os, closes [#9632](https://github.com/paritytech/parity-ethereum/issues/9632) ([#9633](https://github.com/paritytech/parity-ethereum/pull/9633))
|
||||||
- Allow disabling local-by-default for transactions with new config entry ([#8882](https://github.com/paritytech/parity/pull/8882))
|
- Update ropsten.json ([#9602](https://github.com/paritytech/parity-ethereum/pull/9602))
|
||||||
- Add tx_queue_allow_unknown_local config option
|
- Simplify ethcore errors by removing BlockImportError ([#9593](https://github.com/paritytech/parity-ethereum/pull/9593))
|
||||||
- Refactor flag name + don't change import_own_tx behaviour
|
- Fix windows compilation, replaces [#9561](https://github.com/paritytech/parity-ethereum/issues/9561) ([#9621](https://github.com/paritytech/parity-ethereum/pull/9621))
|
||||||
- Add fn to TestMinerService
|
- Master: rpc-docs set github token ([#9610](https://github.com/paritytech/parity-ethereum/pull/9610))
|
||||||
- Avoid race condition from trusted sources
|
- Docs: add changelogs for 1.11.10, 1.11.11, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.1.0, and 2.1.1 ([#9554](https://github.com/paritytech/parity-ethereum/pull/9554))
|
||||||
- Parity-version: beta release 1.11.4 ([#8856](https://github.com/paritytech/parity/pull/8856))
|
- Docs(rpc): annotate tag with the provided message ([#9601](https://github.com/paritytech/parity-ethereum/pull/9601))
|
||||||
- Cherry-pick network-specific release flag ([#8821](https://github.com/paritytech/parity/pull/8821))
|
- Ci: fix regex roll_eyes ([#9597](https://github.com/paritytech/parity-ethereum/pull/9597))
|
||||||
- Parity-version: bump beta to 1.11.4
|
- Remove snapcraft clean ([#9585](https://github.com/paritytech/parity-ethereum/pull/9585))
|
||||||
- Parity-version: remove merge leftovers
|
- Add snapcraft package image (master) ([#9584](https://github.com/paritytech/parity-ethereum/pull/9584))
|
||||||
|
- Docs(rpc): push the branch along with tags ([#9578](https://github.com/paritytech/parity-ethereum/pull/9578))
|
||||||
## Parity [v1.11.3](https://github.com/paritytech/parity/releases/tag/v1.11.3) (2018-06-06)
|
- Fix typo for jsonrpc-threads flag ([#9574](https://github.com/paritytech/parity-ethereum/pull/9574))
|
||||||
|
- Fix informant compile ([#9571](https://github.com/paritytech/parity-ethereum/pull/9571))
|
||||||
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).
|
- Added ropsten bootnodes ([#9569](https://github.com/paritytech/parity-ethereum/pull/9569))
|
||||||
|
- Increase Gas-floor-target and Gas Cap ([#9564](https://github.com/paritytech/parity-ethereum/pull/9564))
|
||||||
The full list of included changes:
|
- While working on the platform tests make them non-breaking ([#9563](https://github.com/paritytech/parity-ethereum/pull/9563))
|
||||||
|
- Improve P2P discovery ([#9526](https://github.com/paritytech/parity-ethereum/pull/9526))
|
||||||
- Parity-version: bump beta to 1.11.3 ([#8806](https://github.com/paritytech/parity/pull/8806))
|
- Move dockerfile for android build container to scripts repo ([#9560](https://github.com/paritytech/parity-ethereum/pull/9560))
|
||||||
- Parity-version: bump beta to 1.11.3
|
- Simultaneous platform tests WIP ([#9557](https://github.com/paritytech/parity-ethereum/pull/9557))
|
||||||
- Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity/pull/8802))
|
- Update ethabi-derive, serde, serde_json, serde_derive, syn && quote ([#9553](https://github.com/paritytech/parity-ethereum/pull/9553))
|
||||||
- Fix ancient blocks queue deadlock ([#8751](https://github.com/paritytech/parity/pull/8751))
|
- Ci: fix rpc docs generation 2 ([#9550](https://github.com/paritytech/parity-ethereum/pull/9550))
|
||||||
- Update shell32-sys to fix windows build ([#8792](https://github.com/paritytech/parity/pull/8792))
|
- Ci: always run build pipelines for win, mac, linux, and android ([#9537](https://github.com/paritytech/parity-ethereum/pull/9537))
|
||||||
- Backports ([#8785](https://github.com/paritytech/parity/pull/8785))
|
- Multithreaded snapshot creation ([#9239](https://github.com/paritytech/parity-ethereum/pull/9239))
|
||||||
- Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528))
|
- New ethabi ([#9511](https://github.com/paritytech/parity-ethereum/pull/9511))
|
||||||
- Fix #8468
|
- Remove initial token for WS. ([#9545](https://github.com/paritytech/parity-ethereum/pull/9545))
|
||||||
- Use U256::max_value() instead
|
- Net_version caches network_id to avoid redundant aquire of sync readlock ([#9544](https://github.com/paritytech/parity-ethereum/pull/9544))
|
||||||
- Also change initial transaction gas
|
- Correct before_script for nightly build versions ([#9543](https://github.com/paritytech/parity-ethereum/pull/9543))
|
||||||
- Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity/pull/8544))
|
- Deps: bump kvdb-rocksdb to 0.1.4 ([#9539](https://github.com/paritytech/parity-ethereum/pull/9539))
|
||||||
- Start dividing sync chain : first supplier method
|
- State: test when contract creation fails, old storage values should re-appear ([#9532](https://github.com/paritytech/parity-ethereum/pull/9532))
|
||||||
- WIP - updated chain sync supplier
|
- Allow dropping light client RPC query with no results ([#9318](https://github.com/paritytech/parity-ethereum/pull/9318))
|
||||||
- Finish refactoring the Chain Sync Supplier
|
- Bump master to 2.2.0 ([#9517](https://github.com/paritytech/parity-ethereum/pull/9517))
|
||||||
- Create Chain Sync Requester
|
- Enable all Constantinople hard fork changes in constantinople_test.json ([#9505](https://github.com/paritytech/parity-ethereum/pull/9505))
|
||||||
- Add Propagator for Chain Sync
|
- [Light] Validate `account balance` before importing transactions ([#9417](https://github.com/paritytech/parity-ethereum/pull/9417))
|
||||||
- Add the Chain Sync Handler
|
- In create memory calculation is the same for create2 because the additional parameter was popped before. ([#9522](https://github.com/paritytech/parity-ethereum/pull/9522))
|
||||||
- Move tests from mod -> handler
|
- Update patricia trie to 0.2.2 ([#9525](https://github.com/paritytech/parity-ethereum/pull/9525))
|
||||||
- Move tests to propagator
|
- Replace hardcoded JSON with serde json! macro ([#9489](https://github.com/paritytech/parity-ethereum/pull/9489))
|
||||||
- Refactor SyncRequester arguments
|
- Fix typo in version string ([#9516](https://github.com/paritytech/parity-ethereum/pull/9516))
|
||||||
- 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))
|
|
||||||
|
|
||||||
## Previous releases
|
## Previous releases
|
||||||
|
|
||||||
- [CHANGELOG-1.10](docs/CHANGELOG-1.10.md) (_stable_)
|
- [CHANGELOG-2.1](docs/CHANGELOG-2.1.md) (_stable_)
|
||||||
|
- [CHANGELOG-2.0](docs/CHANGELOG-2.0.md) (EOL: 2018-11-15)
|
||||||
|
- [CHANGELOG-1.11](docs/CHANGELOG-1.11.md) (EOL: 2018-09-19)
|
||||||
|
- [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.9](docs/CHANGELOG-1.9.md) (EOL: 2018-05-09)
|
||||||
- [CHANGELOG-1.8](docs/CHANGELOG-1.8.md) (EOL: 2018-03-22)
|
- [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.7](docs/CHANGELOG-1.7.md) (EOL: 2018-01-25)
|
||||||
|
|||||||
3924
Cargo.lock
generated
3924
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
82
Cargo.toml
82
Cargo.toml
@@ -2,16 +2,15 @@
|
|||||||
description = "Parity Ethereum client"
|
description = "Parity Ethereum client"
|
||||||
name = "parity-ethereum"
|
name = "parity-ethereum"
|
||||||
# NOTE Make sure to update util/version/Cargo.toml as well
|
# NOTE Make sure to update util/version/Cargo.toml as well
|
||||||
version = "2.0.0"
|
version = "2.3.9"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
blooms-db = { path = "util/blooms-db" }
|
blooms-db = { path = "util/blooms-db" }
|
||||||
log = "0.3"
|
log = "0.4"
|
||||||
env_logger = "0.4"
|
|
||||||
rustc-hex = "1.0"
|
rustc-hex = "1.0"
|
||||||
docopt = "0.8"
|
docopt = "1.0"
|
||||||
clap = "2"
|
clap = "2"
|
||||||
term_size = "0.3"
|
term_size = "0.3"
|
||||||
textwrap = "0.9"
|
textwrap = "0.9"
|
||||||
@@ -20,57 +19,57 @@ number_prefix = "0.2"
|
|||||||
rpassword = "1.0"
|
rpassword = "1.0"
|
||||||
semver = "0.9"
|
semver = "0.9"
|
||||||
ansi_term = "0.10"
|
ansi_term = "0.10"
|
||||||
parking_lot = "0.6"
|
parking_lot = "0.7"
|
||||||
regex = "0.2"
|
regex = "1.0"
|
||||||
atty = "0.2.8"
|
atty = "0.2.8"
|
||||||
toml = "0.4"
|
toml = "0.4"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
futures-cpupool = "0.1"
|
|
||||||
fdlimit = "0.1"
|
fdlimit = "0.1"
|
||||||
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
|
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
|
||||||
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" }
|
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-2.2" }
|
||||||
ethcore = { path = "ethcore", features = ["work-notify", "price-info", "stratum"] }
|
ethcore = { path = "ethcore", features = ["parity"] }
|
||||||
parity-bytes = { git = "https://github.com/paritytech/parity-common" }
|
parity-bytes = "0.1"
|
||||||
|
common-types = { path = "ethcore/types" }
|
||||||
|
ethcore-blockchain = { path = "ethcore/blockchain" }
|
||||||
|
ethcore-call-contract = { path = "ethcore/call-contract"}
|
||||||
|
ethcore-db = { path = "ethcore/db" }
|
||||||
ethcore-io = { path = "util/io" }
|
ethcore-io = { path = "util/io" }
|
||||||
ethcore-light = { path = "ethcore/light" }
|
ethcore-light = { path = "ethcore/light" }
|
||||||
ethcore-logger = { path = "logger" }
|
ethcore-logger = { path = "parity/logger" }
|
||||||
ethcore-miner = { path = "miner" }
|
ethcore-miner = { path = "miner" }
|
||||||
ethcore-network = { path = "util/network" }
|
ethcore-network = { path = "util/network" }
|
||||||
ethcore-private-tx = { path = "ethcore/private-tx" }
|
ethcore-private-tx = { path = "ethcore/private-tx" }
|
||||||
ethcore-service = { path = "ethcore/service" }
|
ethcore-service = { path = "ethcore/service" }
|
||||||
ethcore-sync = { path = "ethcore/sync" }
|
ethcore-sync = { path = "ethcore/sync" }
|
||||||
ethcore-transaction = { path = "ethcore/transaction" }
|
ethstore = { path = "accounts/ethstore" }
|
||||||
ethereum-types = "0.3"
|
ethereum-types = "0.4"
|
||||||
node-filter = { path = "ethcore/node_filter" }
|
node-filter = { path = "ethcore/node-filter" }
|
||||||
ethkey = { path = "ethkey" }
|
ethkey = { path = "accounts/ethkey" }
|
||||||
node-health = { path = "node-health" }
|
rlp = { version = "0.3.0", features = ["ethereum"] }
|
||||||
rlp = { git = "https://github.com/paritytech/parity-common" }
|
cli-signer= { path = "cli-signer" }
|
||||||
rpc-cli = { path = "rpc_cli" }
|
parity-hash-fetch = { path = "updater/hash-fetch" }
|
||||||
parity-hash-fetch = { path = "hash-fetch" }
|
|
||||||
parity-ipfs-api = { path = "ipfs" }
|
parity-ipfs-api = { path = "ipfs" }
|
||||||
parity-local-store = { path = "local-store" }
|
parity-local-store = { path = "miner/local-store" }
|
||||||
parity-reactor = { path = "util/reactor" }
|
parity-runtime = { path = "util/runtime" }
|
||||||
parity-rpc = { path = "rpc" }
|
parity-rpc = { path = "rpc" }
|
||||||
parity-rpc-client = { path = "rpc_client" }
|
|
||||||
parity-updater = { path = "updater" }
|
parity-updater = { path = "updater" }
|
||||||
parity-version = { path = "util/version" }
|
parity-version = { path = "util/version" }
|
||||||
parity-whisper = { path = "whisper" }
|
parity-whisper = { path = "whisper" }
|
||||||
path = { git = "https://github.com/paritytech/parity-common" }
|
parity-path = "0.1"
|
||||||
dir = { path = "util/dir" }
|
dir = { path = "util/dir" }
|
||||||
panic_hook = { path = "util/panic_hook" }
|
panic_hook = { path = "util/panic-hook" }
|
||||||
keccak-hash = { git = "https://github.com/paritytech/parity-common" }
|
keccak-hash = "0.1"
|
||||||
migration-rocksdb = { path = "util/migration-rocksdb" }
|
migration-rocksdb = { path = "util/migration-rocksdb" }
|
||||||
kvdb = { git = "https://github.com/paritytech/parity-common" }
|
kvdb = "0.1"
|
||||||
kvdb-rocksdb = { git = "https://github.com/paritytech/parity-common" }
|
kvdb-rocksdb = "0.1.3"
|
||||||
journaldb = { path = "util/journaldb" }
|
journaldb = { path = "util/journaldb" }
|
||||||
mem = { path = "util/mem" }
|
|
||||||
|
|
||||||
ethcore-secretstore = { path = "secret_store", optional = true }
|
ethcore-secretstore = { path = "secret-store", optional = true }
|
||||||
|
|
||||||
registrar = { path = "registrar" }
|
registrar = { path = "util/registrar" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
rustc_version = "0.2"
|
rustc_version = "0.2"
|
||||||
@@ -81,14 +80,16 @@ ipnetwork = "0.12.6"
|
|||||||
tempdir = "0.3"
|
tempdir = "0.3"
|
||||||
fake-fetch = { path = "util/fake-fetch" }
|
fake-fetch = { path = "util/fake-fetch" }
|
||||||
|
|
||||||
|
[target.'cfg(not(windows))'.dependencies]
|
||||||
|
daemonize = "0.3"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
winapi = { version = "0.3.4", features = ["winsock2", "winuser", "shellapi"] }
|
winapi = { version = "0.3.4", features = ["winsock2", "winuser", "shellapi"] }
|
||||||
|
|
||||||
[target.'cfg(not(windows))'.dependencies]
|
|
||||||
daemonize = { git = "https://github.com/paritytech/daemonize" }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
miner-debug = ["ethcore/miner-debug"]
|
||||||
json-tests = ["ethcore/json-tests"]
|
json-tests = ["ethcore/json-tests"]
|
||||||
|
ci-skip-issue = ["ethcore/ci-skip-issue"]
|
||||||
test-heavy = ["ethcore/test-heavy"]
|
test-heavy = ["ethcore/test-heavy"]
|
||||||
evm-debug = ["ethcore/evm-debug"]
|
evm-debug = ["ethcore/evm-debug"]
|
||||||
evm-debug-tests = ["ethcore/evm-debug-tests"]
|
evm-debug-tests = ["ethcore/evm-debug-tests"]
|
||||||
@@ -121,22 +122,23 @@ name = "parity"
|
|||||||
debug = false
|
debug = false
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
# This should only list projects that are not
|
||||||
|
# in the dependency tree in any other way
|
||||||
|
# (i.e. pretty much only standalone CLI tools)
|
||||||
members = [
|
members = [
|
||||||
|
"accounts/ethkey/cli",
|
||||||
|
"accounts/ethstore/cli",
|
||||||
"chainspec",
|
"chainspec",
|
||||||
"ethcore/wasm/run",
|
"ethcore/wasm/run",
|
||||||
"ethcore/types",
|
|
||||||
"ethkey/cli",
|
|
||||||
"ethstore/cli",
|
|
||||||
"evmbin",
|
"evmbin",
|
||||||
"miner",
|
|
||||||
"parity-clib",
|
"parity-clib",
|
||||||
"transaction-pool",
|
|
||||||
"whisper",
|
|
||||||
"whisper/cli",
|
"whisper/cli",
|
||||||
"util/triehash-ethereum",
|
"util/triehash-ethereum",
|
||||||
"util/keccak-hasher",
|
"util/keccak-hasher",
|
||||||
"util/patricia-trie-ethereum",
|
"util/patricia-trie-ethereum",
|
||||||
|
"util/fastmap",
|
||||||
|
"util/time-utils"
|
||||||
]
|
]
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
ring = { git = "https://github.com/paritytech/ring" }
|
heapsize = { git = "https://github.com/cheme/heapsize.git", branch = "ec-macfix" }
|
||||||
|
|||||||
175
README.md
175
README.md
@@ -1,111 +1,75 @@
|
|||||||
# Parity - fast, light, and robust Ethereum client
|

|
||||||
|
|
||||||
## [» Download the latest release «](https://github.com/paritytech/parity/releases/latest)
|
<h2 align="center">The Fastest and most Advanced Ethereum Client.</h2>
|
||||||
|
|
||||||
[](https://gitlab.parity.io/parity/parity/commits/master)
|
<p align="center"><strong><a href="https://github.com/paritytech/parity-ethereum/releases/latest">» Download the latest release «</a></strong></p>
|
||||||
[](https://codecov.io/gh/paritytech/parity)
|
|
||||||
[](https://build.snapcraft.io/user/paritytech/parity)
|
|
||||||
[](https://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>
|
||||||
|
|
||||||
### Join the chat!
|
**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.
|
||||||
|
|
||||||
Get in touch with us on Gitter:
|
- Clean, modular codebase for easy customisation
|
||||||
[](https://gitter.im/paritytech/parity)
|
- Advanced CLI-based client
|
||||||
[](https://gitter.im/paritytech/parity.js)
|
- Minimal memory and storage footprint
|
||||||
[](https://gitter.im/paritytech/parity/miners)
|
- Synchronise in hours, not days with Warp Sync
|
||||||
[](https://gitter.im/paritytech/parity-poa)
|
- Modular for light integration into your service or product
|
||||||
|
|
||||||
Or join our community on Matrix:
|
## Technical Overview
|
||||||
[](https://riot.im/app/#/group/+parity:matrix.parity.io)
|
|
||||||
|
|
||||||
Official website: https://parity.io | Be sure to check out [our wiki](https://wiki.parity.io) for more information.
|
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.
|
||||||
|
|
||||||
## About Parity
|
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's goal is to be the fastest, lightest, and most secure Ethereum client. We are developing Parity using the sophisticated and cutting-edge Rust programming language. Parity is licensed under the GPLv3, and can be used for all your Ethereum needs.
|
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.
|
||||||
|
|
||||||
From Parity Ethereum client version 1.10.0, the User Interface (UI) is accessible in a separate application called Parity UI. To keep using the UI in the browser (deprecated), [follow these steps](https://wiki.parity.io/FAQ-Basic-Operations,-Configuration,-and-Synchronization#the-parity-ui-application-isnt-working-the-way-i-want).
|
## Build Dependencies
|
||||||
|
|
||||||
By default, Parity will also run a JSONRPC server on `127.0.0.1:8545` and a websockets server on `127.0.0.1:8546`. This is fully configurable and supports a number of APIs.
|
Parity Ethereum requires **latest stable Rust version** to build.
|
||||||
|
|
||||||
If you run into an issue while using Parity, feel free to file one in this repository or hop on our [Gitter](https://gitter.im/paritytech/parity) or [Riot](https://riot.im/app/#/group/+parity:matrix.parity.io) chat room to ask a question. We are glad to help! **For security-critical issues**, please refer to the security policy outlined in [SECURITY.MD](SECURITY.md).
|
We recommend installing Rust through [rustup](https://www.rustup.rs/). If you don't already have `rustup`, you can install it like this:
|
||||||
|
|
||||||
Parity's current beta-release is 1.11. You can download it at https://github.com/paritytech/parity/releases or follow the instructions below to build from source.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## Build dependencies
|
|
||||||
|
|
||||||
**Parity requires Rust version 1.26.0 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:
|
|
||||||
|
|
||||||
- Linux:
|
- Linux:
|
||||||
```bash
|
|
||||||
$ curl https://sh.rustup.rs -sSf | sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Parity also requires `gcc`, `g++`, `libssl-dev`/`openssl`, `libudev-dev`, `pkg-config`, `file` and `make` packages to be installed.
|
|
||||||
|
|
||||||
- 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
|
```bash
|
||||||
$ rustup default stable-x86_64-pc-windows-msvc
|
$ curl https://sh.rustup.rs -sSf | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Once you have rustup installed, then you need to install:
|
Parity Ethereum also requires `gcc`, `g++`, `libudev-dev`, `pkg-config`, `file`, `make`, and `cmake` packages to be installed.
|
||||||
|
|
||||||
|
- 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)
|
* [Perl](https://www.perl.org)
|
||||||
* [Yasm](http://yasm.tortall.net)
|
* [Yasm](https://yasm.tortall.net)
|
||||||
|
|
||||||
Make sure that these binaries are in your `PATH`. After that you should be able to build parity from source.
|
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
|
||||||
|
|
||||||
## Install from the snap store
|
|
||||||
|
|
||||||
In any of the [supported Linux distros](https://snapcraft.io/docs/core/install):
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo snap install parity
|
# download Parity Ethereum code
|
||||||
```
|
$ git clone https://github.com/paritytech/parity-ethereum
|
||||||
|
$ cd parity-ethereum
|
||||||
Or, if you want to contribute testing the upcoming release:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo snap install parity --beta
|
|
||||||
```
|
|
||||||
|
|
||||||
And to test the latest code landed into the master branch:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo snap install parity --edge
|
|
||||||
```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## Build from source
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# download Parity code
|
|
||||||
$ git clone https://github.com/paritytech/parity
|
|
||||||
$ cd parity
|
|
||||||
|
|
||||||
# build in release mode
|
# build in release mode
|
||||||
$ cargo build --release
|
$ cargo build --release --features final
|
||||||
```
|
```
|
||||||
|
|
||||||
This will produce an executable in the `./target/release` subdirectory.
|
This produces an executable in the `./target/release` subdirectory.
|
||||||
|
|
||||||
Note: if cargo fails to parse manifest try:
|
Note: if cargo fails to parse manifest try:
|
||||||
|
|
||||||
@@ -119,7 +83,7 @@ Note, when compiling a crate and you receive errors, it's in most cases your out
|
|||||||
$ cargo clean
|
$ cargo clean
|
||||||
```
|
```
|
||||||
|
|
||||||
This will always compile the latest nightly builds. If you want to build stable or beta, do a
|
This always compiles the latest nightly builds. If you want to build stable or beta, do a
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git checkout stable
|
$ git checkout stable
|
||||||
@@ -131,11 +95,7 @@ or
|
|||||||
$ git checkout beta
|
$ git checkout beta
|
||||||
```
|
```
|
||||||
|
|
||||||
first.
|
## Simple One-Line Installer for Mac and Linux
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## Simple one-line installer for Mac and Ubuntu
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash <(curl https://get.parity.io -L)
|
bash <(curl https://get.parity.io -L)
|
||||||
@@ -147,22 +107,49 @@ The one-line installer always defaults to the latest beta release. To install a
|
|||||||
bash <(curl https://get.parity.io -L) -r stable
|
bash <(curl https://get.parity.io -L) -r stable
|
||||||
```
|
```
|
||||||
|
|
||||||
## Start Parity
|
## Start Parity Ethereum
|
||||||
|
|
||||||
### Manually
|
### Manually
|
||||||
|
|
||||||
To start Parity manually, just run
|
To start Parity Ethereum manually, just run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ./target/release/parity
|
$ ./target/release/parity
|
||||||
```
|
```
|
||||||
|
|
||||||
and Parity will begin syncing the Ethereum blockchain.
|
so Parity Ethereum begins syncing the Ethereum blockchain.
|
||||||
|
|
||||||
### Using systemd service file
|
### Using `systemd` service file
|
||||||
|
|
||||||
To start Parity as a regular user using systemd init:
|
To start Parity Ethereum as a regular user using `systemd` init:
|
||||||
|
|
||||||
1. Copy `./scripts/parity.service` to your
|
1. Copy `./scripts/parity.service` to your
|
||||||
systemd user directory (usually `~/.config/systemd/user`).
|
`systemd` user directory (usually `~/.config/systemd/user`).
|
||||||
2. To configure Parity, write a `/etc/parity/config.toml` config file, see [Configuring Parity](https://paritytech.github.io/wiki/Configuring-Parity) for details.
|
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/accounts/ethstore) - Parity Ethereum key management.
|
||||||
|
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/accounts/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.
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
byteorder = "1.0"
|
byteorder = "1.0"
|
||||||
edit-distance = "2.0"
|
edit-distance = "2.0"
|
||||||
parity-crypto = { git = "https://github.com/paritytech/parity-common" }
|
parity-crypto = "0.2"
|
||||||
eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" }
|
eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" }
|
||||||
ethereum-types = "0.3"
|
ethereum-types = "0.4"
|
||||||
lazy_static = "1.0"
|
lazy_static = "1.0"
|
||||||
log = "0.3"
|
log = "0.4"
|
||||||
mem = { path = "../util/mem" }
|
memzero = { path = "../../util/memzero" }
|
||||||
parity-wordlist = "1.2"
|
parity-wordlist = "1.2"
|
||||||
quick-error = "1.2.2"
|
quick-error = "1.2.2"
|
||||||
rand = "0.4"
|
rand = "0.4"
|
||||||
@@ -1,19 +1,12 @@
|
|||||||
# ethkey
|
## ethkey-cli
|
||||||
|
|
||||||
[![Build Status][travis-image]][travis-url]
|
Parity Ethereum keys generator.
|
||||||
|
|
||||||
[travis-image]: https://travis-ci.org/paritytech/ethkey.svg?branch=master
|
|
||||||
[travis-url]: https://travis-ci.org/paritytech/ethkey
|
|
||||||
|
|
||||||
Ethereum keys generator.
|
|
||||||
|
|
||||||
[Documentation](http://paritytech.github.io/ethkey/ethkey/index.html)
|
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
```
|
```
|
||||||
Ethereum keys generator.
|
Parity Ethereum keys generator.
|
||||||
Copyright 2016, 2017 Parity Technologies (UK) Ltd
|
Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
ethkey info <secret-or-phrase> [options]
|
ethkey info <secret-or-phrase> [options]
|
||||||
@@ -27,17 +20,17 @@ Usage:
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
-h, --help Display this message and exit.
|
-h, --help Display this message and exit.
|
||||||
-s, --secret Display only the secret.
|
-s, --secret Display only the secret key.
|
||||||
-p, --public Display only the public.
|
-p, --public Display only the public key.
|
||||||
-a, --address Display only the address.
|
-a, --address Display only the address.
|
||||||
-b, --brain Use parity brain wallet algorithm.
|
-b, --brain Use parity brain wallet algorithm. Not recommended.
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
info Display public and address of the secret.
|
info Display public key and address of the secret.
|
||||||
generate random Generates new random ethereum key.
|
generate random Generates new random Ethereum key.
|
||||||
generate prefix Random generation, but address must start with a prefix.
|
generate prefix Random generation, but address must start with a prefix ("vanity address").
|
||||||
sign Sign message using secret.
|
sign Sign message using a secret key.
|
||||||
verify Verify signer of the signature.
|
verify Verify signer of the signature by public key or address.
|
||||||
recover Try to find brain phrase matching given address from partial phrase.
|
recover Try to find brain phrase matching given address from partial phrase.
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -218,10 +211,11 @@ public: 4e19a5fdae82596e1485c69b687c9cc52b5078e5b0668ef3ce8543cd90e712cb00df822
|
|||||||
address: 00cf3711cbd3a1512570639280758118ba0b2bcb
|
address: 00cf3711cbd3a1512570639280758118ba0b2bcb
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Parity Ethereum toolchain
|
||||||
|
_This project is a part of the Parity Ethereum toolchain._
|
||||||
|
|
||||||
# Parity toolchain
|
- [evmbin](https://github.com/paritytech/parity-ethereum/blob/master/evmbin/) - EVM implementation for Parity Ethereum.
|
||||||
*this project is a part of the parity toolchain*
|
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum function calls encoding.
|
||||||
|
- [ethstore](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethstore) - Parity Ethereum key management.
|
||||||
- [**ethkey**](https://github.com/paritytech/ethkey) - Ethereum keys generator and signer.
|
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethkey) - Parity Ethereum keys generator.
|
||||||
- [**ethstore**](https://github.com/paritytech/ethstore) - Ethereum key management.
|
- [whisper](https://github.com/paritytech/parity-ethereum/blob/master/whisper/) - Implementation of Whisper-v2 PoC.
|
||||||
- [**ethabi**](https://github.com/paritytech/ethabi) - Ethereum function calls encoding.
|
|
||||||
@@ -4,10 +4,10 @@ version = "0.1.0"
|
|||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
docopt = "0.8"
|
docopt = "1.0"
|
||||||
env_logger = "0.4"
|
env_logger = "0.5"
|
||||||
ethkey = { path = "../" }
|
ethkey = { path = "../" }
|
||||||
panic_hook = { path = "../../util/panic_hook" }
|
panic_hook = { path = "../../../util/panic-hook" }
|
||||||
parity-wordlist="1.2"
|
parity-wordlist="1.2"
|
||||||
rustc-hex = "1.0"
|
rustc-hex = "1.0"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
extern crate docopt;
|
extern crate docopt;
|
||||||
extern crate env_logger;
|
extern crate env_logger;
|
||||||
@@ -34,8 +34,8 @@ use ethkey::{KeyPair, Random, Brain, BrainPrefix, Prefix, Error as EthkeyError,
|
|||||||
use rustc_hex::{FromHex, FromHexError};
|
use rustc_hex::{FromHex, FromHexError};
|
||||||
|
|
||||||
const USAGE: &'static str = r#"
|
const USAGE: &'static str = r#"
|
||||||
Ethereum keys generator.
|
Parity Ethereum keys generator.
|
||||||
Copyright 2016, 2017 Parity Technologies (UK) Ltd
|
Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
ethkey info <secret-or-phrase> [options]
|
ethkey info <secret-or-phrase> [options]
|
||||||
@@ -49,17 +49,17 @@ Usage:
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
-h, --help Display this message and exit.
|
-h, --help Display this message and exit.
|
||||||
-s, --secret Display only the secret.
|
-s, --secret Display only the secret key.
|
||||||
-p, --public Display only the public.
|
-p, --public Display only the public key.
|
||||||
-a, --address Display only the address.
|
-a, --address Display only the address.
|
||||||
-b, --brain Use parity brain wallet algorithm.
|
-b, --brain Use parity brain wallet algorithm. Not recommended.
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
info Display public and address of the secret.
|
info Display public key and address of the secret.
|
||||||
generate random Generates new random ethereum key.
|
generate random Generates new random Ethereum key.
|
||||||
generate prefix Random generation, but address must start with a prefix.
|
generate prefix Random generation, but address must start with a prefix ("vanity address").
|
||||||
sign Sign message using secret.
|
sign Sign message using a secret key.
|
||||||
verify Verify signer of the signature.
|
verify Verify signer of the signature by public key or address.
|
||||||
recover Try to find brain phrase matching given address from partial phrase.
|
recover Try to find brain phrase matching given address from partial phrase.
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@@ -162,13 +162,13 @@ impl DisplayMode {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
panic_hook::set_abort();
|
panic_hook::set_abort();
|
||||||
env_logger::init().expect("Logger initialized only once.");
|
env_logger::try_init().expect("Logger initialized only once.");
|
||||||
|
|
||||||
match execute(env::args()) {
|
match execute(env::args()) {
|
||||||
Ok(ok) => println!("{}", ok),
|
Ok(ok) => println!("{}", ok),
|
||||||
Err(Error::Docopt(ref e)) => e.exit(),
|
Err(Error::Docopt(ref e)) => e.exit(),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
println!("{}", err);
|
eprintln!("{}", err);
|
||||||
process::exit(1);
|
process::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use keccak::Keccak256;
|
use keccak::Keccak256;
|
||||||
use super::{KeyPair, Generator, Secret};
|
use super::{KeyPair, Generator, Secret};
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use super::{Generator, KeyPair, Error, Brain};
|
use super::{Generator, KeyPair, Error, Brain};
|
||||||
use parity_wordlist as wordlist;
|
use parity_wordlist as wordlist;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use secp256k1;
|
use secp256k1;
|
||||||
use std::io;
|
use std::io;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::{fmt, error};
|
use std::{fmt, error};
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Extended keys
|
//! Extended keys
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use tiny_keccak::Keccak;
|
use tiny_keccak::Keccak;
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use secp256k1::key;
|
use secp256k1::key;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
// #![warn(missing_docs)]
|
// #![warn(missing_docs)]
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ extern crate byteorder;
|
|||||||
extern crate edit_distance;
|
extern crate edit_distance;
|
||||||
extern crate parity_crypto;
|
extern crate parity_crypto;
|
||||||
extern crate ethereum_types;
|
extern crate ethereum_types;
|
||||||
extern crate mem;
|
extern crate memzero;
|
||||||
extern crate parity_wordlist;
|
extern crate parity_wordlist;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate quick_error;
|
extern crate quick_error;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use super::{SECP256K1, Public, Secret, Error};
|
use super::{SECP256K1, Public, Secret, Error};
|
||||||
use secp256k1::key;
|
use secp256k1::key;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::{fmt, ptr};
|
use std::{fmt, ptr};
|
||||||
|
|
||||||
@@ -57,4 +57,3 @@ impl<'a> From<&'a str> for Password {
|
|||||||
Password::from(String::from(s))
|
Password::from(String::from(s))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use super::{Random, Generator, KeyPair, Error};
|
use super::{Random, Generator, KeyPair, Error};
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use rand::os::OsRng;
|
use rand::os::OsRng;
|
||||||
use super::{Generator, KeyPair, SECP256K1};
|
use super::{Generator, KeyPair, SECP256K1};
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
@@ -21,7 +21,7 @@ use rustc_hex::ToHex;
|
|||||||
use secp256k1::constants::{SECRET_KEY_SIZE as SECP256K1_SECRET_KEY_SIZE};
|
use secp256k1::constants::{SECRET_KEY_SIZE as SECP256K1_SECRET_KEY_SIZE};
|
||||||
use secp256k1::key;
|
use secp256k1::key;
|
||||||
use ethereum_types::H256;
|
use ethereum_types::H256;
|
||||||
use mem::Memzero;
|
use memzero::Memzero;
|
||||||
use {Error, SECP256K1};
|
use {Error, SECP256K1};
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq)]
|
#[derive(Clone, PartialEq, Eq)]
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
use std::cmp::PartialEq;
|
use std::cmp::PartialEq;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ethstore"
|
name = "ethstore"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.3"
|
log = "0.4"
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
rand = "0.4"
|
rand = "0.4"
|
||||||
ethkey = { path = "../ethkey" }
|
ethkey = { path = "../ethkey" }
|
||||||
@@ -15,11 +15,11 @@ rustc-hex = "1.0"
|
|||||||
tiny-keccak = "1.4"
|
tiny-keccak = "1.4"
|
||||||
time = "0.1.34"
|
time = "0.1.34"
|
||||||
itertools = "0.5"
|
itertools = "0.5"
|
||||||
parking_lot = "0.6"
|
parking_lot = "0.7"
|
||||||
parity-crypto = { git = "https://github.com/paritytech/parity-common" }
|
parity-crypto = "0.2"
|
||||||
ethereum-types = "0.3"
|
ethereum-types = "0.4"
|
||||||
dir = { path = "../util/dir" }
|
dir = { path = "../../util/dir" }
|
||||||
smallvec = "0.4"
|
smallvec = "0.6"
|
||||||
parity-wordlist = "1.0"
|
parity-wordlist = "1.0"
|
||||||
tempdir = "0.3"
|
tempdir = "0.3"
|
||||||
|
|
||||||
@@ -1,19 +1,12 @@
|
|||||||
# ethstore
|
## ethstore-cli
|
||||||
|
|
||||||
[![Build Status][travis-image]][travis-url]
|
Parity Ethereum key management.
|
||||||
|
|
||||||
[travis-image]: https://travis-ci.org/paritytech/ethstore.svg?branch=master
|
|
||||||
[travis-url]: https://travis-ci.org/paritytech/ethstore
|
|
||||||
|
|
||||||
Ethereum key management.
|
|
||||||
|
|
||||||
[Documentation](http://paritytech.github.io/ethstore/ethstore/index.html)
|
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
```
|
```
|
||||||
Ethereum key management.
|
Parity Ethereum key management tool.
|
||||||
Copyright 2016, 2017 Parity Technologies (UK) Ltd
|
Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
ethstore insert <secret> <password> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
ethstore insert <secret> <password> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
||||||
@@ -35,19 +28,19 @@ Usage:
|
|||||||
Options:
|
Options:
|
||||||
-h, --help Display this message and exit.
|
-h, --help Display this message and exit.
|
||||||
--dir DIR Specify the secret store directory. It may be either
|
--dir DIR Specify the secret store directory. It may be either
|
||||||
parity, parity-test, geth, geth-test
|
parity, parity-(chain), geth, geth-test
|
||||||
or a path [default: parity].
|
or a path [default: parity].
|
||||||
--vault VAULT Specify vault to use in this operation.
|
--vault VAULT Specify vault to use in this operation.
|
||||||
--vault-pwd VAULTPWD Specify vault password to use in this operation. Please note
|
--vault-pwd VAULTPWD Specify vault password to use in this operation. Please note
|
||||||
that this option is required when vault option is set.
|
that this option is required when vault option is set.
|
||||||
Otherwise it is ignored.
|
Otherwise it is ignored.
|
||||||
--src DIR Specify import source. It may be either
|
--src DIR Specify import source. It may be either
|
||||||
parity, parity-test, get, geth-test
|
parity, parity-(chain), geth, geth-test
|
||||||
or a path [default: geth].
|
or a path [default: geth].
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
insert Save account with password.
|
insert Save account with password.
|
||||||
change-pwd Change account password.
|
change-pwd Change password.
|
||||||
list List accounts.
|
list List accounts.
|
||||||
import Import accounts from src.
|
import Import accounts from src.
|
||||||
import-wallet Import presale wallet.
|
import-wallet Import presale wallet.
|
||||||
@@ -59,7 +52,7 @@ Commands:
|
|||||||
create-vault Create new vault.
|
create-vault Create new vault.
|
||||||
change-vault-pwd Change vault password.
|
change-vault-pwd Change vault password.
|
||||||
move-to-vault Move account to vault from another vault/root directory.
|
move-to-vault Move account to vault from another vault/root directory.
|
||||||
move-from-vault Move account to root directory from given vault or root.
|
move-from-vault Move account to root directory from given vault.
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@@ -337,11 +330,11 @@ ethstore move-from-vault 00e63fdb87ceb815ec96ae185b8f7381a0b4a5ea vault1 vault1_
|
|||||||
OK
|
OK
|
||||||
```
|
```
|
||||||
|
|
||||||
--
|
## Parity Ethereum toolchain
|
||||||
|
_This project is a part of the Parity Ethereum toolchain._
|
||||||
|
|
||||||
# Parity toolchain
|
- [evmbin](https://github.com/paritytech/parity-ethereum/blob/master/evmbin/) - EVM implementation for Parity Ethereum.
|
||||||
*this project is a part of the parity toolchain*
|
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum function calls encoding.
|
||||||
|
- [ethstore](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethstore) - Parity Ethereum key management.
|
||||||
- [**ethkey**](https://github.com/paritytech/ethkey) - Ethereum keys generator and signer.
|
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethkey) - Parity Ethereum keys generator.
|
||||||
- [**ethstore**](https://github.com/paritytech/ethstore) - Ethereum key management.
|
- [whisper](https://github.com/paritytech/parity-ethereum/blob/master/whisper/) - Implementation of Whisper-v2 PoC.
|
||||||
- [**ethabi**](https://github.com/paritytech/ethabi) - Ethereum function calls encoding.
|
|
||||||
@@ -1,18 +1,19 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ethstore-cli"
|
name = "ethstore-cli"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
docopt = "0.8"
|
docopt = "1.0"
|
||||||
|
env_logger = "0.5"
|
||||||
num_cpus = "1.6"
|
num_cpus = "1.6"
|
||||||
rustc-hex = "1.0"
|
rustc-hex = "1.0"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
parking_lot = "0.6"
|
parking_lot = "0.7"
|
||||||
ethstore = { path = "../" }
|
ethstore = { path = "../" }
|
||||||
dir = { path = '../../util/dir' }
|
dir = { path = '../../../util/dir' }
|
||||||
panic_hook = { path = "../../util/panic_hook" }
|
panic_hook = { path = "../../../util/panic-hook" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "ethstore"
|
name = "ethstore"
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::{cmp, thread};
|
use std::{cmp, thread};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
extern crate dir;
|
extern crate dir;
|
||||||
extern crate docopt;
|
extern crate docopt;
|
||||||
@@ -23,6 +23,8 @@ extern crate parking_lot;
|
|||||||
extern crate rustc_hex;
|
extern crate rustc_hex;
|
||||||
extern crate serde;
|
extern crate serde;
|
||||||
|
|
||||||
|
extern crate env_logger;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate serde_derive;
|
extern crate serde_derive;
|
||||||
|
|
||||||
@@ -38,14 +40,14 @@ use ethstore::{EthStore, SimpleSecretStore, SecretStore, import_accounts, Presal
|
|||||||
mod crack;
|
mod crack;
|
||||||
|
|
||||||
pub const USAGE: &'static str = r#"
|
pub const USAGE: &'static str = r#"
|
||||||
Ethereum key management.
|
Parity Ethereum key management tool.
|
||||||
Copyright 2016, 2017 Parity Technologies (UK) Ltd
|
Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
ethstore insert <secret> <password> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
ethstore insert <secret> <password> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
||||||
ethstore change-pwd <address> <old-pwd> <new-pwd> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
ethstore change-pwd <address> <old-pwd> <new-pwd> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
||||||
ethstore list [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
ethstore list [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
||||||
ethstore import [--src DIR] [--dir DIR]
|
ethstore import [<password>] [--src DIR] [--dir DIR]
|
||||||
ethstore import-wallet <path> <password> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
ethstore import-wallet <path> <password> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
||||||
ethstore find-wallet-pass <path> <password>
|
ethstore find-wallet-pass <path> <password>
|
||||||
ethstore remove <address> <password> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
ethstore remove <address> <password> [--dir DIR] [--vault VAULT] [--vault-pwd VAULTPWD]
|
||||||
@@ -68,7 +70,7 @@ Options:
|
|||||||
that this option is required when vault option is set.
|
that this option is required when vault option is set.
|
||||||
Otherwise it is ignored.
|
Otherwise it is ignored.
|
||||||
--src DIR Specify import source. It may be either
|
--src DIR Specify import source. It may be either
|
||||||
parity, parity-(chain), get, geth-test
|
parity, parity-(chain), geth, geth-test
|
||||||
or a path [default: geth].
|
or a path [default: geth].
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
@@ -146,30 +148,34 @@ impl fmt::Display for Error {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
panic_hook::set_abort();
|
panic_hook::set_abort();
|
||||||
|
if env::var("RUST_LOG").is_err() {
|
||||||
|
env::set_var("RUST_LOG", "warn")
|
||||||
|
}
|
||||||
|
env_logger::try_init().expect("Logger initialized only once.");
|
||||||
|
|
||||||
match execute(env::args()) {
|
match execute(env::args()) {
|
||||||
Ok(result) => println!("{}", result),
|
Ok(result) => println!("{}", result),
|
||||||
Err(Error::Docopt(ref e)) => e.exit(),
|
Err(Error::Docopt(ref e)) => e.exit(),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
println!("{}", err);
|
eprintln!("{}", err);
|
||||||
process::exit(1);
|
process::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn key_dir(location: &str) -> Result<Box<KeyDirectory>, Error> {
|
fn key_dir(location: &str, password: Option<Password>) -> Result<Box<KeyDirectory>, Error> {
|
||||||
let dir: Box<KeyDirectory> = match location {
|
let dir: RootDiskDirectory = match location {
|
||||||
"geth" => Box::new(RootDiskDirectory::create(dir::geth(false))?),
|
"geth" => RootDiskDirectory::create(dir::geth(false))?,
|
||||||
"geth-test" => Box::new(RootDiskDirectory::create(dir::geth(true))?),
|
"geth-test" => RootDiskDirectory::create(dir::geth(true))?,
|
||||||
path if path.starts_with("parity") => {
|
path if path.starts_with("parity") => {
|
||||||
let chain = path.split('-').nth(1).unwrap_or("ethereum");
|
let chain = path.split('-').nth(1).unwrap_or("ethereum");
|
||||||
let path = dir::parity(chain);
|
let path = dir::parity(chain);
|
||||||
Box::new(RootDiskDirectory::create(path)?)
|
RootDiskDirectory::create(path)?
|
||||||
},
|
},
|
||||||
path => Box::new(RootDiskDirectory::create(path)?),
|
path => RootDiskDirectory::create(path)?,
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(dir)
|
Ok(Box::new(dir.with_password(password)))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn open_args_vault(store: &EthStore, args: &Args) -> Result<SecretVaultRef, Error> {
|
fn open_args_vault(store: &EthStore, args: &Args) -> Result<SecretVaultRef, Error> {
|
||||||
@@ -202,9 +208,9 @@ fn format_vaults(vaults: &[String]) -> String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn load_password(path: &str) -> Result<Password, Error> {
|
fn load_password(path: &str) -> Result<Password, Error> {
|
||||||
let mut file = fs::File::open(path).map_err(|e| ethstore::Error::Custom(format!("Error opening password file {}: {}", path, e)))?;
|
let mut file = fs::File::open(path).map_err(|e| ethstore::Error::Custom(format!("Error opening password file '{}': {}", path, e)))?;
|
||||||
let mut password = String::new();
|
let mut password = String::new();
|
||||||
file.read_to_string(&mut password).map_err(|e| ethstore::Error::Custom(format!("Error reading password file {}: {}", path, e)))?;
|
file.read_to_string(&mut password).map_err(|e| ethstore::Error::Custom(format!("Error reading password file '{}': {}", path, e)))?;
|
||||||
// drop EOF
|
// drop EOF
|
||||||
let _ = password.pop();
|
let _ = password.pop();
|
||||||
Ok(password.into())
|
Ok(password.into())
|
||||||
@@ -214,7 +220,7 @@ fn execute<S, I>(command: I) -> Result<String, Error> where I: IntoIterator<Item
|
|||||||
let args: Args = Docopt::new(USAGE)
|
let args: Args = Docopt::new(USAGE)
|
||||||
.and_then(|d| d.argv(command).deserialize())?;
|
.and_then(|d| d.argv(command).deserialize())?;
|
||||||
|
|
||||||
let store = EthStore::open(key_dir(&args.flag_dir)?)?;
|
let store = EthStore::open(key_dir(&args.flag_dir, None)?)?;
|
||||||
|
|
||||||
return if args.cmd_insert {
|
return if args.cmd_insert {
|
||||||
let secret = args.arg_secret.parse().map_err(|_| ethstore::Error::InvalidSecret)?;
|
let secret = args.arg_secret.parse().map_err(|_| ethstore::Error::InvalidSecret)?;
|
||||||
@@ -239,8 +245,13 @@ fn execute<S, I>(command: I) -> Result<String, Error> where I: IntoIterator<Item
|
|||||||
.collect();
|
.collect();
|
||||||
Ok(format_accounts(&accounts))
|
Ok(format_accounts(&accounts))
|
||||||
} else if args.cmd_import {
|
} else if args.cmd_import {
|
||||||
let src = key_dir(&args.flag_src)?;
|
let password = match args.arg_password.as_ref() {
|
||||||
let dst = key_dir(&args.flag_dir)?;
|
"" => None,
|
||||||
|
_ => Some(load_password(&args.arg_password)?)
|
||||||
|
};
|
||||||
|
let src = key_dir(&args.flag_src, password)?;
|
||||||
|
let dst = key_dir(&args.flag_dir, None)?;
|
||||||
|
|
||||||
let accounts = import_accounts(&*src, &*dst)?;
|
let accounts = import_accounts(&*src, &*dst)?;
|
||||||
Ok(format_accounts(&accounts))
|
Ok(format_accounts(&accounts))
|
||||||
} else if args.cmd_import_wallet {
|
} else if args.cmd_import_wallet {
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
extern crate tempdir;
|
extern crate tempdir;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use json;
|
use json;
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::str;
|
use std::str;
|
||||||
use ethkey::{Password, Secret};
|
use ethkey::{Password, Secret};
|
||||||
@@ -84,7 +84,8 @@ impl Crypto {
|
|||||||
|
|
||||||
// two parts of derived key
|
// two parts of derived key
|
||||||
// DK = [ DK[0..15] DK[16..31] ] = [derived_left_bits, derived_right_bits]
|
// DK = [ DK[0..15] DK[16..31] ] = [derived_left_bits, derived_right_bits]
|
||||||
let (derived_left_bits, derived_right_bits) = crypto::derive_key_iterations(password.as_bytes(), &salt, iterations);
|
let (derived_left_bits, derived_right_bits) =
|
||||||
|
crypto::derive_key_iterations(password.as_bytes(), &salt, iterations);
|
||||||
|
|
||||||
// preallocated (on-stack in case of `Secret`) buffer to hold cipher
|
// preallocated (on-stack in case of `Secret`) buffer to hold cipher
|
||||||
// length = length(plain) as we are using CTR-approach
|
// length = length(plain) as we are using CTR-approach
|
||||||
@@ -104,7 +105,7 @@ impl Crypto {
|
|||||||
ciphertext: ciphertext.into_vec(),
|
ciphertext: ciphertext.into_vec(),
|
||||||
kdf: Kdf::Pbkdf2(Pbkdf2 {
|
kdf: Kdf::Pbkdf2(Pbkdf2 {
|
||||||
dklen: crypto::KEY_LENGTH as u32,
|
dklen: crypto::KEY_LENGTH as u32,
|
||||||
salt: salt,
|
salt: salt.to_vec(),
|
||||||
c: iterations,
|
c: iterations,
|
||||||
prf: Prf::HmacSha256,
|
prf: Prf::HmacSha256,
|
||||||
}),
|
}),
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use json;
|
use json;
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ pub struct Pbkdf2 {
|
|||||||
pub c: u32,
|
pub c: u32,
|
||||||
pub dklen: u32,
|
pub dklen: u32,
|
||||||
pub prf: Prf,
|
pub prf: Prf,
|
||||||
pub salt: [u8; 32],
|
pub salt: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
@@ -35,7 +35,7 @@ pub struct Scrypt {
|
|||||||
pub p: u32,
|
pub p: u32,
|
||||||
pub n: u32,
|
pub n: u32,
|
||||||
pub r: u32,
|
pub r: u32,
|
||||||
pub salt: [u8; 32],
|
pub salt: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
mod cipher;
|
mod cipher;
|
||||||
mod crypto;
|
mod crypto;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use ethkey::{self, KeyPair, sign, Address, Password, Signature, Message, Public, Secret};
|
use ethkey::{self, KeyPair, sign, Address, Password, Signature, Message, Public, Secret};
|
||||||
use ethkey::crypto::ecdh::agree;
|
use ethkey::crypto::ecdh::agree;
|
||||||
@@ -45,7 +45,7 @@ impl Into<json::KeyFile> for SafeAccount {
|
|||||||
json::KeyFile {
|
json::KeyFile {
|
||||||
id: From::from(self.id),
|
id: From::from(self.id),
|
||||||
version: self.version.into(),
|
version: self.version.into(),
|
||||||
address: self.address.into(),
|
address: Some(self.address.into()),
|
||||||
crypto: self.crypto.into(),
|
crypto: self.crypto.into(),
|
||||||
name: Some(self.name.into()),
|
name: Some(self.name.into()),
|
||||||
meta: Some(self.meta.into()),
|
meta: Some(self.meta.into()),
|
||||||
@@ -77,16 +77,43 @@ impl SafeAccount {
|
|||||||
/// Create a new `SafeAccount` from the given `json`; if it was read from a
|
/// Create a new `SafeAccount` from the given `json`; if it was read from a
|
||||||
/// file, the `filename` should be `Some` name. If it is as yet anonymous, then it
|
/// file, the `filename` should be `Some` name. If it is as yet anonymous, then it
|
||||||
/// can be left `None`.
|
/// can be left `None`.
|
||||||
pub fn from_file(json: json::KeyFile, filename: Option<String>) -> Self {
|
/// In case `password` is provided, we will attempt to read the secret from the keyfile
|
||||||
SafeAccount {
|
/// and derive the address from it instead of reading it directly.
|
||||||
|
/// Providing password is required for `json::KeyFile`s with no address.
|
||||||
|
pub fn from_file(json: json::KeyFile, filename: Option<String>, password: &Option<Password>) -> Result<Self, Error> {
|
||||||
|
let crypto = Crypto::from(json.crypto);
|
||||||
|
let address = match (password, &json.address) {
|
||||||
|
(None, Some(json_address)) => json_address.into(),
|
||||||
|
(None, None) => Err(Error::Custom(
|
||||||
|
"This keystore does not contain address. You need to provide password to import it".into()))?,
|
||||||
|
(Some(password), json_address) => {
|
||||||
|
let derived_address = KeyPair::from_secret(
|
||||||
|
crypto.secret(&password).map_err(|_| Error::InvalidPassword)?
|
||||||
|
)?.address();
|
||||||
|
|
||||||
|
match json_address {
|
||||||
|
Some(json_address) => {
|
||||||
|
let json_address = json_address.into();
|
||||||
|
if derived_address != json_address {
|
||||||
|
warn!("Detected address mismatch when opening an account. Derived: {:?}, in json got: {:?}",
|
||||||
|
derived_address, json_address);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_ => {},
|
||||||
|
}
|
||||||
|
derived_address
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Ok(SafeAccount {
|
||||||
id: json.id.into(),
|
id: json.id.into(),
|
||||||
version: json.version.into(),
|
version: json.version.into(),
|
||||||
address: json.address.into(),
|
address,
|
||||||
crypto: json.crypto.into(),
|
crypto,
|
||||||
filename: filename,
|
filename,
|
||||||
name: json.name.unwrap_or(String::new()),
|
name: json.name.unwrap_or(String::new()),
|
||||||
meta: json.meta.unwrap_or("{}".to_owned()),
|
meta: json.meta.unwrap_or("{}".to_owned()),
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new `SafeAccount` from the given vault `json`; if it was read from a
|
/// Create a new `SafeAccount` from the given vault `json`; if it was read from a
|
||||||
@@ -97,14 +124,14 @@ impl SafeAccount {
|
|||||||
let meta_plain = meta_crypto.decrypt(password)?;
|
let meta_plain = meta_crypto.decrypt(password)?;
|
||||||
let meta_plain = json::VaultKeyMeta::load(&meta_plain).map_err(|e| Error::Custom(format!("{:?}", e)))?;
|
let meta_plain = json::VaultKeyMeta::load(&meta_plain).map_err(|e| Error::Custom(format!("{:?}", e)))?;
|
||||||
|
|
||||||
Ok(SafeAccount::from_file(json::KeyFile {
|
SafeAccount::from_file(json::KeyFile {
|
||||||
id: json.id,
|
id: json.id,
|
||||||
version: json.version,
|
version: json.version,
|
||||||
crypto: json.crypto,
|
crypto: json.crypto,
|
||||||
address: meta_plain.address,
|
address: Some(meta_plain.address),
|
||||||
name: meta_plain.name,
|
name: meta_plain.name,
|
||||||
meta: meta_plain.meta,
|
meta: meta_plain.meta,
|
||||||
}, filename))
|
}, filename, &None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new `VaultKeyFile` from the given `self`
|
/// Create a new `VaultKeyFile` from the given `self`
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use json;
|
use json;
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::{fs, io};
|
use std::{fs, io};
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
@@ -23,6 +23,7 @@ use {json, SafeAccount, Error};
|
|||||||
use json::Uuid;
|
use json::Uuid;
|
||||||
use super::{KeyDirectory, VaultKeyDirectory, VaultKeyDirectoryProvider, VaultKey};
|
use super::{KeyDirectory, VaultKeyDirectory, VaultKeyDirectoryProvider, VaultKey};
|
||||||
use super::vault::{VAULT_FILE_NAME, VaultDiskDirectory};
|
use super::vault::{VAULT_FILE_NAME, VaultDiskDirectory};
|
||||||
|
use ethkey::Password;
|
||||||
|
|
||||||
const IGNORED_FILES: &'static [&'static str] = &[
|
const IGNORED_FILES: &'static [&'static str] = &[
|
||||||
"thumbs.db",
|
"thumbs.db",
|
||||||
@@ -106,6 +107,7 @@ pub type RootDiskDirectory = DiskDirectory<DiskKeyFileManager>;
|
|||||||
pub trait KeyFileManager: Send + Sync {
|
pub trait KeyFileManager: Send + Sync {
|
||||||
/// Read `SafeAccount` from given key file stream
|
/// Read `SafeAccount` from given key file stream
|
||||||
fn read<T>(&self, filename: Option<String>, reader: T) -> Result<SafeAccount, Error> where T: io::Read;
|
fn read<T>(&self, filename: Option<String>, reader: T) -> Result<SafeAccount, Error> where T: io::Read;
|
||||||
|
|
||||||
/// Write `SafeAccount` to given key file stream
|
/// Write `SafeAccount` to given key file stream
|
||||||
fn write<T>(&self, account: SafeAccount, writer: &mut T) -> Result<(), Error> where T: io::Write;
|
fn write<T>(&self, account: SafeAccount, writer: &mut T) -> Result<(), Error> where T: io::Write;
|
||||||
}
|
}
|
||||||
@@ -117,7 +119,10 @@ pub struct DiskDirectory<T> where T: KeyFileManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Keys file manager for root keys directory
|
/// Keys file manager for root keys directory
|
||||||
pub struct DiskKeyFileManager;
|
#[derive(Default)]
|
||||||
|
pub struct DiskKeyFileManager {
|
||||||
|
password: Option<Password>,
|
||||||
|
}
|
||||||
|
|
||||||
impl RootDiskDirectory {
|
impl RootDiskDirectory {
|
||||||
pub fn create<P>(path: P) -> Result<Self, Error> where P: AsRef<Path> {
|
pub fn create<P>(path: P) -> Result<Self, Error> where P: AsRef<Path> {
|
||||||
@@ -125,8 +130,13 @@ impl RootDiskDirectory {
|
|||||||
Ok(Self::at(path))
|
Ok(Self::at(path))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// allows to read keyfiles with given password (needed for keyfiles w/o address)
|
||||||
|
pub fn with_password(&self, password: Option<Password>) -> Self {
|
||||||
|
DiskDirectory::new(&self.path, DiskKeyFileManager { password })
|
||||||
|
}
|
||||||
|
|
||||||
pub fn at<P>(path: P) -> Self where P: AsRef<Path> {
|
pub fn at<P>(path: P) -> Self where P: AsRef<Path> {
|
||||||
DiskDirectory::new(path, DiskKeyFileManager)
|
DiskDirectory::new(path, DiskKeyFileManager::default())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,7 +329,7 @@ impl<T> VaultKeyDirectoryProvider for DiskDirectory<T> where T: KeyFileManager {
|
|||||||
impl KeyFileManager for DiskKeyFileManager {
|
impl KeyFileManager for DiskKeyFileManager {
|
||||||
fn read<T>(&self, filename: Option<String>, reader: T) -> Result<SafeAccount, Error> where T: io::Read {
|
fn read<T>(&self, filename: Option<String>, reader: T) -> Result<SafeAccount, Error> where T: io::Read {
|
||||||
let key_file = json::KeyFile::load(reader).map_err(|e| Error::Custom(format!("{:?}", e)))?;
|
let key_file = json::KeyFile::load(reader).map_err(|e| Error::Custom(format!("{:?}", e)))?;
|
||||||
Ok(SafeAccount::from_file(key_file, filename))
|
SafeAccount::from_file(key_file, filename, &self.password)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write<T>(&self, mut account: SafeAccount, writer: &mut T) -> Result<(), Error> where T: io::Write {
|
fn write<T>(&self, mut account: SafeAccount, writer: &mut T) -> Result<(), Error> where T: io::Write {
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Accounts Directory
|
//! Accounts Directory
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::{fs, io};
|
use std::{fs, io};
|
||||||
use std::path::{PathBuf, Path};
|
use std::path::{PathBuf, Path};
|
||||||
@@ -310,8 +310,10 @@ mod test {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn make_vault_dir_path_succeeds() {
|
fn make_vault_dir_path_succeeds() {
|
||||||
assert_eq!(make_vault_dir_path("/home/user/parity", "vault", true).unwrap().to_str().unwrap(), "/home/user/parity/vault");
|
use std::path::Path;
|
||||||
assert_eq!(make_vault_dir_path("/home/user/parity", "*bad-name*", false).unwrap().to_str().unwrap(), "/home/user/parity/*bad-name*");
|
|
||||||
|
assert_eq!(&make_vault_dir_path("/home/user/parity", "vault", true).unwrap(), &Path::new("/home/user/parity/vault"));
|
||||||
|
assert_eq!(&make_vault_dir_path("/home/user/parity", "*bad-name*", false).unwrap(), &Path::new("/home/user/parity/*bad-name*"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::io::Error as IoError;
|
use std::io::Error as IoError;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! ethkey reexport to make documentation look pretty.
|
//! ethkey reexport to make documentation look pretty.
|
||||||
pub use _ethkey::*;
|
pub use _ethkey::*;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::collections::{BTreeMap, HashMap};
|
use std::collections::{BTreeMap, HashMap};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
@@ -168,7 +168,7 @@ impl SecretStore for EthStore {
|
|||||||
|
|
||||||
fn import_wallet(&self, vault: SecretVaultRef, json: &[u8], password: &Password, gen_id: bool) -> Result<StoreAccountRef, Error> {
|
fn import_wallet(&self, vault: SecretVaultRef, json: &[u8], password: &Password, gen_id: bool) -> Result<StoreAccountRef, Error> {
|
||||||
let json_keyfile = json::KeyFile::load(json).map_err(|_| Error::InvalidKeyFile("Invalid JSON format".to_owned()))?;
|
let json_keyfile = json::KeyFile::load(json).map_err(|_| Error::InvalidKeyFile("Invalid JSON format".to_owned()))?;
|
||||||
let mut safe_account = SafeAccount::from_file(json_keyfile, None);
|
let mut safe_account = SafeAccount::from_file(json_keyfile, None, &None)?;
|
||||||
|
|
||||||
if gen_id {
|
if gen_id {
|
||||||
safe_account.id = Random::random();
|
safe_account.id = Random::random();
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
@@ -25,7 +25,7 @@ use Error;
|
|||||||
|
|
||||||
/// Import an account from a file.
|
/// Import an account from a file.
|
||||||
pub fn import_account(path: &Path, dst: &KeyDirectory) -> Result<Address, Error> {
|
pub fn import_account(path: &Path, dst: &KeyDirectory) -> Result<Address, Error> {
|
||||||
let key_manager = DiskKeyFileManager;
|
let key_manager = DiskKeyFileManager::default();
|
||||||
let existing_accounts = dst.load()?.into_iter().map(|a| a.address).collect::<HashSet<_>>();
|
let existing_accounts = dst.load()?.into_iter().map(|a| a.address).collect::<HashSet<_>>();
|
||||||
let filename = path.file_name().and_then(|n| n.to_str()).map(|f| f.to_owned());
|
let filename = path.file_name().and_then(|n| n.to_str()).map(|f| f.to_owned());
|
||||||
let account = fs::File::open(&path)
|
let account = fs::File::open(&path)
|
||||||
@@ -42,7 +42,9 @@ pub fn import_account(path: &Path, dst: &KeyDirectory) -> Result<Address, Error>
|
|||||||
/// Import all accounts from one directory to the other.
|
/// Import all accounts from one directory to the other.
|
||||||
pub fn import_accounts(src: &KeyDirectory, dst: &KeyDirectory) -> Result<Vec<Address>, Error> {
|
pub fn import_accounts(src: &KeyDirectory, dst: &KeyDirectory) -> Result<Vec<Address>, Error> {
|
||||||
let accounts = src.load()?;
|
let accounts = src.load()?;
|
||||||
let existing_accounts = dst.load()?.into_iter().map(|a| a.address).collect::<HashSet<_>>();
|
let existing_accounts = dst.load()?.into_iter()
|
||||||
|
.map(|a| a.address)
|
||||||
|
.collect::<HashSet<_>>();
|
||||||
|
|
||||||
accounts.into_iter()
|
accounts.into_iter()
|
||||||
.filter(|a| !existing_accounts.contains(&a.address))
|
.filter(|a| !existing_accounts.contains(&a.address))
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::{ops, str};
|
use std::{ops, str};
|
||||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use serde::{Serialize, Serializer, Deserialize, Deserializer};
|
use serde::{Serialize, Serializer, Deserialize, Deserializer};
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::{fmt, str};
|
use std::{fmt, str};
|
||||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||||
@@ -52,6 +52,7 @@ enum CryptoField {
|
|||||||
Kdf,
|
Kdf,
|
||||||
KdfParams,
|
KdfParams,
|
||||||
Mac,
|
Mac,
|
||||||
|
Version,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Deserialize<'a> for CryptoField {
|
impl<'a> Deserialize<'a> for CryptoField {
|
||||||
@@ -81,6 +82,7 @@ impl<'a> Visitor<'a> for CryptoFieldVisitor {
|
|||||||
"kdf" => Ok(CryptoField::Kdf),
|
"kdf" => Ok(CryptoField::Kdf),
|
||||||
"kdfparams" => Ok(CryptoField::KdfParams),
|
"kdfparams" => Ok(CryptoField::KdfParams),
|
||||||
"mac" => Ok(CryptoField::Mac),
|
"mac" => Ok(CryptoField::Mac),
|
||||||
|
"version" => Ok(CryptoField::Version),
|
||||||
_ => Err(Error::custom(format!("Unknown field: '{}'", value))),
|
_ => Err(Error::custom(format!("Unknown field: '{}'", value))),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,6 +124,8 @@ impl<'a> Visitor<'a> for CryptoVisitor {
|
|||||||
Some(CryptoField::Kdf) => { kdf = Some(visitor.next_value()?); }
|
Some(CryptoField::Kdf) => { kdf = Some(visitor.next_value()?); }
|
||||||
Some(CryptoField::KdfParams) => { kdfparams = Some(visitor.next_value()?); }
|
Some(CryptoField::KdfParams) => { kdfparams = Some(visitor.next_value()?); }
|
||||||
Some(CryptoField::Mac) => { mac = Some(visitor.next_value()?); }
|
Some(CryptoField::Mac) => { mac = Some(visitor.next_value()?); }
|
||||||
|
// skip not required version field (it appears in pyethereum generated keystores)
|
||||||
|
Some(CryptoField::Version) => { visitor.next_value().unwrap_or(()) }
|
||||||
None => { break; }
|
None => { break; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::{ops, fmt, str};
|
use std::{ops, fmt, str};
|
||||||
use rustc_hex::{FromHex, ToHex};
|
use rustc_hex::{FromHex, ToHex};
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Universaly unique identifier.
|
//! Universaly unique identifier.
|
||||||
use std::{fmt, str};
|
use std::{fmt, str};
|
||||||
@@ -1,23 +1,23 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use serde::{Serialize, Serializer, Deserialize, Deserializer};
|
use serde::{Serialize, Serializer, Deserialize, Deserializer};
|
||||||
use serde::de::{Visitor, Error as SerdeError};
|
use serde::de::{Visitor, Error as SerdeError};
|
||||||
use super::{Error, H256};
|
use super::{Error, Bytes};
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum KdfSer {
|
pub enum KdfSer {
|
||||||
@@ -111,7 +111,7 @@ pub struct Pbkdf2 {
|
|||||||
pub c: u32,
|
pub c: u32,
|
||||||
pub dklen: u32,
|
pub dklen: u32,
|
||||||
pub prf: Prf,
|
pub prf: Prf,
|
||||||
pub salt: H256,
|
pub salt: Bytes,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||||
@@ -120,7 +120,7 @@ pub struct Scrypt {
|
|||||||
pub p: u32,
|
pub p: u32,
|
||||||
pub n: u32,
|
pub n: u32,
|
||||||
pub r: u32,
|
pub r: u32,
|
||||||
pub salt: H256,
|
pub salt: Bytes,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
@@ -46,7 +46,7 @@ pub struct KeyFile {
|
|||||||
pub id: Uuid,
|
pub id: Uuid,
|
||||||
pub version: Version,
|
pub version: Version,
|
||||||
pub crypto: Crypto,
|
pub crypto: Crypto,
|
||||||
pub address: H160,
|
pub address: Option<H160>,
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
pub meta: Option<String>,
|
pub meta: Option<String>,
|
||||||
}
|
}
|
||||||
@@ -158,11 +158,6 @@ impl<'a> Visitor<'a> for KeyFileVisitor {
|
|||||||
None => return Err(V::Error::missing_field("crypto")),
|
None => return Err(V::Error::missing_field("crypto")),
|
||||||
};
|
};
|
||||||
|
|
||||||
let address = match address {
|
|
||||||
Some(address) => address,
|
|
||||||
None => return Err(V::Error::missing_field("address")),
|
|
||||||
};
|
|
||||||
|
|
||||||
let result = KeyFile {
|
let result = KeyFile {
|
||||||
id: id,
|
id: id,
|
||||||
version: version,
|
version: version,
|
||||||
@@ -222,7 +217,7 @@ mod tests {
|
|||||||
let expected = KeyFile {
|
let expected = KeyFile {
|
||||||
id: Uuid::from_str("8777d9f6-7860-4b9b-88b7-0b57ee6b3a73").unwrap(),
|
id: Uuid::from_str("8777d9f6-7860-4b9b-88b7-0b57ee6b3a73").unwrap(),
|
||||||
version: Version::V3,
|
version: Version::V3,
|
||||||
address: "6edddfc6349aff20bc6467ccf276c5b52487f7a8".into(),
|
address: Some("6edddfc6349aff20bc6467ccf276c5b52487f7a8".into()),
|
||||||
crypto: Crypto {
|
crypto: Crypto {
|
||||||
cipher: Cipher::Aes128Ctr(Aes128Ctr {
|
cipher: Cipher::Aes128Ctr(Aes128Ctr {
|
||||||
iv: "b5a7ec855ec9e2c405371356855fec83".into(),
|
iv: "b5a7ec855ec9e2c405371356855fec83".into(),
|
||||||
@@ -273,7 +268,7 @@ mod tests {
|
|||||||
let expected = KeyFile {
|
let expected = KeyFile {
|
||||||
id: "8777d9f6-7860-4b9b-88b7-0b57ee6b3a73".into(),
|
id: "8777d9f6-7860-4b9b-88b7-0b57ee6b3a73".into(),
|
||||||
version: Version::V3,
|
version: Version::V3,
|
||||||
address: "6edddfc6349aff20bc6467ccf276c5b52487f7a8".into(),
|
address: Some("6edddfc6349aff20bc6467ccf276c5b52487f7a8".into()),
|
||||||
crypto: Crypto {
|
crypto: Crypto {
|
||||||
cipher: Cipher::Aes128Ctr(Aes128Ctr {
|
cipher: Cipher::Aes128Ctr(Aes128Ctr {
|
||||||
iv: "b5a7ec855ec9e2c405371356855fec83".into(),
|
iv: "b5a7ec855ec9e2c405371356855fec83".into(),
|
||||||
@@ -301,7 +296,7 @@ mod tests {
|
|||||||
let file = KeyFile {
|
let file = KeyFile {
|
||||||
id: "8777d9f6-7860-4b9b-88b7-0b57ee6b3a73".into(),
|
id: "8777d9f6-7860-4b9b-88b7-0b57ee6b3a73".into(),
|
||||||
version: Version::V3,
|
version: Version::V3,
|
||||||
address: "6edddfc6349aff20bc6467ccf276c5b52487f7a8".into(),
|
address: Some("6edddfc6349aff20bc6467ccf276c5b52487f7a8".into()),
|
||||||
crypto: Crypto {
|
crypto: Crypto {
|
||||||
cipher: Cipher::Aes128Ctr(Aes128Ctr {
|
cipher: Cipher::Aes128Ctr(Aes128Ctr {
|
||||||
iv: "b5a7ec855ec9e2c405371356855fec83".into(),
|
iv: "b5a7ec855ec9e2c405371356855fec83".into(),
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Contract interface specification.
|
//! Contract interface specification.
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
use serde_json;
|
use serde_json;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use serde_json;
|
use serde_json;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use serde::de::Error;
|
use serde::de::Error;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use serde::{Serialize, Serializer, Deserialize, Deserializer};
|
use serde::{Serialize, Serializer, Deserialize, Deserializer};
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Ethereum key-management.
|
//! Ethereum key-management.
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use rand::{Rng, OsRng};
|
use rand::{Rng, OsRng};
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate ethstore;
|
extern crate ethstore;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
mod transient_dir;
|
mod transient_dir;
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::{env, fs};
|
use std::{env, fs};
|
||||||
@@ -6,5 +6,5 @@ license = "GPL-3.0"
|
|||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ethereum-types = "0.3"
|
ethereum-types = "0.4"
|
||||||
ethkey = { path = "../../ethkey" }
|
ethkey = { path = "../../accounts/ethkey" }
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Dummy module for platforms that does not provide support for hardware wallets (libusb)
|
//! Dummy module for platforms that does not provide support for hardware wallets (libusb)
|
||||||
|
|
||||||
@@ -7,14 +7,14 @@ version = "1.12.0"
|
|||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.3"
|
log = "0.4"
|
||||||
parking_lot = "0.6"
|
parking_lot = "0.7"
|
||||||
protobuf = "1.4"
|
protobuf = "1.4"
|
||||||
hidapi = { git = "https://github.com/paritytech/hidapi-rs" }
|
hidapi = { git = "https://github.com/paritytech/hidapi-rs" }
|
||||||
libusb = { git = "https://github.com/paritytech/libusb-rs" }
|
libusb = { git = "https://github.com/paritytech/libusb-rs" }
|
||||||
trezor-sys = { git = "https://github.com/paritytech/trezor-sys" }
|
trezor-sys = { git = "https://github.com/paritytech/trezor-sys" }
|
||||||
ethkey = { path = "../ethkey" }
|
ethkey = { path = "../ethkey" }
|
||||||
ethereum-types = "0.3"
|
ethereum-types = "0.4"
|
||||||
semver = "0.9"
|
semver = "0.9"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Hardware wallet management.
|
//! Hardware wallet management.
|
||||||
|
|
||||||
@@ -34,15 +34,18 @@ extern crate trezor_sys;
|
|||||||
mod ledger;
|
mod ledger;
|
||||||
mod trezor;
|
mod trezor;
|
||||||
|
|
||||||
use std::sync::{Arc, atomic, atomic::AtomicBool};
|
use std::sync::{Arc, atomic, atomic::AtomicBool, Weak};
|
||||||
use std::{fmt, time::Duration};
|
use std::{fmt, time::Duration};
|
||||||
|
use std::thread;
|
||||||
|
|
||||||
use ethereum_types::U256;
|
use ethereum_types::U256;
|
||||||
use ethkey::{Address, Signature};
|
use ethkey::{Address, Signature};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
const USB_DEVICE_CLASS_DEVICE: u8 = 0;
|
const HID_GLOBAL_USAGE_PAGE: u16 = 0xFF00;
|
||||||
const POLLING_DURATION: Duration = Duration::from_millis(500);
|
const HID_USB_DEVICE_CLASS: u8 = 0;
|
||||||
|
const MAX_POLLING_DURATION: Duration = Duration::from_millis(500);
|
||||||
|
const USB_EVENT_POLLING_INTERVAL: Duration = Duration::from_millis(500);
|
||||||
|
|
||||||
/// `HardwareWallet` device
|
/// `HardwareWallet` device
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
@@ -60,7 +63,7 @@ pub trait Wallet<'a> {
|
|||||||
|
|
||||||
/// Sign transaction data with wallet managing `address`.
|
/// Sign transaction data with wallet managing `address`.
|
||||||
fn sign_transaction(&self, address: &Address, transaction: Self::Transaction) -> Result<Signature, Self::Error>;
|
fn sign_transaction(&self, address: &Address, transaction: Self::Transaction) -> Result<Signature, Self::Error>;
|
||||||
|
|
||||||
/// Set key derivation path for a chain.
|
/// Set key derivation path for a chain.
|
||||||
fn set_key_path(&self, key_path: KeyPath);
|
fn set_key_path(&self, key_path: KeyPath);
|
||||||
|
|
||||||
@@ -189,7 +192,7 @@ impl From<libusb::Error> for Error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Specifies the direction of the `HardwareWallet` i.e, whether it arrived or left
|
/// Specifies the direction of the `HardwareWallet` i.e, whether it arrived or left
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||||
pub enum DeviceDirection {
|
pub enum DeviceDirection {
|
||||||
/// Device arrived
|
/// Device arrived
|
||||||
Arrived,
|
Arrived,
|
||||||
@@ -218,13 +221,47 @@ impl HardwareWalletManager {
|
|||||||
pub fn new() -> Result<Self, Error> {
|
pub fn new() -> Result<Self, Error> {
|
||||||
let exiting = Arc::new(AtomicBool::new(false));
|
let exiting = Arc::new(AtomicBool::new(false));
|
||||||
let hidapi = Arc::new(Mutex::new(hidapi::HidApi::new().map_err(|e| Error::Hid(e.to_string().clone()))?));
|
let hidapi = Arc::new(Mutex::new(hidapi::HidApi::new().map_err(|e| Error::Hid(e.to_string().clone()))?));
|
||||||
let ledger = ledger::Manager::new(hidapi.clone(), exiting.clone())?;
|
let ledger = ledger::Manager::new(hidapi.clone());
|
||||||
let trezor = trezor::Manager::new(hidapi.clone(), exiting.clone())?;
|
let trezor = trezor::Manager::new(hidapi.clone());
|
||||||
|
let usb_context = Arc::new(libusb::Context::new()?);
|
||||||
|
|
||||||
|
let l = ledger.clone();
|
||||||
|
let t = trezor.clone();
|
||||||
|
let exit = exiting.clone();
|
||||||
|
|
||||||
|
// Subscribe to all vendor IDs (VIDs) and product IDs (PIDs)
|
||||||
|
// This means that the `HardwareWalletManager` is responsible to validate the detected device
|
||||||
|
usb_context.register_callback(
|
||||||
|
None, None, Some(HID_USB_DEVICE_CLASS),
|
||||||
|
Box::new(EventHandler::new(
|
||||||
|
Arc::downgrade(&ledger),
|
||||||
|
Arc::downgrade(&trezor)
|
||||||
|
))
|
||||||
|
)?;
|
||||||
|
|
||||||
|
// Hardware event subscriber thread
|
||||||
|
thread::Builder::new()
|
||||||
|
.name("hw_wallet_manager".to_string())
|
||||||
|
.spawn(move || {
|
||||||
|
if let Err(e) = l.update_devices(DeviceDirection::Arrived) {
|
||||||
|
debug!(target: "hw", "Ledger couldn't connect at startup, error: {}", e);
|
||||||
|
}
|
||||||
|
if let Err(e) = t.update_devices(DeviceDirection::Arrived) {
|
||||||
|
debug!(target: "hw", "Trezor couldn't connect at startup, error: {}", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
while !exit.load(atomic::Ordering::Acquire) {
|
||||||
|
if let Err(e) = usb_context.handle_events(Some(USB_EVENT_POLLING_INTERVAL)) {
|
||||||
|
debug!(target: "hw", "HardwareWalletManager event handler error: {}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
exiting,
|
exiting,
|
||||||
ledger,
|
|
||||||
trezor,
|
trezor,
|
||||||
|
ledger,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,10 +329,74 @@ impl HardwareWalletManager {
|
|||||||
|
|
||||||
impl Drop for HardwareWalletManager {
|
impl Drop for HardwareWalletManager {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
// Indicate to the USB Hotplug handlers that they
|
// Indicate to the USB Hotplug handler that it
|
||||||
// shall terminate but don't wait for them to terminate.
|
// shall terminate but don't wait for it to terminate.
|
||||||
// If they don't terminate for some reason USB Hotplug events will be handled
|
// If it doesn't terminate for some reason USB Hotplug events will be handled
|
||||||
// even if the HardwareWalletManger has been dropped
|
// even if the HardwareWalletManger has been dropped
|
||||||
self.exiting.store(true, atomic::Ordering::Release);
|
self.exiting.store(true, atomic::Ordering::Release);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Hardware wallet event handler
|
||||||
|
///
|
||||||
|
/// Note, that this runs to completion and race-conditions can't occur but it can
|
||||||
|
/// stop other events for being processed with an infinite loop or similar
|
||||||
|
struct EventHandler {
|
||||||
|
ledger: Weak<ledger::Manager>,
|
||||||
|
trezor: Weak<trezor::Manager>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl EventHandler {
|
||||||
|
/// Trezor event handler constructor
|
||||||
|
pub fn new(ledger: Weak<ledger::Manager>, trezor: Weak<trezor::Manager>) -> Self {
|
||||||
|
Self { ledger, trezor }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn extract_device_info(device: &libusb::Device) -> Result<(u16, u16), Error> {
|
||||||
|
let desc = device.device_descriptor()?;
|
||||||
|
Ok((desc.vendor_id(), desc.product_id()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl libusb::Hotplug for EventHandler {
|
||||||
|
fn device_arrived(&mut self, device: libusb::Device) {
|
||||||
|
// Upgrade reference to an Arc
|
||||||
|
if let (Some(ledger), Some(trezor)) = (self.ledger.upgrade(), self.trezor.upgrade()) {
|
||||||
|
// Version ID and Product ID are available
|
||||||
|
if let Ok((vid, pid)) = Self::extract_device_info(&device) {
|
||||||
|
if trezor::is_valid_trezor(vid, pid) {
|
||||||
|
if !trezor::try_connect_polling(&trezor, &MAX_POLLING_DURATION, DeviceDirection::Arrived) {
|
||||||
|
trace!(target: "hw", "Trezor device was detected but connection failed");
|
||||||
|
}
|
||||||
|
} else if ledger::is_valid_ledger(vid, pid) {
|
||||||
|
if !ledger::try_connect_polling(&ledger, &MAX_POLLING_DURATION, DeviceDirection::Arrived) {
|
||||||
|
trace!(target: "hw", "Ledger device was detected but connection failed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn device_left(&mut self, device: libusb::Device) {
|
||||||
|
// Upgrade reference to an Arc
|
||||||
|
if let (Some(ledger), Some(trezor)) = (self.ledger.upgrade(), self.trezor.upgrade()) {
|
||||||
|
// Version ID and Product ID are available
|
||||||
|
if let Ok((vid, pid)) = Self::extract_device_info(&device) {
|
||||||
|
if trezor::is_valid_trezor(vid, pid) {
|
||||||
|
if !trezor::try_connect_polling(&trezor, &MAX_POLLING_DURATION, DeviceDirection::Left) {
|
||||||
|
trace!(target: "hw", "Trezor device was detected but disconnection failed");
|
||||||
|
}
|
||||||
|
} else if ledger::is_valid_ledger(vid, pid) {
|
||||||
|
if !ledger::try_connect_polling(&ledger, &MAX_POLLING_DURATION, DeviceDirection::Left) {
|
||||||
|
trace!(target: "hw", "Ledger device was detected but disconnection failed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Helper to determine if a device is a valid HID
|
||||||
|
pub fn is_valid_hid_device(usage_page: u16, interface_number: i32) -> bool {
|
||||||
|
usage_page == HID_GLOBAL_USAGE_PAGE || interface_number == HID_USB_DEVICE_CLASS as i32
|
||||||
|
}
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Trezor hardware wallet module. Supports Trezor v1.
|
//! Trezor hardware wallet module. Supports Trezor v1.
|
||||||
//! See <http://doc.satoshilabs.com/trezor-tech/api-protobuf.html>
|
//! See <http://doc.satoshilabs.com/trezor-tech/api-protobuf.html>
|
||||||
@@ -20,9 +20,9 @@
|
|||||||
//! for protocol details.
|
//! for protocol details.
|
||||||
|
|
||||||
use std::cmp::{min, max};
|
use std::cmp::{min, max};
|
||||||
use std::sync::{atomic, atomic::AtomicBool, Arc, Weak};
|
use std::sync::Arc;
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
use std::{fmt, thread};
|
use std::fmt;
|
||||||
|
|
||||||
use ethereum_types::{U256, H256, Address};
|
use ethereum_types::{U256, H256, Address};
|
||||||
use ethkey::Signature;
|
use ethkey::Signature;
|
||||||
@@ -30,7 +30,7 @@ use hidapi;
|
|||||||
use libusb;
|
use libusb;
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
use protobuf::{self, Message, ProtobufEnum};
|
use protobuf::{self, Message, ProtobufEnum};
|
||||||
use super::{DeviceDirection, WalletInfo, TransactionInfo, KeyPath, Wallet, Device, USB_DEVICE_CLASS_DEVICE, POLLING_DURATION};
|
use super::{DeviceDirection, WalletInfo, TransactionInfo, KeyPath, Wallet, Device, is_valid_hid_device};
|
||||||
use trezor_sys::messages::{EthereumAddress, PinMatrixAck, MessageType, EthereumTxRequest, EthereumSignTx, EthereumGetAddress, EthereumTxAck, ButtonAck};
|
use trezor_sys::messages::{EthereumAddress, PinMatrixAck, MessageType, EthereumTxRequest, EthereumSignTx, EthereumGetAddress, EthereumTxAck, ButtonAck};
|
||||||
|
|
||||||
/// Trezor v1 vendor ID
|
/// Trezor v1 vendor ID
|
||||||
@@ -48,6 +48,8 @@ pub enum Error {
|
|||||||
Protocol(&'static str),
|
Protocol(&'static str),
|
||||||
/// Hidapi error.
|
/// Hidapi error.
|
||||||
Usb(hidapi::HidError),
|
Usb(hidapi::HidError),
|
||||||
|
/// Libusb error
|
||||||
|
LibUsb(libusb::Error),
|
||||||
/// Device with request key is not available.
|
/// Device with request key is not available.
|
||||||
KeyNotFound,
|
KeyNotFound,
|
||||||
/// Signing has been cancelled by user.
|
/// Signing has been cancelled by user.
|
||||||
@@ -62,6 +64,8 @@ pub enum Error {
|
|||||||
NoDeviceArrived,
|
NoDeviceArrived,
|
||||||
/// No device left
|
/// No device left
|
||||||
NoDeviceLeft,
|
NoDeviceLeft,
|
||||||
|
/// Invalid PID or VID
|
||||||
|
InvalidDevice,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Error {
|
impl fmt::Display for Error {
|
||||||
@@ -69,13 +73,15 @@ impl fmt::Display for Error {
|
|||||||
match *self {
|
match *self {
|
||||||
Error::Protocol(ref s) => write!(f, "Trezor protocol error: {}", s),
|
Error::Protocol(ref s) => write!(f, "Trezor protocol error: {}", s),
|
||||||
Error::Usb(ref e) => write!(f, "USB communication error: {}", e),
|
Error::Usb(ref e) => write!(f, "USB communication error: {}", e),
|
||||||
|
Error::LibUsb(ref e) => write!(f, "LibUSB communication error: {}", e),
|
||||||
Error::KeyNotFound => write!(f, "Key not found"),
|
Error::KeyNotFound => write!(f, "Key not found"),
|
||||||
Error::UserCancel => write!(f, "Operation has been cancelled"),
|
Error::UserCancel => write!(f, "Operation has been cancelled"),
|
||||||
Error::BadMessageType => write!(f, "Bad Message Type in RPC call"),
|
Error::BadMessageType => write!(f, "Bad Message Type in RPC call"),
|
||||||
Error::LockedDevice(ref s) => write!(f, "Device is locked, needs PIN to perform operations: {}", s),
|
Error::LockedDevice(ref s) => write!(f, "Device is locked, needs PIN to perform operations: {}", s),
|
||||||
Error::NoSigningMessage=> write!(f, "Signing messages are not supported by Trezor"),
|
Error::NoSigningMessage=> write!(f, "Signing messages are not supported by Trezor"),
|
||||||
Error::NoDeviceArrived => write!(f, "No device arrived"),
|
Error::NoDeviceArrived => write!(f, "No device arrived"),
|
||||||
Error::NoDeviceLeft=> write!(f, "No device left"),
|
Error::NoDeviceLeft => write!(f, "No device left"),
|
||||||
|
Error::InvalidDevice => write!(f, "Device with non-supported product ID or vendor ID was detected"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,6 +92,12 @@ impl From<hidapi::HidError> for Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<libusb::Error> for Error {
|
||||||
|
fn from(err: libusb::Error) -> Self {
|
||||||
|
Error::LibUsb(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl From<protobuf::ProtobufError> for Error {
|
impl From<protobuf::ProtobufError> for Error {
|
||||||
fn from(_: protobuf::ProtobufError) -> Self {
|
fn from(_: protobuf::ProtobufError) -> Self {
|
||||||
Error::Protocol(&"Could not read response from Trezor Device")
|
Error::Protocol(&"Could not read response from Trezor Device")
|
||||||
@@ -93,7 +105,7 @@ impl From<protobuf::ProtobufError> for Error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Trezor device manager
|
/// Trezor device manager
|
||||||
pub (crate) struct Manager {
|
pub struct Manager {
|
||||||
usb: Arc<Mutex<hidapi::HidApi>>,
|
usb: Arc<Mutex<hidapi::HidApi>>,
|
||||||
devices: RwLock<Vec<Device>>,
|
devices: RwLock<Vec<Device>>,
|
||||||
locked_devices: RwLock<Vec<String>>,
|
locked_devices: RwLock<Vec<String>>,
|
||||||
@@ -108,42 +120,13 @@ enum HidVersion {
|
|||||||
|
|
||||||
impl Manager {
|
impl Manager {
|
||||||
/// Create a new instance.
|
/// Create a new instance.
|
||||||
pub fn new(hidapi: Arc<Mutex<hidapi::HidApi>>, exiting: Arc<AtomicBool>) -> Result<Arc<Self>, libusb::Error> {
|
pub fn new(usb: Arc<Mutex<hidapi::HidApi>>) -> Arc<Self> {
|
||||||
let manager = Arc::new(Self {
|
Arc::new(Self {
|
||||||
usb: hidapi,
|
usb,
|
||||||
devices: RwLock::new(Vec::new()),
|
devices: RwLock::new(Vec::new()),
|
||||||
locked_devices: RwLock::new(Vec::new()),
|
locked_devices: RwLock::new(Vec::new()),
|
||||||
key_path: RwLock::new(KeyPath::Ethereum),
|
key_path: RwLock::new(KeyPath::Ethereum),
|
||||||
});
|
})
|
||||||
|
|
||||||
let usb_context = Arc::new(libusb::Context::new()?);
|
|
||||||
let m = manager.clone();
|
|
||||||
|
|
||||||
// Subscribe to TREZOR V1
|
|
||||||
// Note, this support only TREZOR V1 because TREZOR V2 has a different vendorID for some reason
|
|
||||||
// Also, we now only support one product as the second argument specifies
|
|
||||||
usb_context.register_callback(
|
|
||||||
Some(TREZOR_VID), Some(TREZOR_PIDS[0]), Some(USB_DEVICE_CLASS_DEVICE),
|
|
||||||
Box::new(EventHandler::new(Arc::downgrade(&manager))))?;
|
|
||||||
|
|
||||||
// Trezor event thread
|
|
||||||
thread::Builder::new()
|
|
||||||
.name("hw_wallet_trezor".to_string())
|
|
||||||
.spawn(move || {
|
|
||||||
if let Err(e) = m.update_devices(DeviceDirection::Arrived) {
|
|
||||||
debug!(target: "hw", "Trezor couldn't connect at startup, error: {}", e);
|
|
||||||
}
|
|
||||||
loop {
|
|
||||||
usb_context.handle_events(Some(Duration::from_millis(500)))
|
|
||||||
.unwrap_or_else(|e| debug!(target: "hw", "Trezor event handler error: {}", e));
|
|
||||||
if exiting.load(atomic::Ordering::Acquire) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.ok();
|
|
||||||
|
|
||||||
Ok(manager)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pin_matrix_ack(&self, device_path: &str, pin: &str) -> Result<bool, Error> {
|
pub fn pin_matrix_ack(&self, device_path: &str, pin: &str) -> Result<bool, Error> {
|
||||||
@@ -153,7 +136,7 @@ impl Manager {
|
|||||||
let t = MessageType::MessageType_PinMatrixAck;
|
let t = MessageType::MessageType_PinMatrixAck;
|
||||||
let mut m = PinMatrixAck::new();
|
let mut m = PinMatrixAck::new();
|
||||||
m.set_pin(pin.to_string());
|
m.set_pin(pin.to_string());
|
||||||
self.send_device_message(&device, &t, &m)?;
|
self.send_device_message(&device, t, &m)?;
|
||||||
let (resp_type, _) = self.read_device_response(&device)?;
|
let (resp_type, _) = self.read_device_response(&device)?;
|
||||||
match resp_type {
|
match resp_type {
|
||||||
// Getting an Address back means it's unlocked, this is undocumented behavior
|
// Getting an Address back means it's unlocked, this is undocumented behavior
|
||||||
@@ -178,7 +161,7 @@ impl Manager {
|
|||||||
match resp_type {
|
match resp_type {
|
||||||
MessageType::MessageType_Cancel => Err(Error::UserCancel),
|
MessageType::MessageType_Cancel => Err(Error::UserCancel),
|
||||||
MessageType::MessageType_ButtonRequest => {
|
MessageType::MessageType_ButtonRequest => {
|
||||||
self.send_device_message(handle, &MessageType::MessageType_ButtonAck, &ButtonAck::new())?;
|
self.send_device_message(handle, MessageType::MessageType_ButtonAck, &ButtonAck::new())?;
|
||||||
// Signing loop goes back to the top and reading blocks
|
// Signing loop goes back to the top and reading blocks
|
||||||
// for up to 5 minutes waiting for response from the device
|
// for up to 5 minutes waiting for response from the device
|
||||||
// if the user doesn't click any button within 5 minutes you
|
// if the user doesn't click any button within 5 minutes you
|
||||||
@@ -191,7 +174,7 @@ impl Manager {
|
|||||||
let mut msg = EthereumTxAck::new();
|
let mut msg = EthereumTxAck::new();
|
||||||
let len = resp.get_data_length() as usize;
|
let len = resp.get_data_length() as usize;
|
||||||
msg.set_data_chunk(data[..len].to_vec());
|
msg.set_data_chunk(data[..len].to_vec());
|
||||||
self.send_device_message(handle, &MessageType::MessageType_EthereumTxAck, &msg)?;
|
self.send_device_message(handle, MessageType::MessageType_EthereumTxAck, &msg)?;
|
||||||
self.signing_loop(handle, chain_id, &data[len..])
|
self.signing_loop(handle, chain_id, &data[len..])
|
||||||
} else {
|
} else {
|
||||||
let v = resp.get_signature_v();
|
let v = resp.get_signature_v();
|
||||||
@@ -216,8 +199,8 @@ impl Manager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn send_device_message(&self, device: &hidapi::HidDevice, msg_type: &MessageType, msg: &Message) -> Result<usize, Error> {
|
fn send_device_message(&self, device: &hidapi::HidDevice, msg_type: MessageType, msg: &Message) -> Result<usize, Error> {
|
||||||
let msg_id = *msg_type as u16;
|
let msg_id = msg_type as u16;
|
||||||
let mut message = msg.write_to_bytes()?;
|
let mut message = msg.write_to_bytes()?;
|
||||||
let msg_size = message.len();
|
let msg_size = message.len();
|
||||||
let mut data = Vec::new();
|
let mut data = Vec::new();
|
||||||
@@ -284,7 +267,7 @@ impl Manager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl <'a>Wallet<'a> for Manager {
|
impl<'a> Wallet<'a> for Manager {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Transaction = &'a TransactionInfo;
|
type Transaction = &'a TransactionInfo;
|
||||||
|
|
||||||
@@ -316,7 +299,7 @@ impl <'a>Wallet<'a> for Manager {
|
|||||||
message.set_chain_id(c_id as u32);
|
message.set_chain_id(c_id as u32);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.send_device_message(&handle, &msg_type, &message)?;
|
self.send_device_message(&handle, msg_type, &message)?;
|
||||||
|
|
||||||
self.signing_loop(&handle, &t_info.chain_id, &t_info.data[first_chunk_length..])
|
self.signing_loop(&handle, &t_info.chain_id, &t_info.data[first_chunk_length..])
|
||||||
}
|
}
|
||||||
@@ -332,13 +315,9 @@ impl <'a>Wallet<'a> for Manager {
|
|||||||
let num_prev_devices = self.devices.read().len();
|
let num_prev_devices = self.devices.read().len();
|
||||||
|
|
||||||
let detected_devices = devices.iter()
|
let detected_devices = devices.iter()
|
||||||
.filter(|&d| {
|
.filter(|&d| is_valid_trezor(d.vendor_id, d.product_id) &&
|
||||||
let is_trezor = d.vendor_id == TREZOR_VID;
|
is_valid_hid_device(d.usage_page, d.interface_number)
|
||||||
let is_supported_product = TREZOR_PIDS.contains(&d.product_id);
|
)
|
||||||
let is_valid = d.usage_page == 0xFF00 || d.interface_number == 0;
|
|
||||||
|
|
||||||
is_trezor && is_supported_product && is_valid
|
|
||||||
})
|
|
||||||
.fold(Vec::new(), |mut v, d| {
|
.fold(Vec::new(), |mut v, d| {
|
||||||
match self.read_device(&usb, &d) {
|
match self.read_device(&usb, &d) {
|
||||||
Ok(info) => {
|
Ok(info) => {
|
||||||
@@ -349,7 +328,7 @@ impl <'a>Wallet<'a> for Manager {
|
|||||||
};
|
};
|
||||||
v
|
v
|
||||||
});
|
});
|
||||||
|
|
||||||
let num_curr_devices = detected_devices.len();
|
let num_curr_devices = detected_devices.len();
|
||||||
*self.devices.write() = detected_devices;
|
*self.devices.write() = detected_devices;
|
||||||
|
|
||||||
@@ -363,7 +342,7 @@ impl <'a>Wallet<'a> for Manager {
|
|||||||
}
|
}
|
||||||
DeviceDirection::Left => {
|
DeviceDirection::Left => {
|
||||||
if num_prev_devices > num_curr_devices {
|
if num_prev_devices > num_curr_devices {
|
||||||
Ok(num_prev_devices- num_curr_devices)
|
Ok(num_prev_devices - num_curr_devices)
|
||||||
} else {
|
} else {
|
||||||
Err(Error::NoDeviceLeft)
|
Err(Error::NoDeviceLeft)
|
||||||
}
|
}
|
||||||
@@ -413,7 +392,7 @@ impl <'a>Wallet<'a> for Manager {
|
|||||||
KeyPath::EthereumClassic => message.set_address_n(ETC_DERIVATION_PATH.to_vec()),
|
KeyPath::EthereumClassic => message.set_address_n(ETC_DERIVATION_PATH.to_vec()),
|
||||||
}
|
}
|
||||||
message.set_show_display(false);
|
message.set_show_display(false);
|
||||||
self.send_device_message(&device, &typ, &message)?;
|
self.send_device_message(&device, typ, &message)?;
|
||||||
|
|
||||||
let (resp_type, bytes) = self.read_device_response(&device)?;
|
let (resp_type, bytes) = self.read_device_response(&device)?;
|
||||||
match resp_type {
|
match resp_type {
|
||||||
@@ -432,8 +411,8 @@ impl <'a>Wallet<'a> for Manager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to connect to the device using polling in at most the time specified by the `timeout`
|
/// Poll the device in maximum `max_polling_duration` if it doesn't succeed
|
||||||
fn try_connect_polling(trezor: &Manager, duration: &Duration, dir: DeviceDirection) -> bool {
|
pub fn try_connect_polling(trezor: &Manager, duration: &Duration, dir: DeviceDirection) -> bool {
|
||||||
let start_time = Instant::now();
|
let start_time = Instant::now();
|
||||||
while start_time.elapsed() <= *duration {
|
while start_time.elapsed() <= *duration {
|
||||||
if let Ok(num_devices) = trezor.update_devices(dir) {
|
if let Ok(num_devices) = trezor.update_devices(dir) {
|
||||||
@@ -444,40 +423,9 @@ fn try_connect_polling(trezor: &Manager, duration: &Duration, dir: DeviceDirecti
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Trezor event handler
|
/// Check if the detected device is a Trezor device by checking both the product ID and the vendor ID
|
||||||
/// A separate thread is handling incoming events
|
pub fn is_valid_trezor(vid: u16, pid: u16) -> bool {
|
||||||
///
|
vid == TREZOR_VID && TREZOR_PIDS.contains(&pid)
|
||||||
/// Note, that this run to completion and race-conditions can't occur but this can
|
|
||||||
/// therefore starve other events for being process with a spinlock or similar
|
|
||||||
struct EventHandler {
|
|
||||||
trezor: Weak<Manager>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl EventHandler {
|
|
||||||
/// Trezor event handler constructor
|
|
||||||
pub fn new(trezor: Weak<Manager>) -> Self {
|
|
||||||
Self { trezor }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl libusb::Hotplug for EventHandler {
|
|
||||||
fn device_arrived(&mut self, _device: libusb::Device) {
|
|
||||||
debug!(target: "hw", "Trezor V1 arrived");
|
|
||||||
if let Some(trezor) = self.trezor.upgrade() {
|
|
||||||
if try_connect_polling(&trezor, &POLLING_DURATION, DeviceDirection::Arrived) != true {
|
|
||||||
trace!(target: "hw", "No Trezor connected");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn device_left(&mut self, _device: libusb::Device) {
|
|
||||||
debug!(target: "hw", "Trezor V1 left");
|
|
||||||
if let Some(trezor) = self.trezor.upgrade() {
|
|
||||||
if try_connect_polling(&trezor, &POLLING_DURATION, DeviceDirection::Left) != true {
|
|
||||||
trace!(target: "hw", "No Trezor disconnected");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -485,32 +433,31 @@ impl libusb::Hotplug for EventHandler {
|
|||||||
/// This test can't be run without an actual trezor device connected
|
/// This test can't be run without an actual trezor device connected
|
||||||
/// (and unlocked) attached to the machine that's running the test
|
/// (and unlocked) attached to the machine that's running the test
|
||||||
fn test_signature() {
|
fn test_signature() {
|
||||||
use ethereum_types::{H160, H256, U256};
|
use ethereum_types::Address;
|
||||||
|
use MAX_POLLING_DURATION;
|
||||||
|
use super::HardwareWalletManager;
|
||||||
|
|
||||||
let manager = Manager::new(
|
let manager = HardwareWalletManager::new().unwrap();
|
||||||
Arc::new(Mutex::new(hidapi::HidApi::new().expect("HidApi"))),
|
|
||||||
Arc::new(AtomicBool::new(false))
|
|
||||||
).expect("HardwareWalletManager");
|
|
||||||
|
|
||||||
let addr: Address = H160::from("some_addr");
|
|
||||||
|
|
||||||
assert_eq!(try_connect_polling(&manager.clone(), &POLLING_DURATION, DeviceDirection::Arrived), true);
|
assert_eq!(try_connect_polling(&manager.trezor, &MAX_POLLING_DURATION, DeviceDirection::Arrived), true);
|
||||||
|
|
||||||
|
let addr: Address = manager.list_wallets()
|
||||||
|
.iter()
|
||||||
|
.filter(|d| d.name == "TREZOR".to_string() && d.manufacturer == "SatoshiLabs".to_string())
|
||||||
|
.nth(0)
|
||||||
|
.map(|d| d.address)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
let t_info = TransactionInfo {
|
let t_info = TransactionInfo {
|
||||||
nonce: U256::from(1),
|
nonce: U256::from(1),
|
||||||
gas_price: U256::from(100),
|
gas_price: U256::from(100),
|
||||||
gas_limit: U256::from(21_000),
|
gas_limit: U256::from(21_000),
|
||||||
to: Some(H160::from("some_other_addr")),
|
to: Some(Address::from(1337)),
|
||||||
chain_id: Some(17),
|
chain_id: Some(1),
|
||||||
value: U256::from(1_000_000),
|
value: U256::from(1_000_000),
|
||||||
data: (&[1u8; 3000]).to_vec(),
|
data: (&[1u8; 3000]).to_vec(),
|
||||||
};
|
};
|
||||||
let signature = manager.sign_transaction(&addr, &t_info).unwrap();
|
|
||||||
let expected = Signature::from_rsv(
|
|
||||||
&H256::from("device_specific_r"),
|
|
||||||
&H256::from("device_specific_s"),
|
|
||||||
0x01
|
|
||||||
);
|
|
||||||
|
|
||||||
assert_eq!(signature, expected)
|
let signature = manager.trezor.sign_transaction(&addr, &t_info);
|
||||||
|
assert!(signature.is_ok());
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "chainspec"
|
name = "chainspec"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["debris <marek.kotewicz@gmail.com>"]
|
authors = ["Marek Kotewicz <marek@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ethjson = { path = "../json" }
|
ethjson = { path = "../json" }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde_ignored = "0.0.4"
|
|
||||||
|
|||||||
@@ -1,24 +1,22 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
extern crate serde_json;
|
extern crate serde_json;
|
||||||
extern crate serde_ignored;
|
|
||||||
extern crate ethjson;
|
extern crate ethjson;
|
||||||
|
|
||||||
use std::collections::BTreeSet;
|
|
||||||
use std::{fs, env, process};
|
use std::{fs, env, process};
|
||||||
use ethjson::spec::Spec;
|
use ethjson::spec::Spec;
|
||||||
|
|
||||||
@@ -41,24 +39,11 @@ fn main() {
|
|||||||
Err(_) => quit(&format!("{} could not be opened", path)),
|
Err(_) => quit(&format!("{} could not be opened", path)),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut unused = BTreeSet::new();
|
let spec: Result<Spec, _> = serde_json::from_reader(file);
|
||||||
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 {
|
if let Err(err) = spec {
|
||||||
quit(&format!("{} {}", path, err.to_string()));
|
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);
|
println!("{} is valid", path);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ authors = ["Parity <admin@parity.io>"]
|
|||||||
description = "Parity Cli Tool"
|
description = "Parity Cli Tool"
|
||||||
homepage = "http://parity.io"
|
homepage = "http://parity.io"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
name = "rpc-cli"
|
name = "cli-signer"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
rpassword = "1.0"
|
rpassword = "1.0"
|
||||||
parity-rpc = { path = "../rpc" }
|
parity-rpc = { path = "../rpc" }
|
||||||
parity-rpc-client = { path = "../rpc_client" }
|
parity-rpc-client = { path = "rpc-client" }
|
||||||
@@ -8,13 +8,13 @@ version = "1.4.0"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
log = "0.3.6"
|
log = "0.4"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
url = "1.2.0"
|
url = "1.2.0"
|
||||||
matches = "0.1"
|
matches = "0.1"
|
||||||
parking_lot = "0.6"
|
parking_lot = "0.7"
|
||||||
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" }
|
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-2.2" }
|
||||||
jsonrpc-ws-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" }
|
jsonrpc-ws-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-2.2" }
|
||||||
parity-rpc = { path = "../rpc" }
|
parity-rpc = { path = "../../rpc" }
|
||||||
keccak-hash = { git = "https://github.com/paritytech/parity-common" }
|
keccak-hash = "0.1"
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::fmt::{Debug, Formatter, Error as FmtError};
|
use std::fmt::{Debug, Formatter, Error as FmtError};
|
||||||
use std::io::{BufReader, BufRead};
|
use std::io::{BufReader, BufRead};
|
||||||
@@ -274,7 +274,7 @@ impl Rpc {
|
|||||||
let request = MethodCall {
|
let request = MethodCall {
|
||||||
jsonrpc: Some(Version::V2),
|
jsonrpc: Some(Version::V2),
|
||||||
method: method.to_owned(),
|
method: method.to_owned(),
|
||||||
params: Some(Params::Array(params)),
|
params: Params::Array(params),
|
||||||
id: Id::Num(id as u64),
|
id: Id::Num(id as u64),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
pub mod client;
|
pub mod client;
|
||||||
pub mod signer_client;
|
pub mod signer_client;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use client::{Rpc, RpcError};
|
use client::{Rpc, RpcError};
|
||||||
use rpc::signer::{ConfirmationRequest, TransactionModification, U256, TransactionCondition};
|
use rpc::signer::{ConfirmationRequest, TransactionModification, U256, TransactionCondition};
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
extern crate rpassword;
|
extern crate rpassword;
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[package]
|
|
||||||
description = "Ethcore development/test/build tools"
|
|
||||||
homepage = "http://parity.io"
|
|
||||||
license = "GPL-3.0"
|
|
||||||
name = "ethcore-devtools"
|
|
||||||
version = "1.12.0"
|
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Usage
|
|
||||||
|
|
||||||
```docker build -f docker/ubuntu/Dockerfile --tag ethcore/parity:branch_or_tag_name .```
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
FROM alpine:edge
|
|
||||||
|
|
||||||
WORKDIR /build
|
|
||||||
|
|
||||||
# install tools and dependencies
|
|
||||||
RUN apk add --no-cache gcc musl-dev pkgconfig g++ make curl \
|
|
||||||
eudev-dev rust cargo git file binutils \
|
|
||||||
libusb-dev linux-headers perl
|
|
||||||
|
|
||||||
# show backtraces
|
|
||||||
ENV RUST_BACKTRACE 1
|
|
||||||
|
|
||||||
# show tools
|
|
||||||
RUN rustc -vV && \
|
|
||||||
cargo -V && \
|
|
||||||
gcc -v &&\
|
|
||||||
g++ -v
|
|
||||||
|
|
||||||
# build parity
|
|
||||||
ADD . /build/parity
|
|
||||||
RUN cd parity && \
|
|
||||||
cargo build --release --verbose && \
|
|
||||||
ls /build/parity/target/release/parity && \
|
|
||||||
strip /build/parity/target/release/parity
|
|
||||||
|
|
||||||
RUN file /build/parity/target/release/parity
|
|
||||||
|
|
||||||
EXPOSE 8080 8545 8180
|
|
||||||
ENTRYPOINT ["/build/parity/target/release/parity"]
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
FROM ubuntu:xenial
|
|
||||||
LABEL maintainer="Parity Technologies <devops@parity.io>"
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -yq sudo curl file build-essential wget git g++ cmake pkg-config bison flex \
|
|
||||||
unzip lib32stdc++6 lib32z1 python autotools-dev automake autoconf libtool \
|
|
||||||
gperf xsltproc docbook-xsl
|
|
||||||
|
|
||||||
# Rust & Cargo
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
|
||||||
ENV PATH /root/.cargo/bin:$PATH
|
|
||||||
RUN rustup toolchain install stable
|
|
||||||
RUN rustup target add --toolchain stable arm-linux-androideabi
|
|
||||||
RUN rustup target add --toolchain stable armv7-linux-androideabi
|
|
||||||
|
|
||||||
# Android NDK and toolchain
|
|
||||||
RUN cd /usr/local && \
|
|
||||||
wget -q https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && \
|
|
||||||
unzip -q android-ndk-r16b-linux-x86_64.zip && \
|
|
||||||
rm android-ndk-r16b-linux-x86_64.zip
|
|
||||||
ENV NDK_HOME /usr/local/android-ndk-r16b
|
|
||||||
RUN /usr/local/android-ndk-r16b/build/tools/make-standalone-toolchain.sh \
|
|
||||||
--arch=arm --install-dir=/opt/ndk-standalone --stl=libc++ --platform=android-26
|
|
||||||
ENV PATH $PATH:/opt/ndk-standalone/bin
|
|
||||||
|
|
||||||
# Compiling OpenSSL for Android
|
|
||||||
RUN cd /root && \
|
|
||||||
git clone git://git.openssl.org/openssl.git && \
|
|
||||||
cd openssl && \
|
|
||||||
git checkout OpenSSL_1_1_0-stable
|
|
||||||
ENV CROSS_SYSROOT /opt/ndk-standalone/sysroot
|
|
||||||
RUN cd /root/openssl && \
|
|
||||||
./Configure android-armeabi --cross-compile-prefix=arm-linux-androideabi- \
|
|
||||||
-static no-stdio no-ui \
|
|
||||||
-I/usr/local/android-ndk-r16b/sysroot/usr/include \
|
|
||||||
-I/usr/local/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi \
|
|
||||||
-L/usr/local/android-ndk-r16b/sysroot/usr/lib \
|
|
||||||
--prefix=/opt/ndk-standalone/sysroot/usr
|
|
||||||
RUN cd /root/openssl && \
|
|
||||||
make build_libs && \
|
|
||||||
make install_dev
|
|
||||||
RUN rm -rf /root/openssl
|
|
||||||
|
|
||||||
# Compiling libudev for Android
|
|
||||||
# This is the most hacky part of the process, as we need to apply a patch and pass specific
|
|
||||||
# options that the compiler environment doesn't define.
|
|
||||||
RUN cd /root && \
|
|
||||||
git clone https://github.com/gentoo/eudev.git
|
|
||||||
ADD libudev.patch /root
|
|
||||||
RUN cd /root/eudev && \
|
|
||||||
git checkout 83d918449f22720d84a341a05e24b6d109e6d3ae && \
|
|
||||||
./autogen.sh && \
|
|
||||||
./configure --disable-introspection --disable-programs --disable-hwdb \
|
|
||||||
--host=arm-linux-androideabi --prefix=/opt/ndk-standalone/sysroot/usr/ \
|
|
||||||
--enable-shared=false CC=arm-linux-androideabi-clang \
|
|
||||||
CFLAGS="-D LINE_MAX=2048 -D RLIMIT_NLIMITS=15 -D IPTOS_LOWCOST=2 -std=gnu99" \
|
|
||||||
CXX=arm-linux-androideabi-clang++ && \
|
|
||||||
git apply - < /root/libudev.patch && \
|
|
||||||
make && \
|
|
||||||
make install
|
|
||||||
RUN rm -rf /root/eudev
|
|
||||||
RUN rm /root/libudev.patch
|
|
||||||
|
|
||||||
# Rust-related configuration
|
|
||||||
ADD cargo-config.toml /root/.cargo/config
|
|
||||||
ENV ARM_LINUX_ANDROIDEABI_OPENSSL_DIR /opt/ndk-standalone/sysroot/usr
|
|
||||||
ENV ARMV7_LINUX_ANDROIDEABI_OPENSSL_DIR /opt/ndk-standalone/sysroot/usr
|
|
||||||
ENV CC_arm_linux_androideabi arm-linux-androideabi-clang
|
|
||||||
ENV CC_armv7_linux_androideabi arm-linux-androideabi-clang
|
|
||||||
ENV CXX_arm_linux_androideabi arm-linux-androideabi-clang++
|
|
||||||
ENV CXX_armv7_linux_androideabi arm-linux-androideabi-clang++
|
|
||||||
ENV AR_arm_linux_androideabi arm-linux-androideabi-ar
|
|
||||||
ENV AR_armv7_linux_androideabi arm-linux-androideabi-ar
|
|
||||||
ENV CFLAGS_arm_linux_androideabi -std=gnu11 -fPIC -D OS_ANDROID
|
|
||||||
ENV CFLAGS_armv7_linux_androideabi -std=gnu11 -fPIC -D OS_ANDROID
|
|
||||||
ENV CXXFLAGS_arm_linux_androideabi -std=gnu++11 -fPIC -fexceptions -frtti -static-libstdc++ -D OS_ANDROID
|
|
||||||
ENV CXXFLAGS_armv7_linux_androideabi -std=gnu++11 -fPIC -fexceptions -frtti -static-libstdc++ -D OS_ANDROID
|
|
||||||
ENV CXXSTDLIB_arm_linux_androideabi ""
|
|
||||||
ENV CXXSTDLIB_armv7_linux_androideabi ""
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[target.armv7-linux-androideabi]
|
|
||||||
linker = "arm-linux-androideabi-clang"
|
|
||||||
ar = "arm-linux-androideabi-ar"
|
|
||||||
rustflags = ["-C", "link-arg=-lc++_static", "-C", "link-arg=-lc++abi", "-C", "link-arg=-landroid_support"]
|
|
||||||
|
|
||||||
[target.arm-linux-androideabi]
|
|
||||||
linker = "arm-linux-androideabi-clang"
|
|
||||||
ar = "arm-linux-androideabi-ar"
|
|
||||||
rustflags = ["-C", "link-arg=-lc++_static", "-C", "link-arg=-lc++abi", "-C", "link-arg=-landroid_support"]
|
|
||||||
@@ -1,216 +0,0 @@
|
|||||||
diff --git a/src/collect/collect.c b/src/collect/collect.c
|
|
||||||
index 2cf1f00..b24f26b 100644
|
|
||||||
--- a/src/collect/collect.c
|
|
||||||
+++ b/src/collect/collect.c
|
|
||||||
@@ -84,7 +84,7 @@ static void usage(void)
|
|
||||||
" invoked for each ID in <idlist>) collect returns 0, the\n"
|
|
||||||
" number of missing IDs otherwise.\n"
|
|
||||||
" On error a negative number is returned.\n\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
diff --git a/src/scsi_id/scsi_id.c b/src/scsi_id/scsi_id.c
|
|
||||||
index 8b76d87..7bf3948 100644
|
|
||||||
--- a/src/scsi_id/scsi_id.c
|
|
||||||
+++ b/src/scsi_id/scsi_id.c
|
|
||||||
@@ -321,7 +321,7 @@ static void help(void) {
|
|
||||||
" -u --replace-whitespace Replace all whitespace by underscores\n"
|
|
||||||
" -v --verbose Verbose logging\n"
|
|
||||||
" -x --export Print values as environment keys\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/shared/hashmap.h b/src/shared/hashmap.h
|
|
||||||
index a03ee58..a7c2005 100644
|
|
||||||
--- a/src/shared/hashmap.h
|
|
||||||
+++ b/src/shared/hashmap.h
|
|
||||||
@@ -98,10 +98,7 @@ extern const struct hash_ops uint64_hash_ops;
|
|
||||||
#if SIZEOF_DEV_T != 8
|
|
||||||
unsigned long devt_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) _pure_;
|
|
||||||
int devt_compare_func(const void *a, const void *b) _pure_;
|
|
||||||
-extern const struct hash_ops devt_hash_ops = {
|
|
||||||
- .hash = devt_hash_func,
|
|
||||||
- .compare = devt_compare_func
|
|
||||||
-};
|
|
||||||
+extern const struct hash_ops devt_hash_ops;
|
|
||||||
#else
|
|
||||||
#define devt_hash_func uint64_hash_func
|
|
||||||
#define devt_compare_func uint64_compare_func
|
|
||||||
diff --git a/src/shared/log.c b/src/shared/log.c
|
|
||||||
index 4a40996..1496984 100644
|
|
||||||
--- a/src/shared/log.c
|
|
||||||
+++ b/src/shared/log.c
|
|
||||||
@@ -335,7 +335,7 @@ static int write_to_syslog(
|
|
||||||
|
|
||||||
IOVEC_SET_STRING(iovec[0], header_priority);
|
|
||||||
IOVEC_SET_STRING(iovec[1], header_time);
|
|
||||||
- IOVEC_SET_STRING(iovec[2], program_invocation_short_name);
|
|
||||||
+ IOVEC_SET_STRING(iovec[2], "parity");
|
|
||||||
IOVEC_SET_STRING(iovec[3], header_pid);
|
|
||||||
IOVEC_SET_STRING(iovec[4], buffer);
|
|
||||||
|
|
||||||
@@ -383,7 +383,7 @@ static int write_to_kmsg(
|
|
||||||
char_array_0(header_pid);
|
|
||||||
|
|
||||||
IOVEC_SET_STRING(iovec[0], header_priority);
|
|
||||||
- IOVEC_SET_STRING(iovec[1], program_invocation_short_name);
|
|
||||||
+ IOVEC_SET_STRING(iovec[1], "parity");
|
|
||||||
IOVEC_SET_STRING(iovec[2], header_pid);
|
|
||||||
IOVEC_SET_STRING(iovec[3], buffer);
|
|
||||||
IOVEC_SET_STRING(iovec[4], "\n");
|
|
||||||
diff --git a/src/udev/udevadm-control.c b/src/udev/udevadm-control.c
|
|
||||||
index 6af7163..3271e56 100644
|
|
||||||
--- a/src/udev/udevadm-control.c
|
|
||||||
+++ b/src/udev/udevadm-control.c
|
|
||||||
@@ -41,7 +41,7 @@ static void print_help(void) {
|
|
||||||
" -p --property=KEY=VALUE Set a global property for all events\n"
|
|
||||||
" -m --children-max=N Maximum number of children\n"
|
|
||||||
" --timeout=SECONDS Maximum time to block for a reply\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int adm_control(struct udev *udev, int argc, char *argv[]) {
|
|
||||||
diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c
|
|
||||||
index 0aec976..a31ac02 100644
|
|
||||||
--- a/src/udev/udevadm-info.c
|
|
||||||
+++ b/src/udev/udevadm-info.c
|
|
||||||
@@ -279,7 +279,7 @@ static void help(void) {
|
|
||||||
" -P --export-prefix Export the key name with a prefix\n"
|
|
||||||
" -e --export-db Export the content of the udev database\n"
|
|
||||||
" -c --cleanup-db Clean up the udev database\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int uinfo(struct udev *udev, int argc, char *argv[]) {
|
|
||||||
diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c
|
|
||||||
index 15ded09..b58dd08 100644
|
|
||||||
--- a/src/udev/udevadm-monitor.c
|
|
||||||
+++ b/src/udev/udevadm-monitor.c
|
|
||||||
@@ -73,7 +73,7 @@ static void help(void) {
|
|
||||||
" -u --udev Print udev events\n"
|
|
||||||
" -s --subsystem-match=SUBSYSTEM[/DEVTYPE] Filter events by subsystem\n"
|
|
||||||
" -t --tag-match=TAG Filter events by tag\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int adm_monitor(struct udev *udev, int argc, char *argv[]) {
|
|
||||||
diff --git a/src/udev/udevadm-settle.c b/src/udev/udevadm-settle.c
|
|
||||||
index 33597bc..b36a504 100644
|
|
||||||
--- a/src/udev/udevadm-settle.c
|
|
||||||
+++ b/src/udev/udevadm-settle.c
|
|
||||||
@@ -43,7 +43,7 @@ static void help(void) {
|
|
||||||
" --version Show package version\n"
|
|
||||||
" -t --timeout=SECONDS Maximum time to wait for events\n"
|
|
||||||
" -E --exit-if-exists=FILE Stop waiting if file exists\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int adm_settle(struct udev *udev, int argc, char *argv[]) {
|
|
||||||
diff --git a/src/udev/udevadm-test-builtin.c b/src/udev/udevadm-test-builtin.c
|
|
||||||
index baaeca9..50ed812 100644
|
|
||||||
--- a/src/udev/udevadm-test-builtin.c
|
|
||||||
+++ b/src/udev/udevadm-test-builtin.c
|
|
||||||
@@ -39,7 +39,7 @@ static void help(struct udev *udev) {
|
|
||||||
" -h --help Print this message\n"
|
|
||||||
" --version Print version of the program\n\n"
|
|
||||||
"Commands:\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
|
|
||||||
udev_builtin_list(udev);
|
|
||||||
}
|
|
||||||
diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c
|
|
||||||
index 47fd924..a855412 100644
|
|
||||||
--- a/src/udev/udevadm-test.c
|
|
||||||
+++ b/src/udev/udevadm-test.c
|
|
||||||
@@ -39,7 +39,7 @@ static void help(void) {
|
|
||||||
" --version Show package version\n"
|
|
||||||
" -a --action=ACTION Set action string\n"
|
|
||||||
" -N --resolve-names=early|late|never When to resolve names\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int adm_test(struct udev *udev, int argc, char *argv[]) {
|
|
||||||
diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c
|
|
||||||
index 4dc756a..67787d3 100644
|
|
||||||
--- a/src/udev/udevadm-trigger.c
|
|
||||||
+++ b/src/udev/udevadm-trigger.c
|
|
||||||
@@ -92,7 +92,7 @@ static void help(void) {
|
|
||||||
" -y --sysname-match=NAME Trigger devices with this /sys path\n"
|
|
||||||
" --name-match=NAME Trigger devices with this /dev name\n"
|
|
||||||
" -b --parent-match=NAME Trigger devices with that parent device\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int adm_trigger(struct udev *udev, int argc, char *argv[]) {
|
|
||||||
diff --git a/src/udev/udevadm.c b/src/udev/udevadm.c
|
|
||||||
index 3e57cf6..b03dfaa 100644
|
|
||||||
--- a/src/udev/udevadm.c
|
|
||||||
+++ b/src/udev/udevadm.c
|
|
||||||
@@ -62,7 +62,7 @@ static int adm_help(struct udev *udev, int argc, char *argv[]) {
|
|
||||||
printf("%s [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]\n\n"
|
|
||||||
"Send control commands or test the device manager.\n\n"
|
|
||||||
"Commands:\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
|
|
||||||
for (i = 0; i < ELEMENTSOF(udevadm_cmds); i++)
|
|
||||||
if (udevadm_cmds[i]->help != NULL)
|
|
||||||
@@ -128,7 +128,7 @@ int main(int argc, char *argv[]) {
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
- fprintf(stderr, "%s: missing or unknown command\n", program_invocation_short_name);
|
|
||||||
+ fprintf(stderr, "%s: missing or unknown command\n", "parity");
|
|
||||||
rc = 2;
|
|
||||||
out:
|
|
||||||
mac_selinux_finish();
|
|
||||||
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
|
|
||||||
index cf826c6..4eec0af 100644
|
|
||||||
--- a/src/udev/udevd.c
|
|
||||||
+++ b/src/udev/udevd.c
|
|
||||||
@@ -1041,7 +1041,7 @@ static void help(void) {
|
|
||||||
" -t --event-timeout=SECONDS Seconds to wait before terminating an event\n"
|
|
||||||
" -N --resolve-names=early|late|never\n"
|
|
||||||
" When to resolve users and groups\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int parse_argv(int argc, char *argv[]) {
|
|
||||||
diff --git a/src/v4l_id/v4l_id.c b/src/v4l_id/v4l_id.c
|
|
||||||
index 1dce0d5..f65badf 100644
|
|
||||||
--- a/src/v4l_id/v4l_id.c
|
|
||||||
+++ b/src/v4l_id/v4l_id.c
|
|
||||||
@@ -49,7 +49,7 @@ int main(int argc, char *argv[]) {
|
|
||||||
printf("%s [-h,--help] <device file>\n\n"
|
|
||||||
"Video4Linux device identification.\n\n"
|
|
||||||
" -h Print this message\n"
|
|
||||||
- , program_invocation_short_name);
|
|
||||||
+ , "parity");
|
|
||||||
return 0;
|
|
||||||
case '?':
|
|
||||||
return -EINVAL;
|
|
||||||
diff --git a/src/shared/path-util.c b/src/shared/path-util.c
|
|
||||||
index 0744563..7151356 100644
|
|
||||||
--- a/src/shared/path-util.c
|
|
||||||
+++ b/src/shared/path-util.c
|
|
||||||
@@ -109,7 +109,7 @@ char *path_make_absolute_cwd(const char *p) {
|
|
||||||
if (path_is_absolute(p))
|
|
||||||
return strdup(p);
|
|
||||||
|
|
||||||
- cwd = get_current_dir_name();
|
|
||||||
+ cwd = getcwd(malloc(128), 128);
|
|
||||||
if (!cwd)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
FROM centos:latest
|
|
||||||
WORKDIR /build
|
|
||||||
|
|
||||||
# install tools and dependencies
|
|
||||||
RUN yum -y update&& \
|
|
||||||
yum install -y git make gcc-c++ gcc file binutils
|
|
||||||
|
|
||||||
# install rustup
|
|
||||||
RUN curl -sSf https://static.rust-lang.org/rustup.sh -o rustup.sh &&\
|
|
||||||
ls&&\
|
|
||||||
sh rustup.sh --disable-sudo
|
|
||||||
|
|
||||||
# show backtraces
|
|
||||||
ENV RUST_BACKTRACE 1
|
|
||||||
|
|
||||||
# set compiler
|
|
||||||
ENV CXX g++
|
|
||||||
ENV CC gcc
|
|
||||||
|
|
||||||
# show tools
|
|
||||||
RUN rustc -vV && \
|
|
||||||
cargo -V && \
|
|
||||||
gcc -v &&\
|
|
||||||
g++ -v
|
|
||||||
|
|
||||||
# build parity
|
|
||||||
ADD . /build/parity
|
|
||||||
RUN cd parity&&\
|
|
||||||
cargo build --release --verbose && \
|
|
||||||
ls /build/parity/target/release/parity && \
|
|
||||||
strip /build/parity/target/release/parity
|
|
||||||
|
|
||||||
RUN file /build/parity/target/release/parity
|
|
||||||
|
|
||||||
EXPOSE 8080 8545 8180
|
|
||||||
ENTRYPOINT ["/build/parity/target/release/parity"]
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user