-
Notifications
You must be signed in to change notification settings - Fork 76
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 Optimistic Simulation #1404
Draft
bharath-123
wants to merge
43
commits into
main
Choose a base branch
from
bharath/trusted-block-builder-next
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
conductor
pertaining to the astria-conductor crate
proto
pertaining to the Astria Protobuf spec
sequencer
pertaining to the astria-sequencer crate
composer
pertaining to composer
cd
labels
Aug 23, 2024
bharath-123
added
docker-build
used to trigger docker builds on PRs
evm
pertains to EVM
demo
labels
Aug 23, 2024
quasystaty1
added
docker-build
used to trigger docker builds on PRs
and removed
demo
docker-build
used to trigger docker builds on PRs
labels
Aug 23, 2024
bharath-123
changed the base branch from
main
to
bharath/composer-execution-api-integration
August 23, 2024 19:14
quasystaty1
force-pushed
the
bharath/trusted-block-builder-next
branch
from
August 23, 2024 21:17
3e0bff5
to
5831d37
Compare
quasystaty1
force-pushed
the
bharath/trusted-block-builder-next
branch
from
August 23, 2024 21:41
5831d37
to
20aa9ac
Compare
bharath-123
changed the title
trusted block builder second iteration
feat: Trusted Builder Optimistic Simulation
Aug 27, 2024
bharath-123
force-pushed
the
bharath/trusted-block-builder-next
branch
from
August 29, 2024 16:40
9d1e32a
to
1b0e565
Compare
github-actions
bot
added
ci
issues that are related to ci and github workflows
sequencer-relayer
pertaining to the astria-sequencer-relayer crate
labels
Aug 29, 2024
bharath-123
force-pushed
the
bharath/trusted-block-builder-next
branch
from
September 2, 2024 17:01
fece56c
to
ab8e7e6
Compare
bharath-123
force-pushed
the
bharath/trusted-block-builder-next
branch
from
September 6, 2024 09:58
6ff8a57
to
e54d895
Compare
bharath-123
changed the base branch from
bharath/composer-execution-api-integration
to
main
September 6, 2024 09:59
bharath-123
commented
Sep 6, 2024
maxBytesPerBundle: 200000 | ||
maxBundleSize: 200000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maxBundleSize
can be removed.
bharath-123
commented
Sep 13, 2024
pub execution_api_url: String, | ||
|
||
/// The maximum possible size of a bundle | ||
pub max_bundle_size: usize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary, we can just hard code this in the binary.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cd
ci
issues that are related to ci and github workflows
composer
pertaining to composer
conductor
pertaining to the astria-conductor crate
demo
docker-build
used to trigger docker builds on PRs
evm
pertains to EVM
proto
pertaining to the Astria Protobuf spec
sequencer
pertaining to the astria-sequencer crate
sequencer-relayer
pertaining to the astria-sequencer-relayer crate
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support to optimistically simulate bundles in composer. At a high level, we receive sequence actions from process_proposal and simulate the bundle on top of the received sequence actions. This allows us to stay in sync with conductor and gives us more time to submit the simulated bundle.
Background
A Trusted Builder is a sophisticated rollup entity who is responsible for creating high value bundles. Composer is part of the trusted builder. The trusted builder's composer is responsible for simulating the bundle created by the builder and removing any invalid or reverting txs. To achieve this, we have made changes to the ExecuteBlock method/ to have a simulateOnly mode and to return txs that have been successfully included in a block.
More details on Trusted Builder are included in https://www.notion.so/astria-org/Trusted-Block-Builder-MVP-8eba7cd7cbd34e4e90a4adf726879028?pvs=4
One of the key issues, we have observed in the first iteration of trusted builder was that the time taken to simulation and then to submit the transaction was not enough to ensure that our simulated bundle is applied on the parent hash on top of which it was simulated.
To avoid this, we modify sequencer to push sequence actions which are being processed to the composer. We simulate the bundle on top of these sequence actions. We also modify sequencer to push the finalized block hash, we only submit the simulated bundle if this finalized block hash matches the block hash of the sequence actions submitted during process_proposal.
More details on the iterations are listed at: https://app.excalidraw.com/s/11QAdJyeldV/A3su0PdTwsU
Changes
BundleBuilderPacket
proto which is the artifact containing the simulated sequence actions and the parent hash on top of which we have simulated the sequence actions.SendOptimisticBlockRequest
proto which contains the sequence actions sequencer pushes to composer during aprocess_proposal
.SendFinalizedBlockHashRequest
proto which contains the finalized block hash sequencer pushes to composer duringfinalize_block
SendOptimisticBlockRequest
) and simulation of bundle on top of the parent block hash.process_block
to composer via theSendOptimisticBlockRequest
request.finalize_block
to composer viaSendFinalizedBlockHash
request.Testing
Breaking Changelist
closes