IPFS usage roadmap #148
Open
opened 2019-07-01 10:42:15 +00:00 by raucao
·
3 comments
No Branch/Tag Specified
master
new-final-deploy
new-final-deploy-2
reimbursement-export
staging
legacy
addresses/rsk-testnet-raucao-1
ipfs-defaults
deletemewhendone
feature/184-improve_withdrawal
tests/contracts-contribution
tests/contracts-kit
kit/add-vault-app
feature/ipfs_hash_in_add_response
chore/bootstrap-on-travis
chore/remove-direct-aragon-cli-dependency
chore/update-dependencies-1
fix/ipfs-config
apm-hack
wtf/package-lock
feature/contributor-balance
feature/constructor-options
v7.5.0
v7.4.0
v7.3.0
v7.2.0
v7.1.0
v7.0.0
v7.0.1
v7.0.0-beta.0
v6.0.0
v5.5.0
v5.4.0
v5.3.0
v5.2.0
v5.1.1
v5.1.0
v5.0.0
v4.0.2
v4.0.1
v4.0.0
v3.0.2
v3.0.1
v3.0.0
Labels
Clear labels
good first issue
ipfs
rsk
scaling
bug
dev environment
docs
duplicate
enhancement
feature
idea
invalid
kredits-1
kredits-2
kredits-3
question
security
ui/ux
wontfix
Good for newcomers
Something is not working
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Looking for an answer
release
major
release
minor
release
patch
All your base are belong to us
User interface, process design, etc.
This won't be fixed
No labels
ipfs
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kredits/contracts#148
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Discussed with @bumi yesterday about how to proceed with IPFS and caching in kredits-web. There are multiple different sides to it. Current planned steps:
ipfs.kosmos.orgon port 443 read-only by default, and use the normal URL schema ofhttps://ipfs.kosmos.org/ipfs/$hashfor GET requests. Aside from being able to remove the entire IPFS client lib dependency inkredits-web/contracts, this also enables using the IPFS Companion browser extension for intercepting GETs and loading them from a local IPFS node.fetch()instead ofipfs.cat()for fetching documents, in case no custom IPFS config was handed in to the Kredits instance on creation.Steps 1 and 2 would be the first phase, in order to not load the same IPFS documents over and over again in
kredits-web. The second phase is then to make the architecture fully decentralized:ipfs.kosmos.orgfor our docs to be pinned.kredits-contractsand require it to be handed in to theKreditsprototype instance, in order for write operations to work. Then require contributors to bring a local IPFS (or a remote one they have access to), if they want to do write operations inkredits-web(optional).This solves the basic problems and also makes the entire application completely unhosted/decentralized again, as anyone can use it from any source they want, with any IPFS and Ethereum node, and no write permission needed on a specific IPFS gateway.
Afterwards, to further improve caching and loading times, we can then easily implement a ServiceWorker, which caches the documents in the application cache and intercepts the
fetchrequests before they even try to validate anything.Just FYI: edited/updated the original post considerably. This comment is just for notifications to work.
PR for the gateway config: kosmos/chef#76
So, now that we tested GET requests with caching, it turns out those are still quite slow, even just loading all data from disk (on my few-years-old SSD). So we should probably implement IndexedDB caching soon (which is easy, as we never have to invalidate the cache). Alternatively, we could try ServiceWorker's application cache.