Conversation
…x broken examples Frontend code moves to @dfinity/certificate-verification 4 and @icp-sdk/core 6 (Uint8Array, LookupResult statuses) and gains a no-witness path. Rust moves to ic-cdk 0.20 and ic-certification 4 with export_candid; the Motoko CertTree example compiles again. The HTTP certification example is complete and moves to a reference. Certified getters are tested with icp canister call --query, and the upgrade pitfall now matches the spec. Adds the first eval file.
Skill Validation ReportValidating skill: /home/runner/work/icskills/icskills/skills/certified-variablesStructure
Frontmatter
Tokens
Markdown
Tokens
Content Analysis
References Content Analysis
Contamination Analysis
References Contamination Analysis
Result: 1 warning Project Checks |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
certified-variablesskill is brought up to date with@dfinity/certificate-verification4.0.0, which peers@icp-sdk/core^6, and with the current Rust and Motoko libraries. Every code block was compiled, deployed to a local network (icp-cli 1.5.0) and exercised end to end, and several were broken onmain.Broken on
main, now fixed:Uint8Array, notArrayBuffer.lookup_pathreturns aLookupResult, not bytes, so the oldif (!leafData)check never fired. The new code switches onFound/Absentand rejectsUnknown. TreatingUnknownas absent would let a replica hide a real value behind a witness for a different key (new pitfall 9).CertTreeexample did not compile.let ct = CertTree.Ops(...)fails withM0131in a persistent actor and needstransient. The deprecatedpostupgradehook is dropped.icp deploy. It lackedic_cdk::export_candid!(), so the Rust recipe failed withget_candid_pointer.icp canister call … getwas wrong. icp-cli sends an update call unless--queryis passed, so the Rust getter trapped and the Motoko getters returnedcertificate = null.abstract-behavior.md:2690-2693, confirmed locally). What is lost is a heap tree, so Rust must rebuild it and re-set the hash, while Motoko'sCertTree.Storeneeds nothing.http_requesthandler, no witness header, and noIC-CertificateExpressionheader in the certified response. The last one makesic-http-certification4 returnCertificateExpressionHeaderMissing. It is replaced by a complete minimal canister, moved toreferences/http-certification.md.Updated:
ic-cdk0.20,ic-certification4 (sameRbTreeAPI asic-certified-map, and what the official examples use),ic-http-certification4.Certificate.create+certified_data) for the single-value Motoko example, linkingmotoko/cert-var.ic_envcookie, oricp network status --jsonin Node, with the same serving-network caveat as fix(icp-cli): drop false claim that createActor ignores { agent } #405.static-siteskill instead.Verification (local network)
ic-certification4 /ic-cdk0.20), MotokoCertTreeUnknown, throwsverifySingleValue200 hello. A variant serving an uncertified body is rejected withbackend_response_verification; certifying withoutIC-CertificateExpressionreturnsCertificateExpressionHeaderMissingpost_upgradeEval results (new file, all cases with baseline)
--querypitfall.Refs #406 (its
certified-variablesrow: therootKeytype fix is done here).