-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor + Block store #1
Conversation
@alexfreska all of the necessary IPFS config has been moved into the yaml file. You can delete the ipfs folder and there's no need to run api:
address: :8081
password: sia is cool
renterd:
address: http://localhost:9980/api/worker
password: sia is extra cool
bucket: ipfs
ipfs:
gatewayAddress: :8080 # gateway URL
listenAddresses:
- /ip4/0.0.0.0/tcp/4001 # the listen address for bitswap. Since no announce addresses are configured, no bits will be swapped
fetchRemote: true # true if you want to download files that aren't pinned Gateway Endpoints:
API Endpoints:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@n8maninger are you able to upload? I get a status 308 from the renterd worker client here: https://github.com/SiaFoundation/renterd/blob/master/worker/client.go#L208
308 is a permanent redirect. What are your renterd settings? |
|
Shouldn't that be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Basically a huge refactor that also happens to add a chunk database to store each chunk and offset 😅
You can use
[POST] /api/cid/calculate
to test the chunk calculation and compare it with IPFS desktop.[0]
is always the root CID and should have offset = 0, length = upload length.A major change to the API is that you no longer have to load the whole file into memory. The downside is it can't automatically use the CID as the renterd object key. You can either precalculate it or use an arbitrary key. The local db maps the key back to the CID after upload. Maybe in the future, the file should be uploaded to the renterd first (S3/regularly) then manually pinned to the gateway.