`ic_cdk::api::data_certificate()` is mis-designed
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 230
- Forks
- 103
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 2
Description
ic_cdk::api::data_certificate is made useless for high-load works, because, to the time a query (non-update) callback is called, the certified data set by the corresponding update call may have be already changed by another update call.
The usable workflow would be instead to deliver (save to a variable, sent out in ah HTTPS outcall, etc.) the data_certificate() return value directly in the update call that sets the data.
It would be acceptable to spread this update call to several blocks, if needed.
The real task
I tried to deliver the value of the certificate in an HTTPS outcall, to check at the sever's side, whether the request to the server is properly authorized.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing ic_cdk::api::data_certificate and how update and query callbacks receive certified data. Compare the current behavior with the requested update-call workflow, including HTTPS outcalls; done means the certificate can be delivered from the update call that sets the data without becoming stale before use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design, blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100