Commit Graph
13008 Commits
Author SHA1 Message Date
Felföldi Zsoltandrjl493456442 35dbf7a8a3 eth/gasprice: implement feeHistory API (#23033)
* eth/gasprice: implement feeHistory API

* eth/gasprice: factored out resolveBlockRange

* eth/gasprice: add sanity check for missing block

* eth/gasprice: fetch actual gas used from receipts

* miner, eth/gasprice: add PendingBlockAndReceipts

* internal/ethapi: use hexutil.Big

* eth/gasprice: return error when requesting beyond head block

* eth/gasprice: fixed tests and return errors correctly

* eth/gasprice: rename receiver name

* eth/gasprice: return directly if blockCount == 0

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2021-06-28 16:16:32 +02:00
Sina Mahmoodi 1b5582acf7 core, eth: fix precompile addresses for tracers (#23097)
* core,eth/tracers: make isPrecompiled dependent on HF

* eth/tracers: use keys when constructing chain config struct

* eth/tracers: dont initialize activePrecompiles with random value
2021-06-28 14:13:27 +02:00
ForLinaandliuyaxiong dde6f1e92d p2p/enode: fix method doc (#23115)
This is an obvious spelling error

Co-authored-by: liuyaxiong <liuyaxiong@inspur.com>
2021-06-28 10:48:17 +03:00
Austin Roberts 4dd3527541 Fix tracer loading 2021-06-25 23:27:09 -05:00
Austin Roberts b821bd9948 Make injectable versions of plugin calls 2021-06-25 23:02:25 -05:00
Austin Roberts 03808de29a Refactor plugin system
When the plugin loader itself had to know the types in the arguments
and return values of the plugin functions, it was very difficult to
avoid import loops, given that the types were often defined in the
same package that needed to invoke the plugins.

Under this model, the plugin loader has much less knowledge of the
plugins themselves, and within each package we define functions to
interact with the plugins.
2021-06-25 22:46:17 -05:00
Austin Roberts 091a2f4884 Checkpoint
Things are currently broken because of import cycles. I'm going to
need to revisit how the plugin loader works, but I wanted to make
a checkpoint before I start breaking things again.
2021-06-25 17:08:39 -05:00
Austin Roberts ad8719a64a Get tracers working, returning results 2021-06-25 14:57:24 -05:00
Austin Roberts 97cf240fe0 Add tracer hooks for debug_traceCall, etc. 2021-06-25 13:55:31 -05:00
Austin Roberts 5c55657c54 Plugin Interface Refactor
This makes two main changes to the plugin system:

* Instead of assuming that each plugin will have exactly one type,
  inspect each plugin to see which interfaces it provides, and
  register it as a provider of each provided interface. This can
  allow a single .so file to provide multiple interfaces, which
  will likely be necessary for aggregating certain types of info.
* Rather than using dependency injection and having to propagate
  the plugin system all throughout Geth, have a default plugin
  loader so we need only import the module and make calls to it.
  If the plan were to integrate this into mainline Geth, I would
  say we use dependency injection and take the time to pass the
  plugin loader throughout the codebase, but as I expect this to
  be a fork that has to pull upstream changes, this approach
  should make merge conflicts much less common.
2021-06-25 10:57:56 -05:00
Austin Roberts ff46e3c7f8 Add plugin folder 2021-06-25 10:23:49 -05:00
Martin Holst Swende 2d4eff21ca eth/downloader: increase downloader block body allowance (#23074)
This change increases the cache size from 64 to 256 Mb for block bodies.
Benchmarks have shown this to be one bottleneck when trying to achieve
higher download speeds.

The commit also includes a minor optimization for header inserts in package
core: previously, the presence of headers in the database was checked for
every header before writing it. With the change, if one header fails the
presence check, all subsequent headers are also assumed to be missing.
This is an improvement because in practice, the headers are almost always
missing during sync.
2021-06-25 14:53:22 +02:00
Li Dongweiandlidongwei bca8c03e57 core/state: remove unused methods ReturnGas, GetStorageProofByHash (#23092)
Co-authored-by: lidongwei <lidongwei@huobi.com>
2021-06-25 14:34:09 +02:00
haryu703 c07918e7d8 eth/gasprice: fix typo in comment (#22998) 2021-06-25 12:48:06 +02:00
piersy 0e6961366a cmd/geth: fix IPC probe in les test (#23094)
Previously, the test waited a second and then failed if geth had not
started. This caused the test to fail intermittently. This change checks
whether the IPC is open 10 times over a 5 second period and then fails
if geth is still not available.
2021-06-25 12:40:37 +02:00
williambermanandWilliam 948a600ed5 eth/tracers: convert int/hash values from context into js object (#23108)
* Convert int/hash values from context into js object

* Use js fixed buffer

Co-authored-by: William <william.berman@coinbase.com>
2021-06-25 09:02:15 +03:00
Péter Szilágyi 9e23610b0f Merge pull request #23104 from karalabe/tracer-context
eth/tracers: expose contextual infos (block hash, tx hash, tx index)
2021-06-24 13:50:07 +03:00
Péter Szilágyi 29905d86ae eth/tracers: expose contextual infos (block hash, tx hash, tx index) 2021-06-24 12:46:26 +03:00
Péter Szilágyi 10eb654f27 Merge pull request #23089 from holiman/fix_fuzzers
crypto: fix build directives
2021-06-23 07:34:35 +03:00
Nye Liu 4dde0665c8 core: transaction journal should not be executable (#23090) 2021-06-23 07:29:20 +03:00
Martin Holst Swende a750bf8686 crypto: fix build directives 2021-06-22 15:21:11 +02:00
gary rong bef78efb49 graphql: fix transaction API (#23052) 2021-06-22 12:13:48 +03:00
Guillaume Ballet ddf10250c7 accounts/abi/bind: replace context.TODO with context.Background (#23088) 2021-06-22 12:06:34 +03:00
Péter Szilágyi fcd7bdc2b7 Merge pull request #23062 from nfeignon/fix-abi-bind-ensure-context
accounts/abi/bind: call ensureContext on every context
2021-06-22 11:47:48 +03:00
Sachin Kumar Singh 1e44c3585f README: Discord server instead of gitter for communication with devs (#23080)
The `README.md` links the Gitter channel for discussions, but the
official docs and even the Gitter channel itself recommend using the
official Discord Server for such discussions.
This PR simply changes the Gitter link and provides Discord invite link.
2021-06-22 11:33:49 +03:00
Péter Szilágyi 5228b2a353 Merge pull request #23083 from karalabe/docker-fix-experimental
travis: enable experimental docker for manifest building
2021-06-21 19:44:23 +03:00
Péter Szilágyi e0123026b6 travis: enable experimental docker for manifest building 2021-06-21 19:43:37 +03:00
Péter Szilágyi 653a30f4ca Merge pull request #23082 from karalabe/docker-flat-publish
travis, Dockerfile, build: docker build and multi-arch publish combo
2021-06-21 19:32:45 +03:00
Péter Szilágyi 0f2347d070 travis, Dockerfile, build: docker build and multi-arch publish combo 2021-06-21 19:17:59 +03:00
Péter Szilágyi da000c8314 Merge pull request #23078 from karalabe/docker-post-publish
travis: move docker steps further to prevent hanging other builders
2021-06-21 13:50:24 +03:00
Péter Szilágyi f915a4bf20 travis: move docker steps further to prevent hanging other builders 2021-06-21 13:01:24 +03:00
Evolution404andFelix Lange 732a6a3666 trie: small optimization of delete in fullNode case (#22979)
When deleting in fullNode, and the new child node nn is not nil, there is no need
to check the number of non-nil entries in the node. This is because the fullNode 
must've contained at least two children before deletion, so there must be another
child node other than nn.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-06-20 15:59:00 +02:00
Oliver Tale-Yazdi 7b6c8363da core: copy CliqueConfig in DeveloperGenesisBlock (#23068)
Copy the CliqueConfig instead of reusing the pointer.
This makes DeveloperGenesisBlock thread safe and prevents it from
changing params.AllCliqueProtocolChanges.Clique.Epoch.
2021-06-20 15:52:04 +02:00
Péter Szilágyi 4695117f2e Merge pull request #23069 from karalabe/docker-multi-arch
travis, build: add support for multi-arch docker images
2021-06-18 15:35:09 +03:00
Péter Szilágyi e9f99d1c91 travis, build: add support for multi-arch docker images 2021-06-18 15:30:00 +03:00
Marius van der Wijden ef946a6c87 tests: fix eip1559 tx on non-eip1559 network (#23054) 2021-06-18 12:34:31 +02:00
Marius van der Wijden 58aeab77d2 tests: fix nil pointer panic on failure (#23053) 2021-06-18 12:21:34 +02:00
lightclient 97ce6dfa6d internal/ethapi: fix typo in comment (#23057) 2021-06-18 12:16:34 +02:00
Afanasii Kurakin bbb2b30506 params: fix typo in gas cost comments (#23065) 2021-06-18 12:15:51 +02:00
Jeff Wentworth 15fe3050a1 core/types: add DynamicFeeTx to TxData implementation list in docs (#23063) 2021-06-17 19:54:37 +02:00
Nicolas Feignon c63c2d855e accounts/abi/bind: call ensureContext on every context 2021-06-17 14:04:24 +02:00
Felix Lange 87a11a87c2 params: begin v1.10.5 release cycle 2021-06-17 12:36:42 +02:00
Felix Lange aa637fd38a params: release go-ethereum v1.10.4 stable 2021-06-17 12:35:17 +02:00
Péter Szilágyi e1f244a6e6 Merge pull request #23061 from karalabe/docker-noarm
travis: don't overwrite amd64 images with arm64
2021-06-17 12:23:16 +03:00
Péter Szilágyi 40a11d644c travis: don't overwrite amd64 images with arm64 2021-06-17 12:22:22 +03:00
Péter Szilágyi b28f8c0c43 Merge pull request #23060 from karalabe/travis-docker
travis, build: own docker builder and hub pusher
2021-06-17 12:02:18 +03:00
Péter Szilágyi 90ffcfde89 travis, build: own docker builder and hub pusher 2021-06-17 11:04:57 +03:00
Marius van der Wijden a675c89c75 core: readded state processor error tests (#23055) 2021-06-16 16:00:36 +03:00
Martin Holst Swende 080b6ebe91 core/vm: evm fix panic (#23047)
* core/vm: evm fix panic

* core/vm/runtime: default to params.initialbasefee
2021-06-16 09:53:27 +03:00
Péter Szilágyi ae315ef7a1 Merge pull request #23050 from karalabe/1559-receipt-rpc
core, graphql, internal: expose effectiveGasPrice in receipts
2021-06-16 09:52:31 +03:00