Commit Graph

203 Commits

Author SHA1 Message Date
Tomasz Drwięga
9108a3bb50 Bump ethabi & ethereum-types. (#8258)
* Bump ethabi & ethereum-types.

* Fix test.

* Fix hex encodings.
2018-04-02 12:12:52 +01:00
Ryan Leung
9c9ddaccec use constant durations (#8278)
* use constant durations

* fix CI

* address comments
2018-04-02 10:47:56 +02:00
Rando
33284e988e
Bump master to 1.11.0 (#8021)
* Bump master to 1.11.0

* Bump price-info

* Bump mac installer version

* Fix gitlab builds
2018-03-03 22:02:33 +01:00
Dmitry Kashitsyn
9d7d6f7108 Client refactoring (#7038)
* 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
2018-03-03 18:42:13 +01:00
Marek Kotewicz
c060d9584d
ethabi version 5 (#7723)
* 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
2018-02-09 09:32:06 +01:00
Marek Kotewicz
d430e7f4e2
Updated dependencies (#7628)
* Updated few dependencies

* Updated parking_lot to 0.5

* Updated backtrace to 0.3.5

* Updated crossbeam to 0.3
2018-01-19 13:46:11 +01:00
Tomasz Drwięga
f044b61f42 Extract some parts of miner from ethcore. (#7353)
* Move miner away from ethcore.

* Fix ethcore to use miner/transaction.

* Fix tests and warnings.

* fixed incorrect merge of the test in the documentation
2018-01-11 17:49:10 +01:00
Nikolay Volf
f5ed31792f fixed sync with client only 2016-05-31 20:54:02 +02:00
Nikolay Volf
8e252d5f1b refactored to merge client & client 2016-05-31 19:52:53 +02:00
Nikolay Volf
0cd8644292 split interfaces 2016-05-31 16:41:15 +02:00
Robert Habermeier
16432129b5 move transaction import error warning into miner implementation 2016-05-30 13:14:32 +02:00
Robert Habermeier
cf18c4bb0a make MinerService object-safe 2016-05-27 18:14:43 +02:00
Robert Habermeier
3f89362630 rename x_latest to latest_x in BlockChainClient 2016-05-27 16:35:42 +02:00
Robert Habermeier
c2a4ed6fc4 change nonce, balance, storage_at to *_latest counterparts 2016-05-27 16:35:41 +02:00
Robert Habermeier
86eab79d9d consolidate [balance/storage]_at and _at_id functionality 2016-05-27 16:35:41 +02:00
Robert Habermeier
2b7fae8fa6 add state_at_id and balance_at_id, integrate with RPC 2016-05-27 16:35:41 +02:00
Tomasz Drwięga
5b0c936fee Fixing clippy warnings 2016-05-26 11:49:58 +02:00
Tomasz Drwięga
fa6b35ec8d Bumping clippy. Fixing warnings (#1139)
* Bumping clippy. Fixing warnings

* Removing unused import

* Fixing complexity and arguments warning on two functions
2016-05-25 17:03:58 +02:00
Marek Kotewicz
ebd0cdbc7a Fixpending (#1074)
* Fix --geth IPC for MacOS.

* fix pending_* methods in MinerService, add pending_receipts

* pending logs

* include pending logs when polling

* fixed returning pending logs multiple timees

* log type

* transactionHash is supplied to pending logs

* miner returns receipts together with hashes

* bring back miners all_transactions used by sync module
2016-05-24 21:56:32 +02:00
Gav Wood
90a272c519 Merge branch 'master' of github.com:ethcore/parity 2016-05-24 16:46:08 +02:00
Tomasz Drwięga
1def165c0b Adding info messages on mined blocks (#1127) 2016-05-23 18:47:11 +02:00
Gav Wood
11f1aeb36e Add info message for mined block. 2016-05-23 18:46:08 +02:00
debris
634679966e Make Id/ID and db/Db/DB usage consistent 2016-05-19 11:00:32 +02:00
Nikolay Volf
6c6bbe9c57 Merge branch 'master' into miner-spec-refact
Conflicts:
	ethcore/src/client/client.rs
	ethcore/src/client/mod.rs
	ethcore/src/client/test_client.rs
	miner/src/miner.rs
2016-05-19 03:51:05 +03:00
Marek Kotewicz
6cff58055d CLI option for using JITEVM (#1103)
* easily configurable vm (in progress)

* completely removed vm_factory from engine

* --jitvm command line flag
2016-05-19 00:44:49 +02:00
Tomasz Drwięga
a950b81ee8 Fixing clippy warnings 2016-05-17 10:32:05 +02:00
Tomasz Drwięga
9b9ea93ff7 Bumping clippy & crossbeam 2016-05-17 09:33:01 +02:00
Nikolay Volf
7c28b1cef9 removed engine retrieval from client public api 2016-05-16 19:43:48 +03:00
Nikolay Volf
994d056922 miner will use separate spec 2016-05-16 19:16:56 +03:00
Nikolay Volf
354ac7d6e5 Limiting result of the execution to execution-specific errors (#1071)
* execution error/result limiting

* missing trailing comma

* fix executive tests

* adding original error as string to the generic transaction error

* 'mallformed'-s all around
2016-05-14 13:28:44 +01:00
Arkadiy Paronyan
ab288268bc Validate signature in Tx queue (#1068)
* moving deps to ethcore/hyper and bumping jsonrpc-http-server version

* Validate signature in tx queue
2016-05-10 11:43:26 +01:00
Tomasz Drwięga
15a8860e8a Fixing clippy warnings 2016-05-04 15:22:22 +02:00
Gav Wood
ac73b2628a Basic Authority (#991)
* Firt commit.

* First non-functional but correct implementation of BasicAuthority.

Still needs:
- Sealing infrastructure.

* Punch a hole to give miner access to key store.

* Fix test built.

* Basic version of synchronous mining.

This will seal a block whenever a new transaction comes through.
To be made better we need a timer which will wait for one second after the
last block before sealing a new one - better still would be to cooperatively
interleave blocks with other sealing nodes.

* Add tests.

* Fix minor issues from repotting.

* Address grumbles.
2016-05-03 17:23:53 +02:00
Tomasz Drwięga
1583f7d434 Prioritizing of local transaction (#1023)
* Changing is_local flag to TransactionOrigin enum

* Prioritize local transactions
2016-05-03 16:14:33 +02:00
arkpar
008d009e3e Version 1.2 2016-05-02 15:02:26 +02:00
Tomasz Drwięga
e2465b1eab Bumping clippy & fixing warnings (#1024)
* Bumping clippy

* Fixing warnings found by clippy
2016-05-02 13:13:12 +02:00
Arkadiy Paronyan
8f7624f5cb Support 'pending' block in RPC (#1007)
* Support `pending` block in RPC

* Forward calls from miner to client in case no pending block is available
2016-04-28 20:47:44 +01:00
Tomasz Drwięga
ea669ac6b6 Enable pending block when there is local transaction pending. (#1005)
* Enabling sealing while importing own transaction

* Fixing import transaction deadlock

* Checking if there are local transactions in queue

* Updating hyper-mio

* Switching to rust-url#1.0.0
2016-04-28 16:36:53 +01:00
Gav Wood
b4fc75828e Update transaction_queue.rs
Avoid extraneous `U256` operations and split-state local.
2016-04-24 22:08:27 +01:00
Tomasz Drwięga
0f4fbadd36 Fixing transaction queue last_nonces update 2016-04-24 19:45:01 +02:00
Tomasz Drwięga
8b84b4f128 Merge branch 'master' into rpc-shared-miner
Conflicts:
	parity/main.rs
2016-04-22 12:16:15 +02:00
Tomasz Drwięga
08a0d42ed3 Compilation fix 2016-04-21 20:53:44 +02:00
Tomasz Drwięga
bacac7d0af Fixing transaction_queue deadlock 2016-04-21 20:42:36 +02:00
Tomasz Drwięga
ef9b49f0b2 Merge branch 'main-refactor' into rpc-shared-miner 2016-04-21 17:38:21 +02:00
Tomasz Drwięga
f5c2bea134 Shared instance of ExternalMiner 2016-04-21 17:32:53 +02:00
Tomasz Drwięga
c47d08e308 Fixing warnings 2016-04-21 16:06:54 +02:00
Tomasz Drwięga
f2a08d57e4 Merge branch 'master' into rpc-logs
Conflicts:
	rpc/src/v1/tests/ethcore.rs
	rpc/src/v1/traits/ethcore.rs
2016-04-19 19:59:50 +02:00
Marek Kotewicz
225a5ee825 removed redundant unwraps (#935)
* removed redundant unwraps

* fixed compilation error, removed warnings

* fixed transaction queue merge conflict

* fixed failing ethminer doc test
2016-04-19 10:35:32 -07:00
Tomasz Drwięga
407ab30503 Using ArrayVec to store logs 2016-04-19 19:22:14 +02:00
debris
314ced57c8 fixed transaction queue merge conflict 2016-04-19 16:20:04 +02:00
Marek Kotewicz
46c8324c52 Merge pull request #974 from ethcore/tx-limit-conf
Configurable limit for transaction queue (CLI & Ethcore-RPC)
2016-04-19 16:02:28 +02:00
Tomasz Drwięga
3c67ac636b Merge branch 'master' into tx-limit-conf
Conflicts:
	miner/src/transaction_queue.rs
2016-04-19 00:03:20 +02:00
Tomasz Drwięga
10e2659600 Fixing last_nonces updating when transactions are removed because of the limit 2016-04-19 00:00:55 +02:00
Tomasz Drwięga
5df817c8e0 Setting limit from CLI 2016-04-18 23:03:41 +02:00
Tomasz Drwięga
cd044ec096 Merge branch 'master' into tx-limit-bug
Conflicts:
	miner/src/transaction_queue.rs
2016-04-18 21:58:19 +02:00
Tomasz Drwięga
caf4d179a2 Even more detailed errors for transaction queue (#969)
* Even more detailed errors for transaction queue

* Small rename

* Removing macros in favour of functions+try!()
2016-04-18 10:34:59 -07:00
Tomasz Drwięga
58c47069d8 Enforce-limit + last_nonces bug 2016-04-18 18:39:14 +02:00
Tomasz Drwięga
41153dd37c Removing macros in favour of functions+try!() 2016-04-18 17:20:35 +02:00
Tomasz Drwięga
2812f8cae6 Small rename 2016-04-18 13:35:19 +02:00
Tomasz Drwięga
881678b613 Even more detailed errors for transaction queue 2016-04-18 13:16:46 +02:00
Tomasz Drwięga
d093c5755e Moving own transaction tracing to miner create 2016-04-17 20:36:37 +02:00
Tomasz Drwięga
5086880093 Additional logging for transactions 2016-04-17 18:26:15 +02:00
Tomasz Drwięga
00372cf747 Removing a transaction from queue now removes all from this sender with lower nonces. (#950)
* Changing  to wipe-out all transactions from particular sender lower then given nonce.

* Changing given nonce to be client_nonce

* Fixing test_client to support proper nonces when transactions are added to blockchain

* Fixing logic for transactions from new blocks in chain
2016-04-14 22:38:23 -07:00
Gav Wood
d909bc05c4 Sensible gas limits for eth_sendTransaction (#953)
* Sensible gas limits for eth_sendTransaction

Fixes #859

* Compile fix.

* Remove !.
2016-04-14 12:01:12 -07:00
Tomasz Drwięga
fbc28ce493 Additional methods for ethcore-specific rpc. Altering miner parameters (#934) 2016-04-12 15:04:40 -07:00
Tomasz Drwięga
6b03a3218c Bumping clippy version 2016-04-12 13:51:39 +02:00
Tomasz Drwięga
3fe21f5931 Ethcore-specific RPC methods (#923)
* Ethcore-specific rpc methods

* Initializing ethcore-rpc
2016-04-11 12:06:32 -07:00
Gav Wood
c48374dbc6 Parameter to allow user to force the sealing mechanism (#918)
* Allow block sealing mechanism to be forced, even when not mining.

* Fix deadlock in dispatch_transaction. Fix tests.

* Horrible workaround for transaction importing.

* Reduce tracing. Cleanups.

* Remove logging.

* Remove broken code inherited from dodgy implementation.

* pre-query tx queue nonce also if any

* remove outside nonce queries

* remove queue nonces
2016-04-11 11:52:33 -07:00
arkpar
3438cda432 Propagate transaction queue 2016-04-06 23:03:07 +02:00
Arkadiy Paronyan
5685fde606 Merge pull request #890 from ethcore/fix_875
fixed #875 and added tests for eth_sendTransaction
2016-04-06 16:24:32 +02:00
debris
d14d590c2b fixed #875 and added tests for eth_sendTransaction 2016-04-06 12:15:20 +02:00
Tomasz Drwięga
85da55a537 Fixing warnings 2016-04-06 10:55:40 +02:00
Tomasz Drwięga
e8fa429438 Bumping clippy 2016-04-06 09:53:56 +02:00
Tomasz Drwięga
2a185963a9 More descriptive expectations to transaction queue consistency. 2016-04-04 08:56:59 +02:00
Gav Wood
5d626c7dd3 Use sensible gas price. 2016-03-28 18:53:33 +02:00
Gav Wood
d150529730 Merge remote-tracking branch 'origin/master' into bettermining 2016-03-27 22:16:24 +02:00
Gav Wood
7c5b171e3f Differentiate between ClosedBlock (can be reopened) and LockedBlock (cannot).
`ClosedBlock`s still keep the pre-finalised state (i.e. state after the last transaction).
`LockedBlock`s do not. New mining algo needs to reopen these `ClosedBlock`s, however enactment
system does not (and `ClosedBlock`s are slower & more hungry), hence the distinction.
2016-03-27 20:33:23 +02:00
Gav Wood
6cac296366 Remove comments. 2016-03-27 15:39:45 +02:00
NikVolf
254ac6f253 checking tx queue 2016-03-27 16:12:21 +03:00
Gav Wood
7d7b315511 Fix tests and a couple of warnings. 2016-03-26 23:35:36 +01:00
Gav Wood
993e16afbd Fix miner, 2016-03-26 20:36:03 +01:00
Gav Wood
b45ed30936 Disable two tests that will require an improved TestBlockChainClient 2016-03-25 16:41:01 +01:00
Gav Wood
d50c9f9fac Merge remote-tracking branch 'origin/master' into bettermining 2016-03-24 23:10:54 +01:00
Gav Wood
830ef7ddfc New mining framework.
Fixes #756.
2016-03-24 23:03:22 +01:00
Arkadiy Paronyan
01a39e4f4e Merge pull request #807 from ethcore/tracegetwork
Fix mining from spinning
2016-03-24 18:27:17 +01:00
Gav Wood
3be2763929 Merge branch 'master' into bettermining 2016-03-24 16:43:17 +00:00
Gav Wood
e214489106 Fix compile. 2016-03-24 13:56:22 +00:00
Gav Wood
0ab57c48c3 Add tracing. 2016-03-24 13:51:51 +00:00
Gav Wood
1700b6a087 Add UsingQueue. 2016-03-24 07:49:54 +00:00
Gav Wood
4e013ba2fc Refactor pending_block to always return invalid txs and sometimes a block.
Docuemnt SealingWork properly.
2016-03-23 16:28:02 +00:00
Gav Wood
97449afbb9 Merge branch 'master' into bettermining 2016-03-23 14:18:16 +01:00
Tomasz Drwięga
c2d2e41624 Fixing future-current transactions clash 2016-03-23 12:23:50 +01:00
Gav Wood
0e026ed11f Fix author reporting. num_cpus for JSONRPC threads. 2016-03-22 19:12:17 +01:00
Gav Wood
a134f939e9 Non-functioning draft of code. 2016-03-22 13:05:18 +01:00
Tomasz Drwięga
ef10c6f637 Avoiding possible overflow when block number gets smaller. 2016-03-20 12:18:41 +01:00
Tomasz Drwięga
48be70e4a8 Fixing ethminer doctest 2016-03-18 20:45:07 +01:00
Tomasz Drwięga
f8dd1a6354 Merge branch 'master' into tx_queue_timeout
Conflicts:
	ethcore/src/client/test_client.rs
	miner/src/miner.rs
2016-03-18 19:36:32 +01:00
Gav Wood
2309e19fd9 Merge pull request #760 from ethcore/tx_queue_gas_limit
Avoid importing transactions with gas above 1.1*block_gas_limit to transaction queue
2016-03-18 18:05:26 +01:00
Gav Wood
a1fb0619bb Merge pull request #752 from ethcore/tx_queue_invalid
Removing transactions that failed to be pushed to block.
2016-03-18 18:03:11 +01:00
Tomasz Drwięga
0dc1ddef9a Flipping sealing_enabled flag after no requests for sealing_block for some time 2016-03-18 13:59:11 +01:00