rjl493456442
049e17116e
core, eth: implement eth/65 transaction fetcher
2020-02-11 13:56:36 +02:00
Martin Holst Swende
cdfe9a3a2a
eth, les: add sanity checks for unbounded block fields ( #19573 )
...
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.
2019-07-08 11:42:22 +02:00
Péter Szilágyi
054412e335
all: clean up and proerly abstract database access
2019-03-06 13:35:03 +02:00
Wenbiao Zheng
277a8c975b
eth/fetcher: blockFilter is not used anymore ( #17971 )
2019-01-26 14:32:46 +01:00
Martin Holst Swende
dc43ea8d03
tests: tune flaky tests that error in travis occasionally ( #18508 )
...
* tests: tune flaky tests that error in travis occasionally
* tests: formatting
2019-01-23 16:09:29 +01:00
Wenbiao Zheng
6a33954731
core, eth, trie: use common/prque ( #17508 )
2018-09-03 17:33:21 +02:00
Wenbiao Zheng
d1aa605f1e
all: remove the duplicate 'the' in annotations ( #17509 )
2018-08-27 11:49:29 +03:00
Wenbiao Zheng
ea89f40f0d
eth/fetcher: fix annotation ( #16969 )
2018-06-13 17:02:28 +03:00
Smilenator
40a2c52397
eth/fetcher: reuse variables for hash and number ( #16819 )
2018-05-29 10:57:08 +03:00
gary rong
7beccb29be
all: get rid of error when creating memory database ( #16716 )
...
* all: get rid of error when create mdb
* core: clean up variables definition
* all: inline mdb definition
2018-05-09 15:24:25 +03:00
Wuxiang
8f8774cf6d
all: fix various typos ( #16533 )
...
* fix typo
* fix typo
* fix typo
2018-04-19 16:32:02 +03:00
Yusup
7aad81f881
eth: fix typos ( #16414 )
2018-04-04 12:25:02 +02:00
Kyuntae Ethan Kim
f6bef558aa
eth: fixed typo ( #16274 )
2018-03-07 11:15:54 +02:00
Anton Evangelatov
ae9f97221a
metrics: pull library and introduce ResettingTimer and InfluxDB reporter ( #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
2018-02-23 11:56:08 +02:00
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64
2018-01-03 14:45:35 +02:00
gary rong
5f8888e116
accounts, consensus, core, eth: make chain maker consensus agnostic ( #15497 )
...
* 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
2017-12-22 14:37:50 +02:00
Miya Chen
40a3856af9
eth/fetcher: check the origin of filter tasks ( #14975 )
...
* eth/fetcher: check the origin of filter task
* eth/fetcher: add some details to fetcher logs
2017-10-10 11:53:05 +03:00
Péter Szilágyi
158d603528
consensus, core: drop all the legacy custom core error types
2017-04-06 17:34:19 +03:00
Péter Szilágyi
09777952ee
core, consensus: pluggable consensus engines ( #3817 )
...
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.
2017-04-05 00:16:29 +02:00
Péter Szilágyi
9184249b39
Logger updates 3 ( #3730 )
...
* 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
2017-03-02 14:06:16 +01:00
Péter Szilágyi
d4fd06c3dc
all: blidly swap out glog to our log15, logs need rework
2017-02-23 12:16:44 +02:00
Jeffrey Wilcke
c12f4df910
params: core, core/vm, miner: 64bit gas instructions
...
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
2017-02-13 21:44:25 +01:00
Jeffrey Wilcke
57f4e90257
Revert "params: core, core/vm, miner: 64bit gas instructions ( #3514 )"
...
This reverts commit 8b57c49490
.
2017-02-13 15:15:12 +01:00
Jeffrey Wilcke
8b57c49490
params: core, core/vm, miner: 64bit gas instructions ( #3514 )
...
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
2017-02-02 15:25:42 +01:00
Felix Lange
e171bf74f8
core/types: remove redundant SignECDSA wrappers, rename to SignTx
2017-01-05 12:59:17 +01:00
Jeffrey Wilcke
4dca5d4db7
core/types, params: EIP#155
2016-11-13 14:55:30 +01:00
Jeffrey Wilcke
445feaeef5
core, core/state, trie: EIP158, reprice & skip empty account write
...
This commit implements EIP158 part 1, 2, 3 & 4
1. If an account is empty it's no longer written to the trie. An empty
account is defined as (balance=0, nonce=0, storage=0, code=0).
2. Delete an empty account if it's touched
3. An empty account is redefined as either non-existent or empty.
4. Zero value calls and zero value suicides no longer consume the 25k
reation costs.
params: moved core/config to params
Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
2016-11-13 10:44:04 +01:00
Stein Dekker
4ce83bf57b
eth/fetcher: small typo fix ( #2932 )
2016-08-23 18:23:34 +03:00
Péter Szilágyi
454dc9b7c2
eth/fetcher: fix a log message formatting issue
2016-08-19 14:04:03 +03:00
Felix Lange
016007bd25
eth, eth/downloader, eth/fetcher: delete eth/61 code
...
The eth/61 protocol was disabled in #2776 , this commit removes its
message handlers and hash-chain sync logic.
2016-07-22 13:17:19 +02:00
Péter Szilágyi
3291235711
accounts, core, eth: pass chain config for chain maker to test DAO
2016-07-15 16:52:55 +03:00
Leif Jurvetson
bbbe2360d0
eth: various typos
2016-03-15 11:27:49 -07:00
Péter Szilágyi
5b0ee8ec30
core, eth, trie: fix data races and merge/review issues
2015-10-21 16:49:55 +03:00
Péter Szilágyi
832b37c822
core, eth: receipt chain reconstruction
2015-10-19 10:03:09 +03:00
Péter Szilágyi
17f65cd1e5
eth: update metrics collection to handle eth/62 algos
2015-08-25 17:48:47 +03:00
Péter Szilágyi
47a7fe5d22
eth: port the synchronisation algo to eth/62
2015-08-25 17:48:47 +03:00
Péter Szilágyi
42f44dda54
eth, eth/downloader: handle header requests, table driven proto tests
2015-08-24 17:57:28 +03:00
Gustav Simonsson
26c6e3b206
miner: gas limit strategy, target 3141592 & def gas price 50 Shannon
2015-08-04 15:20:28 +02:00
Felix Lange
bfbcfbe4a9
all: fix license headers one more time
...
I forgot to update one instance of "go-ethereum" in commit 3f047be5a
.
2015-07-23 18:35:11 +02:00
Felix Lange
3f047be5aa
all: update license headers to distiguish GPL/LGPL
...
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
2015-07-22 18:51:45 +02:00
Felix Lange
ea54283b30
all: update license information
2015-07-07 14:12:44 +02:00
Péter Szilágyi
01fe972113
cmd, core, eth, metrics, p2p: require enabling metrics
2015-06-30 00:51:46 +02:00
Felix Lange
e0e5f74776
eth/downloader, eth/fetcher: use core.GenerateChain in tests
...
TestMadeupParentBlockChainAttack has been deleted because it was too
hard to port and the attack that it checks the prevention of is being
averted in a different way (through a protocol change).
2015-06-29 18:51:47 +02:00
Péter Szilágyi
a7d22658ad
eth/fetcher: don't drop on future blocks, just not propagate
2015-06-29 14:20:13 +03:00
Péter Szilágyi
29d53b2073
eth/fetcher: don't double filter/fetch the same block
2015-06-29 13:49:04 +03:00
Péter Szilágyi
792b0ddccd
core, eth, eth/fetcher, ethdb: polish metrics gathering a bit
2015-06-24 18:34:04 +03:00
Péter Szilágyi
6260b86c15
eth/fetcher: fix failed merge
2015-06-24 18:34:04 +03:00
Péter Szilágyi
b426301467
cmd/geth, eth/fetcher: polish metrics reporting, add some more
2015-06-24 18:34:04 +03:00
Péter Szilágyi
821e01b013
cmd/geth, eth/fetcher: initial metrics support
...
Conflicts:
cmd/geth/admin.go
2015-06-24 18:33:33 +03:00
Péter Szilágyi
3ce17d2862
eth/fetcher: fix a closure data race
2015-06-22 20:13:18 +03:00
Péter Szilágyi
99ca4b619b
eth/fetcher: clean up test assertions
2015-06-22 18:28:38 +03:00
Péter Szilágyi
b53f701c27
eth/fetcher: remove test sleeps (15s -> 2.8s)
2015-06-22 18:08:28 +03:00
Péter Szilágyi
1989d1491a
eth/fetcher: handle and (crude) test block memory DOS
2015-06-22 16:49:47 +03:00
Péter Szilágyi
d36c25bcbc
eth/fetcher: handle and test block announce DOS attacks
2015-06-22 14:07:08 +03:00
Péter Szilágyi
8c4c7ea192
eth/fetcher: lower max cache size, add timeout slack
2015-06-19 16:46:16 +03:00
Péter Szilágyi
13c25036ea
eth/fetcher: since uncles are allowed, drop phase test
2015-06-18 20:10:07 +03:00
Péter Szilágyi
ecd19919c5
eth/fetcher: allow backward uncle imports too
2015-06-18 19:43:47 +03:00
Péter Szilágyi
b91b581b80
eth, eth/fetcher: propagate after header verify, announce only on insert
2015-06-18 18:00:19 +03:00
Péter Szilágyi
5ec6ecc511
eth, eth/fetcher: move propagated block import into fetcher
2015-06-18 15:56:08 +03:00
Péter Szilágyi
a9ada0b5ba
eth/fetcher: make tests thread safe
2015-06-18 15:56:08 +03:00
Péter Szilágyi
37c5ff392f
eth/fetcher: build longest chain until proven otherwise
2015-06-18 15:56:08 +03:00
Péter Szilágyi
2a7411bc96
eth/fetcher: fix premature queue cleanup, general polishes
2015-06-18 15:56:08 +03:00
Péter Szilágyi
497a7f1717
eth, eth/fetcher: define and enforce propagation boundaries
2015-06-18 15:56:08 +03:00
Péter Szilágyi
026ee40650
eth/fetcher: deduplicate future blocks
2015-06-18 15:56:08 +03:00
Péter Szilágyi
11c8f83a58
eth, eth/fetcher: cache future propagated blocks too
2015-06-18 15:56:08 +03:00
Péter Szilágyi
057bc237ad
eth, eth/fetcher: use an import queue to store out of order blocks
2015-06-18 15:56:07 +03:00
Péter Szilágyi
8b64e041d6
eth/fetcher: add test to check for duplicate downloads
2015-06-18 15:56:07 +03:00
Péter Szilágyi
2a1b722d04
eth/fetcher: fix timer reset bug, add initial tests
2015-06-18 15:56:07 +03:00
Péter Szilágyi
7c2af1c117
eth, eth/fetcher: separate notification sync mechanism
2015-06-18 15:56:07 +03:00