Commit Graph

920 Commits

Author SHA1 Message Date
Andrew Ashikhmin
2fa448c45f
Validate params of GetPayloadBodiesByHash and ByRange (#6785)
See https://github.com/ethereum/execution-apis/pull/366 and
https://github.com/ethereum/execution-apis/pull/370.

Also fix a couple of issues so that the Hive tests pass.
2023-02-06 18:38:45 +01:00
a
966be04e6d
add eth_getFilterLogs, fix filter subscription ids (#6514)
this pr does the following:

1. adds new function to ApiImpl `GetFilterLogs` which should implement
`eth_getFilterLogs` (eth_getFilterChanges except with only logs filters)

2. changes the ID generator of rpchelper.Filters to use crypto/rand.

3. switched logs subscriptions to use the secure ID instead of number

4. changes subcription ids from an 8 byte hex string to a 16 byte
2023-02-06 10:18:10 +07:00
Anshal Shukla
a4f8175136
Bor file structure updated (#6167)
Updated bor consensus folder structure
2023-01-31 14:00:57 +05:30
Andrew Ashikhmin
de5a061fdf
Remove StarknetTransaction and friends (#6745) 2023-01-30 16:56:58 +01:00
ledgerwatch
8c2713b0b8
Fix lint (#6737)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-01-29 10:16:05 +00:00
Alex Sharov
9287a2202b
e3: eth_getModifiedAccountsByNumber (#6733) 2023-01-29 10:10:39 +07:00
Marc-André Dumas
407cfef9e7
rpc: move receipts length check after bor logic (#6731)
Fixing issue #6730
2023-01-28 21:21:57 +00:00
farwayer
00390a974f
Fix retrieving Bor transactions from the pool (#6689)
At the moment erigon does not try to look for bor transactions inside
the pool
2023-01-28 21:20:08 +00:00
Alex Sharov
2998aa6386
e3: debug_accountRange (#6726) 2023-01-28 12:03:24 +07:00
Alex Sharov
1583cdb068
e3: debug_accountAt, read from history instead of block exec (#6723) 2023-01-27 19:09:51 +07:00
Alex Sharov
13d6415de8
e3: ots system txn handle 2023-01-27 16:05:09 +07:00
Alex Sharov
5b703749bd
e3: ots underflow fixes (#6721) 2023-01-27 14:41:11 +07:00
Alex Sharov
171a965faa
e3: ots some underflow fixes (#6720) 2023-01-27 14:16:09 +07:00
Alex Sharov
b99e4abb3e
move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
Alex Sharov
081e59311d
e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
Max Revitt
6559c15ebb
feat(trace): use specific error string (#6696)
In v2.36.0 we correctly trace this transaction, however due to a code
ordering issue in previous releases, there was an 'out of gas' response,
because we fell through to the code here where
ErrContractAddressCollision will be returned as such. This change isn't
the fix, but ensures the actual error is returned.
2023-01-26 15:10:51 +01:00
Andrew Ashikhmin
d12fda5cbd
Switch AccessList, IntrinsicGas, SafeAdd/Mul to erigon-lib (#6709)
Reduce code duplication.
2023-01-26 12:26:12 +01:00
Alex Sharov
a0c3730e38
e3: cleanup (#6708) 2023-01-26 17:52:04 +07:00
alex.sharov
a23f42358b save 2023-01-26 17:29:01 +07:00
Alex Sharov
30fefd1fe1
e3: trace_filter on iter (#6707) 2023-01-26 17:24:29 +07:00
alex.sharov
ea7684a096 save 2023-01-26 17:21:52 +07:00
Alex Sharov
7572a42356
e3: trace_filter on iterators (#6706) 2023-01-26 16:51:13 +07:00
Alex Sharov
79b42c9dc0
e3: ots_getContractCreator (#6705) 2023-01-26 16:34:52 +07:00
Alex Sharov
584ad344a6
ots_getContractCreator test (#6703) 2023-01-26 11:36:06 +07:00
hexoscott
d9e1782c11
introduce engine_getCapabilities (#6695)
Implementation of https://github.com/ethereum/execution-apis/pull/364
2023-01-25 14:46:06 +01:00
Alex Sharov
82c478a419
e3: getLogs on iterators (#6683) 2023-01-25 16:29:41 +07:00
Andrew Ashikhmin
37741b74eb
Remove erigon_issuance & erigon_watchTheBurn (#6685)
Some issuance happens on the CL side now, so removing support for these
now inaccurate proprietary methods to make our life easier.
2023-01-24 22:54:08 +01:00
hexoscott
4dcba50e99
engine payload bodies rpc endpoints (#6644)
Very basic implementation for get payload bodies rpc calls. Once we have
Hive tests for these calls I can pick this back up and work through any
issues.

Implementation of https://github.com/ethereum/execution-apis/pull/352.
2023-01-24 13:37:03 +01:00
Alex Sharov
bad616cb8e
e3: use historyReader constructor in tests (#6677) 2023-01-24 12:43:04 +07:00
Alex Sharov
71067a69d1
e3: storageRangeAt fix NextPage value (#6676) 2023-01-24 11:22:50 +07:00
Alex Sharov
539eaf0a51
e3: prepare trace_transaction env without execution (#6675) 2023-01-24 11:18:32 +07:00
alex.sharov
e061f469d3 e3: fix test 2023-01-23 18:56:20 +07:00
AleksAvila
b5b9950593
fixing bugs in the function GetBlockByTimeStamp (#6664) 2023-01-22 19:31:57 +00:00
alex.sharov
a3bdda90ec fix lint 2023-01-22 22:37:23 +07:00
Alex Sharov
23287371e7
e3: better iterator (#6666) 2023-01-22 20:39:43 +07:00
alex.sharov
df771eb220 e3: fix test 2023-01-22 20:14:04 +07:00
Alex Sharov
4fbbdf9186
e3: move txnum to erigon-lib (#6663) 2023-01-22 19:39:33 +07:00
Giulio rebuffo
f1dd51ccb3
Added Historical Summary and FromBlsToExecution (#6658)
Added Capella specific Data types.
2023-01-22 11:48:17 +01:00
alex.sharov
99e535561b save 2023-01-22 16:51:09 +07:00
Alex Sharov
5a7e0eb5db
e3: eth_getLogs simplify (#6660) 2023-01-22 16:48:54 +07:00
Alex Sharov
0ee8c175d9
e3: simplify history reader (#6659) 2023-01-22 16:42:24 +07:00
Alex Sharov
43d39762c2
e3: ots_searchTransactionsBefore (#6656) 2023-01-22 15:35:18 +07:00
lupin012
5c82faa44b
eth_callBundle fixes (#6628)
There are two fixes:
1) the blockNumber in the CreateHistoryStateReader should be blockNumber
+ 1 as in the eth_call, eth_createAccessList:
- eth_call: already use blockNumber + 1 see
CreateStateReaderFromBlockNumber where the blockNumber
- passed to the CreateHistoryStateReader is blockNumber + 1
- eth_createAccessList: call CreateHistoryStateReader directly with
blockNumber + 1
2) The eth_callBudle allows to execute the original transaction (here
the sender nonce is assigned to the tx) on a user defined block; the
original transition could be performed in another block . The sender's
nonce when the original transaction was performed had a value that may
be different to the nonce of the sender when the tx is "executed" on new
block. So during the execution of the eth_callBundle must not be
verified that the nonce is progressive (original nonce of the tx + 1:
see preCheck() in state_transition.go that; if the checkNonce fails an
error is arised, nonce too low or nonce to high)
The eth_call does not check the nonce because is using ToMessage(calls
types.NewMessage with checkNonce = false) with checkNonce disabled;
while the eth_callBundle uses AsMessage object (where is built the
Message with checkNonce = true) where the checkNonce is enabled.
Action: Disable the checkNonce as proposed
2023-01-22 07:13:28 +00:00
Alex Sharov
184c2eb5b1
e3: fix test (#6652) 2023-01-21 14:18:29 +07:00
Andrew Ashikhmin
9927ca3171
Unify Engine API V1 & V2 methods (#6638)
Reduce code duplication.

Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/841.
2023-01-20 18:43:08 +01:00
Alex Sharov
b71725ecb3
e3: reverse/limited iterators, stream tooling (#6637) 2023-01-20 18:08:20 +07:00
Alex Sharov
d317722aef
e3: storageRangeAt (#6580) 2023-01-17 14:16:36 +07:00
Devon Bear
4bfcc1ee5c
Convert *vm.EVM to vm.VMInterface in Tracers (#6590)
Useful for integration with external tools as one can just utilize an
interface opposed to having to import and build a real EVM object.
2023-01-16 22:28:50 +00:00
a
69d36f4e2d
Make websocket flag more clear (#6579)
Discord user had issue 

`
hey guys, any tips how to enable ws ? (other than --ws)? Ah its running
on 8545 by default. I was expecting it on 8546. I would like if this
could also be set by a flag same way as a HTTP flag.
`
later conversation
```
Q: yeah, is it not clear that it's enabling websocket for the http handler?
A: Its not super obvious no.
```

Adds a small copy to ws flag to make this more obvious
2023-01-16 19:10:15 +00:00
Ariel Tempelhof
f3f2c16b25
prepare state in replay blocks in callMany (#6586)
Some transactions in replayed blocks do not get reverted, although they
were originally reverted due to out of gas. This causes false balance
calculations for some addresses
2023-01-16 19:09:57 +00:00