aboutsummaryrefslogtreecommitdiffstats
path: root/eth
Commit message (Collapse)AuthorAgeFilesLines
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-1742-284/+284
|
* core: set extended round block reward to zero (#298)Wei-Ning Huang2019-06-131-0/+1
| | | | | To discourage DKG set from prolonging the round indefinitely, we set the block reward of the extended round to 0. The gas fee is send to the DEXON governance owner for safe keeping and later used by the foundation.
* app: new app test flow (#244)bojie2019-06-121-4/+0
|
* app: remove pending block logic (#149)bojie2019-06-121-1/+1
|
* app: implement logic for prepare/verify correctly when chain number change ↵bojie2019-06-121-0/+4
| | | | (#118)
* api: allow sending batch of raw transactionsWei-Ning Huang2019-06-121-0/+4
|
* dex: use dex/downloader in dexSonic2019-06-122-12/+12
| | | | | To compatible with ethereum code base, make Downloader a interface in internal/ethapi
* core: refactor validator and fix light node sync (#25)Wei-Ning Huang2019-06-121-1/+1
| | | | | | | | Remove custom Dexon validator by adding a new `ValidateWitnessData` method into the validator interface. This allow us to properly detect know blocks. This also allow other gdex "light" client to sync compaction chain. Also, setup a standalone RPC node for handling RPC reqeusts.
* consensus: dexcon: fetch config from stateWei-Ning Huang2019-06-121-5/+0
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-1242-285/+285
|
* Add initial DEXON consensus engine implementation skeletonWei-Ning Huang2019-06-121-0/+5
|
* eth, les, light: enforce CHT checkpoints on fast-sync tooPéter Szilágyi2019-04-176-103/+196
|
* eth, les, geth: implement cli-configurable global gas cap for RPC calls (#19401)Martin Holst Swende2019-04-082-0/+7
| | | | | | | | * eth, les, geth: implement cli-configurable global gas cap for RPC calls * graphql, ethapi: place gas cap in DoCall * ethapi: reformat log message
* eth: make tracers respect pre- EIP 158/161 ruleMartin Holst Swende2019-02-101-4/+8
|
* core, eth: fix database version (#18429)gary rong2019-01-111-2/+4
| | | | | | * core, eth: fix database version * eth: polish error message
* eth/tracer: extend create2 (#18318)gary rong2019-01-066-10/+122
| | | | | | | | | | * eth/tracer: extend create2 * eth/tracers: fix create2-flaw in prestate_tracer * eth/tracers: fix test * eth/tracers: update assets
* vendor, crypto, swarm: switch over to upstream sha3 packageDave McGregor2019-01-041-2/+2
|
* eth/downloader: progress in stateSync not used anymore (#17998)Wenbiao Zheng2018-12-221-7/+4
|
* downloader: fix edgecase where returned index is OOB for downloader (#18335)Martin Holst Swende2018-12-201-1/+9
| | | | | | | | * downloader: fix edgecase where returned index is OOB for downloader * downloader: documentation Co-Authored-By: holiman <martin@swende.se>
* cmd/geth, core, eth: implement Constantinople override flag (#18273)Martin Holst Swende2018-12-112-1/+5
| | | | | | | | * geth/core/eth: implement constantinople override flag * les: implemnent constantinople override flag for les clients * cmd/geth, eth, les: fix typo, move flag to experimentals
* cmd/utils, eth: minor polishes on whitelist codePéter Szilágyi2018-12-101-18/+11
|
* cmd, eth: Add support for `--whitelist <blocknum>=<hash>,...` flagRyan Schneider2018-12-105-5/+32
| | | | | * Rejects peers that respond with a different hash for any of the passed in block numbers. * Meant for emergency situations when the network forks unexpectedly.
* eth, internal/web3ext: tiny polishes in tracersPéter Szilágyi2018-12-101-77/+95
|
* cmd/evm, core/vm, eth: implement api methods to do stdjson dump to local ↵Martin Holst Swende2018-12-101-11/+130
| | | | filesystem
* eth/tracers: fixed incorrect storage from prestate_tracer (#18253)Max Sistemich2018-12-102-17/+14
| | | | | | * eth: fixed incorrect storage from prestate_tracer * eth/tracers: updated assets.go
* core, internal, eth, miner, les: Take VM config from BlockChain (#17955)Paweł Bylica2018-12-061-2/+2
| | | | | | | | | | | Until this commit, when sending an RPC request that called `NewEVM`, a blank `vm.Config` would be taken so as to set some options, based on the default configuration. If some extra configuration switches were passed to the blockchain, those would be ignored. This PR adds a function to get the config from the blockchain, and this is what is now used for RPC calls. Some subsequent changes need to be made, see https://github.com/ethereum/go-ethereum/pull/17955#pullrequestreview-182237244 for the details of the discussion.
* eth/downloader: fix light client cht binary search issuePéter Szilágyi2018-11-281-0/+22
|
* eth: increase timeout in TestBroadcastBlock (#18064)Felix Lange2018-11-231-2/+2
|
* core, eth/downloader: fix ancestor lookup for fast syncPéter Szilágyi2018-11-162-13/+50
|
* downloader: different sync strategyMartin Holst Swende2018-11-162-39/+155
|
* eth: fix comment typo (#18114)mr_franklin2018-11-152-2/+2
| | | | | | * consensus/clique: fix comment typo * eth,eth/downloader: fix comment typo
* cmd, core, eth, light, trie: add trie read caching layerPéter Szilágyi2018-11-155-21/+41
|
* eth: fix minor grammar issue in comment (#18091)mr_franklin2018-11-131-1/+1
|
* core/vm, eth/tracers: use pointer receiver for GetRefund (#18018)Corey Lin2018-11-081-1/+1
|
* eth, p2p: fix comment typos (#18014)Corey Lin2018-11-081-1/+1
|
* eth/downloader: speed up tests by generating chain only once (#17916)Felix Lange2018-11-072-544/+491
| | | | | | | | | | | | * core: speed up GenerateChain Use a mock implementation of ChainReader instead of creating and destroying a BlockChain object for each generated block. * eth/downloader: speed up tests by generating chain only once This change reworks the downloader tests so they share a common test blockchain instead of generating a chain in every test. The tests are roughly twice as fast now.
* eth/downloader: remove the expired id directly (#17963)Wenbiao Zheng2018-11-071-4/+3
|
* core, eth/downloader: fix validation flaw, fix downloader printout flaw (#17974)Martin Holst Swende2018-11-071-0/+1
|
* downloader: measure successfull deliveries, not failed (#17983)Martin Holst Swende2018-11-071-8/+11
| | | | | | * downloader: measure successfull deliveries, not failed * downloader: fix typos
* eth/downloader: SetBlocksIdle is not used (#17962)Wenbiao Zheng2018-10-241-7/+0
| | | | | | __ <(o )___ ( ._> / `---'
* core/vm: adds refund as part of the json standard trace (#17910)Martin Holst Swende2018-10-232-7/+20
| | | | | | | This adds the global accumulated refund counter to the standard json output as a numeric json value. Previously this was not very interesting since it was not used much, but with the new sstore gas changes the value is a lot more interesting from a consensus investigation perspective.
* eth/downloader: fix comment typos (#17956)Wenbiao Zheng2018-10-232-6/+6
|
* eth/downloader: fix invalid hash chain error due to head mini reorgPéter Szilágyi2018-10-052-3/+40
|
* core/vm: faster create/create2 (#17806)Martin Holst Swende2018-10-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | * core/vm/runtim: benchmark create/create2 * core/vm: do less hashing in CREATE2 * core/vm: avoid storing jumpdest analysis for initcode * core/vm: avoid unneccesary lookups, remove unused fields * core/vm: go formatting tests * core/vm: save jumpdest analysis locally * core/vm: use common.Hash instead of nil, fix review comments * core/vm: removed type destinations * core/vm: correct check for empty hash * eth: more elegant api_tracer * core/vm: address review concerns
* eth: fixed the minor typo inside the comments (#17830)Liang Ma2018-10-041-1/+1
|
* core, internal/ethapi: add and use LRU cache for receipts (#17610)Ryan Schneider2018-09-301-10/+2
|
* eth: broadcast blocks to at least 4 peers (#17725)ledgerwatch2018-09-302-8/+109
|
* eth/downloader: use intermediate variable for better readability (#17510)Wenbiao Zheng2018-09-301-4/+8
|
* internal/ethapi: add eth_chainId method (#17617)HackyMiner2018-09-301-0/+9
| | | This implements EIP-695.
* all: new p2p node representation (#17643)Felix Lange2018-09-254-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Package p2p/enode provides a generalized representation of p2p nodes which can contain arbitrary information in key/value pairs. It is also the new home for the node database. The "v4" identity scheme is also moved here from p2p/enr to remove the dependency on Ethereum crypto from that package. Record signature handling is changed significantly. The identity scheme registry is removed and acceptable schemes must be passed to any method that needs identity. This means records must now be validated explicitly after decoding. The enode API is designed to make signature handling easy and safe: most APIs around the codebase work with enode.Node, which is a wrapper around a valid record. Going from enr.Record to enode.Node requires a valid signature. * p2p/discover: port to p2p/enode This ports the discovery code to the new node representation in p2p/enode. The wire protocol is unchanged, this can be considered a refactoring change. The Kademlia table can now deal with nodes using an arbitrary identity scheme. This requires a few incompatible API changes: - Table.Lookup is not available anymore. It used to take a public key as argument because v4 protocol requires one. Its replacement is LookupRandom. - Table.Resolve takes *enode.Node instead of NodeID. This is also for v4 protocol compatibility because nodes cannot be looked up by ID alone. - Types Node and NodeID are gone. Further commits in the series will be fixes all over the the codebase to deal with those removals. * p2p: port to p2p/enode and discovery changes This adapts package p2p to the changes in p2p/discover. All uses of discover.Node and discover.NodeID are replaced by their equivalents from p2p/enode. New API is added to retrieve the enode.Node instance of a peer. The behavior of Server.Self with discovery disabled is improved. It now tries much harder to report a working IP address, falling back to 127.0.0.1 if no suitable address can be determined through other means. These changes were needed for tests of other packages later in the series. * p2p/simulations, p2p/testing: port to p2p/enode No surprises here, mostly replacements of discover.Node, discover.NodeID with their new equivalents. The 'interesting' API changes are: - testing.ProtocolSession tracks complete nodes, not just their IDs. - adapters.NodeConfig has a new method to create a complete node. These changes were needed to make swarm tests work. Note that the NodeID change makes the code incompatible with old simulation snapshots. * whisper/whisperv5, whisper/whisperv6: port to p2p/enode This port was easy because whisper uses []byte for node IDs and URL strings in the API. * eth: port to p2p/enode Again, easy to port because eth uses strings for node IDs and doesn't care about node information in any way. * les: port to p2p/enode Apart from replacing discover.NodeID with enode.ID, most changes are in the server pool code. It now deals with complete nodes instead of (Pubkey, IP, Port) triples. The database format is unchanged for now, but we should probably change it to use the node database later. * node: port to p2p/enode This change simply replaces discover.Node and discover.NodeID with their new equivalents. * swarm/network: port to p2p/enode Swarm has its own node address representation, BzzAddr, containing both an overlay address (the hash of a secp256k1 public key) and an underlay address (enode:// URL). There are no changes to the BzzAddr format in this commit, but certain operations such as creating a BzzAddr from a node ID are now impossible because node IDs aren't public keys anymore. Most swarm-related changes in the series remove uses of NewAddrFromNodeID, replacing it with NewAddr which takes a complete node as argument. ToOverlayAddr is removed because we can just use the node ID directly.
* eth, miner: prefer locally generated uncles vs remote ones (#17715)gary rong2018-09-211-1/+1
| | | | | | * core, eth: fix dependency cycle * eth, miner: perfer to locally generated uncle
* core, eth: fix dependency cycle (#17720)gary rong2018-09-211-9/+39
|
* all: protect self-mined block during reorg (#17656)gary rong2018-09-203-4/+28
|
* core/vm: add switches to select evm+ewasm interpreters (#17687)Guillaume Ballet2018-09-202-1/+10
| | | | | Interpreter initialization is left to the PRs implementing them. Options for external interpreters are passed after a colon in the `--vm.ewasm` and `--vm.evm` switches.
* all: fix various comment typos (#17591)HackyMiner2018-09-201-1/+1
| | | | | | * swarm: fixed comment typo * eth: fixed comment typo * cmd/puppeth: fixed comment typo
* core, eth: fix goimports for Go 1.11Péter Szilágyi2018-09-192-6/+6
|
* all: simplify s[:] to s where s is a slice (#17673)Emil2018-09-151-4/+4
|
* core/vm: Hide read only flag from Interpreter interface (#17461)Paweł Bylica2018-09-081-1/+1
| | | | | Makes Interface interface a bit more stateless and abstract. Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
* core, eth, trie: use common/prque (#17508)Wenbiao Zheng2018-09-032-21/+21
|
* cmd, core, eth, miner, params: configurable gas floor and ceilPéter Szilágyi2018-08-294-3/+19
|
* consensus, miner: stale block mining support (#17506)gary rong2018-08-284-6/+12
| | | | | | | | | | * 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-282-12/+7
|
* all: remove the duplicate 'the' in annotations (#17509)Wenbiao Zheng2018-08-272-2/+2
|
* cmd, eth: clean up miner startup API, drop noop config fieldPéter Szilágyi2018-08-234-60/+69
|
* cmd, eth: apply default miner recommit setting (#17479)gary rong2018-08-221-0/+1
|
* cmd, eth, miner: make recommit configurable (#17444)gary rong2018-08-224-21/+61
| | | | | | | | | | | | * 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
* eth: upgradedb subcommand was dropped (#17464)Pierre Neter2018-08-211-1/+1
|
* Merge pull request #17460 from holiman/tracerfixPéter Szilágyi2018-08-211-0/+3
|\ | | | | Ensure from < to when tracing chain
| * eth: ensure from<to when tracing chain (credits Chen Nan via bugbounty)Martin Holst Swende2018-08-211-0/+3
| |
* | light: CHT and bloom trie indexers working in light mode (#16534)Felföldi Zsolt2018-08-162-13/+12
| | | | | | | | | | | | | | 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.
* | Merge pull request #17347 from karalabe/miner-notifyPéter Szilágyi2018-08-132-4/+5
|\ \ | |/ |/| cmd, consensus/ethash, eth: miner push notifications
| * cmd, consensus/ethash, eth: miner push notificationsPéter Szilágyi2018-08-102-4/+5
| |
* | eth, trie: fix tracer GC which accidentally pruned the metarootPéter Szilágyi2018-08-091-2/+6
|/
* consensus/ethash: move remote agent logic to ethash internal (#15853)gary rong2018-08-032-42/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* eth/filters: fix the block range assignment for log filter (#17284)gary rong2018-07-311-8/+6
|
* all: simplify switches (#17267)Oleg Kovalov2018-07-303-10/+3
| | | | | | * all: simplify switches * silly mistake
* eth/filters: improve error message for invalid filter topics (#17234)Ian Macalinao2018-07-241-2/+2
|
* Merge pull request #16734 from reductionista/eip234Péter Szilágyi2018-07-246-52/+160
|\ | | | | eth/filters, interfaces: EIP-234 Add blockHash option to eth_getLogs
| * accounts, eth, les: blockhash based filtering on all code pathsPéter Szilágyi2018-07-126-60/+111
| |
| * eth/filters, ethereum: EIP-234 add blockHash param for eth_getLogsDomino Valdano2018-07-122-13/+70
| |
* | eth/tracers: fix noop tracer (#17220)emile2018-07-232-3/+3
| |
* | all: switch out defunct set library to different one (#16873)Ralph Caraveo III2018-07-161-9/+9
|/ | | | | | * keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set. * whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
* trie: cache collapsed tries node, not rlp blobs (#16876)Péter Szilágyi2018-06-211-3/+3
| | | | | | | | | | | | The current trie memory database/cache that we do pruning on stores trie nodes as binary rlp encoded blobs, and also stores the node relationships/references for GC purposes. However, most of the trie nodes (everything apart from a value node) is in essence just a collection of references. This PR switches out the RLP encoded trie blobs with the collapsed-but-not-serialized trie nodes. This permits most of the references to be recovered from within the node data structure, avoiding the need to track them a second time (expensive memory wise).
* tracers: fix err in 4byte, add some opcode analysis toolsMartin Holst Swende2018-06-205-3/+214
|
* eth: conform better to the golint standards (#16783)williambannas2018-06-147-26/+27
| | | | | | * eth: made changes to conform better to the golint standards * eth: fix comment nit
* eth/filters: make filterLogs func more readable (#16920)knarfeh2018-06-141-3/+3
|
* eth/fetcher: fix annotation (#16969)Wenbiao Zheng2018-06-131-1/+1
|
* core, eth, les: more efficient hash-based header chain retrieval (#16946)Felföldi Zsolt2018-06-121-14/+23
|
* core: improve getBadBlocks to return full block rlp (#16902)Martin Holst Swende2018-06-111-2/+27
| | | | | | | | * core: improve getBadBlocks to return full block rlp * core, eth, ethapi: changes to getBadBlocks formatting * ethapi: address review concerns
* eth/tracers: fix minor off-by-one error (#16879)Martin Holst Swende2018-06-052-15/+56
| | | | | | * tracing: fix minor off-by-one error * tracers: go generate
* core, eth, trie: streaming GC for the trie cache (#16810)Péter Szilágyi2018-06-042-3/+7
| | | | | | * core, eth, trie: streaming GC for the trie cache * trie: track memcache statistics
* trie: rename TrieSync to Sync and improve hexToKeybytes (#16804)Wenbiao Zheng2018-05-291-1/+1
| | | | | | | This removes a golint warning: type name will be used as trie.TrieSync by other packages, and that stutters; consider calling this Sync. In hexToKeybytes len(hex) is even and (even+1)/2 == even/2, remove the +1.
* common: improve documentation comments (#16701)kiel barry2018-05-291-1/+1
| | | | | This commit adds many comments and removes unused code. It also removes the EmptyHash function, which had some uses but was silly.
* eth/fetcher: reuse variables for hash and number (#16819)Smilenator2018-05-291-4/+4
|
* eth, node, trie: fix minor typos (#16802)Wenbiao Zheng2018-05-241-5/+5
|
* eth: propagate blocks and transactions asyncPéter Szilágyi2018-05-212-12/+117
|
* core, eth: minor txpool event cleanupsPéter Szilágyi2018-05-189-24/+24
|
* all: collate new transaction events togetherrjl4934564422018-05-189-50/+62
|
* all: get rid of error when creating memory database (#16716)gary rong2018-05-097-16/+14
| | | | | | | | * all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition
* eth/filter: check nil pointer when unsubscribe (#16682)gary rong2018-05-091-41/+58
| | | | | | | | | | * eth/filter: check nil pointer when unsubscribe * eth/filters, accounts, rpc: abort system if subscribe failed * eth/filter: add crit log before exit * eth/filter, event: minor fixes
* eth: golint fixes to variable names (#16711)kiel barry2018-05-093-41/+41
|
* eth/filters: derive FilterCriteria from ethereum.FilterQuery (#16629)Domino Valdano2018-05-081-8/+2
|
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-0713-213/+90
|
* eth: golint updates for this or self warning (#16632)kiel barry2018-05-032-20/+20
| | | | | | * eth/*:golint updates for this or self warning * eth/*: golint updates for this or self warning, pr updated per feedback
* core, eth: fix tracer dirty finalizationPéter Szilágyi2018-04-271-2/+3
|
* eth/downloader: fix for Issue #16539 (#16546)Domino Valdano2018-04-231-3/+11
|
* all: fix various typos (#16533)Wuxiang2018-04-192-2/+2
| | | | | | | | * fix typo * fix typo * fix typo
* eth/downloader: wait for all fetcher goroutines to exit before terminating ↵gary rong2018-04-161-9/+8
| | | | (#16509)
* common: delete StringToAddress, StringToHash (#16436)Felix Lange2018-04-101-2/+2
| | | | | | | | | | * common: delete StringToAddress, StringToHash These functions are confusing because they don't parse hex, but use the bytes of the string. This change removes them, replacing all uses of StringToAddress(s) by BytesToAddress([]byte(s)). * eth/filters: remove incorrect use of common.BytesToAddress
* eth/downloader: flush state sync data before exit (#16280)gary rong2018-04-091-5/+13
|
* eth: fix typos (#16414)Yusup2018-04-0411-29/+29
|
* eth: update higest block we know during the sync if a higher was found (#16283)gary rong2018-03-092-0/+16
| | | | | | * eth: update higest block we know during the sync if a higher was found * eth: avoid useless sync in fast sync
* eth: fixed typo (#16274)Kyuntae Ethan Kim2018-03-071-1/+1
|
* eth/downloader: save and load trie sync progress (#16224)Péter Szilágyi2018-03-032-1/+9
|
* eth, les: allow exceeding maxPeers for trusted peers (#16189)Andrey Petrov2018-02-271-1/+2
| | | Fixes #3326, #14472
* metrics: pull library and introduce ResettingTimer and InfluxDB reporter ↵Anton Evangelatov2018-02-235-62/+62
| | | | | | | | | | | | | | | | | | | | (#15910) * go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter. * vendor: change nonsense/go-metrics to ethersphere/go-metrics * go-metrics: add tests. move ResettingTimer logic from reporter to type. * all, metrics: pull in metrics package in go-ethereum * metrics/test: make sure metrics are enabled for tests * metrics: apply gosimple rules * metrics/exp, internal/debug: init expvar endpoint when starting pprof server * internal/debug: tiny comment formatting fix
* eth, les, light: filter on logs only, derive receipts on demandPéter Szilágyi2018-02-234-8/+60
|
* all: update license information (#16089)Felix Lange2018-02-143-3/+3
|
* eth: only disable fast sync after successPéter Szilágyi2018-02-111-10/+5
|
* eth/downloader: don't require state for ancestor lookupsPéter Szilágyi2018-02-112-13/+9
|
* eth, light: minor light client startup cleanupsPéter Szilágyi2018-02-081-1/+0
|
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-0613-533/+377
| | | This commit reduces database I/O by not writing every state trie to disk.
* les: limit LES peer count and improve peer configuration logic (#16010)Felföldi Zsolt2018-02-052-4/+4
| | | | | | * les: limit number of LES connections * eth, cmd/utils: light vs max peer configuration logic
* eth/downloader: fix #15858 by checking if downloader dropPeer function is ↵Martin Holst Swende2018-02-051-3/+20
| | | | set (#15992)
* core, eth, les, light: get rid of redundant methodsPéter Szilágyi2018-01-315-15/+31
|
* accounts/abi/bind: support event filtering in abigenPéter Szilágyi2018-01-244-152/+21
|
* eth/gasprice: set default percentile to 60%, count blocks instead of ↵Nick Johnson2018-01-102-19/+34
| | | | | | | | | transactions (#15828) The first should address a long term issue where we recommend a gas price that is greater than that required for 50% of transactions in recent blocks, which can lead to gas price inflation as people take this figure and add a margin to it, resulting in a positive feedback loop.
* all: regenerate codecs with gencodec commit 90983d99de (#15830)Felix Lange2018-01-081-2/+2
| | | Fixes #15777 because null is now allowed for hexutil.Bytes.
* all: update generated code (#15808)Felix Lange2018-01-082-65/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * core/types, core/vm, eth, tests: regenerate gencodec files * Makefile: update devtools target Install protoc-gen-go and print reminders about npm, solc and protoc. Also switch to github.com/kevinburke/go-bindata because it's more maintained. * contracts/ens: update contracts and regenerate with solidity v0.4.19 The newer upstream version of the FIFSRegistrar contract doesn't set the resolver anymore. The resolver is now deployed separately. * contracts/release: regenerate with solidity v0.4.19 * contracts/chequebook: fix fallback and regenerate with solidity v0.4.19 The contract didn't have a fallback function, payments would be rejected when compiled with newer solidity. References to 'mortal' and 'owned' use the local file system so we can compile without network access. * p2p/discv5: regenerate with recent stringer * cmd/faucet: regenerate * dashboard: regenerate * eth/tracers: regenerate * internal/jsre/deps: regenerate * dashboard: avoid sed -i because it's not portable * accounts/usbwallet/internal/trezor: fix go generate warnings
* eth: fix tracer panic when running without configs + reexec (#15799)Péter Szilágyi2018-01-041-3/+3
|
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-038-29/+25
|
* various: remove redundant parentheses (#15793)Furkan KAMACI2018-01-031-2/+2
|
* eth: revert tracer preimage recording (#15800)Felix Lange2018-01-031-4/+1
| | | | This reverts commits 85a1eda59e (#15792) and c495bca4ad (#15787) because they introduce database writes during tracing.
* eth: uncaptialize tracer preimage error message (#15792)Felix Lange2018-01-031-1/+1
| | | | | | * eth: uncaptialize tracer preimage error message * eth: improve very important error message
* eth: enable preimage recording when tracing (#15787)cdetrio2018-01-021-1/+4
|
* eth/downloader: avoid hidden reference to finished statesync request (#15545)Péter Szilágyi2018-01-021-1/+4
|
* eth, les, light: expose chain config in les node info too (#15732)Péter Szilágyi2017-12-281-6/+6
|
* accounts, consensus, core, eth: make chain maker consensus agnostic (#15497)gary rong2017-12-226-7/+11
| | | | | | | | | | * accounts, consensus, core, eth: make chain maker consensus agnostic * consensus, core: move CalcDifficulty to Engine interface * consensus: add docs for calcDifficulty function * consensus, core: minor comment fixups
* cmd, core, eth/tracers: support fancier js tracing (#15516)Péter Szilágyi2017-12-2124-254/+3685
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmd, core, eth/tracers: support fancier js tracing * eth, internal/web3ext: rework trace API, concurrency, chain tracing * eth/tracers: add three more JavaScript tracers * eth/tracers, vendor: swap ottovm to duktape for tracing * core, eth, internal: finalize call tracer and needed extras * eth, tests: prestate tracer, call test suite, rewinding * vendor: fix windows builds for tracer js engine * vendor: temporary duktape fix * eth/tracers: fix up 4byte and evmdis tracer * vendor: pull in latest duktape with my upstream fixes * eth: fix some review comments * eth: rename rewind to reexec to make it more obvious * core/vm: terminate tracing using defers
* eth: make tracing API errors more user friendly (#15589)Michael Ruminer2017-12-101-2/+12
|
* cmd/utils, eth: init etherbase from within eth (#15528)Péter Szilágyi2017-12-101-2/+9
|
* eth: return rlp-decoded values from debug_storageRangeAt (#15476)Benoit Verkindt2017-12-062-5/+12
| | | Fixes #15196
* eth/downloader: update tests for reliability (#15337)Rob2017-12-011-12/+49
| | | | | Updated use of Parallel and added some subtests to help isolate them. Increased timeout in RequestHeadersByNumber so it doesn't time out and causes other tests to break.
* cmd, consensus, eth: split ethash related config to it own (#15520)gary rong2017-11-243-60/+50
| | | | | | | | | | * 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
* all: fix code comment typos (#15547)Ricardo Domingos2017-11-241-1/+1
| | | | | | | | | | | | * console: fix typo in comment * contracts/release: fix typo in comment * core: fix typo in comment * eth: fix typo in comment * miner: fix typo in comment
* eth, internal: Implement getModifiedAccountsBy(Hash|Number) using trie diffs ↵Nick Johnson2017-11-201-0/+83
| | | | | | | | | | | | (#15512) * eth, internal: Implement using trie diffs * eth, internal: Changes in response to review * eth: More fixes to getModifiedAccountsBy* * eth: minor polishes on error capitalization
* eth/downloader: minor comments cleanup (#15495)jtakalai2017-11-161-5/+5
| | | | | it's -> its pet peeve, and I like to imagine I'm not alone.
* core/bloombits: handle non 8-bit boundary section matchesPéter Szilágyi2017-11-151-0/+1
|
* build: enable unconvert linter (#15456)ferhat elmas2017-11-113-4/+4
| | | | | | | | | * build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
* all: gofmt -w -s (#15419)ferhat elmas2017-11-081-1/+1
|
* core, eth, les: fix messy code (#15367)Péter Szilágyi2017-10-252-4/+3
| | | | | | | | * 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-244-16/+22
| | | | | | | | | | | | | | | | | | 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.
* cmd, eth: separate out FakePeer for future reusePéter Szilágyi2017-10-101-0/+160
|
* eth/fetcher: check the origin of filter tasks (#14975)Miya Chen2017-10-103-45/+56
| | | | | | * eth/fetcher: check the origin of filter task * eth/fetcher: add some details to fetcher logs
* eth: fix typo (#15252)Lio李欧2017-10-061-1/+1
|
* internal, accounts, eth: utilize vm failed flag to help gas estimationrjl4934564422017-10-021-2/+2
|
* core/bloombits, eth/filters: handle null topics (#15195)Péter Szilágyi2017-09-275-46/+26
| | | | | | | | | | When implementing the new bloombits based filter, I've accidentally broke null topics by removing the special casing of common.Hash{} filter rules, which acted as the wildcard topic until now. This PR fixes the regression, but instead of using the magic hash common.Hash{} as the null wildcard, the PR reworks the code to handle nil topics during parsing, converting a JSON null into nil []common.Hash topic.
* eth, internal/ethapi: fix spelling of 'Ethereum' (#15164)Ernesto del Toro2017-09-202-5/+5
|
* eth/downloader: track peer drops and deassign state sync tasksPéter Szilágyi2017-09-122-9/+42
|
* Merge pull request #14973 from rjl493456442/fix_downloaderPéter Szilágyi2017-09-111-0/+4
|\ | | | | eth/downloader: exit loop when there is no more available task
| * eth/downloader: exit loop when there is no more available taskrjl4934564422017-08-141-0/+4
| |
* | core, eth/downloader: commit block data using batches (#15115)Felix Lange2017-09-105-45/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | eth: disable fast sync after pivot is committedPéter Szilágyi2017-09-062-11/+12
| |
* | core/bloombits: use general filters instead of addresses and topicsZsolt Felfoldi2017-09-061-1/+18
| |
* | core/bloombits: AddBloom index parameter and fixes variable namesZsolt Felfoldi2017-09-062-2/+2
| |
* | core, eth: clean up bloom filtering, add some testsPéter Szilágyi2017-09-0610-367/+347
| |
* | core, eth: add bloombit indexer, filter based on itZsolt Felfoldi2017-09-0610-289/+534
| |
* | eth: use maxpeers from p2p layer instead of extra configPéter Szilágyi2017-09-066-27/+24
| |
* | core: make txpool operate on immutable statePéter Szilágyi2017-09-051-8/+0
| |
* | core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-223-9/+10
| |
* | core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-1810-80/+247
| |
* | Merge pull request #14996 from markya0616/send_not_announcePéter Szilágyi2017-08-181-0/+1
|\ \ | |/ |/| eth: send but not announce block to peers if propagate is true
| * eth: send but not announce block to peers if propagate is truemark.lin2017-08-181-0/+1
| |
* | eth/downloader: fix race in downloadTesterPeer (#14942)Ivan Daniluk2017-08-091-7/+25
| | | | | | | | | | | | | | | | * eth/downloader: fix race in downloadTesterPeer Signed-off-by: Ivan Daniluk <ivan.daniluk@gmail.com> * eth/downloader: minor datarace fix cleanup
* | eth: fix megacheck warningsEgon Elbre2017-08-087-40/+17
| |
* | cmd, core, eth: journal local transactions to disk (#14784)Péter Szilágyi2017-07-281-2/+4
|/ | | | | | | | | | * core: reduce txpool event loop goroutines and sync structs * cmd, core, eth: journal local transactions to disk * core: journal replacement pending transactions too * core: separate transaction journal from pool
* core: remove redundant storage of transactions and receipts (#14801)Péter Szilágyi2017-07-154-222/+84
| | | | | | | | | | | | | | * core: remove redundant storage of transactions and receipts * core, eth, internal: new transaction schema usage polishes * eth: implement upgrade mechanism for db deduplication * core, eth: drop old sequential key db upgrader * eth: close last iterator on successful db upgrage * core: prefix the lookup entries to make their purpose clearer
* Merge pull request #14737 from holiman/txpool_localaccountsPéter Szilágyi2017-07-106-31/+7
|\ | | | | Txpool localaccounts
| * eth: drop leftover from previous nonce protection schemePéter Szilágyi2017-07-052-23/+0
| |
| * core, eth, les: polish txpool API around local/remote txsPéter Szilágyi2017-07-055-8/+7
| |
* | eth/downloader: Doc fixesNick Johnson2017-07-052-3/+7
| |
* | eth/downloader, les, light: Changes in response to reviewNick Johnson2017-07-033-22/+51
| |
* | eth, les: Refactor downloader peer to use structsNick Johnson2017-06-296-253/+246
| |
* | eth, les, light: Refactor downloader to use blockchain interfaceNick Johnson2017-06-284-143/+118
|/
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-276-37/+12
| | | | | | | | | With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
* eth: gracefully error if database cannot be openedPéter Szilágyi2017-06-231-1/+4
|
* eth/downloader: separate state sync from queue (#14460)Felix Lange2017-06-225-453/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eth/downloader: separate state sync from queue Scheduling of state node downloads hogged the downloader queue lock when new requests were scheduled. This caused timeouts for other requests. With this change, state sync is fully independent of all other downloads and doesn't involve the queue at all. State sync is started and checked on in processContent. This is slightly awkward because processContent doesn't have a select loop. Instead, the queue is closed by an auxiliary goroutine when state sync fails. We tried several alternatives to this but settled on the current approach because it's the least amount of change overall. Handling of the pivot block has changed slightly: the queue previously prevented import of pivot block receipts before the state of the pivot block was available. In this commit, the receipt will be imported before the state. This causes an annoyance where the pivot block is committed as fast block head even when state downloads fail. Stay tuned for more updates in this area ;) * eth/downloader: remove cancelTimeout channel * eth/downloader: retry state requests on timeout * eth/downloader: improve comment * eth/downloader: mark peers idle when state sync is done * eth/downloader: move pivot block splitting to processContent This change also ensures that pivot block receipts aren't imported before the pivot block itself. * eth/downloader: limit state node retries * eth/downloader: improve state node error handling and retry check * eth/downloader: remove maxStateNodeRetries It fails the sync too much. * eth/downloader: remove last use of cancelCh in statesync.go Fixes TestDeliverHeadersHang*Fast and (hopefully) the weird cancellation behaviour at the end of fast sync. * eth/downloader: fix leak in runStateSync * eth/downloader: don't run processFullSyncContent in LightSync mode * eth/downloader: improve comments * eth/downloader: fix vet, megacheck * eth/downloader: remove unrequested tasks anyway * eth/downloader, trie: various polishes around duplicate items This commit explicitly tracks duplicate and unexpected state delieveries done against a trie Sync structure, also adding there to import info logs. The commit moves the db batch used to commit trie changes one level deeper so its flushed after every node insertion. This is needed to avoid a lot of duplicate retrievals caused by inconsistencies between Sync internals and database. A better approach is to track not-yet-written states in trie.Sync and flush on commit, but I'm focuing on correctness first now. The commit fixes a regression around pivot block fail count. The counter previously was reset to 1 if and only if a sync cycle progressed (inserted at least 1 entry to the database). The current code reset it already if a node was delivered, which is not stong enough, because unless it ends up written to disk, an attacker can just loop and attack ad infinitum. The commit also fixes a regression around state deliveries and timeouts. The old downloader tracked if a delivery is stale (none of the deliveries were requestedt), in which case it didn't mark the node idle and did not send further requests, since it signals a past timeout. The current code did mark it idle even on stale deliveries, which eventually caused two requests to be in flight at the same time, making the deliveries always stale and mass duplicating retrievals between multiple peers. * eth/downloader: fix state request leak This commit fixes the hang seen sometimes while doing the state sync. The cause of the hang was a rare combination of events: request state data from peer, peer drops and reconnects almost immediately. This caused a new download task to be assigned to the peer, overwriting the old one still waiting for a timeout, which in turned leaked the requests out, never to be retried. The fix is to ensure that a task assignment moves any pending one back into the retry queue. The commit also fixes a regression with peer dropping due to stalls. The current code considered a peer stalling if they timed out delivering 1 item. However, the downloader never requests only one, the minimum is 2 (attempt to fine tune estimated latency/bandwidth). The fix is simply to drop if a timeout is detected at 2 items. Apart from the above bugfixes, the commit contains some code polishes I made while debugging the hang. * core, eth, trie: support batched trie sync db writes * trie: rename SyncMemCache to syncMemBatch
* eth: remove les server from protocol manager (#14625)Alan Chen2017-06-152-3/+0
|
* Merge pull request #14516 from holiman/noncefixesPéter Szilágyi2017-05-301-1/+1
|\ | | | | internal/ethapi: add mutex around signing + nonce assignment
| * internal/ethapi: add mutex around signing + nonce assignmentMartin Holst Swende2017-05-301-1/+1
| | | | | | | | | | This prevents concurrent assignment of identical nonces when automatic assignment is used.
* | Merge pull request #14523 from karalabe/txpool-cli-flagsPéter Szilágyi2017-05-293-1/+11
|\ \ | | | | | | cmd, core, eth: configurable txpool parameters
| * | cmd, core, eth: configurable txpool parametersPéter Szilágyi2017-05-293-1/+11
| |/
* | Merge pull request #14537 from karalabe/setgasprice-durning-nominePéter Szilágyi2017-05-292-10/+24
|\ \ | | | | | | eth: update default gas price when not mining too
| * | eth: update default gas price when not mining tooPéter Szilágyi2017-05-292-10/+24
| |/
* / eth: don't import propagated blocks during fastsyncPéter Szilágyi2017-05-262-0/+6
|/
* cmd, core, eth, miner: remove txpool gas price limits (#14442)Péter Szilágyi2017-05-173-3/+7
|
* eth/downloader: fix a potential issue against future refactorsPéter Szilágyi2017-05-021-0/+4
|
* cmd, eth, les, mobile: make networkid uint64 everywherePéter Szilágyi2017-04-258-17/+17
|
* eth: add debug_storageRangeAtFelix Lange2017-04-252-37/+178
|
* Merge remote-tracking branch 'fjl/license-update-1.6'Péter Szilágyi2017-04-142-2/+2
|\
| * all: update license informationFelix Lange2017-04-142-2/+2
| |
* | eth: revert accidental ethash cache dir changePéter Szilágyi2017-04-141-0/+1
|/
* cmd/utils, node: remove unused solc references and improve RPC config (#14324)bas-vk2017-04-133-10/+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-1211-91/+401
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-122-2/+2
| | | | | | * consensus, core, ethstats: use engine specific block beneficiary * core, eth, les, miner: use explicit beneficiary during mining
* consensus/clique: Proof of Authority (#3753)Péter Szilágyi2017-04-101-0/+14
| | | | This PR is a prototype implementation of plugable consensus engines and the Clique PoA protocol ethereum/EIPs#225
* eth: accept transactions when starting CPU mining (#13882)Péter Szilágyi2017-04-105-9/+17
|
* eth: announce block after sync cycle (star topology)Péter Szilágyi2017-04-101-1/+9
|
* consensus, eth: don't CPU mine by default during remote miningPéter Szilágyi2017-04-072-11/+20
|
* Merge pull request #13870 from karalabe/miners-fixesPéter Szilágyi2017-04-073-92/+4
|\ | | | | all: clean up various error handling in core and the miner
| * consensus, core: drop all the legacy custom core error typesPéter Szilágyi2017-04-061-2/+2
| |
| * cmd/geth, eth: drop bad block reporting, its offline anywayPéter Szilágyi2017-04-062-90/+2
| |
* | cmd, les, eth, eth/gasprice: using new gas price oracle (#13853)Felföldi Zsolt2017-04-064-358/+137
|/ | | | | | | | | | | | * 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
* debug: convert uint64-blocknumber into rpc.Blocknumber (#13862)Martin Holst Swende2017-04-051-6/+29
| | | | | | * debug: Converted uint64-blocknumber into rpc.Blocknumber * api/debug: Fix pending block issues in DumpBlock
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-057-89/+100
| | | | | 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-236-90/+53
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-2310-16/+13
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* core, eth, les: support resuming fast sync on heavy rollback (#3743)Péter Szilágyi2017-03-224-10/+19
|
* all: finish integrating Go ethash, delete C++ vendorPéter Szilágyi2017-03-092-106/+6
|
* cmd, eth, les, node, pow: disk caching and progress reportsPéter Szilágyi2017-03-091-11/+13
|
* all: swap out the C++ ethash to the pure Go one (mining todo)Péter Szilágyi2017-03-093-6/+8
|
* all: update light logs (and a few others) to the new modelPéter Szilágyi2017-03-032-2/+2
|
* Logger updates 3 (#3730)Péter Szilágyi2017-03-0211-150/+122
| | | | | | | | * accounts, cmd, eth, ethdb: port logs over to new system * ethdb: drop concept of cache distribution between dbs * eth: fix some log nitpicks to make them nicer
* core, eth: drop database block splitting upgraderPéter Szilágyi2017-02-282-62/+0
|
* Merge pull request #3709 from fjl/p2p-context-logPéter Szilágyi2017-02-282-2/+2
|\ | | | | p2p, p2p/discover, p2p/nat: rework logging using context keys
| * eth, les: shorten genesis block mismatch error messageFelix Lange2017-02-282-2/+2
| |
* | common, eth/downloader, log: support terminal log formattingPéter Szilágyi2017-02-282-28/+24
|/
* all: disable log message colors outside of gethFelix Lange2017-02-271-1/+1
| | | | Also tweak behaviour so colors are only enabled when stderr is a terminal.
* eth/downloader: review fixesPéter Szilágyi2017-02-272-7/+13
|
* accounts, eth/downloader: use "err" instead of "error" in logsPéter Szilágyi2017-02-271-13/+13
|
* eth/downloader: port over old logs from glog to log15Péter Szilágyi2017-02-274-125/+137
|
* common: move big integer math to common/math (#3699)Felix Lange2017-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: remove CurrencyToString Move denomination values to params instead. * common: delete dead code * common: move big integer operations to common/math This commit consolidates all big integer operations into common/math and adds tests and documentation. There should be no change in semantics for BigPow, BigMin, BigMax, S256, U256, Exp and their behaviour is now locked in by tests. The BigD, BytesToBig and Bytes2Big functions don't provide additional value, all uses are replaced by new(big.Int).SetBytes(). BigToBytes is now called PaddedBigBytes, its minimum output size parameter is now specified as the number of bytes instead of bits. The single use of this function is in the EVM's MSTORE instruction. Big and String2Big are replaced by ParseBig, which is slightly stricter. It previously accepted leading zeros for hexadecimal inputs but treated decimal inputs as octal if a leading zero digit was present. ParseUint64 is used in places where String2Big was used to decode a uint64. The new functions MustParseBig and MustParseUint64 are now used in many places where parsing errors were previously ignored. * common: delete unused big integer variables * accounts/abi: replace uses of BytesToBig with use of encoding/binary * common: remove BytesToBig * common: remove Bytes2Big * common: remove BigTrue * cmd/utils: add BigFlag and use it for error-checked integer flags While here, remove environment variable processing for DirectoryFlag because we don't use it. * core: add missing error checks in genesis block parser * common: remove String2Big * cmd/evm: use utils.BigFlag * common/math: check for 256 bit overflow in ParseBig This is supposed to prevent silent overflow/truncation of values in the genesis block JSON. Without this check, a genesis block that set a balance larger than 256 bits would lead to weird behaviour in the VM. * cmd/utils: fixup import
* 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-2312-205/+199
|
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-146-18/+20
| | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* core, eth, internal: Added `debug_getBadBlocks()` method (#3654)Martin Holst Swende2017-02-141-0/+6
| | | | | | | | | | | | | | | | * core,eth,internal: Added `debug_getBadBlocks()` method When bad blocks are discovered, these are stored within geth. An RPC-endpoint makes them availablewithin the `debug` namespace. This feature makes it easier to discover network forks. ``` * core, api: go format + docs * core/blockchain: Documentation, fix minor nitpick * core: fix failing blockchain test
* Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"Jeffrey Wilcke2017-02-136-20/+18
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* accounts, cmd, eth, internal, miner, node: wallets and HD APIsPéter Szilágyi2017-02-131-2/+4
|
* accounts, cmd, eth, internal, mobile, node: split account backendsPéter Szilágyi2017-02-131-8/+6
|
* Merge pull request #3605 from fjl/event-feedPéter Szilágyi2017-02-032-4/+4
|\ | | | | event: add new Subscription type and related utilities
| * event: deprecate TypeMux and related typesFelix Lange2017-01-252-4/+4
| | | | | | | | | | | | | | | | | | | | | | The Subscription type is gone, all uses are replaced by *TypeMuxSubscription. This change is prep-work for the introduction of the new Subscription type in a later commit. gorename -from '"github.com/ethereum/go-ethereum/event"::Event' -to TypeMuxEvent gorename -from '"github.com/ethereum/go-ethereum/event"::muxsub' -to TypeMuxSubscription gofmt -w -r 'Subscription -> *TypeMuxSubscription' ./event/*.go find . -name '*.go' -and -not -regex '\./vendor/.*' \| xargs gofmt -w -r 'event.Subscription -> *event.TypeMuxSubscription'
* | params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-026-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* | les: remove delayed les server startingZsolt Felfoldi2017-01-263-10/+2
|/
* eth/downloader: improve deliverNodeData (#3588)Felix Lange2017-01-241-72/+52
| | | | | Commit d3b751e accidentally deleted a crucial 'return' statement, leading to a crash in case of an issue with node data. This change improves the fix in PR #3591 by removing the lock entirely.
* eth/downloader: fix mutex regression causing panics on fail (#3591)Péter Szilágyi2017-01-201-1/+2
|
* Merge pull request #3579 from bas-vk/natspecPéter Szilágyi2017-01-171-3/+0
|\ | | | | cmd,eth,les,internal: remove natspec support
| * cmd,eth,les,internal: remove natspec supportBas van Kervel2017-01-171-3/+0
| |
* | cmd/geth, core: add support for recording SHA3 preimages (#3543)Nick Johnson2017-01-174-5/+13
|/
* eth: accept leading zeros for nonce parameter of submitWork (#3558)Felix Lange2017-01-131-2/+2
|
* core: remove support for Olympic networkBas van Kervel2017-01-121-1/+1
|