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

[Feature] Make CacheAction generic over NodePrimitives #13048

Closed
klkvr opened this issue Dec 1, 2024 · 7 comments
Closed

[Feature] Make CacheAction generic over NodePrimitives #13048

klkvr opened this issue Dec 1, 2024 · 7 comments
Labels
C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started S-needs-triage This issue needs to be labelled

Comments

@klkvr
Copy link
Collaborator

klkvr commented Dec 1, 2024

Describe the feature

We need to add NodePrimitives generic to

enum CacheAction {
GetBlockWithSenders {
block_hash: B256,
response_tx: BlockWithSendersResponseSender,
},
GetHeader {
block_hash: B256,
response_tx: HeaderResponseSender,
},
GetReceipts {
block_hash: B256,
response_tx: ReceiptsResponseSender,
},
BlockWithSendersResult {
block_hash: B256,
res: ProviderResult<Option<Arc<SealedBlockWithSenders>>>,
},
ReceiptsResult {
block_hash: B256,
res: ProviderResult<Option<Arc<Vec<Receipt>>>>,
},
HeaderResult {
block_hash: B256,
res: Box<ProviderResult<Header>>,
},
CacheNewCanonicalChain {
chain_change: ChainChange,
},
RemoveReorgedChain {
chain_change: ChainChange,
},
}

It needs to be added to the struct impl and passed to all variants fields. This will require making some other types generic over Block/NodePrimitives (e.g. ChainChange would need entire NodePrimitives and BlockWithSendersResponseSender just Block)

Additional context

No response

@klkvr klkvr added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Dec 1, 2024
@klkvr klkvr added the D-good-first-issue Nice and easy! A great choice to get started label Dec 1, 2024
@htiennv
Copy link
Contributor

htiennv commented Dec 1, 2024

Hi @klkvr, can i take this issue? Thanks

@klkvr
Copy link
Collaborator Author

klkvr commented Dec 1, 2024

@htiennv sure! assigned

@htiennv
Copy link
Contributor

htiennv commented Dec 1, 2024

Thanks @klkvr

@mimisavage
Copy link

I'd love to work on this!

@klkvr
Copy link
Collaborator Author

klkvr commented Dec 3, 2024

hey @htiennv do you need any help here?

@klkvr
Copy link
Collaborator Author

klkvr commented Dec 5, 2024

@htiennv sorry, we're blocked by this so taking this over in #13146

@htiennv
Copy link
Contributor

htiennv commented Dec 5, 2024

Hi @klkvr, I have some things to do so I haven't been online often in the past few days. Sorry for the delay

@klkvr klkvr closed this as completed Dec 10, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started S-needs-triage This issue needs to be labelled
Projects
Archived in project
Development

No branches or pull requests

3 participants