Commit graph

112 commits

Author SHA1 Message Date
devopsbo3
e0813b6b52 Revert "internal/ethapi: make EstimateGas use latest block by default (#24363)"
This reverts commit 4f615dec62.
2023-11-10 12:27:53 -06:00
devopsbo3
0f5ee6090f Revert "graphql: upgrade UI to v2 (#27294)"
This reverts commit db3e1179e2.
2023-11-10 12:27:53 -06:00
devopsbo3
cbd9ba5c6f Revert "graphql: simplify tx resolve (#27285)"
This reverts commit 8d91a3e6be.
2023-11-10 12:27:53 -06:00
devopsbo3
269d886472 Revert "graphql: implement withdrawals (EIP-4895) (#27072)"
This reverts commit 19aebbdd1b.
2023-11-10 12:27:53 -06:00
devopsbo3
923d43b402 Revert "cmd, core, eth, graphql, trie: no persisted clean trie cache file (#27525)"
This reverts commit 2c0c010df5.
2023-11-10 12:27:53 -06:00
devopsbo3
c883d37f31 Revert "graphql: fix race in withdrawals test (#27706)"
This reverts commit c5cd161825.
2023-11-10 12:27:53 -06:00
devopsbo3
166e2c09a6 Revert "consensus/misc: move eip1559 into a package (#27828)"
This reverts commit b2f7349a6b.
2023-11-10 12:27:53 -06:00
devopsbo3
2930b9e239 Revert "internal/ethapi, graphql: correct comments about gas price logic (#27752)"
This reverts commit 0458ddfa6d.
2023-11-10 12:27:53 -06:00
devopsbo3
99a79b741b Revert "internal/ethapi: add state override to estimateGas (#27845)"
This reverts commit 905a19b3c8.
2023-11-10 12:27:53 -06:00
devopsbo3
b498503f0c Revert "graphql: avoid greedy allocation (#27873)"
This reverts commit 8257f411d6.
2023-11-10 12:27:53 -06:00
devopsbo3
4ef5c21090 Revert "graphql: add yParity field for transactions (#27882)"
This reverts commit 0926b1e6f4.
2023-11-10 12:27:53 -06:00
devopsbo3
7ab1dc6c9f Revert "graphql: validate block params (#27876)"
This reverts commit 639618350d.
2023-11-10 12:27:53 -06:00
devopsbo3
383c2aa6c0 Revert "graphql: fix nil deref on a timer (#27978)"
This reverts commit 8c74940ebf.
2023-11-10 12:27:53 -06:00
devopsbo3
77463b2bbf Revert "graphql: add 4844 blob fields (#27963)"
This reverts commit 92902c3520.
2023-11-10 12:27:53 -06:00
devopsbo3
cf2f02c1a4 Revert "graphql: return error if block from>to (#28393)"
This reverts commit c637c84fc4.
2023-11-10 12:27:53 -06:00
devopsbo3
ec5e951acc Revert "graphql: logs return error if from block > to (#28412)"
This reverts commit 528758f2a9.
2023-11-10 12:27:53 -06:00
devopsbo3
5acfa594f4 Revert "graphql: fix an issue of nil pointer panic (#28416)"
This reverts commit 503c8d4347.
2023-11-10 12:27:53 -06:00
devopsbo3
748315e8a3 Revert "graphql: always set content-type to application/json (#28417)"
This reverts commit 33054bcc3c.
2023-11-10 12:27:53 -06:00
devopsbo3
d3fcd58947 Revert "graphql: type of yParity from Long to BigInt (#28456)"
This reverts commit 813f62fd81.
2023-11-10 12:27:53 -06:00
Delweng
813f62fd81 graphql: type of yParity from Long to BigInt (#28456)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
33054bcc3c graphql: always set content-type to application/json (#28417)
---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
503c8d4347 graphql: fix an issue of nil pointer panic (#28416)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
528758f2a9 graphql: logs return error if from block > to (#28412)
As per discussion in ethereum/execution-apis#475

Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
c637c84fc4 graphql: return error if block from>to (#28393)
As per discussion in ethereum/execution-apis#475
2023-11-10 11:09:46 -06:00
Delweng
92902c3520 graphql: add 4844 blob fields (#27963)
This adds block and receipt fields for EIP-4844.

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
8c74940ebf graphql: fix nil deref on a timer (#27978)
graphql: fix the panic of nil timer.Stop

Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Sina Mahmoodi
639618350d graphql: validate block params (#27876)
Block takes a number and a hash. The spec is unclear on what should happen in this case, leaving it an implemenation detail. With this change, we return an error in case both number and hash are passed in.
2023-11-10 11:09:46 -06:00
Delweng
0926b1e6f4 graphql: add yParity field for transactions (#27882)
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-11-10 11:09:46 -06:00
Martin Holst Swende
8257f411d6 graphql: avoid greedy allocation (#27873)
Fixes a graphql-dos

---------

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2023-11-10 11:09:46 -06:00
Amin Talebi
905a19b3c8 internal/ethapi: add state override to estimateGas (#27845) 2023-11-10 11:09:46 -06:00
Christopher Harrison
0458ddfa6d internal/ethapi, graphql: correct comments about gas price logic (#27752) 2023-11-10 11:09:46 -06:00
Delweng
b2f7349a6b consensus/misc: move eip1559 into a package (#27828)
* consensus/misc: move eip1559 as a sub directory

Signed-off-by: jsvisa <delweng@gmail.com>

* consensus/misc: package name

Signed-off-by: jsvisa <delweng@gmail.com>

* all: eip1559

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Sina Mahmoodi
c5cd161825 graphql: fix race in withdrawals test (#27706)
graphql: fix race in test
2023-11-10 11:09:46 -06:00
rjl493456442
2c0c010df5 cmd, core, eth, graphql, trie: no persisted clean trie cache file (#27525)
The clean trie cache is persisted periodically, therefore Geth can
quickly warmup the cache in next restart.

However it will reduce the robustness of system. The assumption is
held in Geth that if the parent trie node is present, then the entire
sub-trie associated with the parent are all prensent.

Imagine the scenario that Geth rewinds itself to a past block and
restart, but Geth finds the root node of "future state" in clean
cache then regard this state is present in disk, while is not in fact.

Another example is offline pruning tool. Whenever an offline pruning
is performed, the clean cache file has to be removed to aviod hitting
the root node of "deleted states" in clean cache.

All in all, compare with the minor performance gain, system robustness
is something we care more.
2023-11-10 11:09:46 -06:00
Sina Mahmoodi
19aebbdd1b graphql: implement withdrawals (EIP-4895) (#27072)
implements withdrawals in graphql as per https://github.com/ethereum/execution-apis/pull/400
2023-11-10 11:09:46 -06:00
John Chase
8d91a3e6be graphql: simplify tx resolve (#27285) 2023-11-10 11:09:46 -06:00
Sina Mahmoodi
db3e1179e2 graphql: upgrade UI to v2 (#27294)
Upgrades  graphiql to v2.4.4. The interface has become much nicer, and there are extra features like tabs, history, dark mode etc.

This change also now uses golang embed to bundle the resources.

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
zhiqiangxu
4f615dec62 internal/ethapi: make EstimateGas use latest block by default (#24363)
* EstimateGas should use LatestBlockNumber by default

* graphql: default to use latest for gas estimation

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
Péter Szilágyi
3eb53061af all: remove ethash pow, only retain shims needed for consensus and tests (#27178)
* all: remove ethash pow, only retain shims needed for consensus and tests

* all: thank you linter

* all: disallow launching Geth in legacy PoW mode

* cmd/env/internal/t8ntool: remove dangling ethash flag
2023-11-10 11:09:46 -06:00
David Dzhalaev
50383d6956 graphql, internal: fix typos in comments (#27184)
* ✏️ Fix typos

* ️ Revert changes

* Update internal/web3ext/web3ext.go

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
Sina Mahmoodi
1c66a6b59d internal/ethapi: add block overrides to eth_call (#26414)
Adds an optional config parameter to eth_call which allows users to override block context fields (same functionality that was added to traceCall in #24871)

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
Sina Mahmoodi
c22816373a graphql: encode Long values as hex (#26894)
This is a breaking GraphQL API change. All numeric values are now encoded as
hex strings. The motivation for this change is matching JSON-RPC outputs more
closely.

Numbers in query parameters are accepted as both decimal integers and hex strings.
2023-11-10 11:09:46 -06:00
Sina Mahmoodi
62fb7d3f85
graphql: revert storage access regression (#27007) 2023-03-30 06:57:49 -04:00
Sina Mahmoodi
a236e03d00
graphql: fix data races (#26965)
Fixes multiple data races caused by the fact that resolving fields are done concurrently by the graphql library. It also enforces caching at the stateobject level for account fields.
2023-03-28 03:08:10 -04:00
Delweng
117530b0e6
metrics/librato: ensure resp.body closed (#26969)
This change ensures that we call Close on a http response body, in various places in the source code (mostly tests)
2023-03-27 07:44:41 -04:00
Péter Szilágyi
cd31f2dee2
all: change chain head markers from block to header (#26777) 2023-03-02 08:29:15 +02:00
Shude Li
163e996d0e
all: use http package to replace http method names (#26535) 2023-01-24 11:12:25 +02:00
Sina Mahmoodi
f20eba426a
graphql, node, rpc: improve HTTP write timeout handling (#25457)
Here we add special handling for sending an error response when the write timeout of the
HTTP server is just about to expire. This is surprisingly difficult to get right, since is
must be ensured that all output is fully flushed in time, which needs support from
multiple levels of the RPC handler stack:

The timeout response can't use chunked transfer-encoding because there is no way to write
the final terminating chunk. net/http writes it when the topmost handler returns, but the
timeout will already be over by the time that happens. We decided to disable chunked
encoding by setting content-length explicitly.

Gzip compression must also be disabled for timeout responses because we don't know the
true content-length before compressing all output, i.e. compression would reintroduce
chunked transfer-encoding.
2022-12-07 14:02:14 +01:00
Ahmet Avci
ee9ff06469
graphql: add query timeout (#26116)
This PR adds a 60 second timeout to graphql queries.
2022-11-08 13:14:14 +01:00
Sina Mahmoodi
818ff32ff5
graphql: fixes missing tx logs (#25745)
* graphql: fix tx logs

* graphql: refactor test service setup

* graphql: add test for tx logs
2022-09-13 22:49:52 +03:00