aboutsummaryrefslogtreecommitdiffstats
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* core/state: fix state object deep copy (#20100)gary rong2019-09-201-0/+1
| | | | deepCopy didn't copy pending storage updates, leading to the creation of blocks with invalid state root.
* core/forkid, params: fix tests, enable Istanbul on Rinkeby + testersPéter Szilágyi2019-09-191-6/+12
|
* core: fix tx dedup return error countPéter Szilágyi2019-09-182-6/+90
|
* les: multiple server bugfixes (#20079)Felföldi Zsolt2019-09-172-5/+5
| | | | | | | | | | | | | | | | | | | | * les: detailed relative cost metrics * les: filter txpool relative request statistic * les: initialize price factors * les: increased connected bias to lower churn rate * les: fixed clientPool.setLimits * core: do not use mutex in GetAncestor * les: bump factor db version again * les: add metrics * les, light: minor fixes
* core: dedup known transactions without global lock, track metricsPéter Szilágyi2019-09-171-8/+12
|
* core: smaller txpool status locking (#20080)Martin Holst Swende2019-09-171-10/+13
| | | | | | * txpool: smaller lock portion * core/tx_pool: fix data race
* core: add blockchain test too for revert cornercaseMartin Holst Swende2019-09-161-0/+75
|
* core/state: accumulate writes and only update tries when mustPéter Szilágyi2019-09-163-84/+167
|
* core: remove unused gas return in ApplyTransaction (#20065)Rob Mulholand2019-09-132-6/+6
|
* Merge pull request #20038 from holiman/minor_encodingfixPéter Szilágyi2019-09-102-1/+71
|\ | | | | core/state: optimize some internals during encoding
| * core/state: optimize some internals during encodingMartin Holst Swende2019-09-102-1/+71
| |
* | core, metrics, p2p: switch some invalid counters to gaugesPéter Szilágyi2019-09-104-65/+65
|/
* Merge pull request #20004 from karalabe/istanbul-overridePéter Szilágyi2019-08-231-0/+7
|\ | | | | cmd, core, eth, les: support --override.istanbul
| * acmd, core, eth, les: support --override.istanbulPéter Szilágyi2019-08-231-0/+7
| |
* | Merge pull request #19993 from karalabe/istanbul-eip-integrationPéter Szilágyi2019-08-232-6/+19
|\ \ | |/ |/| core/vm: enable istanbul EIPs in the jump table
| * core/vm: enable istanbul EIPs in the jump tablePéter Szilágyi2019-08-222-6/+19
| |
* | crypto: add SignatureLength constant and use it everywhere (#19996)Felix Lange2019-08-222-4/+5
|/ | | Original change by @jpeletier
* core: log chain reorg/split metrics (#18950)HackyMiner2019-08-221-2/+8
| | | | | | * core: log chain reorg/split metrics * core: report 1-block reorgs on the metrics too
* Merge pull request #19972 from ↵Péter Szilágyi2019-08-222-2/+159
|\ | | | | | | | | keep-network/istanbul-eip-152-blake2b-f-precompile core/vm, crypto/blake2b: add BLAKE2b compression func at 0x09
| * core/vm, crypto/blake2b: add SSE, AVX and AVX2 codePéter Szilágyi2019-08-212-32/+34
| |
| * core/vm, crypto/blake2b: add BLAKE2b compression func at 0x09Piotr Dyraga2019-08-212-2/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The precompile at 0x09 wraps the BLAKE2b F compression function: https://tools.ietf.org/html/rfc7693#section-3.2 The precompile requires 6 inputs tightly encoded, taking exactly 213 bytes, as explained below. - `rounds` - the number of rounds - 32-bit unsigned big-endian word - `h` - the state vector - 8 unsigned 64-bit little-endian words - `m` - the message block vector - 16 unsigned 64-bit little-endian words - `t_0, t_1` - offset counters - 2 unsigned 64-bit little-endian words - `f` - the final block indicator flag - 8-bit word [4 bytes for rounds][64 bytes for h][128 bytes for m][8 bytes for t_0] [8 bytes for t_1][1 byte for f] The boolean `f` parameter is considered as `true` if set to `1`. The boolean `f` parameter is considered as `false` if set to `0`. All other values yield an invalid encoding of `f` error. The precompile should compute the F function as specified in the RFC (https://tools.ietf.org/html/rfc7693#section-3.2) and return the updated state vector `h` with unchanged encoding (little-endian). See EIP-152 for details.
* | les: handler separation (#19639)gary rong2019-08-211-0/+22
| | | | | | les: handler separation
* | core: fix crash in chain reimport (#19986)Martin Holst Swende2019-08-212-0/+51
| | | | | | | | | | | | | | | | * blockchain: fix flaw in block import * core/blockchain: address review concerns * core/blockchain: go format with 's'
* | core/vm, params: implement EIP2200, SSTORE optimizations (#19964)Péter Szilágyi2019-08-193-1/+133
|/ | | | | | * core/vm, params: implement EIP2200, SSTORE optimizations * core/vm, params: switch EIP2200 to Wei's version
* core, light, params: implement eip2028 (#19931)gary rong2019-08-143-7/+18
| | | | | | | | | | | | * core, light, params: implement eip2028 * core, light: address comments * core: address comments * tests: disable Istanbul tx tests (until updated) * core: address comment
* core, trie: decode the value for storage dump (#19943)gary rong2019-08-121-1/+6
| | | | | | * core, trie: decode the value for storage dump * core/state: address comment
* graphql, internal/ethapi: support overriding accounts in eth_call (#19917)gary rong2019-08-082-1/+42
| | | | | | | | | | | | | | | * graphql, internal/ethapi: extend eth_call This PR offers the third option parameter for eth_call API. Caller can specify a batch of contracts for overriding the original account metadata(nonce, balance, code, state). It has a few advantages: * It's friendly for debugging * It's can make on-chain contract lighter for getting rid of state access functions * core, internal: address comments
* Eip 1344 (ChainID opcode) (#19921)Martin Holst Swende2019-08-082-1/+26
| | | | | | * core/vm: implement EIP 1344 (ChainID opcode) * core/vm: formatting
* Eip 1884 v3 (#19743)Martin Holst Swende2019-08-084-20/+101
| | | | | | | | | | | | | | * core/vm, tests: implement EIP 1884, add support for feature-tests * core/vm: 1884-changes to extcodehash, move selfbalance opcode * tests: fix statetests * core/vm: move constants, address review concerns * core/vm: word formatting Co-Authored-By: Péter Szilágyi <peterke@gmail.com>
* core/vm: fix comment grammar (#19923)Corey Lin2019-08-072-2/+2
| | | | | | * core/vm:modify comment errors * modify its back to it's
* params, core/vm: Istanbul EIP-1108 bn256 gas cost reduction (#19904)Antonio Salazar Cardozo2019-08-062-26/+105
| | | | | | | | | | | | | | | | | | | * params: add IsIstanbul to config + rules IstanbulBlock, used to determine if the config IsIstanbul, is currently left nil until an actual block is chosen. * params, core/vm: implement EIP-1108 Old gas costs for elliptic curve operations are given the PreIstanbul prefix, while current gas costs retain the unprefixed names. The actual precompile implementations are the same, so they are factored out into common functions that are called by the pre-Istanbul and current precompile structs. Finally, an Istanbul precompile list is added that references the new precompile structs, which in turn reference the new gas costs. * params: fix fork ordering, add missing chain compatibility check
* core/vm, params: refactor chain configuration (#19735)Martin Holst Swende2019-08-056-377/+287
| | | | | | | | | | | | | | | | * params, core/vm: deprecating gastable, part 1 * core/vm, params: deprecate gastable, use both constant and dynamic gas * core/vm, params: remove gastable, remove copypaste * core/vm: make use of the chainrules * interpreter: make tracing count constant+dynamic gas * core/vm: review concerns (param/method name changes) * core/vm: make use of chainrules more
* core, les: fix les unit tests (#19823)gary rong2019-07-222-11/+11
|
* all: update author list and licensesPéter Szilágyi2019-07-223-9/+9
|
* cmd/geth, core/rawdb: add missing error checks (#19871)Christian Muehlhaeuser2019-07-222-1/+18
| | | | | | | | * Added missing error checks Add error handling where we assign err a value, but don't check for it being nil. * core/rawdb: tiny style nit
* core/state, p2p/discover, trie, whisper: avoid unnecessary conversions (#19870)Christian Muehlhaeuser2019-07-221-3/+3
| | | No need to convert these types.
* core: check error before accessing potentially nil blockPéter Szilágyi2019-07-181-2/+8
|
* all: replace t.Log(); t.FailNow() with t.Fatal() (#19849)Felix Lange2019-07-181-11/+6
|
* all: replace fmt.Print* calls with t.Log* in tests (#19670)大彬2019-07-171-1/+1
|
* core: fix write concurrency in txpool (#19835)gary rong2019-07-172-9/+29
| | | | | | | | * core: fix write coucurrency in txpool * core: add rlock for pendingState read access * core: address comments
* core/state: fix random test args (#19255)Sheldon2019-07-091-1/+1
|
* core: kill off managed state, use own tiny noncer for txpoolPéter Szilágyi2019-07-095-288/+76
|
* core/forkid: implement the forkid EIP, announce via ENR (#19738)Péter Szilágyi2019-07-083-1/+442
| | | | | | | | | | | | | | | | * eth: chain config (genesis + fork) ENR entry * core/forkid, eth: protocol independent fork ID, update to CRC32 spec * core/forkid, eth: make forkid a struct, next uint64, enr struct, RLP * core/forkid: change forkhash rlp encoding from int to [4]byte * eth: fixup eth entry a bit and update it every block * eth: fix lint * eth: fix crash in ethclient tests
* eth, les: add sanity checks for unbounded block fields (#19573)Martin Holst Swende2019-07-081-0/+26
| | | This PR adds some hardening in the lower levels of the protocol stack, to bail early on invalid data. Primarily, attacks that this PR protects against are on the "annoyance"-level, which would otherwise write a couple of megabytes of data into the log output, which is a bit resource intensive.
* core: lessen mem-spike during 1.8->1.9 conversion (#19610)Martin Holst Swende2019-07-081-4/+47
| | | | | | | | * core/blockchain: lessen mem-spike during 1.8->1.9 conversion * core/blockchain.go: make levedb->freezer conversion gradually * core/blockchain: write the batch
* core: fix receipt insertion (#19764)gary rong2019-07-031-5/+9
|
* core: fix chain indexer (#19786)gary rong2019-07-031-1/+1
| | | | | | | This PR fixes an issue in chain indexer. Currently chain indexer will validate whether the stored data is canonical by comparing section head and canonical hash. But the header of the checkpoint may not exist in the database. We should skip validation for sections below the checkpoint.
* core: fix chain indexer reorg bug (#19748)Felföldi Zsolt2019-07-021-3/+18
| | | | | | * core: fix chain indexer reorg bug * core: prevent reverting valid section when reorg happens
* cmd, eth, les, param: drop --override.constantinoplePéter Szilágyi2019-07-021-7/+0
|
* all: on-chain oracle checkpoint syncing (#19543)gary rong2019-06-281-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * all: implement simple checkpoint syncing cmd, les, node: remove callback mechanism cmd, node: remove callback definition les: simplify the registrar les: expose checkpoint rpc services in the light client les, light: don't store untrusted receipt cmd, contracts, les: discard stale checkpoint cmd, contracts/registrar: loose restriction of registeration cmd, contracts: add replay-protection all: off-chain multi-signature contract params: deploy checkpoint contract for rinkeby cmd/registrar: add raw signing mode for registrar cmd/registrar, contracts/registrar, les: fixed messages * cmd/registrar, contracts/registrar: fix lints * accounts/abi/bind, les: address comments * cmd, contracts, les, light, params: minor checkpoint sync cleanups * cmd, eth, les, light: move checkpoint config to config file * cmd, eth, les, params: address comments * eth, les, params: address comments * cmd: polish up the checkpoint admin CLI * cmd, contracts, params: deploy new version contract * cmd/checkpoint-admin: add another flag for clef mode signing * cmd, contracts, les: rename and regen checkpoint oracle with abigen
* core/state, cmd/geth: streaming json output for dump command (#15475)Martin Holst Swende2019-06-242-37/+104
| | | | | | | | | | | | * core/state, cmd/geth: streaming json output dump cmd + optional code+storage * dump: add option to continue even if preimages are missing * core, evm: lint nits * cmd: use local flags for dump, omit empty code/storage * core/state: fix state dump test
* core/vm, internal/ethapi: fail on eth_call when it times out, fixes #19186 ↵Martin Holst Swende2019-06-241-0/+5
| | | | (#19737)
* core: move TxPool reorg and events to background goroutine (#19705)Felix Lange2019-06-212-453/+543
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * core: move TxPool reorg and events to background goroutine This change moves internal queue re-shuffling work in TxPool to a background goroutine, TxPool.runReorg. Requests to execute runReorg are accumulated by the new scheduleReorgLoop. The new loop also accumulates transaction events. The motivation for this change is making sends to txFeed synchronous instead of sending them in one-off goroutines launched by 'add' and 'promoteExecutables'. If a downstream consumer of txFeed is blocked for a while, reorg requests and events will queue up. * core: remove homestead check in TxPool This change removes tracking of the homestead block number from TxPool. The homestead field was used to enforce minimum gas of 53000 for contract creations after the homestead fork, but not before it. Since nobody would want configure a non-homestead chain nowadays and contract creations usually take more than 53000 gas, the extra correctness is redundant and can be removed. * core: fixes for review comments * core: remove BenchmarkPoolInsert This is useless now because there is no separate code path for individual transactions anymore. * core: fix pending counter metric * core: fix pool tests * core: dedup txpool announced events, discard stales * core: reorg tx promotion/demotion to avoid weird pending gaps
* core/types: document RawSignatureValues (#19695)Felix Lange2019-06-121-1/+3
|
* core, ethdb, metrics, p2p: expose various counter metrics for grafanaPéter Szilágyi2019-06-117-95/+204
|
* core/rawdb: avoid O_APPEND (#19676)Frank Szendzielarz2019-06-101-24/+62
| | | | | | | | * Fix file system access for Windows * Encapsulate file accesses * Style fixes
* les, les/flowcontrol: implement LES/3 (#19329)Felföldi Zsolt2019-05-312-17/+17
| | | les, les/flowcontrol: implement LES/3
* core: concurrent database reinit from freezer dumpPéter Szilágyi2019-05-273-38/+135
| | | | | | | | * core: reinit chain from freezer in batches * core/rawdb: concurrent database reinit from freezer dump * core/rawdb: reinit from freezer in sequential order
* core/rawdb: keep genesis in key-value store for full sync tooPéter Szilágyi2019-05-271-4/+10
|
* core: never delete genesis block (#19617)gary rong2019-05-271-4/+10
|
* core/state: unified function receiver names (#19615)Mohanson2019-05-261-118/+118
|
* core/rawdb, eth/downloader: align 64bit atomic fieldsPéter Szilágyi2019-05-172-2/+10
|
* cmd/geth, core/rawdb: seamless freezer consistency, friendly removedbPéter Szilágyi2019-05-165-36/+68
|
* cosensus, core, eth, params, trie: fixes + clique history capPéter Szilágyi2019-05-164-28/+64
|
* core, cmd, vendor: fixes and database inspection tool (#15)gary rong2019-05-1611-67/+353
| | | | | | | | | | | | | | | | | | | | | | * core, eth: some fixes for freezer * vendor, core/rawdb, cmd/geth: add db inspector * core, cmd/utils: check ancient store path forceily * cmd/geth, common, core/rawdb: a few fixes * cmd/geth: support windows file rename and fix rename error * core: support ancient plugin * core, cmd: streaming file copy * cmd, consensus, core, tests: keep genesis in leveldb * core: write txlookup during ancient init * core: bump database version
* freezer: disable compression on hashes and difficulties (#14)Martin Holst Swende2019-05-163-5/+15
| | | | | | | | * freezer: disable compression on hashes and difficulties * core/rawdb: address review concerns * core/rawdb: address review concerns
* core/rawdb: support starting offset for future deletionMartin Holst Swende2019-05-162-30/+175
|
* all: integrate the freezer with fast syncgary rong2019-05-1613-267/+895
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * all: freezer style syncing core, eth, les, light: clean up freezer relative APIs core, eth, les, trie, ethdb, light: clean a bit core, eth, les, light: add unit tests core, light: rewrite setHead function core, eth: fix downloader unit tests core: add receipt chain insertion test core: use constant instead of hardcoding table name core: fix rollback core: fix setHead core/rawdb: remove canonical block first and then iterate side chain core/rawdb, ethdb: add hasAncient interface eth/downloader: calculate ancient limit via cht first core, eth, ethdb: lots of fixes * eth/downloader: print ancient disable log only for fast sync
* core/rawdb: add file lock for freezerrjl4934564422019-05-162-5/+36
|
* freezer: implement split files for dataMartin Holst Swende2019-05-162-95/+815
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * freezer: implement split files for data * freezer: add tests * freezer: close old head-file when opening next * freezer: fix truncation * freezer: more testing around close/open * rawdb/freezer: address review concerns * freezer: fix minor review concerns * freezer: fix remaining concerns + testcases around truncation * freezer: docs * freezer: implement multithreading * core/rawdb: fix freezer nitpicks + change offsets to uint32 * freezer: preopen files, simplify lock constructs * freezer: delete files during truncation
* cmd, core, eth, les, node: chain freezer on top of db reworkPéter Szilágyi2019-05-166-26/+683
|
* core, eth, trie: bloom filter for trie node dedup during fast sync (#19489)Péter Szilágyi2019-05-133-8/+16
| | | | | | | | | | | | * core, eth, trie: bloom filter for trie node dedup during fast sync * eth/downloader, trie: address review comments * core, ethdb, trie: restart fast-sync bloom construction now and again * eth/downloader: initialize fast sync bloom on startup * eth: reenable eth/62 until we properly remove it
* core: fix formatting error (trailing whitepace)Péter Szilágyi2019-05-131-1/+1
|
* core: move error variable to error.go (#19560)PilkyuJung2019-05-132-3/+4
| | | | | | | | * move error variable to error.go * Update error.go Edit "Genesis" to "genesis"
* core: fix import errors on clique crashes + empty blocks (#19544)Péter Szilágyi2019-05-102-2/+47
| | | | | | | | | | * core: fix import errors on clique crashes + empty blocks * cosensus/clique, core: add test for the mirrored state issue * core: address todo question wrt log count * core: raise a louder warning for non-clique known blocks
* core: handle importing known blocks more gracefully (#19417)gary rong2019-05-082-125/+303
| | | | | | | | | | * core: import known blocks if they can be inserted as canonical blocks * core: insert knowns blocks * core: remove useless * core: doesn't process head block in reorg function
* core: fix canonicality confusion (#19514)Martin Holst Swende2019-05-072-1/+130
| | | | | | * core: add tests for canonicality confusion * core: delete stale future canon number mappings during reorg to shorter+heavier chain
* core/rawdb: fix typo (#19526)유용환2019-05-041-2/+2
|
* consensus,core,miner: avoid overhead of creating a new block (#19301)Martin Holst Swende2019-04-302-2/+2
| | | | | | | | * consensus,core,miner: avoid overhead of creating a new block * consensus: nitpick dot * consensus: fix some comment formatting nits
* core/rawdb: typo fix storea => stores (#19498)Hongbin Mao2019-04-261-1/+1
| | | | | | * typo fix * change to stores
* core: lookup txs by block number instead of block hash (#19431)Matthew Halpern2019-04-253-68/+97
| | | | | | | | | | | | | | | | | | | * core: lookup txs by block number instead of block hash Transaction hashes now store a reference to their corresponding block number as opposed to their hash. In benchmarks this was shown to reduce storage by over 12 GB. The main limitation of this approach is that transactions on non-canonical blocks could never be looked up, however that is currently not supported. The database version has been upgraded to version 5 and the transaction lookup process is backwards-compatible with the prior two transaction lookup formats prexisting in the database instance. Tests have been added to ensure this. * core/rawdb: tiny review nit fixes
* core/types: fix cummulative gas bug and legacy decoding testsgary rong2019-04-162-22/+36
|
* core, eth, les, light: scope receipt functionality a bit cleanerPéter Szilágyi2019-04-159-272/+233
|
* core, eth, les, light: store transaction receipts without txHash and gasCostMatthew Halpern2019-04-157-110/+536
|
* consensus,core: shortcut uncle validationMartin Holst Swende2019-04-082-1/+20
|
* core/state: fix state iterator (#19127)gary rong2019-04-052-5/+18
| | | | | | * core/state: fix state iterator * core: fix state iterator more elegant
* core: minor code polishes + rebase fixesPéter Szilágyi2019-04-042-43/+57
|
* core: re-omit new log event when logs rebirthrjl4934564422019-04-042-9/+224
|
* core/vm: fix typos in comments (#19391)hydai2019-04-041-2/+2
|
* core/vm: instruction tests (#16327)Martin Holst Swende2019-04-0422-87/+159
| | | | | | This PR makes it easy to generate and execute testcases for VM arithmetic operations. By enabling and running the testcase TestWriteExpectedValues, a set of json files are created which contain input and output for each arith operation. The test TestJsonTestcases executes all of those tests. While meaningless as is, this PR makes it less risky to make changes (optimizations) to the vm operations, since there will be a larger body of testcases.
* all: simplify timestamps to uint64 (#19372)Martin Holst Swende2019-04-039-31/+28
| | | | | | | | | | | | | | * all: simplify timestamps to uint64 * tests: update definitions * clef, faucet, mobile: leftover uint64 fixups * ethash: fix tests * graphql: update schema for timestamp * ethash: remove unused variable
* Merge pull request #19328 from karalabe/preloadPéter Szilágyi2019-04-026-81/+202
|\ | | | | core: prefetch next block state concurrently
| * cmd, core, eth: support disabling the concurrent state prefetcherPéter Szilágyi2019-04-011-15/+18
| |
| * core: prefetch next block state concurrentlyPéter Szilágyi2019-04-016-75/+193
| |
* | core: fix typo in insertChain method doc (#19371)Runchao Han2019-04-021-1/+1
| |
* | Merge pull request #19348 from LiangMa/overflowPRPéter Szilágyi2019-04-012-22/+21
|\ \ | |/ |/| core/vm: Correct the Memory Gas Overflow condition
| * core/vm: polish gas PR, fix tests, make table drivenPéter Szilágyi2019-04-012-21/+20
| |
| * core/vm: Correct the Memory Gas Overflow conditionLiang Ma2019-03-291-3/+3
| | | | | | | | | | | | | | previous overflow condition is too big to use. 0x7FFFFFFFF squre operation is overflowed uint64. 0x7FFFFFFFF^2 = 0x3F FFFF FFF0 0000 0001
* | core: cache tx signature before obtaining lock贺鹏飞2019-03-291-0/+7
|/
* core/types: add block location fields to receipt (#17662)Brent2019-03-277-2/+54
| | | | Solves #15210 without changing consensus, in a backwards compatible way, by adding tx inclusion information to the Receipt struct.
* core: 3rd try on splitting the trie metrics correctlyPéter Szilágyi2019-03-271-18/+25
|
* core, ethdb, trie: mode dirty data to clean cache on flush (#19307)Martin Holst Swende2019-03-266-11/+20
| | | | | This PR is a more advanced form of the dirty-to-clean cacher (#18995), where we reuse previous database write batches as datasets to uncache, saving a dirty-trie-iteration and a dirty-trie-rlp-reencoding per block.
* Merge pull request #19308 from holiman/fix_reset_txpoolPéter Szilágyi2019-03-261-1/+16
|\ | | | | core: make txpool handle reorg due to setHead
| * core: make txpool handle reorg due to setHeadMartin Holst Swende2019-03-211-1/+16
| |
* | core: split trie op metrics from the correct chain metricsPéter Szilágyi2019-03-251-6/+3
| |
* | core: split out detailed trie access metrics from insertion time (#19316)Péter Szilágyi2019-03-253-18/+98
|/ | | | | | * core: split out detailed trie access metrics from insertion time * cmd, core, metrics: support expensive optional metrics
* cmd, core, eth, trie: get rid of trie cache generations (#19262)Péter Szilágyi2019-03-143-67/+45
| | | | | | * cmd, core, eth, trie: get rid of trie cache generations * core, trie: get rid of remainder of cache gen boilerplate
* asm: remove unused parameter for function Lex (#18058)Corey Lin2019-03-142-2/+2
|
* core: use headers only where blocks are unnecessaryPéter Szilágyi2019-03-135-11/+11
|
* core/vm: 64 bit memory and gas calculations (#19210)Martin Holst Swende2019-03-129-737/+910
| | | | | | | | | | | | | | | | | | | | | | * core/vm: remove function call for stack validation from evm runloop * core/vm: separate gas calc into static + dynamic * core/vm: optimize push1 * core/vm: reuse pooled bigints for ADDRESS, ORIGIN and CALLER * core/vm: use generic error message for jump/jumpi, to avoid string interpolation * testdata: fix tests for new error message * core/vm: use 64-bit memory calculations * core/vm: fix error in memory calculation * core/vm: address review concerns * core/vm: avoid unnecessary use of big.Int:BitLen()
* state: fix emptyStatet to emptyRoot (#19254)Sheldon2019-03-121-3/+3
|
* all: clean up and proerly abstract database accessPéter Szilágyi2019-03-0631-209/+422
|
* core/types: fix receipt legacy decodingPéter Szilágyi2019-02-282-4/+12
|
* travis, appveyor, Dockerfile: upgrade to Go 1.12Samuel Marks2019-02-271-1/+1
|
* les, les/flowcontrol: improved request serving and flow control (#18230)Felföldi Zsolt2019-02-261-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This change - implements concurrent LES request serving even for a single peer. - replaces the request cost estimation method with a cost table based on benchmarks which gives much more consistent results. Until now the allowed number of light peers was just a guess which probably contributed a lot to the fluctuating quality of available service. Everything related to request cost is implemented in a single object, the 'cost tracker'. It uses a fixed cost table with a global 'correction factor'. Benchmark code is included and can be run at any time to adapt costs to low-level implementation changes. - reimplements flowcontrol.ClientManager in a cleaner and more efficient way, with added capabilities: There is now control over bandwidth, which allows using the flow control parameters for client prioritization. Target utilization over 100 percent is now supported to model concurrent request processing. Total serving bandwidth is reduced during block processing to prevent database contention. - implements an RPC API for the LES servers allowing server operators to assign priority bandwidth to certain clients and change prioritized status even while the client is connected. The new API is meant for cases where server operators charge for LES using an off-protocol mechanism. - adds a unit test for the new client manager. - adds an end-to-end test using the network simulator that tests bandwidth control functions through the new API.
* core: remove unnecessary fields in logs, receipts and tx lookups (#17106)gary rong2019-02-219-51/+133
| | | | | | | | | | | | * core: remove unnecessary fields in log * core: bump blockchain database version * core, les: remove unnecessary fields in txlookup * eth: print db version explicitly * core/rawdb: drop txlookup entry struct wrapper
* core: more tests for sidechain import, fixes #19105 (#19113)Martin Holst Swende2019-02-212-20/+115
| | | | | | | | | | * blockchain: more tests for sidechain import, fixes #19105 * core/blockchain: rework import of pruned canon blocks and canon-prepended sidechains * core/blockchain: minor clarity change * core/blockchain: remove unused method
* core/vm: remove unused constants (#19095)Péter Szilágyi2019-02-201-4/+0
|\
| * core/vm: remove unused constantsMatthew Halpern2019-02-181-4/+0
| |
* | core: remove redundant parentheses (#19106)Matthew Halpern2019-02-192-2/+2
|/
* core: remove unused function (#19097)Matthew Halpern2019-02-181-17/+0
|
* core/vm: update annotation (#19050)needkane2019-02-181-9/+6
|
* core: enforce camel case variable names (#19058)Matthew Halpern2019-02-151-6/+6
|
* core: fix pruner panic when importing low-diff-large-sidechainPéter Szilágyi2019-02-083-86/+44
|
* core: repro #18977Martin Holst Swende2019-02-082-1/+104
|
* cmd/utils, eth: relinquish GC cache to read cache in archive modePéter Szilágyi2019-02-072-4/+4
|
* core/state: more memory efficient preimage allocation (#16663)atsushi-ishibashi2019-02-072-1/+10
|
* core/vm: unshadow err to make it visible in tracers(#18504)Martin Holst Swende2019-02-041-3/+4
|
* Merge pull request #18121 from karalabe/goerliPéter Szilágyi2019-02-042-1/+13
|\ | | | | cmd, core, params: add support for Goerli
| * cmd, core, params: add support for GoerliPéter Szilágyi2019-02-042-1/+13
| |
* | core: fix error in block iterator (#18986)Martin Holst Swende2019-02-042-11/+3
|/
* core/types: remove use of package unsafeGus2019-01-291-2/+4
|
* les: implement ultralight client (#16904)b00ris2019-01-241-6/+10
| | | | For more information about this light client mode, read https://hackmd.io/s/HJy7jjZpm
* core/vm: fix typos and use ExpGas for EXP (#18400)Nalin Bhardwaj2019-01-241-2/+2
| | | | | This replaces the GasSlowStep constant with params.ExpGas. Both constants have value 10.
* core, cmd/puppeth: implement constantinople fix, disable EIP-1283 (#18486)Martin Holst Swende2019-01-243-2/+9
| | | | | | | | | | | | | | | | | This PR adds a new fork which disables EIP-1283. Internally it's called Petersburg, but the genesis/config field is ConstantinopleFix. The block numbers are: 7280000 for Constantinople on Mainnet 7280000 for ConstantinopleFix on Mainnet 4939394 for ConstantinopleFix on Ropsten 9999999 for ConstantinopleFix on Rinkeby (real number decided later) This PR also defaults to using the same ConstantinopleFix number as whatever Constantinople is set to. That is, it will default to mainnet behaviour if ConstantinopleFix is not set.This means that for private networks which have already transitioned to Constantinople, this PR will break the network unless ConstantinopleFix is explicitly set!
* core: only cache non-nil receipts from the database (#18447)silence2019-01-171-0/+3
| | | receipts may be null for very short time in some condition. For this case, we should not add the null value into cache. Because you will not get the right result if you keep requesting that receipt.
* core, light: get rid of the dual mutexes, hard to reason withPéter Szilágyi2019-01-112-51/+31
|
* core, eth: fix database version (#18429)gary rong2019-01-112-8/+16
| | | | | | * core, eth: fix database version * eth: polish error message
* Merge pull request #18371 from jeremyschlatter/patch-1Péter Szilágyi2019-01-041-1/+1
|\ | | | | core/types: update incorrect comment
| * core/types: update incorrect commentJeremy Schlatter2018-12-291-1/+1
| |
* | vendor, crypto, swarm: switch over to upstream sha3 packageDave McGregor2019-01-043-8/+8
|/
* core: sanitize more TxPoolConfig fields (#17210)Jordan Krage2018-12-202-1/+21
| | | | | | * core: sanitize more TxPoolConfig fields * core: fix TestTransactionPendingMinimumAllowance
* core/state: rename 'new' variable (#18301)Shuai Qi2018-12-141-2/+2
|
* Comment error (#18303)qd-ethan2018-12-141-1/+1
|
* cmd/geth, core, eth: implement Constantinople override flag (#18273)Martin Holst Swende2018-12-111-0/+6
| | | | | | | | * 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/evm, core/vm, eth: implement api methods to do stdjson dump to local ↵Martin Holst Swende2018-12-101-0/+83
| | | | filesystem
* core, internal, eth, miner, les: Take VM config from BlockChain (#17955)Paweł Bylica2018-12-061-0/+5
| | | | | | | | | | | 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.
* tests, core: update tests and make STATICCALL cause touch-delete (#18187)Martin Holst Swende2018-11-291-0/+6
|
* core: more detailed metrics for block processing (#18119)Martin Holst Swende2018-11-281-1/+12
|
* fix mixHash/nonce for parity compatible network (#18166)Jaynti Kanani2018-11-262-12/+12
|
* core: return error if repair block failed (#18126)mr_franklin2018-11-231-1/+5
| | | | | | * core: return error if repair block failed * make error a bit shorter
* Merge pull request #17973 from holiman/splitter2Péter Szilágyi2018-11-223-157/+368
|\ | | | | core: better side-chain importing
| * core: polish side chain importer a bitPéter Szilágyi2018-11-213-294/+328
| |
| * core: better side-chain importingMartin Holst Swende2018-11-201-96/+273
| |
* | core: better printout of receipts in bad block reports (#18156)Martin Holst Swende2018-11-221-2/+4
| | | | | | | | | | | | * core/blockchain: better printout of receipts in bad block reports * fix splleing
* | core: fix comment typo (#18144)mr_franklin2018-11-211-1/+1
|/
* core, eth/downloader: fix ancestor lookup for fast syncPéter Szilágyi2018-11-162-2/+20
|
* cmd, core, eth, light, trie: add trie read caching layerPéter Szilágyi2018-11-152-11/+24
|
* core: fix default trie cache limit (#17860)gary rong2018-11-131-1/+1
|
* rawdb: remove unused parameter for WritePreimages func (#18059)Corey Lin2018-11-093-5/+4
| | | | | | | * rawdb: remove unused parameter for WritePreimages func and modify a spelling mistake * rawdb: update the doc for function WritePreimages
* core/state: remove lock (#18065)Felix Lange2018-11-091-6/+0
| | | | The lock in StateDB is useless. It's only held in Copy, but Copy is safe for concurrent use because all it does is read.
* Merge pull request #17982 from holiman/polish_contantinople_extcodehashPéter Szilágyi2018-11-081-1/+6
|\ | | | | core/vm: check empty in extcodehash
| * core/vm: check empty in extcodehashMartin Holst Swende2018-10-261-1/+6
| |
* | core/vm, eth/tracers: use pointer receiver for GetRefund (#18018)Corey Lin2018-11-081-1/+1
| |
* | eth/downloader: speed up tests by generating chain only once (#17916)Felix Lange2018-11-071-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | core, eth/downloader: fix validation flaw, fix downloader printout flaw (#17974)Martin Holst Swende2018-11-071-6/+6
|/
* core/state: simplify proof methods (#17965)Felix Lange2018-10-242-17/+13
| | | | This fixes the import cycle build error in core/vm tests. There is no need to refer to core/vm for a type definition.
* core/vm: adds refund as part of the json standard trace (#17910)Martin Holst Swende2018-10-233-36/+50
| | | | | | | 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.
* core: fix a typo (#17941)Wuxiang2018-10-191-1/+1
|
* EIP-1186 eth_getProof (#17737)Simon Jentzsch2018-10-192-0/+30
| | | | | | | | | | | | | | | | * first impl of eth_getProof * fixed docu * added comments and refactored based on comments from holiman * created structs * handle errors correctly * change Value to *hexutil.Big in order to have the same output as parity * use ProofList as return type
* core/types: fix comment for func SignatureValues (#17921)Smilenator2018-10-161-1/+1
|
* core/vm: add shortcuts for trivial exp cases (#16851)Martin Holst Swende2018-10-161-4/+16
|
* core/asm: Use hexadecimal addresses in assembly dumps (#17870)Guillaume Ballet2018-10-091-4/+4
|
* core/types: Log.Index is the index in block, not receipt (#17866)Wenbiao Zheng2018-10-081-1/+1
|
* core/vm: reuse Keccak-256 hashes across opcode executions (#17863)Péter Szilágyi2018-10-083-6/+48
|
* core/vm : fix failing testcase (#17852)Martin Holst Swende2018-10-061-1/+2
| | | | | | * core/vm : fix failing testcase * core/vm: fix nitpick
* core/vm: SHA3 word cost for CREATE2 (#17812)Martin Holst Swende2018-10-052-0/+87
| | | | | | | | * core/vm: create2 address generation tests * core/vm: per byte cost of CREATE2 * core/vm: fix linter issue in test
* core/vm: faster create/create2 (#17806)Martin Holst Swende2018-10-046-52/+145
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* core: use ChainHeadEvent subscription in the chain indexer (#17826)Felföldi Zsolt2018-10-031-6/+6
|
* core: fix unnecessary ancestor lookup after a fast sync (#17825)Péter Szilágyi2018-10-031-5/+5
|
* core, internal/ethapi: add and use LRU cache for receipts (#17610)Ryan Schneider2018-09-301-6/+18
|
* core/types: make tx signature values optional in JSON (#17742)reinerRubin2018-09-302-12/+23
|
* core/types: fix typos (#17762)thumb84322018-09-301-2/+2
|
* all: fix various comment typos (#17748)Liang ZOU2018-09-252-2/+2
|
* Merge pull request #17383 from holiman/eip1283Péter Szilágyi2018-09-218-138/+164
|\ | | | | Eip1283
| * core, params: polish net gas metering PR a bitPéter Szilágyi2018-09-189-218/+138
| |
| * core,state: finish implementing Eip 1283Martin Holst Swende2018-09-186-16/+41
| |
| * core, state: initial implementation of Eip-1283Martin Holst Swende2018-09-185-3/+84
| |
* | core: fix a typo (#17733)Wuxiang2018-09-211-2/+2
| |
* | core, eth: fix dependency cycle (#17720)gary rong2018-09-211-50/+21
| |
* | all: protect self-mined block during reorg (#17656)gary rong2018-09-208-35/+75
| |
* | common, core, light: add block age into info logsPéter Szilágyi2018-09-202-12/+30
| |
* | core/vm: add switches to select evm+ewasm interpreters (#17687)Guillaume Ballet2018-09-202-2/+25
| | | | | | | | | | 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.
* | core, eth: fix goimports for Go 1.11Péter Szilágyi2018-09-191-1/+1
|/
* Merge pull request #17622 from karalabe/chain-maker-sealPéter Szilágyi2018-09-171-2/+8
|\ | | | | consensus/clique, core: chain maker clique + error tests
| * consensus/clique, core: chain maker clique + error testsPéter Szilágyi2018-09-111-2/+8
| |
* | all: simplify s[:] to s where s is a slice (#17673)Emil2018-09-152-3/+3
| |
* | core/vm: fix typo 'EVM EVM' ==> 'EVM' (#17654)Liang ZOU2018-09-131-1/+1
|/
* core/vm: Hide read only flag from Interpreter interface (#17461)Paweł Bylica2018-09-082-30/+16
| | | | | 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: fix typo in comment (#17586)Hyung-Kyu Hqueue Choi2018-09-051-1/+1
|
* core/vm, tests: update tests, enable constantinople statetests, fix SAR ↵Martin Holst Swende2018-09-041-1/+1
| | | | | | | | | | | | | | | opcode (#17538) This commit does a few things at once: - Updates the tests to contain the latest data from ethereum/tests repo. - Enables Constantinople state tests. This is needed to be able to fuzz-test the evm with constantinople rules. - Fixes the error in opSAR that we've known about for some time. I was kind of saving it to see if we hit upon it with the random test generator, but it's difficult to both enable the tests and have the bug there -- we don't want to forget about it, so maybe it's better to just fix it.
* core, eth, trie: use common/prque (#17508)Wenbiao Zheng2018-09-032-6/+6
|
* cmd, core, eth, miner, params: configurable gas floor and ceilPéter Szilágyi2018-08-293-10/+17
|
* core: safe indexer operation when syncing starts before the checkpoint (#17511)Felföldi Zsolt2018-08-281-11/+45
|
* all: make indexer configurable (#17188)gary rong2018-08-281-1/+0
|
* core: fix typos in comment (#17531)Sheldon2018-08-281-4/+4
|
* all: remove the duplicate 'the' in annotations (#17509)Wenbiao Zheng2018-08-273-3/+3
|
* miner: fix state commit, track old work packages too (#17490)gary rong2018-08-231-23/+0
| | | | | | | | | | * miner: commit state which is relative with sealing result * consensus, core, miner, mobile: introduce sealHash interface * miner: evict pending task with threshold * miner: go fmt
* core/statedb: deep copy logs (#17489)gary rong2018-08-231-3/+6
|
* cmd, core, miner: add --txpool.locals and priority miningPéter Szilágyi2018-08-221-4/+35
|
* core/types: fix docs about protected Vs (#17436)Aditya2018-08-201-1/+1
|
* miner: regenerate mining work every 3 seconds (#17413)gary rong2018-08-161-3/+0
| | | | | | * miner: regenerate mining work every 3 seconds * miner: polish
* light: CHT and bloom trie indexers working in light mode (#16534)Felföldi Zsolt2018-08-162-10/+26
| | | | | | | 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.
* miner: move agent logic to worker (#17351)gary rong2018-08-141-3/+4
| | | | | | | | * miner: move agent logic to worker * miner: polish * core: persist block before reorg
* crypto: change formula for create2 (#17393)gary rong2018-08-141-1/+1
|
* core: fix comment typo (#17376)Mymskmkt2018-08-131-2/+2
|
* core/vm: fix comment typo (#17319)stormpang2018-08-061-1/+1
| | | | antything --> anything :P
* core/vm: update benchmarks for core/vm (#17308)Hyung-Kyu Hqueue Choi2018-08-031-0/+4
| | | | | | - Update benchmarks to use a pool of int pools. Unless benchmarks are aborted with segmentation fault. Signed-off-by: Hyung-Kyu Choi <hqueue@users.noreply.github.com>
* core/vm: fix typo in cryptographic hash function name (#17285)Ha ĐANG2018-07-311-1/+1
|
* core: fix some small typos on comment code (#17278)Ha ĐANG2018-07-303-3/+3
|
* all: simplify switches (#17267)Oleg Kovalov2018-07-301-2/+1
| | | | | | * all: simplify switches * silly mistake
* core: report progress on log chain exports (#17066)Raghav Sood2018-07-261-3/+7
| | | | | | * core/blockchain: export progress * core: polish up chain export progress report a bit
* core/vm: support for multiple interpreters (#17093)Guillaume Ballet2018-07-256-240/+315
| | | | | | - Define an Interpreter interface - One contract can call contracts from other interpreter types. - Pass the interpreter to the operands instead of the evm. This is meant to prevent type assertions in operands.
* core: fixed typo in addresssByHeartbeat (#17243)Antoine Rondelet2018-07-251-5/+5
|
* core: fix typo in comment codehadv2018-07-251-1/+1
|
* core: fix txpool guarantee comment (#17214)Osuke2018-07-241-1/+1
| | | | | | * fixed-typo * core: fix txpool guarantee comment
* core/vm, params: implement EXTCODEHASH opcode (#17202)gary rong2018-07-244-0/+45
| | | | | | | | * core/vm, params: implement EXTCODEHASH opcode * core, params: tiny fixes and polish * core: add function description
* core, crypto, params: implement CREATE2 evm instrction (#17196)gary rong2018-07-246-17/+87
| | | | | | | | | | * core, crypto, params: implement CREATE2 evm instrction * core/vm: add opcode to string mapping * core: remove past fork checking * core, crypto: use option2 to generate new address
* core: fix comment typo (#17236)Wenbiao Zheng2018-07-241-3/+3
|
* core/bloombits, light: fix typos (#17235)Sheldon2018-07-242-6/+6
|
* core, ethdb: two tiny fixes (#17183)gary rong2018-07-181-12/+18
| | | | | | | | * ethdb: fix memory database * core: fix bloombits checking * core: minor polish
* core/types: polish TxDifference code and docs a bit (#17130)Smilenator2018-07-091-3/+3
| | | | | | | | | * core: fix func TxDifference fix a typo in func comment; change named return to unnamed as there's explicit return in the body * fix another typo in TxDifference
* core/vm: reuse bigint pools across transactions (#17070)Guillaume Ballet2018-07-034-2/+112
| | | | | | | | * core/vm: A pool for int pools * core/vm: fix rebase issue * core/vm: push leftover stack items after execution, not before
* ethdb, core: implement delete for db batch (#17101)gary rong2018-07-022-10/+18
|
* core/vm: clear linter warnings (#17057)Guillaume Ballet2018-06-269-30/+51
| | | | | | | | * core/vm: clear linter warnings * core/vm: review input * core/vm.go: revert lint in noop as per request
* trie: cache collapsed tries node, not rlp blobs (#16876)Péter Szilágyi2018-06-213-5/+5
| | | | | | | | | | | | 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).
* core: remove dead code, limit test code scope (#17006)Wenbiao Zheng2018-06-194-48/+34
| | | | | | * core: move test util var/func to test file * core: remove useless func
* core/asm: correct comments typo (#16974)Caesar Chad2018-06-141-2/+2
| | | | | | | | * core/asm/compiler: correct comments typo core/asm/compiler: correct comments typo * Correct comments typo
* core: reduce nesting in transaction pool code (#16980)Wenbiao Zheng2018-06-141-5/+3
|
* core/vm: optimize MSTORE and SLOAD (#16939)Martin Holst Swende2018-06-143-11/+68
| | | | | | | | | | * vm/test: add tests+benchmarks for mstore * core/vm: less alloc and copying for mstore * core/vm: less allocs in sload * vm: check for errors more correctly
* core/asm: correct comments typo (#16975)Caesar Chad2018-06-141-1/+1
| | | core/asm/lexer: correct comments typo
* core: change comment to match code more closely (#16963)John C. Vernaleo2018-06-131-1/+1
|
* core, eth, les: more efficient hash-based header chain retrieval (#16946)Felföldi Zsolt2018-06-122-0/+49
|
* core/rawdb: wrap db key creations (#16914)Wenbiao Zheng2018-06-114-48/+85
| | | | | | | | * core/rawdb: use wrappered helper to assemble key * core/rawdb: wrappered helper to assemble key * core/rawdb: rewrite the wrapper, pass common.Hash
* core: improve getBadBlocks to return full block rlp (#16902)Martin Holst Swende2018-06-111-13/+7
| | | | | | | | * core: improve getBadBlocks to return full block rlp * core, eth, ethapi: changes to getBadBlocks formatting * ethapi: address review concerns
* core: relax type requirement for bc in ApplyTransaction (#16901)ledgerwatch2018-06-071-1/+1
|
* Merge pull request #16882 from karalabe/streaming-ecrecoverPéter Szilágyi2018-06-053-0/+113
|\ | | | | core: concurrent background transaction sender ecrecover
| * core: concurrent background transaction sender ecrecoverPéter Szilágyi2018-06-053-0/+113
| |
* | params: fix golint warnings (#16853)kiel barry2018-06-054-13/+13
|/ | | params: fix golint warnings
* core: fix typo in comment codehadv2018-06-051-1/+1
|