Commit Graph

18382 Commits

Author SHA1 Message Date
Andrew Ashikhmin
7ca0d2399a
Upgrade EL tests to v12.3 (#7949)
See https://github.com/ethereum/tests/releases/tag/v12.3
2023-07-31 12:30:53 +02:00
Andrew Ashikhmin
03ac80ad2d
EIP-4844: rename "data hash" to "blob hash" (#7947)
See https://github.com/ethereum/EIPs/pull/7001
2023-07-31 10:12:53 +02:00
Giulio rebuffo
443757edbd
Consensus separation for Engine API (Working on Sepolia) (#7945)
This makes the experimental consensus separation functional on sepolia.
2023-07-30 23:35:55 +02:00
Andrew Ashikhmin
5693439521
EIP-4844: Verify expectedBlobVersionedHashes (#7946)
See the
[engine_newpayloadv3](https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_newpayloadv3)
spec
2023-07-30 17:10:54 +02:00
Andrew Ashikhmin
1776d28bb7
Fix TestBlobTxWrappedEncodeDecode (#7944)
Post-fix to PR #7943
2023-07-30 15:56:26 +02:00
racytech
af884204cb
eip-4844: hive tests: RLP decode order and newPayloadV3 to expect versionedHashes (#7943) 2023-07-30 15:49:31 +02:00
alex.sharov
b50f427641 save 2023-07-29 12:08:38 +07:00
Giulio rebuffo
2f2a1741d2
Protyped consensus separated engine api (untested) (#7942) 2023-07-29 00:22:38 +02:00
Andrew Ashikhmin
27125b3911
Update EIP-2537 and EIP-4844 precompile addresses (#7940)
See https://github.com/ethereum/EIPs/pull/7172 &
https://github.com/ethereum/EIPs/pull/7214
2023-07-28 17:43:01 +02:00
Mark Holt
cc74e74a60
Devnet contract utils (#7928)
This request is extending the devnet functionality to more fully handle
contract processing by adding support for the following calls:
 * trace_call,
* trace_transaction
* debug_accountAt,
* eth_getCode
* eth_estimateGas
* eth_gasPrice

It also contains an initial rationalization of the devnet subscription
code to use the erigon client code directly rather than using its own
intermediate subscription management.

This is used to implement a general purpose block waiter - which can be
used in any scenario step - rather than being specific to transaction
processing.

This pull also contains an end to end tested sync processor for bor and
associated support services:
* Heimdall (supports sync event transfer)
* Faucet - allows the creation and funding of arbitary test specific
accounts (cross chain)

Notes and Caveats:
 
* Code generation for contracts requires `--evm-version paris`. For
chains which don't support push0 for solc over 0.8.19
* The bor log processing post the application of sync events causes a
panic - this will be the subject of a seperate smaller push as it is not
devnet specific
* The bor code seems to make repeated calls for the same sync events and
also reverts requests - this needs further investigation. This is the
behaviour of the current implementation and may be required - although
it does seem to generate repeat processing - which could be avoided.
2023-07-28 14:03:32 +01:00
Andrew Ashikhmin
7d35c6b737
EIP-4844: Rename "data gas" to "blob gas" (#7937)
See https://github.com/ethereum/EIPs/pull/7354 &
https://github.com/ethereum/consensus-specs/pull/3461. Prerequisite:
https://github.com/ledgerwatch/erigon-lib/pull/1058
2023-07-28 12:12:05 +02:00
Willian Mitsuda
d3f8b5861c
Max cap search results for ots API by default + cli flag to override it (#7924)
Otterscan API search methods allow the user to inform the page size.

This PR adds an internal max (default == 25 results) to cap the page
size, regardless of what the user asks.

It also adds a `--ots.search.max.pagesize` CLI args to override this max
(either in erigon and rpcdaemon binaries).
2023-07-28 08:29:17 +07:00
gladcow
7e3c6ea2f8
Adds clear_bad_blocks command (#7934)
Adds `clear_bad_blocks` command to integration tool. This command allows
to re-process blocks that were erroneously marked as bad.

Command just clears `BadHeaderNumber` table. It can be safer in some
cases than
```
./integration state_stages —unwind=<some_number>
./integration stage_headers —unwind=<some_number>
```
and can be used in the cases like this one
https://github.com/ledgerwatch/erigon/issues/7892%20

Command syntax:
```
./integration clear_bad_blocks --datadir=<datadir>
```
2023-07-28 08:28:47 +07:00
Giulio rebuffo
a0865b489f
Prototyped experimental engine reverse downloader (#7936)
Erigon lib now good
2023-07-28 01:32:19 +02:00
a
dc47f43f4d
[caplin] block persistence experimentation (#7935) 2023-07-28 00:55:14 +02:00
Giulio rebuffo
b4ecd7f524
Consensus Separation: Separated GetPayload using an execution service (#7933)
Miracoulously, hive tests pass first try. YIPPIE.

Also for the future, I added `--experimental.modular` which enables a
secondary engine API for consensus separation.

Now block building is responsibility of the execution module.
2023-07-27 14:37:49 +02:00
Mark Holt
f2e46c1071
Added ComputeBorTxHash to subscription reader (#7931)
This fixes an indexing panic when bor sync event logs are returned via a
subscription.

It applies the same tx computation that is used by the getlogs rpc call
2023-07-27 08:30:52 +01:00
a
60a200fd46
[caplin] basic persistence layer (#7918) 2023-07-25 22:24:52 +02:00
Giulio rebuffo
06c2da4c44
Fixed jwt in embedded caplin (#7930) 2023-07-25 19:16:49 +02:00
Giulio rebuffo
f5f833fd70
Proper Error handling in direct communication with engine (#7929) 2023-07-25 14:15:50 +02:00
Giulio rebuffo
39853432be
added --experimental.modular (#7925) 2023-07-24 18:04:36 +02:00
Giulio rebuffo
9d3551f8cf
prototype of ValidataChain (#7921) 2023-07-23 19:10:24 +02:00
Giulio rebuffo
837ffb5b7e
Refactored ForkValidator to be Database-only (#7920) 2023-07-23 14:51:26 +02:00
ledgerwatch
54a52ed81c
Fix panic on non-block producing bor (#7919) 2023-07-22 08:17:34 +01:00
Mark Holt
751f62615d
Devnet sync events (#7911)
This request implements an end to end Polygon state sync in the devnet.

It does this by deploying smart contracts ont the L2 & L2 chain which
follow the polygon fx portal model with security checks removed to
simplify the code. The sync events generated are routed through a local
mock heimdal - to avoid the consensus process for testing purposes.

The commit also includes support code to help the delivery of additional
contract based scenratios.
2023-07-20 23:10:18 +01:00
Giulio rebuffo
9cf07f059d
Prototyped FCU for EL module (#7913)
save
2023-07-20 18:35:02 +02:00
a
3ab373787e
[caplin] extracting beacon state interface (#7910)
we need to extract this interface from the struct. 

i need to also break down the interface more, to better show what parts
the caching is used, move some functions from the cache state to the
underlying.


don't merge
2023-07-20 00:20:33 +02:00
Giulio rebuffo
862faf054b
Fixed JWT race and panic in Caplin (#7904) 2023-07-18 09:47:38 +01:00
Mark Holt
529d359ca6
Bor span testing (#7897)
An update to the devnet to introduce a local heimdall to facilitate
multiple validators without the need for an external process, and hence
validator registration/staking etc.

In this initial release only span generation is supported.  

It has the following changes:

* Introduction of a local grpc heimdall interface
* Allocation of accounts via a devnet account generator ()
* Introduction on 'Services' for the network config

"--chain bor-devnet --bor.localheimdall" will run a 2 validator network
with a local service
"--chain bor-devnet --bor.withoutheimdall" will sun a single validator
with no heimdall service as before

---------

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-07-18 09:47:04 +01:00
Alex Sharov
368572f882
mdbx_to_mdbx: increase read-ahead threads amount (#7905) 2023-07-18 13:27:33 +07:00
Giulio rebuffo
0239dfd654
Better error reporting Caplin <-> Erigon (#7902) 2023-07-16 23:31:09 +02:00
a
19bc41198e
[caplin] conn gater (#7900)
conn gater


so this is what prysm did to address the issue
https://github.com/prysmaticlabs/prysm/pull/8648/files
2023-07-16 08:31:06 +02:00
Giulio rebuffo
735a800eb7
Added insertions and chainDb overlay (#7899) 2023-07-15 18:31:15 +02:00
Giulio rebuffo
814984dffb
Implementation of execution.proto: added getters (#7898) 2023-07-14 16:38:17 +02:00
ledgerwatch
ed886a11b6
Bump version to 2.49.0 in devel (#7896) 2023-07-14 09:17:18 +01:00
Delweng
dec2f5a3b3
turbo/jsonrpc: eth_getBlockReceipts support by by hash (#7886)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-07-14 08:57:09 +01:00
ledgerwatch
035a6f867c
Simplifications for bor tx code (#7889)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-07-14 08:49:10 +01:00
Andrew Ashikhmin
1842330d55
Fix Gnosis sync from scratch (#7890)
Fix an issue with historical block execution introduced by PR #7727
2023-07-14 09:15:15 +02:00
Giulio rebuffo
23f5377614
updated interfaces (#7891) 2023-07-14 02:51:47 +02:00
Andrew Ashikhmin
ec5ac3a536
core/vm: implement EIP-5656, mcopy instruction (#7887)
Cherry pick https://github.com/ethereum/go-ethereum/pull/26181

Co-authored-by: Charles Cooper <cooper.charles.m@gmail.com>
2023-07-13 19:36:06 +02:00
Giulio rebuffo
b2442a7b41
Removed unused stages (Cumulative index + Translation) (#7884) 2023-07-13 16:55:48 +02:00
Andrew Ashikhmin
9702f7f36c
core/vm: move TSTORE,TLOAD to correct opcode nums (#7885)
See https://github.com/ethereum/EIPs/pull/7074. Also enable
[EIP-1153](https://eips.ethereum.org/EIPS/eip-1153) in
[Cancun](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/cancun.md).

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-07-13 16:40:17 +02:00
ledgerwatch
ef4ccd4773
Remove excessive logging (#7882) 2023-07-13 00:52:03 +01:00
Mark Holt
bd9896bf4b
added bor tx indexing with tests (#7826)
This request implements the insertion of Bor ephemeral transactions into
snapshot indexes.

I does this by taking the block hash from the header index and passing
it to the transaction indexer to add an additional index entry per block
into the transaction hash -> block index.

The passed entries are currently contained in an in memory array which
is (32 * number of blocks / sprint size) bytes.

In addition to the functional code there is also an update to the
`dump_test.go` so that it runs `DumpBlocks` to exercise the indexing
code. To facilitate this the `InsertChain` method in `mock_sentry` has
been modified so that it can process >128 blocks.

The code in this request also includes additional bor/consensus code
with the following functions:

`CalculateSprint`
`CalculateSprintCount`

The first function is a modification of the code in erigon-lib so that
the sprints are numerically rather than lexically ordered. This code
should be migrated to erigon-lib and should have its sprint set
calculated once from its underlying map rather than this process being
repeated every calculation.

---------

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: ledgerwatch <akhounov@gmail.com>
Co-authored-by: Enrique Jose  Avila Asapche <eavilaasapche@gmail.com>
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-07-12 23:31:38 +01:00
gladcow
8809208605
Expand home dir from tilda for integration tool settings (#7877)
Fixes https://github.com/ledgerwatch/erigon/issues/7814, it can be
really confusing when `erigon` and `integration` process `~` in path in
different ways.

I can't fix it for `integration` the same way it is done for `erigon`,
because in main app it is done with `urfave/cli` package that is not
used in `integration`, so I've used other simplest way to do it.
2023-07-13 00:45:38 +07:00
Giulio rebuffo
bd63cb7c8c
Removed GRPC layer from Engine API (#7878) 2023-07-12 18:11:41 +02:00
Andrew Ashikhmin
af504f675a
Use EIP-4844 constants from erigon-lib (#7874)
Small refactoring after
https://github.com/ledgerwatch/erigon-lib/pull/1037
2023-07-11 17:53:00 +02:00
ledgerwatch
f0d13fc17d
Update README.md (#7876) 2023-07-11 14:28:23 +01:00
Alex Sharov
c02913c4e5
crypto lib up (#7873) 2023-07-11 14:52:00 +07:00
Alex Sharov
5e254ce9ee
fsync: don't skip error, ability to disable in tests (#7872) 2023-07-11 13:09:07 +07:00