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

feat: add MaybeSerdeBincodeCompat to SignedTx #14433

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

leruaa
Copy link
Contributor

@leruaa leruaa commented Feb 12, 2025

In order to be able to do that:

/// struct Data<T: SerdeBincodeCompat, H: SerdeBincodeCompat> {
/// #[serde_as(as = "serde_bincode_compat::Block<'_, T, H>")]
/// body: Block<T, H>,
/// }

with NodePrimitives, I need SignedTx to be MaybeSerdeBincodeCompat.

@@ -15,7 +15,7 @@ pub trait NodePrimitives:
/// Block body primitive.
type BlockBody: FullBlockBody<Transaction = Self::SignedTx, OmmerHeader = Self::BlockHeader>;
/// Signed version of the transaction type.
type SignedTx: FullSignedTx;
type SignedTx: FullSignedTx + MaybeSerdeBincodeCompat;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we move this to FullSignedTx instead

like:

pub trait FullBlockBody: BlockBody<Transaction: FullSignedTx> + MaybeSerdeBincodeCompat {}
impl<T> FullBlockBody for T where T: BlockBody<Transaction: FullSignedTx> + MaybeSerdeBincodeCompat {}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@mattsse mattsse added this pull request to the merge queue Feb 12, 2025
Merged via the queue into paradigmxyz:main with commit 17712fe Feb 12, 2025
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants