* Use `subtle::slices_equal` for constant time comparison.
Also update the existing version of subtle in `ethcrypto` from
0.1 to 0.5
* Test specifically for InvalidPassword error.
* Very primitive test of the Client API
* [WIP] getting rid of request
* Add support for redirects.
* Remove CpuPool from `fetch::Client`.
* Adapt code to API changes and fix tests.
* Use reference counter to stop background thread.
On `clone` the counter is incremented, on `drop` decremented. Once 0 we
send `None` over the channel, expecting the background thread to end.
* Fix tests.
* Comment.
* Change expect messages.
* Use local test server for testing fetch client.
* Ensure max_size also in BodyReader.
* Replace `Condvar` with `sync_channel`.
* Re-export `url::Url` from `fetch` crate.
* Remove spaces.
* Use random ports in local test server.
* Refactor usage of registry contract
* remove unsed file
* Rename methods & fix comments
* refactor contract_client:
* Intoduced separate traits for asyncronous and syncronous contract clients
* Removed registrar from ethcore::client
* s/ContractClient/AsyncContractClient
* make the tests compile and pass
* omit changes in ethcore
* Use only one trait for ContractClient
* Use an associated type in the trait to determine syncronous or asyncronous communication
* Export the types from contract-client crate
* Document that "A" in the hash correspons to a DNS A Record A.K.A Address Record
* contract_client -> registrar
* address review feedback
* Improves `BestBlock` comment
* Improves `TraceDB` comment
* Improves `journaldb::Algorithm` comment.
Probably the whole enum should be renamed to `Strategy` or something alike.
* Comments some of the `Client`'s fields
* Deglobs client imports
* Fixes comments
* Extracts `import_lock` to `Importer` struct
* Extracts `verifier` to `Importer` struct
* Extracts `block_queue` to `Importer` struct
* Extracts `miner` to `Importer` struct
* Extracts `ancient_verifier` to `Importer` struct
* Extracts `rng` to `Importer` struct
* Extracts `import_old_block` to `Importer` struct
* Adds `Nonce` trait
* Adds `Balance` trait
* Adds `ChainInfo` trait
* Fixes imports for tests using `chain_info` method
* Adds `BlockInfo` trait
* Adds more `ChainInfo` imports
* Adds `BlockInfo` imports
* Adds `ReopenBlock` trait
* Adds `PrepareOpenBlock` trait
* Fixes import in tests
* Adds `CallContract` trait
* Fixes imports in tests using `call_contract` method
* Adds `TransactionInfo` trait
* Adds `RegistryInfo` trait
* Fixes imports in tests using `registry_address` method
* Adds `ScheduleInfo` trait
* Adds `ImportSealedBlock` trait
* Fixes imports in test using `import_sealed_block` method
* Adds `BroadcastProposalBlock` trait
* Migrates `Miner` to static dispatch
* Fixes tests
* Moves `calculate_enacted_retracted` to `Importer`
* Moves import-related methods to `Importer`
* Removes redundant `import_old_block` wrapper
* Extracts `import_block*` into separate trait
* Fixes tests
* Handles `Pending` in `LightFetch`
* Handles `Pending` in filters
* Handles `Pending` in `ParityClient`
* Handles `Pending` in `EthClient`
* Removes `BlockId::Pending`, partly refactors dependent code
* Adds `StateInfo` trait
* Exports `StateOrBlock` and `BlockChain` types from `client` module
* Refactors `balance` RPC using generic API
* Refactors `storage_at` RPC using generic API
* Makes `MinerService::pending_state`'s return type dynamic
* Adds `StateOrBlock` and `BlockChain` types
* Adds impl of `client::BlockChain` for `Client`
* Exports `StateInfo` trait from `client` module
* Missing `self` use
To be fixed up to "Adds impl of `client::BlockChain` for `Client`"
* Adds `number_to_id` and refactors dependent RPC methods
* Refactors `code_at` using generic API
* Adds `StateClient` trait
* Refactors RPC to use `StateClient` trait
* Reverts `client::BlockChain` trait stuff, refactors methods to accept `StateOrBlock`
* Refactors TestClient
* Adds helper function `block_number_to_id`
* Uses `block_number_to_id` instead of local function
* Handles `Pending` in `list_accounts` and `list_storage_keys`
* Attempt to use associated types for state instead of trait objects
* Simplifies `state_at_beginning`
* Extracts `call` and `call_many` into separate trait
* Refactors `build_last_hashes` to accept reference
* Exports `Call` type from the module
* Refactors `call` and `call_many` to accept state and header
* Exports `state_at` in `StateClient`
* Exports `pending_block_header` from `MinerService`
* Refactors RPC `call` method using new API
* Adds missing parentheses
* Refactors `parity::call` to use new call API
* Update .gitlab-ci.yml
fix gitlab lint
* Fixes error handling
* Refactors `traces::call` and `call_many` to use new call API
* Refactors `call_contract`
* Refactors `block_header`
* Refactors internal RPC method `block`
* Moves `estimate_gas` to `Call` trait, refactors parameters
* Refactors `estimate_gas` in RPC
* Refactors `uncle`
* Refactors RPC `transaction`
* Covers missing branches
* Makes it all compile, fixes compiler grumbles
* Adds casts in `blockchain` module
* Fixes `PendingBlock` tests, work on `MinerService`
* Adds test stubs for StateClient and EngineInfo
* Makes `state_db` public
* Adds missing impls for `TestBlockChainClient`
* Adds trait documentation
* Adds missing docs to the `state_db` module
* Fixes trivial compilation errors
* Moves `code_hash` method to a `BlockInfo` trait
* Refactors `Verifier` to be generic over client
* Refactors `TransactionFilter` to be generic over client
* Refactors `Miner` and `Client` to reflect changes in verifier and txfilter API
* Moves `ServiceTransactionChecker` back to `ethcore`
* Fixes trait bounds in `Miner` API
* Fixes `Client`
* Fixes lifetime bound in `FullFamilyParams`
* Adds comments to `FullFamilyParams`
* Fixes imports in `ethcore`
* Fixes BlockNumber handling in `code_at` and `replay_block_transactions`
* fix compile issues
* First step to redundant trait merge
* Fixes compilation error in RPC tests
* Adds mock `State` as a stub for `TestClient`
* Handles `StateOrBlock::State` in `TestBlockChainClient::balance`
* Fixes `transaction_count` RPC
* Fixes `transaction_count`
* Moves `service_transaction.json` to the `contracts` subfolder
* Fixes compilation errors in tests
* Refactors client to use `AccountData`
* Refactors client to use `BlockChain`
* Refactors miner to use aggregate traits
* Adds `SealedBlockImporter` trait
* Refactors miner to use `SealedBlockImporter` trait
* Removes unused imports
* Simplifies `RegistryInfo::registry_address`
* Fixes indentation
* Removes commented out trait bound
* Refactor updater to use ethabi-derive
* Grumble: do_call type alias
* Empty commit to trigger test re-run
* migration to ethabi-5.0
* migration to ethabi-5.0 in progress
* use ethabi_deriven to generate TransactAcl contract
* use ethabi_deriven to generate Registry contract
* hash-fetch uses ethabi_derive, removed retain cycle from updater, fixed#7720
* node-filter crate uses ethabi_derive to generate peer_set contract interface
* use LruCache in node-filter instead of HashMap
* validator_set engine uses ethabi_derive
* ethcore does not depend on native_contracts
* miner does no depend on native_contracts
* secret_store does not use native_contracts (in progress)
* removed native-contracts
* ethcore and updater does not depend on futures
* updated ethereum-types
* fixed all warnings caused by using new version of ethereum-types
* updated ethabi_derive && ethabi_contract to get rid of warnings
* removed another retain cycle in updater, fixed following minor version on update
* moved contracts out of native_contracts res
* updated ethabi_contract
* fixed failing test
* fixed failing test
* there is no need to create two contracts of the same kind any more
* simplify updater::ReleaseTrack conversion into u8 and add several tests for it
* applied review suggestions
* applied review suggestions
* Update Clap dependency and remove workarounds
* WIP
* Remove line breaks in help messages for now
* Multiple values can only be separated by commas (closes#7428)
* Grumbles; refactor repeating code; add constant
* Use a single Wrapper rather than allocate a new one for each call
* Wrap --help to 120 characters rather than 100 characters
* Filter-out nodes.json
* network: sort node table nodes by failure ratio
* network: fix node table tests
* network: fit node failure percentage into buckets of 5%
* network: consider number of attempts in sorting of node table
* network: fix node table grumbles
* kvdb-rocksdb: update rust-rocksdb version
* kvdb-rocksdb: mark corruptions and attempt repair on db open
* kvdb-rocksdb: better corruption detection on open
* kvdb-rocksdb: add corruption_file_name const
* kvdb-rocksdb: rename mark_corruption to check_for_corruption
* updated ethereum-types and tiny-keccak
* Updated several deps
* Updated several more dependencies
* Modify dummy file to trigger ci
* fixed update of memmap to 0.6 in ethash crate
* Fixed fetch after update to latest reqwest
* Updated jsonrpc-core with fixes for serde
* add expects in util/version/build.rs
* Move miner away from ethcore.
* Fix ethcore to use miner/transaction.
* Fix tests and warnings.
* fixed incorrect merge of the test in the documentation
* kvdb-rocksdb: update to RocksDB 5.8.8
* kvdb-rocksdb: tune RocksDB options
* Switch to level-style compaction
* Increase default block size (16K), and use bigger blocks for HDDs (64K)
* Increase default file size base (64MB SSDs, 256MB HDDs)
* Create a single block cache shared across all column families
* Tune compaction settings using RocksDB helper functions, taking into account
memory budget spread across all columns
* Configure backgrounds jobs based on the number of CPUs
* Set some default recommended settings
* ethcore: remove unused config blockchain.db_cache_size
* parity: increase default value for db_cache_size
* kvdb-rocksdb: enable compression on all levels
* kvdb-rocksdb: set global db_write_bufer_size
* kvdb-rocksdb: reduce db_write_bufer_size to force earlier flushing
* kvdb-rocksdb: use master branch for rust-rocksdb dependency
* created the dir crate in util
* moved code from ethstore/src/dir/paths.rs to dir crate
* rename dir module in ethstore to accounts_dir to distinguish it
from the dir crate
* changes after @tomusdrw on #6952
* parity-version module split from util
removed unused util deps and features
trigger buildbot again
only kvdb links rocksdb
snappy linker issues
* rm snappy
* fixed old version imports
* Update packages, pull in compiled-only repos
* Update js-precompiled to point to js-dist-paritytech
* Trigger both js & js-old builds to force update
* Update to bring scripts 100% in-sync
* use tempdir instead of devtools in kvdb-rocksdb
* use tempdir instead of devtools in migration
* use tempdir instead of devtools in ethcore-network
* fixed wrong merge
* oneshot channels instead of custom promises
* Future instead of handle_dispatch
* Even less copying
* Those explicit waits were a mistake, thanks, @tomusdrw
* No more unsafe polling
* Test for the new `is_done()` method
* Mark Futures as `#[must_use]`
* Solve most compilation warnings
* `try_ready!` is more ideomatic
* Turn spaces into tabs
* Documentation and visibility improvements
* Minor code style improvements
* Make Futures run on an explisit reactor
* Another round of code style issues
* Simplify ConfirmationReceiver type
* Flatten ConfirmationOutcome into a plain Result type
* Get rid of a separate `pending` set, it was a stupid idea
* Clarify `add_request` docs
* No need to reduce the scope of the mutex here
* separate migration from util and make its dependencies into libs:
* snappy
* kvdb
* error
* common
* renamed common -> macros
* util error does not depend on snappy module
* ethsync does not depend on util nor ethcore_error
* nibbleslice and nibblevec merged with patricia_trie crate
* removed unused dependencies from util
* util journaldb traits does not need to be public
* util_error
* fixed ethcore compile error
* ignore .swo files
* Update chain.rs
* Bump version.
* Fix RPC crate.
* Fix BoxFuture in crates.
* Compiles and passes tests!
* Get rid of .boxed()
* Fixing issues with the UI.
* Remove minihttp. Support threads.
* Reimplement files serving to do it in chunks.
* Increase chunk size.
* Remove some unecessary copying.
* Fix tests.
* Fix stratum warning and ipfs todo.
* Switch to proper branch of jsonrpc.
* Update Cargo.lock.
* Update docs.
* Include dapps-glue in workspace.
* fixed merge artifacts
* Fix test compilation.
* move common forks and parameters to common params
* port specs over to new format
* fix RPC tests
* parity-machine skeleton
* remove block type
* extract out ethereum-specific methods into EthereumMachine
* beginning to integrate Machine into engines. dealing with stale transitions in Ethash
* initial porting to machine
* move block reward back into engine
* abstract block reward logic
* move last hash and DAO HF logic into machine
* begin making engine function parameters generic
* abstract epoch verifier and ethash block reward logic
* instantiate special ethereummachine for ethash in spec
* optional full verification in verify_block_family
* re-instate tx_filter in a way that works for all engines
* fix warnings
* fix most tests, further generalize engine trait
* uncomment nullengine, get ethcore tests compiling
* fix warnings
* update a bunch of specs
* re-enable engine signer, validator set, and transition handler
* migrate basic_authority engine
* move last hashes into executedblock
* port tendermint
* make all ethcore tests pass
* json-tests compilation
* fix RPC tests: change in gas limit for new block changed PoW hash
* fix minor grumbles
* validate chainspecs
* fix broken import
* fix transaction verification for pre-homestead
* Rebase and fix compilation errors (tests not yet fixed)
* Use `debug_assert` over `assert`
* Fix tests
* Assert safety, clean up
* Fix up stale cache removal, move one assert to debug_assert
* Remove printlns
* Add licenses
* Fix benches
* Inline some no-ops in a hot loop that weren't being inlined
* Add spooky comment to make sure no-one removes the inlining annotations
* Minor cleanup
* Add option to switch between mmap and ram
* Flag ethash to use less memory when running light client
* Fix tests
* Remove todo comment (it's done)
* Replace assertion with error return
* Fix indentation
* Use union instead of `transmute`
* Fix benches
* Extract to constants
* Clean up and fix soundness holes
* Fix formatting
* Ignore missing-file errors
* Make incorrect cache size an error condition instead of a panic, remove dead code
* Fix compilation errors from rebase
* Fix compilation errors in tests
* Fix compilation errors in tests
* Copy modal from keepkey branch and generalize
The keepkey PinMatrix modal needs to be the same for Trezor, but we
should probably try to keep it general since it can be used for both.
* Add trezor communication code
This is a result of much trial-and-error and a couple of dead-ends in
how to communicate and wire everything up.
Code here is still a bit WIP with lots of debug prints and stuff.
The test works though, it is possible to sign a transaction.
* Extend the basic lib to allow Trezor
This is kind of ugly and needs some cleanup and generalization. I’ve
just copy-pasted some things to bring in the trezor wallets. I’ve also
had to add a lock to the USB API so that only one thing talks to the
USB at once.
* Add RPC plumbing needed
We need to be able to get “locked” devices from the frontend to figure
out if we’re going to display the PinMatrix or not. Then we need to be
able to send a pin to a device.
* Add logic to query backend for Trezor and display PinMatrix
There’s a bug somewhere here because signing a transaction fails if you
take too long to press the confirm button on the device.
* Change back to paritytech branch
As my fork has been merged in.
* Converting spaces to tabs, as it should be
* Incorporate correct handling of EIP-155
Turns out the Trezor was adjusting the v part of the signature, and
we’re already doing that so it was done twice.
* Some circular logic here that was incorrect
BE-encoded U256 is almost the same as RLP encoded without the
size-byte, except for <u8 sized values. What’s really done is
BE-encoded U256 and then left-trimmed to the smallest size. Kind of
obvious in hindsight.
* Resolve issue where not clicking fast enough fails
The device will not repeat a ButtonRequest when you read from it, so
you need to have a blocking `read` for whatever amount of time that you
want to give the user to click. You could also have a shorter timeout
but keep retrying for some amount of time, but it would amount to the
same thing.
* Scan after pin entry to make accepting it faster
* Remove ability to cancel pin request
* Some slight cleanup
* Probe for the correct HID Version to determine padding
* Move the PinMatrix from Accounts to Application
* Removing unused dependencies
* Mistake in copying over stuff from keepkey branch
* Simplify FormattedMessage
* Move generated code to external crate
* Remove ethcore-util dependency
* Fix broken import in test
This test is useless without a connected Trezor, not sure how to make
it useful without one.
* Merge branch 'master' into fh-4500-trezor-support
# Conflicts:
# rpc/src/v1/helpers/dispatch.rs
* Ignore test that can't be run without trezor device
* Fixing grumbles
* Avoiding owning data in RPC method
* Checking for overflow in v part of signature
* s/network_id/chain_id
* Propagating an error from the HID Api
* Condensing code a little bit
* Fixing UI.
* Debugging trezor.
* Minor styling tweak
* Make message type into an actual type
This makes the message type that the RPC message accepts into an actual
type as opposed to just a string, based on feedback. Although I’m not
100% sure this has actually improved the situation.
Overall I think the hardware wallet interface needs some refactoring
love.
* Split the trezor RPC endpoint
It’s split into two more generic endpoints that should be suitable for
any hardware wallets with the same behavior to sit behind.
* Reflect RPC method split in javascript
* Fix bug with pin entry
* Fix deadlock for Ledger
* Avoid having a USB lock in just listing locked wallets
* Fix javascript issue (see #6509)
* Replace Mutex with RwLock
* Update Ledger test
* Fix typo causing faulty signatures (sometimes)
* *Actually* fix tests
* Update git submodule
Needed to make tests pass
* Swap line orders to prevent possible deadlock
* Make setPinMatrixRequest an @action
* Refactor and port CLI from Docopt to Clap (#2066)
* Add --can-restart and --force-direct to help
* Add flag support to subc & move import/export options to subcommand
* Reorder subcommand args (put positional args last in CLI help message)
* Node-health to a separate crate.
* Initialize node_health outside of dapps.
* Expose health over RPC.
* Bring back 412 and fix JS.
* Add health to workspace and tests.
* Fix compilation without default features.
* Fix borked merge.
* Revert to generics to avoid virtual calls.
* Fix node-health tests.
* Add missing trailing comma.
* do not cache ACL storage contract
* when error comes before initialization
* initial KeyServerSet commit
* update_nodes_set in maintain
* do not connect to self
* fixed connection establishing
* removed println
* improved KeyServerSet tracing
* moved parsing to KeyServerSet
* re-read only when blockchain is changed
* do not try to connect if not a part of cluster
* improved logging
* fixed tests
* Add checks for additional reserved ip addresses
100.64.0.0/10 and 240.0.0.0/4 are both reserved but not currently
filtered.
* Add check for special purpose addresses
192.0.0.0/24 - Used for the IANA IPv4 Special Purpose Address Registry
* Refactor ip_utils (#5872)
* Add checks for all ipv4 special use addresses
* Add comprehensive ipv4 test cases
* Refactor Ipv6 address checks (#5872)
* Refactor AllowIP (#5872)
* Add IpFilter struct to wrap predefined filter (AllowIP) with custom
allow/block filters.
* Refactor parsing of --allow-ips to handle custom filters.
* Move AllowIP/IpFilter from ethsync to ethcore-network where they
are used.
* Revert Cargo.lock
* Tests for custom ip filters (#5872)
* Add "none" as a valid argument for --allow-ips to allow narrow
custom ranges, eg.: --allow-ips="none 10.0.0.0/8"
* Add tests for parsing filter arguments and node endpoints.
* Add ipnetwork crate to dev dependencies for testing.
* Add ipv6 filter tests (#5872)
* Revert parity-ui-precompiled to master
* Fix minor detail in usage.txt (#5872)
* Spaces to tabs
* Rename IpFilter::new() to ::default()
* Small readability improvements
* Test (#5872)
* Revert "Test (#5872)"
This reverts commit 7a8906430a6dad633fe29df3dca57f1630851fa9.
I also tried unrolling the 256-iteration loop further below, but it actually caused a
slowdown (my guess is either branch prediction stopped kicking in or the instruction
cache was being maculated).
* refactor PriceInfo to use Fetch and reuse the client
* forget Fetch future to keep it running in the background
* update Debug message for price_info::Client
* wrap underlying errors in price_info client
* use debug_struct in price_info client debug implementation
* use global fetch service in price_info client
* rename gas_pricer parameter in RunCmd
* move price_info to its own crate
* fix price_info tests
* replace rustc_serialize with serde_json in price_info
* add documentation for price_info
* remove unused rustc-serialize dependency from ethcore
* fix price_info formatting
* re-export fetch crate in price_info
* remove unused cfg attributes in price_info
* add tests for price_info
* whisper skeleton
* basic message store
* rallying and message logic
* pass host info to network protocol handlers
* choose who starts rally based on node key
* module reshuffling
* mining messages
* prune messages by low PoW until below size target
* associated error type for ethkey generators and `OsRng` generator
* beginnings of RPC
* generic message handler for whisper
* reshuffle code order
* standard payload encoding and decoding
* basic crypto
* minor restructuring of net code
* implement shh_post
* merge?
* implement filters
* rand trait for hash types
* filter RPCs for whisper
* symmetric encryption of payload
* pub-sub
* filter tests
* use only secure random IDs
* attach arbitrary protocols to network
* basic integration of whisper into Parity
* eagerly prune low PoW entries
* broadcast messages with salted topics
* node info RPC
* fix import
* fix leading zeros calculation
* address minor grumbles
* Health endpoint.
* Asynchronous health endpoint.
* Configure time api URL via CLI.
* Tests for TimeChecker.
* Health indication on Status page.
* Adding status indication to tab titles.
* Add status to ParityBar.
* Fixing lints.
* Add health status on SyncWarning.
* Fix health URL for embed.
* Nicer messages.
* Fix tests.
* Fixing JS tests.
* NTP time sync (#5956)
* use NTP to check time drift
* update time module documentation
* replace time_api flag with ntp_server
* fix TimeChecker tests
* fix ntp-server flag usage
* hide status tooltip if there's no message to show
* remove TimeProvider trait
* use Cell in FakeNtp test trait
* share fetch client and ntp client cpu pool
* Add documentation to public method.
* Removing peer count from status.
* Remove unknown upgrade status.
* Send two time requests at the time.
* Revert "Send two time requests at the time."
This reverts commit f7b754b1155076a5a5d8fdafa022801fae324452.
* Defer reporting time synchronization issues.
* Fix tests.
* Fix linting.