Skip to content

fix: enable and update attestation document parsing logic #22120

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

Merged
merged 2 commits into from
May 14, 2025
Merged

Conversation

joyqvq
Copy link
Contributor

@joyqvq joyqvq commented May 13, 2025

Description

Describe the changes or additions included in this PR.

Test plan

How did you test the new or updated feature?


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol: Update Nitro attestation parsing logic and enable for Mainnet in version 83.
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented May 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2025 6:02pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview May 14, 2025 6:02pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview May 14, 2025 6:02pm

@joyqvq joyqvq temporarily deployed to sui-typescript-aws-kms-test-env May 13, 2025 03:05 — with GitHub Actions Inactive
@@ -594,8 +594,30 @@ impl AttestationDocument {
pcr_vec.push(value.to_vec());
}
}

// valid key is 0..31, can parse with u8.
let key_u8 = u8::try_from(key).map_err(|_| {
Copy link
Contributor

Choose a reason for hiding this comment

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

we already defined it above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah but i changed it from u64 to u8 since the valid values can be 0..31 only!

Copy link
Contributor

Choose a reason for hiding this comment

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

so you probably want to guard that try_from with is_upgraded_parsing as well, no?

Copy link
Contributor Author

@joyqvq joyqvq May 14, 2025

Choose a reason for hiding this comment

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

yes😅all error paths on the new parsing logic here should be guarded.

continue;
}

if pcr_map.contains_key(&key_u8) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to check here that !is_upgraded_parsing, no?

@joyqvq joyqvq merged commit 68655bf into main May 14, 2025
53 checks passed
@joyqvq joyqvq deleted the joy/patches branch May 14, 2025 21:42
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