Estuary
An experimental ipfs node
Building
Requirements:
- Run
make clean all
inside the estuary directory
Running
To run locally in a 'dev' environment, first run:
./estuary setup
Save the auth token that this outputs, you will need it for interacting with and controlling the node.
NOTE: if you want to use a different database than a sqlite instance stored in your local directory, you will need to configure that with the --database
flag, passed before the setup command: ./estuary --database=XXXXX setup
Once you have the setup complete, choose an appropriate directory for estuary to keep its data, and use it as your datadir flag when running estuary. You will also need to tell estuary where it can access a lotus gateway api, we recommend using:
export FULLNODE_API_INFO=wss://api.chain.love
Then run:
./estuary --datadir=/path/to/storage --database=IF-YOU-NEED-THIS --logging
Systemd
The Makefile has a target that will install a generic but workable systemd service for estuary.
Run make install-estuary-service
on the machine you wish to run estuary on.
Make sure to follow the instructions output by the make
command as configuration is required before the service can run succesfully.
Seeking Intructions on How to Run My Own Node
This project looks awesome! Really excited to see a Filecoin interactive project with a fleshed out interface. Great work! The only issue is that all the documentation assumes that the user is going to apply for an API Key which is totally fine, but what if I wanted to run my own node? (Aka make it truly decentralized)? Is there instructions on how to do this because I can't find any.
Again just to be clear, I'm looking for a way to run this project so I don't need to be granted an API key (other than the key that I'm granting myself in the backend of my server running an Estuary node). I feel like that would make it a truly permission-less way to interact with Filecoin.
Update 08/23/21
So I tried to install this repo locally to see if I could get it to run without any external node running. I ran
git clone https://github.com/application-research/estuary.git
,cd estuary/
,make
, thenmake install
. I then ranestuary
as it was now in my path but It gave me this messagecould not get API info: could not get api endpoint: API not running (no endpoint)
. Where do I go from here?Add /collections/{coluuid}/content/{contentid} [delete] endpoint
This PR adds the endpoint to remove a content from a collection, also refactors some of the code so it's more reusable.
TODO:
GetContent
functioncontents
packageFixes #421
Verification:
boost integration
This PR modifies Estuary to be able to make deals with Boost
Boost listens on v1.2.0 of the deal proposal protocol. So to make deals with Boost, Estuary needs to
The new version of the deal proposal protocol also needs the size of the CAR file (ie, the size of data that will be transferred across the wire). So there are some changes to calculate the CAR file size of deal data before making a deal proposal.
TODO:
Depends on https://github.com/application-research/filclient/pull/60
Chore/extract api package
This PR moves all API logic into an
apiV1
package and sets the ground for API v2 work which isapiv2
both in theapi
directory. It is also a step toward improving the code for readability, testing, and identifying service boundaries (which will help us build a better deterministic platform).verification
content/add
,content/add-car
,pinnging/pin
,staging-zones
, anddeal-making
,shuttles
- all worksPlease have a look and provide feedback
`/add-car` don't support uploading without `Content-Length` set
Describe the bug Trying to upload files to estuary using linux2ipfs it fails (where it didn't, this broke in a 1 week window arround the end of IPFS-Thing).
This is because linux2ipfs don't set the
Content-Length
header.This is undocumented behavior of the API and the error message is absolutely terrible, the shuttle send a
500
with this body:To Reproduce Just POST a car file to
/content/add-car
to a shuttle WITHOUTContent-Length
. (note be carefullcurl
addsContent-Length
automagically for you by default).Expected behavior I prefer the old behaviour where the file would just be streamed until
EOF
.Actual behavior If
Content-Length
is missing it fails extremely unclearly.Additional context I understand that for some technical reason you might need
Content-Length
(like preallocating some space or whatever). However I would like this to be documented in the HTTP API docs as well have a meaning full error message (likeError: Content-Length required
).I added a "work-around" in linux2ipfs where I just set the content length: https://github.com/Jorropo/linux2ipfs/commit/517015a5506b4c7b429ceb4b2cbd847406c1ea12
Ignore trailing slash on API endpoints
Closes #438
This change will strip the trailing slash from any incoming request. The caller can either make a request with or without it (ex,
http://localhost:3004/health
orhttp://localhost:3004/health/
), both will work now.docs(readme): Add clarification of first user credentials
The problem
Users via the front-end when providing credentials are using a predefined salt defined here: https://github.com/application-research/estuary-www/blob/master/common/constants.ts#L28 for their password. The resulting hash is then safely sent to authenticate. This goes for signing-up/logging-in.
Now when creating the first user via:
./estuary setup --username=<uname> --password=<pword> --database=XXXXX
The provided password is saved by salting it with a randomly generated
uuid
not the salt provided above. Therefore when trying to authenticate using this same credentials, the resulting hash will not match and the first user is not able to authenticate. The user can use a workaround by using the token and logging in with it. However it might be confusing to see the provided credentials are not working for first time users in estuary-www.The Fix
It could be possible to salt the first user's password in the backend with the same salt, not sure if maintaining a copy of the same salt (in estuary-www and estuary) desired, since at some point it might diverge.
However, providing some documentation provided in this PR will at least avoid confusion.
Document content/add response structure
I've added the structure to the docs.go file, but I'm not sure how the JSON and Swagger are supposed to get generated.
Is this the correct approach?
I might submit one for add-car in a bit too.
"too many open files" error when runniing estuary
I'm trying to run estuary and repeatedly get the error "failed to resolve local interface addresses ... too many open files".
I've tried increasing the ulimit from 1024 to 10000 (
ulimit -Hn 10000 && ulimit -Sn 10000
) but get the same error on Ubuntu 20.04.verify data stored on local estuary setup
I need help verifying data stored on my local estuary setup.
Steps:
when verifying the cid, i get a message "This CID is not found. It might be pinned by a IPFS Node, you can use the dweb.link URL to check"
the content is accessible at the IPFS gateway, https://bafkqactumvzxictumvzxicq.ipfs.dweb.link/
I would like to verify that estuary node is pinning the data and filecoin deals are made.
Thanks
Clients need two endpoints
Describe the bug Currently because api uses api.estuary.tech whereas upload uses upload.estuary.tech clients need to construct two separate endpoints in their code.
See https://github.com/filecoin-project/bacalhau/blob/9201087604398cbc1a458717cfca6f50dc22c976/pkg/publisher/estuary/endpoints.go#L19-L20
this is unnecessary overhead for our users. We should make the UX simpler by providing a single frontdoor.
@simonwo for awareness.
feat: sp endpoints v2 (Revision B)
Closes #578
This is revision B as the original PR was reverted, since it broke V1. (https://github.com/application-research/estuary/pull/831)
In this new PR, V1 has been left completely untouched to avoid anything breaking.
Bump gorm.io/driver/sqlite from 1.1.5 to 1.4.4
Bumps gorm.io/driver/sqlite from 1.1.5 to 1.4.4.
Commits
7f4b498
Fix get column default value for null column22036f5
Fix condition for limit (#5735) (#118)1007940
Include pure go sqlite driver in README, close #77 #93c86933b
Fix parse ddl with newline, close #94455504f
Fix index ddl regexp, close #872573b11
ignore generated columns when [recreateTable] (#109)d13f96d
Update github action go versionea59bcf
Fix change limit.Limit typefd61679
Bump github.com/mattn/go-sqlite3 from 1.14.12 to 1.14.15 (#108)2609fe6
fix: limit=0 results (#5735) (#114)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)GET /collections/{col-uuid} Excruciatingly Slow
Describe the bug Hi there, when I'm running queries to get contents of a specific path of a collection in the Estuary DB, I get highly varied and extremely slow response times ranging from 1 to 15 seconds.
To Reproduce
Additional context
I see that in the following file there is a TODO which seems to imply that there is an unoptimized query being run to fetch the content of the collection in handlers.go
I was wondering if it was as simple as improving the query or if the underlying models need to be changed to make this lookup more efficient? I don't know enough about Estuary's underlying system to try to fix this but if anyone has some insight that would be amazing.
Thanks.