Compare commits
74 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
458d55559e | ||
|
|
0cf0cdbb86 | ||
|
|
91e57c803d | ||
|
|
973a5a594b | ||
|
|
63fdad8d86 | ||
|
|
efb80e1032 | ||
|
|
f0fd88aa12 | ||
|
|
142b63a4f9 | ||
|
|
1d2b640834 | ||
|
|
f1dc682168 | ||
|
|
0bb2f8f6b8 | ||
|
|
d5c2a0fbe2 | ||
|
|
98563b0a45 | ||
|
|
d8ce175846 | ||
|
|
fb9699d8e1 | ||
|
|
dbf9a1cd98 | ||
|
|
6b4e56b214 | ||
|
|
f40e198eb7 | ||
|
|
bbecb0415e | ||
|
|
6d81fce451 | ||
|
|
65c5e6dfd3 | ||
|
|
2e23ca353f | ||
|
|
a831379ad8 | ||
|
|
cfc6439f2e | ||
|
|
52d966ccaa | ||
|
|
59d891edf4 | ||
|
|
f3bdc0da3c | ||
|
|
a55799d523 | ||
|
|
1d07c4c06b | ||
|
|
ea25ffd79d | ||
|
|
eb876cb2d7 | ||
|
|
814526a248 | ||
|
|
d3ba83405c | ||
|
|
c46fe330dc | ||
|
|
0e5d6944b7 | ||
|
|
b0a1e3da03 | ||
|
|
0706e5468d | ||
|
|
f286597d10 | ||
|
|
e2f665e9cf | ||
|
|
eab41b49cf | ||
|
|
8d3e0582a8 | ||
|
|
705bc71593 | ||
|
|
f723e288c3 | ||
|
|
a6bd3516e0 | ||
|
|
08e6cca3e5 | ||
|
|
8a9d14141a | ||
|
|
832fc444b6 | ||
|
|
612a71ecb2 | ||
|
|
06fc61d7c5 | ||
|
|
837e8b8725 | ||
|
|
ea3efd926e | ||
|
|
3f01b69084 | ||
|
|
647ff31942 | ||
|
|
56131b6d92 | ||
|
|
51d824fbdc | ||
|
|
1225ff2c5a | ||
|
|
cb91b7e828 | ||
|
|
233bab2ee7 | ||
|
|
fed80cc075 | ||
|
|
26ab00b6c7 | ||
|
|
01e72efb80 | ||
|
|
81ae80b7f1 | ||
|
|
910bb78f0d | ||
|
|
6078eeaed7 | ||
|
|
50a4d5fa57 | ||
|
|
410853e280 | ||
|
|
bf5830f766 | ||
|
|
d811f6e3ce | ||
|
|
9110b1d9e4 | ||
|
|
cb0513a8b1 | ||
|
|
84f675021c | ||
|
|
03bfb012a1 | ||
|
|
16542bd355 | ||
|
|
24cff45334 |
@@ -1,3 +1,3 @@
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
# Link the C runtime statically ; https://github.com/openethereum/openethereum/issues/6643
|
||||
# Link the C runtime statically ; https://github.com/openethereum/parity-ethereum/issues/6643
|
||||
rustflags = ["-Ctarget-feature=+crt-static"]
|
||||
|
||||
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
@@ -2,7 +2,7 @@
|
||||
|
||||
## Do you have a question?
|
||||
|
||||
Check out our [Basic Usage](https://openethereum.github.io/wiki/Basic-Usage), [Configuration](https://openethereum.github.io/wiki/Configuring-OpenEthereum), and [FAQ](https://openethereum.github.io/wiki/FAQ) articles on our [wiki](https://openethereum.github.io/wiki)!
|
||||
Check out our [Beginner Introduction](https://openethereum.github.io/Beginner-Introduction), [Configuration](https://openethereum.github.io//Configuring-OpenEthereum), and [FAQ](https://openethereum.github.io/FAQ) articles on our [wiki](https://openethereum.github.io/)!
|
||||
|
||||
See also frequently asked questions [tagged with `parity`](https://ethereum.stackexchange.com/questions/tagged/parity?sort=votes&pageSize=50) on Stack Exchange.
|
||||
|
||||
@@ -35,7 +35,7 @@ There are a few basic ground-rules for contributors (including the maintainer(s)
|
||||
* **No pushing directly to the master branch**.
|
||||
* **All modifications** must be made in a **pull-request** to solicit feedback from other contributors.
|
||||
* Pull-requests cannot be merged before CI runs green and two reviewers have given their approval.
|
||||
* Contributors should adhere to the [Parity Ethereum Style Guide](https://openethereum.github.io/wiki/Parity-Ethereum-Style-Guide).
|
||||
* All code changed should be formated by running `cargo fmt -- --config=merge_imports=true`
|
||||
|
||||
### Recommendations
|
||||
|
||||
|
||||
4
.github/ISSUE_TEMPLATE.md
vendored
4
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,6 +1,8 @@
|
||||
For questions please use https://discord.io/openethereum, issues are for bugs and feature requests.
|
||||
|
||||
_Before filing a new issue, please **provide the following information**._
|
||||
|
||||
- **OpenEthereum version**: 0.0.0
|
||||
- **OpenEthereum version (>=3.1.0)**: 0.0.0
|
||||
- **Operating system**: Windows / MacOS / Linux
|
||||
- **Installation**: homebrew / one-line installer / built from source
|
||||
- **Fully synchronized**: no / yes
|
||||
|
||||
33
.github/workflows/build-test-windows.yml
vendored
Normal file
33
.github/workflows/build-test-windows.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Build and Test Suite on Windows
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
jobs:
|
||||
build-tests:
|
||||
name: Test and Build
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- windows2019 # custom runner
|
||||
toolchain:
|
||||
- stable
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
profile: minimal
|
||||
override: true
|
||||
- name: Build tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --locked --all --release --features "json-tests" --verbose --no-run
|
||||
75
.github/workflows/build-test.yml
vendored
75
.github/workflows/build-test.yml
vendored
@@ -4,26 +4,22 @@ on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- stable
|
||||
- main
|
||||
- dev
|
||||
jobs:
|
||||
build-tests:
|
||||
name: Test and Build
|
||||
env:
|
||||
SCCACHE_CACHE_SIZE: "1G"
|
||||
SCCACHE_IDLE_TIMEOUT: 0
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-16.04
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
toolchain:
|
||||
- stable
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install toolchain
|
||||
@@ -32,68 +28,13 @@ jobs:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
profile: minimal
|
||||
override: true
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ runner.os }}-cargo-registry-build-tests-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-git-build-tests-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.os }}-cargo-build-target-build-tests-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache sccache linux
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "/home/runner/.cache/sccache"
|
||||
key: ${{ runner.os }}-sccache-build-tests-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache sccache MacOS
|
||||
if: matrix.platform == 'macos-latest'
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "/Users/runner/Library/Caches/Mozilla.sccache"
|
||||
key: ${{ runner.os }}-sccache-build-tests-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache sccache Windows
|
||||
if: matrix.platform == 'windows-latest'
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "C:\\Users\\runneradmin\\AppData\\Local\\Mozilla\\sccache\\cache"
|
||||
key: ${{ runner.os }}-sccache-build-tests-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Install sccache for ${{ matrix.platform }}
|
||||
shell: pwsh
|
||||
run: pwsh scripts/actions/install-sccache.ps1 ${{ runner.os}}
|
||||
- name: Install LLVM for Windows
|
||||
if: matrix.platform == 'windows-latest'
|
||||
run: choco install llvm
|
||||
- name: Sccache statistics
|
||||
run: sccache --show-stats
|
||||
- name: Build tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --locked --all --release --features "json-tests" --verbose --no-run
|
||||
- name: Run tests for ${{ matrix.platform }}
|
||||
if: matrix.platform == 'windows-latest'
|
||||
continue-on-error: true #Skip step if Windows tests failure
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
- name: Run tests for ${{ matrix.platform }}
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --locked --all --release --features "json-tests" --verbose
|
||||
- name: Run tests for ${{ matrix.platform }}
|
||||
if: matrix.platform != 'windows-latest'
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --locked --all --release --features "json-tests" --verbose
|
||||
- name: Stop sccache
|
||||
if: always()
|
||||
run: sccache --stop-server
|
||||
- name: Prepare build directory for cache
|
||||
shell: bash
|
||||
run: bash scripts/actions/clean-target.sh
|
||||
|
||||
183
.github/workflows/build.yml
vendored
183
.github/workflows/build.yml
vendored
@@ -2,107 +2,66 @@ name: Build Release Suite
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- stable
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Global vars
|
||||
env:
|
||||
AWS_REGION: "us-east-1"
|
||||
AWS_S3_ARTIFACTS_BUCKET: "openethereum-releases"
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Release
|
||||
env:
|
||||
SCCACHE_CACHE_SIZE: "1G"
|
||||
SCCACHE_IDLE_TIMEOUT: 0
|
||||
AWS_S3_ARTIFACTS_BUCKET: "openethereum-releases"
|
||||
AWS_REGION: "us-east-1"
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-16.04
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
toolchain:
|
||||
- stable
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@main
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
profile: minimal
|
||||
override: true
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ runner.os }}-cargo-registry-build-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-git-build-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.os }}-cargo-build-target-build-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache sccache linux
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "/home/runner/.cache/sccache"
|
||||
key: ${{ runner.os }}-sccache-build-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache sccache MacOS
|
||||
if: matrix.platform == 'macos-latest'
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "/Users/runner/Library/Caches/Mozilla.sccache"
|
||||
key: ${{ runner.os }}-sccache-build-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache sccache Windows
|
||||
if: matrix.platform == 'windows-latest'
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "C:\\Users\\runneradmin\\AppData\\Local\\Mozilla\\sccache\\cache"
|
||||
key: ${{ runner.os }}-sccache-build-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Install sccache for ${{ matrix.platform }}
|
||||
shell: pwsh
|
||||
run: pwsh scripts/actions/install-sccache.ps1 ${{ runner.os}}
|
||||
|
||||
# ==============================
|
||||
# Windows Build
|
||||
# ==============================
|
||||
|
||||
- name: Install LLVM for Windows
|
||||
if: matrix.platform == 'windows-latest'
|
||||
run: choco install llvm
|
||||
# - name: Install LLVM for Windows
|
||||
# if: matrix.platform == 'windows2019'
|
||||
# run: choco install llvm
|
||||
|
||||
- name: Sccache statistics
|
||||
run: sccache --show-stats
|
||||
# - name: Build OpenEthereum for Windows
|
||||
# if: matrix.platform == 'windows2019'
|
||||
# run: sh scripts/actions/build-windows.sh ${{matrix.platform}}
|
||||
|
||||
- name: Build OpenEthereum for Windows
|
||||
if: matrix.platform == 'windows-latest'
|
||||
run: sh scripts/actions/build-windows.sh ${{matrix.platform}}
|
||||
|
||||
- name: Upload Windows build
|
||||
uses: actions/upload-artifact@v2
|
||||
if: matrix.platform == 'windows-latest'
|
||||
with:
|
||||
name: windows-artifacts
|
||||
path: artifacts
|
||||
# - name: Upload Windows build
|
||||
# uses: actions/upload-artifact@v2
|
||||
# if: matrix.platform == 'windows2019'
|
||||
# with:
|
||||
# name: windows-artifacts
|
||||
# path: artifacts
|
||||
|
||||
# ==============================
|
||||
# Linux/Macos Build
|
||||
# ==============================
|
||||
|
||||
|
||||
- name: Build OpenEthereum for ${{matrix.platform}}
|
||||
if: matrix.platform != 'windows-latest'
|
||||
if: matrix.platform != 'windows2019'
|
||||
run: sh scripts/actions/build-linux.sh ${{matrix.platform}}
|
||||
|
||||
- name: Upload Linux build
|
||||
uses: actions/upload-artifact@v2
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
if: matrix.platform == 'ubuntu-16.04'
|
||||
with:
|
||||
name: linux-artifacts
|
||||
path: artifacts
|
||||
@@ -114,35 +73,23 @@ jobs:
|
||||
name: macos-artifacts
|
||||
path: artifacts
|
||||
|
||||
# ==============================
|
||||
# End builds
|
||||
# ==============================
|
||||
|
||||
- name: Stop sccache
|
||||
if: always()
|
||||
run: sccache --stop-server
|
||||
|
||||
- name: Prepare build directory for cache
|
||||
shell: bash
|
||||
run: bash scripts/actions/clean-target.sh
|
||||
|
||||
zip-artifacts-creator:
|
||||
name: Create zip artifacts
|
||||
needs: build
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- name: Set env
|
||||
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
|
||||
# ==============================
|
||||
# Create ZIP files
|
||||
# ==============================
|
||||
|
||||
- name: Download Windows artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: windows-artifacts
|
||||
path: windows-artifacts
|
||||
# - name: Download Windows artifacts
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: windows-artifacts
|
||||
# path: windows-artifacts
|
||||
|
||||
- name: Download Linux artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
@@ -185,18 +132,18 @@ jobs:
|
||||
echo ::set-output name=MACOS_ARTIFACT::openethereum-macos-${{ env.RELEASE_VERSION }}.zip
|
||||
echo ::set-output name=MACOS_SHASUM::$(shasum -a 256 openethereum-macos-${{ env.RELEASE_VERSION }}.zip | awk '{print $1}')
|
||||
|
||||
- name: Create zip Windows
|
||||
id: create_zip_windows
|
||||
run: |
|
||||
cd windows-artifacts/
|
||||
zip -rT openethereum-windows-${{ env.RELEASE_VERSION }}.zip *
|
||||
ls openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
cd ..
|
||||
mv windows-artifacts/openethereum-windows-${{ env.RELEASE_VERSION }}.zip .
|
||||
# - name: Create zip Windows
|
||||
# id: create_zip_windows
|
||||
# run: |
|
||||
# cd windows-artifacts/
|
||||
# zip -rT openethereum-windows-${{ env.RELEASE_VERSION }}.zip *
|
||||
# ls openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
# cd ..
|
||||
# mv windows-artifacts/openethereum-windows-${{ env.RELEASE_VERSION }}.zip .
|
||||
|
||||
echo "Setting outputs..."
|
||||
echo ::set-output name=WINDOWS_ARTIFACT::openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
echo ::set-output name=WINDOWS_SHASUM::$(shasum -a 256 openethereum-windows-${{ env.RELEASE_VERSION }}.zip | awk '{print $1}')
|
||||
# echo "Setting outputs..."
|
||||
# echo ::set-output name=WINDOWS_ARTIFACT::openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
# echo ::set-output name=WINDOWS_SHASUM::$(shasum -a 256 openethereum-windows-${{ env.RELEASE_VERSION }}.zip | awk '{print $1}')
|
||||
|
||||
# =======================================================================
|
||||
# Upload artifacts
|
||||
@@ -215,11 +162,11 @@ jobs:
|
||||
name: openethereum-macos-${{ env.RELEASE_VERSION }}.zip
|
||||
path: openethereum-macos-${{ env.RELEASE_VERSION }}.zip
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
path: openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
# - name: Upload artifacts
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
# path: openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
|
||||
# =======================================================================
|
||||
# Upload artifacts to S3
|
||||
@@ -237,23 +184,23 @@ jobs:
|
||||
run: |
|
||||
# Deploy zip artifacts to S3 bucket to a directory whose name is the tagged release version.
|
||||
# Deploy macos binary artifact (if required, add more `aws s3 cp` commands to deploy specific OS versions)
|
||||
aws s3 cp macos-artifacts/openethereum s3://${{ env.AWS_S3_ARTIFACTS_BUCKET }}/${{ env.RELEASE_VERSION }}/macos/
|
||||
aws s3 cp macos-artifacts/openethereum s3://${{ env.AWS_S3_ARTIFACTS_BUCKET }}/${{ env.RELEASE_VERSION }}/macos/ --region ${{ env.AWS_REGION }}
|
||||
|
||||
outputs:
|
||||
linux-artifact: ${{ steps.create_zip_linux.outputs.LINUX_ARTIFACT }}
|
||||
linux-shasum: ${{ steps.create_zip_linux.outputs.LINUX_SHASUM }}
|
||||
macos-artifact: ${{ steps.create_zip_macos.outputs.MACOS_ARTIFACT }}
|
||||
macos-shasum: ${{ steps.create_zip_macos.outputs.MACOS_SHASUM }}
|
||||
windows-artifact: ${{ steps.create_zip_windows.outputs.WINDOWS_ARTIFACT }}
|
||||
windows-shasum: ${{ steps.create_zip_windows.outputs.WINDOWS_SHASUM }}
|
||||
# windows-artifact: ${{ steps.create_zip_windows.outputs.WINDOWS_ARTIFACT }}
|
||||
# windows-shasum: ${{ steps.create_zip_windows.outputs.WINDOWS_SHASUM }}
|
||||
|
||||
draft-release:
|
||||
name: Draft Release
|
||||
needs: zip-artifacts-creator
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- name: Set env
|
||||
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
|
||||
# ==============================
|
||||
# Download artifacts
|
||||
@@ -269,10 +216,10 @@ jobs:
|
||||
with:
|
||||
name: openethereum-macos-${{ env.RELEASE_VERSION }}.zip
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
# - name: Download artifacts
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls
|
||||
@@ -326,13 +273,13 @@ jobs:
|
||||
asset_name: openethereum-macos-${{ env.RELEASE_VERSION }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload Release Asset - Windows
|
||||
id: upload_release_asset_windows
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release_draft.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
asset_path: ./openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
asset_name: openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
asset_content_type: application/zip
|
||||
# - name: Upload Release Asset - Windows
|
||||
# id: upload_release_asset_windows
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release_draft.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
# asset_path: ./openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
# asset_name: openethereum-windows-${{ env.RELEASE_VERSION }}.zip
|
||||
# asset_content_type: application/zip
|
||||
|
||||
48
.github/workflows/check.yml
vendored
48
.github/workflows/check.yml
vendored
@@ -4,18 +4,15 @@ on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- stable
|
||||
- main
|
||||
- dev
|
||||
jobs:
|
||||
check:
|
||||
name: Check
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
SCCACHE_CACHE_SIZE: "1G"
|
||||
SCCACHE_IDLE_TIMEOUT: 0
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install stable toolchain
|
||||
@@ -24,32 +21,6 @@ jobs:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||
# Install sccache based on https://github.com/denoland/rusty_v8/blob/master/.github/workflows/ci.yml#L69
|
||||
- name: Cache sccache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "/home/runner/.cache/sccache"
|
||||
key: ${{ runner.os }}-sccache-check-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Install sccache for Linux
|
||||
shell: pwsh
|
||||
run: pwsh scripts/actions/install-sccache.ps1 ${{ runner.os}}
|
||||
- name: Sccache statistics
|
||||
run: sccache --show-stats
|
||||
- name: Run cargo check 1/3
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
@@ -59,12 +30,12 @@ jobs:
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --locked --manifest-path util/io/Cargo.toml --no-default-features --verbose
|
||||
args: --locked --manifest-path crates/runtime/io/Cargo.toml --no-default-features --verbose
|
||||
- name: Run cargo check 3/3
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --locked --manifest-path util/io/Cargo.toml --features "mio" --verbose
|
||||
args: --locked --manifest-path crates/runtime/io/Cargo.toml --features "mio" --verbose
|
||||
- name: Run cargo check evmbin
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
@@ -77,10 +48,3 @@ jobs:
|
||||
args: --locked --all --benches --verbose
|
||||
- name: Run validate chainspecs
|
||||
run: ./scripts/actions/validate-chainspecs.sh
|
||||
- name: Stop sccache
|
||||
if: always()
|
||||
run: sccache --stop-server
|
||||
continue-on-error: true
|
||||
- name: Prepare build directory for cache
|
||||
shell: bash
|
||||
run: bash scripts/actions/clean-target.sh
|
||||
|
||||
29
.github/workflows/deploy-docker-nightly.yml
vendored
Normal file
29
.github/workflows/deploy-docker-nightly.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Docker Image Nightly Release
|
||||
|
||||
# Run "nightly" build on each commit to "dev" branch.
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
deploy-docker:
|
||||
name: Build Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@master
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
- name: Deploy to docker hub
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: openethereum/openethereum
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
dockerfile: scripts/docker/alpine/Dockerfile
|
||||
tags: "nightly"
|
||||
30
.github/workflows/deploy-docker-tag.yml
vendored
Normal file
30
.github/workflows/deploy-docker-tag.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Docker Image Tag and Latest Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
deploy-docker:
|
||||
name: Build Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@master
|
||||
- name: Set env
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
- name: Deploy to docker hub
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: openethereum/openethereum
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
dockerfile: scripts/docker/alpine/Dockerfile
|
||||
tags: "latest,${{ env.RELEASE_VERSION }}"
|
||||
30
.github/workflows/deploy-docker.yml
vendored
Normal file
30
.github/workflows/deploy-docker.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Docker Image Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
deploy-docker:
|
||||
name: Build Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@master
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
- name: Deploy to docker hub
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: openethereum/openethereum
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
dockerfile: scripts/docker/alpine/Dockerfile
|
||||
tag_names: true
|
||||
8
.gitmodules
vendored
8
.gitmodules
vendored
@@ -1,7 +1,3 @@
|
||||
[submodule "ethcore/res/ethereum/tests"]
|
||||
path = ethcore/res/ethereum/tests
|
||||
[submodule "crates/ethcore/res/json_tests"]
|
||||
path = crates/ethcore/res/json_tests
|
||||
url = https://github.com/ethereum/tests.git
|
||||
branch = develop
|
||||
[submodule "ethcore/res/wasm-tests"]
|
||||
path = ethcore/res/wasm-tests
|
||||
url = https://github.com/paritytech/wasm-tests
|
||||
|
||||
46
CHANGELOG.md
46
CHANGELOG.md
@@ -1,34 +1,16 @@
|
||||
## OpenEthereum v3.1RC1
|
||||
## OpenEthereum v3.2.0
|
||||
|
||||
OpenEthereum 3.1rc1 is a candidate release based on v2.5.13 which is the last stable version known of the client that does not include any of the issues introduced in v2.7.
|
||||
It removes non core features like Ethereum Classic, Private Transactions, Light Client, Updater, IPFS and Swarm support, currently deprecated flags such as expanse, kotti, mordor testnets.
|
||||
|
||||
Database migration utility currently in beta: https://github.com/openethereum/3.1-db-upgrade-tool
|
||||
|
||||
The full list of included changes from v2.5.13 to v3.1:
|
||||
|
||||
- Remove classic, kotti, mordor, expanse (#52)
|
||||
- Added bad block header hash for ropsten (#49)
|
||||
- Remove accounts bloom (#33)
|
||||
- Bump jsonrpc-- to v15
|
||||
- Implement eth/64, remove eth/62 (#46)
|
||||
- No snapshotting by default (#11814)
|
||||
- Update Ellaism chainspec
|
||||
- Prometheus, heavy memory calls removed (#27)
|
||||
- Update ethereum/tests
|
||||
- Implement JSON test suite (#11801)
|
||||
- Fix issues during block sync (#11265)
|
||||
- Fix race same block (#11400)
|
||||
- EIP-2537: Precompile for BLS12-381 curve operations (#11707)
|
||||
- Remove private transactions
|
||||
- Remove GetNodeData
|
||||
- Remove IPFS integration (#11532)
|
||||
- Remove updater
|
||||
- Remove light client
|
||||
- Remove C and Java bindings (#11346)
|
||||
- Remove whisper (#10855)
|
||||
- EIP-2315: Simple Subroutines for the EVM (#11629)
|
||||
- Remove deprecated flags (removal of --geth flag)
|
||||
- Remove support for hardware wallets (#10678)
|
||||
- Update bootnodes
|
||||
Bug fixes:
|
||||
* Update EWF's chains with Istanbul transition block numbers (#11482) (#254)
|
||||
* fix Supplied instant is later than self (#169)
|
||||
* ethcore/snapshot: fix double-lock in Service::feed_chunk (#289)
|
||||
|
||||
Enhancements:
|
||||
* Berlin hardfork blocks: mainnet (12,244,000), goerli (4,460,644), rinkeby (8,290,928) and ropsten (9,812,189)
|
||||
* yolo3x spec (#241)
|
||||
* EIP-2930 RPC support
|
||||
* Remove eth/63 protocol version (#252)
|
||||
* Snapshot manifest block added to prometheus (#232)
|
||||
* EIP-1898: Allow default block parameter to be blockHash
|
||||
* Change ProtocolId to U64
|
||||
* Update ethereum/tests
|
||||
105
Cargo.lock
generated
105
Cargo.lock
generated
@@ -439,7 +439,6 @@ name = "common-types"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"ethereum-types 0.4.2",
|
||||
"ethjson",
|
||||
"ethkey",
|
||||
"heapsize",
|
||||
"keccak-hash",
|
||||
@@ -447,6 +446,9 @@ dependencies = [
|
||||
"rlp 0.3.0",
|
||||
"rlp_derive",
|
||||
"rustc-hex 1.0.0",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_repr",
|
||||
"unexpected",
|
||||
]
|
||||
|
||||
@@ -1100,6 +1102,7 @@ dependencies = [
|
||||
"num",
|
||||
"parity-bytes",
|
||||
"parity-crypto 0.4.2",
|
||||
"rustc-hex 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1245,47 +1248,6 @@ dependencies = [
|
||||
"tiny-keccak 1.5.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ethcore-secretstore"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"common-types",
|
||||
"env_logger",
|
||||
"ethabi",
|
||||
"ethabi-contract",
|
||||
"ethabi-derive",
|
||||
"ethcore",
|
||||
"ethcore-accounts",
|
||||
"ethcore-call-contract",
|
||||
"ethcore-sync",
|
||||
"ethereum-types 0.4.2",
|
||||
"ethkey",
|
||||
"futures",
|
||||
"hyper 0.12.35",
|
||||
"jsonrpc-server-utils",
|
||||
"keccak-hash",
|
||||
"kvdb",
|
||||
"kvdb-rocksdb",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"parity-bytes",
|
||||
"parity-crypto 0.3.1",
|
||||
"parity-runtime",
|
||||
"parking_lot 0.7.1",
|
||||
"percent-encoding 2.1.0",
|
||||
"rustc-hex 1.0.0",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"tempdir",
|
||||
"tiny-keccak 1.5.0",
|
||||
"tokio",
|
||||
"tokio-io",
|
||||
"tokio-service",
|
||||
"url 2.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ethcore-service"
|
||||
version = "0.1.0"
|
||||
@@ -1412,7 +1374,9 @@ dependencies = [
|
||||
name = "ethjson"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"common-types",
|
||||
"ethereum-types 0.4.2",
|
||||
"ethkey",
|
||||
"macros",
|
||||
"maplit",
|
||||
"rustc-hex 1.0.0",
|
||||
@@ -1460,7 +1424,6 @@ dependencies = [
|
||||
name = "ethstore"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"dir",
|
||||
"ethereum-types 0.4.2",
|
||||
"ethkey",
|
||||
"itertools 0.5.10",
|
||||
@@ -1479,7 +1442,6 @@ dependencies = [
|
||||
"smallvec 0.6.13",
|
||||
"tempdir",
|
||||
"time",
|
||||
"tiny-keccak 1.5.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1505,6 +1467,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"bit-set",
|
||||
"criterion 0.2.11",
|
||||
"ethcore-builtin",
|
||||
"ethereum-types 0.4.2",
|
||||
"heapsize",
|
||||
"hex-literal",
|
||||
@@ -2438,9 +2401,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "linked-hash-map"
|
||||
version = "0.5.2"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
|
||||
checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a"
|
||||
|
||||
[[package]]
|
||||
name = "local-encoding"
|
||||
@@ -2862,7 +2825,7 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
|
||||
|
||||
[[package]]
|
||||
name = "openethereum"
|
||||
version = "3.1.0-rc1"
|
||||
version = "3.2.0"
|
||||
dependencies = [
|
||||
"ansi_term 0.10.2",
|
||||
"atty",
|
||||
@@ -2882,7 +2845,6 @@ dependencies = [
|
||||
"ethcore-logger",
|
||||
"ethcore-miner",
|
||||
"ethcore-network",
|
||||
"ethcore-secretstore",
|
||||
"ethcore-service",
|
||||
"ethcore-sync",
|
||||
"ethereum-types 0.4.2",
|
||||
@@ -2917,7 +2879,6 @@ dependencies = [
|
||||
"pretty_assertions",
|
||||
"prometheus",
|
||||
"regex 1.3.9",
|
||||
"registrar",
|
||||
"rlp 0.3.0",
|
||||
"rpassword",
|
||||
"rustc-hex 1.0.0",
|
||||
@@ -3003,7 +2964,7 @@ dependencies = [
|
||||
"rustc-hex 2.0.1",
|
||||
"scrypt 0.2.0",
|
||||
"sha2 0.8.0",
|
||||
"subtle 2.1.0",
|
||||
"subtle 2.3.0",
|
||||
"tiny-keccak 1.5.0",
|
||||
"zeroize",
|
||||
]
|
||||
@@ -3227,7 +3188,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "parity-version"
|
||||
version = "3.1.0-rc1"
|
||||
version = "3.2.0"
|
||||
dependencies = [
|
||||
"parity-bytes",
|
||||
"rlp 0.3.0",
|
||||
@@ -3601,22 +3562,6 @@ dependencies = [
|
||||
"getopts",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pwasm-run-test"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"env_logger",
|
||||
"ethereum-types 0.4.2",
|
||||
"ethjson",
|
||||
"rustc-hex 1.0.0",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"vm",
|
||||
"wasm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pwasm-utils"
|
||||
version = "0.6.2"
|
||||
@@ -3958,17 +3903,6 @@ version = "0.6.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"
|
||||
|
||||
[[package]]
|
||||
name = "registrar"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"ethabi",
|
||||
"ethabi-contract",
|
||||
"ethabi-derive",
|
||||
"futures",
|
||||
"keccak-hash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "relay"
|
||||
version = "0.1.1"
|
||||
@@ -4274,6 +4208,17 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_repr"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.20",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.40",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha-1"
|
||||
version = "0.8.1"
|
||||
@@ -4456,9 +4401,9 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
|
||||
|
||||
[[package]]
|
||||
name = "subtle"
|
||||
version = "2.1.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "01dca13cf6c3b179864ab3292bd794e757618d35a7766b7c46050c614ba00829"
|
||||
checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
|
||||
81
Cargo.toml
81
Cargo.toml
@@ -2,7 +2,7 @@
|
||||
description = "OpenEthereum"
|
||||
name = "openethereum"
|
||||
# NOTE Make sure to update util/version/Cargo.toml as well
|
||||
version = "3.1.0-rc1"
|
||||
version = "3.2.0"
|
||||
license = "GPL-3.0"
|
||||
authors = [
|
||||
"OpenEthereum developers",
|
||||
@@ -10,7 +10,7 @@ authors = [
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
blooms-db = { path = "util/blooms-db" }
|
||||
blooms-db = { path = "crates/db/blooms-db" }
|
||||
log = "0.4"
|
||||
rustc-hex = "1.0"
|
||||
docopt = "1.0"
|
||||
@@ -35,44 +35,42 @@ fdlimit = "0.1"
|
||||
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
|
||||
jsonrpc-core = "15.0.0"
|
||||
parity-bytes = "0.1"
|
||||
common-types = { path = "ethcore/types" }
|
||||
ethcore = { path = "ethcore", features = ["parity"] }
|
||||
ethcore-accounts = { path = "accounts", optional = true }
|
||||
ethcore-blockchain = { path = "ethcore/blockchain" }
|
||||
ethcore-call-contract = { path = "ethcore/call-contract"}
|
||||
ethcore-db = { path = "ethcore/db" }
|
||||
ethcore-io = { path = "util/io" }
|
||||
ethcore-logger = { path = "parity/logger" }
|
||||
ethcore-miner = { path = "miner" }
|
||||
ethcore-network = { path = "util/network" }
|
||||
ethcore-service = { path = "ethcore/service" }
|
||||
ethcore-sync = { path = "ethcore/sync" }
|
||||
common-types = { path = "crates/ethcore/types" }
|
||||
ethcore = { path = "crates/ethcore", features = ["parity"] }
|
||||
ethcore-accounts = { path = "crates/accounts", optional = true }
|
||||
ethcore-blockchain = { path = "crates/ethcore/blockchain" }
|
||||
ethcore-call-contract = { path = "crates/vm/call-contract"}
|
||||
ethcore-db = { path = "crates/db/db" }
|
||||
ethcore-io = { path = "crates/runtime/io" }
|
||||
ethcore-logger = { path = "bin/oe/logger" }
|
||||
ethcore-miner = { path = "crates/concensus/miner" }
|
||||
ethcore-network = { path = "crates/net/network" }
|
||||
ethcore-service = { path = "crates/ethcore/service" }
|
||||
ethcore-sync = { path = "crates/ethcore/sync" }
|
||||
ethereum-types = "0.4"
|
||||
ethkey = { path = "accounts/ethkey" }
|
||||
ethstore = { path = "accounts/ethstore" }
|
||||
fetch = { path = "util/fetch" }
|
||||
node-filter = { path = "ethcore/node-filter" }
|
||||
ethkey = { path = "crates/accounts/ethkey" }
|
||||
ethstore = { path = "crates/accounts/ethstore" }
|
||||
fetch = { path = "crates/net/fetch" }
|
||||
node-filter = { path = "crates/net/node-filter" }
|
||||
rlp = { version = "0.3.0", features = ["ethereum"] }
|
||||
cli-signer= { path = "cli-signer" }
|
||||
cli-signer= { path = "crates/util/cli-signer" }
|
||||
parity-daemonize = "0.3"
|
||||
parity-local-store = { path = "miner/local-store" }
|
||||
parity-runtime = { path = "util/runtime" }
|
||||
parity-rpc = { path = "rpc" }
|
||||
parity-version = { path = "util/version" }
|
||||
parity-local-store = { path = "crates/concensus/miner/local-store" }
|
||||
parity-runtime = { path = "crates/runtime/runtime" }
|
||||
parity-rpc = { path = "crates/rpc" }
|
||||
parity-version = { path = "crates/util/version" }
|
||||
parity-path = "0.1"
|
||||
dir = { path = "util/dir" }
|
||||
panic_hook = { path = "util/panic-hook" }
|
||||
dir = { path = "crates/util/dir" }
|
||||
panic_hook = { path = "crates/util/panic-hook" }
|
||||
keccak-hash = "0.1"
|
||||
migration-rocksdb = { path = "util/migration-rocksdb" }
|
||||
migration-rocksdb = { path = "crates/db/migration-rocksdb" }
|
||||
kvdb = "0.1"
|
||||
kvdb-rocksdb = "0.1.3"
|
||||
journaldb = { path = "util/journaldb" }
|
||||
stats = { path = "util/stats" }
|
||||
journaldb = { path = "crates/db/journaldb" }
|
||||
stats = { path = "crates/util/stats" }
|
||||
prometheus = "0.9.0"
|
||||
|
||||
ethcore-secretstore = { path = "secret-store", optional = true }
|
||||
|
||||
registrar = { path = "util/registrar" }
|
||||
# ethcore-secretstore = { path = "crates/util/secret-store", optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
rustc_version = "0.2"
|
||||
@@ -81,7 +79,7 @@ rustc_version = "0.2"
|
||||
pretty_assertions = "0.1"
|
||||
ipnetwork = "0.12.6"
|
||||
tempdir = "0.3"
|
||||
fake-fetch = { path = "util/fake-fetch" }
|
||||
fake-fetch = { path = "crates/net/fake-fetch" }
|
||||
lazy_static = "1.2.0"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
@@ -97,7 +95,6 @@ test-heavy = ["ethcore/test-heavy"]
|
||||
evm-debug = ["ethcore/evm-debug"]
|
||||
evm-debug-tests = ["ethcore/evm-debug-tests"]
|
||||
slow-blocks = ["ethcore/slow-blocks"]
|
||||
secretstore = ["ethcore-secretstore", "ethcore-secretstore/accounts"]
|
||||
final = ["parity-version/final"]
|
||||
deadlock_detection = ["parking_lot/deadlock_detection"]
|
||||
# to create a memory profile (requires nightly rust), use e.g.
|
||||
@@ -109,10 +106,10 @@ deadlock_detection = ["parking_lot/deadlock_detection"]
|
||||
memory_profiling = []
|
||||
|
||||
[lib]
|
||||
path = "parity/lib.rs"
|
||||
path = "bin/oe/lib.rs"
|
||||
|
||||
[[bin]]
|
||||
path = "parity/main.rs"
|
||||
path = "bin/oe/main.rs"
|
||||
name = "openethereum"
|
||||
|
||||
[profile.test]
|
||||
@@ -128,16 +125,10 @@ lto = true
|
||||
# in the dependency tree in any other way
|
||||
# (i.e. pretty much only standalone CLI tools)
|
||||
members = [
|
||||
"accounts/ethkey/cli",
|
||||
"accounts/ethstore/cli",
|
||||
"chainspec",
|
||||
"ethcore/wasm/run",
|
||||
"evmbin",
|
||||
"util/triehash-ethereum",
|
||||
"util/keccak-hasher",
|
||||
"util/patricia-trie-ethereum",
|
||||
"util/fastmap",
|
||||
"util/time-utils"
|
||||
"bin/ethkey",
|
||||
"bin/ethstore",
|
||||
"bin/evmbin",
|
||||
"bin/chainspec"
|
||||
]
|
||||
|
||||
[patch.crates-io]
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenEthereum's goal is to be the fastest, lightest, and most secure Ethereum cli
|
||||
|
||||
By default, OpenEthereum runs a JSON-RPC HTTP server on port `:8545` and a Web-Sockets server on port `:8546`. This is fully configurable and supports a number of APIs.
|
||||
|
||||
If you run into problems while using OpenEthereum, check out the [old wiki for documentation](https://openethereum.github.io/wiki/), feel free to [file an issue in this repository](https://github.com/openethereum/openethereum/issues/new), or hop on our [Discord](https://discord.io/openethereum) chat room to ask a question. We are glad to help!
|
||||
If you run into problems while using OpenEthereum, check out the [old wiki for documentation](https://openethereum.github.io/), feel free to [file an issue in this repository](https://github.com/openethereum/openethereum/issues/new), or hop on our [Discord](https://discord.io/openethereum) chat room to ask a question. We are glad to help!
|
||||
|
||||
You can download OpenEthereum's latest release at [the releases page](https://github.com/openethereum/openethereum/releases) or follow the instructions below to build from source. Read the [CHANGELOG.md](CHANGELOG.md) for a list of all changes between different versions.
|
||||
|
||||
@@ -135,7 +135,7 @@ To start OpenEthereum as a regular user using `systemd` init:
|
||||
1. Copy `./scripts/openethereum.service` to your
|
||||
`systemd` user directory (usually `~/.config/systemd/user`).
|
||||
2. Copy release to bin folder, write `sudo install ./target/release/openethereum /usr/bin/openethereum`
|
||||
3. To configure OpenEthereum, see [our old wiki](https://openethereum.github.io/wiki/Configuring-OpenEthereum) for details.
|
||||
3. To configure OpenEthereum, see [our wiki](https://openethereum.github.io/Configuring-OpenEthereum) for details.
|
||||
|
||||
## 4. Testing <a id="chapter-004"></a>
|
||||
|
||||
@@ -157,7 +157,7 @@ You can show your logs in the test output by passing `--nocapture` (i.e. `cargo
|
||||
|
||||
## 5. Documentation <a id="chapter-005"></a>
|
||||
|
||||
Be sure to [check out our old wiki](https://openethereum.github.io/wiki/) for more information.
|
||||
Be sure to [check out our wiki](https://openethereum.github.io/) for more information.
|
||||
|
||||
### Viewing documentation for OpenEthereum packages
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@ version = "0.1.0"
|
||||
authors = ["Marek Kotewicz <marek@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
ethjson = { path = "../json" }
|
||||
ethjson = { path = "../../crates/ethjson" }
|
||||
serde_json = "1.0"
|
||||
@@ -7,8 +7,8 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
[dependencies]
|
||||
docopt = "1.0"
|
||||
env_logger = "0.5"
|
||||
ethkey = { path = "../" }
|
||||
panic_hook = { path = "../../../util/panic-hook" }
|
||||
ethkey = { path = "../../crates/accounts/ethkey" }
|
||||
panic_hook = { path = "../../crates/util/panic-hook" }
|
||||
parity-wordlist="1.3"
|
||||
rustc-hex = "1.0"
|
||||
serde = "1.0"
|
||||
@@ -12,9 +12,9 @@ rustc-hex = "1.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
parking_lot = "0.7"
|
||||
ethstore = { path = "../" }
|
||||
dir = { path = '../../../util/dir' }
|
||||
panic_hook = { path = "../../../util/panic-hook" }
|
||||
ethstore = { path = "../../crates/accounts/ethstore" }
|
||||
dir = { path = '../../crates/util/dir' }
|
||||
panic_hook = { path = "../../crates/util/panic-hook" }
|
||||
|
||||
[[bin]]
|
||||
name = "ethstore"
|
||||
@@ -9,20 +9,20 @@ name = "openethereum-evm"
|
||||
path = "./src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
common-types = { path = "../ethcore/types", features = ["test-helpers"] }
|
||||
common-types = { path = "../../crates/ethcore/types", features = ["test-helpers"] }
|
||||
docopt = "1.0"
|
||||
env_logger = "0.5"
|
||||
ethcore = { path = "../ethcore", features = ["test-helpers", "json-tests", "to-pod-full"] }
|
||||
ethcore = { path = "../../crates/ethcore", features = ["test-helpers", "json-tests", "to-pod-full"] }
|
||||
ethereum-types = "0.4"
|
||||
ethjson = { path = "../json" }
|
||||
evm = { path = "../ethcore/evm" }
|
||||
panic_hook = { path = "../util/panic-hook" }
|
||||
ethjson = { path = "../../crates/ethjson" }
|
||||
evm = { path = "../../crates/vm/evm" }
|
||||
panic_hook = { path = "../../crates/util/panic-hook" }
|
||||
parity-bytes = "0.1"
|
||||
rustc-hex = "1.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
vm = { path = "../ethcore/vm" }
|
||||
vm = { path = "../../crates/vm/vm" }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3.0"
|
||||
@@ -5,11 +5,11 @@ EVM implementation for OpenEthereum.
|
||||
### Usage
|
||||
|
||||
```
|
||||
EVM implementation for OpenEthereum.
|
||||
EVM implementation for Parity.
|
||||
Copyright 2015-2020 Parity Technologies (UK) Ltd.
|
||||
|
||||
Usage:
|
||||
openethereum-evm state-test <file> [--json --std-json --std-dump-json --only NAME --chain CHAIN --std-out-only --std-err-only]
|
||||
openethereum-evm state-test <file> [--json --std-json --std-dump-json --only NAME --chain CHAIN --std-out-only --std-err-only --omit-storage-output --omit-memory-output]
|
||||
openethereum-evm stats [options]
|
||||
openethereum-evm stats-jsontests-vm <file>
|
||||
openethereum-evm [options]
|
||||
@@ -30,16 +30,22 @@ Transaction options:
|
||||
--gas-price WEI Supplied gas price as hex (without 0x).
|
||||
|
||||
State test options:
|
||||
--chain CHAIN Run only from specific chain name (i.e. one of EIP150, EIP158,
|
||||
Frontier, Homestead, Byzantium, Constantinople,
|
||||
ConstantinopleFix, Istanbul, EIP158ToByzantiumAt5, FrontierToHomesteadAt5,
|
||||
HomesteadToDaoAt5, HomesteadToEIP150At5, Berlin, Yolo3).
|
||||
--only NAME Runs only a single test matching the name.
|
||||
--chain CHAIN Run only tests from specific chain.
|
||||
|
||||
General options:
|
||||
--json Display verbose results in JSON.
|
||||
--std-json Display results in standardized JSON format.
|
||||
--std-err-only With --std-json redirect to err output only.
|
||||
--std-out-only With --std-json redirect to out output only.
|
||||
--std-dump-json Display results in standardized JSON format
|
||||
with additional state dump.
|
||||
--json Display verbose results in JSON.
|
||||
--std-json Display results in standardized JSON format.
|
||||
--std-err-only With --std-json redirect to err output only.
|
||||
--std-out-only With --std-json redirect to out output only.
|
||||
--omit-storage-output With --std-json omit storage output.
|
||||
--omit-memory-output With --std-json omit memory output.
|
||||
--std-dump-json Display results in standardized JSON format
|
||||
with additional state dump.
|
||||
|
||||
Display result state dump in standardized JSON format.
|
||||
--chain CHAIN Chain spec file path.
|
||||
-h, --help Display this message and exit.
|
||||
40
bin/evmbin/src/display/config.rs
Normal file
40
bin/evmbin/src/display/config.rs
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
|
||||
// This file is part of OpenEthereum.
|
||||
|
||||
// OpenEthereum is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// OpenEthereum is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Config used by display informants
|
||||
|
||||
#[derive(Default, Copy, Clone)]
|
||||
pub struct Config {
|
||||
omit_storage_output: bool,
|
||||
omit_memory_output: bool,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn new(omit_storage_output: bool, omit_memory_output: bool) -> Config {
|
||||
Config {
|
||||
omit_storage_output,
|
||||
omit_memory_output,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn omit_storage_output(&self) -> bool {
|
||||
self.omit_storage_output
|
||||
}
|
||||
|
||||
pub fn omit_memory_output(&self) -> bool {
|
||||
self.omit_memory_output
|
||||
}
|
||||
}
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
use std::{collections::HashMap, mem};
|
||||
|
||||
use super::config::Config;
|
||||
use bytes::ToPretty;
|
||||
use display;
|
||||
use ethcore::trace;
|
||||
use ethereum_types::{H256, U256};
|
||||
|
||||
use display;
|
||||
use info as vm;
|
||||
|
||||
/// JSON formatting informant.
|
||||
@@ -44,9 +44,16 @@ pub struct Informant {
|
||||
subinfos: Vec<Informant>,
|
||||
subdepth: usize,
|
||||
unmatched: bool,
|
||||
config: Config,
|
||||
}
|
||||
|
||||
impl Informant {
|
||||
pub fn new(config: Config) -> Informant {
|
||||
let mut def = Informant::default();
|
||||
def.config = config;
|
||||
def
|
||||
}
|
||||
|
||||
fn with_informant_in_depth<F: Fn(&mut Informant)>(
|
||||
informant: &mut Informant,
|
||||
depth: usize,
|
||||
@@ -67,17 +74,26 @@ impl Informant {
|
||||
}
|
||||
|
||||
fn informant_trace(informant: &Informant, gas_used: U256) -> String {
|
||||
let memory = if informant.config.omit_memory_output() {
|
||||
"".to_string()
|
||||
} else {
|
||||
format!("0x{}", informant.memory.to_hex())
|
||||
};
|
||||
let storage = if informant.config.omit_storage_output() {
|
||||
None
|
||||
} else {
|
||||
Some(&informant.storage)
|
||||
};
|
||||
let info = ::evm::Instruction::from_u8(informant.instruction).map(|i| i.info());
|
||||
|
||||
json!({
|
||||
"pc": informant.pc,
|
||||
"op": informant.instruction,
|
||||
"opName": info.map(|i| i.name).unwrap_or(""),
|
||||
"gas": format!("{:#x}", gas_used.saturating_add(informant.gas_cost)),
|
||||
"gasCost": format!("{:#x}", informant.gas_cost),
|
||||
"memory": format!("0x{}", informant.memory.to_hex()),
|
||||
"memory": memory,
|
||||
"stack": informant.stack,
|
||||
"storage": informant.storage,
|
||||
"storage": storage,
|
||||
"depth": informant.depth,
|
||||
})
|
||||
.to_string()
|
||||
@@ -85,7 +101,7 @@ impl Informant {
|
||||
}
|
||||
|
||||
impl vm::Informant for Informant {
|
||||
type Sink = ();
|
||||
type Sink = Config;
|
||||
|
||||
fn before_test(&mut self, name: &str, action: &str) {
|
||||
println!("{}", json!({"action": action, "test": name}));
|
||||
@@ -96,10 +112,10 @@ impl vm::Informant for Informant {
|
||||
}
|
||||
|
||||
fn clone_sink(&self) -> Self::Sink {
|
||||
()
|
||||
self.config
|
||||
}
|
||||
|
||||
fn finish(result: vm::RunResult<Self::Output>, _sink: &mut Self::Sink) {
|
||||
fn finish(result: vm::RunResult<Self::Output>, config: &mut Self::Sink) {
|
||||
match result {
|
||||
Ok(success) => {
|
||||
for trace in success.traces.unwrap_or_else(Vec::new) {
|
||||
@@ -115,8 +131,10 @@ impl vm::Informant for Informant {
|
||||
println!("{}", success_msg)
|
||||
}
|
||||
Err(failure) => {
|
||||
for trace in failure.traces.unwrap_or_else(Vec::new) {
|
||||
println!("{}", trace);
|
||||
if !config.omit_storage_output() {
|
||||
for trace in failure.traces.unwrap_or_else(Vec::new) {
|
||||
println!("{}", trace);
|
||||
}
|
||||
}
|
||||
|
||||
let failure_msg = json!({
|
||||
@@ -205,6 +223,7 @@ impl trace::VMTracer for Informant {
|
||||
let subdepth = self.subdepth;
|
||||
Self::with_informant_in_depth(self, subdepth, |informant: &mut Informant| {
|
||||
let mut vm = Informant::default();
|
||||
vm.config = informant.config;
|
||||
vm.depth = informant.depth + 1;
|
||||
vm.code = code.to_vec();
|
||||
vm.gas_used = informant.gas_used;
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
pub mod config;
|
||||
pub mod json;
|
||||
pub mod simple;
|
||||
pub mod std_json;
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
//! Simple VM output.
|
||||
|
||||
use super::config::Config;
|
||||
use bytes::ToPretty;
|
||||
use ethcore::trace;
|
||||
|
||||
@@ -24,17 +25,25 @@ use info as vm;
|
||||
|
||||
/// Simple formatting informant.
|
||||
#[derive(Default)]
|
||||
pub struct Informant;
|
||||
pub struct Informant {
|
||||
config: Config,
|
||||
}
|
||||
|
||||
impl Informant {
|
||||
pub fn new(config: Config) -> Informant {
|
||||
Informant { config }
|
||||
}
|
||||
}
|
||||
|
||||
impl vm::Informant for Informant {
|
||||
type Sink = ();
|
||||
type Sink = Config;
|
||||
|
||||
fn before_test(&mut self, name: &str, action: &str) {
|
||||
println!("Test: {} ({})", name, action);
|
||||
}
|
||||
|
||||
fn clone_sink(&self) -> Self::Sink {
|
||||
()
|
||||
self.config
|
||||
}
|
||||
|
||||
fn finish(result: vm::RunResult<Self::Output>, _sink: &mut Self::Sink) {
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
use std::{collections::HashMap, io};
|
||||
|
||||
use super::config::Config;
|
||||
use bytes::ToPretty;
|
||||
use display;
|
||||
use ethcore::{pod_state, trace};
|
||||
use ethereum_types::{H256, U256};
|
||||
|
||||
use display;
|
||||
use info as vm;
|
||||
|
||||
pub trait Writer: io::Write + Send + Sized {
|
||||
@@ -61,30 +61,39 @@ pub struct Informant<Trace, Out> {
|
||||
subdepth: usize,
|
||||
trace_sink: Trace,
|
||||
out_sink: Out,
|
||||
config: Config,
|
||||
}
|
||||
|
||||
impl Default for Informant<io::Stderr, io::Stdout> {
|
||||
fn default() -> Self {
|
||||
Self::new(io::stderr(), io::stdout())
|
||||
Self::new(io::stderr(), io::stdout(), Config::default())
|
||||
}
|
||||
}
|
||||
|
||||
impl Informant<io::Stdout, io::Stdout> {
|
||||
/// std json informant using out only.
|
||||
pub fn out_only() -> Self {
|
||||
Self::new(io::stdout(), io::stdout())
|
||||
pub fn out_only(config: Config) -> Self {
|
||||
Self::new(io::stdout(), io::stdout(), config)
|
||||
}
|
||||
}
|
||||
|
||||
impl Informant<io::Stderr, io::Stderr> {
|
||||
/// std json informant using err only.
|
||||
pub fn err_only() -> Self {
|
||||
Self::new(io::stderr(), io::stderr())
|
||||
pub fn err_only(config: Config) -> Self {
|
||||
Self::new(io::stderr(), io::stderr(), config)
|
||||
}
|
||||
}
|
||||
|
||||
impl Informant<io::Stderr, io::Stdout> {
|
||||
pub fn new_default(config: Config) -> Self {
|
||||
let mut informant = Self::default();
|
||||
informant.config = config;
|
||||
informant
|
||||
}
|
||||
}
|
||||
|
||||
impl<Trace: Writer, Out: Writer> Informant<Trace, Out> {
|
||||
pub fn new(trace_sink: Trace, out_sink: Out) -> Self {
|
||||
pub fn new(trace_sink: Trace, out_sink: Out, config: Config) -> Self {
|
||||
Informant {
|
||||
code: Default::default(),
|
||||
instruction: Default::default(),
|
||||
@@ -95,6 +104,7 @@ impl<Trace: Writer, Out: Writer> Informant<Trace, Out> {
|
||||
subdepth: 0,
|
||||
trace_sink,
|
||||
out_sink,
|
||||
config,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +143,7 @@ impl<Trace: Writer, Out: Writer> Informant<Trace, Out> {
|
||||
}
|
||||
|
||||
impl<Trace: Writer, Out: Writer> vm::Informant for Informant<Trace, Out> {
|
||||
type Sink = (Trace, Out);
|
||||
type Sink = (Trace, Out, Config);
|
||||
|
||||
fn before_test(&mut self, name: &str, action: &str) {
|
||||
let out_data = json!({
|
||||
@@ -147,11 +157,15 @@ impl<Trace: Writer, Out: Writer> vm::Informant for Informant<Trace, Out> {
|
||||
fn set_gas(&mut self, _gas: U256) {}
|
||||
|
||||
fn clone_sink(&self) -> Self::Sink {
|
||||
(self.trace_sink.clone(), self.out_sink.clone())
|
||||
(
|
||||
self.trace_sink.clone(),
|
||||
self.out_sink.clone(),
|
||||
self.config.clone(),
|
||||
)
|
||||
}
|
||||
fn finish(
|
||||
result: vm::RunResult<<Self as trace::VMTracer>::Output>,
|
||||
(ref mut trace_sink, ref mut out_sink): &mut Self::Sink,
|
||||
(ref mut trace_sink, ref mut out_sink, _): &mut Self::Sink,
|
||||
) {
|
||||
match result {
|
||||
Ok(success) => {
|
||||
@@ -240,7 +254,11 @@ impl<Trace: Writer, Out: Writer> trace::VMTracer for Informant<Trace, Out> {
|
||||
fn prepare_subtrace(&mut self, code: &[u8]) {
|
||||
let subdepth = self.subdepth;
|
||||
Self::with_informant_in_depth(self, subdepth, |informant: &mut Informant<Trace, Out>| {
|
||||
let mut vm = Informant::new(informant.trace_sink.clone(), informant.out_sink.clone());
|
||||
let mut vm = Informant::new(
|
||||
informant.trace_sink.clone(),
|
||||
informant.out_sink.clone(),
|
||||
informant.config,
|
||||
);
|
||||
vm.depth = informant.depth + 1;
|
||||
vm.code = code.to_vec();
|
||||
informant.subinfos.push(vm);
|
||||
@@ -293,7 +311,10 @@ pub mod tests {
|
||||
let trace_writer: TestWriter = Default::default();
|
||||
let out_writer: TestWriter = Default::default();
|
||||
let res = trace_writer.0.clone();
|
||||
(Informant::new(trace_writer, out_writer), res)
|
||||
(
|
||||
Informant::new(trace_writer, out_writer, Config::default()),
|
||||
res,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -141,7 +141,7 @@ pub fn run_transaction<T: Informant>(
|
||||
let result = run(
|
||||
&spec,
|
||||
trie_spec,
|
||||
transaction.gas,
|
||||
transaction.tx().gas,
|
||||
pre_state,
|
||||
|mut client| {
|
||||
let result = client.transact(env_info, transaction, trace::NoopTracer, informant);
|
||||
@@ -57,10 +57,10 @@ use info::Informant;
|
||||
|
||||
const USAGE: &'static str = r#"
|
||||
EVM implementation for Parity.
|
||||
Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||
Copyright 2015-2020 Parity Technologies (UK) Ltd.
|
||||
|
||||
Usage:
|
||||
openethereum-evm state-test <file> [--json --std-json --std-dump-json --only NAME --chain CHAIN --std-out-only --std-err-only]
|
||||
openethereum-evm state-test <file> [--json --std-json --std-dump-json --only NAME --chain CHAIN --std-out-only --std-err-only --omit-storage-output --omit-memory-output]
|
||||
openethereum-evm stats [options]
|
||||
openethereum-evm stats-jsontests-vm <file>
|
||||
openethereum-evm [options]
|
||||
@@ -84,16 +84,19 @@ State test options:
|
||||
--chain CHAIN Run only from specific chain name (i.e. one of EIP150, EIP158,
|
||||
Frontier, Homestead, Byzantium, Constantinople,
|
||||
ConstantinopleFix, Istanbul, EIP158ToByzantiumAt5, FrontierToHomesteadAt5,
|
||||
HomesteadToDaoAt5, HomesteadToEIP150At5).
|
||||
HomesteadToDaoAt5, HomesteadToEIP150At5, Berlin, Yolo3).
|
||||
--only NAME Runs only a single test matching the name.
|
||||
|
||||
General options:
|
||||
--json Display verbose results in JSON.
|
||||
--std-json Display results in standardized JSON format.
|
||||
--std-err-only With --std-json redirect to err output only.
|
||||
--std-out-only With --std-json redirect to out output only.
|
||||
--std-dump-json Display results in standardized JSON format
|
||||
with additional state dump.
|
||||
--json Display verbose results in JSON.
|
||||
--std-json Display results in standardized JSON format.
|
||||
--std-err-only With --std-json redirect to err output only.
|
||||
--std-out-only With --std-json redirect to out output only.
|
||||
--omit-storage-output With --std-json omit storage output.
|
||||
--omit-memory-output With --std-json omit memory output.
|
||||
--std-dump-json Display results in standardized JSON format
|
||||
with additional state dump.
|
||||
|
||||
Display result state dump in standardized JSON format.
|
||||
--chain CHAIN Chain spec file path.
|
||||
-h, --help Display this message and exit.
|
||||
@@ -107,22 +110,24 @@ fn main() {
|
||||
.and_then(|d| d.deserialize())
|
||||
.unwrap_or_else(|e| e.exit());
|
||||
|
||||
let config = args.config();
|
||||
|
||||
if args.cmd_state_test {
|
||||
run_state_test(args)
|
||||
} else if args.cmd_stats_jsontests_vm {
|
||||
run_stats_jsontests_vm(args)
|
||||
} else if args.flag_json {
|
||||
run_call(args, display::json::Informant::default())
|
||||
run_call(args, display::json::Informant::new(config))
|
||||
} else if args.flag_std_dump_json || args.flag_std_json {
|
||||
if args.flag_std_err_only {
|
||||
run_call(args, display::std_json::Informant::err_only())
|
||||
run_call(args, display::std_json::Informant::err_only(config))
|
||||
} else if args.flag_std_out_only {
|
||||
run_call(args, display::std_json::Informant::out_only())
|
||||
run_call(args, display::std_json::Informant::out_only(config))
|
||||
} else {
|
||||
run_call(args, display::std_json::Informant::default())
|
||||
run_call(args, display::std_json::Informant::new_default(config))
|
||||
};
|
||||
} else {
|
||||
run_call(args, display::simple::Informant::default())
|
||||
run_call(args, display::simple::Informant::new(config))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +170,7 @@ fn run_stats_jsontests_vm(args: Args) {
|
||||
|
||||
fn run_state_test(args: Args) {
|
||||
use ethjson::state::test::Test;
|
||||
|
||||
let config = args.config();
|
||||
let file = args.arg_file.expect("FILE is required");
|
||||
let mut file = match fs::File::open(&file) {
|
||||
Err(err) => die(format!("Unable to open: {:?}: {}", file, err)),
|
||||
@@ -197,10 +202,9 @@ fn run_state_test(args: Args) {
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (idx, state) in states.into_iter().enumerate() {
|
||||
let post_root = state.hash.into();
|
||||
let transaction = multitransaction.select(&state.indexes).into();
|
||||
let transaction = multitransaction.select(&state.indexes);
|
||||
|
||||
let trie_spec = if args.flag_std_dump_json {
|
||||
TrieSpec::Fat
|
||||
@@ -216,7 +220,7 @@ fn run_state_test(args: Args) {
|
||||
post_root,
|
||||
&env_info,
|
||||
transaction,
|
||||
display::json::Informant::default(),
|
||||
display::json::Informant::new(config),
|
||||
trie_spec,
|
||||
)
|
||||
} else if args.flag_std_dump_json || args.flag_std_json {
|
||||
@@ -229,7 +233,7 @@ fn run_state_test(args: Args) {
|
||||
post_root,
|
||||
&env_info,
|
||||
transaction,
|
||||
display::std_json::Informant::err_only(),
|
||||
display::std_json::Informant::err_only(config),
|
||||
trie_spec,
|
||||
)
|
||||
} else if args.flag_std_out_only {
|
||||
@@ -241,7 +245,7 @@ fn run_state_test(args: Args) {
|
||||
post_root,
|
||||
&env_info,
|
||||
transaction,
|
||||
display::std_json::Informant::out_only(),
|
||||
display::std_json::Informant::out_only(config),
|
||||
trie_spec,
|
||||
)
|
||||
} else {
|
||||
@@ -253,7 +257,7 @@ fn run_state_test(args: Args) {
|
||||
post_root,
|
||||
&env_info,
|
||||
transaction,
|
||||
display::std_json::Informant::default(),
|
||||
display::std_json::Informant::new_default(config),
|
||||
trie_spec,
|
||||
)
|
||||
}
|
||||
@@ -266,7 +270,7 @@ fn run_state_test(args: Args) {
|
||||
post_root,
|
||||
&env_info,
|
||||
transaction,
|
||||
display::simple::Informant::default(),
|
||||
display::simple::Informant::new(config),
|
||||
trie_spec,
|
||||
)
|
||||
}
|
||||
@@ -287,8 +291,16 @@ fn run_call<T: Informant>(args: Args, informant: T) {
|
||||
if code.is_none() && to == Address::default() {
|
||||
die("Either --code or --to is required.");
|
||||
}
|
||||
|
||||
let mut params = ActionParams::default();
|
||||
if spec.engine.params().eip2929_transition == 0 {
|
||||
params.access_list.enable();
|
||||
params.access_list.insert_address(from);
|
||||
params.access_list.insert_address(to);
|
||||
for (builtin, _) in spec.engine.builtins() {
|
||||
params.access_list.insert_address(*builtin);
|
||||
}
|
||||
}
|
||||
|
||||
params.call_type = if code.is_none() {
|
||||
CallType::Call
|
||||
} else {
|
||||
@@ -331,6 +343,8 @@ struct Args {
|
||||
flag_std_dump_json: bool,
|
||||
flag_std_err_only: bool,
|
||||
flag_std_out_only: bool,
|
||||
flag_omit_storage_output: bool,
|
||||
flag_omit_memory_output: bool,
|
||||
}
|
||||
|
||||
impl Args {
|
||||
@@ -378,13 +392,24 @@ impl Args {
|
||||
|
||||
pub fn spec(&self) -> Result<spec::Spec, String> {
|
||||
Ok(match self.flag_chain {
|
||||
Some(ref filename) => {
|
||||
let file = fs::File::open(filename).map_err(|e| format!("{}", e))?;
|
||||
spec::Spec::load(&::std::env::temp_dir(), file)?
|
||||
Some(ref spec_name) => {
|
||||
let fork_spec: Result<ethjson::spec::ForkSpec, _> =
|
||||
serde_json::from_str(&format!("{:?}", spec_name));
|
||||
if let Ok(fork_spec) = fork_spec {
|
||||
ethcore::client::EvmTestClient::spec_from_json(&fork_spec)
|
||||
.expect("this forkspec is not defined")
|
||||
} else {
|
||||
let file = fs::File::open(spec_name).map_err(|e| format!("{}", e))?;
|
||||
spec::Spec::load(&::std::env::temp_dir(), file)?
|
||||
}
|
||||
}
|
||||
None => ethcore::ethereum::new_foundation(&::std::env::temp_dir()),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn config(&self) -> display::config::Config {
|
||||
display::config::Config::new(self.flag_omit_storage_output, self.flag_omit_memory_output)
|
||||
}
|
||||
}
|
||||
|
||||
fn arg<T>(v: Result<T, String>, param: &str) -> T {
|
||||
@@ -248,7 +248,7 @@ usage! {
|
||||
|
||||
ARG arg_chain: (String) = "foundation", or |c: &Config| c.parity.as_ref()?.chain.clone(),
|
||||
"--chain=[CHAIN]",
|
||||
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or ethereum, poacore, xdai, volta, ewc, musicoin, ellaism, mix, callisto, morden, ropsten, kovan, rinkeby, goerli, poasokol, testnet, or dev.",
|
||||
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or ethereum, poacore, xdai, volta, ewc, musicoin, ellaism, mix, callisto, morden, ropsten, kovan, rinkeby, goerli, poasokol, testnet, yolo3 or dev.",
|
||||
|
||||
ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| c.parity.as_ref()?.keys_path.clone(),
|
||||
"--keys-path=[PATH]",
|
||||
@@ -466,6 +466,10 @@ usage! {
|
||||
"--ws-max-connections=[CONN]",
|
||||
"Maximum number of allowed concurrent WebSockets JSON-RPC connections.",
|
||||
|
||||
ARG arg_ws_max_payload: (usize) = 5usize, or |c: &Config| c.websockets.as_ref()?.max_payload,
|
||||
"--ws-max-payload=[MB]",
|
||||
"Specify maximum size for WS JSON-RPC requests in megabytes.",
|
||||
|
||||
["Metrics"]
|
||||
FLAG flag_metrics: (bool) = false, or |c: &Config| c.metrics.as_ref()?.enable.clone(),
|
||||
"--metrics",
|
||||
@@ -706,7 +710,7 @@ usage! {
|
||||
"--stratum-secret=[STRING]",
|
||||
"Secret for authorizing Stratum server for peers.",
|
||||
|
||||
ARG arg_max_round_blocks_to_import: (usize) = 12usize, or |c: &Config| c.mining.as_ref()?.max_round_blocks_to_import.clone(),
|
||||
ARG arg_max_round_blocks_to_import: (usize) = 1usize, or |c: &Config| c.mining.as_ref()?.max_round_blocks_to_import.clone(),
|
||||
"--max-round-blocks-to-import=[S]",
|
||||
"Maximal number of blocks to import for each import round.",
|
||||
|
||||
@@ -903,6 +907,7 @@ struct Ws {
|
||||
origins: Option<Vec<String>>,
|
||||
hosts: Option<Vec<String>>,
|
||||
max_connections: Option<usize>,
|
||||
max_payload: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, PartialEq, Deserialize)]
|
||||
@@ -1323,6 +1328,7 @@ mod tests {
|
||||
arg_ws_origins: "none".into(),
|
||||
arg_ws_hosts: "none".into(),
|
||||
arg_ws_max_connections: 100,
|
||||
arg_ws_max_payload: 5,
|
||||
|
||||
// IPC
|
||||
flag_no_ipc: false,
|
||||
@@ -1386,7 +1392,7 @@ mod tests {
|
||||
arg_notify_work: Some("http://localhost:3001".into()),
|
||||
flag_refuse_service_transactions: false,
|
||||
flag_infinite_pending_block: false,
|
||||
arg_max_round_blocks_to_import: 12usize,
|
||||
arg_max_round_blocks_to_import: 1usize,
|
||||
|
||||
flag_stratum: false,
|
||||
arg_stratum_interface: "local".to_owned(),
|
||||
@@ -1512,6 +1518,7 @@ mod tests {
|
||||
origins: Some(vec!["none".into()]),
|
||||
hosts: None,
|
||||
max_connections: None,
|
||||
max_payload: None,
|
||||
}),
|
||||
rpc: Some(Rpc {
|
||||
disable: Some(true),
|
||||
@@ -518,10 +518,8 @@ impl Configuration {
|
||||
}
|
||||
|
||||
fn ip_filter(&self) -> Result<IpFilter, String> {
|
||||
match IpFilter::parse(self.args.arg_allow_ips.as_str()) {
|
||||
Ok(allow_ip) => Ok(allow_ip),
|
||||
Err(_) => Err("Invalid IP filter value".to_owned()),
|
||||
}
|
||||
IpFilter::parse(self.args.arg_allow_ips.as_str())
|
||||
.map_err(|_| "Invalid IP filter value".to_owned())
|
||||
}
|
||||
|
||||
fn min_peers(&self) -> u32 {
|
||||
@@ -951,6 +949,7 @@ impl Configuration {
|
||||
signer_path: self.directories().signer.into(),
|
||||
support_token_api,
|
||||
max_connections: self.args.arg_ws_max_connections,
|
||||
max_payload: self.args.arg_ws_max_payload,
|
||||
};
|
||||
|
||||
Ok(conf)
|
||||
@@ -1369,7 +1368,7 @@ mod tests {
|
||||
check_seal: true,
|
||||
with_color: !cfg!(windows),
|
||||
verifier_settings: Default::default(),
|
||||
max_round_blocks_to_import: 12,
|
||||
max_round_blocks_to_import: 1,
|
||||
}))
|
||||
);
|
||||
}
|
||||
@@ -1395,7 +1394,7 @@ mod tests {
|
||||
from_block: BlockId::Number(1),
|
||||
to_block: BlockId::Latest,
|
||||
check_seal: true,
|
||||
max_round_blocks_to_import: 12,
|
||||
max_round_blocks_to_import: 1,
|
||||
}))
|
||||
);
|
||||
}
|
||||
@@ -1423,7 +1422,7 @@ mod tests {
|
||||
code: true,
|
||||
min_balance: None,
|
||||
max_balance: None,
|
||||
max_round_blocks_to_import: 12,
|
||||
max_round_blocks_to_import: 1,
|
||||
}))
|
||||
);
|
||||
}
|
||||
@@ -1456,7 +1455,7 @@ mod tests {
|
||||
from_block: BlockId::Number(1),
|
||||
to_block: BlockId::Latest,
|
||||
check_seal: true,
|
||||
max_round_blocks_to_import: 12,
|
||||
max_round_blocks_to_import: 1,
|
||||
}))
|
||||
);
|
||||
}
|
||||
@@ -1483,6 +1482,7 @@ mod tests {
|
||||
signer_path: expected.into(),
|
||||
support_token_api: true,
|
||||
max_connections: 100,
|
||||
max_payload: 5,
|
||||
},
|
||||
LogConfig {
|
||||
color: !cfg!(windows),
|
||||
@@ -1550,7 +1550,7 @@ mod tests {
|
||||
download_old_blocks: true,
|
||||
verifier_settings: Default::default(),
|
||||
no_persistent_txqueue: false,
|
||||
max_round_blocks_to_import: 12,
|
||||
max_round_blocks_to_import: 1,
|
||||
metrics_conf: MetricsConfiguration::default(),
|
||||
};
|
||||
expected.secretstore_conf.enabled = cfg!(feature = "secretstore");
|
||||
@@ -105,10 +105,10 @@ pub fn to_block_id(s: &str) -> Result<BlockId, String> {
|
||||
pub fn to_u256(s: &str) -> Result<U256, String> {
|
||||
if let Ok(decimal) = U256::from_dec_str(s) {
|
||||
Ok(decimal)
|
||||
} else if let Ok(hex) = clean_0x(s).parse() {
|
||||
Ok(hex)
|
||||
} else {
|
||||
Err(format!("Invalid numeric value: {}", s))
|
||||
clean_0x(s)
|
||||
.parse()
|
||||
.map_err(|_| format!("Invalid numeric value: {}", s))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,15 +171,12 @@ pub fn to_price(s: &str) -> Result<f32, String> {
|
||||
}
|
||||
|
||||
pub fn join_set(set: Option<&HashSet<String>>) -> Option<String> {
|
||||
match set {
|
||||
Some(s) => Some(
|
||||
s.iter()
|
||||
.map(|s| s.as_str())
|
||||
.collect::<Vec<&str>>()
|
||||
.join(","),
|
||||
),
|
||||
None => None,
|
||||
}
|
||||
set.map(|s| {
|
||||
s.iter()
|
||||
.map(|s| s.as_str())
|
||||
.collect::<Vec<&str>>()
|
||||
.join(",")
|
||||
})
|
||||
}
|
||||
|
||||
/// Flush output buffer.
|
||||
@@ -92,7 +92,7 @@ impl CacheSizes {
|
||||
|
||||
pub struct SyncInfo {
|
||||
last_imported_block_number: BlockNumber,
|
||||
last_imported_old_block_number: Option<BlockNumber>,
|
||||
last_imported_ancient_number: Option<BlockNumber>,
|
||||
num_peers: usize,
|
||||
max_peers: u32,
|
||||
snapshot_sync: bool,
|
||||
@@ -160,7 +160,7 @@ impl InformantData for FullNodeInformantData {
|
||||
last_imported_block_number: status
|
||||
.last_imported_block_number
|
||||
.unwrap_or(chain_info.best_block_number),
|
||||
last_imported_old_block_number: status.last_imported_old_block_number,
|
||||
last_imported_ancient_number: status.last_imported_old_block_number,
|
||||
num_peers: status.num_peers,
|
||||
max_peers: status
|
||||
.current_max_peers(*num_peers_range.start(), *num_peers_range.end()),
|
||||
@@ -224,7 +224,14 @@ impl<T: InformantData> Informant<T> {
|
||||
|
||||
pub fn tick(&self) {
|
||||
let now = Instant::now();
|
||||
let elapsed = now.duration_since(*self.last_tick.read());
|
||||
let elapsed;
|
||||
{
|
||||
let last_tick = self.last_tick.read();
|
||||
if now < *last_tick + Duration::from_millis(1500) {
|
||||
return;
|
||||
}
|
||||
elapsed = now - *last_tick;
|
||||
}
|
||||
|
||||
let (client_report, full_report) = {
|
||||
let last_report = self.last_report.lock();
|
||||
@@ -265,7 +272,7 @@ impl<T: InformantData> Informant<T> {
|
||||
false => t,
|
||||
};
|
||||
|
||||
info!(target: "import", "{} {} {} {}",
|
||||
info!(target: "import", "{}{} {} {} {}",
|
||||
match importing {
|
||||
true => match snapshot_sync {
|
||||
false => format!("Syncing {} {} {} {}+{} Qed",
|
||||
@@ -301,18 +308,22 @@ impl<T: InformantData> Informant<T> {
|
||||
},
|
||||
false => String::new(),
|
||||
},
|
||||
match chain_info.ancient_block_number {
|
||||
Some(ancient_number) => format!(" Ancient:#{}", ancient_number),
|
||||
None => String::new(),
|
||||
},
|
||||
match sync_info.as_ref() {
|
||||
Some(ref sync_info) => format!("{}{}/{} peers",
|
||||
match importing {
|
||||
true => format!("{}",
|
||||
if self.target.executes_transactions() {
|
||||
paint(Green.bold(), format!("{:>8} ", format!("#{}", sync_info.last_imported_block_number)))
|
||||
paint(Green.bold(), format!("{:>8} ", format!("LI:#{}", sync_info.last_imported_block_number)))
|
||||
} else {
|
||||
String::new()
|
||||
}
|
||||
),
|
||||
false => match sync_info.last_imported_old_block_number {
|
||||
Some(number) => format!("{} ", paint(Yellow.bold(), format!("{:>8}", format!("#{}", number)))),
|
||||
false => match sync_info.last_imported_ancient_number {
|
||||
Some(number) => format!("{} ", paint(Yellow.bold(), format!("{:>8}", format!("AB:#{}", number)))),
|
||||
None => String::new(),
|
||||
}
|
||||
},
|
||||
@@ -336,6 +347,7 @@ impl<T: InformantData> Informant<T> {
|
||||
}
|
||||
|
||||
impl ChainNotify for Informant<FullNodeInformantData> {
|
||||
// t_nb 11.2 Informant. Prints new block inclusiong to console/log.
|
||||
fn new_blocks(&self, new_blocks: NewBlocks) {
|
||||
if new_blocks.has_more_blocks_to_import {
|
||||
return;
|
||||
@@ -67,7 +67,6 @@ extern crate parity_rpc;
|
||||
extern crate parity_runtime;
|
||||
extern crate parity_version;
|
||||
extern crate prometheus;
|
||||
extern crate registrar;
|
||||
extern crate stats;
|
||||
|
||||
#[macro_use]
|
||||
@@ -157,10 +157,11 @@ pub fn setup_log(config: &Config) -> Result<Arc<RotatingLogger>, String> {
|
||||
Ok(logs)
|
||||
})
|
||||
// couldn't create new logger - try to fall back on previous logger.
|
||||
.or_else(|err| match ROTATING_LOGGER.lock().upgrade() {
|
||||
Some(l) => Ok(l),
|
||||
// no previous logger. fatal.
|
||||
None => Err(format!("{:?}", err)),
|
||||
.or_else(|err| {
|
||||
ROTATING_LOGGER
|
||||
.lock()
|
||||
.upgrade()
|
||||
.ok_or_else(|| format!("{:?}", err))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ pub enum SpecType {
|
||||
Rinkeby,
|
||||
Goerli,
|
||||
Sokol,
|
||||
Yolo3,
|
||||
Dev,
|
||||
Custom(String),
|
||||
}
|
||||
@@ -81,6 +82,7 @@ impl str::FromStr for SpecType {
|
||||
"rinkeby" => SpecType::Rinkeby,
|
||||
"goerli" | "görli" | "testnet" => SpecType::Goerli,
|
||||
"sokol" | "poasokol" => SpecType::Sokol,
|
||||
"yolo3" => SpecType::Yolo3,
|
||||
"dev" => SpecType::Dev,
|
||||
other => SpecType::Custom(other.into()),
|
||||
};
|
||||
@@ -106,6 +108,7 @@ impl fmt::Display for SpecType {
|
||||
SpecType::Rinkeby => "rinkeby",
|
||||
SpecType::Goerli => "goerli",
|
||||
SpecType::Sokol => "sokol",
|
||||
SpecType::Yolo3 => "yolo3",
|
||||
SpecType::Dev => "dev",
|
||||
SpecType::Custom(ref custom) => custom,
|
||||
})
|
||||
@@ -131,6 +134,7 @@ impl SpecType {
|
||||
SpecType::Rinkeby => Ok(ethereum::new_rinkeby(params)),
|
||||
SpecType::Goerli => Ok(ethereum::new_goerli(params)),
|
||||
SpecType::Sokol => Ok(ethereum::new_sokol(params)),
|
||||
SpecType::Yolo3 => Ok(ethereum::new_yolo3(params)),
|
||||
SpecType::Dev => Ok(Spec::new_instant()),
|
||||
SpecType::Custom(ref filename) => {
|
||||
let file = fs::File::open(filename).map_err(|e| {
|
||||
@@ -97,6 +97,7 @@ pub struct WsConfiguration {
|
||||
pub hosts: Option<Vec<String>>,
|
||||
pub signer_path: PathBuf,
|
||||
pub support_token_api: bool,
|
||||
pub max_payload: usize,
|
||||
}
|
||||
|
||||
impl Default for WsConfiguration {
|
||||
@@ -116,6 +117,7 @@ impl Default for WsConfiguration {
|
||||
hosts: Some(Vec::new()),
|
||||
signer_path: replace_home(&data_dir, "$BASE/signer").into(),
|
||||
support_token_api: true,
|
||||
max_payload: 5,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -194,6 +196,7 @@ pub fn new_ws<D: rpc_apis::Dependencies>(
|
||||
rpc::WsExtractor::new(path.clone()),
|
||||
rpc::WsExtractor::new(path.clone()),
|
||||
rpc::WsStats::new(deps.stats.clone()),
|
||||
conf.max_payload,
|
||||
);
|
||||
|
||||
// match start_result {
|
||||
@@ -34,7 +34,7 @@ use ethcore::{
|
||||
};
|
||||
use ethcore_logger::{Config as LogConfig, RotatingLogger};
|
||||
use ethcore_service::ClientService;
|
||||
use ethereum_types::H256;
|
||||
use ethereum_types::{H256, U64};
|
||||
use helpers::{execute_upgrades, passwords_from_files, to_client_config};
|
||||
use informant::{FullNodeInformantData, Informant};
|
||||
use journaldb::Algorithm;
|
||||
@@ -227,12 +227,10 @@ pub fn execute(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<RunningClient
|
||||
Some(id) => id,
|
||||
None => spec.network_id(),
|
||||
};
|
||||
if spec.subprotocol_name().len() != 3 {
|
||||
warn!("Your chain specification's subprotocol length is not 3. Ignoring.");
|
||||
if spec.subprotocol_name().len() > 8 {
|
||||
warn!("Your chain specification's subprotocol length is more then 8. Ignoring.");
|
||||
} else {
|
||||
sync_config
|
||||
.subprotocol_name
|
||||
.clone_from_slice(spec.subprotocol_name().as_bytes());
|
||||
sync_config.subprotocol_name = U64::from(spec.subprotocol_name().as_bytes())
|
||||
}
|
||||
|
||||
sync_config.fork_block = spec.fork_block();
|
||||
@@ -11,7 +11,7 @@ eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1", rev = "c
|
||||
ethereum-types = "0.4"
|
||||
lazy_static = "1.0"
|
||||
log = "0.4"
|
||||
memzero = { path = "../../util/memzero" }
|
||||
memzero = { path = "../../../crates/util/memzero" }
|
||||
parity-wordlist = "1.3"
|
||||
quick-error = "1.2.2"
|
||||
rand = "0.4"
|
||||
@@ -25,10 +25,7 @@ impl Generator for Random {
|
||||
|
||||
fn generate(&mut self) -> Result<KeyPair, Self::Error> {
|
||||
let mut rng = OsRng::new()?;
|
||||
match rng.generate() {
|
||||
Ok(pair) => Ok(pair),
|
||||
Err(void) => match void {}, // LLVM unreachable
|
||||
}
|
||||
rng.generate().or_else(|void| match void {})
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user