-
Couldn't load subscription status.
- Fork 21
Add simulator service for generating throttling data and state diffs for txs #7
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
Conversation
…ations and notification to trigger them
…types in the simulator
| } | ||
|
|
||
| /// Get all bundles valid for a specific block | ||
| pub async fn get_bundles_for_block( |
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.
DatastoreBundleProvider isn't currently being used right?
That is, we aren't really doing any filtering yet?
| // Process the new canonical chain | ||
| for block in new.blocks().values() { | ||
| let block_hash = block.hash(); | ||
| self.process_block((&block_hash, block)).await?; |
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.
In a reorg, are we doing anything special to delete the diff of blocks from the datastore? Or, are we just leaving it in the datastore for now?
| TIPS_SIMULATOR_BUILDER_PLAYGROUND_DIR=~/.playground/devnet | ||
| TIPS_SIMULATOR_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres | ||
| TIPS_SIMULATOR_KAFKA_BROKERS=localhost:9092 | ||
| TIPS_SIMULATOR_KAFKA_TOPIC=tips-audit |
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.
should this be tip-ingress-rpc, so that the MempoolEventListener kafka topic can process incoming bundles from Ingress RPC?
| } | ||
|
|
||
| /// Publish result to Kafka if configured | ||
| async fn publish_to_kafka(&self, result: &SimulationResult) -> Result<()> { |
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.
question: is this potential kafka topic for searchers?
| // Store the simulation using the datastore interface | ||
| let simulation_id = self | ||
| .datastore | ||
| .insert_simulation( |
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.
i wonder if it'll make sense to buffer this to ingress-writer as a refactor later
|
This approach has been superseded by the builder's in-memory bundle pool and node-reth's |
The simulator listens to mempool events to simulate new bundles, and listens to chain events from ExEx to trigger new simulations at the top of each block. We currently capture the execution time to use for throttling and the state diffs to pass to searchers so we can move MEV auctions off chain.
The simulator is temporarily set up to run with builder-playground in place of op-rbuilder so rollup-boost can send Engine API calls on port 4444. This will be replaced with a separate op-node instance for just the simulator. Until then, the simulator is in a separate docker-compose profile so it won't start by default.