Skip to content

Conversation

@MartinquaXD
Copy link
Contributor

Description

Especially on gnosis chain the reference driver struggled to bring solutions on chain. The issue seems to have been poor transaction gossiping of the 1 configured RPC. The fix was to configure multiple mempools at once. This ended up looking pretty weird with the current code because the only way how you can configure an RPC URL explicitly is by using the mevblocker variant of the mempool enum. This doesn't make sense since a) there is no mevblocker on gnosis chain and b) even on mainnet there is only 1 mevblocker.

Changes

This PR removes the mempool enum and replaces it with a struct that is flexible enough to configure an actual mevblocker endpoint but also multiple regular RPC nodes.

Since this is changing the driver config file in a backwards incompatible way this needs to be merged together with the corresponding infra PR updating the config format.

How to test

updated e2e and driver tests should still pass

@MartinquaXD MartinquaXD requested a review from a team as a code owner December 16, 2025 08:38
@MartinquaXD MartinquaXD marked this pull request as draft December 16, 2025 08:45
@MartinquaXD MartinquaXD marked this pull request as ready for review December 16, 2025 11:35
Copy link
Contributor

@squadgazzz squadgazzz left a comment

Choose a reason for hiding this comment

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

LGTM

@squadgazzz
Copy link
Contributor

squadgazzz commented Dec 16, 2025

Does it make sense to add the mempool name into this config

#[derive(Debug, Clone)]
pub struct Config {
pub min_priority_fee: eth::U256,
pub gas_price_cap: eth::U256,
pub target_confirm_time: std::time::Duration,
pub retry_interval: std::time::Duration,
pub kind: Kind,
/// Optional block number to use when fetching nonces. If None, uses the
/// web3 lib's default behavior, which is `latest`.
pub nonce_block_number: Option<web3::types::BlockNumber>,
}

, so its name will be logged in this span?
.instrument(tracing::info_span!("mempool", kind = mempool.to_string()))

UPD, it should probably be a part of the kind then:

write!(f, "Mempool({})", self.config.kind.format_variant())

@MartinquaXD
Copy link
Contributor Author

Each mempool already has a name. Logging it happens via the Display impl here.

@squadgazzz
Copy link
Contributor

I somehow missed that, thanks!

Copy link
Contributor

@jmg-duarte jmg-duarte left a comment

Choose a reason for hiding this comment

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

LGTM but I have a question

@MartinquaXD MartinquaXD added this pull request to the merge queue Dec 17, 2025
Merged via the queue into main with commit 4d11549 Dec 17, 2025
19 checks passed
@MartinquaXD MartinquaXD deleted the unify-mempool-configs branch December 17, 2025 12:32
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants