* OnDemand no longer loop until there is a query.
All peer known at the time will be queried, and the query fail if all
return no reply.
Returning the failure is done through an empty Vec of reply (the type
of the oneshot channel remains unchanged).
Before this commit the query were send randomly to any peer until there
is a reply (for a query that got no result it was an issue, for other
queries it was quering multiple times the same peers).
After this commit the first query is random but next queries
follows hashmap iterator order.
Test no_capability was broken by this commit (the pending query was
removed).
* OnDemand no longer loop until there is a query.
All peer known at the time will be queried, and the query fail if all
return no reply.
Returning the failure is done through an empty Vec of reply (the type
of the oneshot channel remains unchanged).
Before this commit the query were send randomly to any peer until there
is a reply (for a query that got no result it was an issue, for other
queries it was quering multiple times the same peers).
After this commit the first query is random but next queries
follows hashmap iterator order.
Test no_capability was broken by this commit (the pending query was
removed). If adding some kind of timeout mechanism it could be restored.
* Comment plus better field names.
* No panick on dropped oneshot channel.
* Use Set to avoid counter heuristic
* Cli option `on_demand_nb_retry` for maximum number of retry when doing
on demand query in light client.
* Missing test update for previous commit
* Add a timeout (only when there is no peer to query), that way we do not
set number of query to minimum current number peer or configured number
of query : that way capability test was restored.
* Adding an error type for on_demand, it helps having variant of error
reported at rpc level : choice of rpc error code error might not be
right.
* Duration as constant is nice
* Switch to duration in main too
* Fix indentation (sorry for that).
* Fix error management (bad merge in previous commit)
* Lots of english corrections, major change on the new command parameters :
- use standard '-' instead of '_'
- renaming nb_retry params to 'on-demand-retry-count'
* Provide the actual `account` for eth_coinbase
The previous implementation always provided the `zero address` on
`eth_coinbase` RPC. Now, instead the actual address is returned on
success or an error when no account(s) is found!
* full client `eth_coinbase` return err
In the full-client return an error when no account is found instead of
returning the `zero address`
* Remove needless blocks on single import
* Remove needless `static` lifetime on const
* Fix `rpc_eth_author` test
* Implement EIP234
* Make filter conversion returns error if both blockHash and from/toBlock is found
This also changes PollFilter to store the EthFilter type, instead of the jsonrpc one, saving repeated conversion.
* Return error if block filtering target is not found in eth_getLogs
Use the old behavior (unwrap_or_default) for anywhere else.
* fix test: secret_store
* Fix weird indentation
* Make client log filter return error in case a block cannot be found
* Return blockId error in rpc
* test_client: allow return error on logs
* Add a mocked test for eth_getLogs error
* fix: should return error if from_block/to_block greater than best block number
* Add notes on pending
* Add comment for UNSUPPORTED_REQUEST
* Address grumbles
* Return err if from > to
* ethcore: fix pow difficulty validation
* ethcore: validate difficulty is not zero
* ethcore: add issue link to regression test
* ethcore: fix tests
* ethcore: move difficulty_to_boundary to ethash crate
* ethcore: reuse difficulty_to_boundary and boundary_to_difficulty
* ethcore: fix grumbles in difficulty_to_boundary_aux
* Comply EIP-86 with the new CREATE2 opcode
* Fix rpc compile
* Fix interpreter CREATE/CREATE2 stack pop difference
* Add unreachable! to fix compile
* Fix instruction_info
* Fix gas check due to new stack item
* Add new tests in executive
* Fix have_create2 comment
* Remove all unused references of eip86_transition and block_number
* Remove the dapps system from Parity
* Move node-health outside of dapps
* Fix set dapps list test
* Update Cargo.lock
* Deprecate options
* Add _legacy_ prefixes in Dapps
* Fix tests
* Fix deprecatedness of dapps-path
* 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.
* 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
* Add tx_queue_allow_unknown_local config option
- Previous commit messages:
dispatcher checks if we have the sender account
Add `tx_queue_allow_unknown_local` to MinerOptions
Add `tx_queue_allow_unknown_local` to config
fix order in MinerOptions to match Configuration
add cli flag for tx_queue_allow_unknown_local
Update refs to `tx_queue_allow_unknown_local`
Add tx_queue_allow_unknown_local to config test
revert changes to dispatcher
Move tx_queue_allow_unknown_local to `import_own_transaction`
Fix var name
if statement should return the values
derp de derp derp derp semicolons
Reset dispatch file to how it was before
fix compile issues + change from FLAG to ARG
add test and use `into`
import MinerOptions, clone the secret
Fix tests?
Compiler/linter issues fixed
Fix linter msg - case of constants
IT LIVES
refactor to omit yucky explict return
update comments
Fix based on diff AccountProvider.has_account method
* Refactor flag name + don't change import_own_tx behaviour
fix arg name
Note: force commit to try and get gitlab tests working again 😠
* Add fn to TestMinerService
* Avoid race condition from trusted sources
- refactor the miner tests a bit to cut down on code reuse
- add `trusted` param to dispatch_transaction and import_claimed_local_transaction
Add param to `import_claimed_local_transaction`
Fix fn sig in tests
* Add removed geth compatibility field in log
* Fix mocked tests
* Add field block hash in PollFilter
* Store last block hash info for log filters
* Implement canon route
* Use canon logs for fetching reorg logs
Light client removed logs fetching is disabled. It looks expensive.
* Make sure removed flag is set
* Address grumbles
* Fix concurrent access to signer queue
* Put request back to the queue if confirmation failed
* typo: fix docs and rename functions to be more specific
`request_notify` does not need to be public, and it's renamed to `notify_result`.
`notify` is renamed to `notify_message`.
* Change trace info "Transaction" -> "Request"
* Unordered iterator.
* Use unordered and limited set if full not required.
* Split timeout work into smaller timers.
* Avoid collecting all pending transactions when mining
* Remove println.
* Use priority ordering in eth-filter.
* Fix ethcore-miner tests and tx propagation.
* Review grumbles addressed.
* Add test for unordered not populating the cache.
* Fix ethcore tests.
* Fix light tests.
* Fix ethcore-sync tests.
* Fix RPC tests.
* Update `add_license` script
* run script
* add `remove duplicate lines script` and run it
* Revert changes `English spaces`
* strip whitespaces
* Revert `GPL` in files with `apache/mit license`
* don't append `gpl license` in files with other lic
* Don't append `gpl header` in files with other lic.
* re-ran script
* include c and cpp files too
* remove duplicate header
* rebase nit
* Remove public node related settings
* Fix tests
* Unwrap accounts provider in all rpc apis
* Unwrap AccountProvider in all cli places
* Fix rpc tests
* Lots of println to figure out what eth_getBlockByNumber does/should do
* Remove debugging
* Print warnings when fetching pending blocks
When calling `eth_getBlockByNumber` with `pending`, we now print a deprecation warning and:
* if a pending block is found, use it to respond
* if no pending block is found, respond as if if was a request for `Latest`
Addresses issue #8703 (not sure if it's enough to close it tbh)
* rlp::decode returns Result
* Fix journaldb to handle rlp::decode Result
* Fix ethcore to work with rlp::decode returning Result
* Light client handles rlp::decode returning Result
* Fix tests in rlp_derive
* Fix tests
* Cleanup
* cleanup
* Allow panic rather than breaking out of iterator
* Let decoding failures when reading from disk blow up
* syntax
* Fix the trivial grumbles
* Fix failing tests
* Make Account::from_rlp return Result
* Syntx, sigh
* Temp-fix for decoding failures
* Header::decode returns Result
Handle new return type throughout the code base.
* Do not continue reading from the DB when a value could not be read
* Fix tests
* Handle header decoding in light_sync
* Handling header decoding errors
* Let the DecodeError bubble up unchanged
* Remove redundant error conversion
* Keep all enacted blocks notify in order
* Collect is unnecessary
* Update ChainNotify to use ChainRouteType
* Fix all ethcore fn defs
* Wrap the type within ChainRoute
* Fix private-tx and sync api
* Fix secret_store API
* Fix updater API
* Fix rpc api
* Fix informant api
* Eagerly cache enacted/retracted and remove contain_enacted/retracted
* Fix indent
* tests: should use full expr form for struct constructor
* Use into_enacted_retracted to further avoid copy
* typo: not a function
* rpc/tests: ChainRoute -> ChainRoute::new
* Consolidate crypto functionality in `ethcore-crypto`.
- Move `ecdh`/`ecies` modules to `ethkey`.
- Refactor `ethcore-crypto` to use file per module.
- Replace `subtle` with `ethcore_crypto::is_equal`.
- Add `aes_gcm` module to `ethcore-crypto`.
* Rename `aes::{encrypt,decrypt,decrypt_cbc}` ...
... to `aes::{encrypt_128_ctr,decrypt_128_ctr,decrypt_128_cbc}`.
* WIP
* Replace Rlp with UntrustedRlp in views, explicity unwrap with expect
First pass to get it to compile. Need to figure out whether to do this or to propogate Errors upstream, which would require many more changes to dependent code. If we do this way we are assuming that the views are always used in a context where the rlp is trusted to be valid e.g. when reading from our own DB. So need to fid out whether views are used with data received from an untrusted (e.g. extrernal peer).
* Remove original Rlp impl, rename UntrustedRlp -> Rlp
* Create rlp views with view! macro to record debug info
Views are assumed to be over valid rlp, so if there is a decoding error we record where the view was created in the first place and report it in the expect
* Use $crate in view! macro to avoid import, fix tests
* Expect valid rlp in decode functions for now
* Replace spaces with tabs in new file
* Add doc tests for creating views with macro
* Update rlp docs to reflect removing of UntrustedRlp
* Replace UntrustedRlp usages in private-tx merge
* Implementation of Verifier, Scoring and Ready.
* Queue in progress.
* TransactionPool.
* Prepare for txpool release.
* Miner refactor [WiP]
* WiP reworking miner.
* Make it compile.
* Add some docs.
* Split blockchain access to a separate file.
* Work on miner API.
* Fix ethcore tests.
* Refactor miner interface for sealing/work packages.
* Implement next nonce.
* RPC compiles.
* Implement couple of missing methdods for RPC.
* Add transaction queue listeners.
* Compiles!
* Clean-up and parallelize.
* Get rid of RefCell in header.
* Revert "Get rid of RefCell in header."
This reverts commit 0f2424c9b7319a786e1565ea2a8a6d801a21b4fb.
* Override Sync requirement.
* Fix status display.
* Unify logging.
* Extract some cheap checks.
* Measurements and optimizations.
* Fix scoring bug, heap size of bug and add cache
* Disable tx queueing and parallel verification.
* Make ethcore and ethcore-miner compile again.
* Make RPC compile again.
* Bunch of txpool tests.
* Migrate transaction queue tests.
* Nonce Cap
* Nonce cap cache and tests.
* Remove stale future transactions from the queue.
* Optimize scoring and write some tests.
* Simple penalization.
* Clean up and support for different scoring algorithms.
* Add CLI parameters for the new queue.
* Remove banning queue.
* Disable debug build.
* Change per_sender limit to be 1% instead of 5%
* Avoid cloning when propagating transactions.
* Remove old todo.
* Post-review fixes.
* Fix miner options default.
* Implement back ready transactions for light client.
* Get rid of from_pending_block
* Pass rejection reason.
* Add more details to drop.
* Rollback heap size of.
* Avoid cloning hashes when propagating and include more details on rejection.
* Fix tests.
* Introduce nonces cache.
* Remove uneccessary hashes allocation.
* Lower the mem limit.
* Re-enable parallel verification.
* Add miner log. Don't check the type if not below min_gas_price.
* Add more traces, fix disabling miner.
* Fix creating pending blocks twice on AuRa authorities.
* Fix tests.
* re-use pending blocks in AuRa
* Use reseal_min_period to prevent too frequent update_sealing.
* Fix log to contain hash not sender.
* Optimize local transactions.
* Fix aura tests.
* Update locks comments.
* Get rid of unsafe Sync impl.
* Review fixes.
* Remove excessive matches.
* Fix compilation errors.
* Use new pool in private transactions.
* Fix private-tx test.
* Fix secret store tests.
* Actually use gas_floor_target
* Fix config tests.
* Fix pool tests.
* Address grumbles.
* Private transaction message added
* Empty line removed
* Private transactions logic removed from client into the separate module
* Fixed compilation after merge with head
* Signed private transaction message added as well
* Comments after the review fixed
* Private tx execution
* Test update
* Renamed some methods
* Fixed some tests
* Reverted submodules
* Fixed build
* Private transaction message added
* Empty line removed
* Private transactions logic removed from client into the separate module
* Fixed compilation after merge with head
* Signed private transaction message added as well
* Comments after the review fixed
* Encrypted private transaction message and signed reply added
* Private tx execution
* Test update
* Main scenario completed
* Merged with the latest head
* Private transactions API
* Comments after review fixed
* Parameters for private transactions added to parity arguments
* New files added
* New API methods added
* Do not process packets from unconfirmed peers
* Merge with ptm_ss branch
* Encryption and permissioning with key server added
* Fixed compilation after merge
* Version of Parity protocol incremented in order to support private transactions
* Doc strings for constants added
* Proper format for doc string added
* fixed some encryptor.rs grumbles
* Private transactions functionality moved to the separate crate
* Refactoring in order to remove late initialisation
* Tests fixed after moving to the separate crate
* Fetch method removed
* Sync test helpers refactored
* Interaction with encryptor refactored
* Contract address retrieving via substate removed
* Sensible gas limit for private transactions implemented
* New private contract with nonces added
* Parsing of the response from key server fixed
* Build fixed after the merge, native contracts removed
* Crate renamed
* Tests moved to the separate directory
* Handling of errors reworked in order to use error chain
* Encodable macro added, new constructor replaced with default
* Native ethabi usage removed
* Couple conversions optimized
* Interactions with client reworked
* Errors omitting removed
* Fix after merge
* Fix after the merge
* private transactions improvements in progress
* private_transactions -> ethcore/private-tx
* making private transactions more idiomatic
* private-tx encryptor uses shared FetchClient and is more idiomatic
* removed redundant tests, moved integration tests to tests/ dir
* fixed failing service test
* reenable add_notify on private tx provider
* removed private_tx tests from sync module
* removed commented out code
* Use plain password instead of unlocking account manager
* remove dead code
* Link to the contract changed
* Transaction signature chain replay protection module created
* Redundant type conversion removed
* Contract address returned by private provider
* Test fixed
* Addressing grumbles in PrivateTransactions (#8249)
* Tiny fixes part 1.
* A bunch of additional comments and todos.
* Fix ethsync tests.
* resolved merge conflicts
* final private tx pr (#8318)
* added cli option that enables private transactions
* fixed failing test
* fixed failing test
* fixed failing test
* fixed failing test
* Return null number for pending block in eth_getBlockByNumber
* Inline false in client_query
* block hash for pending should be null
* logsBloom should be null for pending blocks
* Fix test due to logsBloom type change
* 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.
* 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
* rpc: generate new account id for imported wallets
* ethstore: handle duplicate wallet filenames
* ethstore: simplify deduplication of wallet file names
* ethstore: do not dedup wallet filenames on update
* ethstore: fix minor grumbles
* Move miner away from ethcore.
* Fix ethcore to use miner/transaction.
* Fix tests and warnings.
* fixed incorrect merge of the test in the documentation
* rpc: implement personal_sign
* rpc: add test for personal_sign
* rpc: implement personal_ecRecover
* rpc: add test for personal_ecRecover
* rpc: fix order of arguments in personal_sign
* rpc: remove auxiliary methods for sign and ec_recover
* 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
* 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
* rpc: transaction/receipt requests made async
* rpc: light client fetches transaction and uncle by hash/index
* on_demand: request type for transaction index
* serve transaction index requests in light protocol
* add a test for transaction index serving
* fetch transaction and receipts by hash on light client
* fix decoding tests
* light: more lenient cost table parsing (backwards compatible)
* fix tests and warnings
* LES -> PIP
* Update provider.rs
* proper doc comments for public functions
* 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.
* Add RPC eth_chainId for querying the current blockchain chain ID
Currently although we can use `net_version` RPC call to get the
current network ID, there's no RPC for querying the chain ID. This
makes it impossible to determine the current actual blockchain using
the RPC. An ETH/ETC client can accidentally connect to an ETC/ETH RPC
endpoint without knowing it unless it tries to sign a transaction or
it fetch a transaction that is known to have signed with a chain
ID. This has since caused trouble for application developers, such as
MetaMask, to add multi-chain support.
The same RPC endpoint is also about to be merged for ETC's
go-ethereum: https://github.com/ethereumproject/go-ethereum/pull/336
* Add eth_chainId to js's web3 interface
* Add a mocked test for eth_chainId
* Add chainId in js's jsonrpc interfaces
* Change return type for eth_chainId to `Option<u64>`
* Change name eth_chainId to parity_chainId
* Wrong test name and missed var for rpc_parity_chain_id test
* Use U256 to return chainId and fix for master
u64 returns decimal integer, and there seems to be no type called
U64. So here I use U256 to return the hex integer.
* Fix chainID test
Before EIP155 fork number, chainID should be null.
* Change both parity_chainId and transaction::chainId to use U64
This makes it consistent that all chain ids returned are hex string.
* Fix wrong U64 serialization
* 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
* 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.
* RwLock
* getting there
* argh
* parking_lot
* rpc
* wax on wax off
* almost there
* remove lock
* write over read
* works
* linting
* small updates
* dissapearing act
* router update
* complete
* one m
* grumbles1
* grumbles part II
* parking_lot->util
* missed test case
* fied package-lock.json
* small fixes
* 404 tests failing
* cleanup
* cleanup 2
* updates and the likes
* play
* simplify filter
* f-ing bugs
* read->write
* Address own grumbles.
* Fix test.