Skip to content

feat: Pectra#37

Merged
ferranbt merged 21 commits intomainfrom
pectra-devnet-5
Feb 13, 2025
Merged

feat: Pectra#37
ferranbt merged 21 commits intomainfrom
pectra-devnet-5

Conversation

@ryanschneider
Copy link
Contributor

@ryanschneider ryanschneider commented Jan 20, 2025

This is a replacement for #32 that actually works end-to-end!

The only remaining oddity is that on macOS the lighthouse-v7.0.0-beta.0 binary (which is always x86_64, they dropped their -portable builds) behaves odd: rbuilder never seems to "see" the payload events even though curling the endpoint seems to work as expected. As a work-around for now, I detect this scenario and emit a warning suggesting using --use-bin-path instead.

Anyways, otherwise it "just works":

> go run main.go --electra --use-reth-for-validation --use-bin-path

...

Starting reth version v1.2.0
Starting lighthouse version v7.0.0
Services started:
==================
- reth (authrpc: 8551, http: 8545, rpc: 30303)
- beacon_node (http: 3500)
- validator ()
- mev-boost-relay (http: 5555)
- cl-proxy (jsonrpc: 5656)

All services started, press Ctrl+C to stop

Start rbuilder, then send a juicy tx that pays the coinbase.

> ETH_RPC_URL=http://localhost:8645/ cast rpc eth_sendRawTransaction $(cast mktx --private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --value 9ether )

And sure enough, we have a pectra block in the builder-playground output!

All services started, press Ctrl+C to stop
Block Proposed: Slot: 4, Builder: 0xa1885d66bef164889a2e35845c3b626545d7b0e513efe335e97c3a45e534013fa3bc38c3b7e6143695aecc4872ac52c4, Block: 4

If you want to go further, I've also included a config file for assertoor which can be used to spam the chain with deposit requests:

> cd assertoor/config
> docker run -v $(pwd):/config -p 8080:8080 -it ethpandaops/assertoor:latest --config=/config/playground_deposits.yaml

...

This tests the new execution_requests field in the pectra fork. Tooling on this field is a little mixed, currently the easiest way to see if a block contained requests is to use cast block

Block Proposed: Slot: 14, Builder: 0xa1885d66bef164889a2e35845c3b626545d7b0e513efe335e97c3a45e534013fa3bc38c3b7e6143695aecc4872ac52c4, Block: 14
> cast block 14 --field requestsHash
Warning: This is a nightly build of Foundry. It is recommended to use the latest stable version. Visit https://book.getfoundry.sh/announcements for more information.
To mute this warning set `FOUNDRY_DISABLE_NIGHTLY_WARNING` in your environment.

0x0d27f338894e24f0788dc206fba6ed357e3210a09f488131dc68054e2da3493c

The "empty" hash for requests is 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 so the fact that they differ implies that requests we included.

@ryanschneider ryanschneider changed the title Pectra devnet 5 feat: Pectra devnet 5 Jan 20, 2025
ZanCorDX pushed a commit to flashbots/rbuilder that referenced this pull request Jan 21, 2025
… DX (#364)

## 📝 Summary

While getting flashbots/builder-playground#37
working I ran into a couple DX gotchas with the current
`config-playground.toml` file.

## 💡 Motivation and Context

- The `parallel` algoirthm was pegging all my CPUs at 100%. Also figured
just running `mgp-ordering` is enough.
- Having a random coinbase made it harder to test block building since
we only build profitable blocks. IIRC we now have a setting to build
always, but I still think it's cleaner to use the prefunded accounts
from the playground.
- Having debug logs helped a ton tracking down pectra issues, so I
expect it's useful any time anyone is using the playground for
development.

---

## ✅ I have completed the following steps:

* [ ] Run `make lint`
* [ ] Run `make test`
* [ ] Added tests (if applicable)
@ryanschneider ryanschneider changed the title feat: Pectra devnet 5 feat: Pectra devnet 6 Feb 5, 2025
@ryanschneider ryanschneider changed the title feat: Pectra devnet 6 feat: Pectra Feb 13, 2025
@ferranbt ferranbt merged commit 01b3ded into main Feb 13, 2025
3 checks passed
not4x217 pushed a commit to not4x217/builder-playground that referenced this pull request Feb 25, 2025
* chore(pectra): Use pectra devnet-4 compatbile geth and prysm

* chore: log genesis info on startup to help w/ debugging

* chore(pectra): use the current pectra mev-boost-relay code as well

* chore(devnet5): https://github.com/s1na/go-ethereum/commits/prague-devnet-5/

* chore(devnet-5): https://github.com/prysmaticlabs/prysm/commits/devnet5/

* chore(devnet5): https://github.com/flashbots/mev-boost-relay/commits/electra/

* chore(devnet-5): Use develop@0b16c79 for Prysm

* fix(reth): Use new engine flags for reth v1.1.6+

* fix(relay-mock-validation): Use a rnadom port form OS instead of picking our own

* chore(devnet-5): Use flashbots/mev-boost-relay#671

* chore(devnet-6): Updates for devnet-6.

* fixup: minor cleanup

* fixup: go mod tidy

* basic config to use assertoor to generate a bunch of deposits on-chain

* fixup(assertoor): genesis.json had zero deposit contract address.

* fixup(assertoor): Use one of the other prefunded accounts

* chore(deps): Update to latest geth, prysm, and mev-boost-relay

* fixup: reth 1.2.0!

* fixup(vc): Use --prefer-builder-proposals to always use builder block if available.

* chore(lighthouse): use v7.0.0-beta.0, emit warning on macOS.

* chore(geth): Use 1.15.1 since its out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants