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: re-add class_commitment to pathfinder_getProof output #2491

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

CHr15F0x
Copy link
Member

@CHr15F0x CHr15F0x commented Jan 15, 2025

Fixes: #2489

I compared results between 15bdee2 and this branch and there's some differences:

  • pathfinder_getProof serialized missing contract_data as null, now it's just skipped - I guess we should stick to the old behavior?
  • contract_proof nodes were serialized in a slightly different way:
      {
        "binary": {
          "left": "0x5c0009baa6ae667d10ee6afc1c63550be043a58f975c03c846b7e841e90c2d8",
          "right": "0x3fda3c6bfc76ea5822fbac557957e40504996fad5396a5f9fe139d60acaa753"
        }
      },

as compared to

    "contract_proof": [
      {
        "left": "0x5c0009baa6ae667d10ee6afc1c63550be043a58f975c03c846b7e841e90c2d8",
        "right": "0x3fda3c6bfc76ea5822fbac557957e40504996fad5396a5f9fe139d60acaa753",
        "type": "binary"
      },

now.

Looking at the old code one would say that there's skip_serializing_none and the null-s should not appear in the output, but this is a bug, because the annotation must be put before the derive.

I think these differences should also be addressed. Wdyt?

@CHr15F0x CHr15F0x marked this pull request as ready for review January 15, 2025 13:09
@CHr15F0x CHr15F0x requested a review from a team as a code owner January 15, 2025 13:09
@kkovaacs
Copy link
Contributor

Yeah, sure, we shouldn't change how nodes are serialized in the response.

@CHr15F0x CHr15F0x force-pushed the chris/add-class-commitment branch from 4aa123e to e7bc5cd Compare January 15, 2025 16:19
@CHr15F0x
Copy link
Member Author

Yeah, sure, we shouldn't change how nodes are serialized in the response.

e7bc5cd

Copy link
Contributor

@kkovaacs kkovaacs left a comment

Choose a reason for hiding this comment

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

LGTM

@CHr15F0x CHr15F0x merged commit 95f5966 into main Jan 15, 2025
8 checks passed
@CHr15F0x CHr15F0x deleted the chris/add-class-commitment branch January 15, 2025 20:37
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.

Re-add class_commitment to pathfinder_getProof result
2 participants