Commit graph

371 commits

Author SHA1 Message Date
Sina Mahmoodi
d1ce690e76 move multicall logic to struct 2023-10-10 16:34:48 +02:00
Sina Mahmoodi
2690445207 fix block hash cache 2023-10-10 15:53:55 +02:00
Sina Mahmoodi
cc1158ae6d possibly fix crasher 2023-10-10 12:55:08 +02:00
Sina Mahmoodi
a5ffd9adf2 serve blockhash requests 2023-10-06 16:54:35 +03:00
Sina Mahmoodi
973116c1d2 repair logs 2023-10-05 20:07:31 +03:00
Sina Mahmoodi
45ba37ecc9 compute block hash based on header 2023-10-05 17:50:36 +03:00
Sina Mahmoodi
d5c0ff4eae add error codes to calls 2023-10-04 16:11:49 +03:00
Sina Mahmoodi
523e3d24fa cover it in test case 2023-09-29 16:44:10 +02:00
Sina Mahmoodi
100c593ad9 fix crasher 2023-09-29 16:34:45 +02:00
Sina Mahmoodi
b3996e4719 dont set defaults for calls 2023-09-20 19:25:36 +02:00
Sina Mahmoodi
760f5e5b24 fix tx gaslimit and type default 2023-09-20 18:54:43 +02:00
Sina Mahmoodi
3df0fec8e2 rename return to returnData 2023-09-20 17:12:24 +02:00
Sina Mahmoodi
32312912c9 optional block param 2023-09-20 17:06:21 +02:00
Sina Mahmoodi
ed4cbaf20f resolve merge conflicts 2023-09-13 17:26:05 +02:00
Sina Mahmoodi
a0d2706907 moveTo only for precompiles 2023-09-11 19:51:53 +02:00
Sina Mahmoodi
8e026758fe add txhash to logs 2023-09-07 17:59:53 +02:00
Sina Mahmoodi
906d93a330 clear logs on call fail 2023-09-05 16:47:42 +02:00
Sina Mahmoodi
fe3bb832bf add prevrandao to result 2023-09-05 13:37:36 +02:00
Sina Mahmoodi
7e17e4cf3a implement transfers as logs 2023-09-04 17:06:41 +02:00
Sina Mahmoodi
56b4402f0c auto-set and validate block number and timestamp 2023-09-04 15:00:05 +02:00
Sina Mahmoodi
b0e78695f5 Rename block override field names 2023-09-04 12:28:56 +02:00
rjl493456442
0acc0a1f86
core/state: simplify storage trie update and commit (#28030)
This change improves function description and simplifies logic in statedb update and commit operations.
2023-08-31 14:33:18 -04:00
Martin Holst Swende
6aa88ccdd2
beacon/engine, eth/catalyst, miner: EIP-4788 CL/EL protocol updates (#27872)
This PR makes EIP-4788 work in the engine API and miner. It also fixes some bugs related to 
EIP-4844 block processing and mining. Changes in detail:

- Header.BeaconRoot has been renamed to ParentBeaconRoot.
- The engine API now implements forkchoiceUpdatedV3
- newPayloadV3 method has been updated with the parentBeaconBlockRoot parameter
- beacon root is now applied to new blocks in miner
- For EIP-4844, block creation now updates the blobGasUsed field of the header
2023-08-26 04:52:12 +02:00
Felix Lange
4c7053baf1
core: add BeaconRoot to header in GenerateChain (#27974)
Fixes an error in tests of internal/ethapi.
2023-08-22 18:29:17 +02:00
Delweng
9f4a528793
internal/ethapi: add testcases for blobTx (#27818)
Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-08-22 02:53:29 +02:00
Marius van der Wijden
7dea9c10cd
internal/ethapi: eth API changes needed for 4844 (#27928)
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-08-18 14:22:35 +02:00
Roberto Bayardo
950ccddfc8
internal/ethapi: optimize & clean up EstimateGas (#27710)
Optimizations:

- Previously, if a transaction was reverting, EstimateGas would exhibit worst-case behavior and binary search up to the max gas limit (~40 state-clone + tx executions). This change allows EstimateGas to return after only a single unconstrained execution in this scenario.
- Uses the gas used from the unconstrained execution to bias the remaining binary search towards the likely solution in a simple way that doesn't impact the worst case. For a typical contract-invoking transaction, this reduces the median number of state-clone+executions from 25 to 18 (28% reduction).

Cleanup:

- added & improved function + code comments
- correct the EstimateGas documentation to clarify the gas limit determination is at latest block, not pending, if the blockNr is unspecified.
2023-08-18 03:03:14 -04:00
Delweng
f1801a9fed
internal/ethapi: implement eth_getBlockReceipts (#27702) 2023-08-15 14:35:48 +02:00
Péter Szilágyi
be65b47645
all: update golang/x/ext and fix slice sorting fallout (#27909)
The Go authors updated golang/x/ext to change the function signature of the slices sort method. 
It's an entire shitshow now because x/ext is not tagged, so everyone's codebase just 
picked a new version that some other dep depends on, causing our code to fail building.

This PR updates the dep on our code too and does all the refactorings to follow upstream...
2023-08-12 00:04:12 +02:00
Amin Talebi
eeebb07c73
internal/ethapi: add state override to estimateGas (#27845) 2023-08-07 16:03:57 +02:00
Christopher Harrison
60070fe5c6
internal/ethapi, graphql: correct comments about gas price logic (#27752) 2023-08-05 01:08:53 +02:00
Felix Lange
bb148dd342
core/types: support yParity field in JSON transactions (#27744)
This adds support for the "yParity" field in transaction objects returned by RPC
APIs. We somehow forgot to add this field even though it has been in the spec for
a long time.
2023-08-05 00:54:55 +02:00
Sina Mahmoodi
d4e332e268 fix storage clearing 2023-08-03 16:20:17 +02:00
Sina Mahmoodi
c5e33fac0e test coinbase 2023-08-02 13:04:49 +02:00
Sina Mahmoodi
6845b5eff6 add optional validation of txes 2023-08-01 17:26:00 +02:00
Sina Mahmoodi
fd786c081f rename to moveToAddress 2023-08-01 12:48:31 +02:00
Delweng
7c95ebd63d
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-08-01 12:58:45 +03:00
Sina Mahmoodi
80506eaa9c rename blocks to blockStateCalls 2023-07-31 15:48:03 +02:00
Sina Mahmoodi
63f4f6e5a8 rm ecrecover override field 2023-07-31 15:37:38 +02:00
Sina Mahmoodi
5d351c9f33 add testcase moveto precompile 2023-07-31 15:27:01 +02:00
Sina Mahmoodi
2c25ab65b8 add todo comments 2023-07-24 17:24:40 +02:00
Sina Mahmoodi
9aed710aa9 copy storage over in MoveTo 2023-07-18 17:08:54 +02:00
Sina Mahmoodi
b3efbad585 implement precompile override and moveTo feature 2023-07-18 15:26:17 +02:00
Sina Mahmoodi
6a2c96c490 add storage clearing test case for eth_call 2023-07-18 15:17:56 +02:00
Sina Mahmoodi
b865824787 name tests 2023-07-17 16:01:12 +02:00
Sina Mahmoodi
98882fc279 blockhash = keccak(blockNum) 2023-07-13 18:16:48 +02:00
Sina Mahmoodi
a7af5a9002 wrap params into an object 2023-07-13 18:06:40 +02:00
Sina Mahmoodi
d23eb894d6 Add status field to call result 2023-07-13 16:03:52 +02:00
Sina Mahmoodi
637acc5fa1 Finalise state after call, add selfdestruct test 2023-07-13 15:17:14 +02:00
Delweng
5d035043ea
internal/ethapi: add more testcase for GetTransactionReceipt (#27527)
* internal/ethapi: testBackend reuse the same db

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

* internal/ethapi: implment GetTransaction

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

* internal/ethapi: implement GetReceipts

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

* internal/ethapi: insert receipts and setup txlookup

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

* internal/ethapi: add simple success tx receipt test

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

* internal/ethapi: add case create contract

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

* internal/ethapi: add contract call receipt

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

* internal/ethapi: add tx notfound

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

* internal/ethapi: add dynamic fee testcase

* internal/ethapi: add accessList receipt

* internal/ethapi: no need to insert receipt chain, no error

* internal/ethapi: use HeaderByHash instead

* internal/ethapi: add one more case

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-07-13 06:47:32 -04:00