Verify Versioned Hashes During Optimistic Sync
Issue Addressed
- #4831
Proposed Changes
I've done a bit of refactoring which I think makes the code a bit cleaner and eliminates some cloning of the execution payload.
Additional Info
I used alloy-consensus to pull the versioned hashes from the raw transactions. Perhaps we should replace other functions that rely on ethers_core with alloy crates as well? An easy place to start (that could potentially fit in this PR) is calculating the block hash.
Please re-target to unstable
Perhaps we should replace other functions that rely on
ethers_corewith reth crates as well
I'm down to replace this too. The reth version pinned in this PR imports ethers_core anyways though. But reth is currently migrating from ethers-rs and to alloy-rs. In the next reth release, reth-primitives will no longer import ethers_core and the reth-rlp crate has been deprecated (they're directly using alloy-rlp). In the semi-near term I'm pretty sure they plan to migrate reth-primitives to alloy-primitives as well.
So maybe we can merge this one, and open an issue to migrate to alloy-rs, and also get rid of the ether_core dep generally.
I'm gonna marked this blocked cause I think we're waiting on reth-primitives to feature gate c-kzg
Looks like the reth team was able to update alloy just in time for deneb :tada:! After updating this PR to use alloy we no longer have build conflicts over c-kzg. Looks like the tests that I previously designed to test this code are working as expected with alloy as well. I think this is ready to review now @realbigsean
Marking as backwards-incompat so we remember to flag the MSRV increase from 1.73 to 1.75
@mergifyio queue
queue
🛑 The pull request has been removed from the queue default
The queue conditions cannot be satisfied due to failing checks.
You can take a look at Queue: Embarked in merge queue check runs for more details.
In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.
@mergifyio requeue
requeue
✅ This pull request will be re-embarked automatically
The followup queue command will be automatically executed to re-embark the pull request
queue
🛑 The pull request has been removed from the queue default
The queue conditions cannot be satisfied due to failing checks.
You can take a look at Queue: Embarked in merge queue check runs for more details.
In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.
@mergifyio requeue
requeue
✅ This pull request will be re-embarked automatically
The followup queue command will be automatically executed to re-embark the pull request
queue
🛑 The pull request has been removed from the queue default
Pull request #4832 has been dequeued by a dequeue command.
You can take a look at Queue: Embarked in merge queue check runs for more details.
In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.
This is blocked on an update to the CI runner image for the MSRV
https://github.com/sigp/lighthouse/actions/runs/7915078252/job/21606147109?pr=5247
@mergifyio unqueue
unqueue
✅ The pull request has been removed from the queue default
@mergify requeue
requeue
✅ This pull request will be re-embarked automatically
The followup queue command will be automatically executed to re-embark the pull request
queue
✅ The pull request has been merged automatically
The pull request has been merged automatically at a264afd19ff1d8d4a9ce1e673386722ccb0e31ec