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

feat: ic-certified-assets. Add chunk trees for certification #219

Closed
wants to merge 4 commits into from

Conversation

3cL1p5e7
Copy link

@3cL1p5e7 3cL1p5e7 commented Feb 28, 2022

That is a part of proposal about chunks certification (with backward compatibility).

These improvements are a proposal to improve the certification infrastructure around IC and might be considered as a recommendation for dfinity-team.

Goal

Make it possible to certify asset chunks. Validate chunk certificates on the service-worker and icx-proxy.

Why

At the moment, the service-worker and icx-proxy does not support the certification of chunkified files. Moreover, right now it is not possible to correctly stream chunkified and large audio and video files to the front-end.
This problems could be solved independently if it would be possible to install an additional service-worker in the certified zone of the domain ic0.app (for 206 partial http-request handling). But is is impossible because there is unable to place custom worker on ic0.app domain.
Making your own custom player for audio and video is extremely difficult due to the large number of formats and non-native implementation.

Details

To make this possible, support for HTTP-range requests for http_request query method has been added. This is done to support native html audio/video element (which uses 206 partial http-request) and to determine the index of the chunk throught 206 partial http-request.
Using 206 partial http-requests allows you to focus only on certification in the worker and icx-proxy.

Steps

  1. (Here) It all starts with here
  2. Did file was updated in PR for certified-assets-canister
  3. Service-worker started supporting chunk_tree certificate verification in PR for ic
  4. icx-proxy started supporting chunk_tree certificate verification in PR for icx-proxy
  5. Added support for new certified-assets-canister did in PR for agent-rs

@lwshang lwshang closed this Mar 1, 2023
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