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

feat: Trusted Builder with Optimistic Simulation MVP #41

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

bharath-123
Copy link
Contributor

@bharath-123 bharath-123 commented Aug 23, 2024

In Optimistic Simulation, the composer of the builder receives sequence actions from the process_proposal step of a full node close to it. The composer simulates its bundle on top of the sequence actions received from process_proposal and submits the simulated sequence actions if only the block containing the sequence actions is finalized. The sequence actions are submitted in a BuilderBundlePacket artifact which indicates the transactions supposed to go to the top of block.

When it comes to Astria-Geth, this involves us creating the parent block with the sequence actions received from process_proposal using ExecuteBlock rpc, storing it temporarily somewhere and then simulating the bundle on top of it.

The following changes have been done:

  1. Storing a block created in ExecuteBlock temporarily in the tempBlock atomic variable. This block is not inserted into the chain but is used to simulate future bundles on.
  2. Logic to unpack BuilderBundlePacket, verifying the parent hash on top of which it was simulated matches the block hash on top of which we are applying it.
  3. Support returning the included transactions in the block in ExecuteBlock
  4. Support a simulateOnly mode where we do not insert the block to the chain which can save us some time during simulation.

@bharath-123 bharath-123 changed the title optimistic simulation trusted builder optimistic simulation Aug 23, 2024
@bharath-123 bharath-123 changed the title trusted builder optimistic simulation feat: Trusted Builder with Optimistic Simulation Aug 27, 2024
@bharath-123 bharath-123 changed the title feat: Trusted Builder with Optimistic Simulation feat: Trusted Builder with Optimistic Simulation MCP Aug 27, 2024
@bharath-123 bharath-123 changed the title feat: Trusted Builder with Optimistic Simulation MCP feat: Trusted Builder with Optimistic Simulation MvP Aug 27, 2024
@bharath-123 bharath-123 changed the title feat: Trusted Builder with Optimistic Simulation MvP feat: Trusted Builder with Optimistic Simulation MVP Aug 27, 2024
return nil, status.Error(codes.InvalidArgument, "Could not unbundle builder bundle packet")
}

txsToProcess := append(tobTxs, ethTxs...)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we are merging the TOB and ROB here.

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