aboutsummaryrefslogtreecommitdiffstats
path: root/les/backend.go
Commit message (Collapse)AuthorAgeFilesLines
* consensus, miner: stale block mining support (#17506)gary rong2018-08-281-1/+1
| | | | | | | | | | * consensus, miner: stale block supporting * consensus, miner: refactor seal signature * cmd, consensus, eth: add miner noverify flag * cmd, consensus, miner: polish
* all: make indexer configurable (#17188)gary rong2018-08-281-6/+7
|
* cmd, eth, miner: make recommit configurable (#17444)gary rong2018-08-221-1/+1
| | | | | | | | | | | | * cmd, eth, miner: make recommit configurable * cmd, eth, les, miner: polish a bit * miner: filter duplicate sealing work * cmd: remove uncessary conversion * miner: avoid microptimization in favor of cleaner code
* les: fix crasher in NodeInfo when running as server (#17419)Felix Lange2018-08-171-25/+23
| | | | | | | | | | | | | | | | | * les: fix crasher in NodeInfo when running as server The ProtocolManager computes CHT and Bloom trie roots by asking the indexers for their current head. It tried to get the indexers from LesOdr, but no LesOdr instance is created in server mode. Attempt to fix this by moving the indexers, protocol creation and NodeInfo to a new lesCommons struct which is embedded into both server and client. All this setup code should really be cleaned up, but this is just a hotfix so we have to do that some other time. * les: fix commons protocol maker
* light: CHT and bloom trie indexers working in light mode (#16534)Felföldi Zsolt2018-08-161-18/+21
| | | | | | | This PR enables the indexers to work in light client mode by downloading a part of these tries (the Merkle proofs of the last values of the last known section) in order to be able to add new values and recalculate subsequent hashes. It also adds CHT data to NodeInfo.
* cmd, consensus/ethash, eth: miner push notificationsPéter Szilágyi2018-08-101-1/+1
|
* consensus/ethash: move remote agent logic to ethash internal (#15853)gary rong2018-08-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * consensus/ethash: start remote ggoroutine to handle remote mining * consensus/ethash: expose remote miner api * consensus/ethash: expose submitHashrate api * miner, ethash: push empty block to sealer without waiting execution * consensus, internal: add getHashrate API for ethash * consensus: add three method for consensus interface * miner: expose consensus engine running status to miner * eth, miner: specify etherbase when miner created * miner: commit new work when consensus engine is started * consensus, miner: fix some logics * all: delete useless interfaces * consensus: polish a bit
* les: pass server pool to protocol manager (#16947)Felföldi Zsolt2018-06-121-1/+1
|
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-071-1/+2
|
* les: limit LES peer count and improve peer configuration logic (#16010)Felföldi Zsolt2018-02-051-1/+4
| | | | | | * les: limit number of LES connections * eth, cmd/utils: light vs max peer configuration logic
* p2p, p2p/discover, p2p/discv5: implement UDP port sharing (#15200)Felföldi Zsolt2018-01-221-3/+2
| | | | | | | | | | | | | | | This commit affects p2p/discv5 "topic discovery" by running it on the same UDP port where the old discovery works. This is realized by giving an "unhandled" packet channel to the old v4 discovery packet handler where all invalid packets are sent. These packets are then processed by v5. v5 packets are always invalid when interpreted by v4 and vice versa. This is ensured by adding one to the first byte of the packet hash in v5 packets. DiscoveryV5Bootnodes is also changed to point to new bootnodes that are implementing the changed packet format with modified hash. Existing and new v5 bootnodes are both running on different ports ATM.
* cmd, consensus, eth: split ethash related config to it own (#15520)gary rong2017-11-241-1/+1
| | | | | | | | | | * cmd, consensus, eth: split ethash related config to it own * eth, consensus: minor polish * eth, consenus, console: compress pow testing config field to single one * consensus, eth: document pow mode
* les, core/bloombits: post-LES/2 fixes (#15391)Felföldi Zsolt2017-10-271-1/+1
| | | | | | * les: fix topic ID * core/bloombits: fix interface conversion
* les, light: LES/2 protocol version (#14970)Felföldi Zsolt2017-10-241-24/+55
| | | | | | | | | | | | | | | | | | 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, light: send chain events using event.Feed (#14865)Miya Chen2017-08-181-2/+2
|
* les: fix megacheck warnings (#14941)Felföldi Zsolt2017-08-091-2/+1
| | | | | | * les: fix megacheck warnings * les: fixed testGetProofs
* les: code refactoring (#14416)Felföldi Zsolt2017-06-211-12/+28
| | | | | | | | | | | | 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
|
* cmd/utils, node: remove unused solc references and improve RPC config (#14324)bas-vk2017-04-131-5/+1
| | | | | Currently http cors and websocket origins are a comma separated string in the config object. These are replaced with string arrays that are more expressive in case of a config file.
* cmd/geth: add --config file flag (#13875)Felix Lange2017-04-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * p2p/discover, p2p/discv5: add marshaling methods to Node * p2p/netutil: make Netlist decodable from TOML * common/math: encode nil HexOrDecimal256 as 0x0 * cmd/geth: add --config file flag * cmd/geth: add missing license header * eth: prettify Config again, fix tests * eth: use gasprice.Config instead of duplicating its fields * eth/gasprice: hide nil default from dumpconfig output * cmd/geth: hide genesis block in dumpconfig output * node: make tests compile * console: fix tests * cmd/geth: make TOML keys look exactly like Go struct fields * p2p: use discovery by default This makes the zero Config slightly more useful. It also fixes package node tests because Node detects reuse of the datadir through the NodeDatabase. * cmd/geth: make ethstats URL settable through config file * cmd/faucet: fix configuration * cmd/geth: dedup attach tests * eth: add comment for DefaultConfig * eth: pass downloader.SyncMode in Config This removes the FastSync, LightSync flags in favour of a more general SyncMode flag. * cmd/utils: remove jitvm flags * cmd/utils: make mutually exclusive flag error prettier It now reads: Fatal: flags --dev, --testnet can't be used at the same time * p2p: fix typo * node: add DefaultConfig, use it for geth * mobile: add missing NoDiscovery option * cmd/utils: drop MakeNode This exposed a couple of places that needed to be updated to use node.DefaultConfig. * node: fix typo * eth: make fast sync the default mode * cmd/utils: remove IPCApiFlag (unused) * node: remove default IPC path Set it in the frontends instead. * cmd/geth: add --syncmode * cmd/utils: make --ipcdisable and --ipcpath mutually exclusive * cmd/utils: don't enable WS, HTTP when setting addr * cmd/utils: fix --identity
* consensus, core, ethstats: use engine specific block beneficiary (#14318)Péter Szilágyi2017-04-121-0/+1
| | | | | | * consensus, core, ethstats: use engine specific block beneficiary * core, eth, les, miner: use explicit beneficiary during mining
* cmd, les, eth, eth/gasprice: using new gas price oracle (#13853)Felföldi Zsolt2017-04-061-1/+6
| | | | | | | | | | | | * cmd, les, eth, eth/gasprice: using new gas price oracle * eth/gasprice: renamed source file * eth/gasprice: added security checks for gpo params * eth/gasprice: fixed naming issues * eth/gasprice: max limit, maxEmpty
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-051-7/+5
| | | | | 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.
* core: refactor genesis handlingFelix Lange2017-03-231-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | This commit solves several issues concerning the genesis block: * Genesis/ChainConfig loading was handled by cmd/geth code. This left library users in the cold. They could specify a JSON-encoded string and overwrite the config, but didn't get any of the additional checks performed by geth. * Decoding and writing of genesis JSON was conflated in WriteGenesisBlock. This made it a lot harder to embed the genesis block into the forthcoming config file loader. This commit changes things so there is a single Genesis type that represents genesis blocks. All uses of Write*Genesis* are changed to use the new type instead. * If the chain config supplied by the user was incompatible with the current chain (i.e. the chain had already advanced beyond a scheduled fork), it got overwritten. This is not an issue in practice because previous forks have always had the highest total difficulty. It might matter in the future though. The new code reverts the local chain to the point of the fork when upgrading configuration. The change to genesis block data removes compression library dependencies from package core.
* les: implement request distributor, fix blocking issues (#3660)Felföldi Zsolt2017-03-231-0/+2
| | | | | * les: implement request distributor, fix blocking issues * core: moved header validation before chain mutex lock
* cmd, eth, les, node, pow: disk caching and progress reportsPéter Szilágyi2017-03-091-6/+1
|
* all: update light logs (and a few others) to the new modelPéter Szilágyi2017-03-031-1/+1
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-3/+2
|
* cmd,eth,les,internal: remove natspec supportBas van Kervel2017-01-171-2/+0
|
* cmd/utils, eth, les: bubble --fakepow flag into eth/les tooPéter Szilágyi2017-01-041-4/+2
|
* rpc: remove HexNumber, replace all uses with hexutil typesFelix Lange2016-12-201-2/+3
| | | | | This change couldn't be automated because HexNumber was used for numbers of all sizes.
* cmd, ethstats, les, mobile, params: native netstats (#3336)Péter Szilágyi2016-11-251-0/+1
|
* common/httpclient, les: removed httpclientJeffrey Wilcke2016-11-251-3/+0
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-6/+2
| | | | | | | | | | | | | | | 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: print 'experimental feature' warning on startupFelix Lange2016-11-091-0/+3
|
* all: update license informationFelix Lange2016-11-091-1/+1
|
* p2p/discv5: added new topic discovery packageZsolt Felfoldi2016-11-091-1/+1
|
* les: light client protocol and APIZsolt Felfoldi2016-11-091-0/+218