Commit Graph

12923 Commits

Author SHA1 Message Date
Felix Lange
f9d683b07f
go.mod: upgrade goja (#23721)
This update adds support for some more ES6 functionality, notably
arrow functions.
2021-10-13 14:42:00 +02:00
noam-alchemy
633e7ef478
eth,rpc: allow for flag configured timeouts for eth_call (#23645)
* eth,rpc: allow for flag configured timeouts for eth_call

* lint: account for package-local import order

* cr: rename `rpc.calltimeout` to `rpc.evmtimeout`
2021-10-12 10:46:04 +02:00
z89
3d11a22c99
fixed broken web3 methods link in README.md (#23703) 2021-10-12 08:44:07 +02:00
Martin Holst Swende
6289137827
consensus/clique, core: API cleanup (#23100)
This removes some code:

- The clique engine calculated the snapshot twice when verifying headers/blocks.

- The method GetBlockHashesFromHash in Header/Block/Lightchain was only used by tests. It
  is now removed from the API.
  
- The method GetTdByHash internally looked up the number before calling GetTd(hash, num).
  In many cases, callers already had the number, and used this method just because it has a
  shorter name. I have removed the method to make the API surface smaller.
2021-10-11 23:16:46 +02:00
Marius van der Wijden
da3da7c0e7
ci: enable race tests as cron job on travis (#23480) 2021-10-11 19:37:18 +02:00
Miro
cf8a6d6173
core: tests for forked blocks retrievable by hash (#23695)
* Update tests to showcase that forked blocks can still be looked up by their hash
2021-10-11 19:25:21 +02:00
rjl493456442
088bc34194
les/vflux/server: fix metrics (#22946)
* les/vflux/server: fix metrics

* les/vflux/server: fix metrics
2021-10-11 18:49:26 +02:00
Marius van der Wijden
53b1420ede
params: changed CatalystBlock to TerminalTotalDifficulty (#23700)
* params: changed CatalystBlock to TerminalTotalDifficulty

* eth/catalyst: comment out unused code
2021-10-11 18:58:11 +03:00
Guillaume Ballet
8b6e018401
build: increase C thread stack size on linux (#23676)
* build: increase thread stack size when running alpine linux

* review feedback: force a stack size of 8M on all linux distribs

* fix missing extldflags
2021-10-11 15:48:41 +02:00
Martin Holst Swende
64da037e99
cmd/evm: stricter transaction validation (#23694)
* cmd/evm: t9n: validate transaction intrinsic gas

* cmd/evm: t9n: stricter tx validation
2021-10-11 12:30:13 +02:00
Zachinquarantine
8a430fbd1c
cmd/puppeth: add txpool to explorer Dockerfile (#23652) 2021-10-11 11:15:45 +03:00
aaronbuchwald
bcbd700367
eth/gasprice: avoid modifying TestChainConfig (#23204)
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-10-11 01:52:30 +02:00
hsyodyssey
84bccd0900
core/state: fix typos in comments (#23702) 2021-10-10 15:00:00 +02:00
Aditya Arora
a6a0609b05
internal/jsre: handle null and undefined to prevent crash (#23701)
This prevents the console from crashing when auto-completing on
a variable or property that is null or undefined.

Fixes #23693
2021-10-10 14:58:47 +02:00
Felix Lange
1bea4b0dfa
miner/stress: initialize account backends explicitly (#23699)
node.Node no longer registers any account manager backends by default,
they need to be registered explicitly.

For ethash-based tests, we actually don't need any accounts in the miner
keystore. Just set the etherbase instead to make mining work. For
clique, the signer account must be in the keystore.

The change also adds interrupt handling in stress tests.
2021-10-09 16:39:53 +02:00
Marius van der Wijden
ee120ef865
miner: fix data race during shutdown (#23435)
This fixes a data race on worker.current by moving the call to StopPrefetcher
into the main loop.

The commit also contains fixes for two other races in unit tests of unrelated packages.
2021-10-08 20:12:52 +02:00
Martin Holst Swende
28d30b51f8
eth: close miner on exit (instead of just stopping) (#21992)
This ensures that all miner goroutines have exited before stopping the blockchain. 

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-10-08 18:36:58 +02:00
Felix Lange
2fe0c65f4b
build: upgrade -dlgo version to 1.17.2 (#23698)
Go 1.17.2 fixes some miscompilation issues on amd64 and a runtime issue with timers.
While the upgrade is not strictly necessary for go-ethereum right now, it is still good
to be up-to-date.
2021-10-08 17:23:25 +02:00
Sean
ec2b43c2c3
cmd/geth: fix typo in error message (#23697) 2021-10-08 14:57:49 +02:00
Sina Mahmoodi
48496e0675
internal/ethapi: use correct signer when serving old blocks (#23683)
Fixes #23681

After the fix I get the address 0x6d6d02e83c4ced98204e20126acf27e9d87b8af2 for the
tx mentioned in the ticket, which agrees with etherscan.
2021-10-07 15:51:14 +02:00
Martin Holst Swende
edb1937cf7
core: improve shutdown synchronization in BlockChain (#22853)
This change removes misuses of sync.WaitGroup in BlockChain. Before this change,
block insertion modified the WaitGroup counter in order to ensure that Stop would wait
for pending operations to complete. This was racy and could even lead to crashes
if Stop was called at an unfortunate time. The issue is resolved by adding a specialized
'closable' mutex, which prevents chain modifications after stopping while also
synchronizing writers with each other.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-10-07 15:47:50 +02:00
aaronbuchwald
4e599ee469
core/types: copy tx recipient address (#23376)
This resolves a long-standing TODO. The point of copying the address is
to ensure that all data referenced by types.Transaction is independent of the
data passed into the constructor.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-10-06 13:12:52 +02:00
Felix Lange
57ff2dee06
go.mod: upgrade github.com/karalable/usb (#23684)
This update includes fixes for the *BSD build and go module vendoring.
2021-10-05 18:33:53 +02:00
Martin Holst Swende
307156cc46
eth/api: add rpc method to obtain which states are accessible (#23646)
This PR adds a method to the debug namespace, to iterate over the blocks and check where we have the roots on disk.
2021-10-05 08:13:00 +02:00
Ferran Borreguero
0dbb3b1601
eth/protocols/eth: replace array with counter in txn broadcaster (#23656) 2021-10-04 16:10:51 +02:00
Miro
5a0e1d88f4
eth/filters: fix TestPendingLogsSubscription (#23619)
The test did not synchronize with per-case goroutines, and thus didn't notice
that some tests were just hanging. This change adds missing synchronization
and fixes the broken tests.
2021-10-04 14:09:51 +02:00
hsyodyssey
12f971fb2d
core/state: fix typo in comment (#23665) 2021-10-04 12:16:50 +02:00
Péter Szilágyi
01fdca53e1
Merge pull request #23677 from karalabe/canon-rlp-fetcher
internal/ethapi: make header/block rlp retrieval canonical
2021-10-03 17:45:12 +03:00
Péter Szilágyi
5240725041
internal/ethapi: make header/block rlp retrieval canonical 2021-10-03 16:47:51 +03:00
Sina Mahmoodi
b522f5e091
eth/tracers: fix callTracer fault handling (#23667)
* eth/tracers: fix calltracer fault handling

* eth/tracers: fix calltracer indentation
2021-10-01 13:03:24 +02:00
Péter Szilágyi
a47b8cf6f5
Merge pull request #23670 from karalabe/get-header-rlp
internal/ethapi: support retrieving header RLPs too
2021-10-01 12:14:32 +03:00
Péter Szilágyi
07a5bc1b0b
internal/ethapi: support retrieving header RLPs too 2021-10-01 11:47:29 +03:00
Ikko Ashimine
f2491c5ed7
core: fix typo in comment (#23658) 2021-09-29 21:28:47 +02:00
Felix Lange
06082fe267 params: begin v1.10.10 release cycle 2021-09-29 20:00:31 +02:00
Felix Lange
eae3b1946a params: release go-ethereum v1.10.9 stable 2021-09-29 19:59:41 +02:00
Martin Holst Swende
3a6fe69f23
eth/protocols/snap, trie: better error-handling (#23657) 2021-09-29 15:19:40 +02:00
Martin Holst Swende
42bc1944a1
graphql: add storage slots to access list (#23650)
Fixes #23640
2021-09-29 00:28:17 +02:00
Ferran Borreguero
a541fbea18
eth/protocols/eth: simplify peer known block/txs caches (#23649)
* Simplify peer known block/txns cache

* Address minor changes

* Add more minor comments

* Minor changes from review
2021-09-28 13:44:07 +02:00
Martin Holst Swende
3531ca2246
eth/tracers: avoid unsyncronized mutations on trie database (#23632)
This PR fixes an issue in traceChain, where the statedb Commit operation was performed asynchronously with dereference-operations agains the underlying trie.Database instance. Due to how the reference counting works within the trie database (where parent count is recursively updated when new parents are added), doing dereferencing in the middle of Commit can cause the refcount to become wrong, leading to an inconsistent state. 

This was fixed by doing Commit/Deref from the same routine.
2021-09-28 13:06:19 +02:00
Yihau Chen
92c5d104d0
accounts/abi/bind: check event signature before parsing (#23230)
* accounts/abi/bind: check event signature before parsing

* remove redundant break line
2021-09-28 12:56:03 +02:00
Sina Mahmoodi
783e97ef1f
core/rawdb: avoid unnecessary receipt processing for log filtering (#23147)
* core/types: rm extranous check in test

* core/rawdb: add lightweight types for block logs

* core/rawdb,eth: use lightweight accessor for log filtering

* core/rawdb: add bench for decoding into rlpLogs
2021-09-28 12:54:49 +02:00
Martin Holst Swende
ab2caaee11
eth/tracers: implement debug.intermediateRoots (#23594)
This PR implements a new debug method, which I've talked briefly about to some other client developers. It allows the caller to obtain the intermediate state roots for a block (which might be either a canon block or a 'bad' block).
2021-09-28 12:53:11 +02:00
Guillaume Ballet
443afc975c
core/state: move state account to core/types + abstracted "write account to trie" (#23567)
* core/state: abstracted "write account to trie" method

* fix appveyor build

* Apply suggestions from code review

Co-authored-by: Martin Holst Swende <martin@swende.se>

* review feedback

* core/state/accounts: move Account to core/types

* core/types: rename Account -> StateAccount

* core/state: restore EncodeRLP for stateObject

* core/types: add the missing file

* more review feedback

* more review feedback

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-09-28 10:48:07 +02:00
Sina Mahmoodi
ac7baeab57
eth/tracers: re-write of 4byte tracer using enter/exit (#23622)
* eth/tracers: add re-write of 4byte tracer using enter/exit

* eth/tracers: fix 4byte indent
2021-09-27 18:44:16 +02:00
Zachinquarantine
12674d493e
cmd/puppeth: remove shh from Dockerfile (#23634) 2021-09-27 18:42:48 +02:00
Jordan Krage
51ececb64e
rpc: set pong read deadline (#23556)
This PR adds a 30s timeout for the remote part to answer a ping message, thus detecting (silent) disconnnects
2021-09-27 16:31:45 +02:00
gary rong
57a3fab8a7
accounts/abi: fix resolving single struct argument (#23573) 2021-09-22 10:18:18 +02:00
Sina Mahmoodi
ca9bce9a45
rpc: set scheme for ws and ipc conns to the server (#23615)
* rpc: set scheme for ws and ipc conns to the server

* rpc: review fixes

* rpc: bugfix

* rpc: empty default scheme
2021-09-21 22:26:35 +02:00
Marius van der Wijden
b61ef24cce
consensus/clique: prevent 0 len extradata from panicing (#23538)
Closes #23522

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-09-21 10:46:08 +02:00
Thad Guidry
d8211c7ec7
console: add note about typing exit to exit (#23602)
* add explicit note about typing exit in console

* Add note about typing exit as alternative
2021-09-21 11:19:46 +03:00