Commit Graph

11401 Commits

Author SHA1 Message Date
Marek Kotewicz
802d684994 reduce number of constraints for triedb types (#9043)
* NodeHandle does not require Hasher

* Node does not require Hasher

* change name of the template typo from I to O
2018-07-05 17:15:03 +02:00
Marek Kotewicz
434e018584 bump fs-swap to 0.2.3 so it is compatible with osx 10.11 again (#9050) 2018-07-05 14:18:50 +01:00
Sergey Pepyakin
4839294c86 Recursive test (#9042) 2018-07-05 10:09:01 +03:00
John-John Tedro
71bbcd54ff Introduce more optional features in ethcore (#9020)
* Make work-notify an optional feature

* More optional ethcore features: price-info, stratum

* Make ethcore features part of dependency instead of local features

* Put cfg gate in right location

* Feature gate register function on work-notify
2018-07-05 07:19:59 +02:00
Akira Takizawa
3db353f356 Update ETSC bootnodes (#9038) 2018-07-04 16:57:38 +01:00
Tomasz Drwięga
f4c5ea8378 Optimize pending transactions filter (#9026)
* rpc: return unordered transactions in pending transactions filter

* ethcore: use LruCache for nonce cache

Only clear the nonce cache when a block is retracted

* Revert "ethcore: use LruCache for nonce cache"

This reverts commit b382c19abdb9985be1724c3b8cde83906da07d68.

* Use only cached nonces when computing pending hashes.

* Give filters their own locks, so that they don't block one another.

* Fix pending transaction count if not sealing.

* Clear cache only when block is enacted.

* Fix RPC tests.

* Address review comments.
2018-07-04 16:37:55 +01:00
Wei Tang
6a97a4a11e eip160/eip161 spec: u64 -> BlockNumber (#9044) 2018-07-04 17:28:43 +03:00
Pierre Krieger
79f754e6ac Move the C/C++ example to another directory (#9032) 2018-07-04 13:06:53 +03:00
Wei Tang
e3e2fcc285 bump parking_lot to 0.6 (#9013)
* Bump parking_lot to 0.6

* Bump parity-wasm to 0.31 so it gets rid of parking_lot

ref https://github.com/paritytech/parity-wasm/pull/206

* Update jsonrpc versions

* Update wasmi and pwasm-utils version

* Fix compile

* Update jsonrpc crates
2018-07-03 17:31:08 +02:00
Tomasz Drwięga
00e61a9100 Never drop local transactions from different senders. (#9002) 2018-07-03 11:36:59 +02:00
Thibaut S
f3107214f4 Precise HTTP or WebSockets for JSON-RPC options (#9027)
* Precise HTTP or WS for JSON-RPC options

- Align with https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options
- Make sure the JSON-RPC naming is consistent across the CLI options

* fix comments
2018-07-03 11:34:45 +02:00
Tomasz Drwięga
78e001284f Recently rejected cache for transaction queue (#9005)
* Store recently rejected transactions.

* Don't cache AlreadyImported rejections.

* Make the size of transaction verification queue dependent on pool size.

* Add a test for recently rejected.

* Fix logging for recently rejected.

* Make rejection cache smaller.

* obsolete test removed

* obsolete test removed

* Construct cache with_capacity.
2018-07-02 18:00:06 +01:00
David
9caa868603
Make HashDB generic (#8739)
The `patricia_trie` crate is generic over the hasher (by way of HashDB) and node encoding scheme. Adds a new `patricia_trie_ethereum` crate with concrete impls for Keccak/RLP.
2018-07-02 18:50:05 +02:00
Wei Tang
202c54d423 Only return error log for rustls (#9025) 2018-07-02 16:22:53 +01:00
Afri Schoedon
1051004aee
Update Changelogs for 1.10.8 and 1.11.5 (#9012)
* docs: update changelog for 1.10.8

* docs: update changelog for 1.11.5
2018-07-02 15:42:54 +02:00
Wei Tang
a1a002f4da Attempt to graceful shutdown in case of panics (#8999)
* Handle graceful shutdown with unwinding

* Fix a race condition

* Avoid double exit deadlock

* typo: fix docs

* Fix ethkey cli compilation

* Fix all other cases panic_hook::set -> panic_hook::set_abort

* struct fields do not need to be public

* Add comments on why exiting AtomicBool is needed
2018-07-02 11:53:50 +02:00
Marek Kotewicz
5ef41ed53e simplify kvdb error types (#8924) 2018-07-02 10:04:48 +01:00
Matthew Martin
67721f3413 Add option for user to set max size limit for RPC requests (#9010)
* Add option for user to set max size limit for RPC requests as requested in #8961.

* Add max_payload to tests.

* Change name for max payload option and change value from NUM to MB.

* Fix broken test.

* Fix incorrect indentation.
2018-07-02 10:23:57 +02:00
Niklas Adolfsson
34bf2452c3
bump ntp to 0.5.0 (#9009) 2018-07-02 10:20:22 +02:00
outofgas
8fbb98fb3f Removed duplicate dependency (#9021) 2018-07-02 10:19:56 +02:00
Tomasz Drwięga
1792725651 Minimal effective gas price in the queue (#8934)
* Minimal effective gas price.

* Fix naming, add test

* Fix minimal entry score and add test.

* Fix worst_transaction.

* Remove effective gas price threshold.

* Don't leak gas_price decisions out of Scoring.
2018-06-30 11:11:31 +02:00
André Silva
47ff3a9bee parity: fix db path when migrating to blooms db (#8975) 2018-06-28 12:24:11 +02:00
Wei Tang
ac3a706f0d Preserve the current abort behavior (#8995) 2018-06-27 22:31:20 +02:00
Jim Posen
9b5483a71b Improve should_replace on NonceAndGasPrice (#8980)
* Additional tests for NonceAndGasPrice::should_replace.

* Fix should_replace in the distinct sender case.

* Use natural priority ordering to simplify should_replace.
2018-06-27 15:59:36 -04:00
David
38c31c880f Tentative fix for missing dependency error (#8973)
* Tentative fix for missing dependency error

* Better fix

* Ignore build artifacts from parit-clib
2018-06-27 20:25:49 +02:00
Wei Tang
0bed5976e3 Refactor evm Instruction to be a c-like enum (#8914)
* Add a basic instruction c-like enum

* Fix all compiling errors

* Fix tests

* Access instruction info as a Instruction impl

* Use macro to avoid duplication in from_u8

* Use single space instead of multiple tabs to avoid formatting issue

* Fix evmbin compile

* typo: indentation

* Use if let to remove an expect

* Address grumbles
2018-06-27 13:33:32 +02:00
Tomasz Drwięga
19a6725430 Fix deadlock in blockchain. (#8977) 2018-06-26 20:49:06 +02:00
Afri Schoedon
48a54efcb2 snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 (#8984)
* snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530

* snap: use plugin rust
2018-06-26 19:17:14 +02:00
Wei Tang
c0b0dc5219 Use local parity-dapps-glue instead of crate published at crates.io (#8983)
* Use local parity-dapps-glue instead of crate published at crates.io

* Disable panic=abort and enable lto optimization
2018-06-26 17:37:51 +02:00
Afri Schoedon
683a26c830 parity: omit redundant last imported block number in light sync informant (#8962) 2018-06-26 11:31:22 +02:00
Niklas Adolfsson
1a16f335fa Disable hardware-wallets on platforms that don't support libusb (#8464)
* disable hardware-wallets that don't support libusb

* address grumbles

* nits

* Refactor to get rid off as much annotations asap

* Might consume slight more memory than pure conditional compilation
flags

* formatting nits

* Enable libusb for android

* Tested by it compiling succesfully with `cargo build --target=armv7--linux-androideabi`
* The binary is ~66 MB

```bash
$ size
size target/armv7-linux-androideabi/release/parity
text    	data     	bss     	dec     	hex 		filename
50676230        416200   	31456 		51123886        30c16ae 	target/armv7-linux-androideabi/release/parity
```

* Move all `fake-hardware-wallet` to its own crate

* Removes some conditional compilation flags
* Introduces `fake-hardware-wallet` crate

* return error if no hardware wallets are found
2018-06-26 09:03:38 +02:00
David
4145be863b Bump error-chain and quick_error versions (#8972)
* Update error-chain to 0.12 to silence warnings

* Bump quick_error crate to 1.2.2  to silence linter warnings
2018-06-25 14:20:44 +02:00
Wei Tang
e9f1b38984 EVM benchmark utilities (#8944)
* Make it possible to expose jsontests using feature flag

* Add start_stop_hook for jsontests

* Fix evmbin compile

* Implement vm jsontests times to tsv result

* Use /usr/bin/env to avoid errors on non-Debian systems

* Move evmbin/bench.sh to scripts and add vm_jsontests script for convenience

* Add tempdir as required deps for test-helpers

* Address grumbles on comments

* Detect file/folder automatically and add command docs

* Fix bench script

* times -> timings

* typo: wrong if condition
2018-06-25 11:21:45 +02:00
Afri Schoedon
edd90f153c
parity: hide legacy options from cli --help (#8967)
* parity: hide legacy options from cli --help

* parity: run a spellchecker over --help

* parity: fix casing in cli usage
2018-06-25 10:19:29 +02:00
Afri Schoedon
dec390a89f scripts: fix docker build tag on latest using master (#8952) 2018-06-22 18:48:36 +03:00
Toralf Wittner
41348dead4 Add type for passwords. (#8920)
* Add type for passwords.

* Fix test.

* Simplify `Drop` impls of `Password` and `Memzero`.

* Spaces to tabs.

* Custom `Drop` impl for `Password`.
2018-06-22 15:09:15 +02:00
Afri Schoedon
c473ab97c7 deps: bump fs-swap (#8953) 2018-06-22 12:57:59 +01:00
Niklas Adolfsson
0cd1de769b Eliminate some more transmute() (#8879)
* eliminate some more transmute()

* Address `review comments`

* Make unsafe block smaller
* Use different byte-order than `std`, read words as big endian instead
of little endian!

* Fix IpAddresses nits

* Use `from_be` to work both for big and little endian
* Ipv6 addresses were incorrectly `transmuted`

* remove needless lifetime annotation
2018-06-22 12:51:53 +01:00
Wei Tang
5ae8e8a9ca Restrict vault.json permssion to owner and using random suffix for temp vault.json file (#8932)
* Move dedup retry logic to a separate function

* Use random suffix temp vault filename and restrict permissions to owner
2018-06-22 12:30:48 +01:00
Svyatoslav Nikolsky
796d72f48e print SS.self_public when starting SS node (#8949) 2018-06-22 12:50:06 +02:00
Afri Schoedon
86a8584252
scripts: minor improvements (#8930)
* CI: enable 'latest' docker tag on master pipeline

* CI: mark both beta and stable as stable snap.

* CI: sign all windows binaries
2018-06-22 11:56:06 +02:00
André Silva
6509e90c36 rpc: cap gas limit of local calls (#8943) 2018-06-22 11:12:57 +02:00
Afri Schoedon
09ecd0c583
docs: update changelogs (#8931)
* docs: add changelog for 1.10.7

* docs: add changelog for 1.11.4
2018-06-22 11:06:31 +02:00
André Silva
a6d6adc57f ethcore: fix compilation when using slow-blocks or evm-debug features (#8936)
* ethcore: fix compilation when slow-blocks feature is enabled

* ethcore: fix compilation when evm-debug feature is enabled
2018-06-22 11:00:19 +02:00
Svyatoslav Nikolsky
6be5744be4 fixed blooms dir creation (#8941) 2018-06-22 10:52:01 +02:00
Thibaut S
31b4437b93 Update hardcoded headers (#8925)
* Update kovan.json

Update Kovan to block 7693549

* Update foundation.json

Updated to block #5812225

* Update ropsten.json

Update to 3465217

* Update ropsten.json

use tabs

* Update foundation.json

use tabs

* Update kovan.json

use tabs
2018-06-22 10:49:10 +02:00
Marek Kotewicz
458afcd230 new blooms database (#8712)
* new blooms database

* fixed conflict in Cargo.lock

* removed bloomchain

* cleanup in progress

* all tests passing in trace db with new blooms-db

* added trace_blooms to BlockChainDB interface, fixed db flushing

* BlockChainDB no longer exposes RwLock in the interface

* automatically flush blooms-db after every insert

* blooms-db uses io::BufReader to read files, wrap blooms-db into Mutex, cause fs::File is just a shared file handle

* fix json_tests

* blooms-db can filter multiple possibilities at the same time

* removed enum trace/db.rs CacheId

* lint fixes

* fixed tests

* kvdb-rocksdb uses fs-swap crate

* update Cargo.lock

* use fs::rename

* fixed failing test on linux

* fix tests

* use fs_swap

* fixed failing test on linux

* cleanup after swap

* fix tests

* fixed osx permissions

* simplify parity database opening functions

* added migration to blooms-db

* address @niklasad1 grumbles

* fix license and authors field of blooms-db Cargo.toml

* restore blooms-db after snapshot
2018-06-20 15:13:07 +02:00
André Silva
cf5ae81ced ethstore: retry deduplication of wallet file names until success (#8910) 2018-06-20 17:30:41 +08:00
Thibaut S
08e46432c5 Update ropsten.json (#8926) 2018-06-20 08:49:26 +02:00
Jim Posen
6f11621734 Include node identity in the P2P advertised client version. (#8830) 2018-06-18 15:50:17 +02:00