Commit Graph

20168 Commits

Author SHA1 Message Date
Andrew Ashikhmin
f854a73185
Add enough blob gas for block building (EIP-4844) (#8001) 2023-08-11 16:09:03 +02:00
Andrew Ashikhmin
03927d3e27
Call InitializeBlockExecution in SpawnMiningExecStage (EIP-4788) (#7999)
This fixes the trie state root issue that was occurring in the Hive
tests for Cancun.
2023-08-11 14:04:53 +02:00
Andrew Ashikhmin
6adad0afde
Add parentBeaconBlockRoot to RPCMarshalHeader (EIP-4788) (#7997) 2023-08-11 10:26:44 +02:00
alex.sharov
309e0bdc6c pool: don't warn at Ctrl+C 2023-08-11 11:58:25 +06:00
Alex Sharov
d2bde8c096
Recsplit: cancelable build (#7994) 2023-08-11 11:54:59 +06:00
Alex Sharov
a17eaecf00
Recsplit: cancelable build (#1073) 2023-08-11 05:54:56 +00:00
alex.sharov
7ca6649e0c BlockReader: remove redundant check 2023-08-11 11:45:02 +06:00
Giulio rebuffo
e3a59ed902
Better caplin logging and logic (#7992) 2023-08-10 22:34:58 +02:00
Alex Sharov
6dfe491d30
e3: remove history snapshots (#7991) 2023-08-10 23:39:03 +06:00
dependabot[bot]
11f9137c08
Bump github.com/libp2p/go-libp2p from 0.28.0 to 0.28.2 (#7987)
Bumps [github.com/libp2p/go-libp2p](https://github.com/libp2p/go-libp2p)
from 0.28.0 to 0.28.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/libp2p/go-libp2p/releases">github.com/libp2p/go-libp2p's
releases</a>.</em></p>
<blockquote>
<h2>v0.28.2</h2>
<p>This patch release contains backports of:</p>
<ul>
<li>updating the qtls dependencies (qtls is quic-go's fork of
crypto/tls). The new versions now contain a backport of the Go standard
library fix included in the Go 1.20.7 / 1.19.12 release for quic-go's
crypto/tls fork: <a
href="2350afd2e8</a></li>
<li>core/crypto: restrict RSA keys to &lt;= 8192 bits: <a
href="https://redirect.github.com/libp2p/go-libp2p/pull/2454">libp2p/go-libp2p#2454</a>.
The analogous vulnerability in go-libp2p's crypto package.</li>
<li>swarm: don't open new streams over transient connections: <a
href="https://redirect.github.com/libp2p/go-libp2p/pull/2450">libp2p/go-libp2p#2450</a>.
This fixes a regression introduced in v0.26.0.</li>
</ul>
<p>Note that in order to be protected against the DoS attack making use
of large RSA keys, it's necessary to update to this patch release AND to
use the updated Go compiler (1.20.7 or 1.19.12, respectively).</p>
<p>Full Changelog: <a
href="https://github.com/libp2p/go-libp2p/compare/v0.28.1...v0.28.2">https://github.com/libp2p/go-libp2p/compare/v0.28.1...v0.28.2</a></p>
<h2>v0.28.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: in the swarm move Connectedness emit after releasing conns <a
href="https://redirect.github.com/libp2p/go-libp2p/pull/2373">libp2p/go-libp2p#2373</a></li>
<li>identify: set stream deadlines for Identify and Identify Push
streams <a
href="https://redirect.github.com/libp2p/go-libp2p/pull/2382">libp2p/go-libp2p#2382</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/libp2p/go-libp2p/compare/v0.28.0...v0.28.1">https://github.com/libp2p/go-libp2p/compare/v0.28.0...v0.28.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/libp2p/go-libp2p/blob/master/CHANGELOG.md">github.com/libp2p/go-libp2p's
changelog</a>.</em></p>
<blockquote>
<h1>Table Of Contents <!-- raw HTML omitted --></h1>
<ul>
<li><a
href="https://github.com/libp2p/go-libp2p/blob/master/#v0280">v0.28.0</a></li>
<li><a
href="https://github.com/libp2p/go-libp2p/blob/master/#v0270">v0.27.0</a></li>
<li><a
href="https://github.com/libp2p/go-libp2p/blob/master/#v0264">v0.26.4</a></li>
<li><a
href="https://github.com/libp2p/go-libp2p/blob/master/#v0263">v0.26.3</a></li>
<li><a
href="https://github.com/libp2p/go-libp2p/blob/master/#v0262">v0.26.2</a></li>
<li><a
href="https://github.com/libp2p/go-libp2p/blob/master/#v0261">v0.26.1</a></li>
<li><a
href="https://github.com/libp2p/go-libp2p/blob/master/#v0260">v0.26.0</a></li>
<li><a
href="https://github.com/libp2p/go-libp2p/blob/master/#v0251">v0.25.1</a></li>
<li><a
href="https://github.com/libp2p/go-libp2p/blob/master/#v0250">v0.25.0</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="256b838b55"><code>256b838</code></a>
release v0.28.2</li>
<li><a
href="cd68d43cbc"><code>cd68d43</code></a>
swarm: don't open new streams over transient connections (<a
href="https://redirect.github.com/libp2p/go-libp2p/issues/2450">#2450</a>)</li>
<li><a
href="71a4e3e70f"><code>71a4e3e</code></a>
manually bump qtls dependencies to fix RSA key size vulnerability</li>
<li><a
href="445be526ae"><code>445be52</code></a>
core/crypto: restrict RSA keys to &lt;= 8192 bits (<a
href="https://redirect.github.com/libp2p/go-libp2p/issues/2454">#2454</a>)</li>
<li><a
href="c358b81919"><code>c358b81</code></a>
release v0.28.1</li>
<li><a
href="f43f73e0c3"><code>f43f73e</code></a>
identify: set stream deadlines for Identify and Identify Push streams
(<a
href="https://redirect.github.com/libp2p/go-libp2p/issues/2382">#2382</a>)</li>
<li><a
href="7e046ce38a"><code>7e046ce</code></a>
fix: in the swarm move Connectedness emit after releasing conns (<a
href="https://redirect.github.com/libp2p/go-libp2p/issues/2373">#2373</a>)</li>
<li>See full diff in <a
href="https://github.com/libp2p/go-libp2p/compare/v0.28.0...v0.28.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/libp2p/go-libp2p&package-manager=go_modules&previous-version=0.28.0&new-version=0.28.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/ledgerwatch/erigon/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 18:24:51 +02:00
racytech
6785ff28e4
hive: minor fixes (EIP-4788) (#7985) 2023-08-09 13:44:21 +06:00
a
db5b348673
Caplin block persistence (#7941)
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-08-09 01:21:19 +02:00
Mark Holt
6bd58f7c39
check difficulty for nil (#7978)
Fix checks `chainConfig.TerminalTotalDifficulty` for nil in
`isChainPoS`. Not doing so causes the Bor startup flow to panic.
2023-08-08 22:26:59 +01:00
Giulio rebuffo
6081fe01b8
fixed forkchoices (#7983) 2023-08-08 22:56:16 +02:00
Andrew Ashikhmin
72e7cda960
Disable TestBlockchainEIP with e3 (#7982)
as it doesn't work with e3 for some reason. Follow up to RP #7981
2023-08-08 21:11:22 +02:00
Andrew Ashikhmin
9b3f3bd118
EIP-4844: fix wiring of maxFeePerBlobGas (#7981)
Previously maxFeePerBlobGas was lost in the `BlobTx` -> `Message`
conversion.

Also added initial support of [EL
EIPTests](https://github.com/ethereum/tests/tree/develop/EIPTests).
2023-08-08 17:44:02 +02:00
Andrew Ashikhmin
ae76df1b8a
Update execution-spec-tests to v1.0.1 (#7980)
[v1.0.1](https://github.com/ethereum/execution-spec-tests/releases/tag/v1.0.1)
"Cancun Devnet-8 Pre-Release" adds some tests for Cancun. This PR only
fixes a couple of issues; the majority of the new tests are still
failing and thus are skipped in `TestExecutionSpec`.
2023-08-08 15:01:35 +02:00
Alex Sharov
23270eae58
tests: fix nil genesis panic (#7979) 2023-08-08 15:19:08 +06:00
Andrew Ashikhmin
a25f22a06c
Implement EIP-6780: SELFDESTRUCT only in same transaction (#7976)
Cherry pick https://github.com/ethereum/go-ethereum/pull/27189

---------

Co-authored-by: jwasinger <j-wasinger@hotmail.com>
2023-08-06 17:48:11 +02:00
Giulio rebuffo
e3d642d6a0
Fixed EL integration spectest (#7975) 2023-08-06 17:13:36 +02:00
Andrew Ashikhmin
d69b20bc4e
Support engine_forkchoiceUpdatedV3 with ParentBeaconBlockRoot (EIP-4788) (#7969)
Prerequisites: https://github.com/ledgerwatch/interfaces/pull/187 &
https://github.com/ledgerwatch/erigon-lib/pull/1069. Also implement
https://github.com/ethereum/execution-apis/pull/426.
2023-08-06 11:54:14 +02:00
Andrew Ashikhmin
563a68124b
interfaces: Add parent_beacon_block_root (EIP-4788) (#1069)
Pick up https://github.com/ledgerwatch/interfaces/pull/187
2023-08-06 09:40:03 +00:00
Giulio rebuffo
b4057da8e6
removed missingHash (#7973) 2023-08-06 02:28:18 +02:00
Giulio rebuffo
6fc9f7e28b
removed missingHash (#1071) 2023-08-06 00:27:54 +00:00
banteg
63ecbf88ba
fix: show stack for push0 (#7970)
this fixes vmtrace after shanghai

before:
```python
VMOperation(pc=24, cost=2, ex=VMExecutedOperation(used=1942085, push=[], mem=None, store=None), sub=None, op='PUSH0', idx='14-644-13')
```

after:
```python
VMOperation(pc=24, cost=2, ex=VMExecutedOperation(used=1942085, push=[HexBytes('0x00')], mem=None, store=None), sub=None, op='PUSH0', idx='14-644-13')
```
2023-08-05 23:37:51 +02:00
Giulio rebuffo
0e4e36b142
Replaced old version of Engine API with newer version (#7972) 2023-08-05 23:33:10 +02:00
Giulio rebuffo
3f118dbda5
save (#1070) 2023-08-05 00:27:17 +00:00
Giulio rebuffo
9730cc796a
Cleanup of consensus separation (#7971) 2023-08-05 02:26:53 +02:00
Giulio rebuffo
b09d90ee0e
Added in-memory flushing to execution.proto (#7968) 2023-08-04 14:42:35 +02:00
Giulio rebuffo
73d985faf4
Added memory diff to memory mutation (#1068) 2023-08-04 11:25:22 +00:00
Giulio rebuffo
c08aa3ac03
fix undownloaded body (#7966) 2023-08-04 02:22:07 +02:00
Andrew Ashikhmin
d014da4dc0
Replace --override.shanghaiTime flag with --override.cancun (#7964)
Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/1067
2023-08-03 16:05:35 +02:00
Andrew Ashikhmin
0a6037d12f
OverrideShanghaiTime -> OverrideCancunTime (#1067) 2023-08-03 13:37:28 +00:00
racytech
2c2ccb6e27
dencun-devnet: --trusted-setup-file flag support (#7963) 2023-08-03 14:36:47 +02:00
racytech
d4f8da719e
init kzg ctx from file (trusted_setup.json) (#1066) 2023-08-03 06:35:10 +00:00
Giulio rebuffo
29935a65f4
Fixed hive tests in consensus separation (#7961) 2023-08-03 03:39:47 +02:00
Andrew Ashikhmin
bd9e8b9b56
Fix eth_getTransactionByHash for EIP-4844 transactions (#7960)
Also pick https://github.com/ledgerwatch/erigon-lib/pull/1063 and
https://github.com/ledgerwatch/erigon-lib/pull/1065
2023-08-02 18:25:15 +02:00
Andrew Ashikhmin
e1f1c081fc
Remove failing TestGnosisForkDigest (#7959)
I'm not sure what caused this failure (for instance, CI for PR #7888 was
green), but currently we have the following test failure in `devel`:
```
--- FAIL: TestGnosisForkDigest (0.00s)
    fork_test.go:79: 
            Error Trace:    github.com/ledgerwatch/erigon/cl/fork/fork_test.go:79
            Error:          Not equal: 
                            expected: [4]uint8{0x82, 0x4b, 0xe4, 0x31}
                            actual  : [4]uint8{0x21, 0xa6, 0xf8, 0x36} 
```
2023-08-02 14:07:34 +02:00
Somnath Banerjee
5ddf122a19
Zero ParentBeaconBlockRoot in genesis (#7958)
See https://github.com/ethereum/EIPs/pull/7445
2023-08-02 17:02:01 +05:30
Andrew Ashikhmin
50579425d2
Introduce VerifyAbsenceOfCancunHeaderFields (#7953) 2023-08-02 09:34:30 +02:00
Somnath Banerjee
3e5b9d7490
Fix newPayload parentBeaconBlockRoot check (#7955) 2023-08-02 09:34:13 +02:00
오웬
3c62adcfe0
fix: prevent index out of range during call trace (#7951)
Previously the call tracer failed on this Ethereum transaction
[0xecfc724f75e39fa9e882ec44a4d0985e099b7a3ac9415466196128770def5bc2](https://etherscan.io/tx/0xecfc724f75e39fa9e882ec44a4d0985e099b7a3ac9415466196128770def5bc2)

Querying with this request
```shell
curl  http://localhost:8545  -X POST  -H "Content-Type: application/json"  --data '{"method":"debug_traceTransaction","params":["0xecfc724f75e39fa9e882ec44a4d0985e099b7a3ac9415466196128770def5bc2", {"tracer": "callTracer",  "tracerConfig": {"withLog": true}}],"id":1,"jsonrpc":"2.0"}
```

Resulted in this response
```json
{"jsonrpc":"2.0","id":1,"result":null,"error":{"code":-32000,"message":"method handler crashed"}}
```

With this error message in the console:
`RPC method debug_traceTransaction crashed: runtime error: index out of
range [-1]
[service.go:217 panic.go:884 panic.go:113 call.go:177 interpreter.go:234
interpreter.go:262 evm.go:55 evm.go:260 evm.go:303 instructions.go:800
interpreter.go:304 evm.go:55 evm.go:260 evm.go:283
state_transition.go:382 state_transition.go:186 tracing.go:206
tracing.go:263 value.go:584 value.go:368 service.go:222 handler.go:511
handler.go:444 handler.go:392 handler.go:223 handler.go:316
asm_arm64.s:1172]`
2023-08-02 08:09:28 +07:00
Andrew Ashikhmin
f33b0bc538
Fix blob transaction panic in txpool (#1065)
Fixes the following panic triggered by blob Hive tests:
```
[2c098836] panic: runtime error: index out of range [0] with length 0
[2c098836] 
[2c098836] goroutine 902 [running]:
[2c098836] github.com/ledgerwatch/erigon-lib/txpool.MainLoop.func1()
[2c098836] 	github.com/ledgerwatch/erigon-lib@v0.0.0-20230801100033-1b342f37741d/txpool/pool.go:1565 +0x100f
[2c098836] created by github.com/ledgerwatch/erigon-lib/txpool.MainLoop
[2c098836] 	github.com/ledgerwatch/erigon-lib@v0.0.0-20230801100033-1b342f37741d/txpool/pool.go:1492 +0x8c5
```
2023-08-01 16:16:56 +00:00
Andrew Ashikhmin
e4612fd6e6
EIP-4788: set nonce of beacon root history address to nonzero (#7952)
See https://github.com/ethereum/EIPs/pull/7431
2023-08-01 16:15:12 +02:00
Andrew Ashikhmin
3a056bb669
Bump max size of blob transactions (#1063) 2023-08-01 10:32:05 +00:00
Somnath Banerjee
d91f4263dc
EIP-4788: Beacon block root and stateful precompile (#7888) 2023-08-01 16:01:26 +05:30
Giulio rebuffo
ddfe09918f
Better status codes for execution.proto (#1062) 2023-08-01 00:08:19 +00:00
Giulio rebuffo
1220ae659e
Most hive tests fixed in --experimental.modular (#7950)
Broken: 25/109
2023-08-01 02:08:15 +02:00
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