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(transaction-pool): remove duplicate code #13627

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hoank101
Copy link
Contributor

@hoank101 hoank101 commented Jan 3, 2025

No description provided.

@hoank101 hoank101 requested a review from mattsse as a code owner January 3, 2025 13:57
mattsse
mattsse previously approved these changes Jan 3, 2025
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.

makes sense, but good candidate for upstreaming

Comment on lines +5 to +8
pub(crate) fn match_versioned_hashes(
blob_sidecar: &BlobTransactionSidecar,
versioned_hashes: &[B256],
) -> Vec<Option<BlobAndProofV1>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you perhaps also upstream this to alloy and make this a function of BlobTransactionSidecar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i have PR to update here -> alloy-rs/alloy#1882

@mattsse mattsse added C-debt Refactor of code section that is hard to understand or maintain A-tx-pool Related to the transaction mempool labels Jan 3, 2025
@mattsse mattsse dismissed their stale review January 3, 2025 15:04

actually, need to take a closer look at this

Comment on lines +138 to +139
let matches = match_versioned_hashes(blob_sidecar, versioned_hashes);
for (i, match_result) in matches.into_iter().enumerate() {
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 a bit problematic because this now allocates let mut result = vec![None; versioned_hashes.len()]; per blob_sidecar

we can solve this differently:

alloy-rs/alloy#1882 (comment)

@mattsse
Copy link
Collaborator

mattsse commented Jan 6, 2025

@hoank101 this is blocked until next alloy release

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 C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants