Skip to content

apollo_mempool: Try to fix the mempool syncronization#12372

Closed
ron-starkware wants to merge 3 commits intoayelet/mempool/naive-mempool/rebase-over-14-1-get_tsfrom
ron/mempool-ts-fix
Closed

apollo_mempool: Try to fix the mempool syncronization#12372
ron-starkware wants to merge 3 commits intoayelet/mempool/naive-mempool/rebase-over-14-1-get_tsfrom
ron/mempool-ts-fix

Conversation

@ron-starkware
Copy link
Contributor

@ron-starkware ron-starkware commented Feb 8, 2026

Note

Medium Risk
Changes how block timestamps are produced in Echonet and introduces an async network dependency on the GetTimestamp request path; incorrect recorder responses or edge cases could affect timestamp consistency, though failures now safely fall back to local time.

Overview
In Echonet mode, timestamp handling is reworked so the FIFO queue no longer performs blocking HTTP calls or timestamp-based filtering; pop_ready_chunk now returns transactions purely in FIFO order.

GetTimestamp is changed to be async and, for Echonet only, fetches the front transaction’s timestamp from the recorder via a bounded (2s) reqwest call, caching by front tx hash and falling back to the local clock on failure. The mempool exposes front_tx_hash, recorder_url, and is_echonet to support this.

Tests are simplified by removing mockito usage and timestamp-related FIFO tests, and dependencies are updated to drop reqwest blocking + mockito from the crate/dev setup.

Written by Cursor Bugbot for commit 982c7ff. This will update automatically on new commits. Configure here.

@reviewable-StarkWare
Copy link

This change is Reviewable

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

Artifacts upload workflows:

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

fn front_tx_hash(&self) -> Option<TransactionHash> {
None
}

Copy link

Choose a reason for hiding this comment

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

Unused trait methods left as dead code

Low Severity

The trait methods get_first_tx_timestamp and set_last_returned_timestamp are now dead code. This PR removed the implementations from FifoTransactionQueue and removed all callers (previously in Mempool::get_ts), but the trait methods themselves remain. FeeTransactionQueue uses the default implementations (which return None and do nothing), and no code calls these methods anymore. These orphaned trait methods add confusion for future developers.

Fix in Cursor Fix in Web

@ayeletstarkware ayeletstarkware force-pushed the ayelet/mempool/naive-mempool/rebase-over-14-1-get_ts branch 5 times, most recently from 50cb3ca to 8dcc1c4 Compare February 9, 2026 14:01
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2026
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.

3 participants