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: skip range check when the certificate comes from the management canister #945

Merged
merged 8 commits into from
Oct 22, 2024

Conversation

dfx-json
Copy link
Contributor

Resolves SDKTG-403 and a regression in the NNS dapp in versions of agent > 2.0.0

@dfx-json dfx-json requested a review from a team as a code owner October 17, 2024 19:13
Copy link
Contributor

github-actions bot commented Oct 17, 2024

size-limit report 📦

Path Size
@dfinity/agent 86.79 KB (+0.9% 🔺)
@dfinity/candid 13.58 KB (0%)
@dfinity/principal 4.97 KB (0%)
@dfinity/auth-client 61.04 KB (+1.14% 🔺)
@dfinity/assets 81.67 KB (+0.59% 🔺)
@dfinity/identity 58.17 KB (+1.05% 🔺)
@dfinity/identity-secp256k1 131.39 KB (+0.06% 🔺)

@krpeacock
Copy link
Contributor

I think this is safe to add. We were overriding this check with a custom transformation for our getManagementCanister utility anyway, and this will make the tools more reliable for downstream features

@krpeacock
Copy link
Contributor

@dfx-json did you try this with any live code? Do we know that @dfinity/ic-management was passing the correct vs the effective-canister-id, such that this check would match against aaaaa-aa?

@krpeacock
Copy link
Contributor

krpeacock commented Oct 17, 2024

image

Tested using @dfinity/ic-management - I can still reproduce the error with these changes

https://github.com/krpeacock/ic-management-bug-repro

Copy link
Contributor

@krpeacock krpeacock left a comment

Choose a reason for hiding this comment

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

Looks good to go, and I'm happy to have this new unit testing pattern. It's something we can probably polish and automate down the line, and will be improved with nicer tooling for passing fixed nonces

@krpeacock krpeacock enabled auto-merge (squash) October 22, 2024 23:10
@krpeacock krpeacock merged commit b1b7540 into main Oct 22, 2024
16 checks passed
@krpeacock krpeacock deleted the skip-range-check-for-management-canister branch October 22, 2024 23:22
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