Skip to content

Collect batch fees into the builder wallet - #2635

Closed
Mirko-von-Leipzig wants to merge 5 commits into
mirko/batch-fees-pass-through-txfrom
mirko/batch-fees-collection
Closed

Mirko-von-Leipzig wants to merge 5 commits into
mirko/batch-fees-pass-through-txfrom
mirko/batch-fees-collection

Conversation

@Mirko-von-Leipzig

@Mirko-von-Leipzig Mirko-von-Leipzig commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Spawns a separate task on the sequencer that periodically consumes p2id notes into the batch builder's wallet account.

Uses the database API to find unconsumed notes. For simplicity, each transaction is considered independent i.e. state is loaded fresh on each attempt, this avoids complex tracking of state.

This uses the expiration block height to guarantee that there is at most a single transaction in flight, and it waits pessimistically for this transaction to expire even if it has since been committed or dropped. This keeps things simple, and under the "good" flow has no downside since we are only attempted this every five or so minutes - long after this expiration has expired.

Part of #2501.

Changelog

[[entry]]
scope       = "node"
impact      = "added"
description = "Periodically collect batch-building fee notes into the public builder wallet."

@Mirko-von-Leipzig
Mirko-von-Leipzig added this pull request to stack #2569 September 16, 2026 08:31
@Mirko-von-Leipzig
Mirko-von-Leipzig force-pushed the mirko/batch-fees-collection branch from 8895a0c to 9107378 Compare September 16, 2026 13:07
@Mirko-von-Leipzig Mirko-von-Leipzig changed the title feat(sequencer): collect batch fees into the builder wallet Collect batch fees into the builder wallet Sep 16, 2026
@Mirko-von-Leipzig
Mirko-von-Leipzig marked this pull request as ready for review September 16, 2026 13:54
@Mirko-von-Leipzig
Mirko-von-Leipzig removed this pull request from stack #2569 September 17, 2026 11:59
@Mirko-von-Leipzig

Copy link
Copy Markdown
Collaborator Author

This will be a separate dApp service, not required yet.

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.

1 participant