Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom beacon withdrawals example #9497

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

dapplion
Copy link
Contributor

Adds an example of modifying a post-block execution step. Specifically, it modifies the beacon withdrawal processing logic: do a system call instead of minting native tokens.

I have made some structs and fns pub to reduce diff. Please let me know if there are more opportunities to minimize the diff. There's duplicated code between this custom executor, the op executor and the eth executor.

@dapplion dapplion requested a review from gakonst as a code owner July 14, 2024 11:26
Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feels like we should expose a better API via NodeBuilder for overriding the pre/post hooks more granularly, and for new system contracts, given BSC also uses it

@dapplion
Copy link
Contributor Author

feels like we should expose a better API via NodeBuilder for overriding the pre/post hooks more granularly, and for new system contracts, given BSC also uses it

Let me know if I can help with that

Copy link
Member

@emhane emhane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@emhane emhane added C-docs An addition or correction to our documentation C-example Examples and removed C-docs An addition or correction to our documentation labels Aug 21, 2024
@github-actions github-actions bot added the S-stale This issue/PR is stale and will close with no further activity label Sep 19, 2024
@github-actions github-actions bot closed this Sep 27, 2024
@mattsse mattsse reopened this Oct 2, 2024
@mattsse mattsse added M-prevent-stale Prevents old inactive issues/PRs from being closed due to inactivity and removed S-stale This issue/PR is stale and will close with no further activity labels Oct 2, 2024
@dapplion
Copy link
Contributor Author

dapplion commented Oct 3, 2024

@mattsse do you want to merge this in as-is, and have the satisfaction of reducing code once #11274 lands? Or wait to merge #11274 before this PR

@fgimenez fgimenez force-pushed the example-custom-beacon-withdrawals branch from 7a9560b to eaf8e0d Compare October 21, 2024 18:13
@fgimenez fgimenez changed the base branch from main to fgimenez/default-impl-ex-strategy-methods October 21, 2024 18:13
@fgimenez fgimenez force-pushed the example-custom-beacon-withdrawals branch from eaf8e0d to 11a2baa Compare October 21, 2024 18:22
@fgimenez
Copy link
Member

hey @dapplion thanks a lot for your work! now that #11274 is closed I've taken the opportunity to rebase this PR on top of main and update it to use the new composable executor abstraction with strategies.

In the BlockExecutionStrategy impl I have filled the pre and post block execution methods same as you had before, but not the actual block transaction execution logic method, not sure if that's ok for the functionality you want to highlight.

pls take a look and let me know if you have any questions!

@fgimenez fgimenez deleted the branch paradigmxyz:main October 21, 2024 19:03
@fgimenez fgimenez closed this Oct 21, 2024
@fgimenez fgimenez reopened this Oct 21, 2024
@fgimenez fgimenez changed the base branch from fgimenez/default-impl-ex-strategy-methods to main October 21, 2024 19:06
@fgimenez fgimenez force-pushed the example-custom-beacon-withdrawals branch from 278f21c to b9dae4a Compare October 21, 2024 19:07
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool! lgtm

@mattsse mattsse added this pull request to the merge queue Oct 21, 2024
Merged via the queue into paradigmxyz:main with commit f2ac547 Oct 21, 2024
39 checks passed
@dapplion
Copy link
Contributor Author

🎉 thanks for updating it to the custom executor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-example Examples M-prevent-stale Prevents old inactive issues/PRs from being closed due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants