-
Notifications
You must be signed in to change notification settings - Fork 401
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
Basic example for best-effort response calls #1069
base: master
Are you sure you want to change the base?
Basic example for best-effort response calls #1069
Conversation
Can't currently test if it works as it seems that `msg_deadline` has gone missing from the current HEAD of the Rust CDK's next branch.
@@ -0,0 +1,5 @@ | |||
[workspace] | |||
members = [ | |||
"src/berc_backend" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Google:
Dictionary
Definitions from Oxford Languages · Learn more
berk
/bəːk/noun informal • British
a stupid person.
I'd personally stick with best_effort
or be
. (o:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"canisters": { | ||
"berc_backend": { | ||
"candid": "src/berc_backend/ber_backend.did", | ||
"package": "berc_backend", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above, regarding "berk". (o:
#[ic_cdk::query(composite = true)] | ||
async fn test_deadlines_in_composite_query() -> (u64, u64) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually do anything at all with deadlines in composite queries, beyond exposing them to the callee? Should we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We ended up specifying this:
For other calls (ingress messages and all calls to query and composite query methods, including calls in replicated mode) a deadline of 0 is returned.
The implementation is consistent with that. I've added this to the README now.
DO NOT MERGE until best-effort responses are available on mainnet.
This is a draft that I can't currently test, as it seems that
msg_deadline
has gone AWOL in the process of overhauling Rust CDK's next branch, but putting it up to get feedback before Christmas.Overview
Why do we need this feature? What are we trying to accomplish?
Requirements
What requirements are necessary to consider this problem solved?
Considered Solutions
What solutions were considered?
Recommended Solution
What solution are you recommending? Why?
Considerations
What impact will this change have on security, performance, users (e.g. breaking changes) or the team (e.g. maintenance costs)?