aboutsummaryrefslogtreecommitdiffstats
path: root/les/handler.go
Commit message (Collapse)AuthorAgeFilesLines
* various: remove redundant parentheses (#15793)Furkan KAMACI2018-01-031-2/+2
|
* eth, les, light: expose chain config in les node info too (#15732)Péter Szilágyi2017-12-281-3/+14
|
* core, eth, les: fix messy code (#15367)Péter Szilágyi2017-10-251-30/+35
| | | | | | | | * core, eth, les: fix messy code * les: fixed tx status test and rlp encoding * core: add a workaround for light sync
* les, light: LES/2 protocol version (#14970)Felföldi Zsolt2017-10-241-28/+326
| | | | | | | | | | | | | | | | | | This PR implements the new LES protocol version extensions: * new and more efficient Merkle proofs reply format (when replying to a multiple Merkle proofs request, we just send a single set of trie nodes containing all necessary nodes) * BBT (BloomBitsTrie) works similarly to the existing CHT and contains the bloombits search data to speed up log searches * GetTxStatusMsg returns the inclusion position or the pending/queued/unknown state of a transaction referenced by hash * an optional signature of new block data (number/hash/td) can be included in AnnounceMsg to provide an option for "very light clients" (mobile/embedded devices) to skip expensive Ethash check and accept multiple signatures of somewhat trusted servers (still a lot better than trusting a single server completely and retrieving everything through RPC). The new client mode is not implemented in this PR, just the protocol extension.
* core, eth/downloader: commit block data using batches (#15115)Felix Lange2017-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ethdb: add Putter interface and Has method * ethdb: improve docs and add IdealBatchSize * ethdb: remove memory batch lock Batches are not safe for concurrent use. * core: use ethdb.Putter for Write* functions This covers the easy cases. * core/state: simplify StateSync * trie: optimize local node check * ethdb: add ValueSize to Batch * core: optimize HasHeader check This avoids one random database read get the block number. For many uses of HasHeader, the expectation is that it's actually there. Using Has avoids a load + decode of the value. * core: write fast sync block data in batches Collect writes into batches up to the ideal size instead of issuing many small, concurrent writes. * eth/downloader: commit larger state batches Collect nodes into a batch up to the ideal size instead of committing whenever a node is received. * core: optimize HasBlock check This avoids a random database read to get the number. * core: use numberCache in HasHeader numberCache has higher capacity, increasing the odds of finding the header without a database lookup. * core: write imported block data using a batch Restore batch writes of state and add blocks, tx entries, receipts to the same batch. The change also simplifies the miner. This commit also removes posting of logs when a forked block is imported. * core: fix DB write error handling * ethdb: use RLock for Has * core: fix HasBlock comment
* core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-181-0/+1
|
* les: fix megacheck warnings (#14941)Felföldi Zsolt2017-08-091-6/+0
| | | | | | * les: fix megacheck warnings * les: fixed testGetProofs
* Merge pull request #14737 from holiman/txpool_localaccountsPéter Szilágyi2017-07-101-3/+3
|\ | | | | Txpool localaccounts
| * core, eth, les: polish txpool API around local/remote txsPéter Szilágyi2017-07-051-3/+3
| |
* | eth/downloader, les, light: Changes in response to reviewNick Johnson2017-07-031-14/+1
| |
* | eth, les: Refactor downloader peer to use structsNick Johnson2017-06-291-47/+73
| |
* | eth, les, light: Refactor downloader to use blockchain interfaceNick Johnson2017-06-281-3/+1
|/
* les: code refactoring (#14416)Felföldi Zsolt2017-06-211-128/+79
| | | | | | | | | | | | This commit does various code refactorings: - generalizes and moves the request retrieval/timeout/resend logic out of LesOdr (will be used by a subsequent PR) - reworks the peer management logic so that all services can register with peerSet to get notified about added/dropped peers (also gets rid of the ugly getAllPeers callback in requestDistributor) - moves peerSet, LesOdr, requestDistributor and retrieveManager initialization out of ProtocolManager because I believe they do not really belong there and the whole init process was ugly and ad-hoc
* cmd, eth, les, mobile: make networkid uint64 everywherePéter Szilágyi2017-04-251-3/+3
|
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-051-2/+2
| | | | | This commit adds pluggable consensus engines to go-ethereum. In short, it introduces a generic consensus interface, and refactors the entire codebase to use this interface.
* les: implement request distributor, fix blocking issues (#3660)Felföldi Zsolt2017-03-231-9/+57
| | | | | * les: implement request distributor, fix blocking issues * core: moved header validation before chain mutex lock
* all: update light logs (and a few others) to the new modelPéter Szilágyi2017-03-031-37/+31
|
* eth, les, swarm: fix go vet issues sufraced by log15Péter Szilágyi2017-02-231-1/+1
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-36/+35
|
* les: add unknown peers to server pool instead of rejecting themZsolt Felfoldi2017-01-261-3/+0
|
* les: fixed selectPeer deadlock, improved request distributionZsolt Felfoldi2017-01-061-33/+36
| | | | les/flowcontrol: using proper types for relative and absolute times
* Merge pull request #3413 from zsfelfoldi/light-topic4Felix Lange2016-12-131-56/+53
|\ | | | | les, p2p/discv5: implement server pool, improve peer selection, light fetcher and topic searching
| * eth, les: defer starting LES service until ETH initial sync is finishedZsolt Felfoldi2016-12-101-2/+2
| |
| * les: using random request IDsZsolt Felfoldi2016-12-101-2/+2
| |
| * les: improved header fetcher and server statisticsZsolt Felfoldi2016-12-101-31/+22
| |
| * les: fixed light fetcher request ID matchingZsolt Felfoldi2016-12-081-1/+1
| |
| * les: implement light server poolZsolt Felfoldi2016-12-081-45/+51
| |
* | core: bugfix state change race condition in txpool (#3412)bas-vk2016-12-111-2/+6
|/ | | | | | | | The transaction pool keeps track of the current nonce in its local pendingState. When a new block comes in the pendingState is reset. During the reset it fetches multiple times the current state through the use of the currentState callback. When a second block comes in during the reset its possible that the state changes during the reset. If that block holds transactions that are currently in the pool the local pendingState that is used to determine nonces can get out of sync.
* p2p/discv5: fixed bootnode connect issuesZsolt Felfoldi2016-11-141-2/+3
|
* Merge pull request #3179 from obscuren/eip-158Felix Lange2016-11-141-2/+3
|\ | | | | EIP158 & 160 Hardfork
| * core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
* | les: cleaned up logging (#3256)Jeffrey Wilcke2016-11-131-21/+21
|/
* les: add missing nil check and handle quit in findServersZsolt Felfoldi2016-11-111-2/+5
|
* all: update license informationFelix Lange2016-11-091-1/+1
|
* p2p/discv5: added new topic discovery packageZsolt Felfoldi2016-11-091-1/+48
|
* les: light client protocol and APIZsolt Felfoldi2016-11-091-0/+854