diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 579d0463725..079b8ed8f8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,10 @@ variables: CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" 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") only: &releaseable_branches @@ -20,7 +24,6 @@ variables: - tags - schedules - .collect_artifacts: &collect_artifacts artifacts: name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" @@ -29,34 +32,66 @@ variables: paths: - artifacts/ -test-linux: - stage: test - variables: - RUN_TESTS: all - script: - - scripts/gitlab/test-all.sh +.docker-cache-status: &docker-cache-status + dependencies: [] + before_script: + - sccache -s + after_script: - sccache -s tags: - linux-docker -test-audit: + +cargo-check 0 3: + stage: test + <<: *docker-cache-status + script: + - time cargo check --target $CARGO_TARGET --locked --no-default-features + +cargo-check 1 3: + stage: test + <<: *docker-cache-status + script: + - time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features + +cargo-check 2 3: + stage: test + <<: *docker-cache-status + script: + - time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio" + +cargo-audit: stage: test script: - - set -e - - set -u - cargo audit tags: - linux-docker +validate-chainspecs: + stage: test + <<: *docker-cache-status + script: + - ./scripts/gitlab/validate-chainspecs.sh + +test-cpp: + stage: build + <<: *docker-cache-status + script: + - ./scripts/gitlab/test-cpp.sh + +test-linux: + stage: build + <<: *docker-cache-status + script: + - ./scripts/gitlab/test-linux.sh + build-linux: &build-linux stage: build only: *releaseable_branches + <<: *docker-cache-status script: - - scripts/gitlab/build-unix.sh - - sccache -s + - scripts/gitlab/build-linux.sh <<: *collect_artifacts - tags: - - linux-docker build-linux-i386: <<: *build-linux @@ -84,7 +119,7 @@ build-darwin: CC: gcc CXX: g++ script: - - scripts/gitlab/build-unix.sh + - scripts/gitlab/build-linux.sh tags: - rust-osx <<: *collect_artifacts @@ -164,13 +199,25 @@ publish-awss3-release: image: parity/awscli:latest stage: publish only: *releaseable_branches + <<: *no_git cache: {} dependencies: - build-linux - build-darwin - build-windows script: - - scripts/gitlab/publish-aws.sh + - echo "__________Push binaries to AWS S3____________" + - case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in + (beta|stable|nightly) + export BUCKET=releases.parity.io/ethereum; + ;; + (*) + export BUCKET=builds-parity; + ;; + esac + - aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/ + - echo "__________Read from S3____________" + - aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} --recursive --human-readable --summarize tags: - linux-docker @@ -187,14 +234,12 @@ publish-docs: - linux-docker build-android: - stage: optional + stage: build image: parity/rust-android:gitlab-ci variables: CARGO_TARGET: armv7-linux-androideabi - dependencies: [] script: - - scripts/gitlab/build-unix.sh + - scripts/gitlab/build-linux.sh tags: - linux-docker - allow_failure: true <<: *collect_artifacts diff --git a/CHANGELOG.md b/CHANGELOG.md index 62119ce7ab1..1ef1c68399d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,162 +1,118 @@ -## Parity-Ethereum [v2.3.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.3.0) (2019-01-16) +## Parity-Ethereum [v2.4.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.0) (2019-02-25) -Parity-Ethereum 2.3.0-beta is a consensus-relevant security release that reverts Constantinople on the Ethereum network. Upgrading is mandatory for Ethereum, and strongly recommended for other networks. +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. -- **Consensus** - Ethereum Network: Pull Constantinople protocol upgrade on Ethereum (#10189) - - Read more: [Security Alert: Ethereum Constantinople Postponement](https://blog.ethereum.org/2019/01/15/security-alert-ethereum-constantinople-postponement/) -- **Networking** - All networks: Ping nodes from discovery (#10167) -- **Wasm** - Kovan Network: Update pwasm-utils to 0.6.1 (#10134) - -Other notable changes: - -- Existing blocks in the database are now kept when restoring a Snapshot. (#8643) -- Block and transaction propagation is improved significantly. (#9954) -- The ERC-191 Signed Data Standard is now supported by `personal_sign191`. (#9701) -- Add support for ERC-191/712 `eth_signTypedData` as a standard for machine-verifiable and human-readable typed data signing with Ethereum keys. (#9631) -- Add support for ERC-1186 `eth_getProof` (#9001) -- Add experimental RPCs flag to enable ERC-191, ERC-712, and ERC-1186 APIs via `--jsonrpc-experimental` (#9928) -- Make `CALLCODE` to trace value to be the code address. (#9881) - -Configuration changes: - -- The EIP-98 transition is now disabled by default. If you previously had no `eip98transition` specified in your chain specification, you would enable this now manually on block `0x0`. (#9955) -- Also, unknown fields in chain specs are now rejected. (#9972) -- The Tendermint engine was removed from Parity Ethereum and is no longer available and maintained. (#9980) -- Ropsten testnet data and keys moved from `test/` to `ropsten/` subdir. To reuse your old keys and data either copy or symlink them to the new location. (#10123) -- Strict empty steps validation (#10041) - - If you have a chain with`empty_steps` already running, some blocks most likely contain non-strict entries (unordered or duplicated empty steps). In this release `strict_empty_steps_transition` is enabled by default at block `0x0` for any chain with `empty_steps`. - - If your network uses `empty_steps` you **must** (A) plan a hard fork and change `strict_empty_steps_transition` to the desired fork block and (B) update the clients of the whole network to 2.2.7-stable / 2.3.0-beta. If for some reason you don't want to do this please set`strict_empty_steps_transition` to `0xfffffffff` to disable it. - -_Note:_ This release marks Parity 2.3 as _beta_. All versions of Parity 2.2 are now considered _stable_. +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: - -- Backports for 2.3.0 beta ([#10164](https://github.com/paritytech/parity-ethereum/pull/10164)) -- Snap: fix path in script ([#10157](https://github.com/paritytech/parity-ethereum/pull/10157)) -- Make sure parent block is not in importing queue when importing ancient blocks ([#10138](https://github.com/paritytech/parity-ethereum/pull/10138)) -- Ci: re-enable snap publishing ([#10142](https://github.com/paritytech/parity-ethereum/pull/10142)) -- Hf in POA Core (2019-01-18) - Constantinople ([#10155](https://github.com/paritytech/parity-ethereum/pull/10155)) -- Update EWF's tobalaba chainspec ([#10152](https://github.com/paritytech/parity-ethereum/pull/10152)) -- Replace ethcore-logger with env-logger. ([#10102](https://github.com/paritytech/parity-ethereum/pull/10102)) -- Finality: dont require chain head to be in the chain ([#10054](https://github.com/paritytech/parity-ethereum/pull/10054)) -- Remove caching for node connections ([#10143](https://github.com/paritytech/parity-ethereum/pull/10143)) -- Blooms file iterator empty on out of range position. ([#10145](https://github.com/paritytech/parity-ethereum/pull/10145)) -- Autogen docs for the "Configuring Parity Ethereum" wiki page. ([#10067](https://github.com/paritytech/parity-ethereum/pull/10067)) -- Misc: bump license header to 2019 ([#10135](https://github.com/paritytech/parity-ethereum/pull/10135)) -- Hide most of the logs from cpp example. ([#10139](https://github.com/paritytech/parity-ethereum/pull/10139)) -- Don't try to send oversized packets ([#10042](https://github.com/paritytech/parity-ethereum/pull/10042)) -- Private tx enabled flag added into STATUS packet ([#9999](https://github.com/paritytech/parity-ethereum/pull/9999)) -- Update pwasm-utils to 0.6.1 ([#10134](https://github.com/paritytech/parity-ethereum/pull/10134)) -- Extract blockchain from ethcore ([#10114](https://github.com/paritytech/parity-ethereum/pull/10114)) -- Ethcore: update hardcoded headers ([#10123](https://github.com/paritytech/parity-ethereum/pull/10123)) -- Identity fix ([#10128](https://github.com/paritytech/parity-ethereum/pull/10128)) -- Use LenCachingMutex to optimize verification. ([#10117](https://github.com/paritytech/parity-ethereum/pull/10117)) -- Pyethereum keystore support ([#9710](https://github.com/paritytech/parity-ethereum/pull/9710)) -- Bump rocksdb-sys to 0.5.5 ([#10124](https://github.com/paritytech/parity-ethereum/pull/10124)) -- Parity-clib: `async C bindings to RPC requests` + `subscribe/unsubscribe to websocket events` ([#9920](https://github.com/paritytech/parity-ethereum/pull/9920)) -- Refactor (hardware wallet) : reduce the number of threads ([#9644](https://github.com/paritytech/parity-ethereum/pull/9644)) -- Hf in POA Sokol (2019-01-04) ([#10077](https://github.com/paritytech/parity-ethereum/pull/10077)) -- Fix broken links ([#10119](https://github.com/paritytech/parity-ethereum/pull/10119)) -- Follow-up to [#10105](https://github.com/paritytech/parity-ethereum/issues/10105) ([#10107](https://github.com/paritytech/parity-ethereum/pull/10107)) -- Move EIP-712 crate back to parity-ethereum ([#10106](https://github.com/paritytech/parity-ethereum/pull/10106)) -- Move a bunch of stuff around ([#10101](https://github.com/paritytech/parity-ethereum/pull/10101)) -- Revert "Add --frozen when running cargo ([#10081](https://github.com/paritytech/parity-ethereum/pull/10081))" ([#10105](https://github.com/paritytech/parity-ethereum/pull/10105)) -- Fix left over small grumbles on whitespaces ([#10084](https://github.com/paritytech/parity-ethereum/pull/10084)) -- Add --frozen when running cargo ([#10081](https://github.com/paritytech/parity-ethereum/pull/10081)) -- Fix pubsub new_blocks notifications to include all blocks ([#9987](https://github.com/paritytech/parity-ethereum/pull/9987)) -- Update some dependencies for compilation with pc-windows-gnu ([#10082](https://github.com/paritytech/parity-ethereum/pull/10082)) -- Fill transaction hash on ethGetLog of light client. ([#9938](https://github.com/paritytech/parity-ethereum/pull/9938)) -- Update changelog update for 2.2.5-beta and 2.1.10-stable ([#10064](https://github.com/paritytech/parity-ethereum/pull/10064)) -- Implement len caching for parking_lot RwLock ([#10032](https://github.com/paritytech/parity-ethereum/pull/10032)) -- Update parking_lot to 0.7 ([#10050](https://github.com/paritytech/parity-ethereum/pull/10050)) -- Bump crossbeam. ([#10048](https://github.com/paritytech/parity-ethereum/pull/10048)) -- Ethcore: enable constantinople on ethereum ([#10031](https://github.com/paritytech/parity-ethereum/pull/10031)) -- Strict empty steps validation ([#10041](https://github.com/paritytech/parity-ethereum/pull/10041)) -- Center the Subtitle, use some CAPS ([#10034](https://github.com/paritytech/parity-ethereum/pull/10034)) -- Change test miner max memory to malloc reports. ([#10024](https://github.com/paritytech/parity-ethereum/pull/10024)) -- Sort the storage for private state ([#10018](https://github.com/paritytech/parity-ethereum/pull/10018)) -- Fix: test corpus_inaccessible panic ([#10019](https://github.com/paritytech/parity-ethereum/pull/10019)) -- Ci: move future releases to ethereum subdir on s3 ([#10017](https://github.com/paritytech/parity-ethereum/pull/10017)) -- Light(on_demand): decrease default time window to 10 secs ([#10016](https://github.com/paritytech/parity-ethereum/pull/10016)) -- Light client : failsafe crate (circuit breaker) ([#9790](https://github.com/paritytech/parity-ethereum/pull/9790)) -- Lencachingmutex ([#9988](https://github.com/paritytech/parity-ethereum/pull/9988)) -- Version and notification for private contract wrapper added ([#9761](https://github.com/paritytech/parity-ethereum/pull/9761)) -- Handle failing case for update account cache in require ([#9989](https://github.com/paritytech/parity-ethereum/pull/9989)) -- Add tokio runtime to ethcore io worker ([#9979](https://github.com/paritytech/parity-ethereum/pull/9979)) -- Move daemonize before creating account provider ([#10003](https://github.com/paritytech/parity-ethereum/pull/10003)) -- Docs: update changelogs ([#9990](https://github.com/paritytech/parity-ethereum/pull/9990)) -- Fix daemonize ([#10000](https://github.com/paritytech/parity-ethereum/pull/10000)) -- Fix Bloom migration ([#9992](https://github.com/paritytech/parity-ethereum/pull/9992)) -- Remove tendermint engine support ([#9980](https://github.com/paritytech/parity-ethereum/pull/9980)) -- Calculate gas for deployment transaction ([#9840](https://github.com/paritytech/parity-ethereum/pull/9840)) -- Fix unstable peers and slowness in sync ([#9967](https://github.com/paritytech/parity-ethereum/pull/9967)) -- Adds parity_verifySignature RPC method ([#9507](https://github.com/paritytech/parity-ethereum/pull/9507)) -- Improve block and transaction propagation ([#9954](https://github.com/paritytech/parity-ethereum/pull/9954)) -- Deny unknown fields for chainspec ([#9972](https://github.com/paritytech/parity-ethereum/pull/9972)) -- Fix docker build ([#9971](https://github.com/paritytech/parity-ethereum/pull/9971)) -- Ci: rearrange pipeline by logic ([#9970](https://github.com/paritytech/parity-ethereum/pull/9970)) -- Add changelogs for 2.0.9, 2.1.4, 2.1.6, and 2.2.1 ([#9963](https://github.com/paritytech/parity-ethereum/pull/9963)) -- Add Error message when sync is still in progress. ([#9475](https://github.com/paritytech/parity-ethereum/pull/9475)) -- Make CALLCODE to trace value to be the code address ([#9881](https://github.com/paritytech/parity-ethereum/pull/9881)) -- Fix light client informant while syncing ([#9932](https://github.com/paritytech/parity-ethereum/pull/9932)) -- Add a optional json dump state to evm-bin ([#9706](https://github.com/paritytech/parity-ethereum/pull/9706)) -- Disable EIP-98 transition by default ([#9955](https://github.com/paritytech/parity-ethereum/pull/9955)) -- Remove secret_store runtimes. ([#9888](https://github.com/paritytech/parity-ethereum/pull/9888)) -- Fix a deadlock ([#9952](https://github.com/paritytech/parity-ethereum/pull/9952)) -- Chore(eip712): remove unused `failure-derive` ([#9958](https://github.com/paritytech/parity-ethereum/pull/9958)) -- Do not use the home directory as the working dir in docker ([#9834](https://github.com/paritytech/parity-ethereum/pull/9834)) -- Prevent silent errors in daemon mode, closes [#9367](https://github.com/paritytech/parity-ethereum/issues/9367) ([#9946](https://github.com/paritytech/parity-ethereum/pull/9946)) -- Fix empty steps ([#9939](https://github.com/paritytech/parity-ethereum/pull/9939)) -- Adjust requests costs for light client ([#9925](https://github.com/paritytech/parity-ethereum/pull/9925)) -- Eip-1186: add `eth_getProof` RPC-Method ([#9001](https://github.com/paritytech/parity-ethereum/pull/9001)) -- Missing blocks in filter_changes RPC ([#9947](https://github.com/paritytech/parity-ethereum/pull/9947)) -- Allow rust-nightly builds fail in nightly builds ([#9944](https://github.com/paritytech/parity-ethereum/pull/9944)) -- Update eth-secp256k1 to include fix for BSDs ([#9935](https://github.com/paritytech/parity-ethereum/pull/9935)) -- Unbreak build on rust -stable ([#9934](https://github.com/paritytech/parity-ethereum/pull/9934)) -- Keep existing blocks when restoring a Snapshot ([#8643](https://github.com/paritytech/parity-ethereum/pull/8643)) -- Add experimental RPCs flag ([#9928](https://github.com/paritytech/parity-ethereum/pull/9928)) -- Clarify poll lifetime ([#9922](https://github.com/paritytech/parity-ethereum/pull/9922)) -- Docs(require rust 1.30) ([#9923](https://github.com/paritytech/parity-ethereum/pull/9923)) -- Use block header for building finality ([#9914](https://github.com/paritytech/parity-ethereum/pull/9914)) -- Simplify cargo audit ([#9918](https://github.com/paritytech/parity-ethereum/pull/9918)) -- Light-fetch: Differentiate between out-of-gas/manual throw and use required gas from response on failure ([#9824](https://github.com/paritytech/parity-ethereum/pull/9824)) -- Eip 191 ([#9701](https://github.com/paritytech/parity-ethereum/pull/9701)) -- Fix(logger): `reqwest` no longer a dependency ([#9908](https://github.com/paritytech/parity-ethereum/pull/9908)) -- Remove rust-toolchain file ([#9906](https://github.com/paritytech/parity-ethereum/pull/9906)) -- Foundation: 6692865, ropsten: 4417537, kovan: 9363457 ([#9907](https://github.com/paritytech/parity-ethereum/pull/9907)) -- Ethcore: use Machine::verify_transaction on parent block ([#9900](https://github.com/paritytech/parity-ethereum/pull/9900)) -- Chore(rpc-tests): remove unused rand ([#9896](https://github.com/paritytech/parity-ethereum/pull/9896)) -- Fix: Intermittent failing CI due to addr in use ([#9885](https://github.com/paritytech/parity-ethereum/pull/9885)) -- Chore(bump docopt): 0.8 -> 1.0 ([#9889](https://github.com/paritytech/parity-ethereum/pull/9889)) -- Use expect ([#9883](https://github.com/paritytech/parity-ethereum/pull/9883)) -- Use Weak reference in PubSubClient ([#9886](https://github.com/paritytech/parity-ethereum/pull/9886)) -- Ci: nuke the gitlab caches ([#9855](https://github.com/paritytech/parity-ethereum/pull/9855)) -- Remove unused code ([#9884](https://github.com/paritytech/parity-ethereum/pull/9884)) -- Fix json tracer overflow ([#9873](https://github.com/paritytech/parity-ethereum/pull/9873)) -- Allow to seal work on latest block ([#9876](https://github.com/paritytech/parity-ethereum/pull/9876)) -- Fix docker script ([#9854](https://github.com/paritytech/parity-ethereum/pull/9854)) -- Health endpoint ([#9847](https://github.com/paritytech/parity-ethereum/pull/9847)) -- Gitlab-ci: make android release build succeed ([#9743](https://github.com/paritytech/parity-ethereum/pull/9743)) -- Clean up existing benchmarks ([#9839](https://github.com/paritytech/parity-ethereum/pull/9839)) -- Update Callisto block reward code to support HF1 ([#9811](https://github.com/paritytech/parity-ethereum/pull/9811)) -- Option to disable keep alive for JSON-RPC http transport ([#9848](https://github.com/paritytech/parity-ethereum/pull/9848)) -- Classic.json Bootnode Update ([#9828](https://github.com/paritytech/parity-ethereum/pull/9828)) -- Support MIX. ([#9767](https://github.com/paritytech/parity-ethereum/pull/9767)) -- Ci: remove failing tests for android, windows, and macos ([#9788](https://github.com/paritytech/parity-ethereum/pull/9788)) -- Implement NoProof for json tests and update tests reference (replaces [#9744](https://github.com/paritytech/parity-ethereum/issues/9744)) ([#9814](https://github.com/paritytech/parity-ethereum/pull/9814)) -- Chore(bump regex) ([#9842](https://github.com/paritytech/parity-ethereum/pull/9842)) -- Ignore global cache for patched accounts ([#9752](https://github.com/paritytech/parity-ethereum/pull/9752)) -- Move state root verification before gas used ([#9841](https://github.com/paritytech/parity-ethereum/pull/9841)) -- Fix(docker-aarch64) : cross-compile config ([#9798](https://github.com/paritytech/parity-ethereum/pull/9798)) -- Version: bump nightly to 2.3.0 ([#9819](https://github.com/paritytech/parity-ethereum/pull/9819)) -- Tests modification for windows CI ([#9671](https://github.com/paritytech/parity-ethereum/pull/9671)) -- Eip-712 implementation ([#9631](https://github.com/paritytech/parity-ethereum/pull/9631)) -- Fix typo ([#9826](https://github.com/paritytech/parity-ethereum/pull/9826)) -- Clean up serde rename and use rename_all = camelCase when possible ([#9823](https://github.com/paritytech/parity-ethereum/pull/9823)) +- More Backports for Beta 2.4.0 ([#10431](https://github.com/paritytech/parity-ethereum/pull/10431)) + - Revert some changes, could be buggy ([#10399](https://github.com/paritytech/parity-ethereum/pull/10399)) + - Ci: clean up gitlab-ci.yml leftovers from previous merge ([#10429](https://github.com/paritytech/parity-ethereum/pull/10429)) + - 10000 > 5000 ([#10422](https://github.com/paritytech/parity-ethereum/pull/10422)) + - Fix underflow in pip, closes [#10419](https://github.com/paritytech/parity-ethereum/pull/10419) ([#10423](https://github.com/paritytech/parity-ethereum/pull/10423)) + - 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)) + - Update hardcoded headers for Foundation, Ropsten, Kovan and Classic ([#10417](https://github.com/paritytech/parity-ethereum/pull/10417)) +- Backports for Beta 2.4.0 ([#10416](https://github.com/paritytech/parity-ethereum/pull/10416)) + - No-git for publish jobs, empty artifacts dir ([#10393](https://github.com/paritytech/parity-ethereum/pull/10393)) + - Snap: reenable i386, arm64, armhf architecture publishing ([#10386](https://github.com/paritytech/parity-ethereum/pull/10386)) + - Tx pool: always accept local transactions ([#10375](https://github.com/paritytech/parity-ethereum/pull/10375)) + - Fix to_pod storage trie value decoding ([#10368](https://github.com/paritytech/parity-ethereum/pull/10368)) +- Version: mark 2.4.0 beta +- Update to latest mem-db, hash-db and trie-db. ([#10314](https://github.com/paritytech/parity-ethereum/pull/10314)) +- Tx pool: always accept local transactions ([#10375](https://github.com/paritytech/parity-ethereum/pull/10375)) +- Fix(trace_main! macro): don't re-export ([#10384](https://github.com/paritytech/parity-ethereum/pull/10384)) +- Exchanged old(azure) bootnodes with new(ovh) ones ([#10309](https://github.com/paritytech/parity-ethereum/pull/10309)) +- Ethash: implement Progpow ([#9762](https://github.com/paritytech/parity-ethereum/pull/9762)) +- Snap: add the removable-media plug ([#10377](https://github.com/paritytech/parity-ethereum/pull/10377)) +- Add message to IO errors ([#10324](https://github.com/paritytech/parity-ethereum/pull/10324)) +- Chore(bump parity-daemonize): require rust >= 1.31 ([#10359](https://github.com/paritytech/parity-ethereum/pull/10359)) +- Secretstore: use in-memory transport in cluster tests ([#9850](https://github.com/paritytech/parity-ethereum/pull/9850)) +- Add fields to `memzero`'s Cargo.toml ([#10362](https://github.com/paritytech/parity-ethereum/pull/10362)) +- Snap: release untagged versions from branches to the candidate snap channel ([#10357](https://github.com/paritytech/parity-ethereum/pull/10357)) +- Fix(compilation warns): `no-default-features` ([#10346](https://github.com/paritytech/parity-ethereum/pull/10346)) +- No volumes are needed, just run -v volume:/path/in/the/container ([#10345](https://github.com/paritytech/parity-ethereum/pull/10345)) +- Fixed misstype ([#10351](https://github.com/paritytech/parity-ethereum/pull/10351)) +- Snap: prefix version and populate candidate channel ([#10343](https://github.com/paritytech/parity-ethereum/pull/10343)) +- Bundle protocol and packet_id together in chain sync ([#10315](https://github.com/paritytech/parity-ethereum/pull/10315)) +- Role back docker build image and docker deploy image to ubuntu:xenial… ([#10338](https://github.com/paritytech/parity-ethereum/pull/10338)) +- Change docker image based on debian instead of ubuntu due to the chan… ([#10336](https://github.com/paritytech/parity-ethereum/pull/10336)) +- Don't add discovery initiators to the node table ([#10305](https://github.com/paritytech/parity-ethereum/pull/10305)) +- Fix(docker): fix not receives SIGINT ([#10059](https://github.com/paritytech/parity-ethereum/pull/10059)) +- Snap: official image / test ([#10168](https://github.com/paritytech/parity-ethereum/pull/10168)) +- Fix(add helper for timestamp overflows) ([#10330](https://github.com/paritytech/parity-ethereum/pull/10330)) +- Additional error for invalid gas ([#10327](https://github.com/paritytech/parity-ethereum/pull/10327)) +- Revive parity_setMinGasPrice RPC call ([#10294](https://github.com/paritytech/parity-ethereum/pull/10294)) +- Add Statetest support for Constantinople Fix ([#10323](https://github.com/paritytech/parity-ethereum/pull/10323)) +- 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)) +- Fix(light-rpc): Make `light_sync` generic ([#10238](https://github.com/paritytech/parity-ethereum/pull/10238)) +- Fix publish job ([#10317](https://github.com/paritytech/parity-ethereum/pull/10317)) +- Secure WS-RPC: grant access to all apis ([#10246](https://github.com/paritytech/parity-ethereum/pull/10246)) +- Make specification of protocol in SyncRequester::send_request explicit ([#10295](https://github.com/paritytech/parity-ethereum/pull/10295)) +- Fix: parity-clib/examples/cpp/CMakeLists.txt ([#10313](https://github.com/paritytech/parity-ethereum/pull/10313)) +- Ci optimizations ([#10297](https://github.com/paritytech/parity-ethereum/pull/10297)) +- Increase number of requested block bodies in chain sync ([#10247](https://github.com/paritytech/parity-ethereum/pull/10247)) +- Deprecate account management ([#10213](https://github.com/paritytech/parity-ethereum/pull/10213)) +- Properly handle check_epoch_end_signal errors ([#10015](https://github.com/paritytech/parity-ethereum/pull/10015)) +- Fix(osx and windows builds): bump parity-daemonize ([#10291](https://github.com/paritytech/parity-ethereum/pull/10291)) +- Add missing step for Using `systemd` service file ([#10175](https://github.com/paritytech/parity-ethereum/pull/10175)) +- Call private contract methods from another private contract (read-onl… ([#10086](https://github.com/paritytech/parity-ethereum/pull/10086)) +- Update ring to 0.14 ([#10262](https://github.com/paritytech/parity-ethereum/pull/10262)) +- Fix(secret-store): deprecation warning ([#10301](https://github.com/paritytech/parity-ethereum/pull/10301)) +- Update to jsonrpc-derive 10.0.2, fixes aliases bug ([#10300](https://github.com/paritytech/parity-ethereum/pull/10300)) +- Convert to jsonrpc-derive, use jsonrpc-* from crates.io ([#10298](https://github.com/paritytech/parity-ethereum/pull/10298)) +- Fix Windows build ([#10284](https://github.com/paritytech/parity-ethereum/pull/10284)) +- Don't run the CPP example on CI ([#10285](https://github.com/paritytech/parity-ethereum/pull/10285)) +- Additional tests for uint deserialization. ([#10279](https://github.com/paritytech/parity-ethereum/pull/10279)) +- Prevent silent errors in daemon mode ([#10007](https://github.com/paritytech/parity-ethereum/pull/10007)) +- Fix join-set test to be deterministic. ([#10263](https://github.com/paritytech/parity-ethereum/pull/10263)) +- Update CHANGELOG-2.2.md ([#10254](https://github.com/paritytech/parity-ethereum/pull/10254)) +- Macos heapsize force jemalloc ([#10234](https://github.com/paritytech/parity-ethereum/pull/10234)) +- Allow specifying local accounts via CLI ([#9960](https://github.com/paritytech/parity-ethereum/pull/9960)) +- Take in account zero gas price certification when doing transact_cont… ([#10232](https://github.com/paritytech/parity-ethereum/pull/10232)) +- Update CHANGELOG.md ([#10249](https://github.com/paritytech/parity-ethereum/pull/10249)) +- Fix typo: CHANGELOG-2.1 -> CHANGELOG-2.2 ([#10233](https://github.com/paritytech/parity-ethereum/pull/10233)) +- Update copyright year to 2019. ([#10181](https://github.com/paritytech/parity-ethereum/pull/10181)) +- Fixed: types::transaction::SignedTransaction; ([#10229](https://github.com/paritytech/parity-ethereum/pull/10229)) +- Fix(ManageNetwork): replace Range with RangeInclusive ([#10209](https://github.com/paritytech/parity-ethereum/pull/10209)) +- Import rpc transactions sequentially ([#10051](https://github.com/paritytech/parity-ethereum/pull/10051)) +- Enable St-Peters-Fork ("Constantinople Fix") ([#10223](https://github.com/paritytech/parity-ethereum/pull/10223)) +- Add EIP-1283 disable transition ([#10214](https://github.com/paritytech/parity-ethereum/pull/10214)) +- Echo CORS request headers by default ([#10221](https://github.com/paritytech/parity-ethereum/pull/10221)) +- Happy New Year! ([#10211](https://github.com/paritytech/parity-ethereum/pull/10211)) +- Perform stripping during build ([#10208](https://github.com/paritytech/parity-ethereum/pull/10208)) +- Remove CallContract and RegistryInfo re-exports from `ethcore/client` ([#10205](https://github.com/paritytech/parity-ethereum/pull/10205)) +- Extract CallContract and RegistryInfo traits into their own crate ([#10178](https://github.com/paritytech/parity-ethereum/pull/10178)) +- 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)) +- Cancel Constantinople HF on POA Core ([#10198](https://github.com/paritytech/parity-ethereum/pull/10198)) +- Adds cli interface to allow reseting chain to a particular block ([#9782](https://github.com/paritytech/parity-ethereum/pull/9782)) +- Run all `igd` methods in its own thread ([#10195](https://github.com/paritytech/parity-ethereum/pull/10195)) +- Pull constantinople on ethereum network ([#10189](https://github.com/paritytech/parity-ethereum/pull/10189)) +- Update for Android cross-compilation. ([#10180](https://github.com/paritytech/parity-ethereum/pull/10180)) +- Version: bump fork blocks for kovan and foundation ([#10186](https://github.com/paritytech/parity-ethereum/pull/10186)) +- Handle the case for contract creation on an empty but exist account w… ([#10065](https://github.com/paritytech/parity-ethereum/pull/10065)) +- Align personal_unlockAccount behaviour when permanent unlock is disab… ([#10060](https://github.com/paritytech/parity-ethereum/pull/10060)) +- Drop `runtime` after others (especially `ws_server`) ([#10179](https://github.com/paritytech/parity-ethereum/pull/10179)) +- Version: bump nightly to 2.4 ([#10165](https://github.com/paritytech/parity-ethereum/pull/10165)) +- Skip locking in statedb for non-canon blocks ([#10141](https://github.com/paritytech/parity-ethereum/pull/10141)) +- Remove reference to ui-interface command-line option ([#10170](https://github.com/paritytech/parity-ethereum/pull/10170)) +- 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)) +- Fix _cannot recursively call into `Core`_ issue ([#10144](https://github.com/paritytech/parity-ethereum/pull/10144)) +- Fix(whisper): correct PoW calculation ([#10166](https://github.com/paritytech/parity-ethereum/pull/10166)) +- Bump JSON-RPC ([#10151](https://github.com/paritytech/parity-ethereum/pull/10151)) +- Ping nodes from discovery ([#10167](https://github.com/paritytech/parity-ethereum/pull/10167)) +- Fix(android): remove dependency to libusb ([#10161](https://github.com/paritytech/parity-ethereum/pull/10161)) +- Refactor(trim_right_matches -> trim_end_matches) ([#10159](https://github.com/paritytech/parity-ethereum/pull/10159)) +- Merge Machine and WithRewards ([#10071](https://github.com/paritytech/parity-ethereum/pull/10071)) ## Previous releases -- [CHANGELOG-2.2](docs/CHANGELOG-2.2.md) (_stable_) +- [CHANGELOG-2.3](docs/CHANGELOG-2.3.md) (_stable_) +- [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.0](docs/CHANGELOG-2.0.md) (EOL: 2018-11-15) - [CHANGELOG-1.11](docs/CHANGELOG-1.11.md) (EOL: 2018-09-19) diff --git a/Cargo.lock b/Cargo.lock index 71061696dee..b6c0b3ef61f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -306,7 +306,6 @@ dependencies = [ "heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-machine 0.1.0", "rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rlp_derive 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -739,7 +738,6 @@ dependencies = [ "num_cpus 1.8.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.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-machine 0.1.0", "parity-runtime 0.1.0", "parity-snappy 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2600,13 +2598,6 @@ dependencies = [ "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parity-machine" -version = "0.1.0" -dependencies = [ - "ethereum-types 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "parity-path" version = "0.1.1" diff --git a/docs/CHANGELOG-2.2.md b/docs/CHANGELOG-2.2.md index b9fce500075..69d6a0dcb7b 100644 --- a/docs/CHANGELOG-2.2.md +++ b/docs/CHANGELOG-2.2.md @@ -1,3 +1,78 @@ +Note: Parity Ethereum 2.2 reached End-of-Life on 2019-02-25 (EOL). + +## Parity-Ethereum [v2.2.11](https://github.com/paritytech/parity-ethereum/releases/tag/v2.2.11) (2019-02-21) + +Parity-Ethereum 2.2.11-stable is a maintenance release that fixes snap and docker installations. + +The full list of included changes: + +- Stable: snap: release untagged versions from branches to the candidate ([#10357](https://github.com/paritytech/parity-ethereum/pull/10357)) ([#10372](https://github.com/paritytech/parity-ethereum/pull/10372)) + - Snap: release untagged versions from branches to the candidate snap channel ([#10357](https://github.com/paritytech/parity-ethereum/pull/10357)) + - Snap: add the removable-media plug ([#10377](https://github.com/paritytech/parity-ethereum/pull/10377)) + - Exchanged old(azure) bootnodes with new(ovh) ones ([#10309](https://github.com/paritytech/parity-ethereum/pull/10309)) +- Stable Backports ([#10353](https://github.com/paritytech/parity-ethereum/pull/10353)) + - Version: bump stable to 2.2.11 + - Snap: prefix version and populate candidate channel ([#10343](https://github.com/paritytech/parity-ethereum/pull/10343)) + - Snap: populate candidate releases with beta snaps to avoid stale channel + - Snap: prefix version with v* + - No volumes are needed, just run -v volume:/path/in/the/container ([#10345](https://github.com/paritytech/parity-ethereum/pull/10345)) + +## Parity-Ethereum [v2.2.10](https://github.com/paritytech/parity-ethereum/releases/tag/v2.2.10) (2019-02-13) + +Parity-Ethereum 2.2.10-stable is a security-relevant release. A bug in the JSONRPC-deserialization module can cause crashes of all versions of Parity Ethereum nodes if an attacker is able to submit a specially-crafted RPC to certain publicly available endpoints. + +- https://www.parity.io/new-parity-ethereum-update-fixes-several-rpc-vulnerabilities/ + +The full list of included changes: + +- Additional error for invalid gas ([#10327](https://github.com/paritytech/parity-ethereum/pull/10327)) ([#10329](https://github.com/paritytech/parity-ethereum/pull/10329)) +- Backports for Stable 2.2.10 ([#10332](https://github.com/paritytech/parity-ethereum/pull/10332)) + - fix(docker-aarch64) : cross-compile config ([#9798](https://github.com/paritytech/parity-ethereum/pull/9798)) + - import rpc transactions sequentially ([#10051](https://github.com/paritytech/parity-ethereum/pull/10051)) + - fix(docker): fix not receives SIGINT ([#10059](https://github.com/paritytech/parity-ethereum/pull/10059)) + - snap: official image / test ([#10168](https://github.com/paritytech/parity-ethereum/pull/10168)) + - perform stripping during build ([#10208](https://github.com/paritytech/parity-ethereum/pull/10208)) + - Additional tests for uint/hash/bytes deserialization. ([#10279](https://github.com/paritytech/parity-ethereum/pull/10279)) + - Don't run the CPP example on CI ([#10285](https://github.com/paritytech/parity-ethereum/pull/10285)) + - CI optimizations ([#10297](https://github.com/paritytech/parity-ethereum/pull/10297)) + - fix publish job ([#10317](https://github.com/paritytech/parity-ethereum/pull/10317)) + - Add Statetest support for Constantinople Fix ([#10323](https://github.com/paritytech/parity-ethereum/pull/10323)) + - Add helper for Timestamp overflows ([#10330](https://github.com/paritytech/parity-ethereum/pull/10330)) + - Don't add discovery initiators to the node table ([#10305](https://github.com/paritytech/parity-ethereum/pull/10305)) + - change docker image based on debian instead of ubuntu due to the chan ([#10336](https://github.com/paritytech/parity-ethereum/pull/10336)) + - role back docker build image and docker deploy image to ubuntu:xenial based ([#10338](https://github.com/paritytech/parity-ethereum/pull/10338)) + +## Parity-Ethereum [v2.2.9](https://github.com/paritytech/parity-ethereum/releases/tag/v2.2.9) (2019-02-03) + +Parity-Ethereum 2.2.9-stable is a security-relevant release. A bug in the JSONRPC-deserialization module can cause crashes of all versions of Parity Ethereum nodes if an attacker is able to submit a specially-crafted RPC to certain publicly available endpoints. + +- https://www.parity.io/security-alert-parity-ethereum-03-02/ + +The full list of included changes: + +- Additional tests for uint deserialization. ([#10279](https://github.com/paritytech/parity-ethereum/pull/10279)) ([#10281](https://github.com/paritytech/parity-ethereum/pull/10281)) +- Version: bump stable to 2.2.9 ([#10282](https://github.com/paritytech/parity-ethereum/pull/10282)) + +## Parity-Ethereum [v2.2.8](https://github.com/paritytech/parity-ethereum/releases/tag/v2.2.8) (2019-02-01) + +Parity-Ethereum 2.2.8-stable is a consensus-relevant release that enables _St. Petersfork_ on: + +- Ethereum Block `7280000` (along with Constantinople) +- Kovan Block `10255201` +- Ropsten Block `4939394` +- POA Sokol Block `7026400` + +In addition to this, Constantinople is cancelled for the POA Core network. Upgrading is mandatory for clients on any of these chains. + +The full list of included changes: + +- Backports for stable 2.2.8 ([#10224](https://github.com/paritytech/parity-ethereum/pull/10224)) + - Update for Android cross-compilation. ([#10180](https://github.com/paritytech/parity-ethereum/pull/10180)) + - Cancel Constantinople HF on POA Core ([#10198](https://github.com/paritytech/parity-ethereum/pull/10198)) + - Add EIP-1283 disable transition ([#10214](https://github.com/paritytech/parity-ethereum/pull/10214)) + - Enable St-Peters-Fork ("Constantinople Fix") ([#10223](https://github.com/paritytech/parity-ethereum/pull/10223)) +- Stable: Macos heapsize force jemalloc ([#10234](https://github.com/paritytech/parity-ethereum/pull/10234)) ([#10258](https://github.com/paritytech/parity-ethereum/pull/10258)) + ## Parity-Ethereum [v2.2.7](https://github.com/paritytech/parity-ethereum/releases/tag/v2.2.7) (2019-01-15) Parity-Ethereum 2.2.7-stable is a consensus-relevant security release that reverts Constantinople on the Ethereum network. Upgrading is mandatory for Ethereum, and strongly recommended for other networks. diff --git a/docs/CHANGELOG-2.3.md b/docs/CHANGELOG-2.3.md new file mode 100644 index 00000000000..f7e75d4427a --- /dev/null +++ b/docs/CHANGELOG-2.3.md @@ -0,0 +1,255 @@ +## Parity-Ethereum [v2.3.5](https://github.com/paritytech/parity-ethereum/releases/tag/v2.3.5) (2019-02-25) + +Parity-Ethereum 2.3.5-stable is a bugfix release that improves performance and stability. + +Note, all 2.2 releases and older are now unsupported and upgrading is recommended. + +The full list of included changes: + +- More Backports for Stable 2.3.5 ([#10430](https://github.com/paritytech/parity-ethereum/pull/10430)) + - Revert some changes, could be buggy ([#10399](https://github.com/paritytech/parity-ethereum/pull/10399)) + - Ci: clean up gitlab-ci.yml leftovers from previous merge ([#10429](https://github.com/paritytech/parity-ethereum/pull/10429)) + - 10000 > 5000 ([#10422](https://github.com/paritytech/parity-ethereum/pull/10422)) + - Fix underflow in pip, closes [#10419](https://github.com/paritytech/parity-ethereum/pull/10419) ([#10423](https://github.com/paritytech/parity-ethereum/pull/10423)) + - 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)) + - Update hardcoded headers for Foundation, Ropsten, Kovan and Classic ([#10417](https://github.com/paritytech/parity-ethereum/pull/10417)) +- Backports for Stable 2.3.5 ([#10414](https://github.com/paritytech/parity-ethereum/pull/10414)) + - No-git for publish jobs, empty artifacts dir ([#10393](https://github.com/paritytech/parity-ethereum/pull/10393)) + - Snap: reenable i386, arm64, armhf architecture publishing ([#10386](https://github.com/paritytech/parity-ethereum/pull/10386)) + - Tx pool: always accept local transactions ([#10375](https://github.com/paritytech/parity-ethereum/pull/10375)) + - Fix to_pod storage trie value decoding ([#10368)](https://github.com/paritytech/parity-ethereum/pull/10368)) +- Version: mark 2.3.5 as stable + +## Parity-Ethereum [v2.3.4](https://github.com/paritytech/parity-ethereum/releases/tag/v2.3.4) (2019-02-21) + +Parity-Ethereum 2.3.4-beta is a maintenance release that fixes snap and docker installations. + +The full list of included changes: +- Beta: snap: release untagged versions from branches to the candidate ([#10357](https://github.com/paritytech/parity-ethereum/pull/10357)) ([#10373](https://github.com/paritytech/parity-ethereum/pull/10373)) + - Snap: release untagged versions from branches to the candidate snap channel ([#10357](https://github.com/paritytech/parity-ethereum/pull/10357)) + - Snap: add the removable-media plug ([#10377](https://github.com/paritytech/parity-ethereum/pull/10377)) + - Exchanged old(azure) bootnodes with new(ovh) ones ([#10309](https://github.com/paritytech/parity-ethereum/pull/10309)) +- Beta Backports ([#10354](https://github.com/paritytech/parity-ethereum/pull/10354)) + - Version: bump beta to 2.3.4 + - Snap: prefix version and populate candidate channel ([#10343](https://github.com/paritytech/parity-ethereum/pull/10343)) + - Snap: populate candidate releases with beta snaps to avoid stale channel + - Snap: prefix version with v* + - No volumes are needed, just run -v volume:/path/in/the/container ([#10345](https://github.com/paritytech/parity-ethereum/pull/10345)) + +## Parity-Ethereum [v2.3.3](https://github.com/paritytech/parity-ethereum/releases/tag/v2.3.3) (2019-02-13) + +Parity-Ethereum 2.3.3-beta is a security-relevant release. A bug in the JSONRPC-deserialization module can cause crashes of all versions of Parity Ethereum nodes if an attacker is able to submit a specially-crafted RPC to certain publicly available endpoints. + +- https://www.parity.io/new-parity-ethereum-update-fixes-several-rpc-vulnerabilities/ + +The full list of included changes: + +- Additional error for invalid gas ([#10327](https://github.com/paritytech/parity-ethereum/pull/10327)) ([#10328](https://github.com/paritytech/parity-ethereum/pull/10328)) +- Backports for Beta 2.3.3 ([#10333](https://github.com/paritytech/parity-ethereum/pull/10333)) + - Properly handle check_epoch_end_signal errors ([#10015](https://github.com/paritytech/parity-ethereum/pull/10015)) + - import rpc transactions sequentially ([#10051](https://github.com/paritytech/parity-ethereum/pull/10051)) + - fix(docker): fix not receives SIGINT ([#10059](https://github.com/paritytech/parity-ethereum/pull/10059)) + - snap: official image / test ([#10168](https://github.com/paritytech/parity-ethereum/pull/10168)) + - Extract CallContract and RegistryInfo traits into their own crate ([#10178](https://github.com/paritytech/parity-ethereum/pull/10178)) + - perform stripping during build ([#10208](https://github.com/paritytech/parity-ethereum/pull/10208)) + - Remove CallContract and RegistryInfo re-exports from `ethcore/client` ([#10205](https://github.com/paritytech/parity-ethereum/pull/10205)) + - fixed: types::transaction::SignedTransaction; ([#10229](https://github.com/paritytech/parity-ethereum/pull/10229)) + - Additional tests for uint/hash/bytes deserialization. ([#10279](https://github.com/paritytech/parity-ethereum/pull/10279)) + - Fix Windows build ([#10284](https://github.com/paritytech/parity-ethereum/pull/10284)) + - Don't run the CPP example on CI ([#10285](https://github.com/paritytech/parity-ethereum/pull/10285)) + - CI optimizations ([#10297](https://github.com/paritytech/parity-ethereum/pull/10297)) + - fix publish job ([#10317](https://github.com/paritytech/parity-ethereum/pull/10317)) + - Add Statetest support for Constantinople Fix ([#10323](https://github.com/paritytech/parity-ethereum/pull/10323)) + - Add helper for Timestamp overflows ([#10330](https://github.com/paritytech/parity-ethereum/pull/10330)) + - Don't add discovery initiators to the node table ([#10305](https://github.com/paritytech/parity-ethereum/pull/10305)) + - change docker image based on debian instead of ubuntu due to the chan ([#10336](https://github.com/paritytech/parity-ethereum/pull/10336)) + - role back docker build image and docker deploy image to ubuntu:xenial based ([#10338](https://github.com/paritytech/parity-ethereum/pull/10338)) + +## Parity-Ethereum [v2.3.2](https://github.com/paritytech/parity-ethereum/releases/tag/v2.3.2) (2019-02-03) + +Parity-Ethereum 2.3.2-stable is a security-relevant release. A bug in the JSONRPC-deserialization module can cause crashes of all versions of Parity Ethereum nodes if an attacker is able to submit a specially-crafted RPC to certain publicly available endpoints. + +- https://www.parity.io/security-alert-parity-ethereum-03-02/ + +The full list of included changes: +- Version: bump beta to 2.3.2 ([#10283](https://github.com/paritytech/parity-ethereum/pull/10283)) +- Additional tests for uint deserialization. ([#10279](https://github.com/paritytech/parity-ethereum/pull/10279)) ([#10280](https://github.com/paritytech/parity-ethereum/pull/10280)) +- Backport [#10285](https://github.com/paritytech/parity-ethereum/pull/10285) to beta ([#10286](https://github.com/paritytech/parity-ethereum/pull/10286)) + +## Parity-Ethereum [v2.3.1](https://github.com/paritytech/parity-ethereum/releases/tag/v2.3.1) (2019-02-01) + +Parity-Ethereum 2.3.1-beta is a consensus-relevant release that enables _St. Petersfork_ on: + +- Ethereum Block `7280000` (along with Constantinople) +- Kovan Block `10255201` +- Ropsten Block `4939394` +- POA Sokol Block `7026400` + +In addition to this, Constantinople is cancelled for the POA Core network. Upgrading is mandatory for clients on any of these chains. + +The full list of included changes: + +- Backports for beta 2.3.1 ([#10225](https://github.com/paritytech/parity-ethereum/pull/10225)) + - Fix _cannot recursively call into `Core`_ issue ([#10144](https://github.com/paritytech/parity-ethereum/pull/10144)) + - Update for Android cross-compilation. ([#10180](https://github.com/paritytech/parity-ethereum/pull/10180)) + - Fix _cannot recursively call into `Core`_ - Part 2 ([#10195](https://github.com/paritytech/parity-ethereum/pull/10195)) + - Cancel Constantinople HF on POA Core ([#10198](https://github.com/paritytech/parity-ethereum/pull/10198)) + - Add EIP-1283 disable transition ([#10214](https://github.com/paritytech/parity-ethereum/pull/10214)) + - Enable St-Peters-Fork ("Constantinople Fix") ([#10223](https://github.com/paritytech/parity-ethereum/pull/10223)) +- Beta: Macos heapsize force jemalloc ([#10234](https://github.com/paritytech/parity-ethereum/pull/10234)) ([#10259](https://github.com/paritytech/parity-ethereum/pull/10259)) + +## Parity-Ethereum [v2.3.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.3.0) (2019-01-16) + +Parity-Ethereum 2.3.0-beta is a consensus-relevant security release that reverts Constantinople on the Ethereum network. Upgrading is mandatory for Ethereum, and strongly recommended for other networks. + +- **Consensus** - Ethereum Network: Pull Constantinople protocol upgrade on Ethereum ([#10189](https://github.com/paritytech/parity-ethereum/pull/10189)) + - Read more: [Security Alert: Ethereum Constantinople Postponement](https://blog.ethereum.org/2019/01/15/security-alert-ethereum-constantinople-postponement/) +- **Networking** - All networks: Ping nodes from discovery ([#10167](https://github.com/paritytech/parity-ethereum/pull/10167)) +- **Wasm** - Kovan Network: Update pwasm-utils to 0.6.1 ([#10134](https://github.com/paritytech/parity-ethereum/pull/10134)) + +Other notable changes: + +- Existing blocks in the database are now kept when restoring a Snapshot. ([#8643](https://github.com/paritytech/parity-ethereum/pull/8643)) +- Block and transaction propagation is improved significantly. ([#9954](https://github.com/paritytech/parity-ethereum/pull/9954)) +- The ERC-191 Signed Data Standard is now supported by `personal_sign191`. ([#9701](https://github.com/paritytech/parity-ethereum/pull/9701)) +- Add support for ERC-191/712 `eth_signTypedData` as a standard for machine-verifiable and human-readable typed data signing with Ethereum keys. ([#9631](https://github.com/paritytech/parity-ethereum/pull/9631)) +- Add support for ERC-1186 `eth_getProof` ([#9001](https://github.com/paritytech/parity-ethereum/pull/9001)) +- Add experimental RPCs flag to enable ERC-191, ERC-712, and ERC-1186 APIs via `--jsonrpc-experimental` ([#9928](https://github.com/paritytech/parity-ethereum/pull/9928)) +- Make `CALLCODE` to trace value to be the code address. ([#9881](https://github.com/paritytech/parity-ethereum/pull/9881)) + +Configuration changes: + +- The EIP-98 transition is now disabled by default. If you previously had no `eip98transition` specified in your chain specification, you would enable this now manually on block `0x0`. ([#9955](https://github.com/paritytech/parity-ethereum/pull/9955)) +- Also, unknown fields in chain specs are now rejected. ([#9972](https://github.com/paritytech/parity-ethereum/pull/9972)) +- The Tendermint engine was removed from Parity Ethereum and is no longer available and maintained. ([#9980](https://github.com/paritytech/parity-ethereum/pull/9980)) +- Ropsten testnet data and keys moved from `test/` to `ropsten/` subdir. To reuse your old keys and data either copy or symlink them to the new location. ([#10123](https://github.com/paritytech/parity-ethereum/pull/10123)) +- Strict empty steps validation ([#10041](https://github.com/paritytech/parity-ethereum/pull/10041)) + - If you have a chain with`empty_steps` already running, some blocks most likely contain non-strict entries (unordered or duplicated empty steps). In this release `strict_empty_steps_transition` is enabled by default at block `0x0` for any chain with `empty_steps`. + - If your network uses `empty_steps` you **must** (A) plan a hard fork and change `strict_empty_steps_transition` to the desired fork block and (B) update the clients of the whole network to 2.2.7-stable / 2.3.0-beta. If for some reason you don't want to do this please set`strict_empty_steps_transition` to `0xfffffffff` to disable it. + +_Note:_ This release marks Parity 2.3 as _beta_. All versions of Parity 2.2 are now considered _stable_. + +The full list of included changes: + +- Backports for 2.3.0 beta ([#10164](https://github.com/paritytech/parity-ethereum/pull/10164)) +- Snap: fix path in script ([#10157](https://github.com/paritytech/parity-ethereum/pull/10157)) +- Make sure parent block is not in importing queue when importing ancient blocks ([#10138](https://github.com/paritytech/parity-ethereum/pull/10138)) +- Ci: re-enable snap publishing ([#10142](https://github.com/paritytech/parity-ethereum/pull/10142)) +- Hf in POA Core (2019-01-18) - Constantinople ([#10155](https://github.com/paritytech/parity-ethereum/pull/10155)) +- Update EWF's tobalaba chainspec ([#10152](https://github.com/paritytech/parity-ethereum/pull/10152)) +- Replace ethcore-logger with env-logger. ([#10102](https://github.com/paritytech/parity-ethereum/pull/10102)) +- Finality: dont require chain head to be in the chain ([#10054](https://github.com/paritytech/parity-ethereum/pull/10054)) +- Remove caching for node connections ([#10143](https://github.com/paritytech/parity-ethereum/pull/10143)) +- Blooms file iterator empty on out of range position. ([#10145](https://github.com/paritytech/parity-ethereum/pull/10145)) +- Autogen docs for the "Configuring Parity Ethereum" wiki page. ([#10067](https://github.com/paritytech/parity-ethereum/pull/10067)) +- Misc: bump license header to 2019 ([#10135](https://github.com/paritytech/parity-ethereum/pull/10135)) +- Hide most of the logs from cpp example. ([#10139](https://github.com/paritytech/parity-ethereum/pull/10139)) +- Don't try to send oversized packets ([#10042](https://github.com/paritytech/parity-ethereum/pull/10042)) +- Private tx enabled flag added into STATUS packet ([#9999](https://github.com/paritytech/parity-ethereum/pull/9999)) +- Update pwasm-utils to 0.6.1 ([#10134](https://github.com/paritytech/parity-ethereum/pull/10134)) +- Extract blockchain from ethcore ([#10114](https://github.com/paritytech/parity-ethereum/pull/10114)) +- Ethcore: update hardcoded headers ([#10123](https://github.com/paritytech/parity-ethereum/pull/10123)) +- Identity fix ([#10128](https://github.com/paritytech/parity-ethereum/pull/10128)) +- Use LenCachingMutex to optimize verification. ([#10117](https://github.com/paritytech/parity-ethereum/pull/10117)) +- Pyethereum keystore support ([#9710](https://github.com/paritytech/parity-ethereum/pull/9710)) +- Bump rocksdb-sys to 0.5.5 ([#10124](https://github.com/paritytech/parity-ethereum/pull/10124)) +- Parity-clib: `async C bindings to RPC requests` + `subscribe/unsubscribe to websocket events` ([#9920](https://github.com/paritytech/parity-ethereum/pull/9920)) +- Refactor (hardware wallet) : reduce the number of threads ([#9644](https://github.com/paritytech/parity-ethereum/pull/9644)) +- Hf in POA Sokol (2019-01-04) ([#10077](https://github.com/paritytech/parity-ethereum/pull/10077)) +- Fix broken links ([#10119](https://github.com/paritytech/parity-ethereum/pull/10119)) +- Follow-up to [#10105](https://github.com/paritytech/parity-ethereum/issues/10105) ([#10107](https://github.com/paritytech/parity-ethereum/pull/10107)) +- Move EIP-712 crate back to parity-ethereum ([#10106](https://github.com/paritytech/parity-ethereum/pull/10106)) +- Move a bunch of stuff around ([#10101](https://github.com/paritytech/parity-ethereum/pull/10101)) +- Revert "Add --frozen when running cargo ([#10081](https://github.com/paritytech/parity-ethereum/pull/10081))" ([#10105](https://github.com/paritytech/parity-ethereum/pull/10105)) +- Fix left over small grumbles on whitespaces ([#10084](https://github.com/paritytech/parity-ethereum/pull/10084)) +- Add --frozen when running cargo ([#10081](https://github.com/paritytech/parity-ethereum/pull/10081)) +- Fix pubsub new_blocks notifications to include all blocks ([#9987](https://github.com/paritytech/parity-ethereum/pull/9987)) +- Update some dependencies for compilation with pc-windows-gnu ([#10082](https://github.com/paritytech/parity-ethereum/pull/10082)) +- Fill transaction hash on ethGetLog of light client. ([#9938](https://github.com/paritytech/parity-ethereum/pull/9938)) +- Update changelog update for 2.2.5-beta and 2.1.10-stable ([#10064](https://github.com/paritytech/parity-ethereum/pull/10064)) +- Implement len caching for parking_lot RwLock ([#10032](https://github.com/paritytech/parity-ethereum/pull/10032)) +- Update parking_lot to 0.7 ([#10050](https://github.com/paritytech/parity-ethereum/pull/10050)) +- Bump crossbeam. ([#10048](https://github.com/paritytech/parity-ethereum/pull/10048)) +- Ethcore: enable constantinople on ethereum ([#10031](https://github.com/paritytech/parity-ethereum/pull/10031)) +- Strict empty steps validation ([#10041](https://github.com/paritytech/parity-ethereum/pull/10041)) +- Center the Subtitle, use some CAPS ([#10034](https://github.com/paritytech/parity-ethereum/pull/10034)) +- Change test miner max memory to malloc reports. ([#10024](https://github.com/paritytech/parity-ethereum/pull/10024)) +- Sort the storage for private state ([#10018](https://github.com/paritytech/parity-ethereum/pull/10018)) +- Fix: test corpus_inaccessible panic ([#10019](https://github.com/paritytech/parity-ethereum/pull/10019)) +- Ci: move future releases to ethereum subdir on s3 ([#10017](https://github.com/paritytech/parity-ethereum/pull/10017)) +- Light(on_demand): decrease default time window to 10 secs ([#10016](https://github.com/paritytech/parity-ethereum/pull/10016)) +- Light client : failsafe crate (circuit breaker) ([#9790](https://github.com/paritytech/parity-ethereum/pull/9790)) +- Lencachingmutex ([#9988](https://github.com/paritytech/parity-ethereum/pull/9988)) +- Version and notification for private contract wrapper added ([#9761](https://github.com/paritytech/parity-ethereum/pull/9761)) +- Handle failing case for update account cache in require ([#9989](https://github.com/paritytech/parity-ethereum/pull/9989)) +- Add tokio runtime to ethcore io worker ([#9979](https://github.com/paritytech/parity-ethereum/pull/9979)) +- Move daemonize before creating account provider ([#10003](https://github.com/paritytech/parity-ethereum/pull/10003)) +- Docs: update changelogs ([#9990](https://github.com/paritytech/parity-ethereum/pull/9990)) +- Fix daemonize ([#10000](https://github.com/paritytech/parity-ethereum/pull/10000)) +- Fix Bloom migration ([#9992](https://github.com/paritytech/parity-ethereum/pull/9992)) +- Remove tendermint engine support ([#9980](https://github.com/paritytech/parity-ethereum/pull/9980)) +- Calculate gas for deployment transaction ([#9840](https://github.com/paritytech/parity-ethereum/pull/9840)) +- Fix unstable peers and slowness in sync ([#9967](https://github.com/paritytech/parity-ethereum/pull/9967)) +- Adds parity_verifySignature RPC method ([#9507](https://github.com/paritytech/parity-ethereum/pull/9507)) +- Improve block and transaction propagation ([#9954](https://github.com/paritytech/parity-ethereum/pull/9954)) +- Deny unknown fields for chainspec ([#9972](https://github.com/paritytech/parity-ethereum/pull/9972)) +- Fix docker build ([#9971](https://github.com/paritytech/parity-ethereum/pull/9971)) +- Ci: rearrange pipeline by logic ([#9970](https://github.com/paritytech/parity-ethereum/pull/9970)) +- Add changelogs for 2.0.9, 2.1.4, 2.1.6, and 2.2.1 ([#9963](https://github.com/paritytech/parity-ethereum/pull/9963)) +- Add Error message when sync is still in progress. ([#9475](https://github.com/paritytech/parity-ethereum/pull/9475)) +- Make CALLCODE to trace value to be the code address ([#9881](https://github.com/paritytech/parity-ethereum/pull/9881)) +- Fix light client informant while syncing ([#9932](https://github.com/paritytech/parity-ethereum/pull/9932)) +- Add a optional json dump state to evm-bin ([#9706](https://github.com/paritytech/parity-ethereum/pull/9706)) +- Disable EIP-98 transition by default ([#9955](https://github.com/paritytech/parity-ethereum/pull/9955)) +- Remove secret_store runtimes. ([#9888](https://github.com/paritytech/parity-ethereum/pull/9888)) +- Fix a deadlock ([#9952](https://github.com/paritytech/parity-ethereum/pull/9952)) +- Chore(eip712): remove unused `failure-derive` ([#9958](https://github.com/paritytech/parity-ethereum/pull/9958)) +- Do not use the home directory as the working dir in docker ([#9834](https://github.com/paritytech/parity-ethereum/pull/9834)) +- Prevent silent errors in daemon mode, closes [#9367](https://github.com/paritytech/parity-ethereum/issues/9367) ([#9946](https://github.com/paritytech/parity-ethereum/pull/9946)) +- Fix empty steps ([#9939](https://github.com/paritytech/parity-ethereum/pull/9939)) +- Adjust requests costs for light client ([#9925](https://github.com/paritytech/parity-ethereum/pull/9925)) +- Eip-1186: add `eth_getProof` RPC-Method ([#9001](https://github.com/paritytech/parity-ethereum/pull/9001)) +- Missing blocks in filter_changes RPC ([#9947](https://github.com/paritytech/parity-ethereum/pull/9947)) +- Allow rust-nightly builds fail in nightly builds ([#9944](https://github.com/paritytech/parity-ethereum/pull/9944)) +- Update eth-secp256k1 to include fix for BSDs ([#9935](https://github.com/paritytech/parity-ethereum/pull/9935)) +- Unbreak build on rust -stable ([#9934](https://github.com/paritytech/parity-ethereum/pull/9934)) +- Keep existing blocks when restoring a Snapshot ([#8643](https://github.com/paritytech/parity-ethereum/pull/8643)) +- Add experimental RPCs flag ([#9928](https://github.com/paritytech/parity-ethereum/pull/9928)) +- Clarify poll lifetime ([#9922](https://github.com/paritytech/parity-ethereum/pull/9922)) +- Docs(require rust 1.30) ([#9923](https://github.com/paritytech/parity-ethereum/pull/9923)) +- Use block header for building finality ([#9914](https://github.com/paritytech/parity-ethereum/pull/9914)) +- Simplify cargo audit ([#9918](https://github.com/paritytech/parity-ethereum/pull/9918)) +- Light-fetch: Differentiate between out-of-gas/manual throw and use required gas from response on failure ([#9824](https://github.com/paritytech/parity-ethereum/pull/9824)) +- Eip 191 ([#9701](https://github.com/paritytech/parity-ethereum/pull/9701)) +- Fix(logger): `reqwest` no longer a dependency ([#9908](https://github.com/paritytech/parity-ethereum/pull/9908)) +- Remove rust-toolchain file ([#9906](https://github.com/paritytech/parity-ethereum/pull/9906)) +- Foundation: 6692865, ropsten: 4417537, kovan: 9363457 ([#9907](https://github.com/paritytech/parity-ethereum/pull/9907)) +- Ethcore: use Machine::verify_transaction on parent block ([#9900](https://github.com/paritytech/parity-ethereum/pull/9900)) +- Chore(rpc-tests): remove unused rand ([#9896](https://github.com/paritytech/parity-ethereum/pull/9896)) +- Fix: Intermittent failing CI due to addr in use ([#9885](https://github.com/paritytech/parity-ethereum/pull/9885)) +- Chore(bump docopt): 0.8 -> 1.0 ([#9889](https://github.com/paritytech/parity-ethereum/pull/9889)) +- Use expect ([#9883](https://github.com/paritytech/parity-ethereum/pull/9883)) +- Use Weak reference in PubSubClient ([#9886](https://github.com/paritytech/parity-ethereum/pull/9886)) +- Ci: nuke the gitlab caches ([#9855](https://github.com/paritytech/parity-ethereum/pull/9855)) +- Remove unused code ([#9884](https://github.com/paritytech/parity-ethereum/pull/9884)) +- Fix json tracer overflow ([#9873](https://github.com/paritytech/parity-ethereum/pull/9873)) +- Allow to seal work on latest block ([#9876](https://github.com/paritytech/parity-ethereum/pull/9876)) +- Fix docker script ([#9854](https://github.com/paritytech/parity-ethereum/pull/9854)) +- Health endpoint ([#9847](https://github.com/paritytech/parity-ethereum/pull/9847)) +- Gitlab-ci: make android release build succeed ([#9743](https://github.com/paritytech/parity-ethereum/pull/9743)) +- Clean up existing benchmarks ([#9839](https://github.com/paritytech/parity-ethereum/pull/9839)) +- Update Callisto block reward code to support HF1 ([#9811](https://github.com/paritytech/parity-ethereum/pull/9811)) +- Option to disable keep alive for JSON-RPC http transport ([#9848](https://github.com/paritytech/parity-ethereum/pull/9848)) +- Classic.json Bootnode Update ([#9828](https://github.com/paritytech/parity-ethereum/pull/9828)) +- Support MIX. ([#9767](https://github.com/paritytech/parity-ethereum/pull/9767)) +- Ci: remove failing tests for android, windows, and macos ([#9788](https://github.com/paritytech/parity-ethereum/pull/9788)) +- Implement NoProof for json tests and update tests reference (replaces [#9744](https://github.com/paritytech/parity-ethereum/issues/9744)) ([#9814](https://github.com/paritytech/parity-ethereum/pull/9814)) +- Chore(bump regex) ([#9842](https://github.com/paritytech/parity-ethereum/pull/9842)) +- Ignore global cache for patched accounts ([#9752](https://github.com/paritytech/parity-ethereum/pull/9752)) +- Move state root verification before gas used ([#9841](https://github.com/paritytech/parity-ethereum/pull/9841)) +- Fix(docker-aarch64) : cross-compile config ([#9798](https://github.com/paritytech/parity-ethereum/pull/9798)) +- Version: bump nightly to 2.3.0 ([#9819](https://github.com/paritytech/parity-ethereum/pull/9819)) +- Tests modification for windows CI ([#9671](https://github.com/paritytech/parity-ethereum/pull/9671)) +- Eip-712 implementation ([#9631](https://github.com/paritytech/parity-ethereum/pull/9631)) +- Fix typo ([#9826](https://github.com/paritytech/parity-ethereum/pull/9826)) +- Clean up serde rename and use rename_all = camelCase when possible ([#9823](https://github.com/paritytech/parity-ethereum/pull/9823)) diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index bd13d64671e..f3bdd2a14f1 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -50,7 +50,6 @@ num = { version = "0.1", default-features = false, features = ["bigint"] } num_cpus = "1.2" parity-bytes = "0.1" parity-crypto = "0.3.0" -parity-machine = { path = "../machine" } parity-snappy = "0.1" parking_lot = "0.7" trie-db = "0.11.0" diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index e69df263b6b..7e0e0555325 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -194,26 +194,6 @@ impl IsBlock for ExecutedBlock { fn block(&self) -> &ExecutedBlock { self } } -impl ::parity_machine::LiveBlock for ExecutedBlock { - type Header = Header; - - fn header(&self) -> &Header { - &self.header - } - - fn uncles(&self) -> &[Header] { - &self.uncles - } -} - -impl ::parity_machine::Transactions for ExecutedBlock { - type Transaction = SignedTransaction; - - fn transactions(&self) -> &[SignedTransaction] { - &self.transactions - } -} - impl<'x> OpenBlock<'x> { /// Create a new `OpenBlock` ready for transaction pushing. pub fn new<'a>( diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 7fee959b5c9..39e5977ac02 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -298,19 +298,11 @@ impl Importer { match self.check_and_lock_block(&bytes, block, client) { Ok((closed_block, pending)) => { - if self.engine.is_proposal(&header) { - self.block_queue.mark_as_good(&[hash]); - proposed_blocks.push(bytes); - } else { - imported_blocks.push(hash); - - let transactions_len = closed_block.transactions().len(); - - let route = self.commit_block(closed_block, &header, encoded::Block::new(bytes), pending, client); - import_results.push(route); - - client.report.write().accrue_block(&header, transactions_len); - } + imported_blocks.push(hash); + let transactions_len = closed_block.transactions().len(); + let route = self.commit_block(closed_block, &header, encoded::Block::new(bytes), pending, client); + import_results.push(route); + client.report.write().accrue_block(&header, transactions_len); }, Err(err) => { self.bad_blocks.report(bytes, format!("{:?}", err)); diff --git a/ethcore/src/engines/authority_round/mod.rs b/ethcore/src/engines/authority_round/mod.rs index ef439b5d4ba..31062d80f3d 100644 --- a/ethcore/src/engines/authority_round/mod.rs +++ b/ethcore/src/engines/authority_round/mod.rs @@ -1413,8 +1413,10 @@ impl Engine for AuthorityRound { let first = chain_head.number() == 0; - // apply immediate transitions. + // Apply transitions that don't require finality and should be enacted immediately (e.g from chain spec) if let Some(change) = self.validators.is_epoch_end(first, chain_head) { + info!(target: "engine", "Immediately applying validator set change signalled at block {}", chain_head.number()); + self.epoch_manager.lock().note_new_epoch(); let change = combine_proofs(chain_head.number(), &change, &[]); return Some(change) } diff --git a/ethcore/src/engines/block_reward.rs b/ethcore/src/engines/block_reward.rs index a95e3820ef7..58b55408ebe 100644 --- a/ethcore/src/engines/block_reward.rs +++ b/ethcore/src/engines/block_reward.rs @@ -24,11 +24,12 @@ use ethereum_types::{H160, Address, U256}; use std::sync::Arc; use hash::keccak; use error::Error; -use machine::WithRewards; -use parity_machine::Machine; +use machine::Machine; use trace; use types::BlockNumber; use super::{SystemOrCodeCall, SystemOrCodeCallKind}; +use trace::{Tracer, ExecutiveTracer, Tracing}; +use block::ExecutedBlock; use_contract!(block_reward_contract, "res/contracts/block_reward.json"); @@ -152,17 +153,26 @@ impl BlockRewardContract { /// Applies the given block rewards, i.e. adds the given balance to each beneficiary' address. /// If tracing is enabled the operations are recorded. -pub fn apply_block_rewards( +pub fn apply_block_rewards( rewards: &[(Address, RewardKind, U256)], - block: &mut M::LiveBlock, + block: &mut ExecutedBlock, machine: &M, ) -> Result<(), M::Error> { for &(ref author, _, ref block_reward) in rewards { machine.add_balance(block, author, block_reward)?; } - let rewards: Vec<_> = rewards.into_iter().map(|&(a, k, r)| (a, k.into(), r)).collect(); - machine.note_rewards(block, &rewards) + if let Tracing::Enabled(ref mut traces) = *block.traces_mut() { + let mut tracer = ExecutiveTracer::default(); + + for &(address, reward_kind, amount) in rewards { + tracer.trace_reward(address, amount, reward_kind.into()); + } + + traces.push(tracer.drain().into()); + } + + Ok(()) } #[cfg(test)] diff --git a/ethcore/src/engines/clique/mod.rs b/ethcore/src/engines/clique/mod.rs index 46c72ddf530..69dd6ef3d8f 100644 --- a/ethcore/src/engines/clique/mod.rs +++ b/ethcore/src/engines/clique/mod.rs @@ -346,8 +346,10 @@ impl Engine for Clique { fn name(&self) -> &str { "Clique" } fn machine(&self) -> &EthereumMachine { &self.machine } - /// Clique use same fields, nonce + mixHash + + // Clique use same fields, nonce + mixHash fn seal_fields(&self, _header: &Header) -> usize { 2 } + fn maximum_uncle_count(&self, _block: BlockNumber) -> usize { 0 } // No Uncle in Clique @@ -362,8 +364,8 @@ impl Engine for Clique { Ok(()) } + // Clique has no block reward. fn on_close_block(&self, _block: &mut ExecutedBlock) -> Result<(), Error> { - // Clique has no block reward. Ok(()) } diff --git a/ethcore/src/engines/clique/step_service.rs b/ethcore/src/engines/clique/step_service.rs index df8b257b5cf..443b67a092a 100644 --- a/ethcore/src/engines/clique/step_service.rs +++ b/ethcore/src/engines/clique/step_service.rs @@ -14,12 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Parity Ethereum. If not, see . -use engines::Engine; -use parity_machine::Machine; + use std::sync::Weak; use std::time::Duration; use std::thread; use std::sync::Arc; + +use engines::Engine; +use machine::Machine; use parking_lot::RwLock; pub struct StepService { diff --git a/ethcore/src/engines/instant_seal.rs b/ethcore/src/engines/instant_seal.rs index 595805c1997..93e20196a46 100644 --- a/ethcore/src/engines/instant_seal.rs +++ b/ethcore/src/engines/instant_seal.rs @@ -15,7 +15,9 @@ // along with Parity Ethereum. If not, see . use engines::{Engine, Seal}; -use parity_machine::{Machine, Transactions, TotalScoredHeader}; +use machine::Machine; +use types::header::{Header, ExtendedHeader}; +use block::ExecutedBlock; /// `InstantSeal` params. #[derive(Default, Debug, PartialEq)] @@ -48,11 +50,7 @@ impl InstantSeal { } } -impl Engine for InstantSeal - where M::LiveBlock: Transactions, - M::ExtendedHeader: TotalScoredHeader, - ::Value: Ord -{ +impl Engine for InstantSeal { fn name(&self) -> &str { "InstantSeal" } @@ -61,11 +59,15 @@ impl Engine for InstantSeal fn seals_internally(&self) -> Option { Some(true) } - fn generate_seal(&self, block: &M::LiveBlock, _parent: &M::Header) -> Seal { - if block.transactions().is_empty() { Seal::None } else { Seal::Regular(Vec::new()) } + fn generate_seal(&self, block: &ExecutedBlock, _parent: &Header) -> Seal { + if block.transactions.is_empty() { + Seal::None + } else { + Seal::Regular(Vec::new()) + } } - fn verify_local_seal(&self, _header: &M::Header) -> Result<(), M::Error> { + fn verify_local_seal(&self, _header: &Header) -> Result<(), M::Error> { Ok(()) } @@ -84,7 +86,7 @@ impl Engine for InstantSeal header_timestamp >= parent_timestamp } - fn fork_choice(&self, new: &M::ExtendedHeader, current: &M::ExtendedHeader) -> super::ForkChoice { + fn fork_choice(&self, new: &ExtendedHeader, current: &ExtendedHeader) -> super::ForkChoice { super::total_difficulty_fork_choice(new, current) } } diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index fa23e3af06a..7bdfa6805ea 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -28,7 +28,6 @@ pub mod signer; pub use self::authority_round::AuthorityRound; pub use self::basic_authority::BasicAuthority; -pub use self::epoch::{EpochVerifier, Transition as EpochTransition}; pub use self::instant_seal::{InstantSeal, InstantSealParams}; pub use self::null_engine::NullEngine; pub use self::signer::EngineSigner; @@ -36,7 +35,7 @@ pub use self::clique::Clique; // TODO [ToDr] Remove re-export (#10130) pub use types::engines::ForkChoice; -pub use types::engines::epoch; +pub use types::engines::epoch::{self, Transition as EpochTransition}; use std::sync::{Weak, Arc}; use std::collections::{BTreeMap, HashMap}; @@ -46,16 +45,18 @@ use builtin::Builtin; use vm::{EnvInfo, Schedule, CreateContractAddress, CallType, ActionValue}; use error::Error; use types::BlockNumber; +use types::header::{Header, ExtendedHeader}; use snapshot::SnapshotComponents; use spec::CommonParams; use types::transaction::{self, UnverifiedTransaction, SignedTransaction}; -use ethkey::Signature; -use types::header::Header; -use parity_machine::{Machine, LocalizedMachine as Localized, TotalScoredHeader, Header as MachineHeader}; + +use ethkey::{Signature}; +use machine::{self, Machine, AuxiliaryRequest, AuxiliaryData}; use ethereum_types::{H64, H256, U256, Address}; use unexpected::{Mismatch, OutOfBounds}; use bytes::Bytes; use types::ancestry_action::AncestryAction; +use block::ExecutedBlock; /// Default EIP-210 contract code. /// As defined in https://github.com/ethereum/EIPs/pull/210 @@ -211,8 +212,7 @@ pub type PendingTransitionStore<'a> = Fn(H256) -> Option: Send + Sync { /// Generate a proof, given the state. - // TODO: make this into an &M::StateContext - fn generate_proof<'a>(&self, state: &>::StateContext) -> Result, String>; + fn generate_proof<'a>(&self, state: &machine::Call) -> Result, String>; /// Check a proof generated elsewhere (potentially by a peer). // `engine` needed to check state proofs, while really this should // just be state machine params. @@ -252,7 +252,7 @@ impl<'a, M: Machine> ConstructedVerifier<'a, M> { /// Results of a query of whether an epoch change occurred at the given block. pub enum EpochChange { /// Cannot determine until more data is passed. - Unsure(M::AuxiliaryRequest), + Unsure(AuxiliaryRequest), /// No epoch change. No, /// The epoch will change, with proof. @@ -270,10 +270,10 @@ pub trait Engine: Sync + Send { fn machine(&self) -> &M; /// The number of additional header fields required for this engine. - fn seal_fields(&self, _header: &M::Header) -> usize { 0 } + fn seal_fields(&self, _header: &Header) -> usize { 0 } /// Additional engine-specific information for the user/developer concerning `header`. - fn extra_info(&self, _header: &M::Header) -> BTreeMap { BTreeMap::new() } + fn extra_info(&self, _header: &Header) -> BTreeMap { BTreeMap::new() } /// Maximum number of uncles a block is allowed to declare. fn maximum_uncle_count(&self, _block: BlockNumber) -> usize { 0 } @@ -288,20 +288,20 @@ pub trait Engine: Sync + Send { /// `epoch_begin` set to true if this block kicks off an epoch. fn on_new_block( &self, - _block: &mut M::LiveBlock, + _block: &mut ExecutedBlock, _epoch_begin: bool, - _ancestry: &mut Iterator, + _ancestry: &mut Iterator, ) -> Result<(), M::Error> { Ok(()) } /// Block transformation functions, after the transactions. - fn on_close_block(&self, _block: &mut M::LiveBlock) -> Result<(), M::Error> { + fn on_close_block(&self, _block: &mut ExecutedBlock) -> Result<(), M::Error> { Ok(()) } /// Allow returning new block header after seal generation. Currently only used by Clique. - fn on_seal_block(&self, _block: &M::LiveBlock) -> Result, M::Error> { Ok(None) } + fn on_seal_block(&self, _block: &ExecutedBlock) -> Result, Error> { Ok(None) } /// None means that it requires external input (e.g. PoW) to seal a block. /// Some(true) means the engine is currently prime for seal generation (i.e. node is the current validator). @@ -317,7 +317,7 @@ pub trait Engine: Sync + Send { /// /// It is fine to require access to state or a full client for this function, since /// light clients do not generate seals. - fn generate_seal(&self, _block: &M::LiveBlock, _parent: &M::Header) -> Seal { Seal::None } + fn generate_seal(&self, _block: &ExecutedBlock, _parent: &Header) -> Seal { Seal::None } /// Verify a locally-generated seal of a header. /// @@ -329,25 +329,25 @@ pub trait Engine: Sync + Send { /// /// It is fine to require access to state or a full client for this function, since /// light clients do not generate seals. - fn verify_local_seal(&self, header: &M::Header) -> Result<(), M::Error>; + fn verify_local_seal(&self, header: &Header) -> Result<(), M::Error>; /// Phase 1 quick block verification. Only does checks that are cheap. Returns either a null `Ok` or a general error detailing the problem with import. /// The verification module can optionally avoid checking the seal (`check_seal`), if seal verification is disabled this method won't be called. - fn verify_block_basic(&self, _header: &M::Header) -> Result<(), M::Error> { Ok(()) } + fn verify_block_basic(&self, _header: &Header) -> Result<(), M::Error> { Ok(()) } /// Phase 2 verification. Perform costly checks such as transaction signatures. Returns either a null `Ok` or a general error detailing the problem with import. /// The verification module can optionally avoid checking the seal (`check_seal`), if seal verification is disabled this method won't be called. - fn verify_block_unordered(&self, _header: &M::Header) -> Result<(), M::Error> { Ok(()) } + fn verify_block_unordered(&self, _header: &Header) -> Result<(), M::Error> { Ok(()) } /// Phase 3 verification. Check block information against parent. Returns either a null `Ok` or a general error detailing the problem with import. - fn verify_block_family(&self, _header: &M::Header, _parent: &M::Header) -> Result<(), M::Error> { Ok(()) } + fn verify_block_family(&self, _header: &Header, _parent: &Header) -> Result<(), M::Error> { Ok(()) } /// Phase 4 verification. Verify block header against potentially external data. /// Should only be called when `register_client` has been called previously. - fn verify_block_external(&self, _header: &M::Header) -> Result<(), M::Error> { Ok(()) } + fn verify_block_external(&self, _header: &Header) -> Result<(), M::Error> { Ok(()) } /// Genesis epoch data. - fn genesis_epoch_data<'a>(&self, _header: &M::Header, _state: &>::StateContext) -> Result, String> { Ok(Vec::new()) } + fn genesis_epoch_data<'a>(&self, _header: &Header, _state: &machine::Call) -> Result, String> { Ok(Vec::new()) } /// Whether an epoch change is signalled at the given header but will require finality. /// If a change can be enacted immediately then return `No` from this function but @@ -358,7 +358,7 @@ pub trait Engine: Sync + Send { /// Return `Yes` or `No` when the answer is definitively known. /// /// Should not interact with state. - fn signals_epoch_end<'a>(&self, _header: &M::Header, _aux: >::AuxiliaryData) + fn signals_epoch_end<'a>(&self, _header: &Header, _aux: AuxiliaryData<'a>) -> EpochChange { EpochChange::No @@ -374,9 +374,9 @@ pub trait Engine: Sync + Send { /// Return optional transition proof. fn is_epoch_end( &self, - _chain_head: &M::Header, + _chain_head: &Header, _finalized: &[H256], - _chain: &Headers, + _chain: &Headers
, _transition_store: &PendingTransitionStore, ) -> Option> { None @@ -393,8 +393,8 @@ pub trait Engine: Sync + Send { /// Return optional transition proof. fn is_epoch_end_light( &self, - _chain_head: &M::Header, - _chain: &Headers, + _chain_head: &Header, + _chain: &Headers
, _transition_store: &PendingTransitionStore, ) -> Option> { None @@ -402,22 +402,18 @@ pub trait Engine: Sync + Send { /// Create an epoch verifier from validation proof and a flag indicating /// whether finality is required. - fn epoch_verifier<'a>(&self, _header: &M::Header, _proof: &'a [u8]) -> ConstructedVerifier<'a, M> { - ConstructedVerifier::Trusted(Box::new(self::epoch::NoOp)) + fn epoch_verifier<'a>(&self, _header: &Header, _proof: &'a [u8]) -> ConstructedVerifier<'a, M> { + ConstructedVerifier::Trusted(Box::new(NoOp)) } /// Populate a header's fields based on its parent's header. /// Usually implements the chain scoring rule based on weight. - fn populate_from_parent(&self, _header: &mut M::Header, _parent: &M::Header) { } + fn populate_from_parent(&self, _header: &mut Header, _parent: &Header) { } /// Handle any potential consensus messages; /// updating consensus state and potentially issuing a new one. fn handle_message(&self, _message: &[u8]) -> Result<(), EngineError> { Err(EngineError::UnexpectedMessage) } - /// Find out if the block is a proposal block and should not be inserted into the DB. - /// Takes a header of a fully verified block. - fn is_proposal(&self, _verified_header: &M::Header) -> bool { false } - /// Register a component which signs consensus messages. fn set_signer(&self, _signer: Box) {} @@ -459,19 +455,19 @@ pub trait Engine: Sync + Send { /// Gather all ancestry actions. Called at the last stage when a block is committed. The Engine must guarantee that /// the ancestry exists. - fn ancestry_actions(&self, _header: &M::Header, _ancestry: &mut Iterator) -> Vec { + fn ancestry_actions(&self, _header: &Header, _ancestry: &mut Iterator) -> Vec { Vec::new() } /// Check whether the given new block is the best block, after finalization check. - fn fork_choice(&self, new: &M::ExtendedHeader, best: &M::ExtendedHeader) -> ForkChoice; + fn fork_choice(&self, new: &ExtendedHeader, best: &ExtendedHeader) -> ForkChoice; - /// Return author should used in executing txns for this block. - fn executive_author(&self, header: &M::Header) -> Address { *header.author() } + /// Returns author should used when executing tx's for this block. + fn executive_author(&self, header: &Header) -> Address { *header.author() } } /// Check whether a given block is the best block based on the default total difficulty rule. -pub fn total_difficulty_fork_choice(new: &T, best: &T) -> ForkChoice where ::Value: Ord { +pub fn total_difficulty_fork_choice(new: &ExtendedHeader, best: &ExtendedHeader) -> ForkChoice { if new.total_score() > best.total_score() { ForkChoice::New } else { @@ -564,3 +560,29 @@ pub trait EthEngine: Engine<::machine::EthereumMachine> { // convenience wrappers for existing functions. impl EthEngine for T where T: Engine<::machine::EthereumMachine> { } + +/// Verifier for all blocks within an epoch with self-contained state. +pub trait EpochVerifier: Send + Sync { + /// Lightly verify the next block header. + /// This may not be a header belonging to a different epoch. + fn verify_light(&self, header: &Header) -> Result<(), M::Error>; + + /// Perform potentially heavier checks on the next block header. + fn verify_heavy(&self, header: &Header) -> Result<(), M::Error> { + self.verify_light(header) + } + + /// Check a finality proof against this epoch verifier. + /// Returns `Some(hashes)` if the proof proves finality of these hashes. + /// Returns `None` if the proof doesn't prove anything. + fn check_finality_proof(&self, _proof: &[u8]) -> Option> { + None + } +} + +/// Special "no-op" verifier for stateless, epoch-less engines. +pub struct NoOp; + +impl EpochVerifier for NoOp { + fn verify_light(&self, _header: &Header) -> Result<(), M::Error> { Ok(()) } +} diff --git a/ethcore/src/engines/null_engine.rs b/ethcore/src/engines/null_engine.rs index 4a2610259c4..27138985ad6 100644 --- a/ethcore/src/engines/null_engine.rs +++ b/ethcore/src/engines/null_engine.rs @@ -17,9 +17,10 @@ use engines::Engine; use engines::block_reward::{self, RewardKind}; use ethereum_types::U256; -use machine::WithRewards; -use parity_machine::{Machine, Header, LiveBlock, TotalScoredHeader}; +use machine::Machine; use types::BlockNumber; +use types::header::{Header, ExtendedHeader}; +use block::ExecutedBlock; /// Params for a null engine. #[derive(Clone, Default)] @@ -58,26 +59,23 @@ impl Default for NullEngine { } } -impl Engine for NullEngine - where M::ExtendedHeader: TotalScoredHeader, - ::Value: Ord -{ +impl Engine for NullEngine { fn name(&self) -> &str { "NullEngine" } fn machine(&self) -> &M { &self.machine } - fn on_close_block(&self, block: &mut M::LiveBlock) -> Result<(), M::Error> { + fn on_close_block(&self, block: &mut ExecutedBlock) -> Result<(), M::Error> { use std::ops::Shr; - let author = *LiveBlock::header(&*block).author(); - let number = LiveBlock::header(&*block).number(); + let author = *block.header.author(); + let number = block.header.number(); let reward = self.params.block_reward; if reward == U256::zero() { return Ok(()) } - let n_uncles = LiveBlock::uncles(&*block).len(); + let n_uncles = block.uncles.len(); let mut rewards = Vec::new(); @@ -86,7 +84,7 @@ impl Engine for NullEngine rewards.push((author, RewardKind::Author, result_block_reward)); // bestow uncle rewards. - for u in LiveBlock::uncles(&*block) { + for u in &block.uncles { let uncle_author = u.author(); let result_uncle_reward = (reward * U256::from(8 + u.number() - number)).shr(3); rewards.push((*uncle_author, RewardKind::uncle(number, u.number()), result_uncle_reward)); @@ -97,7 +95,7 @@ impl Engine for NullEngine fn maximum_uncle_count(&self, _block: BlockNumber) -> usize { 2 } - fn verify_local_seal(&self, _header: &M::Header) -> Result<(), M::Error> { + fn verify_local_seal(&self, _header: &Header) -> Result<(), M::Error> { Ok(()) } @@ -105,7 +103,7 @@ impl Engine for NullEngine Some(Box::new(::snapshot::PowSnapshot::new(10000, 10000))) } - fn fork_choice(&self, new: &M::ExtendedHeader, current: &M::ExtendedHeader) -> super::ForkChoice { + fn fork_choice(&self, new: &ExtendedHeader, current: &ExtendedHeader) -> super::ForkChoice { super::total_difficulty_fork_choice(new, current) } } diff --git a/ethcore/src/ethereum/ethash.rs b/ethcore/src/ethereum/ethash.rs index 293009fdecf..561b3493be8 100644 --- a/ethcore/src/ethereum/ethash.rs +++ b/ethcore/src/ethereum/ethash.rs @@ -241,17 +241,16 @@ impl Engine for Arc { /// This assumes that all uncles are valid uncles (i.e. of at least one generation before the current). fn on_close_block(&self, block: &mut ExecutedBlock) -> Result<(), Error> { use std::ops::Shr; - use parity_machine::LiveBlock; - let author = *LiveBlock::header(&*block).author(); - let number = LiveBlock::header(&*block).number(); + let author = *block.header.author(); + let number = block.header.number(); let rewards = match self.ethash_params.block_reward_contract { Some(ref c) if number >= self.ethash_params.block_reward_contract_transition => { let mut beneficiaries = Vec::new(); beneficiaries.push((author, RewardKind::Author)); - for u in LiveBlock::uncles(&*block) { + for u in &block.uncles { let uncle_author = u.author(); beneficiaries.push((*uncle_author, RewardKind::uncle(number, u.number()))); } @@ -274,7 +273,8 @@ impl Engine for Arc { let eras_rounds = self.ethash_params.ecip1017_era_rounds; let (eras, reward) = ecip1017_eras_block_reward(eras_rounds, reward, number); - let n_uncles = LiveBlock::uncles(&*block).len(); + //let n_uncles = LiveBlock::uncles(&*block).len(); + let n_uncles = block.uncles.len(); // Bestow block rewards. let mut result_block_reward = reward + reward.shr(5) * U256::from(n_uncles); @@ -282,7 +282,7 @@ impl Engine for Arc { rewards.push((author, RewardKind::Author, result_block_reward)); // Bestow uncle rewards. - for u in LiveBlock::uncles(&*block) { + for u in &block.uncles { let uncle_author = u.author(); let result_uncle_reward = if eras == 0 { (reward * U256::from(8 + u.number() - number)).shr(3) diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index 5ba6a26d013..17b33025a1c 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -89,7 +89,6 @@ extern crate num; extern crate num_cpus; extern crate parity_bytes as bytes; extern crate parity_crypto; -extern crate parity_machine; extern crate parity_snappy as snappy; extern crate parking_lot; extern crate trie_db as trie; diff --git a/ethcore/src/machine.rs b/ethcore/src/machine/impls.rs similarity index 93% rename from ethcore/src/machine.rs rename to ethcore/src/machine/impls.rs index c0eae63d1e1..90d410c70d2 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine/impls.rs @@ -24,7 +24,7 @@ use ethereum_types::{U256, H256, Address}; use rlp::Rlp; use types::transaction::{self, SYSTEM_ADDRESS, UNSIGNED_SENDER, UnverifiedTransaction, SignedTransaction}; use types::BlockNumber; -use types::header::{Header, ExtendedHeader}; +use types::header::Header; use vm::{CallType, ActionParams, ActionValue, ParamsType}; use vm::{EnvInfo, Schedule, CreateContractAddress}; @@ -36,7 +36,7 @@ use error::Error; use executive::Executive; use spec::CommonParams; use state::{CleanupMode, Substate}; -use trace::{NoopTracer, NoopVMTracer, Tracer, ExecutiveTracer, RewardType, Tracing}; +use trace::{NoopTracer, NoopVMTracer}; use tx_filter::TransactionFilter; /// Parity tries to round block.gas_limit to multiple of this constant @@ -428,14 +428,8 @@ pub enum AuxiliaryRequest { Both, } -impl ::parity_machine::Machine for EthereumMachine { - type Header = Header; - type ExtendedHeader = ExtendedHeader; - - type LiveBlock = ExecutedBlock; +impl super::Machine for EthereumMachine { type EngineClient = ::client::EngineClient; - type AuxiliaryRequest = AuxiliaryRequest; - type AncestryAction = ::types::ancestry_action::AncestryAction; type Error = Error; @@ -448,42 +442,6 @@ impl ::parity_machine::Machine for EthereumMachine { } } -impl<'a> ::parity_machine::LocalizedMachine<'a> for EthereumMachine { - type StateContext = Call<'a>; - type AuxiliaryData = AuxiliaryData<'a>; -} - -/// A state machine that uses block rewards. -pub trait WithRewards: ::parity_machine::Machine { - /// Note block rewards, traces each reward storing information about benefactor, amount and type - /// of reward. - fn note_rewards( - &self, - live: &mut Self::LiveBlock, - rewards: &[(Address, RewardType, U256)], - ) -> Result<(), Self::Error>; -} - -impl WithRewards for EthereumMachine { - fn note_rewards( - &self, - live: &mut Self::LiveBlock, - rewards: &[(Address, RewardType, U256)], - ) -> Result<(), Self::Error> { - if let Tracing::Enabled(ref mut traces) = *live.traces_mut() { - let mut tracer = ExecutiveTracer::default(); - - for &(address, ref reward_type, amount) in rewards { - tracer.trace_reward(address, amount, reward_type.clone()); - } - - traces.push(tracer.drain().into()); - } - - Ok(()) - } -} - // Try to round gas_limit a bit so that: // 1) it will still be in desired range // 2) it will be a nearest (with tendency to increase) multiple of PARITY_GAS_LIMIT_DETERMINANT diff --git a/ethcore/src/machine/mod.rs b/ethcore/src/machine/mod.rs new file mode 100644 index 00000000000..882dc011a20 --- /dev/null +++ b/ethcore/src/machine/mod.rs @@ -0,0 +1,7 @@ +//! Generalization of a state machine for a consensus engine. + +mod impls; +mod traits; + +pub use self::impls::*; +pub use self::traits::*; diff --git a/ethcore/src/machine/traits.rs b/ethcore/src/machine/traits.rs new file mode 100644 index 00000000000..1523885e0e9 --- /dev/null +++ b/ethcore/src/machine/traits.rs @@ -0,0 +1,37 @@ +// 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 . + +//! Generalization of a state machine for a consensus engine. +//! This will define traits for the header, block, and state of a blockchain. + +use ethereum_types::{U256, Address}; +use block::ExecutedBlock; + +/// Generalization of types surrounding blockchain-suitable state machines. +pub trait Machine: Send + Sync { + /// A handle to a blockchain client for this machine. + type EngineClient: ?Sized; + + /// Errors which can occur when querying or interacting with the machine. + type Error; + + /// Get the balance, in base units, associated with an account. + /// Extracts data from the live block. + fn balance(&self, live: &ExecutedBlock, address: &Address) -> Result; + + /// Increment the balance of an account in the state of the live block. + fn add_balance(&self, live: &mut ExecutedBlock, address: &Address, amount: &U256) -> Result<(), Self::Error>; +} diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index 7b7d6c73f42..1a90aa52692 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -1000,7 +1000,6 @@ mod tests { use types::view; use types::views::BlockView; - // https://github.com/paritytech/parity-ethereum/issues/1840 #[test] fn test_load_empty() { let tempdir = TempDir::new("").unwrap(); diff --git a/ethcore/src/trace/types/trace.rs b/ethcore/src/trace/types/trace.rs index 18ec24a84f0..16084e94cbd 100644 --- a/ethcore/src/trace/types/trace.rs +++ b/ethcore/src/trace/types/trace.rs @@ -135,7 +135,7 @@ impl Create { } /// Reward type. -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, PartialEq, Clone, Copy)] pub enum RewardType { /// Block Block, diff --git a/ethcore/types/Cargo.toml b/ethcore/types/Cargo.toml index 855fd717287..e3f9bd1db63 100644 --- a/ethcore/types/Cargo.toml +++ b/ethcore/types/Cargo.toml @@ -11,7 +11,6 @@ ethkey = { path = "../../accounts/ethkey" } heapsize = "0.4" keccak-hash = "0.1" parity-bytes = "0.1" -parity-machine = { path = "../../machine" } rlp = { version = "0.3.0", features = ["ethereum"] } rlp_derive = { path = "../../util/rlp-derive" } unexpected = { path = "../../util/unexpected" } diff --git a/ethcore/types/src/engines/epoch.rs b/ethcore/types/src/engines/epoch.rs index 34054a193fc..2a43b47755c 100644 --- a/ethcore/types/src/engines/epoch.rs +++ b/ethcore/types/src/engines/epoch.rs @@ -71,28 +71,3 @@ impl Decodable for PendingTransition { } } -/// Verifier for all blocks within an epoch with self-contained state. -pub trait EpochVerifier: Send + Sync { - /// Lightly verify the next block header. - /// This may not be a header belonging to a different epoch. - fn verify_light(&self, header: &M::Header) -> Result<(), M::Error>; - - /// Perform potentially heavier checks on the next block header. - fn verify_heavy(&self, header: &M::Header) -> Result<(), M::Error> { - self.verify_light(header) - } - - /// Check a finality proof against this epoch verifier. - /// Returns `Some(hashes)` if the proof proves finality of these hashes. - /// Returns `None` if the proof doesn't prove anything. - fn check_finality_proof(&self, _proof: &[u8]) -> Option> { - None - } -} - -/// Special "no-op" verifier for stateless, epoch-less engines. -pub struct NoOp; - -impl EpochVerifier for NoOp { - fn verify_light(&self, _header: &M::Header) -> Result<(), M::Error> { Ok(()) } -} diff --git a/ethcore/types/src/header.rs b/ethcore/types/src/header.rs index 829776f013e..3dfe6ab83b1 100644 --- a/ethcore/types/src/header.rs +++ b/ethcore/types/src/header.rs @@ -368,44 +368,11 @@ impl HeapSizeOf for Header { } } -impl ::parity_machine::Header for Header { - fn bare_hash(&self) -> H256 { Header::bare_hash(self) } - fn hash(&self) -> H256 { Header::hash(self) } - fn seal(&self) -> &[Vec] { Header::seal(self) } - fn author(&self) -> &Address { Header::author(self) } - fn number(&self) -> BlockNumber { Header::number(self) } -} - -impl ::parity_machine::ScoredHeader for Header { - type Value = U256; - - fn score(&self) -> &U256 { self.difficulty() } - fn set_score(&mut self, score: U256) { self.set_difficulty(score) } -} - -impl ::parity_machine::Header for ExtendedHeader { - fn bare_hash(&self) -> H256 { self.header.bare_hash() } - fn hash(&self) -> H256 { self.header.hash() } - fn seal(&self) -> &[Vec] { self.header.seal() } - fn author(&self) -> &Address { self.header.author() } - fn number(&self) -> BlockNumber { self.header.number() } -} - -impl ::parity_machine::ScoredHeader for ExtendedHeader { - type Value = U256; - - fn score(&self) -> &U256 { self.header.difficulty() } - fn set_score(&mut self, score: U256) { self.header.set_difficulty(score) } -} - -impl ::parity_machine::TotalScoredHeader for ExtendedHeader { - type Value = U256; - - fn total_score(&self) -> U256 { self.parent_total_difficulty + *self.header.difficulty() } -} - -impl ::parity_machine::FinalizableHeader for ExtendedHeader { - fn is_finalized(&self) -> bool { self.is_finalized } +impl ExtendedHeader { + /// Returns combined difficulty of all ancestors together with the difficulty of this header. + pub fn total_score(&self) -> U256 { + self.parent_total_difficulty + *self.header.difficulty() + } } #[cfg(test)] diff --git a/ethcore/types/src/lib.rs b/ethcore/types/src/lib.rs index 4ca5c80dcf5..3223db72206 100644 --- a/ethcore/types/src/lib.rs +++ b/ethcore/types/src/lib.rs @@ -39,7 +39,6 @@ extern crate ethkey; extern crate heapsize; extern crate keccak_hash as hash; extern crate parity_bytes as bytes; -extern crate parity_machine; extern crate rlp; extern crate unexpected; diff --git a/machine/Cargo.toml b/machine/Cargo.toml deleted file mode 100644 index 2ebb5c40994..00000000000 --- a/machine/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "parity-machine" -version = "0.1.0" -description = "Generalization of a state machine for consensus engines" -authors = ["Parity Technologies "] - -[dependencies] -ethereum-types = "0.4" diff --git a/machine/src/lib.rs b/machine/src/lib.rs deleted file mode 100644 index b7054ca038e..00000000000 --- a/machine/src/lib.rs +++ /dev/null @@ -1,132 +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 . - -//! Generalization of a state machine for a consensus engine. -//! This will define traits for the header, block, and state of a blockchain. - -extern crate ethereum_types; - -use ethereum_types::{H256, U256, Address}; - -/// A header. This contains important metadata about the block, as well as a -/// "seal" that indicates validity to a consensus engine. -pub trait Header { - /// Cryptographic hash of the header, excluding the seal. - fn bare_hash(&self) -> H256; - - /// Cryptographic hash of the header, including the seal. - fn hash(&self) -> H256; - - /// Get a reference to the seal fields. - fn seal(&self) -> &[Vec]; - - /// The author of the header. - fn author(&self) -> &Address; - - /// The number of the header. - fn number(&self) -> u64; -} - -/// A header with an associated score (difficulty in PoW terms) -pub trait ScoredHeader: Header { - type Value; - - /// Get the score of this header. - fn score(&self) -> &Self::Value; - - /// Set the score of this header. - fn set_score(&mut self, score: Self::Value); -} - -/// A header with associated total score. -pub trait TotalScoredHeader: Header { - type Value; - - /// Get the total score of this header. - fn total_score(&self) -> Self::Value; -} - -/// A header with finalized information. -pub trait FinalizableHeader: Header { - /// Get whether this header is considered finalized, so that it will never be replaced in reorganization. - fn is_finalized(&self) -> bool; -} - -/// A header with metadata information. -pub trait WithMetadataHeader: Header { - /// Get the current header metadata. - fn metadata(&self) -> Option<&[u8]>; -} - -/// A "live" block is one which is in the process of the transition. -/// The state of this block can be mutated by arbitrary rules of the -/// state transition function. -pub trait LiveBlock: 'static { - /// The block header type; - type Header: Header; - - /// Get a reference to the header. - fn header(&self) -> &Self::Header; - - /// Get a reference to the uncle headers. If the block type doesn't - /// support uncles, return the empty slice. - fn uncles(&self) -> &[Self::Header]; -} - -/// Trait for blocks which have a transaction type. -pub trait Transactions: LiveBlock { - /// The transaction type. - type Transaction; - - /// Get a reference to the transactions in this block. - fn transactions(&self) -> &[Self::Transaction]; -} - -/// Generalization of types surrounding blockchain-suitable state machines. -pub trait Machine: for<'a> LocalizedMachine<'a> { - /// The block header type. - type Header: Header; - /// The live block type. - type LiveBlock: LiveBlock; - /// Block header with metadata information. - type ExtendedHeader: Header; - /// A handle to a blockchain client for this machine. - type EngineClient: ?Sized; - /// A description of needed auxiliary data. - type AuxiliaryRequest; - /// Actions taken on ancestry blocks when commiting a new block. - type AncestryAction; - - /// Errors which can occur when querying or interacting with the machine. - type Error; - - /// Get the balance, in base units, associated with an account. - /// Extracts data from the live block. - fn balance(&self, live: &Self::LiveBlock, address: &Address) -> Result; - - /// Increment the balance of an account in the state of the live block. - fn add_balance(&self, live: &mut Self::LiveBlock, address: &Address, amount: &U256) -> Result<(), Self::Error>; -} - -/// Machine-related types localized to a specific lifetime. -// TODO: this is a workaround for a lack of associated type constructors in the language. -pub trait LocalizedMachine<'a>: Sync + Send { - /// Definition of auxiliary data associated to a specific block. - type AuxiliaryData: 'a; - /// A context providing access to the state in a controlled capacity. - /// Generally also provides verifiable proofs. - type StateContext: ?Sized + 'a; -} diff --git a/scripts/gitlab/build-unix.sh b/scripts/gitlab/build-linux.sh similarity index 100% rename from scripts/gitlab/build-unix.sh rename to scripts/gitlab/build-linux.sh diff --git a/scripts/gitlab/publish-aws.sh b/scripts/gitlab/publish-aws.sh deleted file mode 100755 index 56572657bd3..00000000000 --- a/scripts/gitlab/publish-aws.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e # fail on any error -set -u # treat unset variables as error - -echo "__________Push binaries to AWS S3____________" -case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in - (beta|stable|nightly) - BUCKET=releases.parity.io/ethereum; - ;; - (*) - BUCKET=builds-parity; - ;; - esac -aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/ -echo "__________Read from S3____________" -aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/ - --recursive --human-readable --summarize diff --git a/scripts/gitlab/test-all.sh b/scripts/gitlab/rust-changes.sh similarity index 87% rename from scripts/gitlab/test-all.sh rename to scripts/gitlab/rust-changes.sh index 925124b7ac2..236a20d59ee 100755 --- a/scripts/gitlab/test-all.sh +++ b/scripts/gitlab/rust-changes.sh @@ -1,7 +1,9 @@ #!/bin/bash +echo "________Running rust_changes.sh________" set -e # fail on any error set -u # treat unset variables as error +echo "__________Checking if Rust files were changed__________" git log --graph --oneline --decorate=short -n 10 case ${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} in @@ -26,5 +28,3 @@ then fi rustup show - -exec ./test.sh diff --git a/scripts/gitlab/test-cpp.sh b/scripts/gitlab/test-cpp.sh new file mode 100755 index 00000000000..9f825ec8c70 --- /dev/null +++ b/scripts/gitlab/test-cpp.sh @@ -0,0 +1,17 @@ +#!/bin/bash +echo "________Running test-cpp.sh________" +set -e # fail on any error +set -u # treat unset variables as error +#use nproc `linux only +THREADS=$(nproc) + +echo "________Running the C++ example________" +DIR=parity-clib/examples/cpp/build +mkdir -p $DIR +cd $DIR +cmake .. +make -j $THREADS +# Note: we don't try to run the example because it tries to sync Kovan, and we don't want +# that to happen on CI +cd - +rm -rf $DIR diff --git a/scripts/gitlab/test-linux.sh b/scripts/gitlab/test-linux.sh new file mode 100755 index 00000000000..6a98d2f7bd5 --- /dev/null +++ b/scripts/gitlab/test-linux.sh @@ -0,0 +1,12 @@ +#!/bin/bash +echo "________Running test-linux.sh________" +set -e # fail on any error +set -u # treat unset variables as error + +FEATURES="json-tests,ci-skip-tests" +OPTIONS="--release" +#use nproc `linux only +THREADS=$(nproc) + +echo "________Running Parity Full Test Suite________" +time cargo test $OPTIONS --features "$FEATURES" --locked --all --target $CARGO_TARGET -- --test-threads $THREADS diff --git a/scripts/validate_chainspecs.sh b/scripts/gitlab/validate-chainspecs.sh similarity index 51% rename from scripts/validate_chainspecs.sh rename to scripts/gitlab/validate-chainspecs.sh index c350445dd9b..9b7ef39e727 100755 --- a/scripts/validate_chainspecs.sh +++ b/scripts/gitlab/validate-chainspecs.sh @@ -1,7 +1,12 @@ -#!/usr/bin/env sh +#!/bin/bash +set -e # fail on any error +set -u # treat unset variables as error +echo "________Running validate_chainspecs.sh________" ERR=0 -cargo build --release -p chainspec + +echo "________Validate chainspecs________" +time cargo build --release -p chainspec for spec in ethcore/res/*.json; do if ! ./target/release/chainspec "$spec"; then ERR=1; fi diff --git a/test.sh b/test.sh deleted file mode 100755 index e7d8e2a7890..00000000000 --- a/test.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh -# Running Parity Full Test Suite -echo "________Running test.sh________" - -FEATURES="json-tests,ci-skip-tests" -OPTIONS="--release" -VALIDATE=1 -THREADS=8 - -set -e - - -validate () { - if [ "$VALIDATE" -eq "1" ] - then - echo "________Validate build________" - time cargo check $@ --locked --no-default-features - time cargo check $@ --locked --manifest-path util/io/Cargo.toml --no-default-features - time cargo check $@ --locked --manifest-path util/io/Cargo.toml --features "mio" - - # Validate chainspecs - echo "________Validate chainspecs________" - time ./scripts/validate_chainspecs.sh - else - echo "# not validating due to \$VALIDATE!=1" - fi -} - -cpp_test () { - case $CARGO_TARGET in - (x86_64-unknown-linux-gnu) - # Running the C++ example - echo "________Running the C++ example________" - DIR=parity-clib/examples/cpp/build - mkdir -p $DIR - cd $DIR - cmake .. - make -j $THREADS - # Note: we don't try to run the example because it tries to sync Kovan, and we don't want - # that to happen on CI - cd - - rm -rf $DIR - ;; - (*) - echo "________Skipping the C++ example________" - ;; - esac -} - -cargo_test () { - echo "________Running Parity Full Test Suite________" - git submodule update --init --recursive - time cargo test $OPTIONS --features "$FEATURES" --locked --all $@ -- --test-threads $THREADS -} - - -if [ "$CARGO_TARGET" ] -then - validate --target $CARGO_TARGET -else - validate -fi - -test "${RUN_TESTS}" = "all" && cpp_test - -if [ "$CARGO_TARGET" ] -then - - case "${RUN_TESTS}" in - (cargo|all) - cargo_test --target $CARGO_TARGET $@ - ;; - ('') - cargo_test --no-run --target $CARGO_TARGET $@ - ;; - esac -else - cargo_test $@ -fi