-
Notifications
You must be signed in to change notification settings - Fork 311
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
[Bounty] Add CDN for the file service #2160
Comments
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 500.0 DAI (500.0 USD @ $1.0/DAI) attached to it.
|
🙋♂️🙋♂️🙋♂️ |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work has been started. These users each claimed they can complete the work by 265 years, 10 months from now. 1) haihongs has been approved to start work.
Learn more on the Gitcoin Issue Details page. |
@haihongS please sync any update with us here, thanks |
Ok, let's start it.The usual flow:https://arweave.net/j8BNG1iTI0kebUQM9UlR9abW56fRmBZLnV3gsUOfo44 redirects to -> CDN cacheWe can offer an acceleration link: When we check the content in HTML, found the real file link in Arweave which needs to be changed in Mask. |
We'd like some speed tests from different areas. What's your thoughts? @septs |
Can we get much more information about the user location in using Mask & Arweave |
We do have some stats in Mask but you should probably test it all over the world to test out the robustness of your service |
Yeah, so can we start with an alternative link which gives users an option to reach files through cache service, just like live streaming has multiple lines. e.g. users based in China Mainland and North America can try the alternative link, and we will check the status of service and do some tunings. After several periods, we will know the performance and robustness of service, then comes the real CDN. |
I guess the ideal solution would require you to modify our code so that it'll test out all the options and choose the best available. |
sure, let me check the code |
@haihongS Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
yeah, wip right now |
Does Mask maintain the signing system in private and keep SK? |
as arweave does not provide remote signing method, it's core logic like: const [data, parsed] = await readRequest(ctx.req.read());
const signed = await instance.crypto.sign(keyfile, data);
const id = await instance.crypto.hash(signed);
ctx.body = {
signature: bufferTob64Url(signed),
id: bufferTob64Url(id),
}; wrote here response body to Maskbook/packages/maskbook/src/plugins/FileService/arweave/remote-signing.ts Lines 6 to 13 in 75de7fe
|
Thx, and I can continue the idea without this part right now. I read some codes and tried file service in twitter, here is my understanding of process: User A clicks the FileService plugin in twitter and drops a file into it -> mask builds an arweave -> display arweave link: plz point out the mistakes above if it has @septs |
Besides, I noticed the lack of the whole encryption, which means, I can scan the history of transactions in mask's account and find the real file hash without the key. Two sequent transactions, one for key check and the other represents the real file. |
key using hmac-sha256 verify user key correctness.
notes:
|
awesome codes, and now we need to talk about the solution for this issue. purpose
concernthe robustness of service solutionkeep the original arweave link, but give users an alternative link I have noticed the two key point links in file service, one is so, I need to add alter link in Then, we can offer the entry atler landing-page link in twitter, which will help users who can't reach arweave endpoint. @septs what's your idea? |
we have added a 10MB test file in also cache link for plz check the speed. |
In chrome incognito mode, I tested two files. one is from original arweave endpoint(8.7M): another is the cached one(9.4M): The results is much ideal. The strategy keeps the same as traditional cloud service provider. When the first request arrived, the system will redirect to origin source and schedule a job, which can cache file to the user's neighbourhood. As soon as the caching ready, new request will be distributed to cached nodes according to load-balance strategy. |
Hope it will be convenient to users and save the cost of mask. ^...^ |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 500.0 DAI (500.0 USD @ $1.0/DAI) has been submitted by:
|
consider done @yisiliu |
should close gitcoin bounty if this is consider done @yisiliu |
Catalogue
Part 1: Problem Description
Right now we are using Arweave as the "backend" of the file service, where users are able to upload files onto or download from. However, the endpoint is not stable as it might be influenced by a few factors. We would like to add a CDN to help improve this experience for our users all over the world.
In the future, we are planning to add more "backends"(#2069) and would appreciate the CDN as well.
Part 2: Resources
https://github.com/DimensionDev/Maskbook/tree/master/packages/maskbook/src/plugins/FileService
Part 3: Contact and Support
@yisiliu and @septs
The text was updated successfully, but these errors were encountered: