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(sdk): integrate generic receipt into execution #12397

Open
wants to merge 59 commits into
base: main
Choose a base branch
from

Conversation

emhane
Copy link
Member

@emhane emhane commented Nov 8, 2024

Ref #12358

@emhane emhane added C-debt Refactor of code section that is hard to understand or maintain A-sdk Related to reth's use as a library labels Nov 8, 2024
@emhane emhane force-pushed the emhane/integrate-generic-receipt-execution branch from 2c4f8f3 to 05d2941 Compare November 10, 2024 13:18
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.

looks like this required additional work on the trait level, I'd prefer to submit trait changes separately

Comment on lines 83 to 95

/// Temp helper struct for integrating [`NodePrimitives`](reth_primitives_traits::NodePrimitives).
#[derive(Debug, Clone, Default)]
pub struct AnyPrimitives;

impl reth_primitives_traits::NodePrimitives for AnyPrimitives {
type Block = crate::Block;
type BlockHeader = alloy_consensus::Header;
type BlockBody = crate::BlockBody;
type SignedTx = crate::TransactionSigned;
type TxType = crate::TxType;
type Receipt = crate::Receipt;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need this?

Copy link
Member Author

Choose a reason for hiding this comment

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

we needed to access them in the code already generalised by arseni

Copy link
Member Author

Choose a reason for hiding this comment

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

i.e. merge conflicts

crates/primitives-traits/src/node.rs Outdated Show resolved Hide resolved
Base automatically changed from emhane/batch-generic-receipt to main November 14, 2024 16:29
@emhane emhane force-pushed the emhane/integrate-generic-receipt-execution branch from adff3ef to 53c8a2f Compare November 15, 2024 15:38
@emhane
Copy link
Member Author

emhane commented Nov 15, 2024

won't get more checks passing than this, ref #12572 @Rjected @mattsse

@emhane emhane requested a review from mattsse November 15, 2024 19:58
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct AnyPrimitives;

impl reth_primitives_traits::NodePrimitives for AnyPrimitives {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it makes sense to just use EthPrimitives for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

the reason I made AnyPrimitives, is so that we can replace type by type inside EthPrimitives and OpPrimitives, component by component, and don't have to wait till we can replace a type on EthPrimitives and OpPrimitives across all components at the same time

Copy link
Collaborator

Choose a reason for hiding this comment

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

we can replace type by type inside EthPrimitives

wdym? I'd expect EthPrimitives to be the same as right now (besides transaction type being changed eventually). so given that AnyPrimitives are same as EthPrimitives right now this would probably hold?

@emhane emhane requested a review from klkvr November 17, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-execution Related to the Execution and EVM A-sdk Related to reth's use as a library 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.

4 participants