Péter Szilágyi
bfdff4c5b8
eth: fix snap sync cancellation
4 years ago
Péter Szilágyi
6291fc9230
Merge pull request #22331 from karalabe/enforce-min-snap-difflayers
...
core/state/snapshot: ensure Cap retains a min number of layers
4 years ago
Péter Szilágyi
9ec3329899
core/state/snapshot: ensure Cap retains a min number of layers
4 years ago
Péter Szilágyi
915c614959
Merge pull request #22332 from karalabe/fix-fastsync-restart-bloom-crash
...
trie: fix bloom crash on fast sync restart
4 years ago
Guillaume Ballet
f4fcd4f506
rpc: increase the number of subscriptions in storm test ( #22316 )
4 years ago
Péter Szilágyi
e991bdae24
trie: fix bloom crash on fast sync restart
4 years ago
Alex Mazalov
77787802fe
cmd/geth: fix js unclean shutdown ( #22302 )
4 years ago
Guillaume Ballet
08c878acd2
cmd/utils: add workaround for FreeBSD statfs quirk ( #22310 )
...
Make geth build on FreeBSD, fixes #22309 .
4 years ago
Felföldi Zsolt
7d1b711c7d
les: enable les/4 and add tests ( #22321 )
4 years ago
Péter Szilágyi
2fc465a7be
Merge pull request #22319 from karalabe/fix-defer-leak
...
core: fix temp memory blowup caused by defers holding on to state
4 years ago
Péter Szilágyi
ef227c5f42
core: fix temp memory blowup caused by defers holding on to state
4 years ago
rene
111abdcfbd
cmd/devp2p: fix documentation for eth-test ( #22298 )
4 years ago
Péter Szilágyi
1bbc8a1944
Merge pull request #22293 from karalabe/txunindex-1year
...
cmd/utils, eth/ethconfig: unindex txs older than ~1 year
4 years ago
Péter Szilágyi
409b16e5ab
cmd/utils, eth/ethconfig: unindex txs older than ~1 year
4 years ago
Marius van der Wijden
cb3c7e4319
accounts/abi/bind: fixed unpacking error ( #22230 )
...
There was a dormant error with structured inputs that failed unpacking.
This commit fixes the error by switching casting to the better abi.ConvertType function.
It also adds a test for calling a view function that returns a struct
4 years ago
Sina Mahmoodi
27786671d2
internal/debug: add switch to format logs with json ( #22207 )
...
adds a flag --log.json which if enabled makes the client format logs with JSON.
4 years ago
Péter Szilágyi
2fdba3aacb
Merge pull request #22294 from holiman/pruner_compact_fix
...
core/state/pruner: fix compaction range error
4 years ago
Martin Holst Swende
74dbc20260
core/state/pruner: fix compaction range error
4 years ago
Péter Szilágyi
944d901436
Merge pull request #22291 from karalabe/fix-pruner-compaction
...
core/state/pruner: fix compaction after pruning
4 years ago
Péter Szilágyi
2728672c28
core/state/pruner: fix compaction after pruning
4 years ago
Péter Szilágyi
123e934e72
Merge pull request #22288 from karalabe/1.10.unstable
...
params: just to make snapshots a bit more official
4 years ago
gary rong
f566dd305e
all: bloom-filter based pruning mechanism ( #21724 )
...
* cmd, core, tests: initial state pruner
core: fix db inspector
cmd/geth: add verify-state
cmd/geth: add verification tool
core/rawdb: implement flatdb
cmd, core: fix rebase
core/state: use new contract code layout
core/state/pruner: avoid deleting genesis state
cmd/geth: add helper function
core, cmd: fix extract genesis
core: minor fixes
contracts: remove useless
core/state/snapshot: plugin stacktrie
core: polish
core/state/snapshot: iterate storage concurrently
core/state/snapshot: fix iteration
core: add comments
core/state/snapshot: polish code
core/state: polish
core/state/snapshot: rebase
core/rawdb: add comments
core/rawdb: fix tests
core/rawdb: improve tests
core/state/snapshot: fix concurrent iteration
core/state: run pruning during the recovery
core, trie: implement martin's idea
core, eth: delete flatdb and polish pruner
trie: fix import
core/state/pruner: add log
core/state/pruner: fix issues
core/state/pruner: don't read back
core/state/pruner: fix contract code write
core/state/pruner: check root node presence
cmd, core: polish log
core/state: use HEAD-127 as the target
core/state/snapshot: improve tests
cmd/geth: fix verification tool
cmd/geth: use HEAD as the verification default target
all: replace the bloomfilter with martin's fork
cmd, core: polish code
core, cmd: forcibly delete state root
core/state/pruner: add hash64
core/state/pruner: fix blacklist
core/state: remove blacklist
cmd, core: delete trie clean cache before pruning
cmd, core: fix lint
cmd, core: fix rebase
core/state: fix the special case for clique networks
core/state/snapshot: remove useless code
core/state/pruner: capping the snapshot after pruning
cmd, core, eth: fixes
core/rawdb: update db inspector
cmd/geth: polish code
core/state/pruner: fsync bloom filter
cmd, core: print warning log
core/state/pruner: adjust the parameters for bloom filter
cmd, core: create the bloom filter by size
core: polish
core/state/pruner: sanitize invalid bloomfilter size
cmd: address comments
cmd/geth: address comments
cmd/geth: address comment
core/state/pruner: address comments
core/state/pruner: rename homedir to datadir
cmd, core: address comments
core/state/pruner: address comment
core/state: address comments
core, cmd, tests: address comments
core: address comments
core/state/pruner: release the iterator after each commit
core/state/pruner: improve pruner
cmd, core: adjust bloom paramters
core/state/pruner: fix lint
core/state/pruner: fix tests
core: fix rebase
core/state/pruner: remove atomic rename
core/state/pruner: address comments
all: run go mod tidy
core/state/pruner: avoid false-positive for the middle state roots
core/state/pruner: add checks for middle roots
cmd/geth: replace crit with error
* core/state/pruner: fix lint
* core: drop legacy bloom filter
* core/state/snapshot: improve pruner
* core/state/snapshot: polish concurrent logs to report ETA vs. hashes
* core/state/pruner: add progress report for pruning and compaction too
* core: fix snapshot test API
* core/state: fix some pruning logs
* core/state/pruner: support recovering from bloom flush fail
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
4 years ago
Péter Szilágyi
d86906f1e6
params: just to make snapshots a bit more official
4 years ago
Péter Szilágyi
bbe694fc52
Merge pull request #22280 from karalabe/snapshot-default
...
cmd/utils: enable snapshots by default
4 years ago
isdyaufh8o7cq
477fd420b3
metrics: fix cast omission in cpu_syscall.go ( #22262 )
...
fixes an regression which caused build failure on certain platforms
4 years ago
Péter Szilágyi
994cdc69c8
cmd/utils: enable snapshots by default
4 years ago
Guillaume Ballet
e74bd587f7
consensus: remove seal verification from the consensus engine interface ( #22274 )
4 years ago
Martin Holst Swende
7ed860d4f1
eth: don't wait for snap registration if we're not running snap ( #22272 )
...
Prevents a situation where we (not running snap) connects with a peer running snap, and get stalled waiting for snap registration to succeed (which will never happen), which cause a waitgroup wait to halt shutdown
4 years ago
Marius van der Wijden
fba5a63afe
internal/ethapi: fix typo in comment ( #22271 )
4 years ago
gary rong
098a2b6e26
eth: move eth.Config to a common package ( #22205 )
...
This moves the eth config definition into a separate package, eth/ethconfig.
Packages eth and les can now import this common package instead of
importing eth from les, reducing dependencies.
Co-authored-by: Felix Lange <fjl@twurst.com>
4 years ago
Marius van der Wijden
28121324ac
internal/ethapi: comment nitpick ( #22270 )
4 years ago
Marius van der Wijden
54735a6723
fuzzers: added consensys/gurvy library to bn256 differential fuzzer ( #21812 )
...
This pr adds consensys' gurvy bn256 variant into the code for differential fuzzing.
4 years ago
Marius van der Wijden
3512b41c5c
core: reset txpool state on sethead ( #22247 )
...
fixes an issue where local transactions that were included in the chain before a SetHead were rejected if resubmitted, since the txpool had not reset the state to the current (older) state.
4 years ago
ucwong
83e4c49e2b
trie : use trie.NewStackTrie instead of new(trie.Trie) ( #22246 )
...
The PR makes use of the stacktrie, which is is more lenient on resource consumption, than the regular trie, in cases where we only need it for DeriveSha
4 years ago
Alex Prut
ef84da8481
all: remove unneeded parentheses ( #21921 )
...
* remove uneeded convertion type
* remove redundant type in composite literal
* omit explicit type where implicit
* remove unused redundant parenthesis
* remove redundant import alias duktape
4 years ago
rene
4eae0c6b6f
cmd/geth, node: allow configuring JSON-RPC on custom path prefix ( #22184 )
...
This change allows users to set a custom path prefix on which to mount the http-rpc
or ws-rpc handlers via the new flags --http.rpcprefix and --ws.rpcprefix.
Fixes #21826
Co-authored-by: Felix Lange <fjl@twurst.com>
4 years ago
Péter Szilágyi
e3430ac7df
eth: check snap satelliteness, delegate drop to eth ( #22235 )
...
* eth: check snap satelliteness, delegate drop to eth
* eth: better handle eth/snap satellite relation, merge reg/unreg paths
4 years ago
Sina Mahmoodi
3c728fb129
eth/tracers: fix unigram tracer ( #22248 )
4 years ago
Martin Holst Swende
f25b437b70
cmd/clef: don't check file permissions on windows ( #22251 )
...
Fixes #20123
4 years ago
Felföldi Zsolt
7a800f98f6
les/utils: UDP rate limiter ( #21930 )
...
* les/utils: Limiter
* les/utils: dropped prior weight vs variable cost logic, using fixed weights
* les/utils: always create node selector in addressGroup
* les/utils: renamed request weight to request cost
* les/utils: simplified and improved the DoS penalty mechanism
* les/utils: minor fixes
* les/utils: made selection weight calculation nicer
* les/utils: fixed linter warning
* les/utils: more precise and reliable probabilistic test
* les/utils: fixed linter warning
4 years ago
Sina Mahmoodi
eb21c652c0
cmd,core,eth,params,tests: define yolov3 + enable EIP-2565 ( #22213 )
...
Removes the yolov2 definition, adds yolov3, including EIP-2565. This PR also disables some of the erroneously generated blockchain and statetests, and adds the new genesis hash + alloc for yolov3.
This PR disables the CLI switches for yolo, since it's not complete until we merge support for 2930.
4 years ago
Guillaume Ballet
2e5d141708
rpc: deprecate Client.ShhSubscribe ( #22239 )
...
It never worked, whisper uses polling.
Co-authored-by: Felix Lange <fjl@twurst.com>
4 years ago
Felföldi Zsolt
a72fa88a0d
les: switch to new discv5 ( #21940 )
...
This PR enables running the new discv5 protocol in both LES client
and server mode. In client mode it mixes discv5 and dnsdisc iterators
(if both are enabled) and filters incoming ENRs for "les" tag and fork ID.
The old p2p/discv5 package and all references to it are removed.
Co-authored-by: Felix Lange <fjl@twurst.com>
4 years ago
Guillaume Ballet
9c5729311e
accounts/scwallet: update documentation ( #22242 )
4 years ago
Felix Lange
ad038b6289
accounts/scwallet: use go-ethereum crypto instead of go-ecdh ( #22212 )
...
* accounts/scwallet: use go-ethereum crypto instead of go-ecdh
github.com/wsddn/go-ecdh is a wrapper package for ECDH functionality
with any elliptic curve.
Since 'generic' ECDH is not required in accounts/scwallet (the curve is
always secp256k1), we can just use the standard library functionality
and our own crypto libraries to perform ECDH and save a dependency.
* Update accounts/scwallet/securechannel.go
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
* Use the correct key
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
4 years ago
Martin Holst Swende
681618275c
core: speed up header import ( #21967 )
...
This PR implements the following modifications
- Don't shortcut check if block is present, thus avoid disk lookup
- Don't check hash ancestry in early-check (it's still done in parallel checker)
- Don't check time.Now for every single header
Charts and background info can be found here: https://github.com/holiman/headerimport/blob/main/README.md
With these changes, writing 1M headers goes down to from 80s to 62s.
4 years ago
Martin Holst Swende
14d495491d
core/state: fix panic in state dumping ( #22225 )
4 years ago
Péter Szilágyi
573f373d2b
internal/ethapi: print tx details when submitting ( #22170 )
...
This adds more info about submitted transactions in log messages.
Co-authored-by: Felix Lange <fjl@twurst.com>
4 years ago
Marius van der Wijden
7202b410b0
tests/fuzzers/abi: fixed one-off panic with int.Min64 value ( #22233 )
...
* tests/fuzzers/abi: fixed one-off panic with int.Min64 value
* tests/fuzzers/abi: fixed one-off panic with int.Min64 value
4 years ago
Martin Holst Swende
d2779ed7ac
eth, p2p: reserve half peer slots for snap peers during snap sync ( #22171 )
...
* eth, p2p: reserve half peer slots for snap peers during snap sync
* eth: less logging
* eth: rework the eth/snap peer reservation logic
* eth: rework the eth/snap peer reservation logic (again)
4 years ago