Skip to content
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

chore(txpool): enriched pool transaction event #3653

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

rkrasiuk
Copy link
Member

@rkrasiuk rkrasiuk commented Jul 7, 2023

Description

Transform PoolTransactionEvent to enable emitted enriched data about the transaction that the event happened to.

@rkrasiuk rkrasiuk added the A-tx-pool Related to the transaction mempool label Jul 7, 2023
@rkrasiuk rkrasiuk requested a review from mattsse as a code owner July 7, 2023 08:38
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #3653 (b5a2fd9) into main (fdc8a05) will decrease coverage by 10.06%.
The diff coverage is 14.75%.

Impacted file tree graph

Impacted Files Coverage Δ
crates/transaction-pool/src/lib.rs 12.41% <0.00%> (-22.88%) ⬇️
crates/transaction-pool/src/noop.rs 2.38% <0.00%> (-8.74%) ⬇️
crates/transaction-pool/src/pool/events.rs 0.00% <0.00%> (ø)
crates/transaction-pool/src/pool/mod.rs 8.20% <0.00%> (-34.66%) ⬇️
crates/transaction-pool/src/traits.rs 5.12% <ø> (ø)
crates/transaction-pool/src/pool/listener.rs 8.49% <18.36%> (-15.26%) ⬇️

... and 179 files with indirect coverage changes

Flag Coverage Δ
integration-tests 12.83% <14.75%> (-3.14%) ⬇️
unit-tests 54.69% <14.75%> (-9.44%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 24.99% <ø> (-1.41%) ⬇️
blockchain tree 78.22% <ø> (-3.04%) ⬇️
pipeline 79.90% <ø> (-6.79%) ⬇️
storage (db) 66.04% <ø> (-7.45%) ⬇️
trie 80.50% <ø> (-14.16%) ⬇️
txpool 36.44% <14.75%> (-12.70%) ⬇️
networking 66.38% <ø> (-11.60%) ⬇️
rpc 42.36% <ø> (-15.88%) ⬇️
consensus 50.52% <ø> (-12.84%) ⬇️
revm 28.11% <ø> (-6.75%) ⬇️
payload builder 4.36% <ø> (-2.48%) ⬇️
primitives 77.59% <ø> (-10.66%) ⬇️

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm,

left suggestion re name

pending clippy

Comment on lines 90 to 91
event: TransactionEvent,
pool_event: PoolTransactionEvent<T>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this could be a bit confusing at first, so I think we should add a few docs how these differ to PoolTransactionEvent and TransactionEvent

still not quite happy with the name, perhaps we rename PoolTransactionEvent to FullTransactionEvent ?

pub fn event(&self) -> &TransactionEvent {
&self.1
}
pub enum PoolTransactionEvent<T: PoolTransaction> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is way better than before

@rkrasiuk rkrasiuk enabled auto-merge July 7, 2023 10:42
@rkrasiuk rkrasiuk added this pull request to the merge queue Jul 7, 2023
Merged via the queue into main with commit 0d76dd7 Jul 7, 2023
@rkrasiuk rkrasiuk deleted the rkrasiuk/enriched-pool-tx-event branch July 7, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tx-pool Related to the transaction mempool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants