-
Notifications
You must be signed in to change notification settings - Fork 117
feat(txpool/tracker): make tracker fb aware #493
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
✅ Heimdall Review Status
|
| } | ||
|
|
||
| /// Track the first time we see a transaction in the mempool. | ||
| pub fn transaction_inserted(&mut self, tx_hash: TxHash, event: TxEvent) { |
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.
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
Approved review 3671474069 from danyalprout is now dismissed due to new commit. Re-request for approval.
danyalprout
left a comment
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 think this is neater, lets get @refcell to take a sanity check too
| // These dependencies are only used in test-utils feature | ||
| #[cfg(any(test, feature = "test-utils"))] | ||
| pub use test_utils::*; |
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.
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.
refcell
left a comment
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.
A follow on pr can fix the primitives feature flag issue
Changes
fb_inclusion_durationPendingBlock. 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.FlashblocksBuilderpublicTODO
track_flashblock_transactions