Compare commits

...

10 Commits

Author SHA1 Message Date
Andronik Ordian
badb04502f [evmbin] fix build (#11095) 2019-09-26 14:47:28 +02:00
s3krit
a44fad04fa Update CHANGELOG.md and version (#11094)
* Update CHANGELOG.md and version
2019-09-26 12:12:59 +02:00
s3krit
7ae5d8ebdc v2.6.4-beta (#11090)
* ethcore/res: activate Istanbul on Ropsten, Görli, Rinkeby, Kovan (#11068)

* ethcore/res: activate Istanbul on Ropsten block 6485846

* ethcore/res: activate Istanbul on Goerli block 1561651

* ethcore/res: use hex values for Istanbul specs

* ethcore/res: fix trailing comma

* ethcore/res: be pedantic about EIP-1283 in Petersburg and Istanbul test specs

* ethcore/res: activate Istanbul on Rinkeby block 5435345

* ethcore/res: activate Istanbul on Kovan block 14111141

* ethcore/res: fix kovan istanbul number to 0xd751a5

* cleanup json crate (#11027)

* [json]: cleanup

write something here....

* nit: commit new/moved files

* nit: remove needless features

* nits

* fix(grumbles): use explicit import `DifficultyTest`

* fix(grumbles): remove needless type hints

* fix(grumble): docs `from -> used by`

Co-Authored-By: David <dvdplm@gmail.com>

* fix(grumbles): use explicit `imports`

* fix(grumble): merge `tx` and `tx_with_signing_info`

* fix(grumbles): resolve introduced `TODO's`

* [json-spec] make blake2 pricing spec more readable (#11034)

* [json-spec] make blake2 pricing spec more readable

* [ethcore] fix compilation

* Update JSON tests to d4f86ecf4aa7c (#11054)

* new ethereum consensus tests, #10908

* Update JSON tests to 725dbc73a

This PR reverts the controversial changes of the previous PR and skips the failing tests.

Maybe I misunderstand the suggested workaround of putting the fix under `#[cfg(test)]` but it seems odd to run different code in production than we run in tests. Instead here I suggest we skip the failing tests with the argument that we do not wish to fix this issue (at least not at this time) because it does not affect us. If I am wrong, and I likely am, I look forward to hearing why and what a better approach to updating the state tests is.

Branched off https://github.com/paritytech/parity-ethereum/pull/10923

ref #10908

* Update json test commit to 1dc9d20e97165708f7db0bbf2d1a87a6b4285827

* Fail with error message

* Handle missing r, s, v params in json tests
Light cleanup of json test runner

* Include the path to the test file

* Handle new `postState` format: string or map
Sort out tests
Missing docs

* WIP

* Include test-helpers from ethjson

* Sort out new paths

* Remove dead code

* Fix warnings stemming from code called only from macros
Skip failing tests in stRevert/ and stTransactionTest/ (too course a filter!)
Docs and light touch refactorings for readability

* Skip all failing tests

* Document the single-test-skipping madness

* Update tests to latest commit on the `develop` branch

* Rename test skipping types to reflect actual purpose

* Switch to skipping individual tests in currents.json
Add some logging to help debug skipping

* Fix rpc test by curve fitting to new json test source file

* Add refs to all issues for fixing failing&skipped json tests

* Sort out the need for Clone for tests

* [json-tests] populate state from genesis pod state (#11083)

* [json-tests] populate state from genesis pod state

* [json-tests] #11075 is resolved as well

* [json-tests] #11076 hopefully too

* [json-tests] #11077 🎉

* [json-tests] fix trailing comma

* Update ethcore/src/json_tests/chain.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Add issue numbers to TODOs

* Apply @ordians fix for wrong state_root

* Warn on invalid RLP

* Remove the `ci-skip-tests` feature
2019-09-26 11:04:00 +02:00
s3krit
b7b1484f2e update CHANGELOG.md (#11058) 2019-09-16 12:13:45 +02:00
s3krit
da8c4df8cc v2.6.3-beta (rev2) (#11050)
* EIP 1884 Re-pricing of trie-size dependent operations  (#10992)
* Implement EIP-1283 reenable transition, EIP-1706 and EIP-2200  (#10191)
2019-09-13 14:55:43 +02:00
David
06287c478a ethcore: remove test-helper feat from build (#11047) (#11049) 2019-09-13 11:53:31 +02:00
s3krit
6ad6c3cbf9 v2.6.3-beta (#11040)
* add more tx tests (#11038)
* Fix parallel transactions race-condition (#10995)
* Add blake2_f precompile (#11017)
* [trace] introduce trace failed to Ext (#11019)
* Edit publish-onchain.sh to use https (#11016)
* Fix deadlock in network-devp2p (#11013)
* EIP 1108: Reduce alt_bn128 precompile gas costs (#11008)
* xDai chain support and nodes list update (#10989)
* EIP 2028: transaction gas lowered from 68 to 16 (#10987)
* EIP-1344 Add CHAINID op-code (#10983)
* manual publish jobs for releases, no changes for nightlies (#10977)
* [blooms-db] Fix benchmarks (#10974)
* Verify transaction against its block during import (#10954)
* Better error message for rpc gas price errors (#10931)
* Fix fork choice (#10837)
* Fix compilation on recent nightlies (#10991)
2019-09-12 18:04:58 +02:00
s3krit
25936ae0f6 v2.6.2 beta (#11007)
* [trace] check mem diff within range (#11002)

* Update version (v2.6.2-beta)

* bump spin to 0.5.2 (#10996)

patch vulnerability https://github.com/RustSec/advisory-db/pull/132
2019-08-29 13:03:12 +02:00
s3krit
7bfbe41c72 2.6.1-beta (#10973)
* Add support for Energy Web Foundation's new chains (#10957)                                                                                                                                  
  * Kaspersky AV whitelisting (#10919)                                                                                                                                                           
  * Avast whitelist script (#10900)                                                                                                                                                              
  * Docker images renaming (#10863)                                                                                                                                                              
  * Remove excessive warning (#10831)                                                                                                                                                            
  * Allow --nat extip:your.host.here.org (#10830)                                                                                                                                                
  * When updating the client or when called from RPC, sleep should mean sleep (#10814)                                                                                                           
  * added new ropsten-bootnode and removed old one (#10794)                                                      
  * ethkey no longer uses byteorder (#10786)                                                            
  * docs: Update Readme with TOC, Contributor Guideline. Update Cargo package descriptions (#10652)
2019-08-14 18:29:48 +02:00
s3krit
e38293b085 version: betalise v2.6 (#10859) 2019-07-08 13:24:25 +02:00
170 changed files with 4789 additions and 2388 deletions

View File

@@ -13,10 +13,6 @@ variables:
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache" SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
CARGO_TARGET: x86_64-unknown-linux-gnu CARGO_TARGET: x86_64-unknown-linux-gnu
.no_git: &no_git # disable git strategy
variables:
GIT_STRATEGY: none
GIT_SUBMODULE_STRATEGY: none
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries") .releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
only: &releaseable_branches only: &releaseable_branches
@@ -46,7 +42,7 @@ variables:
sccache --start-server sccache --start-server
- sccache -s - sccache -s
after_script: after_script:
# sccache debug info # sccache debug info
- if test -e sccache_debug.log; - if test -e sccache_debug.log;
then then
echo "_____All crate-types:_____"; echo "_____All crate-types:_____";
@@ -147,7 +143,7 @@ test-linux-nightly:
build-android: build-android:
<<: *build-on-linux <<: *build-on-linux
image: parity/rust-parity-ethereum-android-build:stretch image: parity/parity-ci-android:stretch
variables: variables:
CARGO_TARGET: armv7-linux-androideabi CARGO_TARGET: armv7-linux-androideabi
@@ -158,21 +154,21 @@ build-linux:
build-linux-i386: build-linux-i386:
<<: *build-on-linux <<: *build-on-linux
only: *releaseable_branches only: *releaseable_branches
image: parity/rust-parity-ethereum-build:i386 image: parity/parity-ci-i386:latest
variables: variables:
CARGO_TARGET: i686-unknown-linux-gnu CARGO_TARGET: i686-unknown-linux-gnu
build-linux-arm64: build-linux-arm64:
<<: *build-on-linux <<: *build-on-linux
only: *releaseable_branches only: *releaseable_branches
image: parity/rust-parity-ethereum-build:arm64 image: parity/parity-ci-arm64:latest
variables: variables:
CARGO_TARGET: aarch64-unknown-linux-gnu CARGO_TARGET: aarch64-unknown-linux-gnu
build-linux-armhf: build-linux-armhf:
<<: *build-on-linux <<: *build-on-linux
only: *releaseable_branches only: *releaseable_branches
image: parity/rust-parity-ethereum-build:armhf image: parity/parity-ci-armhf:latest
variables: variables:
CARGO_TARGET: armv7-unknown-linux-gnueabihf CARGO_TARGET: armv7-unknown-linux-gnueabihf
@@ -205,11 +201,10 @@ build-windows:
publish-docker: publish-docker:
stage: publish stage: publish
<<: *no_git
only: *releaseable_branches only: *releaseable_branches
except: except:
variables: - nightly
- $SCHEDULE_TAG == "nightly" when: manual
dependencies: dependencies:
- build-linux - build-linux
environment: environment:
@@ -219,23 +214,24 @@ publish-docker:
services: services:
- docker:dind - docker:dind
variables: variables:
GIT_STRATEGY: none
DOCKER_HOST: tcp://localhost:2375 DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
GIT_STRATEGY: none GIT_STRATEGY: none
# DOCKERFILE: tools/Dockerfile # DOCKERFILE: tools/Dockerfile
# CONTAINER_IMAGE: parity/parity # CONTAINER_IMAGE: parity/parity
script: script:
# we stopped pushing nightlies to dockerhub, will push to own registry prb.
- ./tools/publish-docker.sh - ./tools/publish-docker.sh
tags: tags:
- kubernetes-parity-build - kubernetes-parity-build
publish-snap: &publish-snap publish-snap-nightly: &publish-snap
stage: publish stage: publish
<<: *no_git only:
only: *releaseable_branches - nightly
image: snapcore/snapcraft image: snapcore/snapcraft
variables: variables:
GIT_STRATEGY: none
BUILD_ARCH: amd64 BUILD_ARCH: amd64
cache: {} cache: {}
dependencies: dependencies:
@@ -245,7 +241,12 @@ publish-snap: &publish-snap
script: script:
- ./tools/publish-snap.sh - ./tools/publish-snap.sh
publish-snap-i386: publish-snap-manually:
<<: *publish-snap
only: *releaseable_branches
when: manual
publish-snap-i386-nightly: &publish-snap-i386
<<: *publish-snap <<: *publish-snap
variables: variables:
BUILD_ARCH: i386 BUILD_ARCH: i386
@@ -253,7 +254,12 @@ publish-snap-i386:
dependencies: dependencies:
- build-linux-i386 - build-linux-i386
publish-snap-arm64: publish-snap-i386-manually:
<<: *publish-snap-i386
only: *releaseable_branches
when: manual
publish-snap-arm64-nightly: &publish-snap-arm64
<<: *publish-snap <<: *publish-snap
variables: variables:
BUILD_ARCH: arm64 BUILD_ARCH: arm64
@@ -261,7 +267,12 @@ publish-snap-arm64:
dependencies: dependencies:
- build-linux-arm64 - build-linux-arm64
publish-snap-armhf: publish-snap-arm64-manually:
<<: *publish-snap-arm64
only: *releaseable_branches
when: manual
publish-snap-armhf-nightly: &publish-snap-armhf
<<: *publish-snap <<: *publish-snap
variables: variables:
BUILD_ARCH: armhf BUILD_ARCH: armhf
@@ -269,11 +280,18 @@ publish-snap-armhf:
dependencies: dependencies:
- build-linux-armhf - build-linux-armhf
publish-onchain: publish-snap-armhf-manually:
stage: publish <<: *publish-snap-armhf
<<: *no_git
only: *releaseable_branches only: *releaseable_branches
when: manual
publish-onchain-nightly: &publish-onchain
stage: publish
only:
- nightly
cache: {} cache: {}
variables:
GIT_STRATEGY: none
dependencies: dependencies:
- build-linux - build-linux
- build-darwin - build-darwin
@@ -283,11 +301,18 @@ publish-onchain:
tags: tags:
- linux-docker - linux-docker
publish-awss3-release: publish-onchain-manually:
<<: *publish-onchain
only: *releaseable_branches
when: manual
publish-release-awss3-nightly: &publish-release-awss3
image: parity/awscli:latest image: parity/awscli:latest
stage: publish stage: publish
only: *releaseable_branches only:
<<: *no_git - nightly
variables:
GIT_STRATEGY: none
cache: {} cache: {}
dependencies: dependencies:
- build-linux - build-linux
@@ -309,17 +334,39 @@ publish-awss3-release:
tags: tags:
- linux-docker - linux-docker
publish-release-awss3-manually:
<<: *publish-release-awss3
only: *releaseable_branches
when: manual
publish-docs: publish-docs:
stage: publish stage: publish
image: parity/rust-parity-ethereum-docs:xenial image: parity/parity-ci-docs:latest
only: only:
- tags - tags
except: except:
- nightly - nightly
cache: {} when: manual
dependencies: [] cache: {}
dependencies: []
script: script:
- scripts/gitlab/publish-docs.sh - scripts/gitlab/publish-docs.sh
tags: tags:
- linux-docker - linux-docker
allow_failure: true allow_failure: true
publish-av-whitelist:
stage: publish
variables:
GIT_STRATEGY: none
only: *releaseable_branches
except:
- nightly
when: manual
cache: {}
dependencies:
- build-windows
script:
- scripts/gitlab/publish-av-whitelists.sh
tags:
- linux-docker

View File

@@ -1,151 +1,216 @@
## Parity-Ethereum [v2.4.3](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.3) (2019-03-22) ## Parity-Ethereum [v2.6.4](https://github.com/paritytech/parity-ethereum/releases/tag/v2.6.3)
Parity-Ethereum 2.4.3-beta is a bugfix release that improves performance and stability. This patch release contains a critical bug fix where serving light clients previously led to client crashes. Upgrading is highly recommended. Parity Ethereum v2.6.4-stable is a patch release that adds the block numbers for activating the Istanbul hardfork on test networks: Ropsten, Görli, Rinkeby and Kovan.
A full list of included changes:
* ethcore/res: activate Istanbul on Ropsten, Görli, Rinkeby, Kovan (#11068)
* cleanup json crate (#11027)
* [json-spec] make blake2 pricing spec more readable (#11034)
* Update JSON tests to d4f86ecf4aa7c (#11054)
## Parity-Ethereum [v2.6.3](https://github.com/paritytech/parity-ethereum/releases/tag/v2.6.3)
Parity Ethereum v2.6.3-stable is a patch release that improves security, stability and performance.
* The most noteworthy improvement in this release is incorporating all the EIPs required for the Istanbul hard fork.
* This release also fixes certain security and performance issues, one of which was suspected to be consensus-threatening but turned out to be benign. Thanks to Martin Holst Swende and Felix Lange from the Ethereum Foundation for bringing the suspicious issue to our attention.
The full list of included changes: The full list of included changes:
- 2.4.3 beta backports ([#10508](https://github.com/paritytech/parity-ethereum/pull/10508))
- Version: bump beta
- Add additional request tests ([#10503](https://github.com/paritytech/parity-ethereum/pull/10503))
## Parity-Ethereum [v2.4.2](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.2) (2019-03-20) * add more tx tests (#11038)
* Fix parallel transactions race-condition (#10995)
* Add blake2_f precompile (#11017)
* [trace] introduce trace failed to Ext (#11019)
* Edit publish-onchain.sh to use https (#11016)
* Fix deadlock in network-devp2p (#11013)
* EIP 1108: Reduce alt_bn128 precompile gas costs (#11008)
* xDai chain support and nodes list update (#10989)
* EIP 2028: transaction gas lowered from 68 to 16 (#10987)
* EIP-1344 Add CHAINID op-code (#10983)
* manual publish jobs for releases, no changes for nightlies (#10977)
* [blooms-db] Fix benchmarks (#10974)
* Verify transaction against its block during import (#10954)
* Better error message for rpc gas price errors (#10931)
* Fix fork choice (#10837)
* Fix compilation on recent nightlies (#10991)
* Don't build rpc with ethcore test-helpers (#11048)
* EIP 1884 Re-pricing of trie-size dependent operations (#10992)
* Implement EIP-1283 reenable transition, EIP-1706 and EIP-2200 (#10191)
Parity-Ethereum 2.4.2-beta is a bugfix release that improves performance and stability. ## Parity-Ethereum [v2.6.2](https://github.com/paritytech/parity-ethereum/releases/tag/v2.6.2)
Parity Ethereum v2.6.2-stable is a bugfix release that fixes a potential DoS attack in the trace_call RPC method. This is a critical upgrade for anyone running Parity nodes with RPC exposed to the public internet (and highly recommended for anyone else). For details see this blog post.
## Parity-Ethereum [v2.6.1](https://github.com/paritytech/parity-ethereum/releases/tag/v2.6.1)
Parity-Ethereum 2.6.1-beta is a patch release that improves stability.
This release includes:
* Allow specifying hostnames for node URLs
* Fix a bug where archive nodes were losing peers
* Add support for Energy Web Foundations new chains 'Volta' and 'EWC', and remove their deprecated 'Tobalaba' chain.
The full list of included changes: The full list of included changes:
- 2.4.2 beta backports ([#10488](https://github.com/paritytech/parity-ethereum/pull/10488)) * Add support for Energy Web Foundation's new chains (#10957)
- Version: bump beta * Kaspersky AV whitelisting (#10919)
- Сaching through docker volume ([#10477](https://github.com/paritytech/parity-ethereum/pull/10477)) * Avast whitelist script (#10900)
- fix win&mac build ([#10486](https://github.com/paritytech/parity-ethereum/pull/10486)) * Docker images renaming (#10863)
- fix(extract `timestamp_checked_add` as lib) ([#10383](https://github.com/paritytech/parity-ethereum/pull/10383)) * Remove excessive warning (#10831)
* Allow --nat extip:your.host.here.org (#10830)
* When updating the client or when called from RPC, sleep should mean sleep (#10814)
* added new ropsten-bootnode and removed old one (#10794)
* ethkey no longer uses byteorder (#10786)
* docs: Update Readme with TOC, Contributor Guideline. Update Cargo package descriptions (#10652)
## Parity-Ethereum [v2.4.1](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.1) (2019-03-19) ## Parity-Ethereum [v2.6.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.6.0)
Parity-Ethereum 2.4.1-beta is a bugfix release that improves performance and stability. Parity-Ethereum 2.6.0-beta is a minor release that stabilizes the 2.6 branch by
marking it as a beta release.
This release includes:
* Major refactoring of the codebase
* Many bugfixes
* Significant improvements to logging, error and warning message clarity.
* SecretStore: remove support of old database formats (#10757)
* This is a potentially breaking change if you have not upgraded for
quite some time.
As of today, Parity-Ethereum 2.4 reaches end of life, and everyone is
encouraged to upgrade.
The full list of included changes: The full list of included changes:
- 2.4.1 beta backports ([#10471](https://github.com/paritytech/parity-ethereum/pull/10471)) * update jsonrpc to 12.0 ([#10841](https://github.com/paritytech/parity-ethereum/pull/10841))
- Version: bump beta * Move more code into state-account ([#10840](https://github.com/paritytech/parity-ethereum/pull/10840))
- Implement parity_versionInfo & parity_setChain on LC; fix parity_setChain ([#10312](https://github.com/paritytech/parity-ethereum/pull/10312)) * Extract AccountDB to account-db ([#10839](https://github.com/paritytech/parity-ethereum/pull/10839))
- CI publish to aws ([#10446](https://github.com/paritytech/parity-ethereum/pull/10446)) * Extricate PodAccount and state Account to own crates ([#10838](https://github.com/paritytech/parity-ethereum/pull/10838))
- CI aws git checkout ([#10451](https://github.com/paritytech/parity-ethereum/pull/10451)) * Fix fork choice ([#10837](https://github.com/paritytech/parity-ethereum/pull/10837))
- Revert "CI aws git checkout ([#10451](https://github.com/paritytech/parity-ethereum/pull/10451))" ([#10456](https://github.com/paritytech/parity-ethereum/pull/10456)) * tests: Relates to #10655: Test instructions for Readme ([#10835](https://github.com/paritytech/parity-ethereum/pull/10835))
- Tests parallelized ([#10452](https://github.com/paritytech/parity-ethereum/pull/10452)) * idiomatic changes to PodState ([#10834](https://github.com/paritytech/parity-ethereum/pull/10834))
- Ensure static validator set changes are recognized ([#10467](https://github.com/paritytech/parity-ethereum/pull/10467)) * Break circular dependency between Client and Engine (part 1) ([#10833](https://github.com/paritytech/parity-ethereum/pull/10833))
* Remove excessive warning ([#10831](https://github.com/paritytech/parity-ethereum/pull/10831))
## Parity-Ethereum [v2.4.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.0) (2019-02-25) * Allow --nat extip:your.host.here.org ([#10830](https://github.com/paritytech/parity-ethereum/pull/10830))
* ethcore does not use byteorder ([#10829](https://github.com/paritytech/parity-ethereum/pull/10829))
Parity-Ethereum 2.4.0-beta is our trifortnightly minor version release coming with a lot of new features as well as bugfixes and performance improvements. * Fix typo in README.md ([#10828](https://github.com/paritytech/parity-ethereum/pull/10828))
* Update wordlist to v1.3 ([#10823](https://github.com/paritytech/parity-ethereum/pull/10823))
Notable changes: * bump `smallvec 0.6.10` to fix vulnerability ([#10822](https://github.com/paritytech/parity-ethereum/pull/10822))
- Account management is now deprecated ([#10213](https://github.com/paritytech/parity-ethereum/pull/10213)) * removed additional_params method ([#10818](https://github.com/paritytech/parity-ethereum/pull/10818))
- Local accounts can now be specified via CLI ([#9960](https://github.com/paritytech/parity-ethereum/pull/9960)) * Improve logging when remote peer is unknown ([#10817](https://github.com/paritytech/parity-ethereum/pull/10817))
- Chains can now be reset to a particular block via CLI ([#9782](https://github.com/paritytech/parity-ethereum/pull/9782)) * replace memzero with zeroize crate ([#10816](https://github.com/paritytech/parity-ethereum/pull/10816))
- Ethash now additionally implements ProgPoW ([#9762](https://github.com/paritytech/parity-ethereum/pull/9762)) * When updating the client or when called from RPC, sleep should mean sleep ([#10814](https://github.com/paritytech/parity-ethereum/pull/10814))
- The `eip1283DisableTransition` flag was added to revert EIP-1283 ([#10214](https://github.com/paritytech/parity-ethereum/pull/10214)) * Don't reimplement the logic from the Default impl ([#10813](https://github.com/paritytech/parity-ethereum/pull/10813))
* refactor: whisper: Add type aliases and update rustdocs in message.rs ([#10812](https://github.com/paritytech/parity-ethereum/pull/10812))
The full list of included changes: * test: whisper/cli `add invalid pool size test depending on processor` ([#10811](https://github.com/paritytech/parity-ethereum/pull/10811))
- More Backports for Beta 2.4.0 ([#10431](https://github.com/paritytech/parity-ethereum/pull/10431)) * Add Constantinople EIPs to the dev (instant_seal) config ([#10809](https://github.com/paritytech/parity-ethereum/pull/10809))
- Revert some changes, could be buggy ([#10399](https://github.com/paritytech/parity-ethereum/pull/10399)) * fix spurious test failure ([#10808](https://github.com/paritytech/parity-ethereum/pull/10808))
- Ci: clean up gitlab-ci.yml leftovers from previous merge ([#10429](https://github.com/paritytech/parity-ethereum/pull/10429)) * revert temp changes to .gitlab-ci.yml ([#10807](https://github.com/paritytech/parity-ethereum/pull/10807))
- 10000 > 5000 ([#10422](https://github.com/paritytech/parity-ethereum/pull/10422)) * removed redundant fmt::Display implementations ([#10806](https://github.com/paritytech/parity-ethereum/pull/10806))
- Fix underflow in pip, closes [#10419](https://github.com/paritytech/parity-ethereum/pull/10419) ([#10423](https://github.com/paritytech/parity-ethereum/pull/10423)) * removed EthEngine alias ([#10805](https://github.com/paritytech/parity-ethereum/pull/10805))
- Fix panic when logging directory does not exist, closes [#10420](https://github.com/paritytech/parity-ethereum/pull/10420) ([#10424](https://github.com/paritytech/parity-ethereum/pull/10424)) * ethcore-bloom-journal updated to 2018 ([#10804](https://github.com/paritytech/parity-ethereum/pull/10804))
- Update hardcoded headers for Foundation, Ropsten, Kovan and Classic ([#10417](https://github.com/paritytech/parity-ethereum/pull/10417)) * Fix a few typos and unused warnings. ([#10803](https://github.com/paritytech/parity-ethereum/pull/10803))
- Backports for Beta 2.4.0 ([#10416](https://github.com/paritytech/parity-ethereum/pull/10416)) * updated price-info to edition 2018 ([#10801](https://github.com/paritytech/parity-ethereum/pull/10801))
- No-git for publish jobs, empty artifacts dir ([#10393](https://github.com/paritytech/parity-ethereum/pull/10393)) * updated parity-local-store to edition 2018 ([#10800](https://github.com/paritytech/parity-ethereum/pull/10800))
- Snap: reenable i386, arm64, armhf architecture publishing ([#10386](https://github.com/paritytech/parity-ethereum/pull/10386)) * updated project to ansi_term 0.11 ([#10799](https://github.com/paritytech/parity-ethereum/pull/10799))
- Tx pool: always accept local transactions ([#10375](https://github.com/paritytech/parity-ethereum/pull/10375)) * ethcore-light uses bincode 1.1 ([#10798](https://github.com/paritytech/parity-ethereum/pull/10798))
- Fix to_pod storage trie value decoding ([#10368](https://github.com/paritytech/parity-ethereum/pull/10368)) * ethcore-network-devp2p uses igd 0.9 ([#10797](https://github.com/paritytech/parity-ethereum/pull/10797))
- Version: mark 2.4.0 beta * Better logging when backfilling ancient blocks fail ([#10796](https://github.com/paritytech/parity-ethereum/pull/10796))
- Update to latest mem-db, hash-db and trie-db. ([#10314](https://github.com/paritytech/parity-ethereum/pull/10314)) * added new ropsten-bootnode and removed old one ([#10794](https://github.com/paritytech/parity-ethereum/pull/10794))
- Tx pool: always accept local transactions ([#10375](https://github.com/paritytech/parity-ethereum/pull/10375)) * Removed machine abstraction from ethcore ([#10791](https://github.com/paritytech/parity-ethereum/pull/10791))
- Fix(trace_main! macro): don't re-export ([#10384](https://github.com/paritytech/parity-ethereum/pull/10384)) * Removed redundant ethcore-service error type ([#10788](https://github.com/paritytech/parity-ethereum/pull/10788))
- Exchanged old(azure) bootnodes with new(ovh) ones ([#10309](https://github.com/paritytech/parity-ethereum/pull/10309)) * Cleanup unused vm dependencies ([#10787](https://github.com/paritytech/parity-ethereum/pull/10787))
- Ethash: implement Progpow ([#9762](https://github.com/paritytech/parity-ethereum/pull/9762)) * ethkey no longer uses byteorder ([#10786](https://github.com/paritytech/parity-ethereum/pull/10786))
- Snap: add the removable-media plug ([#10377](https://github.com/paritytech/parity-ethereum/pull/10377)) * Updated blooms-db to rust 2018 and removed redundant deps ([#10785](https://github.com/paritytech/parity-ethereum/pull/10785))
- Add message to IO errors ([#10324](https://github.com/paritytech/parity-ethereum/pull/10324)) * Treat empty account the same as non-exist accounts in EIP-1052 ([#10775](https://github.com/paritytech/parity-ethereum/pull/10775))
- Chore(bump parity-daemonize): require rust >= 1.31 ([#10359](https://github.com/paritytech/parity-ethereum/pull/10359)) * Do not drop the peer with None difficulty ([#10772](https://github.com/paritytech/parity-ethereum/pull/10772))
- Secretstore: use in-memory transport in cluster tests ([#9850](https://github.com/paritytech/parity-ethereum/pull/9850)) * EIP-1702: Generalized Account Versioning Scheme ([#10771](https://github.com/paritytech/parity-ethereum/pull/10771))
- Add fields to `memzero`'s Cargo.toml ([#10362](https://github.com/paritytech/parity-ethereum/pull/10362)) * Move Engine::register_client to be before other I/O handler registration ([#10767](https://github.com/paritytech/parity-ethereum/pull/10767))
- Snap: release untagged versions from branches to the candidate snap channel ([#10357](https://github.com/paritytech/parity-ethereum/pull/10357)) * ethcore/res: activate atlantis classic hf on block 8772000 ([#10766](https://github.com/paritytech/parity-ethereum/pull/10766))
- Fix(compilation warns): `no-default-features` ([#10346](https://github.com/paritytech/parity-ethereum/pull/10346)) * Updated Bn128PairingImpl to use optimized batch pairing ([#10765](https://github.com/paritytech/parity-ethereum/pull/10765))
- No volumes are needed, just run -v volume:/path/in/the/container ([#10345](https://github.com/paritytech/parity-ethereum/pull/10345)) * Remove unused code ([#10762](https://github.com/paritytech/parity-ethereum/pull/10762))
- Fixed misstype ([#10351](https://github.com/paritytech/parity-ethereum/pull/10351)) * Initialize private tx logger only if private tx functionality is enabled ([#10758](https://github.com/paritytech/parity-ethereum/pull/10758))
- Snap: prefix version and populate candidate channel ([#10343](https://github.com/paritytech/parity-ethereum/pull/10343)) * SecretStore: remove support of old database formats ([#10757](https://github.com/paritytech/parity-ethereum/pull/10757))
- Bundle protocol and packet_id together in chain sync ([#10315](https://github.com/paritytech/parity-ethereum/pull/10315)) * Enable aesni ([#10756](https://github.com/paritytech/parity-ethereum/pull/10756))
- Role back docker build image and docker deploy image to ubuntu:xenial… ([#10338](https://github.com/paritytech/parity-ethereum/pull/10338)) * updater: fix static id hashes initialization ([#10755](https://github.com/paritytech/parity-ethereum/pull/10755))
- Change docker image based on debian instead of ubuntu due to the chan… ([#10336](https://github.com/paritytech/parity-ethereum/pull/10336)) * Use fewer threads for snapshotting ([#10752](https://github.com/paritytech/parity-ethereum/pull/10752))
- Don't add discovery initiators to the node table ([#10305](https://github.com/paritytech/parity-ethereum/pull/10305)) * Die error_chain, die ([#10747](https://github.com/paritytech/parity-ethereum/pull/10747))
- Fix(docker): fix not receives SIGINT ([#10059](https://github.com/paritytech/parity-ethereum/pull/10059)) * Fix deprectation warnings on nightly ([#10746](https://github.com/paritytech/parity-ethereum/pull/10746))
- Snap: official image / test ([#10168](https://github.com/paritytech/parity-ethereum/pull/10168)) * Improve logging and cleanup in miner around block sealing ([#10745](https://github.com/paritytech/parity-ethereum/pull/10745))
- Fix(add helper for timestamp overflows) ([#10330](https://github.com/paritytech/parity-ethereum/pull/10330)) * Add a way to signal shutdown to snapshotting threads ([#10744](https://github.com/paritytech/parity-ethereum/pull/10744))
- Additional error for invalid gas ([#10327](https://github.com/paritytech/parity-ethereum/pull/10327)) * fix docker tags for publishing ([#10741](https://github.com/paritytech/parity-ethereum/pull/10741))
- Revive parity_setMinGasPrice RPC call ([#10294](https://github.com/paritytech/parity-ethereum/pull/10294)) * refactor: Fix indentation in ethjson ([#10740](https://github.com/paritytech/parity-ethereum/pull/10740))
- Add Statetest support for Constantinople Fix ([#10323](https://github.com/paritytech/parity-ethereum/pull/10323)) * Log validator set changes in EpochManager ([#10734](https://github.com/paritytech/parity-ethereum/pull/10734))
- Fix(parity-clib): grumbles that were not addressed in [#9920](https://github.com/paritytech/parity-ethereum/pull/9920) ([#10154](https://github.com/paritytech/parity-ethereum/pull/10154)) * Print warnings when using dangerous settings for ValidatorSet ([#10733](https://github.com/paritytech/parity-ethereum/pull/10733))
- Fix(light-rpc): Make `light_sync` generic ([#10238](https://github.com/paritytech/parity-ethereum/pull/10238)) * ethcore: enable ECIP-1054 for classic ([#10731](https://github.com/paritytech/parity-ethereum/pull/10731))
- Fix publish job ([#10317](https://github.com/paritytech/parity-ethereum/pull/10317)) * Stop breaking out of loop if a non-canonical hash is found ([#10729](https://github.com/paritytech/parity-ethereum/pull/10729))
- Secure WS-RPC: grant access to all apis ([#10246](https://github.com/paritytech/parity-ethereum/pull/10246)) * Removed secret_store folder ([#10722](https://github.com/paritytech/parity-ethereum/pull/10722))
- Make specification of protocol in SyncRequester::send_request explicit ([#10295](https://github.com/paritytech/parity-ethereum/pull/10295)) * Revert "enable lto for release builds (#10717)" ([#10721](https://github.com/paritytech/parity-ethereum/pull/10721))
- Fix: parity-clib/examples/cpp/CMakeLists.txt ([#10313](https://github.com/paritytech/parity-ethereum/pull/10313)) * fix: aura don't add `SystemTime::now()` ([#10720](https://github.com/paritytech/parity-ethereum/pull/10720))
- Ci optimizations ([#10297](https://github.com/paritytech/parity-ethereum/pull/10297)) * Use RUSTFLAGS to set the optimization level ([#10719](https://github.com/paritytech/parity-ethereum/pull/10719))
- Increase number of requested block bodies in chain sync ([#10247](https://github.com/paritytech/parity-ethereum/pull/10247)) * enable lto for release builds ([#10717](https://github.com/paritytech/parity-ethereum/pull/10717))
- Deprecate account management ([#10213](https://github.com/paritytech/parity-ethereum/pull/10213)) * [devp2p] Update to 2018 edition ([#10716](https://github.com/paritytech/parity-ethereum/pull/10716))
- Properly handle check_epoch_end_signal errors ([#10015](https://github.com/paritytech/parity-ethereum/pull/10015)) * [devp2p] Don't use `rust-crypto` ([#10714](https://github.com/paritytech/parity-ethereum/pull/10714))
- Fix(osx and windows builds): bump parity-daemonize ([#10291](https://github.com/paritytech/parity-ethereum/pull/10291)) * [devp2p] Fix warnings and re-org imports ([#10710](https://github.com/paritytech/parity-ethereum/pull/10710))
- Add missing step for Using `systemd` service file ([#10175](https://github.com/paritytech/parity-ethereum/pull/10175)) * DevP2p: Get node IP address and udp port from Socket, if not included in PING packet ([#10705](https://github.com/paritytech/parity-ethereum/pull/10705))
- Call private contract methods from another private contract (read-onl… ([#10086](https://github.com/paritytech/parity-ethereum/pull/10086)) * introduce MissingParent Error, fixes #10699 ([#10700](https://github.com/paritytech/parity-ethereum/pull/10700))
- Update ring to 0.14 ([#10262](https://github.com/paritytech/parity-ethereum/pull/10262)) * Refactor Clique stepping ([#10691](https://github.com/paritytech/parity-ethereum/pull/10691))
- Fix(secret-store): deprecation warning ([#10301](https://github.com/paritytech/parity-ethereum/pull/10301)) * add_sync_notifier in EthPubSubClient holds on to a Client for too long ([#10689](https://github.com/paritytech/parity-ethereum/pull/10689))
- Update to jsonrpc-derive 10.0.2, fixes aliases bug ([#10300](https://github.com/paritytech/parity-ethereum/pull/10300)) * Fix compiler warning (that will become an error) ([#10683](https://github.com/paritytech/parity-ethereum/pull/10683))
- Convert to jsonrpc-derive, use jsonrpc-* from crates.io ([#10298](https://github.com/paritytech/parity-ethereum/pull/10298)) * Don't panic if extra_data is longer than VANITY_LENGTH ([#10682](https://github.com/paritytech/parity-ethereum/pull/10682))
- Fix Windows build ([#10284](https://github.com/paritytech/parity-ethereum/pull/10284)) * Remove annoying compiler warnings ([#10679](https://github.com/paritytech/parity-ethereum/pull/10679))
- Don't run the CPP example on CI ([#10285](https://github.com/paritytech/parity-ethereum/pull/10285)) * Remove support for hardware wallets ([#10678](https://github.com/paritytech/parity-ethereum/pull/10678))
- Additional tests for uint deserialization. ([#10279](https://github.com/paritytech/parity-ethereum/pull/10279)) * [CI] allow cargo audit to fail ([#10676](https://github.com/paritytech/parity-ethereum/pull/10676))
- Prevent silent errors in daemon mode ([#10007](https://github.com/paritytech/parity-ethereum/pull/10007)) * new image ([#10673](https://github.com/paritytech/parity-ethereum/pull/10673))
- Fix join-set test to be deterministic. ([#10263](https://github.com/paritytech/parity-ethereum/pull/10263)) * Upgrade ethereum types ([#10670](https://github.com/paritytech/parity-ethereum/pull/10670))
- Update CHANGELOG-2.2.md ([#10254](https://github.com/paritytech/parity-ethereum/pull/10254)) * Reset blockchain properly ([#10669](https://github.com/paritytech/parity-ethereum/pull/10669))
- Macos heapsize force jemalloc ([#10234](https://github.com/paritytech/parity-ethereum/pull/10234)) * fix: Move PR template into .github/ folder ([#10663](https://github.com/paritytech/parity-ethereum/pull/10663))
- Allow specifying local accounts via CLI ([#9960](https://github.com/paritytech/parity-ethereum/pull/9960)) * docs: evmbin - Update Rust docs ([#10658](https://github.com/paritytech/parity-ethereum/pull/10658))
- Take in account zero gas price certification when doing transact_cont… ([#10232](https://github.com/paritytech/parity-ethereum/pull/10232)) * refactor: Related #9459 - evmbin: replace untyped json! macro with fully typed serde serialization using Rust structs ([#10657](https://github.com/paritytech/parity-ethereum/pull/10657))
- Update CHANGELOG.md ([#10249](https://github.com/paritytech/parity-ethereum/pull/10249)) * docs: Add PR template ([#10654](https://github.com/paritytech/parity-ethereum/pull/10654))
- Fix typo: CHANGELOG-2.1 -> CHANGELOG-2.2 ([#10233](https://github.com/paritytech/parity-ethereum/pull/10233)) * docs: Add ProgPoW Rust docs to ethash module ([#10653](https://github.com/paritytech/parity-ethereum/pull/10653))
- Update copyright year to 2019. ([#10181](https://github.com/paritytech/parity-ethereum/pull/10181)) * docs: Update Readme with TOC, Contributor Guideline. Update Cargo package descriptions ([#10652](https://github.com/paritytech/parity-ethereum/pull/10652))
- Fixed: types::transaction::SignedTransaction; ([#10229](https://github.com/paritytech/parity-ethereum/pull/10229)) * Upgrade to parity-crypto 0.4 ([#10650](https://github.com/paritytech/parity-ethereum/pull/10650))
- Fix(ManageNetwork): replace Range with RangeInclusive ([#10209](https://github.com/paritytech/parity-ethereum/pull/10209)) * fix(compilation warnings) ([#10649](https://github.com/paritytech/parity-ethereum/pull/10649))
- Import rpc transactions sequentially ([#10051](https://github.com/paritytech/parity-ethereum/pull/10051)) * [whisper] Move needed aes_gcm crypto in-crate ([#10647](https://github.com/paritytech/parity-ethereum/pull/10647))
- Enable St-Peters-Fork ("Constantinople Fix") ([#10223](https://github.com/paritytech/parity-ethereum/pull/10223)) * Update publishing ([#10644](https://github.com/paritytech/parity-ethereum/pull/10644))
- Add EIP-1283 disable transition ([#10214](https://github.com/paritytech/parity-ethereum/pull/10214)) * ci: publish docs debug ([#10638](https://github.com/paritytech/parity-ethereum/pull/10638))
- Echo CORS request headers by default ([#10221](https://github.com/paritytech/parity-ethereum/pull/10221)) * Fix publish docs ([#10635](https://github.com/paritytech/parity-ethereum/pull/10635))
- Happy New Year! ([#10211](https://github.com/paritytech/parity-ethereum/pull/10211)) * Fix rinkeby petersburg fork ([#10632](https://github.com/paritytech/parity-ethereum/pull/10632))
- Perform stripping during build ([#10208](https://github.com/paritytech/parity-ethereum/pull/10208)) * Update kovan.json to switch Kovan validator set to POA Consensus Contracts ([#10628](https://github.com/paritytech/parity-ethereum/pull/10628))
- Remove CallContract and RegistryInfo re-exports from `ethcore/client` ([#10205](https://github.com/paritytech/parity-ethereum/pull/10205)) * [ethcore] remove error_chain ([#10616](https://github.com/paritytech/parity-ethereum/pull/10616))
- Extract CallContract and RegistryInfo traits into their own crate ([#10178](https://github.com/paritytech/parity-ethereum/pull/10178)) * Remove unused import ([#10615](https://github.com/paritytech/parity-ethereum/pull/10615))
- Update the changelogs for 2.1.11, 2.2.6, 2.2.7, and 2.3.0 ([#10197](https://github.com/paritytech/parity-ethereum/pull/10197)) * Adds parity_getRawBlockByNumber, parity_submitRawBlock ([#10609](https://github.com/paritytech/parity-ethereum/pull/10609))
- Cancel Constantinople HF on POA Core ([#10198](https://github.com/paritytech/parity-ethereum/pull/10198)) * adds rpc error message for --no-ancient-blocks ([#10608](https://github.com/paritytech/parity-ethereum/pull/10608))
- Adds cli interface to allow reseting chain to a particular block ([#9782](https://github.com/paritytech/parity-ethereum/pull/9782)) * Constantinople HF on POA Core ([#10606](https://github.com/paritytech/parity-ethereum/pull/10606))
- Run all `igd` methods in its own thread ([#10195](https://github.com/paritytech/parity-ethereum/pull/10195)) * Clique: zero-fill extradata when the supplied value is less than 32 bytes in length ([#10605](https://github.com/paritytech/parity-ethereum/pull/10605))
- Pull constantinople on ethereum network ([#10189](https://github.com/paritytech/parity-ethereum/pull/10189)) * evm: add some mulmod benches ([#10600](https://github.com/paritytech/parity-ethereum/pull/10600))
- Update for Android cross-compilation. ([#10180](https://github.com/paritytech/parity-ethereum/pull/10180)) * sccache logs to stdout ([#10596](https://github.com/paritytech/parity-ethereum/pull/10596))
- Version: bump fork blocks for kovan and foundation ([#10186](https://github.com/paritytech/parity-ethereum/pull/10186)) * update bootnodes ([#10595](https://github.com/paritytech/parity-ethereum/pull/10595))
- Handle the case for contract creation on an empty but exist account w… ([#10065](https://github.com/paritytech/parity-ethereum/pull/10065)) * Merge `Notifier` and `TransactionsPoolNotifier` ([#10591](https://github.com/paritytech/parity-ethereum/pull/10591))
- Align personal_unlockAccount behaviour when permanent unlock is disab… ([#10060](https://github.com/paritytech/parity-ethereum/pull/10060)) * fix(whisper): change expiry `unix_time + ttl + work` ([#10587](https://github.com/paritytech/parity-ethereum/pull/10587))
- Drop `runtime` after others (especially `ws_server`) ([#10179](https://github.com/paritytech/parity-ethereum/pull/10179)) * fix(evmbin): make benches compile again ([#10586](https://github.com/paritytech/parity-ethereum/pull/10586))
- Version: bump nightly to 2.4 ([#10165](https://github.com/paritytech/parity-ethereum/pull/10165)) * fix issue with compilation when 'slow-blocks' feature enabled ([#10585](https://github.com/paritytech/parity-ethereum/pull/10585))
- Skip locking in statedb for non-canon blocks ([#10141](https://github.com/paritytech/parity-ethereum/pull/10141)) * Allow CORS requests in Secret Store API ([#10584](https://github.com/paritytech/parity-ethereum/pull/10584))
- Remove reference to ui-interface command-line option ([#10170](https://github.com/paritytech/parity-ethereum/pull/10170)) * CI improvements ([#10579](https://github.com/paritytech/parity-ethereum/pull/10579))
- Fix [#9822](https://github.com/paritytech/parity-ethereum/pull/9822): trace_filter does not return failed contract creation ([#10140](https://github.com/paritytech/parity-ethereum/pull/10140)) * ethcore: improve timestamp handling ([#10574](https://github.com/paritytech/parity-ethereum/pull/10574))
- Fix _cannot recursively call into `Core`_ issue ([#10144](https://github.com/paritytech/parity-ethereum/pull/10144)) * Update Issue Template to direct security issue to email ([#10562](https://github.com/paritytech/parity-ethereum/pull/10562))
- Fix(whisper): correct PoW calculation ([#10166](https://github.com/paritytech/parity-ethereum/pull/10166)) * version: bump master to 2.6 ([#10560](https://github.com/paritytech/parity-ethereum/pull/10560))
- Bump JSON-RPC ([#10151](https://github.com/paritytech/parity-ethereum/pull/10151)) * fix(light cull): poll light cull instead of timer ([#10559](https://github.com/paritytech/parity-ethereum/pull/10559))
- Ping nodes from discovery ([#10167](https://github.com/paritytech/parity-ethereum/pull/10167)) * Watch transactions pool ([#10558](https://github.com/paritytech/parity-ethereum/pull/10558))
- Fix(android): remove dependency to libusb ([#10161](https://github.com/paritytech/parity-ethereum/pull/10161)) * Add SealingState; don't prepare block when not ready. ([#10529](https://github.com/paritytech/parity-ethereum/pull/10529))
- Refactor(trim_right_matches -> trim_end_matches) ([#10159](https://github.com/paritytech/parity-ethereum/pull/10159)) * Explicitly enable or disable Stratum in config file (Issue 9785) ([#10521](https://github.com/paritytech/parity-ethereum/pull/10521))
- Merge Machine and WithRewards ([#10071](https://github.com/paritytech/parity-ethereum/pull/10071)) * Add filtering capability to `parity_pendingTransactions` (issue 8269) ([#10506](https://github.com/paritytech/parity-ethereum/pull/10506))
* Remove calls to heapsize ([#10432](https://github.com/paritytech/parity-ethereum/pull/10432))
* RPC: Implements eth_subscribe("syncing") ([#10311](https://github.com/paritytech/parity-ethereum/pull/10311))
* SecretStore: non-blocking wait of session completion ([#10303](https://github.com/paritytech/parity-ethereum/pull/10303))
* Node table limiting and cache for node filter ([#10288](https://github.com/paritytech/parity-ethereum/pull/10288))
* SecretStore: expose restore_key_public in HTTP API ([#10241](https://github.com/paritytech/parity-ethereum/pull/10241))
* Trivial journal for private transactions ([#10056](https://github.com/paritytech/parity-ethereum/pull/10056))
## Previous releases ## Previous releases
- [CHANGELOG-2.3](docs/CHANGELOG-2.3.md) (_stable_) - [CHANGELOG-2.5](docs/CHANGELOG-2.5.md) (_stable_)
- [CHANGELOG-2.4](docs/CHANGELOG-2.4.md) (EOL: 2019-07-08)
- [CHANGELOG-2.3](docs/CHANGELOG-2.3.md) (EOL: 2019-04-09)
- [CHANGELOG-2.2](docs/CHANGELOG-2.2.md) (EOL: 2019-02-25) - [CHANGELOG-2.2](docs/CHANGELOG-2.2.md) (EOL: 2019-02-25)
- [CHANGELOG-2.1](docs/CHANGELOG-2.1.md) (EOL: 2019-01-16) - [CHANGELOG-2.1](docs/CHANGELOG-2.1.md) (EOL: 2019-01-16)
- [CHANGELOG-2.0](docs/CHANGELOG-2.0.md) (EOL: 2018-11-15) - [CHANGELOG-2.0](docs/CHANGELOG-2.0.md) (EOL: 2018-11-15)

266
Cargo.lock generated
View File

@@ -494,102 +494,34 @@ dependencies = [
"thread-scoped 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "thread-scoped 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "crossbeam"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-channel 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-deque 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-channel"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "crossbeam-deque" name = "crossbeam-deque"
version = "0.2.0" version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-deque"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-deque"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "crossbeam-epoch" name = "crossbeam-epoch"
version = "0.3.1" version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "crossbeam-epoch" name = "crossbeam-queue"
version = "0.5.2" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-epoch"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-utils"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -599,10 +531,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "crossbeam-utils" name = "crossbeam-utils"
version = "0.6.2" version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -737,6 +670,13 @@ name = "edit-distance"
version = "2.0.1" version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "eip-152"
version = "0.1.0"
dependencies = [
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "eip-712" name = "eip-712"
version = "0.1.0" version = "0.1.0"
@@ -879,10 +819,9 @@ dependencies = [
"account-db 0.1.0", "account-db 0.1.0",
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"blooms-db 0.1.0", "blooms-db 0.1.0",
"bn 0.4.4 (git+https://github.com/paritytech/bn)",
"common-types 0.1.0", "common-types 0.1.0",
"criterion 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "criterion 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
"ethabi 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -892,6 +831,7 @@ dependencies = [
"ethcore-accounts 0.1.0", "ethcore-accounts 0.1.0",
"ethcore-blockchain 0.1.0", "ethcore-blockchain 0.1.0",
"ethcore-bloom-journal 0.1.0", "ethcore-bloom-journal 0.1.0",
"ethcore-builtin 0.1.0",
"ethcore-call-contract 0.1.0", "ethcore-call-contract 0.1.0",
"ethcore-db 0.1.0", "ethcore-db 0.1.0",
"ethcore-io 1.12.0", "ethcore-io 1.12.0",
@@ -918,10 +858,8 @@ dependencies = [
"macros 0.1.0", "macros 0.1.0",
"memory-cache 0.1.0", "memory-cache 0.1.0",
"memory-db 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-crypto 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-runtime 0.1.0", "parity-runtime 0.1.0",
"parity-snappy 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-snappy 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-util-mem 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-util-mem 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -930,7 +868,7 @@ dependencies = [
"pod-account 0.1.0", "pod-account 0.1.0",
"rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rlp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rlp_compress 0.1.0", "rlp_compress 0.1.0",
"rlp_derive 0.1.0", "rlp_derive 0.1.0",
@@ -986,12 +924,14 @@ dependencies = [
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-util-mem 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-util-mem 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rlp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rlp_compress 0.1.0", "rlp_compress 0.1.0",
"rlp_derive 0.1.0", "rlp_derive 0.1.0",
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"triehash-ethereum 0.2.0",
] ]
[[package]] [[package]]
@@ -1001,6 +941,24 @@ dependencies = [
"siphasher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "siphasher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "ethcore-builtin"
version = "0.1.0"
dependencies = [
"bn 0.4.4 (git+https://github.com/paritytech/bn)",
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"eip-152 0.1.0",
"ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethjson 0.1.0",
"ethkey 0.3.0",
"hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"keccak-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-crypto 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "ethcore-call-contract" name = "ethcore-call-contract"
version = "0.1.0" version = "0.1.0"
@@ -1027,7 +985,7 @@ dependencies = [
name = "ethcore-io" name = "ethcore-io"
version = "1.12.0" version = "1.12.0"
dependencies = [ dependencies = [
"crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1131,7 +1089,7 @@ dependencies = [
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"trace-time 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "trace-time 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"transaction-pool 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "transaction-pool 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@@ -1225,7 +1183,7 @@ dependencies = [
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"time-utils 0.1.0", "time-utils 0.1.0",
"tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"transaction-pool 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "transaction-pool 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"trie-db 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@@ -1359,9 +1317,9 @@ name = "ethjson"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"macros 0.1.0",
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@@ -1449,6 +1407,7 @@ dependencies = [
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"criterion 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "criterion 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"keccak-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1748,6 +1707,23 @@ name = "hex"
version = "0.2.0" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "hex-literal"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"hex-literal-impl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro-hack 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "hex-literal-impl"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro-hack 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "hmac" name = "hmac"
version = "0.7.0" version = "0.7.0"
@@ -2318,8 +2294,11 @@ dependencies = [
[[package]] [[package]]
name = "memoffset" name = "memoffset"
version = "0.2.1" version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "memory-cache" name = "memory-cache"
@@ -2634,7 +2613,7 @@ dependencies = [
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
"jni 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "jni 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"panic_hook 0.1.0", "panic_hook 0.1.0",
"parity-ethereum 2.6.0", "parity-ethereum 2.6.4",
"tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@@ -2681,7 +2660,7 @@ dependencies = [
[[package]] [[package]]
name = "parity-ethereum" name = "parity-ethereum"
version = "2.6.0" version = "2.6.4"
dependencies = [ dependencies = [
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2734,7 +2713,7 @@ dependencies = [
"parity-runtime 0.1.0", "parity-runtime 0.1.0",
"parity-updater 1.12.0", "parity-updater 1.12.0",
"parity-util-mem 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-util-mem 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-version 2.6.0", "parity-version 2.6.4",
"parity-whisper 0.1.0", "parity-whisper 0.1.0",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2877,7 +2856,7 @@ dependencies = [
"parity-crypto 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-runtime 0.1.0", "parity-runtime 0.1.0",
"parity-updater 1.12.0", "parity-updater 1.12.0",
"parity-version 2.6.0", "parity-version 2.6.4",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2892,7 +2871,7 @@ dependencies = [
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"transaction-pool 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "transaction-pool 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"transient-hashmap 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "transient-hashmap 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"vm 0.1.0", "vm 0.1.0",
] ]
@@ -2976,7 +2955,7 @@ dependencies = [
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-hash-fetch 1.12.0", "parity-hash-fetch 1.12.0",
"parity-path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-version 2.6.0", "parity-version 2.6.4",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3001,7 +2980,7 @@ dependencies = [
[[package]] [[package]]
name = "parity-version" name = "parity-version"
version = "2.6.0" version = "2.6.4"
dependencies = [ dependencies = [
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rlp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3336,6 +3315,16 @@ dependencies = [
"toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "proc-macro-hack"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "0.4.20" version = "0.4.20"
@@ -3344,6 +3333,14 @@ dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "proc-macro2"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "pulldown-cmark" name = "pulldown-cmark"
version = "0.0.3" version = "0.0.3"
@@ -3396,6 +3393,14 @@ dependencies = [
"proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "quote"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.3.22" version = "0.3.22"
@@ -3521,22 +3526,23 @@ dependencies = [
[[package]] [[package]]
name = "rayon" name = "rayon"
version = "1.0.3" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon-core 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "rayon-core" name = "rayon-core"
version = "1.4.1" version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@@ -3639,7 +3645,7 @@ dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",
"spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@@ -3944,7 +3950,7 @@ dependencies = [
[[package]] [[package]]
name = "spin" name = "spin"
version = "0.5.0" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
@@ -4035,6 +4041,16 @@ dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "syn"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "synom" name = "synom"
version = "0.11.3" version = "0.11.3"
@@ -4317,7 +4333,7 @@ name = "tokio-threadpool"
version = "0.1.7" version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4410,7 +4426,7 @@ dependencies = [
[[package]] [[package]]
name = "transaction-pool" name = "transaction-pool"
version = "2.0.0" version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4541,6 +4557,11 @@ name = "unicode-xid"
version = "0.1.0" version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "unicode-xid"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "unreachable" name = "unreachable"
version = "1.0.0" version = "1.0.0"
@@ -4886,17 +4907,11 @@ dependencies = [
"checksum criterion 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c47d2b548c5647e1a436dc0cb78d4ebf51b6bf7ab101ed76662828bdd4d3a24a" "checksum criterion 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c47d2b548c5647e1a436dc0cb78d4ebf51b6bf7ab101ed76662828bdd4d3a24a"
"checksum criterion-plot 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5f81689739e463ece7a6b62c6ec63bdab5c4e28fe05ff451769e87d1511411" "checksum criterion-plot 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5f81689739e463ece7a6b62c6ec63bdab5c4e28fe05ff451769e87d1511411"
"checksum criterion-stats 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ff43cac80562f91ead0b617c1be74edf350adfaa195809d355de98dfc8f9237d" "checksum criterion-stats 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ff43cac80562f91ead0b617c1be74edf350adfaa195809d355de98dfc8f9237d"
"checksum crossbeam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d7408247b1b87f480890f28b670c5f8d9a8a4274833433fe74dc0dfd46d33650" "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13"
"checksum crossbeam-channel 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7b85741761b7f160bc5e7e0c14986ef685b7f8bf9b7ad081c60c604bb4649827" "checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9"
"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b"
"checksum crossbeam-deque 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7792c4a9b5a4222f654e3728a3dd945aacc24d2c3a1a096ed265d80e4929cb9a"
"checksum crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3486aefc4c0487b9cb52372c97df0a48b8c249514af1ee99703bf70d2f2ceda1"
"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
"checksum crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30fecfcac6abfef8771151f8be4abc9e4edc112c2bcb233314cafde2680536e9"
"checksum crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2449aaa4ec7ef96e5fb24db16024b935df718e9ae1cec0a1e68feeca2efca7b8"
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015" "checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015"
"checksum crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e07fc155212827475223f0bcfae57e945e694fc90950ddf3f6695bbfd5555c72" "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6"
"checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda"
"checksum crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c240f247c278fa08a6d4820a6a222bfc6e0d999e51ba67be94f44c905b2161f2" "checksum crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c240f247c278fa08a6d4820a6a222bfc6e0d999e51ba67be94f44c905b2161f2"
"checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5"
@@ -4952,6 +4967,8 @@ dependencies = [
"checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461"
"checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82" "checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82"
"checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa" "checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa"
"checksum hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0"
"checksum hex-literal-impl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06095d08c7c05760f11a071b3e1d4c5b723761c01bd8d7201c30a9536668a612"
"checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771"
"checksum home 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "80dff82fb58cfbbc617fb9a9184b010be0529201553cda50ad04372bc2333aff" "checksum home 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "80dff82fb58cfbbc617fb9a9184b010be0529201553cda50ad04372bc2333aff"
"checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a" "checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a"
@@ -5009,7 +5026,7 @@ dependencies = [
"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
"checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b" "checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b"
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff" "checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f"
"checksum memory-db 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1eeeeab44c01c7da4409e68ec5b5db74c92305386efab3615e495b1dacaec196" "checksum memory-db 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1eeeeab44c01c7da4409e68ec5b5db74c92305386efab3615e495b1dacaec196"
"checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" "checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882"
"checksum memzero 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "93c0d11ac30a033511ae414355d80f70d9f29a44a49140face477117a1ee90db" "checksum memzero 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "93c0d11ac30a033511ae414355d80f70d9f29a44a49140face477117a1ee90db"
@@ -5077,12 +5094,15 @@ dependencies = [
"checksum primal-sieve 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "da2d6ed369bb4b0273aeeb43f07c105c0117717cbae827b20719438eb2eb798c" "checksum primal-sieve 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "da2d6ed369bb4b0273aeeb43f07c105c0117717cbae827b20719438eb2eb798c"
"checksum primitive-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2288eb2a39386c4bc817974cc413afe173010dc80e470fcb1e9a35580869f024" "checksum primitive-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2288eb2a39386c4bc817974cc413afe173010dc80e470fcb1e9a35580869f024"
"checksum proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" "checksum proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e"
"checksum proc-macro-hack 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e688f31d92ffd7c1ddc57a1b4e6d773c0f2a14ee437a4b0a4f5a69c80eb221c8"
"checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee" "checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee"
"checksum proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e98a83a9f9b331f54b924e68a66acb1bb35cb01fb0a23645139967abefb697e8"
"checksum pulldown-cmark 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8361e81576d2e02643b04950e487ec172b687180da65c731c03cf336784e6c07" "checksum pulldown-cmark 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8361e81576d2e02643b04950e487ec172b687180da65c731c03cf336784e6c07"
"checksum pwasm-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e9135bed7b452e20dbb395a2d519abaf0c46d60e7ecc02daeeab447d29bada1" "checksum pwasm-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e9135bed7b452e20dbb395a2d519abaf0c46d60e7ecc02daeeab447d29bada1"
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" "checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5"
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
@@ -5096,8 +5116,8 @@ dependencies = [
"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" "checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05"
"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
"checksum rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "373814f27745b2686b350dd261bfd24576a6fb0e2c5919b3a2b6005f820b0473" "checksum rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4b0186e22767d5b9738a05eab7c6ac90b15db17e5b5f9bd87976dd7d89a10a4"
"checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum rayon-core 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbe0df8435ac0c397d467b6cad6d25543d06e8a019ef3f6af3c384597515bd2"
"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
@@ -5145,7 +5165,7 @@ dependencies = [
"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d"
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
"checksum socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d11a52082057d87cb5caa31ad812f4504b97ab44732cd8359df2e9ff9f48e7" "checksum socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d11a52082057d87cb5caa31ad812f4504b97ab44732cd8359df2e9ff9f48e7"
"checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
"checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5"
"checksum stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8861bc80f649f5b4c9bd38b696ae9af74499d479dbfb327f0607de6b326a36bc" "checksum stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8861bc80f649f5b4c9bd38b696ae9af74499d479dbfb327f0607de6b326a36bc"
@@ -5155,6 +5175,7 @@ dependencies = [
"checksum subtle 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01dca13cf6c3b179864ab3292bd794e757618d35a7766b7c46050c614ba00829" "checksum subtle 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01dca13cf6c3b179864ab3292bd794e757618d35a7766b7c46050c614ba00829"
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" "checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9"
"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf"
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
"checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" "checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe"
@@ -5192,7 +5213,7 @@ dependencies = [
"checksum toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b8c96d7873fa7ef8bdeb3a9cda3ac48389b4154f32b9803b4bc26220b677b039" "checksum toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b8c96d7873fa7ef8bdeb3a9cda3ac48389b4154f32b9803b4bc26220b677b039"
"checksum toolshed 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "450441e131c7663af72e63a33c02a6a1fbaaa8601dc652ed6757813bb55aeec7" "checksum toolshed 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "450441e131c7663af72e63a33c02a6a1fbaaa8601dc652ed6757813bb55aeec7"
"checksum trace-time 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe82f2f0bf1991e163e757baf044282823155dd326e70f44ce2186c3c320cc9" "checksum trace-time 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe82f2f0bf1991e163e757baf044282823155dd326e70f44ce2186c3c320cc9"
"checksum transaction-pool 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d8bd3123931aa6e49dd03bc8a2400490e14701d779458d1f1fff1f04c6f666" "checksum transaction-pool 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "454adc482e32785c3beab9415dd0f3c689f29cc2d16717eb62f6a784d53544b4"
"checksum transient-hashmap 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aeb4b191d033a35edfce392a38cdcf9790b6cebcb30fa690c312c29da4dc433e" "checksum transient-hashmap 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aeb4b191d033a35edfce392a38cdcf9790b6cebcb30fa690c312c29da4dc433e"
"checksum trie-db 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ae063390324bfcf36c7e8e4fb1f85f6f0fb5dd04e1cd282581eb7b8b34b32de7" "checksum trie-db 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ae063390324bfcf36c7e8e4fb1f85f6f0fb5dd04e1cd282581eb7b8b34b32de7"
"checksum trie-standardmap 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "40787fb1a63a97ed56d12bc303937ea274e09d1afa2e20e4f074eff2074b24d3" "checksum trie-standardmap 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "40787fb1a63a97ed56d12bc303937ea274e09d1afa2e20e4f074eff2074b24d3"
@@ -5209,6 +5230,7 @@ dependencies = [
"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
"checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f"
"checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" "checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6"

View File

@@ -2,7 +2,7 @@
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.6.0" version = "2.6.4"
license = "GPL-3.0" license = "GPL-3.0"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
@@ -92,7 +92,6 @@ default = ["accounts"]
accounts = ["ethcore-accounts", "parity-rpc/accounts"] accounts = ["ethcore-accounts", "parity-rpc/accounts"]
miner-debug = ["ethcore/miner-debug"] miner-debug = ["ethcore/miner-debug"]
json-tests = ["ethcore/json-tests"] json-tests = ["ethcore/json-tests"]
ci-skip-tests = ["ethcore/ci-skip-tests"]
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"]

128
docs/CHANGELOG-2.4.md Normal file
View File

@@ -0,0 +1,128 @@
## Parity-Ethereum [v2.4.9](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.9)
Parity Ethereum v2.4.9-stable is a security update which addresses servo/rust-smallvec#148
The full list of included changes:
* cargo update -p smallvec ([#10822](https://github.com/paritytech/parity-ethereum/pull/10822))
## Parity-Ethereum [v2.4.8](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.8)
Parity-Ethereum 2.4.8-stable is a bugfix release that improves performance and stability.
* Blockchain: fix reset chain
* State tests: treat empty accounts the same as non-existant accounts (EIP 1052)
* Aura: fix Timestamp Overflow
* Networking: support discovery-only peers (geth bootnodes)
* Snapshotting: fix unclean shutdown while snappshotting is under way
The full list of included changes:
* ethcore/res: activate atlantis classic hf on block 8772000 ([#10766](https://github.com/paritytech/parity-ethereum/pull/10766))
* fix docker tags for publishing ([#10741](https://github.com/paritytech/parity-ethereum/pull/10741))
* Reset blockchain properly ([#10669](https://github.com/paritytech/parity-ethereum/pull/10669))
* adds rpc error message for --no-ancient-blocks ([#10608](https://github.com/paritytech/parity-ethereum/pull/10608))
* Treat empty account the same as non-exist accounts in EIP-1052 ([#10775](https://github.com/paritytech/parity-ethereum/pull/10775))
* fix: aura don't add `SystemTime::now()` ([#10720](https://github.com/paritytech/parity-ethereum/pull/10720))
* DevP2p: Get node IP address and udp port from Socket, if not included in PING packet ([#10705](https://github.com/paritytech/parity-ethereum/pull/10705))
* Revert "fix: aura don't add `SystemTime::now()` ([#10720](https://github.com/paritytech/parity-ethereum/pull/10720))"
* Add a way to signal shutdown to snapshotting threads ([#10744](https://github.com/paritytech/parity-ethereum/pull/10744))
## Parity-Ethereum [v2.4.7](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.7)
Parity-Ethereum 2.4.7-stable is a bugfix release that improves performance and stability.
Among others, it enables the _Atlantis_ hardfork on **Morden** and **Kotti** Classic networks.
The full list of included changes:
* [CI] allow cargo audit to fail ([#10676](https://github.com/paritytech/parity-ethereum/pull/10676))
* new image ([#10673](https://github.com/paritytech/parity-ethereum/pull/10673))
* Update publishing ([#10644](https://github.com/paritytech/parity-ethereum/pull/10644))
* enable lto for release builds ([#10717](https://github.com/paritytech/parity-ethereum/pull/10717))
* Use RUSTFLAGS to set the optimization level ([#10719](https://github.com/paritytech/parity-ethereum/pull/10719))
* ethcore: enable ECIP-1054 for classic ([#10731](https://github.com/paritytech/parity-ethereum/pull/10731))
## Parity-Ethereum [v2.4.6](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.6)
Parity-Ethereum 2.4.6-stable is a bugfix release that improves performance and stability.
Among others, it enables the Petersburg hardfork on **Rinkeby** and **POA-Core** Network, as well as the **Kovan** Network community hardfork.
The full list of included changes:
* ci: publish docs debug ([#10638](https://github.com/paritytech/parity-ethereum/pull/10638))
## Parity-Ethereum [v2.4.5](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.5)
Parity-Ethereum 2.4.5-stable is a bugfix release that improves performance and stability. This release improves memory optimizations around timestamp handling and stabilizes the 2.4 release branch.
As of today, Parity-Ethereum 2.3 reaches end of life and everyone is encouraged to upgrade.
## Parity-Ethereum [v2.4.4](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.4)
Parity-Ethereum 2.4.4-beta is a bugfix release that improves performance and stability. This patch release removes the dead chain configs for Easthub and Ethereum Social.
The full list of included changes:
* fix(rpc-types): replace uint and hash with `ethereum_types v0.4` ([#10217](https://github.com/paritytech/parity-ethereum/pull/10217))
* chore(bump ethereum-types) ([#10396](https://github.com/paritytech/parity-ethereum/pull/10396))
* fix(light eth_gasPrice): ask network if not in cache ([#10535](https://github.com/paritytech/parity-ethereum/pull/10535))
* fix(light account response): update `tx_queue` ([#10545](https://github.com/paritytech/parity-ethereum/pull/10545))
* fix(bump dependencies) ([#10540](https://github.com/paritytech/parity-ethereum/pull/10540))
* tx-pool: check transaction readiness before replacing ([#10526](https://github.com/paritytech/parity-ethereum/pull/10526))
* fix #10390 ([#10391](https://github.com/paritytech/parity-ethereum/pull/10391))
* private-tx: replace error_chain ([#10510](https://github.com/paritytech/parity-ethereum/pull/10510))
## Parity-Ethereum [v2.4.3](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.3)
Parity-Ethereum 2.4.3-beta is a bugfix release that improves performance and stability. This patch release contains a critical bug fix where serving light clients previously led to client crashes. Upgrading is highly recommended.
The full list of included changes:
* Add additional request tests ([#10503](https://github.com/paritytech/parity-ethereum/pull/10503))
## Parity-Ethereum [v2.4.2](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.2)
Parity-Ethereum 2.4.2-beta is a bugfix release that improves performance and stability.
The full list of included changes:
* Сaching through docker volume ([#10477](https://github.com/paritytech/parity-ethereum/pull/10477))
* fix win&mac build ([#10486](https://github.com/paritytech/parity-ethereum/pull/10486))
* fix(extract `timestamp_checked_add` as lib) ([#10383](https://github.com/paritytech/parity-ethereum/pull/10383))
## Parity-Ethereum [v2.4.1](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.1)
Parity-Ethereum 2.4.1-beta is a bugfix release that improves performance and stability.
The full list of included changes:
* Implement parity_versionInfo & parity_setChain on LC; fix parity_setChain ([#10312](https://github.com/paritytech/parity-ethereum/pull/10312))
* CI publish to aws ([#10446](https://github.com/paritytech/parity-ethereum/pull/10446))
* CI aws git checkout ([#10451](https://github.com/paritytech/parity-ethereum/pull/10451))
* Revert "CI aws git checkout ([#10451](https://github.com/paritytech/parity-ethereum/pull/10451))" (#10456)
* Revert "CI aws git checkout ([#10451](https://github.com/paritytech/parity-ethereum/pull/10451))"
* Tests parallelized ([#10452](https://github.com/paritytech/parity-ethereum/pull/10452))
* Ensure static validator set changes are recognized ([#10467](https://github.com/paritytech/parity-ethereum/pull/10467))
## Parity-Ethereum [v2.4.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.0)
Parity-Ethereum 2.4.0-beta is our trifortnightly minor version release coming with a lot of new features as well as bugfixes and performance improvements.
Notable changes:
- Account management is now deprecated ([#10213](https://github.com/paritytech/parity-ethereum/pull/10213))
- Local accounts can now be specified via CLI ([#9960](https://github.com/paritytech/parity-ethereum/pull/9960))
- Chains can now be reset to a particular block via CLI ([#9782](https://github.com/paritytech/parity-ethereum/pull/9782))
- Ethash now additionally implements ProgPoW ([#9762](https://github.com/paritytech/parity-ethereum/pull/9762))
- The `eip1283DisableTransition` flag was added to revert EIP-1283 ([#10214](https://github.com/paritytech/parity-ethereum/pull/10214))
The full list of included changes:
* revert some changes, could be buggy ([#10399](https://github.com/paritytech/parity-ethereum/pull/10399))
* 10000 > 5000 ([#10422](https://github.com/paritytech/parity-ethereum/pull/10422))
* fix panic when logging directory does not exist, closes #10420 ([#10424](https://github.com/paritytech/parity-ethereum/pull/10424))
* fix underflow in pip, closes #10419 ([#10423](https://github.com/paritytech/parity-ethereum/pull/10423))
* ci: clean up gitlab-ci.yml leftovers from previous merge ([#10429](https://github.com/paritytech/parity-ethereum/pull/10429))
* Update hardcoded headers for Foundation, Ropsten, Kovan and Classic ([#10417](https://github.com/paritytech/parity-ethereum/pull/10417))

View File

@@ -10,9 +10,8 @@ authors = ["Parity Technologies <admin@parity.io>"]
account-db = { path = "account-db" } account-db = { path = "account-db" }
ansi_term = "0.11" ansi_term = "0.11"
blooms-db = { path = "../util/blooms-db", optional = true } blooms-db = { path = "../util/blooms-db", optional = true }
bn = { git = "https://github.com/paritytech/bn", default-features = false }
common-types = { path = "types" } common-types = { path = "types" }
crossbeam = "0.4" crossbeam-utils = "0.6"
derive_more = "0.14.0" derive_more = "0.14.0"
env_logger = { version = "0.5", optional = true } env_logger = { version = "0.5", optional = true }
ethabi = "8.0" ethabi = "8.0"
@@ -21,6 +20,7 @@ ethabi-derive = "8.0"
ethash = { path = "../ethash" } ethash = { path = "../ethash" }
ethcore-blockchain = { path = "./blockchain" } ethcore-blockchain = { path = "./blockchain" }
ethcore-bloom-journal = { path = "../util/bloom" } ethcore-bloom-journal = { path = "../util/bloom" }
ethcore-builtin = { path = "./builtin" }
ethcore-call-contract = { path = "./call-contract" } ethcore-call-contract = { path = "./call-contract" }
ethcore-db = { path = "./db" } ethcore-db = { path = "./db" }
ethcore-io = { path = "../util/io" } ethcore-io = { path = "../util/io" }
@@ -47,17 +47,15 @@ lru-cache = "0.1"
macros = { path = "../util/macros" } macros = { path = "../util/macros" }
memory-cache = { path = "../util/memory-cache" } memory-cache = { path = "../util/memory-cache" }
memory-db = "0.12.4" memory-db = "0.12.4"
num = { version = "0.1", default-features = false, features = ["bigint"] }
num_cpus = "1.2" num_cpus = "1.2"
parity-bytes = "0.1" parity-bytes = "0.1"
parity-crypto = "0.4.0"
parity-snappy = "0.1" parity-snappy = "0.1"
parking_lot = "0.7" parking_lot = "0.7"
pod-account = { path = "pod-account" } pod-account = { path = "pod-account" }
trie-db = "0.12.4" trie-db = "0.12.4"
patricia-trie-ethereum = { path = "../util/patricia-trie-ethereum" } patricia-trie-ethereum = { path = "../util/patricia-trie-ethereum" }
rand = "0.6" rand = "0.6"
rayon = "1.0" rayon = "1.1"
rlp = "0.4.0" rlp = "0.4.0"
rlp_derive = { path = "../util/rlp-derive" } rlp_derive = { path = "../util/rlp-derive" }
rustc-hex = "1.0" rustc-hex = "1.0"
@@ -80,6 +78,8 @@ blooms-db = { path = "../util/blooms-db" }
criterion = "0.2" criterion = "0.2"
env_logger = "0.5" env_logger = "0.5"
ethcore-accounts = { path = "../accounts" } ethcore-accounts = { path = "../accounts" }
ethjson = { path = "../json", features = ["test-helpers"] }
ethkey = { path = "../accounts/ethkey" }
fetch = { path = "../util/fetch" } fetch = { path = "../util/fetch" }
kvdb-rocksdb = "0.1.3" kvdb-rocksdb = "0.1.3"
parity-runtime = { path = "../util/runtime" } parity-runtime = { path = "../util/runtime" }
@@ -111,8 +111,6 @@ evm-debug-tests = ["evm-debug", "evm/evm-debug-tests"]
slow-blocks = [] slow-blocks = []
# Run JSON consensus tests. # Run JSON consensus tests.
json-tests = ["env_logger", "test-helpers", "to-pod-full"] json-tests = ["env_logger", "test-helpers", "to-pod-full"]
# Skip JSON consensus tests with pending issues.
ci-skip-tests = []
# Run memory/cpu heavy tests. # Run memory/cpu heavy tests.
test-heavy = [] test-heavy = []
# Compile test helpers # Compile test helpers

View File

@@ -13,21 +13,23 @@ blooms-db = { path = "../../util/blooms-db" }
common-types = { path = "../types" } common-types = { path = "../types" }
ethcore-db = { path = "../db" } ethcore-db = { path = "../db" }
ethereum-types = "0.6.0" ethereum-types = "0.6.0"
keccak-hash = "0.2.0"
parity-util-mem = "0.1" parity-util-mem = "0.1"
itertools = "0.5" itertools = "0.5"
kvdb = "0.1" kvdb = "0.1"
log = "0.4" log = "0.4"
parity-bytes = "0.1" parity-bytes = "0.1"
parking_lot = "0.7" parking_lot = "0.7"
rand = "0.6"
rayon = "1.0" rayon = "1.0"
rlp = "0.4.0" rlp = "0.4.0"
rlp_compress = { path = "../../util/rlp-compress" } rlp_compress = { path = "../../util/rlp-compress" }
rlp_derive = { path = "../../util/rlp-derive" } rlp_derive = { path = "../../util/rlp-derive" }
triehash-ethereum = { version = "0.2", path = "../../util/triehash-ethereum" }
[dev-dependencies] [dev-dependencies]
env_logger = "0.5" env_logger = "0.5"
ethkey = { path = "../../accounts/ethkey" } ethkey = { path = "../../accounts/ethkey" }
keccak-hash = "0.2.0"
rustc-hex = "1.0" rustc-hex = "1.0"
tempdir = "0.3" tempdir = "0.3"
kvdb-memorydb = "0.1" kvdb-memorydb = "0.1"

View File

@@ -710,6 +710,10 @@ impl BlockChain {
/// ///
/// If the tree route verges into pruned or unknown blocks, /// If the tree route verges into pruned or unknown blocks,
/// `None` is returned. /// `None` is returned.
///
/// `is_from_route_finalized` returns whether the `from` part of the
/// route contains a finalized block. This only holds if the two parts (from
/// and to) are on different branches, ie. on 2 different forks.
pub fn tree_route(&self, from: H256, to: H256) -> Option<TreeRoute> { pub fn tree_route(&self, from: H256, to: H256) -> Option<TreeRoute> {
let mut from_branch = vec![]; let mut from_branch = vec![];
let mut is_from_route_finalized = false; let mut is_from_route_finalized = false;
@@ -723,9 +727,9 @@ impl BlockChain {
// reset from && to to the same level // reset from && to to the same level
while from_details.number > to_details.number { while from_details.number > to_details.number {
from_branch.push(current_from); from_branch.push(current_from);
is_from_route_finalized = is_from_route_finalized || from_details.is_finalized;
current_from = from_details.parent.clone(); current_from = from_details.parent.clone();
from_details = self.block_details(&from_details.parent)?; from_details = self.block_details(&from_details.parent)?;
is_from_route_finalized = is_from_route_finalized || from_details.is_finalized;
} }
while to_details.number > from_details.number { while to_details.number > from_details.number {
@@ -739,9 +743,9 @@ impl BlockChain {
// move to shared parent // move to shared parent
while current_from != current_to { while current_from != current_to {
from_branch.push(current_from); from_branch.push(current_from);
is_from_route_finalized = is_from_route_finalized || from_details.is_finalized;
current_from = from_details.parent.clone(); current_from = from_details.parent.clone();
from_details = self.block_details(&from_details.parent)?; from_details = self.block_details(&from_details.parent)?;
is_from_route_finalized = is_from_route_finalized || from_details.is_finalized;
to_branch.push(current_to); to_branch.push(current_to);
current_to = to_details.parent.clone(); current_to = to_details.parent.clone();
@@ -2503,4 +2507,74 @@ mod tests {
assert_eq!(bc.epoch_transition_for(fork_hash).unwrap().block_number, 0); assert_eq!(bc.epoch_transition_for(fork_hash).unwrap().block_number, 0);
} }
} }
#[test]
fn tree_rout_with_finalization() {
let genesis = BlockBuilder::genesis();
let a = genesis.add_block();
// First branch
let a1 = a.add_block_with_random_transactions();
let a2 = a1.add_block_with_random_transactions();
let a3 = a2.add_block_with_random_transactions();
// Second branch
let b1 = a.add_block_with_random_transactions();
let b2 = b1.add_block_with_random_transactions();
let a_hash = a.last().hash();
let a1_hash = a1.last().hash();
let a2_hash = a2.last().hash();
let a3_hash = a3.last().hash();
let b2_hash = b2.last().hash();
let bootstrap_chain = |blocks: Vec<&BlockBuilder>| {
let db = new_db();
let bc = new_chain(genesis.last().encoded(), db.clone());
let mut batch = db.key_value().transaction();
for block in blocks {
insert_block_batch(&mut batch, &bc, block.last().encoded(), vec![]);
bc.commit();
}
db.key_value().write(batch).unwrap();
(db, bc)
};
let mark_finalized = |block_hash: H256, db: &Arc<dyn BlockChainDB>, bc: &BlockChain| {
let mut batch = db.key_value().transaction();
bc.mark_finalized(&mut batch, block_hash).unwrap();
bc.commit();
db.key_value().write(batch).unwrap();
};
// Case 1: fork, with finalized common ancestor
{
let (db, bc) = bootstrap_chain(vec![&a, &a1, &a2, &a3, &b1, &b2]);
assert_eq!(bc.best_block_hash(), a3_hash);
assert_eq!(bc.block_hash(2).unwrap(), a1_hash);
mark_finalized(a_hash, &db, &bc);
assert!(!bc.tree_route(a3_hash, b2_hash).unwrap().is_from_route_finalized);
assert!(!bc.tree_route(b2_hash, a3_hash).unwrap().is_from_route_finalized);
}
// Case 2: fork with a finalized block on a branch
{
let (db, bc) = bootstrap_chain(vec![&a, &a1, &a2, &a3, &b1, &b2]);
assert_eq!(bc.best_block_hash(), a3_hash);
assert_eq!(bc.block_hash(2).unwrap(), a1_hash);
mark_finalized(a2_hash, &db, &bc);
assert!(bc.tree_route(a3_hash, b2_hash).unwrap().is_from_route_finalized);
assert!(!bc.tree_route(b2_hash, a3_hash).unwrap().is_from_route_finalized);
}
// Case 3: no-fork, with a finalized block
{
let (db, bc) = bootstrap_chain(vec![&a, &a1, &a2]);
assert_eq!(bc.best_block_hash(), a2_hash);
mark_finalized(a1_hash, &db, &bc);
assert!(!bc.tree_route(a1_hash, a2_hash).unwrap().is_from_route_finalized);
assert!(!bc.tree_route(a2_hash, a1_hash).unwrap().is_from_route_finalized);
}
}
} }

View File

@@ -21,11 +21,13 @@ use ethereum_types::{U256, H256, Bloom};
use common_types::encoded; use common_types::encoded;
use common_types::header::Header; use common_types::header::Header;
use common_types::transaction::SignedTransaction; use common_types::transaction::{SignedTransaction, Transaction, Action};
use common_types::view; use common_types::view;
use common_types::views::BlockView; use common_types::views::BlockView;
use keccak_hash::keccak;
use rlp::encode; use rlp::encode;
use rlp_derive::RlpEncodable; use rlp_derive::RlpEncodable;
use triehash_ethereum::ordered_trie_root;
/// Helper structure, used for encoding blocks. /// Helper structure, used for encoding blocks.
#[derive(Default, Clone, RlpEncodable)] #[derive(Default, Clone, RlpEncodable)]
@@ -136,6 +138,29 @@ impl BlockBuilder {
}) })
} }
/// Add a block with randomly generated transactions.
#[inline]
pub fn add_block_with_random_transactions(&self) -> Self {
// Maximum of ~50 transactions
let count = rand::random::<u8>() as usize / 5;
let transactions = std::iter::repeat_with(|| {
let data_len = rand::random::<u8>();
let data = std::iter::repeat_with(|| rand::random::<u8>())
.take(data_len as usize)
.collect::<Vec<_>>();
Transaction {
nonce: 0.into(),
gas_price: 0.into(),
gas: 100_000.into(),
action: Action::Create,
value: 100.into(),
data,
}.sign(&keccak("").into(), None)
}).take(count);
self.add_block_with_transactions(transactions)
}
/// Add a block with given transactions. /// Add a block with given transactions.
#[inline] #[inline]
pub fn add_block_with_transactions<T>(&self, transactions: T) -> Self pub fn add_block_with_transactions<T>(&self, transactions: T) -> Self
@@ -166,11 +191,15 @@ impl BlockBuilder {
let mut block = Block::default(); let mut block = Block::default();
let metadata = get_metadata(); let metadata = get_metadata();
let block_number = parent_number + 1; let block_number = parent_number + 1;
let transactions = metadata.transactions;
let transactions_root = ordered_trie_root(transactions.iter().map(rlp::encode));
block.header.set_parent_hash(parent_hash); block.header.set_parent_hash(parent_hash);
block.header.set_number(block_number); block.header.set_number(block_number);
block.header.set_log_bloom(metadata.bloom); block.header.set_log_bloom(metadata.bloom);
block.header.set_difficulty(metadata.difficulty); block.header.set_difficulty(metadata.difficulty);
block.transactions = metadata.transactions; block.header.set_transactions_root(transactions_root);
block.transactions = transactions;
parent_hash = block.hash(); parent_hash = block.hash();
parent_number = block_number; parent_number = block_number;

View File

@@ -0,0 +1,22 @@
[package]
description = "ethereum vm builtin"
name = "ethcore-builtin"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
bn = { git = "https://github.com/paritytech/bn", default-features = false }
ethereum-types = "0.6.0"
ethjson = { path = "../../json" }
ethkey = { path = "../../accounts/ethkey" }
keccak-hash = "0.2.0"
log = "0.4"
num = { version = "0.1", default-features = false, features = ["bigint"] }
parity-bytes = "0.1"
eip-152 = { path = "../../util/EIP-152" }
parity-crypto = "0.4.0"
byteorder = "1.3.2"
[dev-dependencies]
hex-literal = "0.2.1"

File diff suppressed because it is too large Load Diff

View File

@@ -19,6 +19,7 @@ memory-cache = { path = "../../util/memory-cache" }
[dev-dependencies] [dev-dependencies]
rustc-hex = "1.0" rustc-hex = "1.0"
criterion = "0.2" criterion = "0.2"
hex-literal = "0.2.0"
[features] [features]
evm-debug = [] evm-debug = []

View File

@@ -44,12 +44,18 @@ pub trait Finalize {
impl Finalize for Result<GasLeft> { impl Finalize for Result<GasLeft> {
fn finalize<E: Ext>(self, ext: E) -> Result<FinalizationResult> { fn finalize<E: Ext>(self, ext: E) -> Result<FinalizationResult> {
match self { match self {
Ok(GasLeft::Known(gas_left)) => Ok(FinalizationResult { gas_left: gas_left, apply_state: true, return_data: ReturnData::empty() }), Ok(GasLeft::Known(gas_left)) => {
Ok(GasLeft::NeedsReturn { gas_left, data, apply_state }) => ext.ret(&gas_left, &data, apply_state).map(|gas_left| FinalizationResult { Ok(FinalizationResult {
gas_left: gas_left, gas_left,
apply_state: apply_state, apply_state: true,
return_data: data, return_data: ReturnData::empty()
}), })
},
Ok(GasLeft::NeedsReturn { gas_left, data, apply_state }) => {
ext.ret(&gas_left, &data, apply_state).map(|gas_left|
FinalizationResult { gas_left, apply_state, return_data: data }
)
},
Err(err) => Err(err), Err(err) => Err(err),
} }
} }

View File

@@ -47,7 +47,7 @@ impl Factory {
/// for caching jump destinations. /// for caching jump destinations.
pub fn new(evm: VMType, cache_size: usize) -> Self { pub fn new(evm: VMType, cache_size: usize) -> Self {
Factory { Factory {
evm: evm, evm,
evm_cache: Arc::new(SharedCache::new(cache_size)), evm_cache: Arc::new(SharedCache::new(cache_size)),
} }
} }

View File

@@ -149,6 +149,10 @@ enum_with_from_u8! {
DIFFICULTY = 0x44, DIFFICULTY = 0x44,
#[doc = "get the block's gas limit"] #[doc = "get the block's gas limit"]
GASLIMIT = 0x45, GASLIMIT = 0x45,
#[doc = "get chain ID"]
CHAINID = 0x46,
#[doc = "get balance of own account"]
SELFBALANCE = 0x47,
#[doc = "remove item from stack"] #[doc = "remove item from stack"]
POP = 0x50, POP = 0x50,
@@ -442,12 +446,7 @@ pub struct InstructionInfo {
impl InstructionInfo { impl InstructionInfo {
/// Create new instruction info. /// Create new instruction info.
pub fn new(name: &'static str, args: usize, ret: usize, tier: GasPriceTier) -> Self { pub fn new(name: &'static str, args: usize, ret: usize, tier: GasPriceTier) -> Self {
InstructionInfo { InstructionInfo { name, args, ret, tier }
name: name,
args: args,
ret: ret,
tier: tier
}
} }
} }
@@ -504,6 +503,8 @@ lazy_static! {
arr[NUMBER as usize] = Some(InstructionInfo::new("NUMBER", 0, 1, GasPriceTier::Base)); arr[NUMBER as usize] = Some(InstructionInfo::new("NUMBER", 0, 1, GasPriceTier::Base));
arr[DIFFICULTY as usize] = Some(InstructionInfo::new("DIFFICULTY", 0, 1, GasPriceTier::Base)); arr[DIFFICULTY as usize] = Some(InstructionInfo::new("DIFFICULTY", 0, 1, GasPriceTier::Base));
arr[GASLIMIT as usize] = Some(InstructionInfo::new("GASLIMIT", 0, 1, GasPriceTier::Base)); arr[GASLIMIT as usize] = Some(InstructionInfo::new("GASLIMIT", 0, 1, GasPriceTier::Base));
arr[CHAINID as usize] = Some(InstructionInfo::new("CHAINID", 0, 1, GasPriceTier::Base));
arr[SELFBALANCE as usize] = Some(InstructionInfo::new("SELFBALANCE", 0, 1, GasPriceTier::Low));
arr[POP as usize] = Some(InstructionInfo::new("POP", 1, 0, GasPriceTier::Base)); arr[POP as usize] = Some(InstructionInfo::new("POP", 1, 0, GasPriceTier::Base));
arr[MLOAD as usize] = Some(InstructionInfo::new("MLOAD", 1, 1, GasPriceTier::VeryLow)); arr[MLOAD as usize] = Some(InstructionInfo::new("MLOAD", 1, 1, GasPriceTier::VeryLow));
arr[MSTORE as usize] = Some(InstructionInfo::new("MSTORE", 2, 0, GasPriceTier::VeryLow)); arr[MSTORE as usize] = Some(InstructionInfo::new("MSTORE", 2, 0, GasPriceTier::VeryLow));

View File

@@ -121,6 +121,10 @@ impl<Gas: evm::CostType> Gasometer<Gas> {
Request::Gas(Gas::from(1)) Request::Gas(Gas::from(1))
}, },
instructions::SSTORE => { instructions::SSTORE => {
if schedule.eip1706 && self.current_gas <= Gas::from(schedule.call_stipend) {
return Err(vm::Error::OutOfGas);
}
let address = BigEndianHash::from_uint(stack.peek(0)); let address = BigEndianHash::from_uint(stack.peek(0));
let newval = stack.peek(1); let newval = stack.peek(1);
let val = ext.storage_at(&address)?.into_uint(); let val = ext.storage_at(&address)?.into_uint();

View File

@@ -109,8 +109,6 @@ enum InstructionResult<Gas> {
Trap(TrapKind), Trap(TrapKind),
} }
enum Never {}
/// ActionParams without code, so that it can be feed into CodeReader. /// ActionParams without code, so that it can be feed into CodeReader.
#[derive(Debug)] #[derive(Debug)]
struct InterpreterParams { struct InterpreterParams {
@@ -168,12 +166,6 @@ pub enum InterpreterResult {
Trap(TrapKind), Trap(TrapKind),
} }
impl From<vm::Error> for InterpreterResult {
fn from(error: vm::Error) -> InterpreterResult {
InterpreterResult::Done(Err(error))
}
}
/// Intepreter EVM implementation /// Intepreter EVM implementation
pub struct Interpreter<Cost: CostType> { pub struct Interpreter<Cost: CostType> {
mem: Vec<u8>, mem: Vec<u8>,
@@ -284,6 +276,8 @@ impl<Cost: CostType> Interpreter<Cost> {
cache, params, reader, informant, cache, params, reader, informant,
valid_jump_destinations, gasometer, stack, valid_jump_destinations, gasometer, stack,
done: false, done: false,
// Overridden in `step_inner` based on
// the result of `ext.trace_next_instruction`.
do_trace: true, do_trace: true,
mem: Vec::new(), mem: Vec::new(),
return_data: ReturnData::empty(), return_data: ReturnData::empty(),
@@ -304,21 +298,26 @@ impl<Cost: CostType> Interpreter<Cost> {
let result = if self.gasometer.is_none() { let result = if self.gasometer.is_none() {
InterpreterResult::Done(Err(vm::Error::OutOfGas)) InterpreterResult::Done(Err(vm::Error::OutOfGas))
} else if self.reader.len() == 0 { } else if self.reader.len() == 0 {
InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_ref().expect("Gasometer None case is checked above; qed").current_gas.as_u256()))) let current_gas = self.gasometer
.as_ref()
.expect("Gasometer None case is checked above; qed")
.current_gas
.as_u256();
InterpreterResult::Done(Ok(GasLeft::Known(current_gas)))
} else { } else {
self.step_inner(ext).err().expect("step_inner never returns Ok(()); qed") self.step_inner(ext)
}; };
if let &InterpreterResult::Done(_) = &result { if let &InterpreterResult::Done(_) = &result {
self.done = true; self.done = true;
self.informant.done(); self.informant.done();
} }
return result; result
} }
/// Inner helper function for step. /// Inner helper function for step.
#[inline(always)] #[inline(always)]
fn step_inner(&mut self, ext: &mut vm::Ext) -> Result<Never, InterpreterResult> { fn step_inner(&mut self, ext: &mut dyn vm::Ext) -> InterpreterResult {
let result = match self.resume_result.take() { let result = match self.resume_result.take() {
Some(result) => result, Some(result) => result,
None => { None => {
@@ -333,22 +332,31 @@ impl<Cost: CostType> Interpreter<Cost> {
let instruction = match instruction { let instruction = match instruction {
Some(i) => i, Some(i) => i,
None => return Err(InterpreterResult::Done(Err(vm::Error::BadInstruction { None => return InterpreterResult::Done(Err(vm::Error::BadInstruction {
instruction: opcode instruction: opcode
}))), })),
}; };
let info = instruction.info(); let info = instruction.info();
self.last_stack_ret_len = info.ret; self.last_stack_ret_len = info.ret;
self.verify_instruction(ext, instruction, info)?; if let Err(e) = self.verify_instruction(ext, instruction, info) {
return InterpreterResult::Done(Err(e));
};
// Calculate gas cost // Calculate gas cost
let requirements = self.gasometer.as_mut().expect(GASOMETER_PROOF).requirements(ext, instruction, info, &self.stack, self.mem.size())?; let requirements = match self.gasometer.as_mut().expect(GASOMETER_PROOF).requirements(ext, instruction, info, &self.stack, self.mem.size()) {
Ok(t) => t,
Err(e) => return InterpreterResult::Done(Err(e)),
};
if self.do_trace { if self.do_trace {
ext.trace_prepare_execute(self.reader.position - 1, opcode, requirements.gas_cost.as_u256(), Self::mem_written(instruction, &self.stack), Self::store_written(instruction, &self.stack)); ext.trace_prepare_execute(self.reader.position - 1, opcode, requirements.gas_cost.as_u256(), Self::mem_written(instruction, &self.stack), Self::store_written(instruction, &self.stack));
} }
if let Err(e) = self.gasometer.as_mut().expect(GASOMETER_PROOF).verify_gas(&requirements.gas_cost) {
self.gasometer.as_mut().expect(GASOMETER_PROOF).verify_gas(&requirements.gas_cost)?; if self.do_trace {
ext.trace_failed();
}
return InterpreterResult::Done(Err(e));
}
self.mem.expand(requirements.memory_required_size); self.mem.expand(requirements.memory_required_size);
self.gasometer.as_mut().expect(GASOMETER_PROOF).current_mem_gas = requirements.memory_total_gas; self.gasometer.as_mut().expect(GASOMETER_PROOF).current_mem_gas = requirements.memory_total_gas;
self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas = self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas - requirements.gas_cost; self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas = self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas - requirements.gas_cost;
@@ -357,18 +365,24 @@ impl<Cost: CostType> Interpreter<Cost> {
// Execute instruction // Execute instruction
let current_gas = self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas; let current_gas = self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas;
let result = self.exec_instruction( let result = match self.exec_instruction(
current_gas, ext, instruction, requirements.provide_gas current_gas, ext, instruction, requirements.provide_gas
)?; ) {
Err(x) => {
if self.do_trace {
ext.trace_failed();
}
return InterpreterResult::Done(Err(x));
},
Ok(x) => x,
};
evm_debug!({ self.informant.after_instruction(instruction) }); evm_debug!({ self.informant.after_instruction(instruction) });
result result
}, },
}; };
if let InstructionResult::Trap(trap) = result { if let InstructionResult::Trap(trap) = result {
return Err(InterpreterResult::Trap(trap)); return InterpreterResult::Trap(trap);
} }
if let InstructionResult::UnusedGas(ref gas) = result { if let InstructionResult::UnusedGas(ref gas) = result {
@@ -390,28 +404,31 @@ impl<Cost: CostType> Interpreter<Cost> {
self.valid_jump_destinations = Some(self.cache.jump_destinations(&self.params.code_hash, &self.reader.code)); self.valid_jump_destinations = Some(self.cache.jump_destinations(&self.params.code_hash, &self.reader.code));
} }
let jump_destinations = self.valid_jump_destinations.as_ref().expect("jump_destinations are initialized on first jump; qed"); let jump_destinations = self.valid_jump_destinations.as_ref().expect("jump_destinations are initialized on first jump; qed");
let pos = self.verify_jump(position, jump_destinations)?; let pos = match self.verify_jump(position, jump_destinations) {
Ok(x) => x,
Err(e) => return InterpreterResult::Done(Err(e))
};
self.reader.position = pos; self.reader.position = pos;
}, },
InstructionResult::StopExecutionNeedsReturn {gas, init_off, init_size, apply} => { InstructionResult::StopExecutionNeedsReturn {gas, init_off, init_size, apply} => {
let mem = mem::replace(&mut self.mem, Vec::new()); let mem = mem::replace(&mut self.mem, Vec::new());
return Err(InterpreterResult::Done(Ok(GasLeft::NeedsReturn { return InterpreterResult::Done(Ok(GasLeft::NeedsReturn {
gas_left: gas.as_u256(), gas_left: gas.as_u256(),
data: mem.into_return_data(init_off, init_size), data: mem.into_return_data(init_off, init_size),
apply_state: apply apply_state: apply
}))); }));
}, },
InstructionResult::StopExecution => { InstructionResult::StopExecution => {
return Err(InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas.as_u256())))); return InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas.as_u256())));
}, },
_ => {}, _ => {},
} }
if self.reader.position >= self.reader.len() { if self.reader.position >= self.reader.len() {
return Err(InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas.as_u256())))); return InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas.as_u256())));
} }
Err(InterpreterResult::Continue) InterpreterResult::Continue
} }
fn verify_instruction(&self, ext: &vm::Ext, instruction: Instruction, info: &InstructionInfo) -> vm::Result<()> { fn verify_instruction(&self, ext: &vm::Ext, instruction: Instruction, info: &InstructionInfo) -> vm::Result<()> {
@@ -423,7 +440,9 @@ impl<Cost: CostType> Interpreter<Cost> {
((instruction == instructions::RETURNDATACOPY || instruction == instructions::RETURNDATASIZE) && !schedule.have_return_data) || ((instruction == instructions::RETURNDATACOPY || instruction == instructions::RETURNDATASIZE) && !schedule.have_return_data) ||
(instruction == instructions::REVERT && !schedule.have_revert) || (instruction == instructions::REVERT && !schedule.have_revert) ||
((instruction == instructions::SHL || instruction == instructions::SHR || instruction == instructions::SAR) && !schedule.have_bitwise_shifting) || ((instruction == instructions::SHL || instruction == instructions::SHR || instruction == instructions::SAR) && !schedule.have_bitwise_shifting) ||
(instruction == instructions::EXTCODEHASH && !schedule.have_extcodehash) (instruction == instructions::EXTCODEHASH && !schedule.have_extcodehash) ||
(instruction == instructions::CHAINID && !schedule.have_chain_id) ||
(instruction == instructions::SELFBALANCE && !schedule.have_selfbalance)
{ {
return Err(vm::Error::BadInstruction { return Err(vm::Error::BadInstruction {
instruction: instruction as u8 instruction: instruction as u8
@@ -838,6 +857,12 @@ impl<Cost: CostType> Interpreter<Cost> {
instructions::GASLIMIT => { instructions::GASLIMIT => {
self.stack.push(ext.env_info().gas_limit.clone()); self.stack.push(ext.env_info().gas_limit.clone());
}, },
instructions::CHAINID => {
self.stack.push(ext.chain_id().into())
},
instructions::SELFBALANCE => {
self.stack.push(ext.balance(&self.params.address)?);
}
// Stack instructions // Stack instructions

View File

@@ -33,6 +33,8 @@ extern crate log;
#[cfg(test)] #[cfg(test)]
extern crate rustc_hex; extern crate rustc_hex;
#[cfg(test)]
extern crate hex_literal;
pub mod evm; pub mod evm;
pub mod interpreter; pub mod interpreter;

View File

@@ -25,6 +25,7 @@ use vm::{self, ActionParams, ActionValue, Ext};
use vm::tests::{FakeExt, FakeCall, FakeCallType, test_finalize}; use vm::tests::{FakeExt, FakeCall, FakeCallType, test_finalize};
use factory::Factory; use factory::Factory;
use vmtype::VMType; use vmtype::VMType;
use hex_literal::hex;
evm_test!{test_add: test_add_int} evm_test!{test_add: test_add_int}
fn test_add(factory: super::Factory) { fn test_add(factory: super::Factory) {
@@ -108,6 +109,32 @@ fn test_origin(factory: super::Factory) {
assert_store(&ext, 0, "000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681"); assert_store(&ext, 0, "000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681");
} }
evm_test!{test_selfbalance: test_selfbalance_int}
fn test_selfbalance(factory: super::Factory) {
let own_addr = Address::from_str("1337000000000000000000000000000000000000").unwrap();
// 47 SELFBALANCE
// 60 ff PUSH ff
// 55 SSTORE
let code = hex!("47 60 ff 55").to_vec();
let mut params = ActionParams::default();
params.address = own_addr.clone();
params.gas = U256::from(100_000);
params.code = Some(Arc::new(code));
let mut ext = FakeExt::new_istanbul();
ext.balances = {
let mut x = HashMap::new();
x.insert(own_addr, U256::from(1_025)); // 0x401
x
};
let gas_left = {
let vm = factory.create(params, ext.schedule(), ext.depth());
test_finalize(vm.exec(&mut ext).ok().unwrap()).unwrap()
};
assert_eq!(gas_left, U256::from(79_992)); // TODO[dvdplm]: do the sums here, SELFBALANCE-5 + PUSH1-3 + ONEBYTE-4 + SSTORE-?? = 100_000 - 79_992
assert_store(&ext, 0xff, "0000000000000000000000000000000000000000000000000000000000000401");
}
evm_test!{test_sender: test_sender_int} evm_test!{test_sender: test_sender_int}
fn test_sender(factory: super::Factory) { fn test_sender(factory: super::Factory) {
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap(); let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
@@ -130,6 +157,27 @@ fn test_sender(factory: super::Factory) {
assert_store(&ext, 0, "000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681"); assert_store(&ext, 0, "000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681");
} }
evm_test!{test_chain_id: test_chain_id_int}
fn test_chain_id(factory: super::Factory) {
// 46 CHAINID
// 60 00 PUSH 0
// 55 SSTORE
let code = hex!("46 60 00 55").to_vec();
let mut params = ActionParams::default();
params.gas = U256::from(100_000);
params.code = Some(Arc::new(code));
let mut ext = FakeExt::new_istanbul().with_chain_id(9);
let gas_left = {
let vm = factory.create(params, ext.schedule(), ext.depth());
test_finalize(vm.exec(&mut ext).ok().unwrap()).unwrap()
};
assert_eq!(gas_left, U256::from(79_995));
assert_store(&ext, 0, "0000000000000000000000000000000000000000000000000000000000000009");
}
evm_test!{test_extcodecopy: test_extcodecopy_int} evm_test!{test_extcodecopy: test_extcodecopy_int}
fn test_extcodecopy(factory: super::Factory) { fn test_extcodecopy(factory: super::Factory) {
// 33 - sender // 33 - sender
@@ -262,7 +310,6 @@ fn test_calldataload(factory: super::Factory) {
assert_eq!(gas_left, U256::from(79_991)); assert_eq!(gas_left, U256::from(79_991));
assert_store(&ext, 0, "23ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff23"); assert_store(&ext, 0, "23ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff23");
} }
evm_test!{test_author: test_author_int} evm_test!{test_author: test_author_int}

View File

@@ -82,21 +82,6 @@ impl PodAccount {
} }
} }
impl From<ethjson::blockchain::Account> for PodAccount {
fn from(a: ethjson::blockchain::Account) -> Self {
PodAccount {
balance: a.balance.into(),
nonce: a.nonce.into(),
code: Some(a.code.into()),
storage: a.storage.into_iter().map(|(key, value)| {
let key: U256 = key.into();
let value: U256 = value.into();
(BigEndianHash::from_uint(&key), BigEndianHash::from_uint(&value))
}).collect(),
}
}
}
impl From<ethjson::spec::Account> for PodAccount { impl From<ethjson::spec::Account> for PodAccount {
fn from(a: ethjson::spec::Account) -> Self { fn from(a: ethjson::spec::Account) -> Self {
PodAccount { PodAccount {

View File

@@ -37,7 +37,7 @@ serde_derive = "1.0"
serde_json = "1.0" serde_json = "1.0"
time-utils = { path = "../../util/time-utils" } time-utils = { path = "../../util/time-utils" }
tiny-keccak = "1.4" tiny-keccak = "1.4"
transaction-pool = "2.0" transaction-pool = "2.0.1"
url = "1" url = "1"
[dev-dependencies] [dev-dependencies]

View File

@@ -285,7 +285,7 @@ impl Provider {
let mut state_buf = [0u8; 64]; let mut state_buf = [0u8; 64];
state_buf[..32].clone_from_slice(state_hash.as_bytes()); state_buf[..32].clone_from_slice(state_hash.as_bytes());
state_buf[32..].clone_from_slice(nonce_h256.as_bytes()); state_buf[32..].clone_from_slice(nonce_h256.as_bytes());
keccak(&state_buf.as_ref()) keccak(AsRef::<[u8]>::as_ref(&state_buf[..]))
} }
fn pool_client<'a>(&'a self, nonce_cache: &'a NonceCache, local_accounts: &'a HashSet<Address>) -> miner::pool_client::PoolClient<'a, Client> { fn pool_client<'a>(&'a self, nonce_cache: &'a NonceCache, local_accounts: &'a HashSet<Address>) -> miner::pool_client::PoolClient<'a, Client> {

View File

@@ -46,9 +46,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" } "9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }
} }
} }

View File

@@ -49,9 +49,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }, "9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" },
"0000000000000000000000000000000000000042": { "0000000000000000000000000000000000000042": {
"balance": "1", "balance": "1",

View File

@@ -38,9 +38,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" } "9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }
} }
} }

View File

@@ -34,9 +34,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0000000000000000000000000000000000001337": { "balance": "1", "constructor": "60606040526000805460ff19166001179055346000575b6075806100246000396000f300606060405263ffffffff60e060020a60003504166394b91deb81146022575b6000565b34600057602c6040565b604080519115158252519081900360200190f35b60005460ff16815600a165627a7a723058207882eb60ebce23178b3fa06d4cd8e5adc17711937ccddacb18a04abca2a2c9ee0029" } "0000000000000000000000000000000000001337": { "balance": "1", "constructor": "60606040526000805460ff19166001179055346000575b6075806100246000396000f300606060405263ffffffff60e060020a60003504166394b91deb81146022575b6000565b34600057602c6040565b604080519115158252519081900360200190f35b60005460ff16815600a165627a7a723058207882eb60ebce23178b3fa06d4cd8e5adc17711937ccddacb18a04abca2a2c9ee0029" }
} }
} }

View File

@@ -54,8 +54,46 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

View File

@@ -72,9 +72,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 20, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 20, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 20, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 20, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 20, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 20,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 20,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 20,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"183394f52b2c8c034835edba3bcececa6f60b5a8": { "183394f52b2c8c034835edba3bcececa6f60b5a8": {
"balance": "100491852286952719463755404" "balance": "100491852286952719463755404"
} }

View File

@@ -3917,10 +3917,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x85d9a0", "activate_at": "0x85d9a0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@@ -3929,10 +3930,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x85d9a0", "activate_at": "0x85d9a0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@@ -3941,10 +3943,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x85d9a0", "activate_at": "0x85d9a0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@@ -58,8 +58,46 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

View File

@@ -46,8 +46,46 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 100 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 100 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 2000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x00",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

View File

@@ -66,8 +66,46 @@
"0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 2000000, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 2000000, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": 2000000, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": 2000000, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": 2000000, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": 2000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 2000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 2000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

File diff suppressed because one or more lines are too long

View File

@@ -76,9 +76,47 @@
"0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0xC3500", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0xC3500", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0xC3500", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0xC3500", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0xC3500", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": "0xC3500",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0xC3500",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0xC3500",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"bb94f0ceb32257275b2a7a9c094c13e469b4563e": { "bb94f0ceb32257275b2a7a9c094c13e469b4563e": {
"balance": "10000000000000000000000000" "balance": "10000000000000000000000000"
}, },

View File

@@ -3921,10 +3921,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x42ae50", "activate_at": "0x42ae50",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@@ -3933,10 +3934,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x42ae50", "activate_at": "0x42ae50",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@@ -3945,10 +3947,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x42ae50", "activate_at": "0x42ae50",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@@ -26,6 +26,11 @@
"eip1052Transition": "0x0", "eip1052Transition": "0x0",
"eip1283Transition": "0x0", "eip1283Transition": "0x0",
"eip1283DisableTransition": "0x0", "eip1283DisableTransition": "0x0",
"eip1283ReenableTransition": "0x17d433",
"eip1344Transition": "0x17d433",
"eip1706Transition": "0x17d433",
"eip1884Transition": "0x17d433",
"eip2028Transition": "0x17d433",
"gasLimitBoundDivisor": "0x400", "gasLimitBoundDivisor": "0x400",
"maxCodeSize": "0x6000", "maxCodeSize": "0x6000",
"maxCodeSizeTransition": "0x0", "maxCodeSizeTransition": "0x0",
@@ -125,11 +130,12 @@
"balance": "0x1", "balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x0", "activate_at": "0x00",
"eip1108_transition": "0x17d433",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@@ -138,11 +144,12 @@
"balance": "0x1", "balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x0", "activate_at": "0x00",
"eip1108_transition": "0x17d433",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@@ -151,17 +158,29 @@
"balance": "0x1", "balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x0", "activate_at": "0x00",
"eip1108_transition": "0x17d433",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }
}, },
"0x0000000000000000000000000000000000000009": { "0x0000000000000000000000000000000000000009": {
"balance": "0x1" "balance": "0x1",
"builtin": {
"name": "blake2_f",
"activate_at": "0x17d433",
"pricing": {
"blake2_f": {
"gas_per_round": 1
}
}
}
}, },
"0x000000000000000000000000000000000000000a": { "0x000000000000000000000000000000000000000a": {
"balance": "0x1" "balance": "0x1"

View File

@@ -0,0 +1,120 @@
{
"name": "Istanbul (test)",
"engine": {
"Ethash": {
"params": {
"minimumDifficulty": "0x020000",
"difficultyBoundDivisor": "0x0800",
"durationLimit": "0x0d",
"blockReward": "0x1BC16D674EC80000",
"homesteadTransition": "0x0",
"eip100bTransition": "0x0",
"difficultyBombDelays": {
"0": 5000000
}
}
}
},
"params": {
"gasLimitBoundDivisor": "0x0400",
"registrar" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b",
"accountStartNonce": "0x00",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x1",
"maxCodeSize": 24576,
"maxCodeSizeTransition": "0x0",
"eip150Transition": "0x0",
"eip160Transition": "0x0",
"eip161abcTransition": "0x0",
"eip161dTransition": "0x0",
"eip140Transition": "0x0",
"eip211Transition": "0x0",
"eip214Transition": "0x0",
"eip155Transition": "0x0",
"eip658Transition": "0x0",
"eip145Transition": "0x0",
"eip1014Transition": "0x0",
"eip1052Transition": "0x0",
"eip1283Transition": "0x0",
"eip1283DisableTransition": "0x0",
"eip1283ReenableTransition": "0x0",
"eip1344Transition": "0x0",
"eip1706Transition": "0x0",
"eip1884Transition": "0x0",
"eip2028Transition": "0x0"
},
"genesis": {
"seal": {
"ethereum": {
"nonce": "0x0000000000000042",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x400000000",
"author": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
"gasLimit": "0x1388"
},
"accounts": {
"0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
"0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": {
"builtin": {
"name": "alt_bn128_add",
"activate_at": "0x00",
"eip1108_transition": "0x0",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x00",
"eip1108_transition": "0x0",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x00",
"eip1108_transition": "0x0",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0000000000000000000000000000000000000009": {
"builtin": {
"name": "blake2_f",
"activate_at": "0x00",
"pricing": {
"blake2_f": {
"gas_per_round": 1
}
}
}
}
}
}

View File

@@ -117,10 +117,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0xaef49", "activate_at": "0xaef49",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@@ -130,10 +131,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0xaef49", "activate_at": "0xaef49",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@@ -143,10 +145,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0xaef49", "activate_at": "0xaef49",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@@ -64,6 +64,11 @@
"eip1052Transition": "0x8c6180", "eip1052Transition": "0x8c6180",
"eip1283Transition": "0x8c6180", "eip1283Transition": "0x8c6180",
"eip1283DisableTransition": "0x9c7b61", "eip1283DisableTransition": "0x9c7b61",
"eip1283ReenableTransition": "0xd751a5",
"eip1344Transition": "0xd751a5",
"eip1706Transition": "0xd751a5",
"eip1884Transition": "0xd751a5",
"eip2028Transition": "0xd751a5",
"kip4Transition": "0x8c6180", "kip4Transition": "0x8c6180",
"kip6Transition": "0x8c6180" "kip6Transition": "0x8c6180"
}, },
@@ -5344,10 +5349,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x4d50f8", "activate_at": "0x4d50f8",
"eip1108_transition": "0xd751a5",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@@ -5356,10 +5362,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x4d50f8", "activate_at": "0x4d50f8",
"eip1108_transition": "0xd751a5",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@@ -5368,10 +5375,24 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x4d50f8", "activate_at": "0x4d50f8",
"eip1108_transition": "0xd751a5",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0x0000000000000000000000000000000000000009": {
"builtin": {
"name": "blake2_f",
"activate_at": "0xd751a5",
"pricing": {
"blake2_f": {
"gas_per_round": 1
} }
} }
} }
@@ -5382,6 +5403,8 @@
}, },
"nodes": [ "nodes": [
"enode://f6e37b943bad3a78cb8589b1798d30d210ffd39cfcd2c8f2de4f098467fd49c667980100d919da7ca46cd50505d30989abda87f0b9339377de13d6592c22caf8@34.198.49.72:30303", "enode://f6e37b943bad3a78cb8589b1798d30d210ffd39cfcd2c8f2de4f098467fd49c667980100d919da7ca46cd50505d30989abda87f0b9339377de13d6592c22caf8@34.198.49.72:30303",
"enode://16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45@116.203.116.241:30303",
"enode://2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0@3.217.96.11:30303",
"enode://56abaf065581a5985b8c5f4f88bd202526482761ba10be9bfdcd14846dd01f652ec33fde0f8c0fd1db19b59a4c04465681fcef50e11380ca88d25996191c52de@40.71.221.215:30303", "enode://56abaf065581a5985b8c5f4f88bd202526482761ba10be9bfdcd14846dd01f652ec33fde0f8c0fd1db19b59a4c04465681fcef50e11380ca88d25996191c52de@40.71.221.215:30303",
"enode://d07827483dc47b368eaf88454fb04b41b7452cf454e194e2bd4c14f98a3278fed5d819dbecd0d010407fc7688d941ee1e58d4f9c6354d3da3be92f55c17d7ce3@52.166.117.77:30303", "enode://d07827483dc47b368eaf88454fb04b41b7452cf454e194e2bd4c14f98a3278fed5d819dbecd0d010407fc7688d941ee1e58d4f9c6354d3da3be92f55c17d7ce3@52.166.117.77:30303",
"enode://38e6e7fd416293ed120d567a2675fe078c0205ab0671abf16982ce969823bd1f3443d590c18b321dfae7dcbe1f6ba98ef8702f255c3c9822a188abb82c53adca@51.77.66.187:30303", "enode://38e6e7fd416293ed120d567a2675fe078c0205ab0671abf16982ce969823bd1f3443d590c18b321dfae7dcbe1f6ba98ef8702f255c3c9822a188abb82c53adca@51.77.66.187:30303",

View File

@@ -60,9 +60,47 @@
"0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0x0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 5067000, "pricing": { "modexp": { "divisor": 20 } } } }, "0x0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 5067000, "pricing": { "modexp": { "divisor": 20 } } } },
"0x0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": 5067000, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0x0000000000000000000000000000000000000006": {
"0x0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": 5067000, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0x0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": 5067000, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": 5067000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0x0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 5067000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0x0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 5067000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0x00521965e7bd230323c423d96c657db5b79d099f": { "balance": "1606938044258990275541962092341162602522202993782792835301376" } "0x00521965e7bd230323c423d96c657db5b79d099f": { "balance": "1606938044258990275541962092341162602522202993782792835301376" }
}, },
"nodes": [ "nodes": [

View File

@@ -120,38 +120,43 @@
} }
} }
}, },
"0000000000000000000000000000000000000006":{ "0000000000000000000000000000000000000006": {
"builtin":{ "builtin": {
"name":"alt_bn128_add", "name": "alt_bn128_add",
"activate_at":"0x7fffffffffffff", "activate_at":"0x7fffffffffffff",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"linear":{ "pricing": {
"base":500, "alt_bn128_const_operations": {
"word":0 "price": 500,
"eip1108_transition_price": 150
} }
} }
} }
}, },
"0000000000000000000000000000000000000007":{ "0000000000000000000000000000000000000007": {
"builtin":{ "builtin": {
"name":"alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at":"0x7fffffffffffff", "activate_at":"0x7fffffffffffff",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"linear":{ "pricing": {
"base":40000, "alt_bn128_const_operations": {
"word":0 "price": 40000,
"eip1108_transition_price": 6000
} }
} }
} }
}, },
"0000000000000000000000000000000000000008":{ "0000000000000000000000000000000000000008": {
"builtin":{ "builtin": {
"name":"alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at":"0x7fffffffffffff", "activate_at":"0x7fffffffffffff",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"alt_bn128_pairing":{ "pricing": {
"base":100000, "alt_bn128_pairing": {
"pair":80000 "base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@@ -62,9 +62,47 @@
"0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 3000000, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 3000000, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": 3000000, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": 3000000, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": 3000000, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": 3000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 3000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 3000000,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"97c7f4f8f0bbf384578a9f5754ae73f37ff49ec2": { "balance": "55000000000000000000000000" } "97c7f4f8f0bbf384578a9f5754ae73f37ff49ec2": { "balance": "55000000000000000000000000" }
} }
} }

View File

@@ -90,10 +90,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x4829ba", "activate_at": "0x4829ba",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@@ -102,10 +103,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x4829ba", "activate_at": "0x4829ba",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@@ -114,10 +116,13 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x4829ba", "activate_at": "0x4829ba",
"eip1108_transition": "0x7fffffffffffff",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@@ -128,38 +128,43 @@
} }
} }
}, },
"0000000000000000000000000000000000000006":{ "0000000000000000000000000000000000000006": {
"builtin":{ "builtin": {
"name":"alt_bn128_add", "name": "alt_bn128_add",
"activate_at":"0x21e88e", "activate_at":"0x21e88e",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"linear":{ "pricing": {
"base":500, "alt_bn128_const_operations": {
"word":0 "price": 500,
"eip1108_transition_price": 150
} }
} }
} }
}, },
"0000000000000000000000000000000000000007":{ "0000000000000000000000000000000000000007": {
"builtin":{ "builtin": {
"name":"alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at":"0x21e88e", "activate_at":"0x21e88e",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"linear":{ "pricing": {
"base":40000, "alt_bn128_const_operations": {
"word":0 "price": 40000,
"eip1108_transition_price": 6000
} }
} }
} }
}, },
"0000000000000000000000000000000000000008":{ "0000000000000000000000000000000000000008": {
"builtin":{ "builtin": {
"name":"alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at":"0x21e88e", "activate_at":"0x21e88e",
"pricing":{ "eip1108_transition": "0x7fffffffffffff",
"alt_bn128_pairing":{ "pricing": {
"base":100000, "alt_bn128_pairing": {
"pair":80000 "base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }

View File

@@ -51,7 +51,6 @@
}, },
"nodes": [ "nodes": [
"enode://6e3d1b39cbd2a9c4f053a27e68fd90d0bac83691dfdc4a13c59f2555078a71e63c5daaee5a82aa6db500512760a5456f86076bf8bbe8011c27c82ed7d6f5fb26@45.77.140.210:30303", "enode://6e3d1b39cbd2a9c4f053a27e68fd90d0bac83691dfdc4a13c59f2555078a71e63c5daaee5a82aa6db500512760a5456f86076bf8bbe8011c27c82ed7d6f5fb26@45.77.140.210:30303",
"enode://f4698ad485a027497e1cc992bb5f7cecee2b32a44c47202738d8d0eecfab719541988d0cbcbc5ea94c6c959e5cddeb85fc6ae75fb63dc3bf87cdbe9e6f615e9d@206.156.242.64:30303",
"enode://31dffed97f8fed1f34fe66453280a89cbeeda60cf28f6fbb212ebbefd7c7566a02c1c7d5c00bbbb49b9fa8a49f157e0f786f379ca9bcbf2fea24de70d70a22b6@206.156.242.61:30303", "enode://31dffed97f8fed1f34fe66453280a89cbeeda60cf28f6fbb212ebbefd7c7566a02c1c7d5c00bbbb49b9fa8a49f157e0f786f379ca9bcbf2fea24de70d70a22b6@206.156.242.61:30303",
"enode://6bdc7553ab2e4914cb47774c1e6d8c8f47ac7c3981891f85f65d06f208ea1bc4d3bf982b330950e0a0cd127efd7145c4df7113159a1d4a06ed722e6c16d0ac6c@45.32.215.190:30303", "enode://6bdc7553ab2e4914cb47774c1e6d8c8f47ac7c3981891f85f65d06f208ea1bc4d3bf982b330950e0a0cd127efd7145c4df7113159a1d4a06ed722e6c16d0ac6c@45.32.215.190:30303",
"enode://872d82a24144bc007658fb6fac0dcdfb9b63aeb05ef563a06d0186f2d1e5ffbfc5c4f1244891a8a86ef70682b9d24382e654b305224883698862e2df647a4d23@45.76.236.247:30303", "enode://872d82a24144bc007658fb6fac0dcdfb9b63aeb05ef563a06d0186f2d1e5ffbfc5c4f1244891a8a86ef70682b9d24382e654b305224883698862e2df647a4d23@45.76.236.247:30303",
@@ -60,10 +59,47 @@
], ],
"accounts": { "accounts": {
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x0", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x0", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x0", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x0", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x0", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0x0000000000000000000000000000000000000001": { "0x0000000000000000000000000000000000000001": {
"balance": "1", "balance": "1",
"builtin": { "builtin": {

View File

@@ -58,16 +58,54 @@
"enode://8e0af07c86ec36590bb6368e7ad0c45b6dc658f5fb66ec68889a614affddda5e021bd513bcf4fb2fae4a3bbe08cf0de84f037cd58478a89665dfce1ded2595c7@34.236.37.74:30303", "enode://8e0af07c86ec36590bb6368e7ad0c45b6dc658f5fb66ec68889a614affddda5e021bd513bcf4fb2fae4a3bbe08cf0de84f037cd58478a89665dfce1ded2595c7@34.236.37.74:30303",
"enode://f1a5100a81cb73163ae450c584d06b1f644aa4fad4486c6aeb4c384b343c54bb66c744aa5f133af66ea1b25f0f4a454f04878f3e96ee4cd2390c047396d6357b@209.97.158.4:30303", "enode://f1a5100a81cb73163ae450c584d06b1f644aa4fad4486c6aeb4c384b343c54bb66c744aa5f133af66ea1b25f0f4a454f04878f3e96ee4cd2390c047396d6357b@209.97.158.4:30303",
"enode://0d1e0372f63a3f0b82d66635ea101ecc0f6797788a078805cc933dd93e6a22f7c9fa51ab4e2d21da02d04480ef19f3bbb9a2b41dd1c262085d295a354bb8b0f9@18.217.47.209:30303", "enode://0d1e0372f63a3f0b82d66635ea101ecc0f6797788a078805cc933dd93e6a22f7c9fa51ab4e2d21da02d04480ef19f3bbb9a2b41dd1c262085d295a354bb8b0f9@18.217.47.209:30303",
"enode://ab083db73da15b3995ac9c68035cdb32901835a823cb848fccb672e43dd21f14428706118d6fe5b921d8e741f122f35aad0255bc86807b1d17bcfa1e86e40a14@165.227.37.104:30303", "enode://875e1bd1b98019a5d6d588c23f68534b75462dd6ecbb3dd058221dbf7aa923f0ab782ab93bb82d42edc9996f7f0816a318bdc761e55c02b95e1169cef66f7edc@159.203.24.35:30303",
"enode://8e0af07c86ec36590bb6368e7ad0c45b6dc658f5fb66ec68889a614affddda5e021bd513bcf4fb2fae4a3bbe08cf0de84f037cd58478a89665dfce1ded2595c7@34.236.37.74:30303", "enode://8e0af07c86ec36590bb6368e7ad0c45b6dc658f5fb66ec68889a614affddda5e021bd513bcf4fb2fae4a3bbe08cf0de84f037cd58478a89665dfce1ded2595c7@34.236.37.74:30303",
"enode://182ee200ca134dc4d6390f3d5aadbcd80df0f7f24335830335d142573eacce4eeb919d30e82c5df588034e167e6ba6dd11187502ac9264a71005127f6b146a99@159.203.95.241:30303", "enode://182ee200ca134dc4d6390f3d5aadbcd80df0f7f24335830335d142573eacce4eeb919d30e82c5df588034e167e6ba6dd11187502ac9264a71005127f6b146a99@159.203.95.241:30303",
"enode://b022ff70b5fcaf9596ae5efed99a8198b4ae0578ee9d17b733609d803a75cef95d3a2a18e50dca9a7c3b26139f158c59eaf8b5fb8d1d331c9a46934a78acabe8@206.189.76.128:30303" "enode://b022ff70b5fcaf9596ae5efed99a8198b4ae0578ee9d17b733609d803a75cef95d3a2a18e50dca9a7c3b26139f158c59eaf8b5fb8d1d331c9a46934a78acabe8@206.189.76.128:30303"
], ],
"accounts": { "accounts": {
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x0", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x0", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x0", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x0", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x0", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0x0000000000000000000000000000000000000001": { "0x0000000000000000000000000000000000000001": {
"balance": "1", "balance": "1",

View File

@@ -26,6 +26,11 @@
"eip1052Transition": "0x37db77", "eip1052Transition": "0x37db77",
"eip1283Transition": "0x37db77", "eip1283Transition": "0x37db77",
"eip1283DisableTransition": "0x41efd2", "eip1283DisableTransition": "0x41efd2",
"eip1283ReenableTransition": "0x52efd1",
"eip1344Transition": "0x52efd1",
"eip1706Transition": "0x52efd1",
"eip1884Transition": "0x52efd1",
"eip2028Transition": "0x52efd1",
"gasLimitBoundDivisor": "0x400", "gasLimitBoundDivisor": "0x400",
"maxCodeSize": "0x6000", "maxCodeSize": "0x6000",
"maxCodeSizeTransition": "0x0", "maxCodeSizeTransition": "0x0",
@@ -117,46 +122,57 @@
} }
}, },
"0x0000000000000000000000000000000000000006": { "0x0000000000000000000000000000000000000006": {
"balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0xfcc25", "activate_at": "0xfcc25",
"eip1108_transition": "0x52efd1",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
}, },
"0x0000000000000000000000000000000000000007": { "0x0000000000000000000000000000000000000007": {
"balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0xfcc25", "activate_at": "0xfcc25",
"eip1108_transition": "0x52efd1",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
}, },
"0x0000000000000000000000000000000000000008": { "0x0000000000000000000000000000000000000008": {
"balance": "0x1",
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0xfcc25", "activate_at": "0xfcc25",
"eip1108_transition": "0x52efd1",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }
}, },
"0x0000000000000000000000000000000000000009": { "0x0000000000000000000000000000000000000009": {
"balance": "0x1" "balance": "0x1",
"builtin": {
"name": "blake2_f",
"activate_at": "0x52efd1",
"pricing": {
"blake2_f": {
"gas_per_round": 1
}
}
}
}, },
"0x000000000000000000000000000000000000000a": { "0x000000000000000000000000000000000000000a": {
"balance": "0x1" "balance": "0x1"

View File

@@ -45,7 +45,12 @@
"eip1014Transition": "0x408b70", "eip1014Transition": "0x408b70",
"eip1052Transition": "0x408b70", "eip1052Transition": "0x408b70",
"eip1283Transition": "0x408b70", "eip1283Transition": "0x408b70",
"eip1283DisableTransition": "0x4b5e82" "eip1283DisableTransition": "0x4b5e82",
"eip1283ReenableTransition": "0x62f756",
"eip1344Transition": "0x62f756",
"eip1706Transition": "0x62f756",
"eip1884Transition": "0x62f756",
"eip2028Transition": "0x62f756"
}, },
"genesis": { "genesis": {
"seal": { "seal": {
@@ -2735,10 +2740,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_add", "name": "alt_bn128_add",
"activate_at": "0x19f0a0", "activate_at": "0x19f0a0",
"eip1108_transition": "0x62f756",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 500, "price": 500,
"word": 0 "eip1108_transition_price": 150
} }
} }
} }
@@ -2749,10 +2755,11 @@
"builtin": { "builtin": {
"name": "alt_bn128_mul", "name": "alt_bn128_mul",
"activate_at": "0x19f0a0", "activate_at": "0x19f0a0",
"eip1108_transition": "0x62f756",
"pricing": { "pricing": {
"linear": { "alt_bn128_const_operations": {
"base": 40000, "price": 40000,
"word": 0 "eip1108_transition_price": 6000
} }
} }
} }
@@ -2763,16 +2770,28 @@
"builtin": { "builtin": {
"name": "alt_bn128_pairing", "name": "alt_bn128_pairing",
"activate_at": "0x19f0a0", "activate_at": "0x19f0a0",
"eip1108_transition": "0x62f756",
"pricing": { "pricing": {
"alt_bn128_pairing": { "alt_bn128_pairing": {
"base": 100000, "base": 100000,
"pair": 80000 "pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
} }
} }
} }
}, },
"0x0000000000000000000000000000000000000009": { "0x0000000000000000000000000000000000000009": {
"balance": "0x1" "balance": "0x1",
"builtin": {
"name": "blake2_f",
"activate_at": "0x62f756",
"pricing": {
"blake2_f": {
"gas_per_round": 1
}
}
}
}, },
"0x000000000000000000000000000000000000000a": { "0x000000000000000000000000000000000000000a": {
"balance": "0x0" "balance": "0x0"

View File

@@ -36,6 +36,7 @@
"eip145Transition": "0x0", "eip145Transition": "0x0",
"eip1014Transition": "0x0", "eip1014Transition": "0x0",
"eip1052Transition": "0x0", "eip1052Transition": "0x0",
"eip1283Transition": "0x0",
"eip1283DisableTransition": "0x0" "eip1283DisableTransition": "0x0"
}, },
"genesis": { "genesis": {
@@ -58,8 +59,46 @@
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

View File

@@ -1,4 +1,57 @@
{ {
"block": [], "block": [
"state": [] {
"reference": "Issue https://github.com/paritytech/parity-ethereum/issues/11073 (also see https://github.com/paritytech/parity-ethereum/pull/10923)",
"failing": "stRevertTest",
"subtests": [
"RevertPrecompiledTouch_d0g0v0_Byzantium",
"RevertPrecompiledTouch_d0g0v0_Constantinople",
"RevertPrecompiledTouch_d0g0v0_ConstantinopleFix",
"RevertPrecompiledTouch_d0g0v0_EIP158",
"RevertPrecompiledTouch_d3g0v0_ConstantinopleFix",
"RevertPrecompiledTouchCC_d0g0v0_Byzantium",
"RevertPrecompiledTouchCC_d0g0v0_Constantinople",
"RevertPrecompiledTouchCC_d0g0v0_EIP158",
"RevertPrecompiledTouchDC_d0g0v0_Byzantium",
"RevertPrecompiledTouchDC_d0g0v0_Constantinople",
"RevertPrecompiledTouchDC_d0g0v0_EIP158",
"RevertPrecompiledTouchExactOOG_d7g1v0_ConstantinopleFix",
"RevertPrecompiledTouchExactOOG_d31g1v0_ConstantinopleFix",
"RevertPrecompiledTouch_storage_d3g0v0_ConstantinopleFix",
"RevertPrecompiledTouch_storage_d0g0v0_ConstantinopleFix"
]
}
],
"state": [
{
"reference": "Issue https://github.com/paritytech/parity-ethereum/issues/11078 (also see https://github.com/paritytech/parity-ethereum/pull/10923)",
"failing": "stRevertTest",
"subtests": {
"RevertPrecompiledTouch_storage": {
"subnumbers": ["1", "2"],
"chain": "St. Peter's (test)"
}
}
},
{
"reference": "Issue https://github.com/paritytech/parity-ethereum/issues/11079 (also see https://github.com/paritytech/parity-ethereum/pull/10923)",
"failing": "stRevertTest",
"subtests": {
"RevertPrecompiledTouchExactOOG": {
"subnumbers": ["61", "64"],
"chain": "St. Peter's (test)"
}
}
},
{
"reference": "Issue https://github.com/paritytech/parity-ethereum/issues/11080 (also see https://github.com/paritytech/parity-ethereum/pull/10923)",
"failing": "stRevertTest",
"subtests": {
"RevertPrecompiledTouch": {
"subnumbers": ["1", "2"],
"chain": "St. Peter's (test)"
}
}
}
]
} }

File diff suppressed because one or more lines are too long

View File

@@ -57,9 +57,46 @@
"0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } }, "0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "5", "pricing": { "modexp": { "divisor": 100 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "5", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "builtin": {
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "5", "pricing": { "linear": { "base": 2000, "word": 0 } } } }, "name": "alt_bn128_add",
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "5", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } "activate_at": "5",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "5",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "5",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
}
} }
} }

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,157 @@
{
"name": "xDai Chain",
"dataDir": "xdai",
"engine": {
"authorityRound": {
"params": {
"stepDuration": 5,
"blockReward": "0x0",
"maximumUncleCountTransition": 0,
"maximumUncleCount": 0,
"validators": {
"multi": {
"0": {
"list": ["0xcace5b3c29211740e595850e80478416ee77ca21"]
},
"1300": {
"safeContract": "0x22e1229a2c5b95a60983b5577f745a603284f535"
}
}
},
"blockRewardContractAddress": "0x867305d19606aadba405ce534e303d0e225f9556",
"blockRewardContractTransition": 1310
}
}
},
"params": {
"gasLimitBoundDivisor": "0x400",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID": "100",
"eip140Transition": "0x0",
"eip211Transition": "0x0",
"eip214Transition": "0x0",
"eip658Transition": "0x0",
"eip145Transition": 1604400,
"eip1014Transition": 1604400,
"eip1052Transition": 1604400,
"eip1283Transition": 1604400,
"eip1283DisableTransition": 2508800,
"registrar": "0x1ec97dc137f5168af053c24460a1200502e1a9d2"
},
"genesis": {
"seal": {
"authorityRound": {
"step": "0x0",
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x20000",
"gasLimit": "0x989680"
},
"accounts": {
"0000000000000000000000000000000000000005": {
"builtin": {
"name": "modexp",
"activate_at": "0x0",
"pricing": {
"modexp": {
"divisor": 20
}
}
}
},
"0000000000000000000000000000000000000006": {
"builtin": {
"name": "alt_bn128_add",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": "0x0",
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"0x0000000000000000000000000000000000000001": {
"balance": "1",
"builtin": {
"name": "ecrecover",
"pricing": {
"linear": {
"base": 3000,
"word": 0
}
}
}
},
"0x0000000000000000000000000000000000000002": {
"balance": "1",
"builtin": {
"name": "sha256",
"pricing": {
"linear": {
"base": 60,
"word": 12
}
}
}
},
"0x0000000000000000000000000000000000000003": {
"balance": "1",
"builtin": {
"name": "ripemd160",
"pricing": {
"linear": {
"base": 600,
"word": 120
}
}
}
},
"0x0000000000000000000000000000000000000004": {
"balance": "1",
"builtin": {
"name": "identity",
"pricing": {
"linear": {
"base": 15,
"word": 3
}
}
}
}
},
"nodes": [
"enode://66786c15390cb4fef3743571e12ec54ca343e7f119018136d68b670edd93604eedf74e5013dc5c2439f89e0e05593e29c409a97e155ea4165c6b832de131ef1e@3.214.113.185:30303"
]
}

File diff suppressed because one or more lines are too long

View File

@@ -36,9 +36,50 @@
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "0", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "nonce": "0", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "0", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "nonce": "0", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, "0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
"0000000000000000000000000000000000000006": { "balance": "1", "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0000000000000000000000000000000000000006": {
"0000000000000000000000000000000000000007": { "balance": "1", "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "balance": "1",
"0000000000000000000000000000000000000008": { "balance": "1", "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 500,
"eip1108_transition_price": 150
}
}
}
},
"0000000000000000000000000000000000000007": {
"balance": "1",
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_const_operations": {
"price": 40000,
"eip1108_transition_price": 6000
}
}
}
},
"0000000000000000000000000000000000000008": {
"balance": "1",
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 0,
"eip1108_transition": "0x7fffffffffffff",
"pricing": {
"alt_bn128_pairing": {
"base": 100000,
"pair": 80000,
"eip1108_transition_base": 45000,
"eip1108_transition_pair": 34000
}
}
}
},
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "0" } "9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "0" }
} }
} }

View File

@@ -94,6 +94,7 @@ impl<'a> EvmTestClient<'a> {
ForkSpec::Byzantium => Some(ethereum::new_byzantium_test()), ForkSpec::Byzantium => Some(ethereum::new_byzantium_test()),
ForkSpec::Constantinople => Some(ethereum::new_constantinople_test()), ForkSpec::Constantinople => Some(ethereum::new_constantinople_test()),
ForkSpec::ConstantinopleFix => Some(ethereum::new_constantinople_fix_test()), ForkSpec::ConstantinopleFix => Some(ethereum::new_constantinople_fix_test()),
ForkSpec::Istanbul => Some(ethereum::new_istanbul_test()),
ForkSpec::EIP158ToByzantiumAt5 => Some(ethereum::new_transition_test()), ForkSpec::EIP158ToByzantiumAt5 => Some(ethereum::new_transition_test()),
ForkSpec::FrontierToHomesteadAt5 | ForkSpec::HomesteadToDaoAt5 | ForkSpec::HomesteadToEIP150At5 => None, ForkSpec::FrontierToHomesteadAt5 | ForkSpec::HomesteadToDaoAt5 | ForkSpec::HomesteadToEIP150At5 => None,
} }

View File

@@ -54,7 +54,7 @@ pub use vm::{LastHashes, EnvInfo};
pub use error::TransactionImportError; pub use error::TransactionImportError;
pub use verification::VerifierType; pub use verification::VerifierType;
mod traits; pub mod traits;
mod chain_notify; mod chain_notify;
mod private_notify; mod private_notify;

View File

@@ -19,6 +19,8 @@ use machine::Machine;
use types::header::{Header, ExtendedHeader}; use types::header::{Header, ExtendedHeader};
use block::ExecutedBlock; use block::ExecutedBlock;
use error::Error; use error::Error;
use std::sync::atomic::{AtomicU64, Ordering};
/// `InstantSeal` params. /// `InstantSeal` params.
#[derive(Default, Debug, PartialEq)] #[derive(Default, Debug, PartialEq)]
@@ -40,6 +42,7 @@ impl From<::ethjson::spec::InstantSealParams> for InstantSealParams {
pub struct InstantSeal { pub struct InstantSeal {
params: InstantSealParams, params: InstantSealParams,
machine: Machine, machine: Machine,
last_sealed_block: AtomicU64,
} }
impl InstantSeal { impl InstantSeal {
@@ -48,6 +51,7 @@ impl InstantSeal {
InstantSeal { InstantSeal {
params, params,
machine, machine,
last_sealed_block: AtomicU64::new(0),
} }
} }
} }
@@ -62,11 +66,19 @@ impl Engine for InstantSeal {
fn sealing_state(&self) -> SealingState { SealingState::Ready } fn sealing_state(&self) -> SealingState { SealingState::Ready }
fn generate_seal(&self, block: &ExecutedBlock, _parent: &Header) -> Seal { fn generate_seal(&self, block: &ExecutedBlock, _parent: &Header) -> Seal {
if block.transactions.is_empty() { if !block.transactions.is_empty() {
Seal::None let block_number = block.header.number();
} else { let last_sealed_block = self.last_sealed_block.load(Ordering::SeqCst);
Seal::Regular(Vec::new()) // Return a regular seal if the given block is _higher_ than
// the last sealed one
if block_number > last_sealed_block {
let prev_last_sealed_block = self.last_sealed_block.compare_and_swap(last_sealed_block, block_number, Ordering::SeqCst);
if prev_last_sealed_block == last_sealed_block {
return Seal::Regular(Vec::new())
}
}
} }
Seal::None
} }
fn verify_local_seal(&self, _header: &Header) -> Result<(), Error> { fn verify_local_seal(&self, _header: &Header) -> Result<(), Error> {

View File

@@ -57,9 +57,19 @@ pub fn new_poanet<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/poacore.json")) load(params.into(), include_bytes!("../../res/ethereum/poacore.json"))
} }
/// Create a new Tobalaba mainnet chain spec. /// Create a new xDai mainnet chain spec.
pub fn new_tobalaba<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec { pub fn new_xdai<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/tobalaba.json")) load(params.into(), include_bytes!("../../res/ethereum/xdai.json"))
}
/// Create a new Volta mainnet chain spec.
pub fn new_volta<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/volta.json"))
}
/// Create a new EWC mainnet chain spec.
pub fn new_ewc<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/ewc.json"))
} }
/// Create a new Expanse mainnet chain spec. /// Create a new Expanse mainnet chain spec.
@@ -156,6 +166,9 @@ pub fn new_constantinople_test() -> Spec { load(None, include_bytes!("../../res/
/// Create a new Foundation St. Peter's (Contantinople Fix) era spec. /// Create a new Foundation St. Peter's (Contantinople Fix) era spec.
pub fn new_constantinople_fix_test() -> Spec { load(None, include_bytes!("../../res/ethereum/st_peters_test.json")) } pub fn new_constantinople_fix_test() -> Spec { load(None, include_bytes!("../../res/ethereum/st_peters_test.json")) }
/// Create a new Foundation Istanbul era spec.
pub fn new_istanbul_test() -> Spec { load(None, include_bytes!("../../res/ethereum/istanbul_test.json")) }
/// Create a new Musicoin-MCIP3-era spec. /// Create a new Musicoin-MCIP3-era spec.
pub fn new_mcip3_test() -> Spec { load(None, include_bytes!("../../res/ethereum/mcip3_test.json")) } pub fn new_mcip3_test() -> Spec { load(None, include_bytes!("../../res/ethereum/mcip3_test.json")) }

View File

@@ -34,7 +34,7 @@ use externalities::*;
use trace::{self, Tracer, VMTracer}; use trace::{self, Tracer, VMTracer};
use types::transaction::{Action, SignedTransaction}; use types::transaction::{Action, SignedTransaction};
use transaction_ext::Transaction; use transaction_ext::Transaction;
use crossbeam; use crossbeam_utils::thread;
pub use executed::{Executed, ExecutionResult}; pub use executed::{Executed, ExecutionResult};
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
@@ -396,7 +396,8 @@ impl<'a> CallCreateExecutive<'a> {
let default = []; let default = [];
let data = if let Some(ref d) = params.data { d as &[u8] } else { &default as &[u8] }; let data = if let Some(ref d) = params.data { d as &[u8] } else { &default as &[u8] };
let cost = builtin.cost(data); // NOTE(niklasad1): block number is used by `builtin alt_bn128 ops` to enable eip1108
let cost = builtin.cost(data, self.info.number);
if cost <= params.gas { if cost <= params.gas {
let mut builtin_out_buffer = Vec::new(); let mut builtin_out_buffer = Vec::new();
let result = { let result = {
@@ -406,7 +407,7 @@ impl<'a> CallCreateExecutive<'a> {
if let Err(e) = result { if let Err(e) = result {
state.revert_to_checkpoint(); state.revert_to_checkpoint();
Err(e.into()) Err(vm::Error::BuiltIn(e))
} else { } else {
state.discard_checkpoint(); state.discard_checkpoint();
@@ -977,11 +978,18 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> {
if stack_depth != depth_threshold { if stack_depth != depth_threshold {
self.call_with_stack_depth(params, substate, stack_depth, tracer, vm_tracer) self.call_with_stack_depth(params, substate, stack_depth, tracer, vm_tracer)
} else { } else {
crossbeam::scope(|scope| { thread::scope(|scope| {
scope.builder().stack_size(::std::cmp::max(self.schedule.max_depth.saturating_sub(depth_threshold) * STACK_SIZE_PER_DEPTH, local_stack_size)).spawn(move || { let stack_size = cmp::max(self.schedule.max_depth.saturating_sub(depth_threshold) * STACK_SIZE_PER_DEPTH, local_stack_size);
self.call_with_stack_depth(params, substate, stack_depth, tracer, vm_tracer) scope.builder()
}).expect("Sub-thread creation cannot fail; the host might run out of resources; qed") .stack_size(stack_size)
}).join().expect("Sub-thread never panics; qed") .spawn(|_| {
self.call_with_stack_depth(params, substate, stack_depth, tracer, vm_tracer)
})
.expect("Sub-thread creation cannot fail; the host might run out of resources; qed")
.join()
})
.expect("Sub-thread never panics; qed")
.expect("Sub-thread never panics; qed")
} }
} }
@@ -1061,11 +1069,18 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> {
if stack_depth != depth_threshold { if stack_depth != depth_threshold {
self.create_with_stack_depth(params, substate, stack_depth, tracer, vm_tracer) self.create_with_stack_depth(params, substate, stack_depth, tracer, vm_tracer)
} else { } else {
crossbeam::scope(|scope| { thread::scope(|scope| {
scope.builder().stack_size(::std::cmp::max(self.schedule.max_depth.saturating_sub(depth_threshold) * STACK_SIZE_PER_DEPTH, local_stack_size)).spawn(move || { let stack_size = cmp::max(self.schedule.max_depth.saturating_sub(depth_threshold) * STACK_SIZE_PER_DEPTH, local_stack_size);
self.create_with_stack_depth(params, substate, stack_depth, tracer, vm_tracer) scope.builder()
}).expect("Sub-thread creation cannot fail; the host might run out of resources; qed") .stack_size(stack_size)
}).join().expect("Sub-thread never panics; qed") .spawn(|_| {
self.create_with_stack_depth(params, substate, stack_depth, tracer, vm_tracer)
})
.expect("Sub-thread creation cannot fail; the host might run out of resources; qed")
.join()
})
.expect("Sub-thread never panics; qed")
.expect("Sub-thread never panics; qed")
} }
} }

View File

@@ -400,6 +400,10 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B>
self.env_info self.env_info
} }
fn chain_id(&self) -> u64 {
self.machine.params().chain_id
}
fn depth(&self) -> usize { fn depth(&self) -> usize {
self.depth self.depth
} }
@@ -420,6 +424,10 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B>
self.vm_tracer.trace_prepare_execute(pc, instruction, gas_cost, mem_written, store_written) self.vm_tracer.trace_prepare_execute(pc, instruction, gas_cost, mem_written, store_written)
} }
fn trace_failed(&mut self) {
self.vm_tracer.trace_failed();
}
fn trace_executed(&mut self, gas_used: U256, stack_push: &[U256], mem: &[u8]) { fn trace_executed(&mut self, gas_used: U256, stack_push: &[U256], mem: &[u8]) {
self.vm_tracer.trace_executed(gas_used, stack_push, mem) self.vm_tracer.trace_executed(gas_used, stack_push, mem)
} }

View File

@@ -18,49 +18,49 @@ use std::path::Path;
use std::sync::Arc; use std::sync::Arc;
use client::{EvmTestClient, Client, ClientConfig, ChainInfo, ImportBlock}; use client::{EvmTestClient, Client, ClientConfig, ChainInfo, ImportBlock};
use spec::Genesis; use spec::Genesis;
use ethjson; use ethjson::test_helpers::blockchain;
use miner::Miner; use miner::Miner;
use io::IoChannel; use io::IoChannel;
use test_helpers; use test_helpers;
use verification::queue::kind::blocks::Unverified; use verification::{VerifierType, queue::kind::BlockLike, queue::kind::blocks::Unverified};
use verification::VerifierType; use super::SKIP_TESTS;
use super::SKIP_TEST_STATE;
use super::HookType; use super::HookType;
/// Run chain jsontests on a given folder. #[allow(dead_code)]
pub fn run_test_path<H: FnMut(&str, HookType)>(p: &Path, skip: &[&'static str], h: &mut H) {
::json_tests::test_common::run_test_path(p, skip, json_chain_test, h)
}
/// Run chain jsontests on a given file.
pub fn run_test_file<H: FnMut(&str, HookType)>(p: &Path, h: &mut H) {
::json_tests::test_common::run_test_file(p, json_chain_test, h)
}
fn skip_test(name: &String) -> bool { fn skip_test(name: &String) -> bool {
SKIP_TEST_STATE.block.iter().any(|block_test|block_test.subtests.contains(name)) SKIP_TESTS
.block
.iter()
.any(|block_test|block_test.subtests.contains(name))
} }
pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_hook: &mut H) -> Vec<String> { #[allow(dead_code)]
pub fn json_chain_test<H: FnMut(&str, HookType)>(path: &Path, json_data: &[u8], start_stop_hook: &mut H) -> Vec<String> {
let _ = ::env_logger::try_init(); let _ = ::env_logger::try_init();
let tests = ethjson::blockchain::Test::load(json_data).unwrap(); let tests = blockchain::Test::load(json_data)
.expect(&format!("Could not parse JSON chain test data from {}", path.display()));
let mut failed = Vec::new(); let mut failed = Vec::new();
for (name, blockchain) in tests.into_iter() { for (name, blockchain) in tests.into_iter() {
if skip_test(&name) { if skip_test(&name) {
println!(" - {} | {:?} Ignoring tests because in skip list", name, blockchain.network); println!(" - {} | {:?}: SKIPPED", name, blockchain.network);
continue; continue;
} }
start_stop_hook(&name, HookType::OnStart); start_stop_hook(&name, HookType::OnStart);
let mut fail = false; let mut fail = false;
{ {
let mut fail_unless = |cond: bool| if !cond && !fail { let mut fail_unless = |cond: bool| {
failed.push(name.clone()); if !cond && !fail {
flushln!("FAIL"); failed.push(name.clone());
fail = true; flushln!("FAIL");
true fail = true;
} else {false}; true
} else {
false
}
};
flush!(" - {}...", name); flush!(" - {}...", name);
@@ -68,7 +68,7 @@ pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_ho
let mut spec = match EvmTestClient::spec_from_json(&blockchain.network) { let mut spec = match EvmTestClient::spec_from_json(&blockchain.network) {
Some(spec) => spec, Some(spec) => spec,
None => { None => {
println!(" - {} | {:?} Ignoring tests because of missing spec", name, blockchain.network); println!(" - {} | {:?} Ignoring tests because of missing chainspec", name, blockchain.network);
continue; continue;
} }
}; };
@@ -77,30 +77,44 @@ pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_ho
let state = From::from(blockchain.pre_state.clone()); let state = From::from(blockchain.pre_state.clone());
spec.set_genesis_state(state).expect("Failed to overwrite genesis state"); spec.set_genesis_state(state).expect("Failed to overwrite genesis state");
spec.overwrite_genesis_params(genesis); spec.overwrite_genesis_params(genesis);
assert!(spec.is_state_root_valid()); // assert!(spec.is_state_root_valid());
spec spec
}; };
{ {
let db = test_helpers::new_db(); let db = test_helpers::new_db();
let mut config = ClientConfig::default(); let mut config = ClientConfig::default();
if ethjson::blockchain::Engine::NoProof == blockchain.engine { if ethjson::test_helpers::blockchain::Engine::NoProof == blockchain.engine {
config.verifier_type = VerifierType::CanonNoSeal; config.verifier_type = VerifierType::CanonNoSeal;
config.check_seal = false; config.check_seal = false;
} }
config.history = 8; config.history = 8;
config.queue.verifier_settings.num_verifiers = 1;
let client = Client::new( let client = Client::new(
config, config,
&spec, &spec,
db, db,
Arc::new(Miner::new_for_tests(&spec, None)), Arc::new(Miner::new_for_tests(&spec, None)),
IoChannel::disconnected(), IoChannel::disconnected(),
).unwrap(); ).expect("Failed to instantiate a new Client");
for b in blockchain.blocks_rlp() { for b in blockchain.blocks_rlp() {
if let Ok(block) = Unverified::from_rlp(b) { let bytes_len = b.len();
let _ = client.import_block(block); let block = Unverified::from_rlp(b);
client.flush_queue(); match block {
client.import_verified_blocks(); Ok(block) => {
let num = block.header.number();
let hash = block.hash();
trace!(target: "json-tests", "{} Importing {} bytes. Block #{}/{}", name, bytes_len, num, hash);
let res = client.import_block(block);
if let Err(e) = res {
warn!(target: "json-tests", "{} Error importing block #{}/{}: {:?}", name, num, hash, e);
}
client.flush_queue();
},
Err(decoder_err) => {
warn!(target: "json-tests", "Error decoding test block: {:?} ({} bytes)", decoder_err, bytes_len);
}
} }
} }
fail_unless(client.chain_info().best_block_hash == blockchain.best_block.into()); fail_unless(client.chain_info().best_block_hash == blockchain.best_block.into());
@@ -109,24 +123,31 @@ pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_ho
if !fail { if !fail {
flushln!("ok"); flushln!("ok");
} else {
flushln!("fail");
} }
start_stop_hook(&name, HookType::OnStop); start_stop_hook(&name, HookType::OnStop);
} }
println!("!!! {:?} tests from failed.", failed.len()); if failed.len() > 0 {
println!("!!! {:?} tests failed.", failed.len());
}
failed failed
} }
#[cfg(test)] #[cfg(test)]
mod block_tests { mod block_tests {
use std::path::Path;
use super::json_chain_test; use super::json_chain_test;
use json_tests::HookType; use json_tests::HookType;
fn do_json_test<H: FnMut(&str, HookType)>(json_data: &[u8], h: &mut H) -> Vec<String> { fn do_json_test<H: FnMut(&str, HookType)>(path: &Path, json_data: &[u8], h: &mut H) -> Vec<String> {
json_chain_test(json_data, h) json_chain_test(path, json_data, h)
} }
//todo[dvdplm] do these tests match all folders in `res/` or are there tests we're missing?
//Issue: https://github.com/paritytech/parity-ethereum/issues/11085
declare_test!{BlockchainTests_bcBlockGasLimitTest, "BlockchainTests/bcBlockGasLimitTest"} declare_test!{BlockchainTests_bcBlockGasLimitTest, "BlockchainTests/bcBlockGasLimitTest"}
declare_test!{BlockchainTests_bcExploitTest, "BlockchainTests/bcExploitTest"} declare_test!{BlockchainTests_bcExploitTest, "BlockchainTests/bcExploitTest"}
declare_test!{BlockchainTests_bcForgedTest, "BlockchainTests/bcForgedTest"} declare_test!{BlockchainTests_bcForgedTest, "BlockchainTests/bcForgedTest"}
@@ -173,7 +194,12 @@ mod block_tests {
declare_test!{BlockchainTests_GeneralStateTest_stRandom2, "BlockchainTests/GeneralStateTests/stRandom2/"} declare_test!{BlockchainTests_GeneralStateTest_stRandom2, "BlockchainTests/GeneralStateTests/stRandom2/"}
declare_test!{BlockchainTests_GeneralStateTest_stRecursiveCreate, "BlockchainTests/GeneralStateTests/stRecursiveCreate/"} declare_test!{BlockchainTests_GeneralStateTest_stRecursiveCreate, "BlockchainTests/GeneralStateTests/stRecursiveCreate/"}
declare_test!{BlockchainTests_GeneralStateTest_stRefundTest, "BlockchainTests/GeneralStateTests/stRefundTest/"} declare_test!{BlockchainTests_GeneralStateTest_stRefundTest, "BlockchainTests/GeneralStateTests/stRefundTest/"}
declare_test!{BlockchainTests_GeneralStateTest_stReturnDataTest, "BlockchainTests/GeneralStateTests/stReturnDataTest/"} declare_test!{ BlockchainTests_GeneralStateTest_stReturnDataTest, "BlockchainTests/GeneralStateTests/stReturnDataTest/"}
// todo[dvdplm]:
// "RevertPrecompiledTouch_storage" contains 4 tests, only two fails
// "RevertPrecompiledTouchExactOOG" contains a ton of tests, only two fails
// "RevertPrecompiledTouch" has 4 tests, 2 failures
// Ignored in currents.json, issue: https://github.com/paritytech/parity-ethereum/issues/11073
declare_test!{BlockchainTests_GeneralStateTest_stRevertTest, "BlockchainTests/GeneralStateTests/stRevertTest/"} declare_test!{BlockchainTests_GeneralStateTest_stRevertTest, "BlockchainTests/GeneralStateTests/stRevertTest/"}
declare_test!{BlockchainTests_GeneralStateTest_stShift, "BlockchainTests/GeneralStateTests/stShift/"} declare_test!{BlockchainTests_GeneralStateTest_stShift, "BlockchainTests/GeneralStateTests/stShift/"}
declare_test!{BlockchainTests_GeneralStateTest_stSolidityTest, "BlockchainTests/GeneralStateTests/stSolidityTest/"} declare_test!{BlockchainTests_GeneralStateTest_stSolidityTest, "BlockchainTests/GeneralStateTests/stSolidityTest/"}

View File

@@ -14,16 +14,24 @@
// 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 Ethereum. If not, see <http://www.gnu.org/licenses/>. // along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
use ethjson; use std::path::Path;
use types::header::Header;
use ethereum_types::U256; use ethereum_types::U256;
use ethjson::test_helpers::difficulty::DifficultyTest;
use types::header::Header;
use spec::Spec; use spec::Spec;
use super::HookType; use super::HookType;
pub fn json_difficulty_test<H: FnMut(&str, HookType)>(json_data: &[u8], spec: Spec, start_stop_hook: &mut H) -> Vec<String> { pub fn json_difficulty_test<H: FnMut(&str, HookType)>(
let _ = ::env_logger::try_init(); path: &Path,
let tests = ethjson::test::DifficultyTest::load(json_data).unwrap(); json_data: &[u8],
spec: Spec,
start_stop_hook: &mut H
) -> Vec<String> {
let _ = env_logger::try_init();
let tests = DifficultyTest::load(json_data)
.expect(&format!("Could not parse JSON difficulty test data from {}", path.display()));
let engine = &spec.engine; let engine = &spec.engine;
for (name, test) in tests.into_iter() { for (name, test) in tests.into_iter() {
@@ -54,29 +62,28 @@ pub fn json_difficulty_test<H: FnMut(&str, HookType)>(json_data: &[u8], spec: Sp
macro_rules! difficulty_json_test { macro_rules! difficulty_json_test {
( $spec:ident ) => { ( $spec:ident ) => {
use std::path::Path;
use super::json_difficulty_test;
use tempdir::TempDir;
use json_tests::HookType;
use super::json_difficulty_test; fn do_json_test<H: FnMut(&str, HookType)>(path: &Path, json_data: &[u8], h: &mut H) -> Vec<String> {
use tempdir::TempDir; let tempdir = TempDir::new("").unwrap();
use json_tests::HookType; json_difficulty_test(path, json_data, ::ethereum::$spec(&tempdir.path()), h)
}
fn do_json_test<H: FnMut(&str, HookType)>(json_data: &[u8], h: &mut H) -> Vec<String> {
let tempdir = TempDir::new("").unwrap();
json_difficulty_test(json_data, ::ethereum::$spec(&tempdir.path()), h)
}
} }
} }
macro_rules! difficulty_json_test_nopath { macro_rules! difficulty_json_test_nopath {
( $spec:ident ) => { ( $spec:ident ) => {
use std::path::Path;
use super::json_difficulty_test; use super::json_difficulty_test;
use json_tests::HookType; use json_tests::HookType;
fn do_json_test<H: FnMut(&str, HookType)>(json_data: &[u8], h: &mut H) -> Vec<String> {
json_difficulty_test(json_data, ::ethereum::$spec(), h)
}
fn do_json_test<H: FnMut(&str, HookType)>(path: &Path, json_data: &[u8], h: &mut H) -> Vec<String> {
json_difficulty_test(path, json_data, ::ethereum::$spec(), h)
}
} }
} }

View File

@@ -211,6 +211,8 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for TestExt<'a, T, V, B>
self.ext.env_info() self.ext.env_info()
} }
fn chain_id(&self) -> u64 { 0 }
fn depth(&self) -> usize { fn depth(&self) -> usize {
0 0
} }
@@ -228,16 +230,22 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for TestExt<'a, T, V, B>
} }
} }
fn do_json_test<H: FnMut(&str, HookType)>(json_data: &[u8], h: &mut H) -> Vec<String> { fn do_json_test<H: FnMut(&str, HookType)>(path: &Path, json_data: &[u8], h: &mut H) -> Vec<String> {
let vms = VMType::all(); let vms = VMType::all();
vms vms
.iter() .iter()
.flat_map(|vm| do_json_test_for(vm, json_data, h)) .flat_map(|vm| do_json_test_for(path, vm, json_data, h))
.collect() .collect()
} }
fn do_json_test_for<H: FnMut(&str, HookType)>(vm_type: &VMType, json_data: &[u8], start_stop_hook: &mut H) -> Vec<String> { fn do_json_test_for<H: FnMut(&str, HookType)>(
let tests = ethjson::vm::Test::load(json_data).unwrap(); path: &Path,
vm_type: &VMType,
json_data: &[u8],
start_stop_hook: &mut H
) -> Vec<String> {
let tests = ethjson::test_helpers::vm::Test::load(json_data)
.expect(&format!("Could not parse JSON executive test data from {}", path.display()));
let mut failed = Vec::new(); let mut failed = Vec::new();
for (name, vm) in tests.into_iter() { for (name, vm) in tests.into_iter() {
@@ -329,15 +337,15 @@ fn do_json_test_for<H: FnMut(&str, HookType)>(vm_type: &VMType, json_data: &[u8]
for (address, account) in vm.post_state.unwrap().into_iter() { for (address, account) in vm.post_state.unwrap().into_iter() {
let address = address.into(); let address = address.into();
let code: Vec<u8> = account.code.into(); let code: Vec<u8> = account.code.expect("code is missing from json; test should have code").into();
let found_code = try_fail!(state.code(&address)); let found_code = try_fail!(state.code(&address));
let found_balance = try_fail!(state.balance(&address)); let found_balance = try_fail!(state.balance(&address));
let found_nonce = try_fail!(state.nonce(&address)); let found_nonce = try_fail!(state.nonce(&address));
fail_unless(found_code.as_ref().map_or_else(|| code.is_empty(), |c| &**c == &code), "code is incorrect"); fail_unless(found_code.as_ref().map_or_else(|| code.is_empty(), |c| &**c == &code), "code is incorrect");
fail_unless(found_balance == account.balance.into(), "balance is incorrect"); fail_unless(account.balance.as_ref().map_or(false, |b| b.0 == found_balance), "balance is incorrect");
fail_unless(found_nonce == account.nonce.into(), "nonce is incorrect"); fail_unless(account.nonce.as_ref().map_or(false, |n| n.0 == found_nonce), "nonce is incorrect");
for (k, v) in account.storage { for (k, v) in account.storage.expect("test should have storage") {
let key: U256 = k.into(); let key: U256 = k.into();
let value: U256 = v.into(); let value: U256 = v.into();
let found_storage = try_fail!(state.storage_at(&address, &BigEndianHash::from_uint(&key))); let found_storage = try_fail!(state.storage_at(&address, &BigEndianHash::from_uint(&key)));

View File

@@ -30,17 +30,7 @@ mod skip;
mod difficulty; mod difficulty;
pub use self::test_common::HookType; pub use self::test_common::HookType;
pub use self::transaction::run_test_path as run_transaction_test_path;
pub use self::transaction::run_test_file as run_transaction_test_file;
pub use self::executive::run_test_path as run_executive_test_path; pub use self::executive::run_test_path as run_executive_test_path;
pub use self::executive::run_test_file as run_executive_test_file; pub use self::executive::run_test_file as run_executive_test_file;
pub use self::state::run_test_path as run_state_test_path;
pub use self::state::run_test_file as run_state_test_file; use self::skip::SKIP_TESTS;
pub use self::chain::run_test_path as run_chain_test_path;
pub use self::chain::run_test_file as run_chain_test_file;
pub use self::trie::run_generic_test_path as run_generic_trie_test_path;
pub use self::trie::run_generic_test_file as run_generic_trie_test_file;
pub use self::trie::run_secure_test_path as run_secure_trie_test_path;
pub use self::trie::run_secure_test_file as run_secure_trie_test_file;
use self::skip::SKIP_TEST_STATE;

View File

@@ -14,21 +14,30 @@
// 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 Ethereum. If not, see <http://www.gnu.org/licenses/>. // along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
//! State tests to skip. //! State or blockchain tests to skip.
//!
//! Looks in the `ethereum/tests/test-issues/currents.json` file. This file contains two
//! collections, `block` and `state`, each with a different format to specify single tests to skip.
//!
//! To skip a blockchain test, add a JSON object to the `block` array, where `failing` names the
//! leaf folder with the tests to skip. The `subtests` array contains the names of the tests to skip.
//! Note that this does not handle duplicate folder names, e.g. `ValidBlocks/funTests/` and
//! `Something/funTests` would both be matched when `failing` is set to `funTests`.
//!
//! To skip a state test, add a JSON object to the `state` array. The `failing` works like for block
//! tests, but the `subtests` key is an object on the form:
//! "testName": {"subnumbers": [INDEX_OF_SKIPPED_SUBTESTS | "*"], "chain": "Blockchain name (informational)"}`
//!
//! Use the `reference` key to point to the github issue tracking to solution to the problem.
//!
//! Note: the `declare_test!` macro can also be use to skip tests, but skips entire files rather
//! than single tests.
use ethjson; use ethjson::test_helpers::skip::SkipTests;
#[cfg(feature="ci-skip-tests")] lazy_static! {
lazy_static!{ pub static ref SKIP_TESTS: SkipTests = {
pub static ref SKIP_TEST_STATE: ethjson::test::SkipStates = {
let skip_data = include_bytes!("../../res/ethereum/tests-issues/currents.json"); let skip_data = include_bytes!("../../res/ethereum/tests-issues/currents.json");
ethjson::test::SkipStates::load(&skip_data[..]).expect("No invalid json allowed") SkipTests::load(&skip_data[..]).expect("JSON from disk is valid")
};
}
#[cfg(not(feature="ci-skip-tests"))]
lazy_static!{
pub static ref SKIP_TEST_STATE: ethjson::test::SkipStates = {
ethjson::test::SkipStates::empty()
}; };
} }

View File

@@ -22,34 +22,31 @@ use client::{EvmTestClient, EvmTestError, TransactErr, TransactSuccess};
use ethjson; use ethjson;
use types::transaction::SignedTransaction; use types::transaction::SignedTransaction;
use vm::EnvInfo; use vm::EnvInfo;
use super::SKIP_TEST_STATE; use super::SKIP_TESTS;
use super::HookType; use super::HookType;
/// Run state jsontests on a given folder. #[allow(dead_code)]
pub fn run_test_path<H: FnMut(&str, HookType)>(p: &Path, skip: &[&'static str], h: &mut H) {
::json_tests::test_common::run_test_path(p, skip, json_chain_test, h)
}
/// Run state jsontests on a given file.
pub fn run_test_file<H: FnMut(&str, HookType)>(p: &Path, h: &mut H) {
::json_tests::test_common::run_test_file(p, json_chain_test, h)
}
fn skip_test(subname: &str, chain: &String, number: usize) -> bool { fn skip_test(subname: &str, chain: &String, number: usize) -> bool {
SKIP_TEST_STATE.state.iter().any(|state_test|{ trace!(target: "json-tests", "[state, skip_test] subname: '{}', chain: '{}', number: {}", subname, chain, number);
SKIP_TESTS.state.iter().any(|state_test|{
if let Some(subtest) = state_test.subtests.get(subname) { if let Some(subtest) = state_test.subtests.get(subname) {
trace!(target: "json-tests", "[state, skip_test] Maybe skipping {:?}", subtest);
chain == &subtest.chain && chain == &subtest.chain &&
(subtest.subnumbers[0] == "*" (
|| subtest.subnumbers.contains(&number.to_string())) subtest.subnumbers[0] == "*" ||
subtest.subnumbers.contains(&number.to_string())
)
} else { } else {
false false
} }
}) })
} }
pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_hook: &mut H) -> Vec<String> { #[allow(dead_code)]
pub fn json_chain_test<H: FnMut(&str, HookType)>(path: &Path, json_data: &[u8], start_stop_hook: &mut H) -> Vec<String> {
let _ = ::env_logger::try_init(); let _ = ::env_logger::try_init();
let tests = ethjson::state::test::Test::load(json_data).unwrap(); let tests = ethjson::test_helpers::state::Test::load(json_data)
.expect(&format!("Could not parse JSON state test data from {}", path.display()));
let mut failed = Vec::new(); let mut failed = Vec::new();
for (name, test) in tests.into_iter() { for (name, test) in tests.into_iter() {
@@ -65,7 +62,7 @@ pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_ho
let spec = match EvmTestClient::spec_from_json(&spec_name) { let spec = match EvmTestClient::spec_from_json(&spec_name) {
Some(spec) => spec, Some(spec) => spec,
None => { None => {
println!(" - {} | {:?} Ignoring tests because of missing spec", name, spec_name); println!(" - {} | {:?} Ignoring tests because of missing chainspec", name, spec_name);
continue; continue;
} }
}; };
@@ -73,7 +70,7 @@ pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_ho
for (i, state) in states.into_iter().enumerate() { for (i, state) in states.into_iter().enumerate() {
let info = format!(" - {} | {:?} ({}/{}) ...", name, spec_name, i + 1, total); let info = format!(" - {} | {:?} ({}/{}) ...", name, spec_name, i + 1, total);
if skip_test(&name, &spec.name, i + 1) { if skip_test(&name, &spec.name, i + 1) {
println!("{} in skip list : SKIPPED", info); println!("{}: SKIPPED", info);
continue; continue;
} }
@@ -123,11 +120,13 @@ pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_ho
#[cfg(test)] #[cfg(test)]
mod state_tests { mod state_tests {
use std::path::Path;
use super::json_chain_test; use super::json_chain_test;
use json_tests::HookType; use json_tests::HookType;
fn do_json_test<H: FnMut(&str, HookType)>(json_data: &[u8], h: &mut H) -> Vec<String> { fn do_json_test<H: FnMut(&str, HookType)>(path: &Path, json_data: &[u8], h: &mut H) -> Vec<String> {
json_chain_test(json_data, h) json_chain_test(path, json_data, h)
} }
declare_test!{GeneralStateTest_stArgsZeroOneBalance, "GeneralStateTests/stArgsZeroOneBalance/"} declare_test!{GeneralStateTest_stArgsZeroOneBalance, "GeneralStateTests/stArgsZeroOneBalance/"}
@@ -164,6 +163,15 @@ mod state_tests {
declare_test!{GeneralStateTest_stRecursiveCreate, "GeneralStateTests/stRecursiveCreate/"} declare_test!{GeneralStateTest_stRecursiveCreate, "GeneralStateTests/stRecursiveCreate/"}
declare_test!{GeneralStateTest_stRefundTest, "GeneralStateTests/stRefundTest/"} declare_test!{GeneralStateTest_stRefundTest, "GeneralStateTests/stRefundTest/"}
declare_test!{GeneralStateTest_stReturnDataTest, "GeneralStateTests/stReturnDataTest/"} declare_test!{GeneralStateTest_stReturnDataTest, "GeneralStateTests/stReturnDataTest/"}
// todo[dvdplm]:
// "RevertPrecompiledTouch_storage" contains 4 tests, only two fails
// "RevertPrecompiledTouchExactOOG" contains a ton of tests, only two fails
// "RevertPrecompiledTouch" has 4 tests, 2 failures
// Ignored in `currents.json`.
// Issues:
// https://github.com/paritytech/parity-ethereum/issues/11078
// https://github.com/paritytech/parity-ethereum/issues/11079
// https://github.com/paritytech/parity-ethereum/issues/11080
declare_test!{GeneralStateTest_stRevertTest, "GeneralStateTests/stRevertTest/"} declare_test!{GeneralStateTest_stRevertTest, "GeneralStateTests/stRevertTest/"}
declare_test!{GeneralStateTest_stSStoreTest, "GeneralStateTests/stSStoreTest/"} declare_test!{GeneralStateTest_stSStoreTest, "GeneralStateTests/stSStoreTest/"}
declare_test!{GeneralStateTest_stShift, "GeneralStateTests/stShift/"} declare_test!{GeneralStateTest_stShift, "GeneralStateTests/stShift/"}

View File

@@ -30,43 +30,61 @@ pub enum HookType {
OnStop OnStop
} }
/// Run all tests under the given path (except for the test files named in the skip list) using the
/// provided runner function.
pub fn run_test_path<H: FnMut(&str, HookType)>( pub fn run_test_path<H: FnMut(&str, HookType)>(
p: &Path, skip: &[&'static str], path: &Path,
runner: fn(json_data: &[u8], start_stop_hook: &mut H) -> Vec<String>, skip: &[&'static str],
runner: fn(path: &Path, json_data: &[u8], start_stop_hook: &mut H) -> Vec<String>,
start_stop_hook: &mut H start_stop_hook: &mut H
) { ) {
if !skip.is_empty() {
// todo[dvdplm] it's really annoying to have to use flushln here. Should be `info!(target:
// "json-tests", …)`. Issue https://github.com/paritytech/parity-ethereum/issues/11084
flushln!("[run_test_path] Skipping tests in {}: {:?}", path.display(), skip);
}
let mut errors = Vec::new(); let mut errors = Vec::new();
run_test_path_inner(p, skip, runner, start_stop_hook, &mut errors); run_test_path_inner(path, skip, runner, start_stop_hook, &mut errors);
let empty: [String; 0] = []; let empty: [String; 0] = [];
assert_eq!(errors, empty); assert_eq!(errors, empty, "\nThere were {} tests in '{}' that failed.", errors.len(), path.display());
} }
fn run_test_path_inner<H: FnMut(&str, HookType)>( fn run_test_path_inner<H: FnMut(&str, HookType)>(
p: &Path, skip: &[&'static str], p: &Path,
runner: fn(json_data: &[u8], start_stop_hook: &mut H) -> Vec<String>, skip: &[&'static str],
runner: fn(path: &Path, json_data: &[u8], start_stop_hook: &mut H) -> Vec<String>,
start_stop_hook: &mut H, start_stop_hook: &mut H,
errors: &mut Vec<String> errors: &mut Vec<String>
) { ) {
let path = Path::new(p); let path = Path::new(p);
let s: HashSet<OsString> = skip.iter().map(|s| { let extension = path.extension().and_then(|s| s.to_str());
let skip_list: HashSet<OsString> = skip.iter().map(|s| {
let mut os: OsString = s.into(); let mut os: OsString = s.into();
os.push(".json"); os.push(".json");
os os
}).collect(); }).collect();
let extension = path.extension().and_then(|s| s.to_str());
if path.is_dir() { if path.is_dir() {
for p in read_dir(path).unwrap().filter_map(|e| { trace!(target: "json-tests", "running tests contained in '{}'", path.display());
let e = e.unwrap(); let test_files = read_dir(path)
if s.contains(&e.file_name()) { .expect("Directory exists on disk")
None .filter_map(|dir_entry| {
} else { let dir_entry = dir_entry.expect("Entry in directory listing exists");
Some(e.path()) if skip_list.contains(&dir_entry.file_name()) {
}}) { debug!(target: "json-tests", "'{:?}' is on the skip list.", dir_entry.file_name());
run_test_path_inner(&p, skip, runner, start_stop_hook, errors); None
} else {
Some(dir_entry.path())
}
});
for test_file in test_files {
run_test_path_inner(&test_file, skip, runner, start_stop_hook, errors);
} }
} else if extension == Some("swp") || extension == None { } else if extension == Some("swp") || extension == None {
trace!(target: "json-tests", "ignoring '{}', extension {:?} Junk?", path.display(), extension);
// Ignore junk // Ignore junk
} else { } else {
trace!(target: "json-tests", "running tests in '{}'", path.display());
let mut path = p.to_path_buf(); let mut path = p.to_path_buf();
path.set_extension("json"); path.set_extension("json");
run_test_file_append(&path, runner, start_stop_hook, errors) run_test_file_append(&path, runner, start_stop_hook, errors)
@@ -75,7 +93,7 @@ fn run_test_path_inner<H: FnMut(&str, HookType)>(
fn run_test_file_append<H: FnMut(&str, HookType)>( fn run_test_file_append<H: FnMut(&str, HookType)>(
path: &Path, path: &Path,
runner: fn(json_data: &[u8], start_stop_hook: &mut H) -> Vec<String>, runner: fn(path: &Path, json_data: &[u8], start_stop_hook: &mut H) -> Vec<String>,
start_stop_hook: &mut H, start_stop_hook: &mut H,
errors: &mut Vec<String> errors: &mut Vec<String>
) { ) {
@@ -85,12 +103,12 @@ fn run_test_file_append<H: FnMut(&str, HookType)>(
Err(_) => panic!("Error opening test file at: {:?}", path), Err(_) => panic!("Error opening test file at: {:?}", path),
}; };
file.read_to_end(&mut data).expect("Error reading test file"); file.read_to_end(&mut data).expect("Error reading test file");
errors.append(&mut runner(&data, start_stop_hook)); errors.append(&mut runner(&path, &data, start_stop_hook));
} }
pub fn run_test_file<H: FnMut(&str, HookType)>( pub fn run_test_file<H: FnMut(&str, HookType)>(
path: &Path, path: &Path,
runner: fn(json_data: &[u8], start_stop_hook: &mut H) -> Vec<String>, runner: fn(path: &Path, json_data: &[u8], start_stop_hook: &mut H) -> Vec<String>,
start_stop_hook: &mut H start_stop_hook: &mut H
) { ) {
let mut data = Vec::new(); let mut data = Vec::new();
@@ -99,7 +117,7 @@ pub fn run_test_file<H: FnMut(&str, HookType)>(
Err(_) => panic!("Error opening test file at: {:?}", path), Err(_) => panic!("Error opening test file at: {:?}", path),
}; };
file.read_to_end(&mut data).expect("Error reading test file"); file.read_to_end(&mut data).expect("Error reading test file");
let results = runner(&data, start_stop_hook); let results = runner(&path, &data, start_stop_hook);
let empty: [String; 0] = []; let empty: [String; 0] = [];
assert_eq!(results, empty); assert_eq!(results, empty);
} }
@@ -107,11 +125,25 @@ pub fn run_test_file<H: FnMut(&str, HookType)>(
#[cfg(test)] #[cfg(test)]
macro_rules! test { macro_rules! test {
($name: expr, $skip: expr) => { ($name: expr, $skip: expr) => {
::json_tests::test_common::run_test_path(::std::path::Path::new(concat!("res/ethereum/tests/", $name)), &$skip, do_json_test, &mut |_, _| ()); ::json_tests::test_common::run_test_path(
::std::path::Path::new(concat!("res/ethereum/tests/", $name)),
&$skip,
do_json_test,
&mut |_, _| ()
);
} }
} }
/// Declares a test /// Declares a test:
///
/// declare_test!(test_name, "path/to/folder/with/tests");
///
/// Declares a test but skip the named test files inside the folder (no extension):
///
/// declare_test!(skip => ["a-test-file", "other-test-file"], test_name, "path/to/folder/with/tests");
///
/// NOTE: a skipped test is considered a passing test as far as `cargo test` is concerned. Normally
/// one test corresponds to a folder full of test files, each of which may contain many tests.
#[macro_export] #[macro_export]
macro_rules! declare_test { macro_rules! declare_test {
(skip => $arr: expr, $id: ident, $name: expr) => { (skip => $arr: expr, $id: ident, $name: expr) => {

View File

@@ -23,22 +23,14 @@ use types::header::Header;
use types::transaction::UnverifiedTransaction; use types::transaction::UnverifiedTransaction;
use transaction_ext::Transaction; use transaction_ext::Transaction;
/// Run transaction jsontests on a given folder. #[allow(dead_code)]
pub fn run_test_path<H: FnMut(&str, HookType)>(p: &Path, skip: &[&'static str], h: &mut H) { fn do_json_test<H: FnMut(&str, HookType)>(path: &Path, json_data: &[u8], start_stop_hook: &mut H) -> Vec<String> {
::json_tests::test_common::run_test_path(p, skip, do_json_test, h) // Block number used to run the tests.
} // Make sure that all the specified features are activated.
const BLOCK_NUMBER: u64 = 0x6ffffffffffffe;
/// Run transaction jsontests on a given file. let tests = ethjson::test_helpers::transaction::Test::load(json_data)
pub fn run_test_file<H: FnMut(&str, HookType)>(p: &Path, h: &mut H) { .expect(&format!("Could not parse JSON transaction test data from {}", path.display()));
::json_tests::test_common::run_test_file(p, do_json_test, h)
}
// Block number used to run the tests.
// Make sure that all the specified features are activated.
const BLOCK_NUMBER: u64 = 0x6ffffffffffffe;
fn do_json_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_hook: &mut H) -> Vec<String> {
let tests = ethjson::transaction::Test::load(json_data).unwrap();
let mut failed = Vec::new(); let mut failed = Vec::new();
for (name, test) in tests.into_iter() { for (name, test) in tests.into_iter() {
start_stop_hook(&name, HookType::OnStart); start_stop_hook(&name, HookType::OnStart);

View File

@@ -14,6 +14,8 @@
// 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 Ethereum. If not, see <http://www.gnu.org/licenses/>. // along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
use std::path::Path;
use ethjson; use ethjson;
use trie::{TrieFactory, TrieSpec}; use trie::{TrieFactory, TrieSpec};
use ethtrie::RlpCodec; use ethtrie::RlpCodec;
@@ -21,13 +23,10 @@ use ethereum_types::H256;
use super::HookType; use super::HookType;
pub use self::generic::run_test_path as run_generic_test_path; #[allow(dead_code)]
pub use self::generic::run_test_file as run_generic_test_file; fn test_trie<H: FnMut(&str, HookType)>(path: &Path, json: &[u8], trie: TrieSpec, start_stop_hook: &mut H) -> Vec<String> {
pub use self::secure::run_test_path as run_secure_test_path; let tests = ethjson::test_helpers::trie::Test::load(json)
pub use self::secure::run_test_file as run_secure_test_file; .expect(&format!("Could not parse JSON trie test data from {}", path.display()));
fn test_trie<H: FnMut(&str, HookType)>(json: &[u8], trie: TrieSpec, start_stop_hook: &mut H) -> Vec<String> {
let tests = ethjson::trie::Test::load(json).unwrap();
let factory = TrieFactory::<_, RlpCodec>::new(trie); let factory = TrieFactory::<_, RlpCodec>::new(trie);
let mut result = vec![]; let mut result = vec![];
@@ -65,18 +64,9 @@ mod generic {
use super::HookType; use super::HookType;
/// Run generic trie jsontests on a given folder. #[allow(dead_code)]
pub fn run_test_path<H: FnMut(&str, HookType)>(p: &Path, skip: &[&'static str], h: &mut H) { fn do_json_test<H: FnMut(&str, HookType)>(path: &Path, json: &[u8], h: &mut H) -> Vec<String> {
::json_tests::test_common::run_test_path(p, skip, do_json_test, h) super::test_trie(path, json, TrieSpec::Generic, h)
}
/// Run generic trie jsontests on a given file.
pub fn run_test_file<H: FnMut(&str, HookType)>(p: &Path, h: &mut H) {
::json_tests::test_common::run_test_file(p, do_json_test, h)
}
fn do_json_test<H: FnMut(&str, HookType)>(json: &[u8], h: &mut H) -> Vec<String> {
super::test_trie(json, TrieSpec::Generic, h)
} }
declare_test!{TrieTests_trietest, "TrieTests/trietest"} declare_test!{TrieTests_trietest, "TrieTests/trietest"}
@@ -89,18 +79,9 @@ mod secure {
use super::HookType; use super::HookType;
/// Run secure trie jsontests on a given folder. #[allow(dead_code)]
pub fn run_test_path<H: FnMut(&str, HookType)>(p: &Path, skip: &[&'static str], h: &mut H) { fn do_json_test<H: FnMut(&str, HookType)>(path: &Path, json: &[u8], h: &mut H) -> Vec<String> {
::json_tests::test_common::run_test_path(p, skip, do_json_test, h) super::test_trie(path, json, TrieSpec::Secure, h)
}
/// Run secure trie jsontests on a given file.
pub fn run_test_file<H: FnMut(&str, HookType)>(p: &Path, h: &mut H) {
::json_tests::test_common::run_test_file(p, do_json_test, h)
}
fn do_json_test<H: FnMut(&str, HookType)>(json: &[u8], h: &mut H) -> Vec<String> {
super::test_trie(json, TrieSpec::Secure, h)
} }
declare_test!{TrieTests_hex_encoded_secure, "TrieTests/hex_encoded_securetrie_test"} declare_test!{TrieTests_hex_encoded_secure, "TrieTests/hex_encoded_securetrie_test"}

View File

@@ -55,13 +55,13 @@
extern crate account_db; extern crate account_db;
extern crate ansi_term; extern crate ansi_term;
extern crate bn;
extern crate common_types as types; extern crate common_types as types;
extern crate crossbeam; extern crate crossbeam_utils;
extern crate ethabi; extern crate ethabi;
extern crate ethash; extern crate ethash;
extern crate ethcore_blockchain as blockchain; extern crate ethcore_blockchain as blockchain;
extern crate ethcore_bloom_journal as bloom_journal; extern crate ethcore_bloom_journal as bloom_journal;
extern crate ethcore_builtin as builtin;
extern crate ethcore_call_contract as call_contract; extern crate ethcore_call_contract as call_contract;
extern crate ethcore_db as db; extern crate ethcore_db as db;
extern crate ethcore_io as io; extern crate ethcore_io as io;
@@ -83,10 +83,8 @@ extern crate len_caching_lock;
extern crate lru_cache; extern crate lru_cache;
extern crate memory_cache; extern crate memory_cache;
extern crate memory_db; extern crate memory_db;
extern crate num;
extern crate num_cpus; extern crate num_cpus;
extern crate parity_bytes as bytes; extern crate parity_bytes as bytes;
extern crate parity_crypto;
extern crate parity_snappy as snappy; extern crate parity_snappy as snappy;
extern crate parking_lot; extern crate parking_lot;
extern crate pod_account; extern crate pod_account;
@@ -153,7 +151,6 @@ extern crate fetch;
extern crate parity_runtime; extern crate parity_runtime;
pub mod block; pub mod block;
pub mod builtin;
pub mod client; pub mod client;
pub mod engines; pub mod engines;
pub mod error; pub mod error;

View File

@@ -467,7 +467,7 @@ mod tests {
#[test] #[test]
fn should_disallow_unsigned_transactions() { fn should_disallow_unsigned_transactions() {
let rlp = "ea80843b9aca0083015f90948921ebb5f79e9e3920abe571004d0b1d5119c154865af3107a400080038080".into(); let rlp = "ea80843b9aca0083015f90948921ebb5f79e9e3920abe571004d0b1d5119c154865af3107a400080038080";
let transaction: UnverifiedTransaction = ::rlp::decode(&::rustc_hex::FromHex::from_hex(rlp).unwrap()).unwrap(); let transaction: UnverifiedTransaction = ::rlp::decode(&::rustc_hex::FromHex::from_hex(rlp).unwrap()).unwrap();
let spec = ::ethereum::new_ropsten_test(); let spec = ::ethereum::new_ropsten_test();
let ethparams = get_default_ethash_extensions(); let ethparams = get_default_ethash_extensions();

View File

@@ -33,7 +33,7 @@ use futures::sync::mpsc;
use io::IoChannel; use io::IoChannel;
use miner::filter_options::{FilterOptions, FilterOperator}; use miner::filter_options::{FilterOptions, FilterOperator};
use miner::pool_client::{PoolClient, CachedNonceClient, NonceCache}; use miner::pool_client::{PoolClient, CachedNonceClient, NonceCache};
use miner; use miner::{self, MinerService};
use parking_lot::{Mutex, RwLock}; use parking_lot::{Mutex, RwLock};
use rayon::prelude::*; use rayon::prelude::*;
use types::transaction::{ use types::transaction::{
@@ -54,6 +54,7 @@ use client::{
BlockChain, ChainInfo, BlockProducer, SealedBlockImporter, Nonce, TransactionInfo, TransactionId BlockChain, ChainInfo, BlockProducer, SealedBlockImporter, Nonce, TransactionInfo, TransactionId
}; };
use client::{BlockId, ClientIoMessage}; use client::{BlockId, ClientIoMessage};
use client::traits::EngineClient;
use engines::{Engine, Seal, SealingState, EngineSigner}; use engines::{Engine, Seal, SealingState, EngineSigner};
use error::Error; use error::Error;
use executed::ExecutionError; use executed::ExecutionError;
@@ -509,7 +510,7 @@ impl Miner {
let sender = transaction.sender(); let sender = transaction.sender();
// Re-verify transaction again vs current state. // Re-verify transaction again vs current state.
let result = client.verify_signed(&transaction) let result = client.verify_for_pending_block(&transaction, &open_block.header)
.map_err(|e| e.into()) .map_err(|e| e.into())
.and_then(|_| { .and_then(|_| {
open_block.push_transaction(transaction, None) open_block.push_transaction(transaction, None)
@@ -855,11 +856,14 @@ impl Miner {
false false
} }
} }
/// Prepare pending block, check whether sealing is needed, and then update sealing. /// Prepare pending block, check whether sealing is needed, and then update sealing.
fn prepare_and_update_sealing<C: miner::BlockChainClient>(&self, chain: &C) { fn prepare_and_update_sealing<C: miner::BlockChainClient>(&self, chain: &C) {
use miner::MinerService;
match self.engine.sealing_state() { match self.engine.sealing_state() {
SealingState::Ready => self.update_sealing(chain), SealingState::Ready => {
self.maybe_enable_sealing();
self.update_sealing(chain)
}
SealingState::External => { SealingState::External => {
// this calls `maybe_enable_sealing()` // this calls `maybe_enable_sealing()`
if self.prepare_pending_block(chain) == BlockPreparationStatus::NotPrepared { if self.prepare_pending_block(chain) == BlockPreparationStatus::NotPrepared {
@@ -1411,6 +1415,9 @@ impl miner::MinerService for Miner {
service_transaction_checker.as_ref(), service_transaction_checker.as_ref(),
); );
queue.cull(client); queue.cull(client);
if is_internal_import {
chain.update_sealing();
}
}; };
if let Err(e) = channel.send(ClientIoMessage::execute(cull)) { if let Err(e) = channel.send(ClientIoMessage::execute(cull)) {
@@ -1418,8 +1425,12 @@ impl miner::MinerService for Miner {
} }
} else { } else {
self.transaction_queue.cull(client); self.transaction_queue.cull(client);
if is_internal_import {
self.update_sealing(chain);
}
} }
} }
if let Some(ref service_transaction_checker) = self.service_transaction_checker { if let Some(ref service_transaction_checker) = self.service_transaction_checker {
match service_transaction_checker.refresh_cache(chain) { match service_transaction_checker.refresh_cache(chain) {
Ok(true) => { Ok(true) => {

View File

@@ -113,11 +113,13 @@ impl<'a, C: 'a> PoolClient<'a, C> where
} }
} }
/// Verifies if signed transaction is executable. /// Verifies transaction against its block (before its import into this block)
/// Also Verifies if signed transaction is executable.
/// ///
/// This should perform any verifications that rely on chain status. /// This should perform any verifications that rely on chain status.
pub fn verify_signed(&self, tx: &SignedTransaction) -> Result<(), transaction::Error> { pub fn verify_for_pending_block(&self, tx: &SignedTransaction, header: &Header) -> Result<(), transaction::Error> {
self.engine.machine().verify_transaction(&tx, &self.best_block_header, self.chain) self.engine.machine().verify_transaction_basic(tx, header)?;
self.engine.machine().verify_transaction(tx, &self.best_block_header, self.chain)
} }
} }
@@ -138,8 +140,7 @@ impl<'a, C: 'a> pool::client::Client for PoolClient<'a, C> where
self.engine.verify_transaction_basic(&tx, &self.best_block_header)?; self.engine.verify_transaction_basic(&tx, &self.best_block_header)?;
let tx = self.engine.verify_transaction_unordered(tx, &self.best_block_header)?; let tx = self.engine.verify_transaction_unordered(tx, &self.best_block_header)?;
self.verify_signed(&tx)?; self.engine.machine().verify_transaction(&tx, &self.best_block_header, self.chain)?;
Ok(tx) Ok(tx)
} }

View File

@@ -40,13 +40,6 @@ impl PodState {
pub fn drain(self) -> BTreeMap<Address, PodAccount> { self.0 } pub fn drain(self) -> BTreeMap<Address, PodAccount> { self.0 }
} }
impl From<ethjson::blockchain::State> for PodState {
fn from(s: ethjson::blockchain::State) -> PodState {
let state = s.into_iter().map(|(addr, acc)| (addr.into(), PodAccount::from(acc))).collect();
PodState(state)
}
}
impl From<ethjson::spec::State> for PodState { impl From<ethjson::spec::State> for PodState {
fn from(s: ethjson::spec::State) -> PodState { fn from(s: ethjson::spec::State) -> PodState {
let state: BTreeMap<_,_> = s.into_iter() let state: BTreeMap<_,_> = s.into_iter()

View File

@@ -50,7 +50,7 @@ use self::io::SnapshotWriter;
use super::state_db::StateDB; use super::state_db::StateDB;
use super::state::Account as StateAccount; use super::state::Account as StateAccount;
use crossbeam::scope; use crossbeam_utils::thread;
use rand::{Rng, rngs::OsRng}; use rand::{Rng, rngs::OsRng};
pub use self::error::Error; pub use self::error::Error;
@@ -167,9 +167,9 @@ pub fn take_snapshot<W: SnapshotWriter + Send>(
let version = chunker.current_version(); let version = chunker.current_version();
let writer = Mutex::new(writer); let writer = Mutex::new(writer);
let (state_hashes, block_hashes) = scope(|scope| -> Result<(Vec<H256>, Vec<H256>), Error> { let (state_hashes, block_hashes) = thread::scope(|scope| -> Result<(Vec<H256>, Vec<H256>), Error> {
let writer = &writer; let writer = &writer;
let block_guard = scope.spawn(move || { let block_guard = scope.spawn(move |_| {
chunk_secondary(chunker, chain, block_hash, writer, p) chunk_secondary(chunker, chain, block_hash, writer, p)
}); });
@@ -181,7 +181,7 @@ pub fn take_snapshot<W: SnapshotWriter + Send>(
let mut state_guards = Vec::with_capacity(num_threads as usize); let mut state_guards = Vec::with_capacity(num_threads as usize);
for thread_idx in 0..num_threads { for thread_idx in 0..num_threads {
let state_guard = scope.spawn(move || -> Result<Vec<H256>, Error> { let state_guard = scope.spawn(move |_| -> Result<Vec<H256>, Error> {
let mut chunk_hashes = Vec::new(); let mut chunk_hashes = Vec::new();
for part in (thread_idx..SNAPSHOT_SUBPARTS).step_by(num_threads) { for part in (thread_idx..SNAPSHOT_SUBPARTS).step_by(num_threads) {
@@ -205,7 +205,7 @@ pub fn take_snapshot<W: SnapshotWriter + Send>(
debug!(target: "snapshot", "Took a snapshot of {} accounts", p.accounts.load(Ordering::SeqCst)); debug!(target: "snapshot", "Took a snapshot of {} accounts", p.accounts.load(Ordering::SeqCst));
Ok((state_hashes, block_hashes)) Ok((state_hashes, block_hashes))
})?; }).expect("Sub-thread never panics; qed")?;
info!(target: "snapshot", "produced {} state chunks and {} block chunks.", state_hashes.len(), block_hashes.len()); info!(target: "snapshot", "produced {} state chunks and {} block chunks.", state_hashes.len(), block_hashes.len());

View File

@@ -20,6 +20,7 @@ use hash::KECCAK_NULL_RLP;
use spec::seal::Seal; use spec::seal::Seal;
/// Genesis components. /// Genesis components.
#[derive(Debug)]
pub struct Genesis { pub struct Genesis {
/// Seal. /// Seal.
pub seal: Seal, pub seal: Seal,

View File

@@ -21,6 +21,7 @@ use ethereum_types::{H64, H256, H520};
use ethjson; use ethjson;
/// Classic ethereum seal. /// Classic ethereum seal.
#[derive(Debug)]
pub struct Ethereum { pub struct Ethereum {
/// Seal nonce. /// Seal nonce.
pub nonce: H64, pub nonce: H64,
@@ -37,6 +38,7 @@ impl Into<Generic> for Ethereum {
} }
/// AuthorityRound seal. /// AuthorityRound seal.
#[derive(Debug)]
pub struct AuthorityRound { pub struct AuthorityRound {
/// Seal step. /// Seal step.
pub step: usize, pub step: usize,
@@ -45,6 +47,7 @@ pub struct AuthorityRound {
} }
/// Tendermint seal. /// Tendermint seal.
#[derive(Debug)]
pub struct Tendermint { pub struct Tendermint {
/// Seal round. /// Seal round.
pub round: usize, pub round: usize,
@@ -73,9 +76,11 @@ impl Into<Generic> for Tendermint {
} }
} }
#[derive(Debug)]
pub struct Generic(pub Vec<u8>); pub struct Generic(pub Vec<u8>);
/// Genesis seal type. /// Genesis seal type.
#[derive(Debug)]
pub enum Seal { pub enum Seal {
/// Classic ethereum seal. /// Classic ethereum seal.
Ethereum(Ethereum), Ethereum(Ethereum),

View File

@@ -21,7 +21,7 @@ use std::io::Read;
use std::path::Path; use std::path::Path;
use std::sync::Arc; use std::sync::Arc;
use bytes::Bytes; use bytes::{Bytes, ToPretty};
use ethereum_types::{H256, Bloom, U256, Address}; use ethereum_types::{H256, Bloom, U256, Address};
use ethjson; use ethjson;
use hash::{KECCAK_NULL_RLP, keccak}; use hash::{KECCAK_NULL_RLP, keccak};
@@ -65,7 +65,7 @@ fn fmt_err<F: ::std::fmt::Display>(f: F) -> String {
/// we define a "bugfix" hard fork as any hard fork which /// we define a "bugfix" hard fork as any hard fork which
/// you would put on-by-default in a new chain. /// you would put on-by-default in a new chain.
#[derive(Debug, PartialEq, Default)] #[derive(Debug, PartialEq, Default)]
#[cfg_attr(test, derive(Clone))] #[cfg_attr(any(test, feature = "test-helpers"), derive(Clone))]
pub struct CommonParams { pub struct CommonParams {
/// Account start nonce. /// Account start nonce.
pub account_start_nonce: U256, pub account_start_nonce: U256,
@@ -121,8 +121,18 @@ pub struct CommonParams {
pub eip1283_transition: BlockNumber, pub eip1283_transition: BlockNumber,
/// Number of first block where EIP-1283 rules end. /// Number of first block where EIP-1283 rules end.
pub eip1283_disable_transition: BlockNumber, pub eip1283_disable_transition: BlockNumber,
/// Number of first block where EIP-1283 rules re-enabled.
pub eip1283_reenable_transition: BlockNumber,
/// Number of first block where EIP-1014 rules begin. /// Number of first block where EIP-1014 rules begin.
pub eip1014_transition: BlockNumber, pub eip1014_transition: BlockNumber,
/// Number of first block where EIP-1706 rules begin.
pub eip1706_transition: BlockNumber,
/// Number of first block where EIP-1344 rules begin: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1344.md
pub eip1344_transition: BlockNumber,
/// Number of first block where EIP-1884 rules begin:https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1884.md
pub eip1884_transition: BlockNumber,
/// Number of first block where EIP-2028 rules begin.
pub eip2028_transition: BlockNumber,
/// Number of first block where dust cleanup rules (EIP-168 and EIP169) begin. /// Number of first block where dust cleanup rules (EIP-168 and EIP169) begin.
pub dust_protection_transition: BlockNumber, pub dust_protection_transition: BlockNumber,
/// Nonce cap increase per block. Nonce cap is only checked if dust protection is enabled. /// Nonce cap increase per block. Nonce cap is only checked if dust protection is enabled.
@@ -189,7 +199,22 @@ impl CommonParams {
schedule.have_return_data = block_number >= self.eip211_transition; schedule.have_return_data = block_number >= self.eip211_transition;
schedule.have_bitwise_shifting = block_number >= self.eip145_transition; schedule.have_bitwise_shifting = block_number >= self.eip145_transition;
schedule.have_extcodehash = block_number >= self.eip1052_transition; schedule.have_extcodehash = block_number >= self.eip1052_transition;
schedule.eip1283 = block_number >= self.eip1283_transition && !(block_number >= self.eip1283_disable_transition); schedule.have_chain_id = block_number >= self.eip1344_transition;
schedule.eip1283 =
(block_number >= self.eip1283_transition &&
!(block_number >= self.eip1283_disable_transition)) ||
block_number >= self.eip1283_reenable_transition;
schedule.eip1706 = block_number >= self.eip1706_transition;
if block_number >= self.eip1884_transition {
schedule.have_selfbalance = true;
schedule.sload_gas = 800;
schedule.balance_gas = 700;
schedule.extcodehash_gas = 700;
}
if block_number >= self.eip2028_transition {
schedule.tx_data_non_zero_gas = 16;
}
if block_number >= self.eip210_transition { if block_number >= self.eip210_transition {
schedule.blockhash_gas = 800; schedule.blockhash_gas = 800;
} }
@@ -304,10 +329,30 @@ impl From<ethjson::spec::Params> for CommonParams {
BlockNumber::max_value, BlockNumber::max_value,
Into::into, Into::into,
), ),
eip1283_reenable_transition: p.eip1283_reenable_transition.map_or_else(
BlockNumber::max_value,
Into::into,
),
eip1706_transition: p.eip1706_transition.map_or_else(
BlockNumber::max_value,
Into::into,
),
eip1014_transition: p.eip1014_transition.map_or_else( eip1014_transition: p.eip1014_transition.map_or_else(
BlockNumber::max_value, BlockNumber::max_value,
Into::into, Into::into,
), ),
eip1344_transition: p.eip1344_transition.map_or_else(
BlockNumber::max_value,
Into::into,
),
eip1884_transition: p.eip1884_transition.map_or_else(
BlockNumber::max_value,
Into::into,
),
eip2028_transition: p.eip2028_transition.map_or_else(
BlockNumber::max_value,
Into::into,
),
dust_protection_transition: p.dust_protection_transition.map_or_else( dust_protection_transition: p.dust_protection_transition.map_or_else(
BlockNumber::max_value, BlockNumber::max_value,
Into::into, Into::into,
@@ -646,53 +691,58 @@ impl Spec {
let (root, db) = { let (root, db) = {
let mut state = State::from_existing(db, root, start_nonce, factories.clone())?; let mut state = State::from_existing(db, root, start_nonce, factories.clone())?;
if self.constructors.is_empty() {
state.populate_from(self.genesis_state.clone());
let _ = state.commit()?;
} else {
// Execute contract constructors. // Execute contract constructors.
let env_info = EnvInfo { let env_info = EnvInfo {
number: 0, number: 0,
author: self.author, author: self.author,
timestamp: self.timestamp, timestamp: self.timestamp,
difficulty: self.difficulty, difficulty: self.difficulty,
last_hashes: Default::default(), last_hashes: Default::default(),
gas_used: U256::zero(), gas_used: U256::zero(),
gas_limit: U256::max_value(), gas_limit: U256::max_value(),
};
let from = Address::zero();
for &(ref address, ref constructor) in self.constructors.iter() {
trace!(target: "spec", "run_constructors: Creating a contract at {}.", address);
trace!(target: "spec", " .. root before = {}", state.root());
let params = ActionParams {
code_address: address.clone(),
code_hash: Some(keccak(constructor)),
address: address.clone(),
sender: from.clone(),
origin: from.clone(),
gas: U256::max_value(),
gas_price: Default::default(),
value: ActionValue::Transfer(Default::default()),
code: Some(Arc::new(constructor.clone())),
data: None,
call_type: CallType::None,
params_type: ParamsType::Embedded,
}; };
let mut substate = Substate::new(); let from = Address::zero();
for &(ref address, ref constructor) in self.constructors.iter() {
trace!(target: "spec", "run_constructors: Creating a contract at {}.", address);
trace!(target: "spec", " .. root before = {}", state.root());
let params = ActionParams {
code_address: address.clone(),
code_hash: Some(keccak(constructor)),
address: address.clone(),
sender: from.clone(),
origin: from.clone(),
gas: U256::max_value(),
gas_price: Default::default(),
value: ActionValue::Transfer(Default::default()),
code: Some(Arc::new(constructor.clone())),
data: None,
call_type: CallType::None,
params_type: ParamsType::Embedded,
};
{ let mut substate = Substate::new();
let machine = self.engine.machine();
let schedule = machine.schedule(env_info.number); {
let mut exec = Executive::new(&mut state, &env_info, &machine, &schedule); let machine = self.engine.machine();
if let Err(e) = exec.create(params, &mut substate, &mut NoopTracer, &mut NoopVMTracer) { let schedule = machine.schedule(env_info.number);
warn!(target: "spec", "Genesis constructor execution at {} failed: {}.", address, e); let mut exec = Executive::new(&mut state, &env_info, &machine, &schedule);
if let Err(e) = exec.create(params, &mut substate, &mut NoopTracer, &mut NoopVMTracer) {
warn!(target: "spec", "Genesis constructor execution at {} failed: {}.", address, e);
}
} }
}
if let Err(e) = state.commit() { if let Err(e) = state.commit() {
warn!(target: "spec", "Genesis constructor trie commit at {} failed: {}.", address, e); warn!(target: "spec", "Genesis constructor trie commit at {} failed: {}.", address, e);
} }
trace!(target: "spec", " .. root after = {}", state.root()); trace!(target: "spec", " .. root after = {}", state.root());
}
} }
state.drop() state.drop()

View File

@@ -2608,7 +2608,7 @@ mod tests {
fn should_not_panic_on_state_diff_with_storage() { fn should_not_panic_on_state_diff_with_storage() {
let mut state = get_temp_state(); let mut state = get_temp_state();
let a = Address::from_low_u64_be(0xa); let a = Address::from_low_u64_be(0xa);
state.init_code(&a, b"abcdefg".to_vec()).unwrap();; state.init_code(&a, b"abcdefg".to_vec()).unwrap();
state.add_balance(&a, &256.into(), CleanupMode::NoEmpty).unwrap(); state.add_balance(&a, &256.into(), CleanupMode::NoEmpty).unwrap();
state.set_storage(&a, H256::from_low_u64_be(0xb), H256::from_low_u64_be(0xc).into()).unwrap(); state.set_storage(&a, H256::from_low_u64_be(0xb), H256::from_low_u64_be(0xc).into()).unwrap();

View File

@@ -16,8 +16,10 @@
//! Simple executive tracer. //! Simple executive tracer.
use std::cmp::min;
use ethereum_types::{U256, Address}; use ethereum_types::{U256, Address};
use vm::{Error as VmError, ActionParams}; use vm::{Error as VmError, ActionParams};
use log::{debug, warn};
use trace::trace::{Call, Create, Action, Res, CreateResult, CallResult, VMTrace, VMOperation, VMExecutedOperation, MemoryDiff, StorageDiff, Suicide, Reward, RewardType}; use trace::trace::{Call, Create, Action, Res, CreateResult, CallResult, VMTrace, VMOperation, VMExecutedOperation, MemoryDiff, StorageDiff, Suicide, Reward, RewardType};
use trace::{Tracer, VMTracer, FlatTrace}; use trace::{Tracer, VMTracer, FlatTrace};
@@ -193,12 +195,16 @@ impl Tracer for ExecutiveTracer {
} }
} }
struct TraceData {
mem_written: Option<(usize, usize)>,
store_written: Option<(U256, U256)>,
}
/// Simple VM tracer. Traces all operations. /// Simple VM tracer. Traces all operations.
pub struct ExecutiveVMTracer { pub struct ExecutiveVMTracer {
data: VMTrace, data: VMTrace,
depth: usize, depth: usize,
last_mem_written: Option<(usize, usize)>, trace_stack: Vec<TraceData>,
last_store_written: Option<(U256, U256)>,
} }
impl ExecutiveVMTracer { impl ExecutiveVMTracer {
@@ -212,8 +218,7 @@ impl ExecutiveVMTracer {
subs: vec![], subs: vec![],
}, },
depth: 0, depth: 0,
last_mem_written: None, trace_stack: vec![],
last_store_written: None,
} }
} }
@@ -240,18 +245,27 @@ impl VMTracer for ExecutiveVMTracer {
executed: None, executed: None,
}); });
}); });
self.last_mem_written = mem_written; self.trace_stack.push(TraceData { mem_written, store_written });
self.last_store_written = store_written; }
fn trace_failed(&mut self) {
let _ = self.trace_stack.pop().expect("pushed in trace_prepare_execute; qed");
} }
fn trace_executed(&mut self, gas_used: U256, stack_push: &[U256], mem: &[u8]) { fn trace_executed(&mut self, gas_used: U256, stack_push: &[U256], mem: &[u8]) {
let mem_diff = self.last_mem_written.take().map(|(o, s)| (o, &(mem[o..o+s]))); let TraceData { mem_written, store_written } = self.trace_stack.pop().expect("pushed in trace_prepare_execute; qed");
let store_diff = self.last_store_written.take(); let mem_diff = mem_written.map(|(o, s)| {
if o + s > mem.len() {
warn!(target: "trace", "mem_written is out of bounds");
}
(o, &mem[min(mem.len(), o)..min(o + s, mem.len())])
});
let store_diff = store_written;
Self::with_trace_in_depth(&mut self.data, self.depth, move |trace| { Self::with_trace_in_depth(&mut self.data, self.depth, move |trace| {
let ex = VMExecutedOperation { let ex = VMExecutedOperation {
gas_used: gas_used, gas_used: gas_used,
stack_push: stack_push.iter().cloned().collect(), stack_push: stack_push.to_vec(),
mem_diff: mem_diff.map(|(s, r)| MemoryDiff { offset: s, data: r.iter().cloned().collect() }), mem_diff: mem_diff.map(|(s, r)| MemoryDiff { offset: s, data: r.to_vec() }),
store_diff: store_diff.map(|(l, v)| StorageDiff { location: l, value: v }), store_diff: store_diff.map(|(l, v)| StorageDiff { location: l, value: v }),
}; };
trace.operations.last_mut().expect("trace_executed is always called after a trace_prepare_execute; trace.operations cannot be empty; qed").executed = Some(ex); trace.operations.last_mut().expect("trace_executed is always called after a trace_prepare_execute; trace.operations cannot be empty; qed").executed = Some(ex);

View File

@@ -85,6 +85,9 @@ pub trait VMTracer: Send {
/// Trace the preparation to execute a single valid instruction. /// Trace the preparation to execute a single valid instruction.
fn trace_prepare_execute(&mut self, _pc: usize, _instruction: u8, _gas_cost: U256, _mem_written: Option<(usize, usize)>, _store_written: Option<(U256, U256)>) {} fn trace_prepare_execute(&mut self, _pc: usize, _instruction: u8, _gas_cost: U256, _mem_written: Option<(usize, usize)>, _store_written: Option<(U256, U256)>) {}
/// Trace the execution failure of a single instruction.
fn trace_failed(&mut self) {}
/// Trace the finalised execution of a single valid instruction. /// Trace the finalised execution of a single valid instruction.
fn trace_executed(&mut self, _gas_used: U256, _stack_push: &[U256], _mem: &[u8]) {} fn trace_executed(&mut self, _gas_used: U256, _stack_push: &[U256], _mem: &[u8]) {}

View File

@@ -16,4 +16,7 @@ rlp_derive = { path = "../../util/rlp-derive" }
unexpected = { path = "../../util/unexpected" } unexpected = { path = "../../util/unexpected" }
[dev-dependencies] [dev-dependencies]
rustc-hex= "1.0" rustc-hex = "1.0"
[features]
test-helpers = []

View File

@@ -28,9 +28,6 @@ pub enum Error {
AlreadyImported, AlreadyImported,
/// Transaction is not valid anymore (state already has higher nonce) /// Transaction is not valid anymore (state already has higher nonce)
Old, Old,
/// Transaction has too low fee
/// (there is already a transaction with the same sender-nonce but higher gas price)
TooCheapToReplace,
/// Transaction was not imported to the queue because limit has been reached. /// Transaction was not imported to the queue because limit has been reached.
LimitReached, LimitReached,
/// Transaction's gas price is below threshold. /// Transaction's gas price is below threshold.
@@ -40,6 +37,14 @@ pub enum Error {
/// Transaction gas price /// Transaction gas price
got: U256, got: U256,
}, },
/// Transaction has too low fee
/// (there is already a transaction with the same sender-nonce but higher gas price)
TooCheapToReplace {
/// previous transaction's gas price
prev: Option<U256>,
/// new transaction's gas price
new: Option<U256>,
},
/// Transaction's gas is below currently set minimal gas requirement. /// Transaction's gas is below currently set minimal gas requirement.
InsufficientGas { InsufficientGas {
/// Minimal expected gas /// Minimal expected gas
@@ -99,7 +104,10 @@ impl fmt::Display for Error {
let msg = match *self { let msg = match *self {
AlreadyImported => "Already imported".into(), AlreadyImported => "Already imported".into(),
Old => "No longer valid".into(), Old => "No longer valid".into(),
TooCheapToReplace => "Gas price too low to replace".into(), TooCheapToReplace { prev, new } =>
format!("Gas price too low to replace, previous tx gas: {:?}, new tx gas: {:?}",
prev, new
),
LimitReached => "Transaction limit reached".into(), LimitReached => "Transaction limit reached".into(),
InsufficientGasPrice { minimal, got } => InsufficientGasPrice { minimal, got } =>
format!("Insufficient gas price. Min={}, Given={}", minimal, got), format!("Insufficient gas price. Min={}, Given={}", minimal, got),

View File

@@ -54,7 +54,11 @@ impl Default for Action {
impl rlp::Decodable for Action { impl rlp::Decodable for Action {
fn decode(rlp: &Rlp) -> Result<Self, DecoderError> { fn decode(rlp: &Rlp) -> Result<Self, DecoderError> {
if rlp.is_empty() { if rlp.is_empty() {
Ok(Action::Create) if rlp.is_data() {
Ok(Action::Create)
} else {
Err(DecoderError::RlpExpectedToBeData)
}
} else { } else {
Ok(Action::Call(rlp.as_val()?)) Ok(Action::Call(rlp.as_val()?))
} }
@@ -134,8 +138,8 @@ impl Transaction {
} }
} }
impl From<ethjson::state::Transaction> for SignedTransaction { impl From<ethjson::transaction::Transaction> for SignedTransaction {
fn from(t: ethjson::state::Transaction) -> Self { fn from(t: ethjson::transaction::Transaction) -> Self {
let to: Option<ethjson::hash::Address> = t.to.into(); let to: Option<ethjson::hash::Address> = t.to.into();
let secret = t.secret.map(|s| Secret::from(s.0)); let secret = t.secret.map(|s| Secret::from(s.0));
let tx = Transaction { let tx = Transaction {
@@ -566,6 +570,20 @@ mod tests {
assert_eq!(t.chain_id(), None); assert_eq!(t.chain_id(), None);
} }
#[test]
fn empty_atom_as_create_action() {
let empty_atom = [0x80];
let action: Action = rlp::decode(&empty_atom).unwrap();
assert_eq!(action, Action::Create);
}
#[test]
fn empty_list_as_create_action_rejected() {
let empty_list = [0xc0];
let action: Result<Action, DecoderError> = rlp::decode(&empty_list);
assert_eq!(action, Err(DecoderError::RlpExpectedToBeData));
}
#[test] #[test]
fn signing_eip155_zero_chainid() { fn signing_eip155_zero_chainid() {
use ethkey::{Random, Generator}; use ethkey::{Random, Generator};

View File

@@ -65,7 +65,7 @@ impl From<ethjson::vm::Env> for EnvInfo {
fn from(e: ethjson::vm::Env) -> Self { fn from(e: ethjson::vm::Env) -> Self {
let number = e.number.into(); let number = e.number.into();
EnvInfo { EnvInfo {
number: number, number,
author: e.author.into(), author: e.author.into(),
difficulty: e.difficulty.into(), difficulty: e.difficulty.into(),
gas_limit: e.gas_limit.into(), gas_limit: e.gas_limit.into(),

View File

@@ -91,7 +91,7 @@ pub trait Ext {
/// Creates new contract. /// Creates new contract.
/// ///
/// Returns gas_left and contract address if contract creation was succesfull. /// Returns gas_left and contract address if contract creation was successful.
fn create( fn create(
&mut self, &mut self,
gas: &U256, gas: &U256,
@@ -144,6 +144,9 @@ pub trait Ext {
/// Returns environment info. /// Returns environment info.
fn env_info(&self) -> &EnvInfo; fn env_info(&self) -> &EnvInfo;
/// Returns the chain ID of the blockchain
fn chain_id(&self) -> u64;
/// Returns current depth of execution. /// Returns current depth of execution.
/// ///
/// If contract A calls contract B, and contract B calls C, /// If contract A calls contract B, and contract B calls C,
@@ -160,8 +163,12 @@ pub trait Ext {
fn trace_next_instruction(&mut self, _pc: usize, _instruction: u8, _current_gas: U256) -> bool { false } fn trace_next_instruction(&mut self, _pc: usize, _instruction: u8, _current_gas: U256) -> bool { false }
/// Prepare to trace an operation. Passthrough for the VM trace. /// Prepare to trace an operation. Passthrough for the VM trace.
/// For each call of `trace_prepare_execute` either `trace_failed` or `trace_executed` MUST be called.
fn trace_prepare_execute(&mut self, _pc: usize, _instruction: u8, _gas_cost: U256, _mem_written: Option<(usize, usize)>, _store_written: Option<(U256, U256)>) {} fn trace_prepare_execute(&mut self, _pc: usize, _instruction: u8, _gas_cost: U256, _mem_written: Option<(usize, usize)>, _store_written: Option<(U256, U256)>) {}
/// Trace the execution failure of a single instruction.
fn trace_failed(&mut self) {}
/// Trace the finalised execution of a single instruction. /// Trace the finalised execution of a single instruction.
fn trace_executed(&mut self, _gas_used: U256, _stack_push: &[U256], _mem: &[u8]) {} fn trace_executed(&mut self, _gas_used: U256, _stack_push: &[U256], _mem: &[u8]) {}

View File

@@ -44,11 +44,7 @@ impl ReturnData {
} }
/// Create `ReturnData` from give buffer and slice. /// Create `ReturnData` from give buffer and slice.
pub fn new(mem: Vec<u8>, offset: usize, size: usize) -> Self { pub fn new(mem: Vec<u8>, offset: usize, size: usize) -> Self {
ReturnData { ReturnData { mem, offset, size }
mem: mem,
offset: offset,
size: size,
}
} }
} }

View File

@@ -15,8 +15,17 @@
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>. // along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
//! Cost schedule and other parameterisations for the EVM. //! Cost schedule and other parameterisations for the EVM.
use std::collections::HashMap;
use ethereum_types::U256;
/// Definition of schedules that can be applied to a version.
#[derive(Debug)]
pub enum VersionedSchedule {
PWasm,
}
/// Definition of the cost schedule and other parameterisations for the EVM. /// Definition of the cost schedule and other parameterisations for the EVM.
#[derive(Debug)]
pub struct Schedule { pub struct Schedule {
/// Does it support exceptional failed code deposit /// Does it support exceptional failed code deposit
pub exceptional_failed_code_deposit: bool, pub exceptional_failed_code_deposit: bool,
@@ -84,7 +93,7 @@ pub struct Schedule {
pub tx_create_gas: usize, pub tx_create_gas: usize,
/// Additional cost for empty data transaction /// Additional cost for empty data transaction
pub tx_data_zero_gas: usize, pub tx_data_zero_gas: usize,
/// Aditional cost for non-empty data transaction /// Additional cost for non-empty data transaction
pub tx_data_non_zero_gas: usize, pub tx_data_non_zero_gas: usize,
/// Gas price for copying memory /// Gas price for copying memory
pub copy_gas: usize, pub copy_gas: usize,
@@ -115,10 +124,16 @@ pub struct Schedule {
pub have_return_data: bool, pub have_return_data: bool,
/// SHL, SHR, SAR opcodes enabled. /// SHL, SHR, SAR opcodes enabled.
pub have_bitwise_shifting: bool, pub have_bitwise_shifting: bool,
/// CHAINID opcode enabled.
pub have_chain_id: bool,
/// SELFBALANCE opcode enabled.
pub have_selfbalance: bool,
/// Kill basic accounts below this balance if touched. /// Kill basic accounts below this balance if touched.
pub kill_dust: CleanDustMode, pub kill_dust: CleanDustMode,
/// Enable EIP-1283 rules /// Enable EIP-1283 rules
pub eip1283: bool, pub eip1283: bool,
/// Enable EIP-1706 rules
pub eip1706: bool,
/// VM execution does not increase null signed address nonce if this field is true. /// VM execution does not increase null signed address nonce if this field is true.
pub keep_unsigned_nonce: bool, pub keep_unsigned_nonce: bool,
/// Wasm extra schedule settings, if wasm activated /// Wasm extra schedule settings, if wasm activated
@@ -126,6 +141,7 @@ pub struct Schedule {
} }
/// Wasm cost table /// Wasm cost table
#[derive(Debug)]
pub struct WasmCosts { pub struct WasmCosts {
/// Default opcode cost /// Default opcode cost
pub regular: u32, pub regular: u32,
@@ -179,7 +195,7 @@ impl Default for WasmCosts {
} }
/// Dust accounts cleanup mode. /// Dust accounts cleanup mode.
#[derive(PartialEq, Eq)] #[derive(Debug, PartialEq, Eq)]
pub enum CleanDustMode { pub enum CleanDustMode {
/// Dust cleanup is disabled. /// Dust cleanup is disabled.
Off, Off,
@@ -209,6 +225,8 @@ impl Schedule {
have_revert: false, have_revert: false,
have_return_data: false, have_return_data: false,
have_bitwise_shifting: false, have_bitwise_shifting: false,
have_chain_id: false,
have_selfbalance: false,
have_extcodehash: false, have_extcodehash: false,
stack_limit: 1024, stack_limit: 1024,
max_depth: 1024, max_depth: 1024,
@@ -253,6 +271,7 @@ impl Schedule {
have_static_call: false, have_static_call: false,
kill_dust: CleanDustMode::Off, kill_dust: CleanDustMode::Off,
eip1283: false, eip1283: false,
eip1706: false,
keep_unsigned_nonce: false, keep_unsigned_nonce: false,
wasm: None, wasm: None,
} }
@@ -275,6 +294,18 @@ impl Schedule {
schedule schedule
} }
/// Schedule for the Istanbul fork of the Ethereum main net.
pub fn new_istanbul() -> Schedule {
let mut schedule = Self::new_constantinople();
schedule.have_chain_id = true; // EIP 1344
schedule.tx_data_non_zero_gas = 16; // EIP 2028
schedule.sload_gas = 800; // EIP 1884
schedule.balance_gas = 700; // EIP 1884
schedule.extcodehash_gas = 700; // EIP 1884
schedule.have_selfbalance = true; // EIP 1884
schedule
}
fn new(efcd: bool, hdc: bool, tcg: usize) -> Schedule { fn new(efcd: bool, hdc: bool, tcg: usize) -> Schedule {
Schedule { Schedule {
exceptional_failed_code_deposit: efcd, exceptional_failed_code_deposit: efcd,
@@ -283,6 +314,8 @@ impl Schedule {
have_revert: false, have_revert: false,
have_return_data: false, have_return_data: false,
have_bitwise_shifting: false, have_bitwise_shifting: false,
have_chain_id: false,
have_selfbalance: false,
have_extcodehash: false, have_extcodehash: false,
stack_limit: 1024, stack_limit: 1024,
max_depth: 1024, max_depth: 1024,
@@ -327,6 +360,7 @@ impl Schedule {
have_static_call: false, have_static_call: false,
kill_dust: CleanDustMode::Off, kill_dust: CleanDustMode::Off,
eip1283: false, eip1283: false,
eip1706: false,
keep_unsigned_nonce: false, keep_unsigned_nonce: false,
wasm: None, wasm: None,
} }

View File

@@ -67,6 +67,8 @@ pub struct FakeExt {
pub balances: HashMap<Address, U256>, pub balances: HashMap<Address, U256>,
pub tracing: bool, pub tracing: bool,
pub is_static: bool, pub is_static: bool,
chain_id: u64,
} }
// similar to the normal `finalize` function, but ignoring NeedsReturn. // similar to the normal `finalize` function, but ignoring NeedsReturn.
@@ -98,11 +100,24 @@ impl FakeExt {
ext ext
} }
/// New fake externalities with Istanbul schedule rules
pub fn new_istanbul() -> Self {
let mut ext = FakeExt::default();
ext.schedule = Schedule::new_istanbul();
ext
}
/// Alter fake externalities to allow wasm /// Alter fake externalities to allow wasm
pub fn with_wasm(mut self) -> Self { pub fn with_wasm(mut self) -> Self {
self.schedule.wasm = Some(Default::default()); self.schedule.wasm = Some(Default::default());
self self
} }
/// Set chain ID
pub fn with_chain_id(mut self, chain_id: u64) -> Self {
self.chain_id = chain_id;
self
}
} }
impl Ext for FakeExt { impl Ext for FakeExt {
@@ -200,7 +215,7 @@ impl Ext for FakeExt {
fn log(&mut self, topics: Vec<H256>, data: &[u8]) -> Result<()> { fn log(&mut self, topics: Vec<H256>, data: &[u8]) -> Result<()> {
self.logs.push(FakeLogEntry { self.logs.push(FakeLogEntry {
topics: topics, topics,
data: data.to_vec() data: data.to_vec()
}); });
Ok(()) Ok(())
@@ -223,6 +238,10 @@ impl Ext for FakeExt {
&self.info &self.info
} }
fn chain_id(&self) -> u64 {
self.chain_id
}
fn depth(&self) -> usize { fn depth(&self) -> usize {
self.depth self.depth
} }

View File

@@ -14,7 +14,7 @@ docopt = "1.0"
env_logger = "0.5" env_logger = "0.5"
ethcore = { path = "../ethcore", features = ["test-helpers", "json-tests", "to-pod-full"] } ethcore = { path = "../ethcore", features = ["test-helpers", "json-tests", "to-pod-full"] }
ethereum-types = "0.6.0" ethereum-types = "0.6.0"
ethjson = { path = "../json" } ethjson = { path = "../json", features = ["test-helpers"] }
evm = { path = "../ethcore/evm" } evm = { path = "../ethcore/evm" }
panic_hook = { path = "../util/panic-hook" } panic_hook = { path = "../util/panic-hook" }
parity-bytes = "0.1" parity-bytes = "0.1"

View File

@@ -174,7 +174,7 @@ fn run_stats_jsontests_vm(args: Args) {
} }
fn run_state_test(args: Args) { fn run_state_test(args: Args) {
use ethjson::state::test::Test; use ethjson::test_helpers::state::Test;
let file = args.arg_file.expect("FILE is required"); let file = args.arg_file.expect("FILE is required");
let mut file = match fs::File::open(&file) { let mut file = match fs::File::open(&file) {

View File

@@ -22,7 +22,7 @@ extern crate rlp;
extern crate ethcore; extern crate ethcore;
extern crate parity_bytes as bytes; extern crate parity_bytes as bytes;
extern crate ethereum_types; extern crate ethereum_types;
extern crate jsonrpc_core as core; extern crate jsonrpc_core;
extern crate jsonrpc_http_server as http; extern crate jsonrpc_http_server as http;
pub mod error; pub mod error;
@@ -32,8 +32,8 @@ use std::thread;
use std::sync::{mpsc, Arc}; use std::sync::{mpsc, Arc};
use std::net::{SocketAddr, IpAddr}; use std::net::{SocketAddr, IpAddr};
use core::futures::future::{self, FutureResult}; use jsonrpc_core::futures::future::{self, FutureResult};
use core::futures::{self, Future}; use jsonrpc_core::futures::{self, Future};
use ethcore::client::BlockChainClient; use ethcore::client::BlockChainClient;
use http::hyper::{self, server, Method, StatusCode, Body, use http::hyper::{self, server, Method, StatusCode, Body,
header::{self, HeaderValue}, header::{self, HeaderValue},
@@ -51,19 +51,19 @@ pub struct IpfsHandler {
/// Hostnames allowed in the `Host` request header /// Hostnames allowed in the `Host` request header
allowed_hosts: Option<Vec<Host>>, allowed_hosts: Option<Vec<Host>>,
/// Reference to the Blockchain Client /// Reference to the Blockchain Client
client: Arc<BlockChainClient>, client: Arc<dyn BlockChainClient>,
} }
impl IpfsHandler { impl IpfsHandler {
pub fn client(&self) -> &BlockChainClient { pub fn client(&self) -> &dyn BlockChainClient {
&*self.client &*self.client
} }
pub fn new(cors: DomainsValidation<AccessControlAllowOrigin>, hosts: DomainsValidation<Host>, client: Arc<BlockChainClient>) -> Self { pub fn new(cors: DomainsValidation<AccessControlAllowOrigin>, hosts: DomainsValidation<Host>, client: Arc<dyn BlockChainClient>) -> Self {
IpfsHandler { IpfsHandler {
cors_domains: cors.into(), cors_domains: cors.into(),
allowed_hosts: hosts.into(), allowed_hosts: hosts.into(),
client: client, client,
} }
} }
pub fn on_request(&self, req: hyper::Request<Body>) -> (Option<HeaderValue>, Out) { pub fn on_request(&self, req: hyper::Request<Body>) -> (Option<HeaderValue>, Out) {
@@ -154,7 +154,7 @@ pub fn start_server(
interface: String, interface: String,
cors: DomainsValidation<AccessControlAllowOrigin>, cors: DomainsValidation<AccessControlAllowOrigin>,
hosts: DomainsValidation<Host>, hosts: DomainsValidation<Host>,
client: Arc<BlockChainClient> client: Arc<dyn BlockChainClient>
) -> Result<Listening, ServerError> { ) -> Result<Listening, ServerError> {
let ip: IpAddr = interface.parse().map_err(|_| ServerError::InvalidInterface)?; let ip: IpAddr = interface.parse().map_err(|_| ServerError::InvalidInterface)?;
@@ -182,12 +182,12 @@ pub fn start_server(
}; };
let server = server_bldr let server = server_bldr
.serve(new_service) .serve(new_service)
.map_err(|_| ()) .map_err(|_| ())
.select(shutdown_signal.map_err(|_| ())) .select(shutdown_signal.map_err(|_| ()))
.then(|_| Ok(())); .then(|_| Ok(()));
hyper::rt::run(server); hyper::rt::run(server);
send(Ok(())); send(Ok(()));
}); });

View File

@@ -3,10 +3,16 @@ description = "Parity Ethereum JSON Deserialization"
name = "ethjson" name = "ethjson"
version = "0.1.0" version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies] [dependencies]
ethereum-types = "0.6.0" ethereum-types = "0.6.0"
rustc-hex = "1.0" rustc-hex = "1.0"
serde = "1.0" serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
serde_derive = "1.0"
[dev-dependencies]
macros = { path = "../util/macros" }
[features]
test-helpers = []

View File

@@ -1,34 +0,0 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// 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
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
//! Blockchain test state deserializer.
use std::collections::BTreeMap;
use hash::Address;
use blockchain::account::Account;
/// Blockchain test state deserializer.
#[derive(Debug, PartialEq, Deserialize, Clone)]
pub struct State(BTreeMap<Address, Account>);
impl IntoIterator for State {
type Item = <BTreeMap<Address, Account> as IntoIterator>::Item;
type IntoIter = <BTreeMap<Address, Account> as IntoIterator>::IntoIter;
fn into_iter(self) -> Self::IntoIter {
self.0.into_iter()
}
}

View File

@@ -1,43 +0,0 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// 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
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
//! Blockchain test deserializer.
use std::collections::BTreeMap;
use std::io::Read;
use serde_json;
use serde_json::Error;
use blockchain::blockchain::BlockChain;
/// Blockchain test deserializer.
#[derive(Debug, PartialEq, Deserialize)]
pub struct Test(BTreeMap<String, BlockChain>);
impl IntoIterator for Test {
type Item = <BTreeMap<String, BlockChain> as IntoIterator>::Item;
type IntoIter = <BTreeMap<String, BlockChain> as IntoIterator>::IntoIter;
fn into_iter(self) -> Self::IntoIter {
self.0.into_iter()
}
}
impl Test {
/// Loads test from json.
pub fn load<R>(reader: R) -> Result<Self, Error> where R: Read {
serde_json::from_reader(reader)
}
}

View File

@@ -1,34 +0,0 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// 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
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
//! Blockchain test transaction deserialization.
use uint::Uint;
use bytes::Bytes;
/// Blockchain test transaction deserialization.
#[derive(Debug, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Transaction {
data: Bytes,
gas_limit: Uint,
gas_price: Uint,
nonce: Uint,
r: Uint,
s: Uint,
v: Uint,
value: Uint
}

View File

@@ -57,10 +57,10 @@ impl FromStr for Bytes {
2 if value.starts_with("0x") => vec![], 2 if value.starts_with("0x") => vec![],
_ if value.starts_with("0x") && value.len() % 2 == 1 => { _ if value.starts_with("0x") && value.len() % 2 == 1 => {
let v = "0".to_owned() + &value[2..]; let v = "0".to_owned() + &value[2..];
FromHex::from_hex(v.as_str()).unwrap_or(vec![]) FromHex::from_hex(v.as_str()).unwrap_or_default()
}, },
_ if value.starts_with("0x") => FromHex::from_hex(&value[2..]).unwrap_or(vec![]), _ if value.starts_with("0x") => FromHex::from_hex(&value[2..]).unwrap_or_default(),
_ => FromHex::from_hex(value).unwrap_or(vec![]), _ => FromHex::from_hex(value).unwrap_or_default(),
}; };
Ok(Bytes(v)) Ok(Bytes(v))
@@ -94,8 +94,7 @@ impl<'a> Visitor<'a> for BytesVisitor {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use serde_json; use super::Bytes;
use bytes::Bytes;
#[test] #[test]
fn bytes_deserialization() { fn bytes_deserialization() {
@@ -112,8 +111,7 @@ mod test {
#[test] #[test]
fn bytes_into() { fn bytes_into() {
let bytes = Bytes(vec![0xff, 0x11]); let v: Vec<u8> = Bytes(vec![0xff, 0x11]).into();
let v: Vec<u8> = bytes.into();
assert_eq!(vec![0xff, 0x11], v); assert_eq!(vec![0xff, 0x11], v);
} }
} }

Some files were not shown because too many files have changed in this diff Show More