-
Notifications
You must be signed in to change notification settings - Fork 82
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(auctioneer): add new service #1839
base: main
Are you sure you want to change the base?
Conversation
c26dd21
to
779b36f
Compare
ce75877
to
e95f4ab
Compare
e95f4ab
to
556bb15
Compare
556bb15
to
fd44c8c
Compare
fd44c8c
to
87593ec
Compare
87593ec
to
5594ba3
Compare
b213ddb
to
2d75a89
Compare
2d75a89
to
3e4e7b9
Compare
bac77d4
to
eea4393
Compare
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.
sequencer side changes look good to me!
|
||
impl EventBusSubscription { | ||
pub(crate) fn process_proposal_blocks(&mut self) -> EventReceiver<Arc<SequencerBlock>> { | ||
self.process_proposal_blocks.clone() |
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.
Seems like when we call this method, the caller always has to immediately call mark_latest_event_as_seen
. if so, it would be better to just do that inside here (and in finalized_blocks
just below), meaning we could remove the mark_latest_event_as_seen
method altogether.
self.process_proposal_blocks.clone() | |
let mut receiver = self.process_proposal_blocks.clone(); | |
receiver.inner.mark_unchanged(); | |
receiver |
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.
Yeah, that makes sense and is actually in line with how the EventBus
is described to work. 49d3be4
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.
Looks like removing mark_latest_event_as_seen
was missed?
…n visibility, remove unused traits
…; mark all event subscriptions as unchanged
2a09425
to
40ad4ca
Compare
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.
Optimistic approval of the sequencer and core code, pending addressing one minor comment.
Summary
This patch adds the Astria Auctioneer service to the monorepo.
Background
The Astria Auctioneer auctions the top of the next Rollup to the highest bidder.
It receives a proposed Sequencer block1 via a Sequencer node's
astria.sequencerblock.optimistic.v1alpha1.OptimisticBlock
service, and forwards it to its Rollup node'sastria.auction.v1alpha1.OptimisticExecutionService
for optimistic execution by the Rollup. The executed optimistic block hash returned by the rollup triggers Auctioneer to start an auction. It then receives bids from the Rollup node'sastria.auction.v1alpha.AuctionService
, selecting the winner using a first-price mechanism.The auction winner is finally submitted to the same Sequencer node using a standard ABCI
broadcast_tx_sync
to the Sequencer network.Auctioneer does not act as a server in its own right but connects as a client to a Rollup node and to a Sequencer node.
Changes
crates/astria-auctioneer
. It is implemented as a simple event loop that multiplexes proposed blocks and finalized commits (from sequencer), as well as executed rollup blocks and bids (from the rollup).tokio_utils
to0.7.13
to get access toCancellationToken::run_until_cancelled
astria.bundle
toastria.auction
SequencerBlockCommit
to newastria_core::sequencerblock::optimistic::v1alpha1
submodule, following protobuf spec naming conventions (the other domain types remain exclusive to auctioneer for now).astria_core::Protobuf
forFilteredSequencerBlock
to get access to the wiretype name in error and log messages.astria_sequencer::sequencer::start_grpc_server
toastria-sequencer::grpc::serve
astria_sequencer::grpc::optimistic
implementing theastria.sequencerblock.optimistic.v1alpha1.OptimisticBlock
gRPC serviceastria_sequencer::app
module to implement anEventBus
that is used by the gRPC service to subscribe to new events (right now, only proposed blocks and commits).ASTRIA_SEQUENCER_NO_OPTIMISTIC_BLOCKS
to toggle the optimistic block service in Sequencercharts/auctioneer
charts/evm-rollup/files/genesis/geth-genesis.json
to setastriaAuctioneerAddresses
charts/sequencer/templates/configmaps.yaml
to to setASTRIA_SEQUENCER_NO_OPTIMISTIC_BLOCKS
justifle
to understand how to docker-build auctioneerauctioneer
to docker-build github workflow.Testing
To test this, we deployed a local setup consisting of a dedicated auctioneer flame node, the auctioneer node and a sequencer with optimistic blocks enabled.
The code for auctioneer flame node can be found at astriaorg/flame#30. The auctioneer has been tested locally against this auctioneer flame node branch.
We have tested the setup by sending txs to the auctioneer flame node using spamooor. We check with logs and manually query the blocks to ensure that the tx sent has end up on the top of block of the auctioneer.
Changelogs
Changelogs updated.
Related Issues
closes #1888
closes #1533
closes #1820
Footnotes
A proposed Sequencer block is that data structure that comes out of the Astria Sequencer network's CometBFT process-proposal step. ↩