Skip to content

Conversation

@niran
Copy link
Contributor

@niran niran commented Sep 22, 2025

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.

@niran niran marked this pull request as ready for review September 26, 2025 04:54
@niran niran requested a review from danyalprout September 26, 2025 04:54
}

/// Get all bundles valid for a specific block
pub async fn get_bundles_for_block(
Copy link
Contributor

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?;
Copy link
Contributor

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
Copy link
Contributor

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<()> {
Copy link
Contributor

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(
Copy link
Contributor

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

@niran
Copy link
Contributor Author

niran commented Oct 28, 2025

This approach has been superseded by the builder's in-memory bundle pool and node-reth's base_meterBundle (base/node-reth#142).

@niran niran closed this Oct 28, 2025
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.

3 participants