Git Product home page Git Product logo

starling's Introduction

Starling

A command-line interface for simplified, coordinated, decentralized storage on the Filecoin network. This is a work in progress and is not yet production-ready. Use at your own risk.

Requirements

Starling CLI requires a machine running a Filecoin Lotus node and NodeJS v10.16.0 +

Development

To run locally

> npm install

During development it’s convenient to make the symlink on our path point to the index.js we’re actually working on, using npm link.

> npm link

Test by running

> starling <command>

database

Starling uses an sqlite3 database. The db is created in HOME/.starling/starling.db

API Address Config

Starling uses the Lotus configuration files for getting the API's url and authorization token (~/.lotus/api and ~/.lotus/token). Please make sure that an authorization token with admin permissions has been generated beforehand (lotus auth api-info --perm admin)

Starling will use the optional FULLNODE_API_INFO variable in case it has been set.

Commands

Modify the config file HOME/.starling/config.json

> starling config

Store a single file

> starling store full/path/to/file

Store a folder

> starling store full/path/to/folder

Launch interactive monitoring interface

> starling monitor

// up/down keys: scroll through the list
// ^S sort by size, ^V sort by filename
// ^F: filter all files

Generate a CSV report of all files stored

// outputs file in the working directory
> starling list

// outputs file in the specified directory
> starling list <path>

Generate a CSV report of file fixity

// outputs file in the working directory
> starling verify

// outputs file in the specified directory
> starling verify <path>

Output the version number

> starling --version | -v

Output usage information

> starling --help | -h | help

> starling [command] --help

starling's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

starling's Issues

Can't upload to remote lotus node

I have starling installed locally while my miner runs on remote server.

I have setup API's url and authorization token in the files but upload using starling store doesn't seem to work still. Would be nice if starling could work remotely.

The error that I get is no such file or directory while file exists locally on my PC.

I'm not sure if this is starling's best use case but would be nice if to have this possible.

"Get" destination should be optional

Currently the path of where to download a file when using the get command is required, and the command will fail without it. IMHO it would be more common for something like this to be optional… i.e. if there is no path specified it will download to the user's pwd

Deal expired but status STORING

With latest miner, starling attempted to make a deal. After a few days waiting for sector to be sealed, the deal as expired (it no longer shows in Lotus). However, starling still shows the data as STORING and does not report any errors.

Files with same hash treated as duplicates of whatever was stored first

As discussed in Slack…

There are some cases in the real world where users will have two files that have 100% the same content, but different file names. In such cases, although as far as IPFS and Filecoin are concerned with content addressing they are the same file, from a user's perspective they are not. Starling should present them as discrete files, but currently if a file is stored that has the same hash as a previously stored file, it will treat and present it as a duplicate of the file that already exists – i.e. increases the number of copies.

Steps to reproduce:

  1. create a file named foo.txt
  2. starling store foo.txt
    3 starling monitor and observe how many copies of foo.txt. are indicated
  3. make a copy of foo.txt named bar.txt
  4. starling store bar.txt
  5. starling monitor and observe that there is no bar.txt listed and that the number of copies of foo.txt has increased

Example issue for docs website

Since the Starling code and docs site are in the same repo (different branches), when filing issues for the docs/website, apply the "website" label

Couldn't connect to Lotus

I haven't been able to upload through Starling with the latest lotus release and am prompted with the following error:

Finding minersCouldn't connect to Lotus
Couldn't connect to Lotus
Couldn't connect to Lotus
Couldn't connect to Lotus
Couldn't connect to Lotus

Exports have been set as per documentation:

export LOTUS_URL="ws://127.0.0.1/1234/rpc/v0"
export LOTUS_AUTH_TOKEN=eyJhbGciOiJIUzI1NiIsI...

Store command encrypts user's local copy

Steps to reproduce:

  1. create foo.txt in ~/
  2. starling store foo.txt
  3. ls ~/ and sometimes foo.txt will be gone and all you will see remaining is foo.txt-encrypted

Expected behavior

  • DO NOT delete the original file
  • The encrypted copy should IMHO not be stored along side the source file (perhaps stored somewhere in Starling app's files hidden from view? or is there some system dir for this sort of thing?) and should be temporary – i.e. once file has sealed it should be deleted from local storage

Checksums don't match

In our tests, we ran an MD5 checksum on a file before storing in Starling, and then an MD5 on the decrypted file we downloaded. The MD5s for the original, and downloaded file do not match.

Use ~/.lotus/token and ~/.lotus/api by default, fallback to FULLNODE_API_INFO for Lotus endpoints

I have not managed to get starling to work without defining LOTUS_AUTH_TOKEN and LOTUS_URL.

However, local installations of Lotus provide this information already in ~/.lotus/token and ~/.lotus/api. Additionally, Lotus itself recognize a FULLNODE_API_INFO=<optional_token>:<url> env variable which is used to customize the client to use a custom endpoint/token. It would be good if starling relied on these two things, since they are rather standard.

The only gotcha is that lotus uses multiaddresses so, while FULLNODE_API_INFO=ws://something.. works, it will be more common to see FULLNODE_API_INFO=/ip4/<ip>/tcp/1234/http. Same for ~/.lotus/api, it will be a multiaddress.

These can be handled with ease using https://github.com/multiformats/js-multiaddr.

Monitor stops updating during interaction

When users sort or filter in the monitor interface, it stops updating (i.e. status, elapsed time, etc). The monitor should continue to update when being interacted with.

Monitor command bug

I've noticed a bug in the monitor command display when trying to queue/upload 250 GB worth of test files and again when trying to seal a separate batch of 1 GB worth of test files (latter instance is displayed in the screen shot).

Screen Shot 2020-01-16 at 12 50 24 PM

Silent storage stage failure

In usability testing, a user accidentally tried to store their entire home folder (~/). Their command syntax was correct. The CLI output went from "setting up" stage of storage progress bar to a new command prompt, and when observing monitor it was clear that the command had not in fact worked. It is unclear if this is an issue related to storing whole folders, or if there is some other causal factor.

store fails without full / absolute path

It is standard behavior for CLI apps to accept both relative and absolute paths, but the current implementation does not.

Steps to reproduce:

  1. let's say my pwd is my home folder ~/ and that in my home folder there is a file called foobar.txt
  2. starling store foobar.txt
  3. storage will fail with "🚫 Error: open another-readme.txt-encrypted: no such file or directory"
  4. starling store ~/foobar.txt
  5. it works!

relative paths should work…

Unhandled file retrieval failure

During usability testing, when downloading a file using get, an unhandled error occured, with the following JSON output: "Error code 1. ClientRetrieve: failed to get block for [really long string]: data in file did not match. readme.txt-encrypted offset 0"

How to join avis network

Because Filecoin is under heavy development, we are building and testing Starling on a parallel & more stable test network. (We anticipate migrating to the filecoin testnet & mainnet as they stabilize in spring 2020.)

Joining the network

  • The network is nicknamed "avis" (Latin for bird 🐦).
  • Follow this Getting Started tutorial, with these exceptions:
    • Use the binaries (Linux and Darwin) in this tarball
    • Generally, replace all instances of "user" with "avis". For example, instead of:
      go-filecoin init --devnet-user --genesisfile=https://genesis.user.kittyhawk.wtf/genesis.car, use go-filecoin init --devnet-avis --genesisfile=https://genesis-avis.kittyhawk.wtf/genesis.car
    • Use this URL for the explorer: https://explorer-avis.kittyhawk.wtf
    • Use this URL for faucet: https://faucet-avis.kittyhawk.wtf

Notes specifically for miners

  • As of Jan 30, 2020, there are 10 miners with 200GB storage each, run by Filecoin project.
  • As additional providers join the avis network, we will update this list.
  • (tbd)

Notes specifically for storage clients

  • Clients will need to randomize deal proposals across miners rather than proposing them all to a single miner. Otherwise deals will almost certainly get bottlenecked on a single miner. (This is true for all networks.)

Indexing folder screen not displaying # of bytes

I've noticed that after I use the starling store command for a directory, the indexing folder screen doesn't display the number of bytes. Screen shot is of storing ~1 GB for 5 files in 1 directory:

Screen Shot 2020-01-16 at 1 00 23 PM

Encryption opt-out not working

In our usability testing, one user configured Starling to encrypt their files (without password). A subsequent user re-ran configuration, and opted out of encryption. Nonetheless, when they looked at the monitor it said that their file was encrypted.

"Get" error not handled

Screenshot 2020-07-23 16 54 40

Errors should be handled in a more user-friendly way, so that users aren't faced with a paragraph of node messages

Storage syntax error not handled

If users use incorrect syntax (i.e. missing argument) for their storage command, Starling CLI spits out a mess of NodeJS errors that are not handled in a user friendly manner, and in testing were found to confuse users. These should be caught and handled in a clear and user friendly manner – i.e. "you didn't provide a path to the file you want to store" and so on

[Feature request] Configure prioritary/preferred miner list

I am not sure what logic starling follows to select a miner, but it would be great to be able to configure a priority list.

Additionally, perhaps the store command should ask the user if a specific miner should be used, and then confirm the price it will have to pay for that specific miner. Otherwise it can follow the normal workflow of asking for a price and selecting some miner.

all commands fail if ~/starling isn't your pwd

Not sure if this is just how our current test environment was set up, but currently all commands fail if you try and run any starling commands when ~/starling isn't your present working directory.

Storage stage errors hang / don't give new prompt

When there is a storage stage failure, i.e. the one described in issue #26, we do not get a new/ready command prompt. It just hangs, and one has to do a keyboard interrupt (crtl+c) to get a new prompt.

Errors such as this, where there is nothing left for the app to do, should return a new command prompt so the user can take action…

How to set up API Address Config

I'm trying to set up this project to try out. I'm having some issues understanding how to set up the API Address Config. If that can be explained a bit more clearly that would be a great help. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.