Commit graph

73 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Péter Szilágyi
cd31f2dee2
all: change chain head markers from block to header (#26777) 2023-03-02 08:29:15 +02: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
Sina Mahmoodi
8cfcb41e57
graphql: return correct logs for tx (#25612)
* graphql: fix tx logs

* minor

* Use optimized search for selecting tx logs
2022-08-31 16:14:53 +02:00
Sina Mahmoodi
36874b63a1
eth/filters: add global block logs cache (#25459)
This adds a cache for block logs which is shared by all filters. The cache
size of is configurable using the `--cache.blocklogs` flag.

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-08-19 11:14:59 +02:00
Felix Lange
f809cf6ea6
graphql: embed *Resolver instead of backend interface (#25468)
This creates some infrastructure to share resources between graphql
API objects.
2022-08-03 19:08:32 +02:00
Sina Mahmoodi
29a6b6bcac
graphql: add raw fields to block and tx (#24816) 2022-05-17 11:31:17 +03:00
Sina Mahmoodi
440c9fcf75
graphql: fix long literal passed in a variable (#24864) 2022-05-12 21:10:08 +02:00
Sina Mahmoodi
d73df893a6
graphql: add rawReceipt field to transaction type (#24738)
* graphql: add tx receiptsRLP field

* use MarshalBinary

Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>

* update schema

Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>

* rename to rawReceipt

* indent fix

Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>
2022-05-04 14:31:07 +02:00
Sina Mahmoodi
57cec89253
graphql: fee history fields (#24452)
This PR adds the `NextBaseFeePerGas` to `Block` and `EffectiveTip` to `Transaction` to make it easier for clients to compute fee history themselves via graphql queries.
2022-03-10 13:59:22 +01:00
Sina Mahmoodi
862f8e98bc
graphql: fix nonce for pending accounts (#24443) 2022-02-22 10:45:11 +01:00
Sina Mahmoodi
3ccd6b6dbb
graphql: fix block resolving for parent field (#24191)
Fixes #24161
2022-01-05 16:22:46 +01:00
Sina Mahmoodi
c20de3c4bd
graphql: fix pre-byzantium receipt status (#24188)
Fixes #24124
2022-01-05 16:21:08 +01:00
Sina Mahmoodi
c0d17bca52
graphql: check header first in blocks query (#24190)
Fixes #24167

New behaviour is that the endpoint returns results only for available
blocks without returning an error when it doesn't find a block. Note we
skip any block after a non-existent block.

This adds a header fetch for every block in range (even if header
is not needed). Alternatively, we could do the check in every field's
resolver method to avoid this overhead.
2022-01-05 16:11:46 +01:00
Péter Szilágyi
c10a0a62c3
eth: request id dispatcher and direct req/reply APIs (#23576)
* eth: request ID based message dispatcher

* eth: fix dispatcher cancellation, rework fetchers idleness tracker

* eth/downloader: drop peers who refuse to serve advertised chains
2021-11-26 13:26:03 +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
Martin Holst Swende
42bc1944a1
graphql: add storage slots to access list (#23650)
Fixes #23640
2021-09-29 00:28:17 +02:00
Péter Szilágyi
9e17648d8c
les: duplicate downloader and fetcher to allow progressive refactoring 2021-09-10 11:11:59 +03:00
gary rong
bef78efb49
graphql: fix transaction API (#23052) 2021-06-22 12:13:48 +03:00
Péter Szilágyi
aa69d36152
core, graphql, internal: expose effectiveGasPrice in receipts 2021-06-16 09:52:06 +03:00
Péter Szilágyi
c503f98f6d
all: rename internal 1559 gas fields, add support for graphql (#23010)
* all: rename internal 1559 gas fields, add support for graphql

* cmd/evm/testdata, core: use public 1559 gas names on API surfaces
2021-06-08 12:05:41 +02:00
Martin Holst Swende
5cff9754d7
core, eth, internal, les: RPC methods and fields for EIP 1559 (#22964)
* internal/ethapi: add baseFee to RPCMarshalHeader

* internal/ethapi: add FeeCap, Tip and correct GasPrice to EIP-1559 RPCTransaction results

* core,eth,les,internal: add support for tip estimation in gas price oracle

* internal/ethapi,eth/gasprice: don't suggest tip larger than fee cap

* core/types,internal: use correct eip1559 terminology for json marshalling

* eth, internal/ethapi: fix rebase problems

* internal/ethapi: fix rpc name of basefee

* internal/ethapi: address review concerns

* core, eth, internal, les: simplify gasprice oracle (#25)

* core, eth, internal, les: simplify gasprice oracle

* eth/gasprice: fix typo

* internal/ethapi: minor tweak in tx args

* internal/ethapi: calculate basefee for pending block

* internal/ethapi: fix panic

* internal/ethapi, eth/tracers: simplify txargs ToMessage

* internal/ethapi: remove unused param

* core, eth, internal: fix regressions wrt effective gas price in the evm

* eth/gasprice: drop weird debug println

* internal/jsre/deps: hack in 1559 gas conversions into embedded web3

* internal/jsre/deps: hack basFee to decimal conversion

* internal/ethapi: init feecap and tipcap for legacy txs too

* eth, graphql, internal, les: fix gas price suggestion on all combos

* internal/jsre/deps: handle decimal tipcap and feecap

* eth, internal: minor review fixes

* graphql, internal: export max fee cap RPC endpoint

* internal/ethapi: fix crash in transaction_args

* internal/ethapi: minor refactor to make the code safer

Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: gary rong <garyrong0905@gmail.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-06-02 16:13:10 +03:00