diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 26b1cc753..ed3a3675a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -561,11 +561,9 @@ docker-build: - docker info script: - if [ "$CI_BUILD_REF_NAME" == "beta-release" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi - - docker login -u $Docker_Hub_User -p $Docker_Hub_Pass - - sh scripts/docker-build.sh $DOCKER_TAG ethcore - - docker logout + - echo "Tag:" $DOCKER_TAG - docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity - - sh scripts/docker-build.sh $DOCKER_TAG parity + - sh scripts/docker-build.sh $DOCKER_TAG - docker logout tags: - docker @@ -613,11 +611,12 @@ test-rust-stable: image: parity/rust:gitlab-ci before_script: - git submodule update --init --recursive - - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v -e ^js -e ^\\. -e ^LICENSE -e ^README.md -e ^appveyor.yml -e ^test.sh -e ^windows/ -e ^scripts/ -e^mac/ -e ^nsis/ | wc -l) + - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v -e ^js -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e^mac/ -e ^nsis/ | wc -l) script: - rustup show - export RUST_BACKTRACE=1 - if [ $RUST_FILES_MODIFIED -eq 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi + - if [ "$CI_BUILD_REF_NAME" == "nightly" ]; then sh scripts/aura-test.sh; fi tags: - rust - rust-stable diff --git a/CHANGELOG.md b/CHANGELOG.md index 29f84462d..59eb1d0b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,468 @@ +## Parity [v1.6.10](https://github.com/paritytech/parity/releases/tag/v1.6.10) (2017-07-23) + +This is a hotfix release for the stable channel addressing the recent [multi-signature wallet vulnerability](https://blog.parity.io/security-alert-high-2/). Note, upgrading is not mandatory, and all future multi-sig wallets created by any version of Parity are secure. + +All Changes: + +- Backports for stable [#6116](https://github.com/paritytech/parity/pull/6116) + - Remove chunk to restore from pending set only upon successful import [#6112](https://github.com/paritytech/parity/pull/6112) + - Blacklist bad snapshot manifest hashes upon failure [#5874](https://github.com/paritytech/parity/pull/5874) + - Bump snap version and tweak importing detection logic [#6079](https://github.com/paritytech/parity/pull/6079) (modified to work) +- Fix docker build for stable [#6118](https://github.com/paritytech/parity/pull/6118) +- Backported wallet fix [#6104](https://github.com/paritytech/parity/pull/6104) + - Fix initialisation bug. ([#6102](https://github.com/paritytech/parity/pull/6102)) + - Update wallet library modifiers ([#6103](https://github.com/paritytech/parity/pull/6103)) +- Bump to v1.6.10 + +## Parity [v1.7.0](https://github.com/paritytech/parity/releases/tag/v1.7.0) (2017-07-23) + +Parity 1.7.0 is a major release introducing several important features: + +- **Experimental [Light client](https://github.com/paritytech/parity/wiki/The-Parity-Light-Protocol-(PIP)) support**. Start Parity with `--light` to enable light mode. +- **Experimental web wallet**. A hosted version of Parity that keeps the keys and signs transactions using your browser storage. Try it at https://wallet.parity.io or run your own with `--public-node`. +- **WASM contract support**. Private networks can run contracts compiled into WASM bytecode. _More information and documentation to follow_. +- **DApps and RPC server merge**. DApp and RPC are now available through a single API endpoint. DApp server related settings are deprecated. +- **Export accounts from the wallet**. Backing up your keys can now simply be managed through the wallet interface. +- **PoA/Kovan validator set contract**. The PoA network validator-set management via smart contract is now supported by warp and light sync. +- **PubSub API**. https://github.com/paritytech/parity/wiki/JSONRPC-Parity-Pub-Sub-module +- **Signer apps for IOS and Android**. + +Full list of included changes: + +- Check QR before lowercase ([#6119](https://github.com/paritytech/parity/pull/6119)) [#6120](https://github.com/paritytech/parity/pull/6120) +- Remove chunk to restore from pending set only upon successful import [#6117](https://github.com/paritytech/parity/pull/6117) +- Fixed node address detection on incoming connection [#6094](https://github.com/paritytech/parity/pull/6094) +- Place RETURNDATA behind block number gate [#6095](https://github.com/paritytech/parity/pull/6095) +- Backported wallet fix [#6105](https://github.com/paritytech/parity/pull/6105) + - Fix initialisation bug. ([#6102](https://github.com/paritytech/parity/pull/6102)) + - Update wallet library modifiers ([#6103](https://github.com/paritytech/parity/pull/6103)) +- Bump snap version and tweak importing detection logic ([#6079](https://github.com/paritytech/parity/pull/6079)) [#6081](https://github.com/paritytech/parity/pull/6081) + - bump last tick just before printing info and restore sync detection + - bump kovan snapshot version + - Fixed sync tests + - Fixed rpc tests +- Acquire client report under lock in informant [#6071](https://github.com/paritytech/parity/pull/6071) +- Show busy indicator on Address forget [#6069](https://github.com/paritytech/parity/pull/6069) +- Add CSP for worker-src ([#6059](https://github.com/paritytech/parity/pull/6059)) [#6064](https://github.com/paritytech/parity/pull/6064) + - Specify worker-src seperately, add blob + - Upgrade react-qr-scan to latest version +- Set release channel to beta +- Limit transaction queue memory & limit future queue [#6038](https://github.com/paritytech/parity/pull/6038) +- Fix CI build issue [#6050](https://github.com/paritytech/parity/pull/6050) +- New contract PoA sync fixes [#5991](https://github.com/paritytech/parity/pull/5991) +- Fixed link to Multisig Contract Wallet on master [#5984](https://github.com/paritytech/parity/pull/5984) +- Ethcore crate split part 1 [#6041](https://github.com/paritytech/parity/pull/6041) +- Fix status icon [#6039](https://github.com/paritytech/parity/pull/6039) +- Errors & warnings for inappropriate RPCs [#6029](https://github.com/paritytech/parity/pull/6029) +- Add missing CSP for web3.site [#5992](https://github.com/paritytech/parity/pull/5992) +- Remove cargo install --git from README.md [#6037](https://github.com/paritytech/parity/pull/6037) +- Node Health warnings [#5951](https://github.com/paritytech/parity/pull/5951) +- RPC cpu pool [#6023](https://github.com/paritytech/parity/pull/6023) +- Use crates.io dependencies for parity-wasm [#6036](https://github.com/paritytech/parity/pull/6036) +- Add test for loading the chain specs [#6028](https://github.com/paritytech/parity/pull/6028) +- Whitelist APIs for generic Pub-Sub [#5840](https://github.com/paritytech/parity/pull/5840) +- WASM contracts MVP [#5679](https://github.com/paritytech/parity/pull/5679) +- Fix valid QR scan not advancing [#6033](https://github.com/paritytech/parity/pull/6033) +- --reseal-on-uncle [#5940](https://github.com/paritytech/parity/pull/5940) +- Support comments in reserved peers file ([#6004](https://github.com/paritytech/parity/pull/6004)) [#6012](https://github.com/paritytech/parity/pull/6012) +- Add new md tnc [#5937](https://github.com/paritytech/parity/pull/5937) +- Fix output of parity-evm in case of bad instruction [#5955](https://github.com/paritytech/parity/pull/5955) +- Don't send notifications to unsubscribed clients of PubSub [#5960](https://github.com/paritytech/parity/pull/5960) +- Proper light client informant and more verification of imported headers [#5897](https://github.com/paritytech/parity/pull/5897) +- New Kovan bootnodes [#6017](https://github.com/paritytech/parity/pull/6017) +- Use standard paths for Ethash cache [#5881](https://github.com/paritytech/parity/pull/5881) +- Defer code hash calculation. [#5959](https://github.com/paritytech/parity/pull/5959) +- Fix first run wizard. [#6000](https://github.com/paritytech/parity/pull/6000) +- migration to serde 1.0 [#5996](https://github.com/paritytech/parity/pull/5996) +- SecretStore: generating signatures [#5764](https://github.com/paritytech/parity/pull/5764) +- bigint upgraded to version 3.0 [#5986](https://github.com/paritytech/parity/pull/5986) +- config: don't allow dev chain with force sealing option [#5965](https://github.com/paritytech/parity/pull/5965) +- Update lockfile for miniz-sys and gcc [#5969](https://github.com/paritytech/parity/pull/5969) +- Clean up function naming in RPC error module [#5995](https://github.com/paritytech/parity/pull/5995) +- Fix underflow in gas calculation [#5975](https://github.com/paritytech/parity/pull/5975) +- PubSub for parity-js [#5830](https://github.com/paritytech/parity/pull/5830) +- Report whether a peer was kept from `Handler::on_connect` [#5958](https://github.com/paritytech/parity/pull/5958) +- Implement skeleton for transaction index and epoch transition proof PIP messages [#5908](https://github.com/paritytech/parity/pull/5908) +- TransactionQueue improvements [#5917](https://github.com/paritytech/parity/pull/5917) +- constant time HMAC comparison and clarify docs in ethkey [#5952](https://github.com/paritytech/parity/pull/5952) +- Avoid pre-computing jump destinations [#5954](https://github.com/paritytech/parity/pull/5954) +- Upgrade elastic array [#5949](https://github.com/paritytech/parity/pull/5949) +- PoA: Wait for transition finality before applying [#5774](https://github.com/paritytech/parity/pull/5774) +- Logs Pub-Sub [#5705](https://github.com/paritytech/parity/pull/5705) +- Add the command to install the parity snap [#5945](https://github.com/paritytech/parity/pull/5945) +- Reduce unnecessary allocations [#5944](https://github.com/paritytech/parity/pull/5944) +- Clarify confusing messages. [#5935](https://github.com/paritytech/parity/pull/5935) +- Content Security Policy [#5790](https://github.com/paritytech/parity/pull/5790) +- CLI: Export error message and less verbose peer counter. [#5870](https://github.com/paritytech/parity/pull/5870) +- network: make it more explicit about StreamToken and TimerToken [#5939](https://github.com/paritytech/parity/pull/5939) +- sync: make it more idiomatic rust [#5938](https://github.com/paritytech/parity/pull/5938) +- Prioritize accounts over address book [#5909](https://github.com/paritytech/parity/pull/5909) +- Fixing failing compilation of RPC test on master. [#5916](https://github.com/paritytech/parity/pull/5916) +- Empty local middleware, until explicitly requested [#5912](https://github.com/paritytech/parity/pull/5912) +- Cancel propagated TX [#5899](https://github.com/paritytech/parity/pull/5899) +- fix minor race condition in aura seal generation [#5910](https://github.com/paritytech/parity/pull/5910) +- Docs for Pub-Sub, optional parameter for parity_subscribe [#5833](https://github.com/paritytech/parity/pull/5833) +- Fix gas editor doubling-up on gas [#5820](https://github.com/paritytech/parity/pull/5820) +- Information about used paths added to general output block [#5904](https://github.com/paritytech/parity/pull/5904) +- Domain-locked web tokens. [#5894](https://github.com/paritytech/parity/pull/5894) +- Removed panic handlers [#5895](https://github.com/paritytech/parity/pull/5895) +- Latest changes from Rust RocksDB binding merged [#5905](https://github.com/paritytech/parity/pull/5905) +- Adjust keyethereum/secp256 aliasses [#5903](https://github.com/paritytech/parity/pull/5903) +- Keyethereum fs dependency [#5902](https://github.com/paritytech/parity/pull/5902) +- Ethereum Classic Monetary Policy [#5741](https://github.com/paritytech/parity/pull/5741) +- Initial token should allow full access. [#5873](https://github.com/paritytech/parity/pull/5873) +- Fixed account selection for Dapps on public node [#5856](https://github.com/paritytech/parity/pull/5856) +- blacklist bad snapshot manifest hashes upon failure [#5874](https://github.com/paritytech/parity/pull/5874) +- Fix wrongly called timeouts [#5838](https://github.com/paritytech/parity/pull/5838) +- ArchiveDB and other small fixes [#5867](https://github.com/paritytech/parity/pull/5867) +- convert try!() to ? [#5866](https://github.com/paritytech/parity/pull/5866) +- Make config file optional in systemd [#5847](https://github.com/paritytech/parity/pull/5847) +- EIP-116 (214), [#4833](https://github.com/paritytech/parity/issues/4833) [#4851](https://github.com/paritytech/parity/pull/4851) +- all executables are workspace members [#5865](https://github.com/paritytech/parity/pull/5865) +- minor optimizations of the modexp builtin [#5860](https://github.com/paritytech/parity/pull/5860) +- three small commits for HashDB and MemoryDB [#5766](https://github.com/paritytech/parity/pull/5766) +- use rust 1.18's retain to boost the purge performance [#5801](https://github.com/paritytech/parity/pull/5801) +- Allow IPFS server to accept POST requests [#5858](https://github.com/paritytech/parity/pull/5858) +- Dutch i18n from [#5802](https://github.com/paritytech/parity/issues/5802) for master [#5836](https://github.com/paritytech/parity/pull/5836) +- Typos in token deploy dapp ui [#5851](https://github.com/paritytech/parity/pull/5851) +- A CLI flag to allow fast transaction signing when account is unlocked. [#5778](https://github.com/paritytech/parity/pull/5778) +- Removing `additional` field from EVM instructions [#5821](https://github.com/paritytech/parity/pull/5821) +- Don't fail on wrong log decoding [#5813](https://github.com/paritytech/parity/pull/5813) +- Use randomized subscription ids for PubSub [#5756](https://github.com/paritytech/parity/pull/5756) +- Fixed mem write for empty slice [#5827](https://github.com/paritytech/parity/pull/5827) +- Fix party technologies [#5810](https://github.com/paritytech/parity/pull/5810) +- Revert "Fixed mem write for empty slice" [#5826](https://github.com/paritytech/parity/pull/5826) +- Fixed mem write for empty slice [#5825](https://github.com/paritytech/parity/pull/5825) +- Fix JS tests [#5822](https://github.com/paritytech/parity/pull/5822) +- Bump native-tls and openssl crates. [#5817](https://github.com/paritytech/parity/pull/5817) +- Public node using WASM [#5734](https://github.com/paritytech/parity/pull/5734) +- enforce block signer == author field in PoA [#5808](https://github.com/paritytech/parity/pull/5808) +- Fix stack display in evmbin. [#5733](https://github.com/paritytech/parity/pull/5733) +- Disable UI if it's not compiled in. [#5773](https://github.com/paritytech/parity/pull/5773) +- Require phrase confirmation. [#5731](https://github.com/paritytech/parity/pull/5731) +- Duration limit made optional for EthashParams [#5777](https://github.com/paritytech/parity/pull/5777) +- Update Changelog for 1.6.8 [#5798](https://github.com/paritytech/parity/pull/5798) +- Replace Ethcore comany name in T&C and some other places [#5796](https://github.com/paritytech/parity/pull/5796) +- PubSub for IPC. [#5800](https://github.com/paritytech/parity/pull/5800) +- Fix terminology distributed -> decentralized applications [#5797](https://github.com/paritytech/parity/pull/5797) +- Disable compression for RLP strings [#5786](https://github.com/paritytech/parity/pull/5786) +- update the source for the snapcraft package [#5781](https://github.com/paritytech/parity/pull/5781) +- Fixed default UI port for mac installer [#5782](https://github.com/paritytech/parity/pull/5782) +- Block invalid account name creation [#5784](https://github.com/paritytech/parity/pull/5784) +- Update Cid/multihash/ring/tinykeccak [#5785](https://github.com/paritytech/parity/pull/5785) +- use NULL_RLP, remove NULL_RLP_STATIC [#5742](https://github.com/paritytech/parity/pull/5742) +- Blacklist empty phrase account. [#5730](https://github.com/paritytech/parity/pull/5730) +- EIP-211 RETURNDATACOPY and RETURNDATASIZE [#5678](https://github.com/paritytech/parity/pull/5678) +- Bump mio [#5763](https://github.com/paritytech/parity/pull/5763) +- Fixing UI issues after UI server refactor [#5710](https://github.com/paritytech/parity/pull/5710) +- Fix WS server expose issue. [#5728](https://github.com/paritytech/parity/pull/5728) +- Fix local transactions without condition. [#5716](https://github.com/paritytech/parity/pull/5716) +- Bump parity-wordlist. [#5748](https://github.com/paritytech/parity/pull/5748) +- two small changes in evm [#5700](https://github.com/paritytech/parity/pull/5700) +- Evmbin: JSON format printing pre-state. [#5712](https://github.com/paritytech/parity/pull/5712) +- Recover from empty phrase in dev mode [#5698](https://github.com/paritytech/parity/pull/5698) +- EIP-210 BLOCKHASH changes [#5505](https://github.com/paritytech/parity/pull/5505) +- fixes typo [#5708](https://github.com/paritytech/parity/pull/5708) +- Bump rocksdb [#5707](https://github.com/paritytech/parity/pull/5707) +- Fixed --datadir option [#5697](https://github.com/paritytech/parity/pull/5697) +- rpc -> weak to arc [#5688](https://github.com/paritytech/parity/pull/5688) +- typo fix [#5699](https://github.com/paritytech/parity/pull/5699) +- Revamping parity-evmbin [#5696](https://github.com/paritytech/parity/pull/5696) +- Update dependencies and bigint api [#5685](https://github.com/paritytech/parity/pull/5685) +- UI server refactoring [#5580](https://github.com/paritytech/parity/pull/5580) +- Fix from/into electrum in ethkey [#5686](https://github.com/paritytech/parity/pull/5686) +- Add unit tests [#5668](https://github.com/paritytech/parity/pull/5668) +- Guanqun add unit tests [#5671](https://github.com/paritytech/parity/pull/5671) +- Parity-PubSub as a separate API. [#5676](https://github.com/paritytech/parity/pull/5676) +- EIP-140 REVERT opcode [#5477](https://github.com/paritytech/parity/pull/5477) +- Update CHANGELOG for 1.6.7 [#5683](https://github.com/paritytech/parity/pull/5683) +- Updated docs slightly. [#5674](https://github.com/paritytech/parity/pull/5674) +- Fix build [#5684](https://github.com/paritytech/parity/pull/5684) +- Back-references for the on-demand service [#5573](https://github.com/paritytech/parity/pull/5573) +- Dynamically adjust PIP request costs based on gathered data [#5603](https://github.com/paritytech/parity/pull/5603) +- use cargo workspace [#5601](https://github.com/paritytech/parity/pull/5601) +- Latest headers Pub-Sub [#5655](https://github.com/paritytech/parity/pull/5655) +- improved dockerfile builds [#5659](https://github.com/paritytech/parity/pull/5659) +- Adding CLI options: port shift and unsafe expose. [#5677](https://github.com/paritytech/parity/pull/5677) +- Report missing author in Aura [#5583](https://github.com/paritytech/parity/pull/5583) +- typo fix [#5669](https://github.com/paritytech/parity/pull/5669) +- Remove public middleware (temporary) [#5665](https://github.com/paritytech/parity/pull/5665) +- Remove additional polyfill [#5663](https://github.com/paritytech/parity/pull/5663) +- Importing accounts from files. [#5644](https://github.com/paritytech/parity/pull/5644) +- remove the deprecated options in rustfmt.toml [#5616](https://github.com/paritytech/parity/pull/5616) +- Update the Console dapp [#5602](https://github.com/paritytech/parity/pull/5602) +- Create an account for chain=dev [#5612](https://github.com/paritytech/parity/pull/5612) +- Use babel-runtime as opposed to babel-polyfill [#5662](https://github.com/paritytech/parity/pull/5662) +- Connection dialog timestamp info [#5554](https://github.com/paritytech/parity/pull/5554) +- use copy_from_slice instead of for loop [#5647](https://github.com/paritytech/parity/pull/5647) +- Light friendly dapps [#5634](https://github.com/paritytech/parity/pull/5634) +- Add Recover button to Accounts and warnings [#5645](https://github.com/paritytech/parity/pull/5645) +- Update eth_sign docs. [#5631](https://github.com/paritytech/parity/pull/5631) +- Proper signer Pub-Sub for pending requests. [#5594](https://github.com/paritytech/parity/pull/5594) +- Bump bigint to 1.0.5 [#5641](https://github.com/paritytech/parity/pull/5641) +- PoA warp implementation [#5488](https://github.com/paritytech/parity/pull/5488) +- Improve on-demand dispatch and add support for batch requests [#5419](https://github.com/paritytech/parity/pull/5419) +- Use default account for sending transactions [#5588](https://github.com/paritytech/parity/pull/5588) +- Add peer management to the Status tab [#5566](https://github.com/paritytech/parity/pull/5566) +- Add monotonic step transition [#5587](https://github.com/paritytech/parity/pull/5587) +- Decrypting for external accounts. [#5581](https://github.com/paritytech/parity/pull/5581) +- only enable warp sync when engine supports it [#5595](https://github.com/paritytech/parity/pull/5595) +- fix the doc of installing rust [#5586](https://github.com/paritytech/parity/pull/5586) +- Small fixes [#5584](https://github.com/paritytech/parity/pull/5584) +- SecretStore: remove session on master node [#5545](https://github.com/paritytech/parity/pull/5545) +- run-clean [#5607](https://github.com/paritytech/parity/pull/5607) +- relicense RLP to MIT/Apache2 [#5591](https://github.com/paritytech/parity/pull/5591) +- Fix eth_sign signature encoding. [#5597](https://github.com/paritytech/parity/pull/5597) +- Check pending request on Node local transactions [#5564](https://github.com/paritytech/parity/pull/5564) +- Add tooltips on ActionBar [#5562](https://github.com/paritytech/parity/pull/5562) +- Can't deploy without compiling Contract [#5593](https://github.com/paritytech/parity/pull/5593) +- Add a warning when node is syncing [#5565](https://github.com/paritytech/parity/pull/5565) +- Update registry middleware [#5585](https://github.com/paritytech/parity/pull/5585) +- Set block condition to BigNumber in MethodDecoding [#5592](https://github.com/paritytech/parity/pull/5592) +- Load the sources immediately in Contract Dev [#5575](https://github.com/paritytech/parity/pull/5575) +- Remove formal verification messages in Dev Contract [#5574](https://github.com/paritytech/parity/pull/5574) +- Fix event params decoding when no names for parameters [#5567](https://github.com/paritytech/parity/pull/5567) +- Do not convert to Dates twice [#5563](https://github.com/paritytech/parity/pull/5563) +- Fix Multisig wallet settings [#5560](https://github.com/paritytech/parity/pull/5560) +- Typo [#5547](https://github.com/paritytech/parity/pull/5547) +- Generic PubSub implementation [#5456](https://github.com/paritytech/parity/pull/5456) +- Fix CI paths. [#5570](https://github.com/paritytech/parity/pull/5570) +- reorg into blocks before minimum history [#5558](https://github.com/paritytech/parity/pull/5558) +- EIP-86 update [#5506](https://github.com/paritytech/parity/pull/5506) +- Secretstore RPCs + integration [#5439](https://github.com/paritytech/parity/pull/5439) +- Fixes Parity Bar position [#5557](https://github.com/paritytech/parity/pull/5557) +- Fixes invalid log in BadgeReg events [#5556](https://github.com/paritytech/parity/pull/5556) +- Fix issues in Contract Development view [#5555](https://github.com/paritytech/parity/pull/5555) +- Added missing methods [#5542](https://github.com/paritytech/parity/pull/5542) +- option to disable persistent txqueue [#5544](https://github.com/paritytech/parity/pull/5544) +- Bump jsonrpc [#5552](https://github.com/paritytech/parity/pull/5552) +- Retrieve block headers only for header-only info [#5480](https://github.com/paritytech/parity/pull/5480) +- add snap to CI [#5519](https://github.com/paritytech/parity/pull/5519) +- Pass additional data when reporting [#5527](https://github.com/paritytech/parity/pull/5527) +- Calculate post-constructors state root in spec at load time [#5523](https://github.com/paritytech/parity/pull/5523) +- Fix utf8 decoding [#5533](https://github.com/paritytech/parity/pull/5533) +- Add CHANGELOG.md [#5513](https://github.com/paritytech/parity/pull/5513) +- Change all occurrences of ethcore.io into parity.io [#5528](https://github.com/paritytech/parity/pull/5528) +- Memory usage optimization [#5526](https://github.com/paritytech/parity/pull/5526) +- Compose transaction RPC. [#5524](https://github.com/paritytech/parity/pull/5524) +- Support external eth_sign [#5481](https://github.com/paritytech/parity/pull/5481) +- Treat block numbers as strings, not BigNums. [#5449](https://github.com/paritytech/parity/pull/5449) +- npm cleanups [#5512](https://github.com/paritytech/parity/pull/5512) +- Export acc js [#4973](https://github.com/paritytech/parity/pull/4973) +- YARN [#5395](https://github.com/paritytech/parity/pull/5395) +- Fix linting issues [#5511](https://github.com/paritytech/parity/pull/5511) +- Chinese Translation [#5460](https://github.com/paritytech/parity/pull/5460) +- Fixing secretstore TODOs - part 2 [#5416](https://github.com/paritytech/parity/pull/5416) +- fix json format of state snapshot [#5504](https://github.com/paritytech/parity/pull/5504) +- Bump jsonrpc version [#5489](https://github.com/paritytech/parity/pull/5489) +- Groundwork for generalized warp sync [#5454](https://github.com/paritytech/parity/pull/5454) +- Add the packaging metadata to build the parity snap [#5496](https://github.com/paritytech/parity/pull/5496) +- Cancel tx JS [#4958](https://github.com/paritytech/parity/pull/4958) +- EIP-212 (bn128 curve pairing) [#5307](https://github.com/paritytech/parity/pull/5307) +- fix panickers in tree-route [#5479](https://github.com/paritytech/parity/pull/5479) +- Update links to etherscan.io [#5455](https://github.com/paritytech/parity/pull/5455) +- Refresh UI on nodeKind changes, e.g. personal -> public [#5312](https://github.com/paritytech/parity/pull/5312) +- Correct contract address for EIP-86 [#5473](https://github.com/paritytech/parity/pull/5473) +- Force two decimals for USD conversion rate [#5471](https://github.com/paritytech/parity/pull/5471) +- Refactoring of Tokens & Balances [#5372](https://github.com/paritytech/parity/pull/5372) +- Background-repeat round [#5475](https://github.com/paritytech/parity/pull/5475) +- nl i18n updated [#5461](https://github.com/paritytech/parity/pull/5461) +- Show ETH value (even 0) if ETH transfer in transaction list [#5406](https://github.com/paritytech/parity/pull/5406) +- Store the pending requests per network version [#5405](https://github.com/paritytech/parity/pull/5405) +- Use in-memory database for tests [#5451](https://github.com/paritytech/parity/pull/5451) +- WebSockets RPC server [#5425](https://github.com/paritytech/parity/pull/5425) +- Added missing docs [#5452](https://github.com/paritytech/parity/pull/5452) +- Tests and tweaks for public node middleware [#5417](https://github.com/paritytech/parity/pull/5417) +- Fix removal of hash-mismatched files. [#5440](https://github.com/paritytech/parity/pull/5440) +- parity_getBlockHeaderByNumber and LightFetch utility [#5383](https://github.com/paritytech/parity/pull/5383) +- New state tests [#5418](https://github.com/paritytech/parity/pull/5418) +- Fix buffer length for QR code gen. [#5447](https://github.com/paritytech/parity/pull/5447) +- Add raw hash signing [#5423](https://github.com/paritytech/parity/pull/5423) +- Filters and block RPCs for the light client [#5320](https://github.com/paritytech/parity/pull/5320) +- Work around mismatch for QR checksum [#5374](https://github.com/paritytech/parity/pull/5374) +- easy to use conversion from and to string for ethstore::Crypto [#5437](https://github.com/paritytech/parity/pull/5437) +- Tendermint fixes [#5415](https://github.com/paritytech/parity/pull/5415) +- Adrianbrink lightclientcache branch. [#5428](https://github.com/paritytech/parity/pull/5428) +- Add caching to HeaderChain struct [#5403](https://github.com/paritytech/parity/pull/5403) +- Add decryption to the UI (in the Signer) [#5422](https://github.com/paritytech/parity/pull/5422) +- Add CIDv0 RPC [#5414](https://github.com/paritytech/parity/pull/5414) +- Updating documentation for RPCs [#5392](https://github.com/paritytech/parity/pull/5392) +- Fixing secretstore TODOs - part 1 [#5386](https://github.com/paritytech/parity/pull/5386) +- Fixing disappearing content. [#5399](https://github.com/paritytech/parity/pull/5399) +- Snapshot chunks packed by size [#5318](https://github.com/paritytech/parity/pull/5318) +- APIs wildcards and simple arithmetic. [#5402](https://github.com/paritytech/parity/pull/5402) +- Fixing compilation without dapps. [#5410](https://github.com/paritytech/parity/pull/5410) +- Don't use port 8080 anymore [#5397](https://github.com/paritytech/parity/pull/5397) +- Quick'n'dirty CLI for the light client [#5002](https://github.com/paritytech/parity/pull/5002) +- set gas limit before proving transactions [#5401](https://github.com/paritytech/parity/pull/5401) +- Public node: perf and fixes [#5390](https://github.com/paritytech/parity/pull/5390) +- Straight download path in the readme [#5393](https://github.com/paritytech/parity/pull/5393) +- On-chain ACL checker for secretstore [#5015](https://github.com/paritytech/parity/pull/5015) +- Allow empty-encoded values from QR encoding [#5385](https://github.com/paritytech/parity/pull/5385) +- Update npm build for new inclusions [#5381](https://github.com/paritytech/parity/pull/5381) +- Fix for Ubuntu Dockerfile [#5356](https://github.com/paritytech/parity/pull/5356) +- Secretstore over network [#4974](https://github.com/paritytech/parity/pull/4974) +- Dapps and RPC server merge [#5365](https://github.com/paritytech/parity/pull/5365) +- trigger js build release [#5379](https://github.com/paritytech/parity/pull/5379) +- Update expanse json with fork at block 600000 [#5351](https://github.com/paritytech/parity/pull/5351) +- Futures-based native wrappers for contract ABIs [#5341](https://github.com/paritytech/parity/pull/5341) +- Kovan warp sync fixed [#5337](https://github.com/paritytech/parity/pull/5337) +- Aura eip155 validation transition [#5362](https://github.com/paritytech/parity/pull/5362) +- Shared wordlist for brain wallets [#5331](https://github.com/paritytech/parity/pull/5331) +- Allow signing via Qr [#4881](https://github.com/paritytech/parity/pull/4881) +- Allow entry of url or hash for DappReg meta [#5360](https://github.com/paritytech/parity/pull/5360) +- Adjust tx overlay colours [#5353](https://github.com/paritytech/parity/pull/5353) +- Add ability to disallow API subscriptions [#5366](https://github.com/paritytech/parity/pull/5366) +- EIP-213 (bn128 curve operations) [#4999](https://github.com/paritytech/parity/pull/4999) +- Fix analize output file name [#5357](https://github.com/paritytech/parity/pull/5357) +- Add default eip155 validation [#5346](https://github.com/paritytech/parity/pull/5346) +- Add new seed nodes for Classic chain [#5345](https://github.com/paritytech/parity/pull/5345) +- Shared wordlist for frontend [#5336](https://github.com/paritytech/parity/pull/5336) +- fix rpc tests [#5338](https://github.com/paritytech/parity/pull/5338) +- Public node with accounts and signing in Frontend [#5304](https://github.com/paritytech/parity/pull/5304) +- Rename Status/Status -> Status/NodeStatus [#5332](https://github.com/paritytech/parity/pull/5332) +- Updating paths to repos. [#5330](https://github.com/paritytech/parity/pull/5330) +- Separate status for canceled local transactions. [#5319](https://github.com/paritytech/parity/pull/5319) +- Cleanup the Status View [#5317](https://github.com/paritytech/parity/pull/5317) +- Update UI minimised requests [#5324](https://github.com/paritytech/parity/pull/5324) +- Order signer transactions FIFO [#5321](https://github.com/paritytech/parity/pull/5321) +- updating dependencies [#5028](https://github.com/paritytech/parity/pull/5028) +- Minimise transactions progress [#4942](https://github.com/paritytech/parity/pull/4942) +- Fix eth_sign showing as wallet account [#5309](https://github.com/paritytech/parity/pull/5309) +- Ropsten revival [#5302](https://github.com/paritytech/parity/pull/5302) +- Strict validation transitions [#4988](https://github.com/paritytech/parity/pull/4988) +- Fix default list sorting [#5303](https://github.com/paritytech/parity/pull/5303) +- Use unique owners for multisig wallets [#5298](https://github.com/paritytech/parity/pull/5298) +- Copy all existing i18n strings into zh (as-is translation aid) [#5305](https://github.com/paritytech/parity/pull/5305) +- Fix booleans in Typedinput [#5295](https://github.com/paritytech/parity/pull/5295) +- node kind RPC [#5025](https://github.com/paritytech/parity/pull/5025) +- Fix the use of MobX in playground [#5294](https://github.com/paritytech/parity/pull/5294) +- Fine grained snapshot chunking [#5019](https://github.com/paritytech/parity/pull/5019) +- Add lint:i18n to find missing & extra keys [#5290](https://github.com/paritytech/parity/pull/5290) +- Scaffolding for zh translations, including first-round by @btceth [#5289](https://github.com/paritytech/parity/pull/5289) +- JS package bumps [#5287](https://github.com/paritytech/parity/pull/5287) +- Auto-extract new i18n strings (update) [#5288](https://github.com/paritytech/parity/pull/5288) +- eip100b [#5027](https://github.com/paritytech/parity/pull/5027) +- Set earliest era in snapshot restoration [#5021](https://github.com/paritytech/parity/pull/5021) +- Avoid clogging up tmp when updater dir has bad permissions. [#5024](https://github.com/paritytech/parity/pull/5024) +- Resilient warp sync [#5018](https://github.com/paritytech/parity/pull/5018) +- Create webpack analysis files (size) [#5009](https://github.com/paritytech/parity/pull/5009) +- Dispatch an open event on drag of Parity Bar [#4987](https://github.com/paritytech/parity/pull/4987) +- Various installer and tray apps fixes [#4970](https://github.com/paritytech/parity/pull/4970) +- Export account RPC [#4967](https://github.com/paritytech/parity/pull/4967) +- Switching ValidatorSet [#4961](https://github.com/paritytech/parity/pull/4961) +- Implement PIP messages, request builder, and handlers [#4945](https://github.com/paritytech/parity/pull/4945) +- auto lint [#5003](https://github.com/paritytech/parity/pull/5003) +- Fix FireFox overflows [#5000](https://github.com/paritytech/parity/pull/5000) +- Show busy indicator, focus first field in password change [#4997](https://github.com/paritytech/parity/pull/4997) +- Consistent store naming in the Signer components [#4996](https://github.com/paritytech/parity/pull/4996) +- second (and last) part of rlp refactor [#4901](https://github.com/paritytech/parity/pull/4901) +- Double click to select account creation type [#4986](https://github.com/paritytech/parity/pull/4986) +- Fixes to the Registry dapp [#4984](https://github.com/paritytech/parity/pull/4984) +- Extend api.util [#4979](https://github.com/paritytech/parity/pull/4979) +- Updating JSON-RPC crates [#4934](https://github.com/paritytech/parity/pull/4934) +- splitting part of util into smaller crates [#4956](https://github.com/paritytech/parity/pull/4956) +- Updating syntex et al [#4983](https://github.com/paritytech/parity/pull/4983) +- EIP198 and built-in activation [#4926](https://github.com/paritytech/parity/pull/4926) +- Fix MethodDecoding for Arrays [#4977](https://github.com/paritytech/parity/pull/4977) +- Try to fix WS race condition connection [#4976](https://github.com/paritytech/parity/pull/4976) +- eth_sign where account === undefined [#4964](https://github.com/paritytech/parity/pull/4964) +- Fix references to api outside of `parity.js` [#4981](https://github.com/paritytech/parity/pull/4981) +- Fix Password Dialog form overflow [#4968](https://github.com/paritytech/parity/pull/4968) +- Changing Mutex into RwLock for transaction queue [#4951](https://github.com/paritytech/parity/pull/4951) +- Disable max seal period for external sealing [#4927](https://github.com/paritytech/parity/pull/4927) +- Attach hardware wallets already in addressbook [#4912](https://github.com/paritytech/parity/pull/4912) +- rlp serialization refactor [#4873](https://github.com/paritytech/parity/pull/4873) +- Bump nanomsg [#4965](https://github.com/paritytech/parity/pull/4965) +- Fixed multi-chunk ledger transactions on windows [#4960](https://github.com/paritytech/parity/pull/4960) +- Fix outputs in Contract Constant Queries [#4953](https://github.com/paritytech/parity/pull/4953) +- systemd: Start parity after network.target [#4952](https://github.com/paritytech/parity/pull/4952) +- Remove transaction RPC [#4949](https://github.com/paritytech/parity/pull/4949) +- Swap out ethcore.io url for parity.io [#4947](https://github.com/paritytech/parity/pull/4947) +- Don't remove confirmed requests to early. [#4933](https://github.com/paritytech/parity/pull/4933) +- Ensure sealing work enabled in miner once subscribers added [#4930](https://github.com/paritytech/parity/pull/4930) +- Add z-index to small modals as well [#4923](https://github.com/paritytech/parity/pull/4923) +- Bump nanomsg [#4946](https://github.com/paritytech/parity/pull/4946) +- Bumping multihash and libc [#4943](https://github.com/paritytech/parity/pull/4943) +- Edit ETH value, gas and gas price in Contract Deployment [#4919](https://github.com/paritytech/parity/pull/4919) +- Add ability to configure Secure API [#4922](https://github.com/paritytech/parity/pull/4922) +- Add Token image from URL [#4916](https://github.com/paritytech/parity/pull/4916) +- Use the registry fee in Token Deployment dapp [#4915](https://github.com/paritytech/parity/pull/4915) +- Add reseal max period [#4903](https://github.com/paritytech/parity/pull/4903) +- Detect rust compiler version in Parity build script, closes 4742 [#4907](https://github.com/paritytech/parity/pull/4907) +- Add Vaults logic to First Run [#4914](https://github.com/paritytech/parity/pull/4914) +- Updated gcc and rayon crates to remove outdated num_cpus dependency [#4909](https://github.com/paritytech/parity/pull/4909) +- Renaming evm binary to avoid conflicts. [#4899](https://github.com/paritytech/parity/pull/4899) +- Better error handling for traces RPC [#4849](https://github.com/paritytech/parity/pull/4849) +- Safari SectionList fix [#4895](https://github.com/paritytech/parity/pull/4895) +- Safari Dialog scrolling fix [#4893](https://github.com/paritytech/parity/pull/4893) +- Spelling :) [#4900](https://github.com/paritytech/parity/pull/4900) +- Additional kovan params [#4892](https://github.com/paritytech/parity/pull/4892) +- trigger js-precompiled build [#4898](https://github.com/paritytech/parity/pull/4898) +- Recalculate receipt roots in close_and_lock [#4884](https://github.com/paritytech/parity/pull/4884) +- Reload UI on network switch [#4864](https://github.com/paritytech/parity/pull/4864) +- Update parity-ui-precompiled with branch [#4850](https://github.com/paritytech/parity/pull/4850) +- OSX Installer is no longer experimental [#4882](https://github.com/paritytech/parity/pull/4882) +- Chain-selection from UI [#4859](https://github.com/paritytech/parity/pull/4859) +- removed redundant (and unused) FromJson trait [#4871](https://github.com/paritytech/parity/pull/4871) +- fix typos and grammar [#4880](https://github.com/paritytech/parity/pull/4880) +- Remove old experimental remote-db code [#4872](https://github.com/paritytech/parity/pull/4872) +- removed redundant FixedHash trait, fixes [#4029](https://github.com/paritytech/parity/issues/4029) [#4866](https://github.com/paritytech/parity/pull/4866) +- Reference JSON-RPC more changes-friendly [#4870](https://github.com/paritytech/parity/pull/4870) +- Better handling of Solidity compliation [#4860](https://github.com/paritytech/parity/pull/4860) +- Go through contract links in Transaction List display [#4863](https://github.com/paritytech/parity/pull/4863) +- Fix Gas Price Selector Tooltips [#4865](https://github.com/paritytech/parity/pull/4865) +- Fix auto-updater [#4867](https://github.com/paritytech/parity/pull/4867) +- Make the UI work offline [#4861](https://github.com/paritytech/parity/pull/4861) +- Subscribe to accounts info in Signer / ParityBar [#4856](https://github.com/paritytech/parity/pull/4856) +- Don't link libsnappy explicitly [#4841](https://github.com/paritytech/parity/pull/4841) +- Fix paste in Inputs [#4854](https://github.com/paritytech/parity/pull/4854) +- Extract i18n from shared UI components [#4834](https://github.com/paritytech/parity/pull/4834) +- Fix paste in Inputs [#4844](https://github.com/paritytech/parity/pull/4844) +- Pull contract deployment title from available steps [#4848](https://github.com/paritytech/parity/pull/4848) +- Supress USB error message [#4839](https://github.com/paritytech/parity/pull/4839) +- Fix getTransactionCount in --geth mode [#4837](https://github.com/paritytech/parity/pull/4837) +- CI: test coverage (for core and js) [#4832](https://github.com/paritytech/parity/pull/4832) +- Lowering threshold for transactions above gas limit [#4831](https://github.com/paritytech/parity/pull/4831) +- Fix TxViewer when no `to` (contract deployment) [#4847](https://github.com/paritytech/parity/pull/4847) +- Fix method decoding [#4845](https://github.com/paritytech/parity/pull/4845) +- Add React Hot Reload to dapps + TokenDeploy fix [#4846](https://github.com/paritytech/parity/pull/4846) +- Dapps show multiple times in some cases [#4843](https://github.com/paritytech/parity/pull/4843) +- Fixes to the Registry dapp [#4838](https://github.com/paritytech/parity/pull/4838) +- Show token icons on list summary pages [#4826](https://github.com/paritytech/parity/pull/4826) +- Calibrate step before rejection [#4800](https://github.com/paritytech/parity/pull/4800) +- Add replay protection [#4808](https://github.com/paritytech/parity/pull/4808) +- Better icon on windows [#4804](https://github.com/paritytech/parity/pull/4804) +- Better logic for contract deployments detection [#4821](https://github.com/paritytech/parity/pull/4821) +- Fix wrong default values for contract queries inputs [#4819](https://github.com/paritytech/parity/pull/4819) +- Adjust selection colours/display [#4811](https://github.com/paritytech/parity/pull/4811) +- Update the Wallet Library Registry key [#4817](https://github.com/paritytech/parity/pull/4817) +- Update Wallet to new Wallet Code [#4805](https://github.com/paritytech/parity/pull/4805) + +## Parity [v1.6.9](https://github.com/paritytech/parity/releases/tag/v1.6.9) (2017-07-16) + +This is a first stable release of 1.6 series. It contains a number of minor fixes and introduces the `--reseal-on-uncles` option for miners. + +Full list of changes: + +- Backports [#6061](https://github.com/paritytech/parity/pull/6061) + - Ethereum Classic Monetary Policy [#5741](https://github.com/paritytech/parity/pull/5741) + - Update rewards for uncle miners for ECIP1017 + - Fix an off-by-one error in ECIP1017 era calculation + - `ecip1017_era_rounds` missing from EthashParams when run in build bot + - strip out ecip1017_eras_block_reward function and add unit test + - JS precompiled set to stable +- Backports [#6060](https://github.com/paritytech/parity/pull/6060) + - --reseal-on-uncle [#5940](https://github.com/paritytech/parity/pull/5940) + - Optimized uncle check + - Additional uncle check + - Updated comment + - Bump to v1.6.9 + - CLI: Export error message and less verbose peer counter. [#5870](https://github.com/paritytech/parity/pull/5870) + - Removed numbed of active connections from informant + - Print error message when fatdb is required + - Remove peers from UI + ## Parity [v1.6.8](https://github.com/paritytech/parity/releases/tag/v1.6.8) (2017-06-08) This release addresses: diff --git a/Cargo.lock b/Cargo.lock index e97b1c772..704f3ee36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -81,6 +81,20 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "backtrace" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "backtrace-sys" version = "0.1.11" @@ -302,6 +316,11 @@ name = "crossbeam" version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "crunchy" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "crypt32-sys" version = "0.2.0" @@ -431,6 +450,7 @@ dependencies = [ name = "ethash" version = "1.8.0" dependencies = [ + "crunchy 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "primal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -475,11 +495,11 @@ dependencies = [ "native-contracts 0.1.0", "num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "price-info 1.7.0", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.0", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "stats 0.1.0", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", @@ -667,7 +687,7 @@ dependencies = [ "ethcrypto 0.1.0", "ethkey 0.2.0", "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "native-contracts 0.1.0", @@ -783,6 +803,7 @@ version = "0.1.0" dependencies = [ "docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.2.0", + "panic_hook 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -818,6 +839,7 @@ version = "0.1.0" dependencies = [ "docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethstore 0.1.0", + "panic_hook 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -875,6 +897,7 @@ dependencies = [ "ethcore 1.8.0", "ethcore-util 1.8.0", "evm 0.1.0", + "panic_hook 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -900,7 +923,7 @@ name = "fetch" version = "0.1.0" dependencies = [ "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -933,10 +956,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures-cpupool" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1153,7 +1175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jsonrpc-core" version = "7.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#5e79be8a098cdda221713992f4a46b41a1d4d8f0" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#4d3ec22c7aba426988a678b489b2791e95283699" dependencies = [ "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1165,7 +1187,7 @@ dependencies = [ [[package]] name = "jsonrpc-http-server" version = "7.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#5e79be8a098cdda221713992f4a46b41a1d4d8f0" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#4d3ec22c7aba426988a678b489b2791e95283699" dependencies = [ "hyper 0.10.0-a.0 (git+https://github.com/paritytech/hyper)", "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", @@ -1178,7 +1200,7 @@ dependencies = [ [[package]] name = "jsonrpc-ipc-server" version = "7.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#5e79be8a098cdda221713992f4a46b41a1d4d8f0" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#4d3ec22c7aba426988a678b489b2791e95283699" dependencies = [ "bytes 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", @@ -1191,7 +1213,7 @@ dependencies = [ [[package]] name = "jsonrpc-macros" version = "7.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#5e79be8a098cdda221713992f4a46b41a1d4d8f0" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#4d3ec22c7aba426988a678b489b2791e95283699" dependencies = [ "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", "jsonrpc-pubsub 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", @@ -1201,7 +1223,7 @@ dependencies = [ [[package]] name = "jsonrpc-minihttp-server" version = "7.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#5e79be8a098cdda221713992f4a46b41a1d4d8f0" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#4d3ec22c7aba426988a678b489b2791e95283699" dependencies = [ "bytes 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", @@ -1216,7 +1238,7 @@ dependencies = [ [[package]] name = "jsonrpc-pubsub" version = "7.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#5e79be8a098cdda221713992f4a46b41a1d4d8f0" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#4d3ec22c7aba426988a678b489b2791e95283699" dependencies = [ "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1226,7 +1248,7 @@ dependencies = [ [[package]] name = "jsonrpc-server-utils" version = "7.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#5e79be8a098cdda221713992f4a46b41a1d4d8f0" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#4d3ec22c7aba426988a678b489b2791e95283699" dependencies = [ "bytes 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1239,7 +1261,7 @@ dependencies = [ [[package]] name = "jsonrpc-tcp-server" version = "7.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#5e79be8a098cdda221713992f4a46b41a1d4d8f0" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#4d3ec22c7aba426988a678b489b2791e95283699" dependencies = [ "bytes 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", @@ -1253,7 +1275,7 @@ dependencies = [ [[package]] name = "jsonrpc-ws-server" version = "7.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#5e79be8a098cdda221713992f4a46b41a1d4d8f0" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7#4d3ec22c7aba426988a678b489b2791e95283699" dependencies = [ "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", "jsonrpc-server-utils 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", @@ -1714,6 +1736,13 @@ dependencies = [ "stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "panic_hook" +version = "0.1.0" +dependencies = [ + "backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parity" version = "1.7.0" @@ -1741,12 +1770,13 @@ dependencies = [ "ethsync 1.8.0", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "isatty 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "number_prefix 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "panic_hook 0.1.0", "parity-dapps 1.8.0", "parity-hash-fetch 1.8.0", "parity-ipfs-api 1.8.0", @@ -1785,7 +1815,7 @@ dependencies = [ "ethcore-util 1.8.0", "fetch 0.1.0", "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", "jsonrpc-http-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", "linked-hash-map 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1897,7 +1927,7 @@ dependencies = [ "evm 0.1.0", "fetch 0.1.0", "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", "jsonrpc-http-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", "jsonrpc-ipc-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)", @@ -1979,7 +2009,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/paritytech/js-precompiled.git#92627cfd287eb5176c016089b9e2350107f8869a" +source = "git+https://github.com/paritytech/js-precompiled.git#9394d746f859365082ae375119ee70a0a18956a5" dependencies = [ "parity-dapps-glue 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2131,6 +2161,17 @@ dependencies = [ "difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "price-info" +version = "1.7.0" +dependencies = [ + "ethcore-util 1.8.0", + "fetch 0.1.0", + "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "primal" version = "0.2.3" @@ -3116,6 +3157,7 @@ dependencies = [ "checksum aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfdf7355d9db158df68f976ed030ab0f6578af811f5a7bb6dcf221ec24e0e0" "checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" "checksum backtrace 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "346d7644f0b5f9bc73082d3b2236b69a05fd35cce0cfa3724e184e6a5c9e2a2f" +"checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76" "checksum backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3a0d842ea781ce92be2bf78a9b38883948542749640b8378b3b2f03d1fd9f1ff" "checksum base-x 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2f59103b47307f76e03bef1633aec7fa9e29bfb5aa6daf5a334f94233c71f6c1" "checksum base32 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1b9605ba46d61df0410d8ac686b0007add8172eba90e8e909c347856fe794d8c" @@ -3144,6 +3186,7 @@ dependencies = [ "checksum core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "20a6d0448d3a99d977ae4a2aa5a98d886a923e863e81ad9ff814645b6feb3bbd" "checksum core-foundation-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "05eed248dc504a5391c63794fe4fb64f46f071280afaa1b73308f3c0ce4574c5" "checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97" +"checksum crunchy 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6aa9cb5f2d7bffc4eecfaf924fe450549dc4f0c3a6502298dc24f968b1eabbe" "checksum crypt32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e34988f7e069e0b2f3bfc064295161e489b2d4e04a2e4248fb94360cdf00b4ec" "checksum ctrlc 1.1.1 (git+https://github.com/paritytech/rust-ctrlc.git)" = "" "checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" @@ -3164,7 +3207,7 @@ dependencies = [ "checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344" "checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d" "checksum futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8e51e7f9c150ba7fd4cee9df8bf6ea3dea5b63b68955ddad19ccd35b71dcfb4d" -"checksum futures-cpupool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bb982bb25cd8fa5da6a8eb3a460354c984ff1113da82bcb4f0b0862b5795db82" +"checksum futures-cpupool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a283c84501e92cade5ea673a2a7ca44f71f209ccdd302a3e0896f50083d2c5ff" "checksum gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" "checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" diff --git a/Cargo.toml b/Cargo.toml index d541636da..21961776e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,6 +53,7 @@ parity-rpc-client = { path = "rpc_client" } parity-updater = { path = "updater" } parity-whisper = { path = "whisper" } path = { path = "util/path" } +panic_hook = { path = "panic_hook" } parity-dapps = { path = "dapps", optional = true } clippy = { version = "0.0.103", optional = true} diff --git a/README.md b/README.md index 92d74c8d2..37b06f01c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ### [Download latest release](https://github.com/paritytech/parity/releases) -[![build status](https://gitlab.parity.io/parity/parity/badges/master/build.svg)](https://gitlab.parity.io/parity/parity/commits/master) [![Coverage Status][coveralls-image]][coveralls-url] [![GPLv3][license-image]][license-url] +[![build status](https://gitlab.parity.io/parity/parity/badges/master/build.svg)](https://gitlab.parity.io/parity/parity/commits/master) [![Coverage Status][coveralls-image]][coveralls-url] [![GPLv3][license-image]][license-url] [![Snap Status](https://build.snapcraft.io/badge/paritytech/parity.svg)](https://build.snapcraft.io/user/paritytech/parity) ### Join the chat! @@ -46,6 +46,8 @@ of RPC APIs. If you run into an issue while using parity, feel free to file one in this repository or hop on our [gitter chat room][gitter-url] to ask a question. We are glad to help! +**For security-critical issues**, please refer to the security policy outlined in `SECURITY.MD`. + Parity's current release is 1.6. You can download it at https://github.com/paritytech/parity/releases or follow the instructions below to build from source. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..ed7c83ab1 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,44 @@ +# Security Policy + +For security inquiries or vulnerability reports, please send a message to security@parity.io. + +Please use a descriptive subject line so we can identify the report as such. + +If you send a report, we will respond to the e-mail within 48 hours, and provide regular updates from that time onwards. + +If you would like to encrypt your report, please use the PGP key provided below. +It is also reproduced [on MIT's key server](https://pgp.mit.edu/pks/lookup?op=get&search=0x5D0F03018D07DE73) + +``` +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQENBFlyIAwBCACe0keNPjgYzZ1Oy/8t3zj/Qw9bHHqrzx7FWy8NbXnYBM19NqOZ +DIP7Oe0DvCaf/uruBskCS0iVstHlEFQ2AYe0Ei0REt9lQdy61GylU/DEB3879IG+ +6FO0SnFeYeerv1/hFI2K6uv8v7PyyVDiiJSW0I1KIs2OBwJicTKmWxLAeQsRgx9G +yRGalrVk4KP+6pWTA7k3DxmDZKZyfYV/Ej10NtuzmsemwDbv98HKeomp/kgFOfSy +3AZjeCpctlsNqpjUuXa0/HudmH2WLxZ0fz8XeoRh8XM9UudNIecjrDqmAFrt/btQ +/3guvlzhFCdhYPVGsUusKMECk/JG+Xx1/1ZjABEBAAG0LFBhcml0eSBTZWN1cml0 +eSBDb250YWN0IDxzZWN1cml0eUBwYXJpdHkuaW8+iQFUBBMBCAA+FiEE2uUVYCjP +N6B8aTiDXQ8DAY0H3nMFAllyIAwCGwMFCQPCZwAFCwkIBwIGFQgJCgsCBBYCAwEC +HgECF4AACgkQXQ8DAY0H3nM60wgAkS3A36Zc+upiaxU7tumcGv+an17j7gin0sif ++0ELSjVfrXInM6ovai+NhUdcLkJ7tCrKS90fvlaELK5Sg9CXBWCTFccKN4A/B7ey +rOg2NPXUecnyBB/XqQgKYH7ujYlOlqBDXMfz6z8Hj6WToxg9PPMGGomyMGh8AWxM +3yRPFs5RKt0VKgN++5N00oly5Y8ri5pgCidDvCLYMGTVDHFKwkuc9w6BlWlu1R1e +/hXFWUFAP1ffTAul3QwyKhjPn2iotCdxXjvt48KaU8DN4iL7aMBN/ZBKqGS7yRdF +D/JbJyaaJ0ZRvFSTSXy/sWY3z1B5mtCPBxco8hqqNfRkCwuZ6LkBDQRZciAMAQgA +8BP8xrwe12TOUTqL/Vrbxv/FLdhKh53J6TrPKvC2TEEKOrTNo5ahRq+XOS5E7G2N +x3b+fq8gR9BzFcldAx0XWUtGs/Wv++ulaSNqTBxj13J3G3WGsUfMKxRgj//piCUD +bCFLQfGZdKk0M1o9QkPVARwwmvCNiNB/l++xGqPtfc44H5jWj3GoGvL2MkShPzrN +yN/bJ+m+R5gtFGdInqa5KXBuxxuW25eDKJ+LzjbgUgeC76wNcfOiQHTdMkcupjdO +bbGFwo10hcbRAOcZEv6//Zrlmk/6nPxEd2hN20St2bSN0+FqfZ267mWEu3ejsgF8 +ArdCpv5h4fBvJyNwiTZwIQARAQABiQE8BBgBCAAmFiEE2uUVYCjPN6B8aTiDXQ8D +AY0H3nMFAllyIAwCGwwFCQPCZwAACgkQXQ8DAY0H3nNisggAl4fqhRlA34wIb190 +sqXHVxiCuzPaqS6krE9xAa1+gncX485OtcJNqnjugHm2rFE48lv7oasviuPXuInE +/OgVFnXYv9d/Xx2JUeDs+bFTLouCDRY2Unh7KJZasfqnMcCHWcxHx5FvRNZRssaB +WTZVo6sizPurGUtbpYe4/OLFhadBqAE0EUmVRFEUMc1YTnu4eLaRBzoWN4d2UWwi +LN25RSrVSke7LTSFbgn9ntQrQ2smXSR+cdNkkfRCjFcpUaecvFl9HwIqoyVbT4Ym +0hbpbbX/cJdc91tKa+psa29uMeGL/cgL9fAu19yNFRyOTMxjZnvql1X/WE1pLmoP +ETBD1Q== +=K9Qw +-----END PGP PUBLIC KEY BLOCK----- +``` diff --git a/dapps/src/api/api.rs b/dapps/src/api/api.rs index 7d38e288f..3f1c50de8 100644 --- a/dapps/src/api/api.rs +++ b/dapps/src/api/api.rs @@ -147,13 +147,7 @@ impl RestApiRouter { HealthInfo { status, message, details, } }; - let status = if [&peers.status, &sync.status, &time.status].iter().any(|x| *x != &HealthStatus::Ok) { - StatusCode::PreconditionFailed // HTTP 412 - } else { - StatusCode::Ok // HTTP 200 - }; - - response::as_json(status, &Health { peers, sync, time }) + response::as_json(StatusCode::Ok, &Health { peers, sync, time }) }; let time = self.api.time.time_drift(); diff --git a/docker/hub/Dockerfile b/docker/hub/Dockerfile index 3120eeba7..c3406a5bd 100644 --- a/docker/hub/Dockerfile +++ b/docker/hub/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /build #ENV for build TAG ARG BUILD_TAG ENV BUILD_TAG ${BUILD_TAG:-master} -RUN echo $BUILD_TAG +RUN echo "Build tag:" $BUILD_TAG # install tools and dependencies RUN apt-get update && \ apt-get install -y --force-yes --no-install-recommends \ @@ -48,7 +48,7 @@ RUN apt-get update && \ # show backtraces RUST_BACKTRACE=1 && \ # build parity - cd /build&&git clone https://github.com/paritytech/parity && \ +cd /build&&git clone https://github.com/paritytech/parity && \ cd parity && \ git pull&& \ git checkout $BUILD_TAG && \ diff --git a/ethash/Cargo.toml b/ethash/Cargo.toml index f7d37e375..87069d6f8 100644 --- a/ethash/Cargo.toml +++ b/ethash/Cargo.toml @@ -10,3 +10,7 @@ log = "0.3" sha3 = { path = "../util/sha3" } primal = "0.2.3" parking_lot = "0.4" +crunchy = "0.1.0" + +[features] +benches = [] \ No newline at end of file diff --git a/ethash/src/compute.rs b/ethash/src/compute.rs index fae47c505..1bc546c84 100644 --- a/ethash/src/compute.rs +++ b/ethash/src/compute.rs @@ -289,24 +289,55 @@ fn hash_compute(light: &Light, full_size: usize, header_hash: &H256, nonce: u64) let num_full_pages = (full_size / page_size) as u32; let cache: &[Node] = &light.cache; // deref once for better performance - for i in 0..(ETHASH_ACCESSES as u32) { - let index = fnv_hash(f_mix.get_unchecked(0).as_words().get_unchecked(0) ^ i, *mix.get_unchecked(0).as_words().get_unchecked((i as usize) % MIX_WORDS)) % num_full_pages; - for n in 0..MIX_NODES { - let tmp_node = calculate_dag_item(index * MIX_NODES as u32 + n as u32, cache); - for w in 0..NODE_WORDS { - *mix.get_unchecked_mut(n).as_words_mut().get_unchecked_mut(w) = fnv_hash(*mix.get_unchecked(n).as_words().get_unchecked(w), *tmp_node.as_words().get_unchecked(w)); + debug_assert_eq!(ETHASH_ACCESSES, 64); + debug_assert_eq!(MIX_NODES, 2); + debug_assert_eq!(NODE_WORDS, 16); + + unroll! { + // ETHASH_ACCESSES + for i_usize in 0..64 { + let i = i_usize as u32; + + let index = fnv_hash( + f_mix.get_unchecked(0).as_words().get_unchecked(0) ^ i, + *mix.get_unchecked(0).as_words().get_unchecked(i as usize % MIX_WORDS) + ) % num_full_pages; + + unroll! { + // MIX_NODES + for n in 0..2 { + let tmp_node = calculate_dag_item( + index * MIX_NODES as u32 + n as u32, + cache, + ); + + unroll! { + // NODE_WORDS + for w in 0..16 { + *mix.get_unchecked_mut(n).as_words_mut().get_unchecked_mut(w) = + fnv_hash( + *mix.get_unchecked(n).as_words().get_unchecked(w), + *tmp_node.as_words().get_unchecked(w), + ); + } + } + } } } } + debug_assert_eq!(MIX_WORDS / 4, 8); + // compress mix - for i in 0..(MIX_WORDS / 4) { - let w = i * 4; - let mut reduction = *mix.get_unchecked(0).as_words().get_unchecked(w + 0); - reduction = reduction.wrapping_mul(FNV_PRIME) ^ *mix.get_unchecked(0).as_words().get_unchecked(w + 1); - reduction = reduction.wrapping_mul(FNV_PRIME) ^ *mix.get_unchecked(0).as_words().get_unchecked(w + 2); - reduction = reduction.wrapping_mul(FNV_PRIME) ^ *mix.get_unchecked(0).as_words().get_unchecked(w + 3); - *mix.get_unchecked_mut(0).as_words_mut().get_unchecked_mut(i) = reduction; + unroll! { + for i in 0..8 { + let w = i * 4; + let mut reduction = *mix.get_unchecked(0).as_words().get_unchecked(w + 0); + reduction = reduction.wrapping_mul(FNV_PRIME) ^ *mix.get_unchecked(0).as_words().get_unchecked(w + 1); + reduction = reduction.wrapping_mul(FNV_PRIME) ^ *mix.get_unchecked(0).as_words().get_unchecked(w + 2); + reduction = reduction.wrapping_mul(FNV_PRIME) ^ *mix.get_unchecked(0).as_words().get_unchecked(w + 3); + *mix.get_unchecked_mut(0).as_words_mut().get_unchecked_mut(i) = reduction; + } } let mut mix_hash = [0u8; 32]; @@ -331,13 +362,22 @@ fn calculate_dag_item(node_index: u32, cache: &[Node]) -> Node { *ret.as_words_mut().get_unchecked_mut(0) ^= node_index; sha3::sha3_512(ret.bytes.as_mut_ptr(), ret.bytes.len(), ret.bytes.as_ptr(), ret.bytes.len()); - for i in 0..ETHASH_DATASET_PARENTS { + debug_assert_eq!(NODE_WORDS, 16); + for i in 0..ETHASH_DATASET_PARENTS as u32 { let parent_index = fnv_hash(node_index ^ i, *ret.as_words().get_unchecked(i as usize % NODE_WORDS)) % num_parent_nodes as u32; let parent = cache.get_unchecked(parent_index as usize); - for w in 0..NODE_WORDS { - *ret.as_words_mut().get_unchecked_mut(w) = fnv_hash(*ret.as_words().get_unchecked(w), *parent.as_words().get_unchecked(w)); + + unroll! { + for w in 0..16 { + *ret.as_words_mut().get_unchecked_mut(w) = + fnv_hash( + *ret.as_words().get_unchecked(w), + *parent.as_words().get_unchecked(w) + ); + } } } + sha3::sha3_512(ret.bytes.as_mut_ptr(), ret.bytes.len(), ret.bytes.as_ptr(), ret.bytes.len()); ret } @@ -359,13 +399,20 @@ fn light_new>(cache_dir: T, block_number: u64) -> Light { sha3::sha3_512(nodes.get_unchecked_mut(i).bytes.as_mut_ptr(), NODE_BYTES, nodes.get_unchecked(i - 1).bytes.as_ptr(), NODE_BYTES); } + debug_assert_eq!(NODE_WORDS, 16); + + // This _should_ get unrolled by the compiler, since it's not using the loop variable. for _ in 0..ETHASH_CACHE_ROUNDS { for i in 0..num_nodes { let idx = *nodes.get_unchecked_mut(i).as_words().get_unchecked(0) as usize % num_nodes; let mut data = nodes.get_unchecked((num_nodes - 1 + i) % num_nodes).clone(); - for w in 0..NODE_WORDS { - *data.as_words_mut().get_unchecked_mut(w) ^= *nodes.get_unchecked(idx).as_words().get_unchecked(w); + + unroll! { + for w in 0..16 { + *data.as_words_mut().get_unchecked_mut(w) ^= *nodes.get_unchecked(idx).as_words().get_unchecked(w); + } } + sha3_512(&data.bytes, &mut nodes.get_unchecked_mut(i).bytes); } } diff --git a/ethash/src/lib.rs b/ethash/src/lib.rs index a598af6f7..a9f563af3 100644 --- a/ethash/src/lib.rs +++ b/ethash/src/lib.rs @@ -16,10 +16,15 @@ //! Ethash implementation //! See https://github.com/ethereum/wiki/wiki/Ethash + +#![cfg_attr(feature = "benches", feature(test))] + extern crate primal; extern crate sha3; extern crate parking_lot; +#[macro_use] +extern crate crunchy; #[macro_use] extern crate log; mod compute; @@ -128,3 +133,27 @@ fn test_lru() { assert_eq!(ethash.cache.lock().recent_epoch.unwrap(), 2); assert_eq!(ethash.cache.lock().prev_epoch.unwrap(), 0); } + +#[cfg(feature = "benches")] +mod benchmarks { + extern crate test; + + use compute::{Light, light_compute, SeedHashCompute}; + use self::test::Bencher; + + #[bench] + fn bench_light_compute(b: &mut Bencher) { + let hash = [0xf5, 0x7e, 0x6f, 0x3a, 0xcf, 0xc0, 0xdd, 0x4b, 0x5b, 0xf2, 0xbe, 0xe4, 0x0a, 0xb3, 0x35, 0x8a, 0xa6, 0x87, 0x73, 0xa8, 0xd0, 0x9f, 0x5e, 0x59, 0x5e, 0xab, 0x55, 0x94, 0x05, 0x52, 0x7d, 0x72]; + let nonce = 0xd7b3ac70a301a249; + let light = Light::new(486382); + + b.iter(|| light_compute(&light, &hash, nonce)); + } + + #[bench] + fn bench_seedhash(b: &mut Bencher) { + let seed_compute = SeedHashCompute::new(); + + b.iter(|| seed_compute.get_seedhash(486382)); + } +} diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index c629c3aca..71e329201 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -44,11 +44,11 @@ lru-cache = "0.1.0" native-contracts = { path = "native_contracts" } num = "0.1" num_cpus = "1.2" +price-info = { path = "../price-info" } rand = "0.3" rlp = { path = "../util/rlp" } rust-crypto = "0.2.34" rustc-hex = "1.0" -rustc-serialize = "0.3" semver = "0.6" stats = { path = "../util/stats" } time = "0.1" diff --git a/ethcore/evm/src/interpreter/mod.rs b/ethcore/evm/src/interpreter/mod.rs index 885557dd3..30b431912 100644 --- a/ethcore/evm/src/interpreter/mod.rs +++ b/ethcore/evm/src/interpreter/mod.rs @@ -211,6 +211,7 @@ impl Interpreter { if (instruction == instructions::DELEGATECALL && !schedule.have_delegate_call) || (instruction == instructions::CREATE2 && !schedule.have_create2) || (instruction == instructions::STATICCALL && !schedule.have_static_call) || + ((instruction == instructions::RETURNDATACOPY || instruction == instructions::RETURNDATASIZE) && !schedule.have_return_data) || (instruction == instructions::REVERT && !schedule.have_revert) { return Err(evm::Error::BadInstruction { diff --git a/ethcore/evm/src/schedule.rs b/ethcore/evm/src/schedule.rs index a8dd09645..e721dc803 100644 --- a/ethcore/evm/src/schedule.rs +++ b/ethcore/evm/src/schedule.rs @@ -107,6 +107,8 @@ pub struct Schedule { pub blockhash_gas: usize, /// Static Call opcode enabled. pub have_static_call: bool, + /// RETURNDATA and RETURNDATASIZE opcodes enabled. + pub have_return_data: bool, /// Kill basic accounts below this balance if touched. pub kill_dust: CleanDustMode, } @@ -140,6 +142,7 @@ impl Schedule { have_delegate_call: true, have_create2: false, have_revert: false, + have_return_data: false, stack_limit: 1024, max_depth: 1024, tier_step_gas: [0, 2, 3, 5, 8, 10, 20, 0], @@ -190,6 +193,7 @@ impl Schedule { schedule.have_create2 = true; schedule.have_revert = true; schedule.have_static_call = true; + schedule.have_return_data = true; schedule.blockhash_gas = 350; schedule } @@ -200,6 +204,7 @@ impl Schedule { have_delegate_call: hdc, have_create2: false, have_revert: false, + have_return_data: false, stack_limit: 1024, max_depth: 1024, tier_step_gas: [0, 2, 3, 5, 8, 10, 20, 0], diff --git a/ethcore/res/ethereum/tests b/ethcore/res/ethereum/tests index 4e8b9be3f..ef191fdc6 160000 --- a/ethcore/res/ethereum/tests +++ b/ethcore/res/ethereum/tests @@ -1 +1 @@ -Subproject commit 4e8b9be3fba16ec32e0cdf50b8f9329826283aaa +Subproject commit ef191fdc61cf76cdb9cdc147465fb447304b0ed2 diff --git a/ethcore/src/builtin.rs b/ethcore/src/builtin.rs index d5dc459b2..7f71802b3 100644 --- a/ethcore/src/builtin.rs +++ b/ethcore/src/builtin.rs @@ -352,7 +352,7 @@ fn read_point(reader: &mut io::Chain<&[u8], io::Repeat>) -> Result<::bn::G1, Err let px = Fq::from_slice(&buf[0..32]).map_err(|_| Error::from("Invalid point x coordinate"))?; reader.read_exact(&mut buf[..]).expect("reading from zero-extended memory cannot fail; qed"); - let py = Fq::from_slice(&buf[0..32]).map_err(|_| Error::from("Invalid point x coordinate"))?; + let py = Fq::from_slice(&buf[0..32]).map_err(|_| Error::from("Invalid point y coordinate"))?; Ok( if px == Fq::zero() && py == Fq::zero() { diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index af7922c20..89f9d2e57 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -98,10 +98,10 @@ extern crate lru_cache; extern crate native_contracts; extern crate num_cpus; extern crate num; +extern crate price_info; extern crate rand; extern crate rlp; extern crate rustc_hex; -extern crate rustc_serialize; extern crate semver; extern crate stats; extern crate time; diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 4b7671946..80971355b 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -33,9 +33,10 @@ use miner::{MinerService, MinerStatus, TransactionQueue, RemovalReason, Transact AccountDetails, TransactionOrigin}; use miner::banning_queue::{BanningTransactionQueue, Threshold}; use miner::work_notify::{WorkPoster, NotifyWork}; -use miner::price_info::PriceInfo; use miner::local_transactions::{Status as LocalTransactionStatus}; use miner::service_transaction_checker::ServiceTransactionChecker; +use price_info::{Client as PriceInfoClient, PriceInfo}; +use price_info::fetch::Client as FetchClient; use header::BlockNumber; /// Different possible definitions for pending transaction set. @@ -154,6 +155,7 @@ pub struct GasPriceCalibratorOptions { pub struct GasPriceCalibrator { options: GasPriceCalibratorOptions, next_calibration: Instant, + price_info: PriceInfoClient, } impl GasPriceCalibrator { @@ -163,7 +165,7 @@ impl GasPriceCalibrator { let usd_per_tx = self.options.usd_per_tx; trace!(target: "miner", "Getting price info"); - PriceInfo::get(move |price: PriceInfo| { + self.price_info.get(move |price: PriceInfo| { trace!(target: "miner", "Price info arrived: {:?}", price); let usd_per_eth = price.ethusd; let wei_per_usd: f32 = 1.0e18 / usd_per_eth; @@ -189,10 +191,11 @@ pub enum GasPricer { impl GasPricer { /// Create a new Calibrated `GasPricer`. - pub fn new_calibrated(options: GasPriceCalibratorOptions) -> GasPricer { + pub fn new_calibrated(options: GasPriceCalibratorOptions, fetch: FetchClient) -> GasPricer { GasPricer::Calibrated(GasPriceCalibrator { options: options, next_calibration: Instant::now(), + price_info: PriceInfoClient::new(fetch), }) } diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs index 78c16ab88..1c07f4fab 100644 --- a/ethcore/src/miner/mod.rs +++ b/ethcore/src/miner/mod.rs @@ -45,7 +45,6 @@ mod banning_queue; mod external; mod local_transactions; mod miner; -mod price_info; mod service_transaction_checker; mod transaction_queue; mod work_notify; diff --git a/ethcore/src/miner/price_info.rs b/ethcore/src/miner/price_info.rs deleted file mode 100644 index 29994afb4..000000000 --- a/ethcore/src/miner/price_info.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -use rustc_serialize::json::Json; -use std::thread; -use std::io::Read; -use std::time::Duration; -use std::str::FromStr; -use std::sync::mpsc; -use hyper::client::{Handler, Request, Response, Client}; -use hyper::{Url, Next, Encoder, Decoder}; -use hyper::net::HttpStream; - -#[derive(Debug)] -pub struct PriceInfo { - pub ethusd: f32, -} - -pub struct SetPriceHandler { - set_price: F, - channel: mpsc::Sender<()>, -} - -impl Drop for SetPriceHandler { - fn drop(&mut self) { - let _ = self.channel.send(()); - } -} - -impl Handler for SetPriceHandler { - fn on_request(&mut self, _: &mut Request) -> Next { Next::read().timeout(Duration::from_secs(3)) } - fn on_request_writable(&mut self, _: &mut Encoder) -> Next { Next::read().timeout(Duration::from_secs(3)) } - fn on_response(&mut self, _: Response) -> Next { Next::read().timeout(Duration::from_secs(3)) } - - fn on_response_readable(&mut self, r: &mut Decoder) -> Next { - let mut body = String::new(); - let info = r.read_to_string(&mut body) - .map_err(|e| format!("Unable to read response: {:?}", e)) - .and_then(|_| self.process_response(&body)); - - if let Err(e) = info { - warn!("Failed to auto-update latest ETH price: {:?}", e); - } - Next::end() - } -} - -impl SetPriceHandler { - fn process_response(&self, body: &str) -> Result<(), String> { - let json = Json::from_str(body).map_err(|e| format!("Invalid JSON returned: {:?}", e))?; - let obj = json.find_path(&["result", "ethusd"]).ok_or("USD price not found".to_owned())?; - let ethusd = match *obj { - Json::String(ref s) => FromStr::from_str(s).ok(), - _ => None, - }.ok_or("Unexpected price format.".to_owned())?; - - (self.set_price)(PriceInfo { - ethusd: ethusd, - }); - Ok(()) - } -} - -impl PriceInfo { - pub fn get(set_price: F) { - thread::spawn(move || { - let url = FromStr::from_str("http://api.etherscan.io/api?module=stats&action=ethprice") - .expect("string known to be a valid URL; qed"); - - if let Err(e) = Self::request(url, set_price) { - warn!("Failed to auto-update latest ETH price: {:?}", e); - } - }); - } - - fn request(url: Url, set_price: F) -> Result<(), String> { - let (tx, rx) = mpsc::channel(); - let client = Client::new().map_err(|e| format!("Unable to start client: {:?}", e))?; - - client.request( - url, - SetPriceHandler { - set_price: set_price, - channel: tx, - }, - ).map_err(|_| "Request failed.".to_owned())?; - - // Wait for exit - let _ = rx.recv().map_err(|e| format!("Request interrupted: {:?}", e))?; - client.close(); - - Ok(()) - } -} - -#[test] #[ignore] -fn should_get_price_info() { - use std::sync::Arc; - use std::time::Duration; - use ethcore_logger::init_log; - use util::{Condvar, Mutex}; - - init_log(); - let done = Arc::new((Mutex::new(PriceInfo { ethusd: 0f32 }), Condvar::new())); - let rdone = done.clone(); - - PriceInfo::get(move |price| { let mut p = rdone.0.lock(); *p = price; rdone.1.notify_one(); }); - let mut p = done.0.lock(); - let t = done.1.wait_for(&mut p, Duration::from_millis(10000)); - assert!(!t.timed_out()); - assert!(p.ethusd != 0f32); -} diff --git a/ethcore/src/snapshot/service.rs b/ethcore/src/snapshot/service.rs index fd4c2cc1e..47bbb5997 100644 --- a/ethcore/src/snapshot/service.rs +++ b/ethcore/src/snapshot/service.rs @@ -46,6 +46,9 @@ struct Guard(bool, PathBuf); impl Guard { fn new(path: PathBuf) -> Self { Guard(true, path) } + #[cfg(test)] + fn benign() -> Self { Guard(false, PathBuf::default()) } + fn disarm(mut self) { self.0 = false } } @@ -123,7 +126,7 @@ impl Restoration { // feeds a state chunk, aborts early if `flag` becomes false. fn feed_state(&mut self, hash: H256, chunk: &[u8], flag: &AtomicBool) -> Result<(), Error> { - if self.state_chunks_left.remove(&hash) { + if self.state_chunks_left.contains(&hash) { let len = snappy::decompress_into(chunk, &mut self.snappy_buffer)?; self.state.feed(&self.snappy_buffer[..len], flag)?; @@ -131,6 +134,8 @@ impl Restoration { if let Some(ref mut writer) = self.writer.as_mut() { writer.write_state_chunk(hash, chunk)?; } + + self.state_chunks_left.remove(&hash); } Ok(()) @@ -138,13 +143,15 @@ impl Restoration { // feeds a block chunk fn feed_blocks(&mut self, hash: H256, chunk: &[u8], engine: &Engine, flag: &AtomicBool) -> Result<(), Error> { - if self.block_chunks_left.remove(&hash) { + if self.block_chunks_left.contains(&hash) { let len = snappy::decompress_into(chunk, &mut self.snappy_buffer)?; self.secondary.feed(&self.snappy_buffer[..len], engine, flag)?; if let Some(ref mut writer) = self.writer.as_mut() { writer.write_block_chunk(hash, chunk)?; } + + self.block_chunks_left.remove(&hash); } Ok(()) @@ -558,9 +565,9 @@ impl SnapshotService for Service { self.reader.read().as_ref().map(|r| r.manifest().clone()) } - fn min_supported_version(&self) -> Option { + fn supported_versions(&self) -> Option<(u64, u64)> { self.engine.snapshot_components() - .map(|c| c.min_supported_version()) + .map(|c| (c.min_supported_version(), c.current_version())) } fn chunk(&self, hash: H256) -> Option { @@ -668,4 +675,50 @@ mod tests { service.restore_state_chunk(Default::default(), vec![]); service.restore_block_chunk(Default::default(), vec![]); } + + #[test] + fn cannot_finish_with_invalid_chunks() { + use util::H256; + use util::kvdb::DatabaseConfig; + + let spec = get_test_spec(); + let dir = RandomTempPath::new(); + + let state_hashes: Vec<_> = (0..5).map(|_| H256::random()).collect(); + let block_hashes: Vec<_> = (0..5).map(|_| H256::random()).collect(); + let db_config = DatabaseConfig::with_columns(::db::NUM_COLUMNS); + let gb = spec.genesis_block(); + let flag = ::std::sync::atomic::AtomicBool::new(true); + + let params = RestorationParams { + manifest: ManifestData { + version: 2, + state_hashes: state_hashes.clone(), + block_hashes: block_hashes.clone(), + state_root: H256::default(), + block_number: 100000, + block_hash: H256::default(), + }, + pruning: Algorithm::Archive, + db_path: dir.as_path().to_owned(), + db_config: &db_config, + writer: None, + genesis: &gb, + guard: Guard::benign(), + engine: &*spec.engine.clone(), + }; + + let mut restoration = Restoration::new(params).unwrap(); + let definitely_bad_chunk = [1, 2, 3, 4, 5]; + + for hash in state_hashes { + assert!(restoration.feed_state(hash, &definitely_bad_chunk, &flag).is_err()); + assert!(!restoration.is_done()); + } + + for hash in block_hashes { + assert!(restoration.feed_blocks(hash, &definitely_bad_chunk, &*spec.engine, &flag).is_err()); + assert!(!restoration.is_done()); + } + } } diff --git a/ethcore/src/snapshot/snapshot_service_trait.rs b/ethcore/src/snapshot/snapshot_service_trait.rs index e57b39da1..9df366250 100644 --- a/ethcore/src/snapshot/snapshot_service_trait.rs +++ b/ethcore/src/snapshot/snapshot_service_trait.rs @@ -27,9 +27,9 @@ pub trait SnapshotService : Sync + Send { /// Query the most recent manifest data. fn manifest(&self) -> Option; - /// Get the minimum supported snapshot version number. + /// Get the supported range of snapshot version numbers. /// `None` indicates warp sync isn't supported by the consensus engine. - fn min_supported_version(&self) -> Option; + fn supported_versions(&self) -> Option<(u64, u64)>; /// Get raw chunk for a given hash. fn chunk(&self, hash: H256) -> Option; diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index 40893ad6d..7d3900f2c 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -100,6 +100,7 @@ impl CommonParams { schedule.have_create2 = block_number >= self.eip86_transition; schedule.have_revert = block_number >= self.eip140_transition; schedule.have_static_call = block_number >= self.eip214_transition; + schedule.have_return_data = block_number >= self.eip211_transition; if block_number >= self.eip210_transition { schedule.blockhash_gas = 350; } diff --git a/ethkey/cli/Cargo.toml b/ethkey/cli/Cargo.toml index 3ea931e25..6921af745 100644 --- a/ethkey/cli/Cargo.toml +++ b/ethkey/cli/Cargo.toml @@ -9,6 +9,7 @@ serde = "1.0" serde_derive = "1.0" rustc-hex = "1.0" docopt = "0.8" +panic_hook = { path = "../../panic_hook" } [[bin]] name = "ethkey" diff --git a/ethkey/cli/src/main.rs b/ethkey/cli/src/main.rs index 0d96c2a89..7ad07e295 100644 --- a/ethkey/cli/src/main.rs +++ b/ethkey/cli/src/main.rs @@ -20,12 +20,14 @@ extern crate serde; #[macro_use] extern crate serde_derive; extern crate ethkey; +extern crate panic_hook; use std::{env, fmt, process}; use std::num::ParseIntError; use docopt::Docopt; use rustc_hex::{FromHex, FromHexError}; use ethkey::{KeyPair, Random, Brain, Prefix, Error as EthkeyError, Generator, sign, verify_public, verify_address}; +use std::io; pub const USAGE: &'static str = r#" Ethereum keys generator. @@ -87,6 +89,7 @@ enum Error { FromHex(FromHexError), ParseInt(ParseIntError), Docopt(docopt::Error), + Io(io::Error), } impl From for Error { @@ -113,6 +116,12 @@ impl From for Error { } } +impl From for Error { + fn from(err: io::Error) -> Self { + Error::Io(err) + } +} + impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { match *self { @@ -120,6 +129,7 @@ impl fmt::Display for Error { Error::FromHex(ref e) => write!(f, "{}", e), Error::ParseInt(ref e) => write!(f, "{}", e), Error::Docopt(ref e) => write!(f, "{}", e), + Error::Io(ref e) => write!(f, "{}", e), } } } @@ -146,6 +156,8 @@ impl DisplayMode { } fn main() { + panic_hook::set(); + match execute(env::args()) { Ok(ok) => println!("{}", ok), Err(err) => { @@ -176,17 +188,17 @@ fn execute(command: I) -> Result where I: IntoIterator println!("{}", result), Err(err) => { diff --git a/evmbin/Cargo.toml b/evmbin/Cargo.toml index e3de99f2b..5e9c50f8f 100644 --- a/evmbin/Cargo.toml +++ b/evmbin/Cargo.toml @@ -16,6 +16,7 @@ serde_derive = "1.0" ethcore = { path = "../ethcore" } ethcore-util = { path = "../util" } evm = { path = "../ethcore/evm" } +panic_hook = { path = "../panic_hook" } [features] evm-debug = ["ethcore/evm-debug-tests"] diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index df9b088d0..7e89c7c7f 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -26,6 +26,7 @@ extern crate serde_derive; extern crate docopt; extern crate ethcore_util as util; extern crate evm; +extern crate panic_hook; use std::sync::Arc; use std::{fmt, fs}; @@ -63,6 +64,8 @@ General options: fn main() { + panic_hook::set(); + let args: Args = Docopt::new(USAGE).and_then(|d| d.deserialize()).unwrap_or_else(|e| e.exit()); if args.flag_json { diff --git a/js/package.json b/js/package.json index 2298c5265..d299a421d 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "1.7.100", + "version": "1.8.6", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team ", diff --git a/js/src/contracts/code/wallet.js b/js/src/contracts/code/wallet.js index 06142308a..ab60bfc98 100644 --- a/js/src/contracts/code/wallet.js +++ b/js/src/contracts/code/wallet.js @@ -15,16 +15,16 @@ // along with Parity. If not, see . /** - * @version Solidity v0.4.9 - Optimized - * @from https://github.com/paritytech/parity/blob/c4196a5de31e0b97ec42d5263d9db404cea4a776/js/src/contracts/snippets/enhanced-wallet.sol - * @date 07-Mar-2017 @ 16h00 UTC + * @version Solidity v0.4.10 - Optimized + * @from https://github.com/paritytech/parity/blob/6b0e4f9098be6b841353e7c4f116aa86b7c2e3d6/js/src/contracts/snippets/enhanced-wallet.sol + * @date 20-Jul-2017 @ 16h00 UTC */ -export const walletCompiler = 'v0.4.9+commit.364da425'; +export const walletCompiler = 'v0.4.10+commit.f0d539ae'; export const walletSource = 'https://github.com/paritytech/parity/blob/c4196a5de31e0b97ec42d5263d9db404cea4a776/js/src/contracts/snippets/enhanced-wallet.sol'; -export const wallet = '0x6060604052341561000c57fe5b60405161048538038061048583398101604090815281516020830151918301519201915b604080517f696e697457616c6c657428616464726573735b5d2c75696e743235362c75696e81527f7432353629000000000000000000000000000000000000000000000000000000602080830191909152915190819003602501902084516000829052909173_____________WalletLibrary______________91600281019160049182010290819038829003903960006000600483016000866127105a03f45b505050505050505b61039d806100e86000396000f300606060405236156100725763ffffffff60e060020a6000350416632f54bf6e811461012d5780634123cb6b1461015d578063523750931461017f578063659010e7146101a1578063746c9171146101c3578063c2cf7326146101e5578063c41a360a14610218578063f1736d8614610247575b61012b5b60003411156100c75760408051600160a060020a033316815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a1610127565b60003611156101275773_____________WalletLibrary______________600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f4151561012457fe5b50505b5b5b565b005b341561013557fe5b610149600160a060020a0360043516610269565b604080519115158252519081900360200190f35b341561016557fe5b61016d6102cd565b60408051918252519081900360200190f35b341561018757fe5b61016d6102d3565b60408051918252519081900360200190f35b34156101a957fe5b61016d6102d9565b60408051918252519081900360200190f35b34156101cb57fe5b61016d6102df565b60408051918252519081900360200190f35b34156101ed57fe5b610149600435600160a060020a03602435166102e5565b604080519115158252519081900360200190f35b341561022057fe5b61022b60043561034a565b60408051600160a060020a039092168252519081900360200190f35b341561024f57fe5b61016d61036b565b60408051918252519081900360200190f35b600073_____________WalletLibrary______________600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f415156102bf57fe5b50506040515190505b919050565b60015481565b60045481565b60035481565b60005481565b600073_____________WalletLibrary______________600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f4151561033b57fe5b50506040515190505b92915050565b6000600560018301610100811061035d57fe5b0160005b505490505b919050565b600254815600a165627a7a723058204a75c2f5c8009054bd9e9998e8bb6f4bca0b201484709f357b482793957c47130029'; -export const walletLibrary = '0x6060604052341561000c57fe5b5b6116d88061001c6000396000f300606060405236156101015763ffffffff60e060020a600035041663173825d981146101575780632f54bf6e146101755780634123cb6b146101a557806352375093146101c75780635c52c2f5146101e9578063659010e7146101fb5780637065cb481461021d578063746c91711461023b578063797af6271461025d5780639da5e0eb14610284578063b20d30a914610299578063b61d27f6146102ae578063b75c7dc6146102ec578063ba51a6df14610301578063c2cf732614610316578063c41a360a14610349578063c57c5f6014610378578063cbf0b0c0146103cf578063e46dcfeb146103ed578063f00d4b5d14610449578063f1736d861461046d575b6101555b60003411156101525760408051600160a060020a033316815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b5b565b005b341561015f57fe5b610155600160a060020a036004351661048f565b005b341561017d57fe5b610191600160a060020a036004351661057d565b604080519115158252519081900360200190f35b34156101ad57fe5b6101b561059e565b60408051918252519081900360200190f35b34156101cf57fe5b6101b56105a4565b60408051918252519081900360200190f35b34156101f157fe5b6101556105aa565b005b341561020357fe5b6101b56105e1565b60408051918252519081900360200190f35b341561022557fe5b610155600160a060020a03600435166105e7565b005b341561024357fe5b6101b56106d7565b60408051918252519081900360200190f35b341561026557fe5b6101916004356106dd565b604080519115158252519081900360200190f35b341561028c57fe5b610155600435610a2f565b005b34156102a157fe5b610155600435610a43565b005b34156102b657fe5b6101b560048035600160a060020a0316906024803591604435918201910135610a7b565b60408051918252519081900360200190f35b34156102f457fe5b610155600435610d5d565b005b341561030957fe5b610155600435610e08565b005b341561031e57fe5b610191600435600160a060020a0360243516610e8a565b604080519115158252519081900360200190f35b341561035157fe5b61035c600435610edf565b60408051600160a060020a039092168252519081900360200190f35b341561038057fe5b6101556004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496505093359350610f0092505050565b005b34156103d757fe5b610155600160a060020a0360043516610fd4565b005b34156103f557fe5b6101556004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496505084359460200135935061101292505050565b005b341561045157fe5b610155600160a060020a036004358116906024351661102b565b005b341561047557fe5b6101b5611125565b60408051918252519081900360200190f35b60006000366040518083838082843782019150509250505060405180910390206104b88161112b565b1561057657600160a060020a0383166000908152610105602052604090205491508115156104e557610576565b60016001540360005411156104f957610576565b6000600583610100811061050957fe5b0160005b5055600160a060020a03831660009081526101056020526040812055610531611296565b610539611386565b60408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a15b5b5b505050565b600160a060020a03811660009081526101056020526040812054115b919050565b60015481565b60045481565b6000366040518083838082843782019150509250505060405180910390206105d18161112b565b156105dc5760006003555b5b5b50565b60035481565b60003660405180838380828437820191505092505050604051809103902061060e8161112b565b156106d15761061c8261057d565b15610626576106d1565b61062e611296565b60015460fa901061064157610641611386565b5b60015460fa9010610652576106d1565b60018054810190819055600160a060020a03831690600590610100811061067557fe5b0160005b5055600154600160a060020a03831660008181526101056020908152604091829020939093558051918252517f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3929181900390910190a15b5b5b5050565b60005481565b60006000826106eb8161112b565b15610a255760008481526101086020526040902054600160a060020a031615158061072757506000848152610108602052604090206001015415155b80610754575060008481526101086020526040902060029081015461010060018216150260001901160415155b15610a255760008481526101086020526040902054600160a060020a0316151561082c57600084815261010860209081526040918290206001808201546002928301805486516000199482161561010002949094011693909304601f810185900485028301850190955284825261082594909391929183018282801561081b5780601f106107f05761010080835404028352916020019161081b565b820191906000526020600020905b8154815290600101906020018083116107fe57829003601f168201915b50505050506114c2565b91506108e3565b60008481526101086020526040908190208054600180830154935160029384018054600160a060020a0390941695949093919283928592918116156101000260001901160480156108be5780601f10610893576101008083540402835291602001916108be565b820191906000526020600020905b8154815290600101906020018083116108a157829003601f168201915b505091505060006040518083038185876185025a03f19250505015156108e357610000565b5b6000848152610108602090815260409182902060018082015482548551600160a060020a033381811683529682018c90529681018390529086166060820181905295881660a082015260c06080820181815260029586018054958616156101000260001901909516959095049082018190527fe3a3a4111a84df27d76b68dc721e65c7711605ea5eee4afd3a9c58195217365c968b959394909390928a9290919060e0830190859080156109d95780601f106109ae576101008083540402835291602001916109d9565b820191906000526020600020905b8154815290600101906020018083116109bc57829003601f168201915b505097505050505050505060405180910390a16000848152610108602052604081208054600160a060020a03191681556001810182905590610a1e6002830182611557565b5050600192505b5b5b5b5050919050565b6002819055610a3c6114dc565b6004555b50565b600036604051808383808284378201915050925050506040518091039020610a6a8161112b565b156106d15760028290555b5b5b5050565b60006000610a883361057d565b15610d505782158015610a9f5750610a9f856114eb565b5b80610aad57506000546001145b15610bef57600160a060020a0386161515610b0357610afc8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437506114c2945050505050565b9050610b43565b85600160a060020a03168585856040518083838082843782019150509250505060006040518083038185876185025a03f1925050501515610b4357610000565b5b7f9738cd1a8777c86b011f7b01d87d484217dc6ab5154a9d41eda5d14af8caf2923386888787866040518087600160a060020a0316600160a060020a0316815260200186815260200185600160a060020a0316600160a060020a031681526020018060200183600160a060020a0316600160a060020a0316815260200182810382528585828181526020019250808284376040519201829003995090975050505050505050a1610d50565b600036436040518084848082843791909101928352505060408051602092819003830190206000818152610108909352912054909450600160a060020a0316159150508015610c4e575060008281526101086020526040902060010154155b8015610c7b5750600082815261010860205260409020600290810154610100600182161502600019011604155b15610cbf576000828152610108602052604090208054600160a060020a031916600160a060020a03881617815560018101869055610cbd90600201858561159f565b505b610cc8826106dd565b1515610d505760408051838152600160a060020a033381811660208401529282018890528816606082015260a0608082018181529082018690527f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32928592909189918b918a918a9160c082018484808284376040519201829003995090975050505050505050a15b5b5b5b5b50949350505050565b600160a060020a033316600090815261010560205260408120549080821515610d8557610e01565b50506000828152610106602052604081206001810154600284900a929083161115610e015780546001908101825581018054839003905560408051600160a060020a03331681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b5b50505050565b600036604051808383808284378201915050925050506040518091039020610e2f8161112b565b156106d157600154821115610e43576106d1565b6000829055610e50611296565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15b5b5b5050565b600082815261010660209081526040808320600160a060020a038516845261010590925282205482811515610ec25760009350610ed6565b8160020a9050808360010154166000141593505b50505092915050565b60006005600183016101008110610ef257fe5b0160005b505490505b919050565b815160019081018155600090600160a060020a033316906005905b0160005b505550600160a060020a033316600090815261010560205260408120600190555b8251811015610fc9578281815181101515610f5757fe5b60209081029091010151600160a060020a03166005600283016101008110610f7b57fe5b0160005b50819055508060020161010560008584815181101515610f9b57fe5b90602001906020020151600160a060020a03168152602001908152602001600020819055505b600101610f40565b60008290555b505050565b600036604051808383808284378201915050925050506040518091039020610ffb8161112b565b156106d15781600160a060020a0316ff5b5b5b5050565b61101b81610a2f565b6105768383610f00565b5b505050565b60006000366040518083838082843782019150509250505060405180910390206110548161112b565b15610e01576110628361057d565b1561106c57610e01565b600160a060020a03841660009081526101056020526040902054915081151561109457610e01565b61109c611296565b600160a060020a03831660058361010081106110b457fe5b0160005b5055600160a060020a0380851660008181526101056020908152604080832083905593871680835291849020869055835192835282015281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a15b5b5b50505050565b60025481565b600160a060020a0333166000908152610105602052604081205481808215156111535761128c565b600085815261010660205260409020805490925015156111b65760008054835560018084019190915561010780549161118e9190830161161e565b60028301819055610107805487929081106111a557fe5b906000526020600020900160005b50555b8260020a9050808260010154166000141561128c5760408051600160a060020a03331681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a181546001901161127957600085815261010660205260409020600201546101078054909190811061123c57fe5b906000526020600020900160005b50600090819055858152610106602052604081208181556001808201839055600290910191909155935061128c565b8154600019018255600182018054821790555b5b5b505050919050565b6101075460005b81811015611374576101086000610107838154811015156112ba57fe5b906000526020600020900160005b50548152602081019190915260400160009081208054600160a060020a031916815560018101829055906112ff6002830182611557565b505061010780548290811061131057fe5b906000526020600020900160005b50541561136b5761010660006101078381548110151561133a57fe5b906000526020600020900160005b505481526020810191909152604001600090812081815560018101829055600201555b5b60010161129d565b6106d16101076000611648565b5b5050565b60015b6001548110156105dc575b600154811080156113b7575060058161010081106113ae57fe5b0160005b505415155b156113c457600101611394565b5b60016001541180156113eb575060015460059061010081106113e357fe5b0160005b5054155b156113ff57600180546000190190556113c4565b600154811080156114255750600154600590610100811061141c57fe5b0160005b505415155b80156114425750600581610100811061143a57fe5b0160005b5054155b156114b957600154600590610100811061145857fe5b0160005b5054600582610100811061146c57fe5b0160005b5055806101056000600583610100811061148657fe5b0160005b505481526020019081526020016000208190555060006005600154610100811015156114b257fe5b0160005b50555b611389565b5b50565b600081516020830184f09050803b15610000575b92915050565b600062015180425b0490505b90565b60006114f63361057d565b15610599576004546115066114dc565b111561151d5760006003556115196114dc565b6004555b600354828101108015906115375750600254826003540111155b1561154c575060038054820190556001610599565b5060005b5b5b919050565b50805460018160011615610100020316600290046000825580601f1061157d57506105dc565b601f0160209004906000526020600020908101906105dc919061166a565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106115e05782800160ff1982351617855561160d565b8280016001018555821561160d579182015b8281111561160d5782358255916020019190600101906115f2565b5b5061161a92915061166a565b5090565b8154818355818115116105765760008381526020902061057691810190830161166a565b5b505050565b50805460008255906000526020600020908101906105dc919061166a565b5b50565b6114e891905b8082111561161a5760008155600101611670565b5090565b90565b6114e891905b8082111561161a5760008155600101611670565b5090565b905600a165627a7a723058206560ca68304798da7e3be68397368a30b63db1453ff138ff8f765e80080025af0029'; +export const wallet = '0x6060604052341561000c57fe5b60405161048538038061048583398101604090815281516020830151918301519201915b604080517f696e697457616c6c657428616464726573735b5d2c75696e743235362c75696e81527f7432353629000000000000000000000000000000000000000000000000000000602080830191909152915190819003602501902084516000829052909173_____________WalletLibrary______________91600281019160049182010290819038829003903960006000600483016000866127105a03f45b505050505050505b61039d806100e86000396000f300606060405236156100725763ffffffff60e060020a6000350416632f54bf6e811461012d5780634123cb6b1461015d578063523750931461017f578063659010e7146101a1578063746c9171146101c3578063c2cf7326146101e5578063c41a360a14610218578063f1736d8614610247575b61012b5b60003411156100c75760408051600160a060020a033316815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a1610127565b60003611156101275773_____________WalletLibrary______________600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f4151561012457fe5b50505b5b5b565b005b341561013557fe5b610149600160a060020a0360043516610269565b604080519115158252519081900360200190f35b341561016557fe5b61016d6102cd565b60408051918252519081900360200190f35b341561018757fe5b61016d6102d3565b60408051918252519081900360200190f35b34156101a957fe5b61016d6102d9565b60408051918252519081900360200190f35b34156101cb57fe5b61016d6102df565b60408051918252519081900360200190f35b34156101ed57fe5b610149600435600160a060020a03602435166102e5565b604080519115158252519081900360200190f35b341561022057fe5b61022b60043561034a565b60408051600160a060020a039092168252519081900360200190f35b341561024f57fe5b61016d61036b565b60408051918252519081900360200190f35b600073_____________WalletLibrary______________600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f415156102bf57fe5b50506040515190505b919050565b60015481565b60045481565b60035481565b60005481565b600073_____________WalletLibrary______________600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f4151561033b57fe5b50506040515190505b92915050565b6000600560018301610100811061035d57fe5b0160005b505490505b919050565b600254815600a165627a7a72305820c20a8475c42598c198f6629bada37e1b234da85ac2c0cbac3d96089030b180400029'; +export const walletLibrary = '0x6060604052341561000c57fe5b5b61170f8061001c6000396000f300606060405236156101015763ffffffff60e060020a600035041663173825d981146101575780632f54bf6e146101755780634123cb6b146101a557806352375093146101c75780635c52c2f5146101e9578063659010e7146101fb5780637065cb481461021d578063746c91711461023b578063797af6271461025d5780639da5e0eb14610284578063b20d30a914610299578063b61d27f6146102ae578063b75c7dc6146102ec578063ba51a6df14610301578063c2cf732614610316578063c41a360a14610349578063c57c5f6014610378578063cbf0b0c0146103cf578063e46dcfeb146103ed578063f00d4b5d14610449578063f1736d861461046d575b6101555b60003411156101525760408051600160a060020a033316815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b5b565b005b341561015f57fe5b610155600160a060020a036004351661048f565b005b341561017d57fe5b610191600160a060020a036004351661057d565b604080519115158252519081900360200190f35b34156101ad57fe5b6101b561059e565b60408051918252519081900360200190f35b34156101cf57fe5b6101b56105a4565b60408051918252519081900360200190f35b34156101f157fe5b6101556105aa565b005b341561020357fe5b6101b56105e1565b60408051918252519081900360200190f35b341561022557fe5b610155600160a060020a03600435166105e7565b005b341561024357fe5b6101b56106d7565b60408051918252519081900360200190f35b341561026557fe5b6101916004356106dd565b604080519115158252519081900360200190f35b341561028c57fe5b610155600435610a30565b005b34156102a157fe5b610155600435610a56565b005b34156102b657fe5b6101b560048035600160a060020a0316906024803591604435918201910135610a8e565b60408051918252519081900360200190f35b34156102f457fe5b610155600435610d71565b005b341561030957fe5b610155600435610e1c565b005b341561031e57fe5b610191600435600160a060020a0360243516610e9e565b604080519115158252519081900360200190f35b341561035157fe5b61035c600435610ef3565b60408051600160a060020a039092168252519081900360200190f35b341561038057fe5b6101556004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496505093359350610f1492505050565b005b34156103d757fe5b610155600160a060020a0360043516610ff9565b005b34156103f557fe5b6101556004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496505084359460200135935061103792505050565b005b341561045157fe5b610155600160a060020a0360043581169060243516611062565b005b341561047557fe5b6101b561115c565b60408051918252519081900360200190f35b60006000366040518083838082843782019150509250505060405180910390206104b881611162565b1561057657600160a060020a0383166000908152610105602052604090205491508115156104e557610576565b60016001540360005411156104f957610576565b6000600583610100811061050957fe5b0160005b5055600160a060020a038316600090815261010560205260408120556105316112cd565b6105396113bd565b60408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a15b5b5b505050565b600160a060020a03811660009081526101056020526040812054115b919050565b60015481565b60045481565b6000366040518083838082843782019150509250505060405180910390206105d181611162565b156105dc5760006003555b5b5b50565b60035481565b60003660405180838380828437820191505092505050604051809103902061060e81611162565b156106d15761061c8261057d565b15610626576106d1565b61062e6112cd565b60015460fa9010610641576106416113bd565b5b60015460fa9010610652576106d1565b60018054810190819055600160a060020a03831690600590610100811061067557fe5b0160005b5055600154600160a060020a03831660008181526101056020908152604091829020939093558051918252517f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3929181900390910190a15b5b5b5050565b60005481565b60006000826106eb81611162565b15610a265760008481526101086020526040902054600160a060020a031615158061072757506000848152610108602052604090206001015415155b80610754575060008481526101086020526040902060029081015461010060018216150260001901160415155b15610a265760008481526101086020526040902054600160a060020a0316151561082c57600084815261010860209081526040918290206001808201546002928301805486516000199482161561010002949094011693909304601f810185900485028301850190955284825261082594909391929183018282801561081b5780601f106107f05761010080835404028352916020019161081b565b820191906000526020600020905b8154815290600101906020018083116107fe57829003601f168201915b50505050506114f9565b91506108e4565b60008481526101086020526040908190208054600180830154935160029384018054600160a060020a0390941695949093919283928592918116156101000260001901160480156108be5780601f10610893576101008083540402835291602001916108be565b820191906000526020600020905b8154815290600101906020018083116108a157829003601f168201915b505091505060006040518083038185876185025a03f19250505015156108e45760006000fd5b5b6000848152610108602090815260409182902060018082015482548551600160a060020a033381811683529682018c90529681018390529086166060820181905295881660a082015260c06080820181815260029586018054958616156101000260001901909516959095049082018190527fe3a3a4111a84df27d76b68dc721e65c7711605ea5eee4afd3a9c58195217365c968b959394909390928a9290919060e0830190859080156109da5780601f106109af576101008083540402835291602001916109da565b820191906000526020600020905b8154815290600101906020018083116109bd57829003601f168201915b505097505050505050505060405180910390a16000848152610108602052604081208054600160a060020a03191681556001810182905590610a1f600283018261158e565b5050600192505b5b5b5b5050919050565b60006001541115610a415760006000fd5b6002819055610a4e611513565b6004555b5b50565b600036604051808383808284378201915050925050506040518091039020610a7d81611162565b156106d15760028290555b5b5b5050565b60006000610a9b3361057d565b15610d645782158015610ab25750610ab285611522565b5b80610ac057506000546001145b15610c0357600160a060020a0386161515610b1657610b0f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437506114f9945050505050565b9050610b57565b85600160a060020a03168585856040518083838082843782019150509250505060006040518083038185876185025a03f1925050501515610b575760006000fd5b5b7f9738cd1a8777c86b011f7b01d87d484217dc6ab5154a9d41eda5d14af8caf2923386888787866040518087600160a060020a0316600160a060020a0316815260200186815260200185600160a060020a0316600160a060020a031681526020018060200183600160a060020a0316600160a060020a0316815260200182810382528585828181526020019250808284376040519201829003995090975050505050505050a1610d64565b600036436040518084848082843791909101928352505060408051602092819003830190206000818152610108909352912054909450600160a060020a0316159150508015610c62575060008281526101086020526040902060010154155b8015610c8f5750600082815261010860205260409020600290810154610100600182161502600019011604155b15610cd3576000828152610108602052604090208054600160a060020a031916600160a060020a03881617815560018101869055610cd19060020185856115d6565b505b610cdc826106dd565b1515610d645760408051838152600160a060020a033381811660208401529282018890528816606082015260a0608082018181529082018690527f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32928592909189918b918a918a9160c082018484808284376040519201829003995090975050505050505050a15b5b5b5b5b50949350505050565b600160a060020a033316600090815261010560205260408120549080821515610d9957610e15565b50506000828152610106602052604081206001810154600284900a929083161115610e155780546001908101825581018054839003905560408051600160a060020a03331681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b5b50505050565b600036604051808383808284378201915050925050506040518091039020610e4381611162565b156106d157600154821115610e57576106d1565b6000829055610e646112cd565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15b5b5b5050565b600082815261010660209081526040808320600160a060020a038516845261010590925282205482811515610ed65760009350610eea565b8160020a9050808360010154166000141593505b50505092915050565b60006005600183016101008110610f0657fe5b0160005b505490505b919050565b600060006001541115610f275760006000fd5b825160019081018155600160a060020a033316906005905b0160005b505550600160a060020a033316600090815261010560205260408120600190555b8251811015610fed578281815181101515610f7b57fe5b60209081029091010151600160a060020a03166005600283016101008110610f9f57fe5b0160005b50819055508060020161010560008584815181101515610fbf57fe5b90602001906020020151600160a060020a03168152602001908152602001600020819055505b600101610f64565b60008290555b5b505050565b60003660405180838380828437820191505092505050604051809103902061102081611162565b156106d15781600160a060020a0316ff5b5b5b5050565b600060015411156110485760006000fd5b61105181610a30565b6105768383610f14565b5b5b505050565b600060003660405180838380828437820191505092505050604051809103902061108b81611162565b15610e15576110998361057d565b156110a357610e15565b600160a060020a0384166000908152610105602052604090205491508115156110cb57610e15565b6110d36112cd565b600160a060020a03831660058361010081106110eb57fe5b0160005b5055600160a060020a0380851660008181526101056020908152604080832083905593871680835291849020869055835192835282015281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a15b5b5b50505050565b60025481565b600160a060020a03331660009081526101056020526040812054818082151561118a576112c3565b600085815261010660205260409020805490925015156111ed576000805483556001808401919091556101078054916111c591908301611655565b60028301819055610107805487929081106111dc57fe5b906000526020600020900160005b50555b8260020a905080826001015416600014156112c35760408051600160a060020a03331681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a18154600190116112b057600085815261010660205260409020600201546101078054909190811061127357fe5b906000526020600020900160005b5060009081905585815261010660205260408120818155600180820183905560029091019190915593506112c3565b8154600019018255600182018054821790555b5b5b505050919050565b6101075460005b818110156113ab576101086000610107838154811015156112f157fe5b906000526020600020900160005b50548152602081019190915260400160009081208054600160a060020a03191681556001810182905590611336600283018261158e565b505061010780548290811061134757fe5b906000526020600020900160005b5054156113a25761010660006101078381548110151561137157fe5b906000526020600020900160005b505481526020810191909152604001600090812081815560018101829055600201555b5b6001016112d4565b6106d1610107600061167f565b5b5050565b60015b6001548110156105dc575b600154811080156113ee575060058161010081106113e557fe5b0160005b505415155b156113fb576001016113cb565b5b60016001541180156114225750600154600590610100811061141a57fe5b0160005b5054155b1561143657600180546000190190556113fb565b6001548110801561145c5750600154600590610100811061145357fe5b0160005b505415155b80156114795750600581610100811061147157fe5b0160005b5054155b156114f057600154600590610100811061148f57fe5b0160005b505460058261010081106114a357fe5b0160005b505580610105600060058361010081106114bd57fe5b0160005b505481526020019081526020016000208190555060006005600154610100811015156114e957fe5b0160005b50555b6113c0565b5b50565b600081516020830184f09050803b15610000575b92915050565b600062015180425b0490505b90565b600061152d3361057d565b156105995760045461153d611513565b1115611554576000600355611550611513565b6004555b6003548281011080159061156e5750600254826003540111155b15611583575060038054820190556001610599565b5060005b5b5b919050565b50805460018160011615610100020316600290046000825580601f106115b457506105dc565b601f0160209004906000526020600020908101906105dc91906116a1565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106116175782800160ff19823516178555611644565b82800160010185558215611644579182015b82811115611644578235825591602001919060010190611629565b5b506116519291506116a1565b5090565b815481835581811511610576576000838152602090206105769181019083016116a1565b5b505050565b50805460008255906000526020600020908101906105dc91906116a1565b5b50565b61151f91905b8082111561165157600081556001016116a7565b5090565b90565b61151f91905b8082111561165157600081556001016116a7565b5090565b905600a165627a7a723058209a3af51063f944081cd5ee8601e4e655f25cf7bc219a7983cda60f163f1709a70029'; export const walletLibraryABI = '[{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"removeOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_numOwners","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_lastDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"resetSpentToday","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_spentToday","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"addOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_required","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_h","type":"bytes32"}],"name":"confirm","outputs":[{"name":"o_success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_limit","type":"uint256"}],"name":"initDaylimit","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newLimit","type":"uint256"}],"name":"setDailyLimit","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"execute","outputs":[{"name":"o_hash","type":"bytes32"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_operation","type":"bytes32"}],"name":"revoke","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newRequired","type":"uint256"}],"name":"changeRequirement","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_operation","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"hasConfirmed","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ownerIndex","type":"uint256"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owners","type":"address[]"},{"name":"_required","type":"uint256"}],"name":"initMultiowned","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"kill","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owners","type":"address[]"},{"name":"_required","type":"uint256"},{"name":"_daylimit","type":"uint256"}],"name":"initWallet","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_dailyLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"}],"name":"Confirmation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"}],"name":"Revoke","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"}],"name":"OwnerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newRequirement","type":"uint256"}],"name":"RequirementChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"},{"indexed":false,"name":"created","type":"address"}],"name":"SingleTransact","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"},{"indexed":false,"name":"created","type":"address"}],"name":"MultiTransact","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"initiator","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"}],"name":"ConfirmationNeeded","type":"event"}]'; -export const walletSourceURL = 'https://github.com/paritytech/parity/blob/c4196a5de31e0b97ec42d5263d9db404cea4a776/js/src/contracts/snippets/enhanced-wallet.sol'; +export const walletSourceURL = 'https://github.com/paritytech/parity/blob/6b0e4f9098be6b841353e7c4f116aa86b7c2e3d6/js/src/contracts/snippets/enhanced-wallet.sol'; export const walletLibraryRegKey = 'walletLibrary.v.2'; // Used if no Wallet Library found in registry... diff --git a/js/src/contracts/snippets/enhanced-wallet.sol b/js/src/contracts/snippets/enhanced-wallet.sol index 1f89b1f6f..90a15c070 100644 --- a/js/src/contracts/snippets/enhanced-wallet.sol +++ b/js/src/contracts/snippets/enhanced-wallet.sol @@ -104,7 +104,7 @@ contract WalletLibrary is WalletEvents { // constructor is given number of sigs required to do protected "onlymanyowners" transactions // as well as the selection of addresses capable of confirming them. - function initMultiowned(address[] _owners, uint _required) { + function initMultiowned(address[] _owners, uint _required) only_uninitialized { m_numOwners = _owners.length + 1; m_owners[1] = uint(msg.sender); m_ownerIndex[uint(msg.sender)] = 1; @@ -198,7 +198,7 @@ contract WalletLibrary is WalletEvents { } // constructor - stores initial daily limit and records the present day's index. - function initDaylimit(uint _limit) { + function initDaylimit(uint _limit) only_uninitialized { m_dailyLimit = _limit; m_lastDay = today(); } @@ -211,9 +211,12 @@ contract WalletLibrary is WalletEvents { m_spentToday = 0; } + // throw unless the contract is not yet initialized. + modifier only_uninitialized { if (m_numOwners > 0) throw; _; } + // constructor - just pass on the owner array to the multiowned and // the limit to daylimit - function initWallet(address[] _owners, uint _required, uint _daylimit) { + function initWallet(address[] _owners, uint _required, uint _daylimit) only_uninitialized { initDaylimit(_daylimit); initMultiowned(_owners, _required); } diff --git a/js/src/modals/CreateAccount/store.js b/js/src/modals/CreateAccount/store.js index ab9879b8d..cc2160ab9 100644 --- a/js/src/modals/CreateAccount/store.js +++ b/js/src/modals/CreateAccount/store.js @@ -120,7 +120,6 @@ export default class Store { } @computed get qrAddressValid () { - console.log('qrValid', this.qrAddress, this._api.util.isAddressValid(this.qrAddress)); return this._api.util.isAddressValid(this.qrAddress); } @@ -191,7 +190,7 @@ export default class Store { } // FIXME: Current native signer encoding is not 100% for EIP-55, lowercase for now - this.qrAddress = this._api.util + this.qrAddress = qrAddress && this._api.util ? this._api.util.toChecksumAddress(qrAddress.toLowerCase()) : qrAddress; } diff --git a/js/src/modals/CreateWallet/createWalletStore.js b/js/src/modals/CreateWallet/createWalletStore.js index dd243f179..d614e8041 100644 --- a/js/src/modals/CreateWallet/createWalletStore.js +++ b/js/src/modals/CreateWallet/createWalletStore.js @@ -191,6 +191,8 @@ export default class CreateWalletStore { return null; // exception when registry is not available }) .then((address) => { + console.warn('WalletLibrary address in registry', address); + if (!address || /^(0x)?0*$/.test(address)) { return null; } diff --git a/js/src/redux/providers/balancesActions.js b/js/src/redux/providers/balancesActions.js index 73726e825..edfa7d2d3 100644 --- a/js/src/redux/providers/balancesActions.js +++ b/js/src/redux/providers/balancesActions.js @@ -144,34 +144,37 @@ export function updateTokensFilter (_addresses, _tokens, options = {}) { promises.push(api.eth.uninstallFilter(tokensFilter.filterToId)); } - const promise = Promise.all(promises); + Promise + .all([ + api.eth.blockNumber() + ].concat(promises)) + .then(([ block ]) => { + const topicsFrom = [ TRANSFER_SIGNATURE, addresses, null ]; + const topicsTo = [ TRANSFER_SIGNATURE, null, addresses ]; - const topicsFrom = [ TRANSFER_SIGNATURE, addresses, null ]; - const topicsTo = [ TRANSFER_SIGNATURE, null, addresses ]; + const filterOptions = { + fromBlock: block, + toBlock: 'pending', + address: tokenAddresses + }; - const filterOptions = { - fromBlock: 0, - toBlock: 'pending', - address: tokenAddresses - }; + const optionsFrom = { + ...filterOptions, + topics: topicsFrom + }; - const optionsFrom = { - ...filterOptions, - topics: topicsFrom - }; + const optionsTo = { + ...filterOptions, + topics: topicsTo + }; - const optionsTo = { - ...filterOptions, - topics: topicsTo - }; + const newFilters = Promise.all([ + api.eth.newFilter(optionsFrom), + api.eth.newFilter(optionsTo) + ]); - const newFilters = Promise.all([ - api.eth.newFilter(optionsFrom), - api.eth.newFilter(optionsTo) - ]); - - promise - .then(() => newFilters) + return newFilters; + }) .then(([ filterFromId, filterToId ]) => { const nextTokensFilter = { filterFromId, filterToId, diff --git a/js/src/ui/ConfirmDialog/confirmDialog.js b/js/src/ui/ConfirmDialog/confirmDialog.js index 02f400e93..86f668a28 100644 --- a/js/src/ui/ConfirmDialog/confirmDialog.js +++ b/js/src/ui/ConfirmDialog/confirmDialog.js @@ -69,14 +69,14 @@ export default class ConfirmDialog extends Component { } key='deny' label={ labelDeny || DEFAULT_NO } onClick={ onDeny } />,