Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

IC-530:Canister HTTP requests #7

Merged
merged 9 commits into from
Feb 23, 2022
Merged

IC-530:Canister HTTP requests #7

merged 9 commits into from
Feb 23, 2022

Conversation

ielashi
Copy link
Contributor

@ielashi ielashi commented Jan 27, 2022

This PR provides the specifications for the feature IC-530: Canister HTTP requests.

The spec explains what are the constraints without explaining intricacies related to the underlying protocol.

For this first iteration:

  • the maximal size of the response is defined to 2MiB (maximal size of a message in the consensus queue).
  • no mentions of cycles-related charges; Specifying additional cost that this call will incur should be added in the developers' guide, Computation costs, once the cost is established.

spec/index.adoc Outdated Show resolved Hide resolved
spec/index.adoc Outdated Show resolved Hide resolved
spec/ic.did Show resolved Hide resolved
spec/ic.did Show resolved Hide resolved
spec/index.adoc Show resolved Hide resolved
spec/index.adoc Outdated Show resolved Hide resolved
spec/ic.did Show resolved Hide resolved
spec/ic.did Show resolved Hide resolved
spec/index.adoc Outdated Show resolved Hide resolved
spec/index.adoc Outdated

The maximal size of a request URL is 2048 bytes.

The maximal size of a response is `TBD`. If a response is larger than this size, only the first `TBD` bytes will be returned. This size limit also applies to the value returned by the `transform` function.
Copy link
Contributor

Choose a reason for hiding this comment

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

“also”? Or “only”? I'd expect that larger responses can be processed and trimmed down by the transform function, as we really only have a problem with large messages when they enter consensus, and that’s post-transform.

Copy link
Contributor

Choose a reason for hiding this comment

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

@yotamhc replaced TBD with 2MiB, we can modify this value later if needed, but for the first iteration, I think it's fine. Please see also Joachim's suggestion here. Is this something that we are planning to do now or maybe later, in the following iterations?

Copy link
Contributor

Choose a reason for hiding this comment

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

@nomeata We also don't want to download too big responses (before the transform). We could have another limit for that, but opted to keep it simple for now. Do you think it's crucial to allow larger responses?

@AlexandraZapuc AlexandraZapuc changed the title WIP: IC-530 IC-530:Canister HTTP requests Feb 21, 2022
@AlexandraZapuc AlexandraZapuc marked this pull request as ready for review February 21, 2022 12:52
spec/index.adoc Outdated Show resolved Hide resolved
@AlexandraZapuc
Copy link
Contributor

@JensGroth or @Dfinity-Bjoern, could you please let me know if there are any changes required before merging this PR? cc: @yotamhc

@yotamhc
Copy link
Contributor

yotamhc commented Feb 23, 2022

@AlexandraZapuc should we merge this PR before the feature is available?

@nomeata
Copy link
Contributor

nomeata commented Feb 23, 2022

Yes! At least originally the plan was:

  1. Feature is spec’d in a PR, and agreed upon
  2. Feature is merged into master
  3. New verison of the spec is published
  4. Implementation work starts
  5. New replica version supporting new version of the spec is released.

I understand that for pragmatic reasons 4. happens first usually :-). Nevertheless, because this repo and the doc is versioned, it should be fine to merge and release stuff here that isn't live yet.

Copy link
Contributor

@JensGroth JensGroth left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexandraZapuc AlexandraZapuc merged commit 7002133 into master Feb 23, 2022
dfinity-bot pushed a commit to dfinity/ic that referenced this pull request Feb 23, 2022
EXC-929: Introduce HTTP_REQUEST method in IC00

This MR adds the new Ic00 method which handles the HTTP requests from canisters. Please see the [HTTP Requests Spec](dfinity/interface-spec#7) for more context.

E2e tests will be handled in a separate MR. 

See merge request dfinity-lab/public/ic!3304
dfinity-bot pushed a commit to dfinity/ic that referenced this pull request Mar 7, 2022
EXC-950: Add Canister HTTP response type

This MR defines the canister HTTP response type from the [HTTP Requests Spec](dfinity/interface-spec#7). 

See merge request dfinity-lab/public/ic!3315
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants