Skip to content

Conversation

@frisitano
Copy link
Collaborator

@frisitano frisitano commented Nov 18, 2025

Overview

Previously, the map method on the HeaderTransform trait was synchronous. To work around this constraint in the rollup-node we would spawn a new background task to insert the signatures into the database. However, this resulted in an unbounded number of tokio tasks responsible for inserting singatures into the database being spawned. In this PR we make the map method async and await the result of the map method before we send the result to the client. This provides a natural backpressure on the system.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 18, 2025

CodSpeed Performance Report

Merging #365 will not alter performance

Comparing feat/async-header-transform (09b2e43) with scroll (797d440)

Summary

✅ 77 untouched

yiweichi
yiweichi previously approved these changes Nov 18, 2025
Copy link
Member

@yiweichi yiweichi left a comment

Choose a reason for hiding this comment

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

LGTM, I wonder do we have issue caused by this on sepolia/mainnet now? like a oom? or some block missing its signature on db?

@frisitano
Copy link
Collaborator Author

LGTM, I wonder do we have issue caused by this on sepolia/mainnet now? like a oom? or some block missing its signature on db?

No, this is only a problem when we sync from genesis. Please also review the rollup-node PR to see how they work together scroll-tech/rollup-node#427.

@frisitano frisitano merged commit 3e49734 into scroll Nov 19, 2025
43 checks passed
@frisitano frisitano deleted the feat/async-header-transform branch November 19, 2025 05:08
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