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

Basic example for best-effort response calls #1069

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

oggy-dfin
Copy link
Member

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)?

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"

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:

Copy link
Member Author

Choose a reason for hiding this comment

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

That just means that it's gonna be big!

git
1 of 2
noun
ˈgit
Synonyms of git
British
: a foolish or worthless person

"canisters": {
"berc_backend": {
"candid": "src/berc_backend/ber_backend.did",
"package": "berc_backend",

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:

Comment on lines 79 to 80
#[ic_cdk::query(composite = true)]
async fn test_deadlines_in_composite_query() -> (u64, u64) {

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?

Copy link
Member Author

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.

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