Skip to content

chore: refactor get_payload() function #218

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

Closed
wants to merge 3 commits into from

Conversation

karankurbur
Copy link

Refactor get_payload() by splitting into explicit functions for each step

Copy link

vercel bot commented May 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rollup-boost ⬜️ Ignored (Inspect) Visit Preview May 14, 2025 11:20pm

@karankurbur karankurbur force-pushed the PROTO-863 branch 2 times, most recently from 22d8849 to 8d94e70 Compare May 14, 2025 22:49
@karankurbur karankurbur marked this pull request as draft May 14, 2025 23:07
@karankurbur karankurbur marked this pull request as ready for review May 14, 2025 23:22
@@ -577,82 +577,143 @@ impl RollupBoostServer {
payload_id: PayloadId,
version: Version,
) -> RpcResult<OpExecutionPayloadEnvelope> {
// Start fetching L2 payload early (we'll always need it)
Copy link
Contributor

Choose a reason for hiding this comment

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

Unless a tokio task is spawned under the hood this future will only begin resolving once it's .awaited on. Consider wrapping it in a tokio::spawn to start resolving immediately

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's being joined below though, so that should be fine.

@ferranbt ferranbt self-requested a review May 15, 2025 18:51
Copy link
Collaborator

@0xForerunner 0xForerunner left a comment

Choose a reason for hiding this comment

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

Not sure this PR is necessary. Original impl look a bit better to my eye.

@@ -577,82 +577,143 @@ impl RollupBoostServer {
payload_id: PayloadId,
version: Version,
) -> RpcResult<OpExecutionPayloadEnvelope> {
// Start fetching L2 payload early (we'll always need it)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's being joined below though, so that should be fine.

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.

3 participants