Skip to content

migrate to latest pod2 version, add VDSet usage, add a bit of more inline docs, update readme#4

Merged
arnaucube merged 4 commits intomainfrom
migrate-to-pod2-latest
Jun 19, 2025
Merged

migrate to latest pod2 version, add VDSet usage, add a bit of more inline docs, update readme#4
arnaucube merged 4 commits intomainfrom
migrate-to-pod2-latest

Conversation

@arnaucube
Copy link
Collaborator

@arnaucube arnaucube commented Jun 13, 2025

resolves #3 (update to latest pod2 version), adds also a bit of inline documentation, and adds references in the readme

update: depends on 0xPARC/pod2#300 .

@arnaucube arnaucube requested a review from ed255 June 13, 2025 13:46
@arnaucube arnaucube force-pushed the migrate-to-pod2-latest branch 3 times, most recently from 2948075 to e28cd7d Compare June 13, 2025 13:58
use super::*;

#[test]
#[ignore] // This is for the GitHub CI, it takes too long and the CI would fail.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: this ignore is as @ainta initially had it in PR #2 , I suggested removing it to enforce this test too, but it seems that the GitHub CI fails because it takes too long. Disabling it again, and for now we can double check running the tests locally at new PRs, but eventually we can find a solution (either increasing GitHub's cuota, or by setting our own custom server for the CI).

@arnaucube arnaucube force-pushed the migrate-to-pod2-latest branch from e28cd7d to 73e13b5 Compare June 13, 2025 13:59
pub_self_statements(self.msg, self.pk)
}

fn serialize_data(&self) -> serde_json::Value {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The goal of this method is to serialize the pod, so that later on we can deserialize it!

Could you also add deserialization methods to the eddsa and ed25519 pod?
Here's an example of deserialization in the MainPod (you should use the same function signature): https://github.com/0xPARC/pod2/blob/3c6930dfe61ce28f925bea942dcff839c910ddc7/src/backends/plonky2/mainpod/mod.rs#L647-L664

You may decide to change the data that you're serializing. I think it will be easier if you include the msg and pk instead of the public statements.

It would also be great if you add a test where you serialize and deserialize and check that the pod is equal before and after.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense, I wonder then, if we should add the deserialize method into the Pod trait, to enforce that it exists in future implementations of pods (to not depend on reviews detecting it missing it).

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's a good point. Originally I didn't add this method to the Pod/RecursivePod traits because these traits are used for trait objects. And in a trait object I don't think you can access a method that doesn't use self, and the deserialize method doesn't use self.

But as you point out, having this method in the trait will enforce the developer of an introduction pod to implement it!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've created an issue for this 0xPARC/pod2#294

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added the deserializer (594cb58), but I think I'm going put back to draft the current PR and then implement 0xPARC/pod2#294 and update the current PR to use the new (future) pod2 version (also adding a test).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Update: 0xPARC/pod2#300 (which solves 0xPARC/pod2#294 ) has been merged, I've updated the current PR to latest pod2 version including those changes.

@arnaucube arnaucube marked this pull request as draft June 17, 2025 14:43
@arnaucube arnaucube marked this pull request as ready for review June 18, 2025 06:00
@arnaucube arnaucube force-pushed the migrate-to-pod2-latest branch from bd664ce to 9842baf Compare June 18, 2025 08:56
@arnaucube arnaucube force-pushed the migrate-to-pod2-latest branch from 9842baf to 6348f3f Compare June 18, 2025 09:17
@arnaucube arnaucube requested a review from ed255 June 18, 2025 09:25
@arnaucube arnaucube force-pushed the migrate-to-pod2-latest branch from 32687d5 to 6c874e6 Compare June 19, 2025 09:31
Copy link
Collaborator

@ed255 ed255 left a comment

Choose a reason for hiding this comment

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

LGTM!

@arnaucube arnaucube merged commit bad3b80 into main Jun 19, 2025
5 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.

Update to latest pod2 version & add usage of the vds_hash (vds_root now)

2 participants