Skip to content

Conversation

@wlawt
Copy link
Contributor

@wlawt wlawt commented Jan 15, 2026

Changes

  • Introduces a new metric fb_inclusion_duration
  • Records the metric when it sees the txhash in a PendingBlock. NOTE: on FB inclusion, it does not remove the TxHash in the Tracker's cache. This is to let us record when its included in the canonical block for the other existing metrics.
  • Made FlashblocksBuilder public

TODO

  • Add a unit test that invokes track_flashblock_transactions

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Jan 15, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@wlawt wlawt changed the title feat(txpool/tracker): make tracker fb aware WIP - feat(txpool/tracker): make tracker fb aware Jan 15, 2026
}

/// Track the first time we see a transaction in the mempool.
pub fn transaction_inserted(&mut self, tx_hash: TxHash, event: TxEvent) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK, a transaction sent to us is sent to both the builder and the mpool, at the same time. Therefore, this should be accurate, as we'll start tracking right when we see it in the mpool to when it's in a PendingBlock

@wlawt wlawt changed the title WIP - feat(txpool/tracker): make tracker fb aware feat(txpool/tracker): make tracker fb aware Jan 15, 2026
@wlawt wlawt marked this pull request as ready for review January 16, 2026 15:08
@cb-heimdall cb-heimdall dismissed danyalprout’s stale review January 16, 2026 17:13

Approved review 3671474069 from danyalprout is now dismissed due to new commit. Re-request for approval.

@wlawt wlawt requested a review from danyalprout January 16, 2026 17:13
danyalprout
danyalprout previously approved these changes Jan 16, 2026
Copy link
Collaborator

@danyalprout danyalprout left a comment

Choose a reason for hiding this comment

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

I think this is neater, lets get @refcell to take a sanity check too

Comment on lines +9 to 11
// These dependencies are only used in test-utils feature
#[cfg(any(test, feature = "test-utils"))]
pub use test_utils::*;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah right so since we don't have any tests in primitives inside test_utils, it's not used by cfg(test) which is causing a warning I believe. We should only use #[cfg(feature="test-utils")] for this and the pub mod test_utils; line above. Then dependencies should just be optional and listed under the test_utils feature flag.

Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

A follow on pr can fix the primitives feature flag issue

@wlawt wlawt added this pull request to the merge queue Jan 16, 2026
Merged via the queue into main with commit 0f9f5ac Jan 16, 2026
15 checks passed
@wlawt wlawt deleted the tracker-fb branch January 16, 2026 19:50
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.

5 participants