* Add function to update minimum gas price
* Update TestMinerService to handle min_gas_price changes
* Place minimum gas price test behind feature flag
* Update check for fixed gas pricer to be more explicit
* Use errors::unsupported instead of errors::request_rejected
* Add test that fails to set minimum gas price
* Fix test that should fail when setting new gas price
* Put dev dependencies behind feature flag
* Fix deadlock in set_minimal_gas_price()
* Update RPC tests with mocked error response
* Remove unnecessary cfg flag
* Remove duplicate crate imports
* fix(light-rpc): Make `light_sync` generic
The motivation behind this change is to easily mock `light-sync` to make it possible to enable `rpc-integration` tests
for the light-client.
Currently the `rpc's` requires the concrete type `sync::LightSync` which makes it very hard to do so
* fix(bad merge)
* Extract accounts from ethcore.
* Fix ethcore.
* Get rid of AccountProvider in test_helpers
* Fix rest of the code.
* Re-use EngineSigner, fix tests.
* Simplify EngineSigner to always have an Address.
* Fix RPC tests.
* Add deprecation notice to RPCs.
* Feature to disable accounts.
* extract accounts in RPC
* Run with accounts in tests.
* Fix RPC compilation and tests.
* Fix compilation of the binary.
* Fix compilation of the binary.
* Fix compilation with accounts enabled.
* Fix tests.
* Update submodule.
* Remove android.
* Use derive for Default
* Don't build secretstore by default.
* Add link to issue.
* Refresh Cargo.lock.
* Fix miner tests.
* Update rpc/Cargo.toml
Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com>
* Fix private tests.
* Patch available private contracts during private transaction
* Key acl ABI added
* Work with secret store keys moved to the separate struct
* Private tx test refactored
* Revert "Private tx test refactored"
This reverts commit 476c132d692c7a886bc7b7cd7fe47b3d7692bd63.
* Test for calling private contract from another one added
* Test fixed
* Redundant tab removed
* ACL contract processing fixed, test added
* Merge with head
* Expect replaced with closure
* Use jsonrpc crates on local path
* Convert all RPC traits to use jsonrpc-derive
* Use local jsonrpc at top level
* Upgrade remaining jsonrpc dependencies
* Checkout Cargo.lock to master HEAD
* Use jsonrpc-* 10.0.1 from crates.io
* Attribute after docs
* Tx permission contract improvement
* Take in account zero gas price certification when doing transact_contract
* DRY in ServiceTransactionChecker
* Fix typos and regroup mod
* Fix imports
* Simplify code in struct instantiation
Co-Authored-By: VladLupashevskyi <vlad@lupashevskyi.com>
* fix(ManageNetwork): replace Range -> RangeIncls
Fixes `TODO: Range should be changed to RangeInclusive once stable (https://github.com/rust-lang/rust/pull/50758)`
* fix(tests)
* fix(grumbles): off-by-one error in debug_asserts
* RangeInclusive::end() is inclusive which means that if start and end is equal the `debug_assert(range.end() >
range.start()` will fail which is shouldn't
* align with docs
> If permanent unlocking is disabled (the default) then the duration argument will be ignored, and the account will be unlocked for a single signing.
Current behaviour throws an error that is no longer relevant.
* fix test
* Change back to throwing error
* Fix test again
* formatting
* oops
* whitespace fixes
* Replace ethcore-logger with env-logger.
* Fix logger initialization in WASM tests.
* uncomment logger initialization in secret store
* Don't use ethcore-logger in whisper.
* Move ethcore-logger within parity dir.
* Uncomment rest from secret-store.
* Use `let _ =` in private_contract for consistency
* `ok()` to `let _ =` fix in service
* Use `let _ = ` for state_db
Fix: new blocks notifications sometimes missing in pubsub RPC
Implement new struct to pass to `new_blocks()` with extra parameter - `has_more_blocks_to_import`, which was previously used to determine whether the notification should be sent. Now it's up to each implementation to decide what to do.
Updated all implementations to behave as before, except `eth_pubsub`, which will send notification even when the queue is not empty.
Update tests.
* Fill transaction hash on ethGetLog of light client. This is enifficient
but we keep align with spec.
* Using better variables names.
* Expose old fast light get log as `parity_getLogsLight`.
* Update rpc/src/v1/helpers/light_fetch.rs
Fix indent.
Co-Authored-By: cheme <emericchevalier.pro@gmail.com>
* Factor common code between light_logs and logs.
* Remove useless check
* Rename parity light logs to 'parity_getLogsNoTransactionHash'.
Fix indent and extra white lines.
* Use vec instead of tree map to avoid inner function.
* better loop
* closes#7009
adds parity_verifySignature RPC method
* removed unneccesary into
* adds support for chain replay protected signatures
* corrected chain replay protection check
* corrected possible overflow
* added tests
* use checked_sub to prevent possible overflow
* use saturating_mul to prevent possible overflow
* changed method signature to accept r,s,v components
* added unit tests
* more tests
* refactored tests for better readability
moved verify_signature tests to live in the same file.
* removed unneccesary imports
* fixed PR grumbles
* fixed rsv notation
* fixed rsv notation
* renamed BasicAcount to RecoveredAccount, Support zero chain_id
* fixed compile errors
* fixed tests
* doc comment
* feat + fix: Missing blocks in filter_changes RPC
* Implement validity check of reported hashes (in case of re-org) and re-set last_block to the last block reported that is still valid.
* Add const to set history size for validity check (32).
* test: in the case of a re-org we get same block number if hash is different
* Rename db_restore => client
* First step: make it compile!
* Second step: working implementation!
* Refactoring
* Fix tests
* PR Grumbles
* PR Grumbles WIP
* Migrate ancient blocks interating backward
* Early return in block migration if snapshot is aborted
* Remove RwLock getter (PR Grumble I)
* Remove dependency on `Client`: only used Traits
* Add test for recovering aborted snapshot recovery
* Add test for migrating old blocks
* Fix build
* PR Grumble I
* PR Grumble II
* PR Grumble III
* PR Grumble IV
* PR Grumble V
* PR Grumble VI
* Fix one test
* Fix test
* PR Grumble
* PR Grumbles
* PR Grumbles II
* Fix tests
* Release RwLock earlier
* Revert Cargo.lock
* Update _update ancient block_ logic: set local in `commit`
* Update typo in ethcore/src/snapshot/service.rs
Co-Authored-By: ngotchac <ngotchac@gmail.com>
* added sign_191 rpc method
* fixed hash_structured_data return type
* added ConfirmationPayload::SignMessage for non-prefixed signatures, added tests for sign191
* renamed WithValidator -> PresignedTransaction
* rename applicationData to data in test
* adds docs for EIP191Version, renamed SignRequest to EIP191SignRequest
* Replace `tokio_core` with `tokio`.
* Remove `tokio-core` and replace with `tokio` in
- `ethcore/stratum`
- `secret_store`
- `util/fetch`
- `util/reactor`
* Bump hyper to 0.12 in
- `miner`
- `util/fake-fetch`
- `util/fetch`
- `secret_store`
* Bump `jsonrpc-***` to 0.9 in
- `parity`
- `ethcore/stratum`
- `ipfs`
- `rpc`
- `rpc_client`
- `whisper`
* Bump `ring` to 0.13
* Use a more graceful shutdown process in `secret_store` tests.
* Convert some mutexes to rwlocks in `secret_store`.
* Consolidate Tokio Runtime use, remove `CpuPool`.
* Rename and move the `tokio_reactor` crate (`util/reactor`) to
`tokio_runtime` (`util/runtime`).
* Rename `EventLoop` to `Runtime`.
- Rename `EventLoop::spawn` to `Runtime::with_default_thread_count`.
- Add the `Runtime::with_thread_count` method.
- Rename `Remote` to `Executor`.
* Remove uses of `CpuPool` and spawn all tasks via the `Runtime` executor
instead.
* Other changes related to `CpuPool` removal:
- Remove `Reservations::with_pool`. `::new` now takes an `Executor` as an argument.
- Remove `SenderReservations::with_pool`. `::new` now takes an `Executor` as an argument.
* `ExecutionsRequest` from light-clients as read-only
This changes so all `ExecutionRequests` from light-clients are executed
as read-only which the `virtual``flag == true ensures.
This boost up the current transaction to always succeed
Note, this only affects `eth_estimateGas` and `eth_call` AFAIK.
* grumbles(revert renaming) : TransactionProof
* grumbles(trace) : remove incorrect trace
* grumbles(state/prove_tx) : explicit `virt`
Remove the boolean flag to determine that a `state::prove_transaction`
whether it should be executed in a virtual context or not.
Because of that also rename the function to
`state::prove_transction_virtual` to make more clear
* add a new RPC `eth_submitWorkDetail`similar `eth_submitWork`.
It has more details (block hash, error message, and more in future)
in its response and not only the `true` or `false`.
* move RPC submitWorkDetail from namespace eth_ to parity_
* remove SubmitDetailResult type; submitWorkDetail return a error when failed
* change error message of RPC error `cannot_submit_work`.
* remove double imported H256.
* put submit_work_detail into a helper to avoid the duplicate codes.
* 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