Commit Graph

2153 Commits

Author SHA1 Message Date
Robert Habermeier
203fd8a471 Memory-based pruning history size (#4114)
* prune states based on memory param

* pruning memory CLI and usage in sync

* return purged value from memorydb

* calculate memory used incrementally in overlayrecentdb

* refactor shared history pruning code in client

* Fixed usage alignment

* journal_size function for fast memory calculation
2017-01-20 13:25:53 +01:00
keorn
97a60ceab1 Common EngineSigner (#4189)
* remove register_account_provider

* build rpc module

* new dummy client

* common EngineSigner struct

* from -> into

* return Signature, docs
2017-01-20 13:25:17 +01:00
Robert Habermeier
a791cb50a6 Light protocol syncing improvements (#4212)
* remove old lint silencer

* dispatch requests only to peers with higher TD

* dynamic target for sync rounds

* use round pivots instead of frames, fix test

* fix total difficulty calculation for test client

* fix broken reorg algorithm

* fork test, fix ancestor search
2017-01-20 12:41:59 +01:00
Robert Habermeier
3ff9324ec0 LES Peer Info (#4195)
* connected peers function for network service

* get LES peer info in sync API

* new peer info in RPC
2017-01-20 12:41:49 +01:00
Robert Habermeier
5830e03201 Merge pull request #4181 from ethcore/cht-full-nodes
CHT calculations for full nodes
2017-01-19 15:12:44 +01:00
Tomasz Drwięga
24aec5191a Fixing minimal transaction queue price (#4204)
* Fixing minimal transaction queue price

* Fixing tests
2017-01-18 19:44:24 +01:00
keorn
73b80869f5 Remove unnecessary Engine method (#4184)
* remove register_account_provider

* build rpc module

* new dummy client
2017-01-18 18:49:50 +01:00
Tomasz Drwięga
b4ff08beb8 Fixing etherscan price parsing (#4202)
* Fixing etherscan price parsing

* Handling all errors
2017-01-18 17:56:21 +01:00
Robert Habermeier
3040a1c83e Merge pull request #4093 from ethcore/better-timeouts
LES: Better timeouts + Track failed requests
2017-01-18 15:04:48 +01:00
Robert Habermeier
536df809c6 tests + documentation 2017-01-16 17:42:39 +01:00
Robert Habermeier
b960152d5b CHT calculations for full nodes 2017-01-16 17:10:30 +01:00
Robert Habermeier
31aae4ed78 move cht module up a level 2017-01-16 16:55:23 +01:00
Svyatoslav Nikolsky
bac6293309 gas_limit for blocks, mined by Parity will be divisible by 37 (#4154)
* gas_limit for new blocks will divide evenly by 13

* increased PARITY_GAS_LIMIT_DETERMINANT to 37

* separate method for marking mined block

* debug_asserts(gas_limit within protocol range)

* round_block_gas_limit method is now static

* made round_block_gas_limit free-function

* multiplier->multiple [ci skip]
2017-01-16 14:29:51 +01:00
Gav Wood
c2f4716ee2 icarus -> update, increase web timeout. (#4165)
* icarus -> update, increase web timeout.

* Fix estimate gas
2017-01-13 16:30:16 +01:00
Robert Habermeier
f0eab337d8 Merge pull request #4036 from ethcore/on-demand-les-request
On demand LES request
2017-01-13 14:36:48 +01:00
Arkadiy Paronyan
cdc525449a Ropsten fork detection (#4163) 2017-01-13 14:28:10 +01:00
Tomasz Drwięga
e11353f94c UnverifiedTransaction type (#4134)
* Introducing ValidSignedTransaction

* Verifiying transactions in engines

* Widening use of VerifiedSignedTransaction

* Renaming Transactions

* Uncommenting banning queue & Fixing tests

* Fixing json tests

* Fixing pre-homestead test

* Fixing imports

* Addressing grumbles

* Fixing test
2017-01-13 08:51:36 +00:00
Robert Habermeier
7dde02b25d Merge branch 'master' into on-demand-les-request 2017-01-12 11:23:47 +01:00
Gav Wood
311730ea95 Improvements and optimisations to estimate_gas (#4142)
* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.

* Another estimate gas fix.

* Alter balance to maximum possible rather than GP=0.

* Only increase to amount strictly necessary.

* Improvements and optimisations to estimate_gas.

- Introduce proper error type
- Avoid building costly traces

* Fix tests.

* Actually fix testsActually fix tests
2017-01-12 11:06:12 +01:00
Robert Habermeier
78e670812c fix test compilation 2017-01-11 18:57:38 +01:00
Robert Habermeier
e88c62d37d Merge branch 'master' into better-timeouts 2017-01-11 18:55:16 +01:00
Robert Habermeier
7b3c648d3e Merge branch 'master' into better-timeouts 2017-01-11 18:47:09 +01:00
keorn
844b1f8c0d Refactor VoteCollector (#4101)
* dir

* simple validator list

* stub validator contract

* make the engine hold Weak<Client> instead of IoChannel

* validator set factory

* register weak client with ValidatorContract

* check chain security

* add address array to generator

* register provider contract

* update validator set on notify

* add validator contract spec

* simple list test

* split update and contract test

* contract change

* use client in tendermint

* fix deadlock

* step duration in params

* adapt tendermint tests

* add storage fields to test spec

* constructor spec

* execute under wrong address

* create under correct address

* revert

* validator contract constructor

* move genesis block lookup

* add removal ability to contract

* validator contract adding validators

* fix basic authority

* validator changing test

* more docs

* update sync tests

* remove env_logger

* another env_logger

* cameltoe

* hold EngineClient instead of Client

* return error on misbehaviour

* nicer return

* sprinkle docs
2017-01-11 17:56:50 +01:00
Gav Wood
56c546f465 Another minor estimation fix (#4133)
* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.

* Another estimate gas fix.

* Alter balance to maximum possible rather than GP=0.

* Only increase to amount strictly necessary.
2017-01-11 17:51:48 +01:00
Robert Habermeier
7123f19a75 Test harness for lightsync (#4109)
* make on_connect/disconnect public

* free flow params constructor

* Shared ownership of LES handlers

* light provider impl for test client

* skeleton for testing light sync

* have test_client use actual genesis

* fix underflow in provider

* test harnesses for lightsync

* fix tests

* fix test failure caused by test_client changes
2017-01-11 14:39:03 +01:00
Gav Wood
7286d42b7d Fix call/estimate_gas (#4121)
* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.
2017-01-11 14:28:27 +01:00
Tomasz Drwięga
21006da125 Get rid of unsafe code in ethkey, propagate incorrect Secret errors. (#4119)
* Implementing secret

* Fixing tests
2017-01-11 12:16:47 +01:00
Robert Habermeier
5b8a7259c1 Merge branch 'master' into on-demand-les-request 2017-01-11 11:39:43 +01:00
Gav Wood
23feb7998f Use binary chop to estimate gas accurately (#4100)
* Initial sketch.

* Building.

* Fix a few things.

* Fix issue, add tracing.

* Address grumbles

* Raise upper limit if needed

* Fix test.
2017-01-10 18:56:41 +01:00
Arkadiy Paronyan
148ea37687 v1.6 in master (#4113) 2017-01-10 15:41:59 +01:00
Gav Wood
ae144b7f62 Ignore get_price_info test by default. (#4112) 2017-01-10 15:41:48 +01:00
keorn
be30c44179 Validator/authority contract (#3937)
* dir

* simple validator list

* stub validator contract

* make the engine hold Weak<Client> instead of IoChannel

* validator set factory

* register weak client with ValidatorContract

* check chain security

* add address array to generator

* register provider contract

* update validator set on notify

* add validator contract spec

* simple list test

* split update and contract test

* contract change

* use client in tendermint

* fix deadlock

* step duration in params

* adapt tendermint tests

* add storage fields to test spec

* constructor spec

* execute under wrong address

* create under correct address

* revert

* validator contract constructor

* move genesis block lookup

* add removal ability to contract

* validator contract adding validators

* fix basic authority

* validator changing test

* more docs

* update sync tests

* remove env_logger

* another env_logger

* cameltoe

* hold EngineClient instead of Client

* add a comment about lock scope
2017-01-10 12:23:59 +01:00
Tomasz Drwięga
a584c6396c Don't remove out of date local transactions (#4094) 2017-01-09 17:01:09 +01:00
Robert Habermeier
d515ef9a2a test for id_guard behavior 2017-01-09 12:20:44 +01:00
Robert Habermeier
54058e3712 ensure failed requests considered unfulfilled 2017-01-09 11:29:06 +01:00
Robert Habermeier
9c00eb4e8a Zero-alloc trie lookups (#3998)
* triedb cleanup

* factor out common portion of trie query

* allocate far fewer times in node decoding

* fix bench compilation

* introduce OwnedNode variant to make iter fast again

* generalize recorder trait to Query

* decode trie outputs cost-free in state

* test for passing closure as query
2017-01-06 16:18:45 +01:00
Tomasz Drwięga
eb0daea9b9 Removing old transactions from the queue (#4046)
* Removing old transactions from the queue

* Addressing grumbles
2017-01-05 21:16:52 +01:00
keorn
fbc9f0d7fb Add block rewards to more Engines (#4055)
* add block rewards

* imports
2017-01-05 21:16:13 +01:00
Robert Habermeier
b4e713efdc return old trie values on insert and remove (#4053)
* return old trie values on insert and remove

* fix json tests
2017-01-05 21:15:43 +01:00
Tomasz Drwięga
91f864b2b7 Fixing minGasLimit > ceil limit mining issue (#4018) 2017-01-05 12:59:16 +00:00
Robert Habermeier
75b5acf21d use common BasicAccount type 2017-01-05 13:26:14 +01:00
Robert Habermeier
8446a8354b Merge branch 'master' into on-demand-les-request 2017-01-05 13:18:24 +01:00
Robert Habermeier
f1dd96ca5d Merge pull request #3892 from ethcore/lightsync
Naive light client synchronization
2017-01-05 13:17:14 +01:00
Maciej Hirsz
881066243b Merge pull request #4034 from maciejhirsz/mh-pwmsg
Better error messages for PoA chains, closes #4030
2017-01-05 11:13:45 +01:00
keorn
93237045b8 Merge pull request #4019 from ethcore/optional-spec
Make some spec fields optional
2017-01-04 19:25:42 +01:00
Robert Habermeier
f63faea308 test for request_set and remove idle flag 2017-01-04 18:43:11 +01:00
Robert Habermeier
04282be721 use request set to provide better timeouts 2017-01-04 18:00:12 +01:00
Robert Habermeier
6ad0a0baaa fix test imports 2017-01-04 16:12:58 +01:00
Robert Habermeier
ed98c389ca no_peers test 2017-01-04 14:54:50 +01:00
Robert Habermeier
62bc92ff4d Merge branch 'master' into on-demand-les-request 2017-01-04 14:33:45 +01:00