Venus: set up a faucet for labberes for stage 1

Created on 18 Sep 2018  Â·  5Comments  Â·  Source: filecoin-project/venus

We need a way for labbers to get FIL to play with at the stage 1 launch. A faucet is a thingy that sends money to an address. We need a faucet. Why gives a sample faucet in https://github.com/filecoin-project/go-filecoin/pull/938, which is an http server that accepts a target address and then posts to the command api of a node running locally. Presumably that node has tons of FIL. The task here is to implement the faucet (possibly very little work if we take why's work in 938), verify that it works, and work with @gmasgras to get it deployed to the filecoin cluster.

There is a little uncertainty here to work through before you implement. The uncertainty is whether we should use the http server approach in 938 or whether we should implement a command that sends the target address via a libp2p stream to a well-known peer, which sends the message. The reason to do the http server is that it's easy, why has already basically done it. The reason we might not want to do it is that we don't want to / have time to deploy the http server alongside the filecoin nodes in the cluster, and/or we don't want to bother securing that interface.

What to do:

  • Talk to @gmasgras about whether it is easy to deploy the simple http server in 938 alongside filecoin nodes, listening on a well-known port and confirm that it will be able to talk to the filecoin api port on its same machine in production. I think it's fine if the http server runs alongside all the nodes (not just one) if that is easier. If so, yay, take 938 over. Make the UX slightly easier by having it by default return a form with a wide input box labeled "Address to send to: " and a submit button that submits to itself that says "Send FIL". Do this as quick and dirty as possible, maybe just returning a string that you hand write eg "<html><body><form target="http://localhost:1234">Address to send to: <input type="text" name="target" size="30" /> <button type="submit" value="Submit"></form></body></html>". Do whatever is super easy. Verify that it works by running it and a node locally and get it merged. Skip the next step.
  • If you decide to not go the http server route then we need a O(1) step way for a filecoin node to send a target address filecoin. An obvious solution is to have a go-filceoin command that uses libp2p to send a message containing the target address to a well-known peer. Implement, verify that it works, and get it merged.
  • If we are going the http route, file a P1 issue on @gmasgras to add the faucet server to the deployment. Label the issue Stage 1 release, put it in the "This Sprint" column and let george know to estimate it and pick it up. Acceptance criteria must include that a dev has verified that it actually works in the dev cluster (he'll probably have to ping you for that step).
  • update the genesis setup for the prod cluster (gengen/setup.json) such that the nodes never run out of filecoin. Say we expect 100 labbers to turn the faucet on at the default value 500 and let them do it 30 times each means each node should have at least 10050030 FIL to give away.
  • have gmasgras tell you at what URL the faucet will be reachable at at team week and give that URL to poojaketanshah, saying "to send filecoin to yourself during team week they should visit this url, paste in the address to send to and submit.

Acceptance criteria:

  • there exists a ~1 step mechanism to send filecoin to an arbitrary address
  • this mechanism has been verified to work locally
  • gmasgras says he has all the information he needs to integrate it into the filecoin cluster and that he understands that acceptance of his issue requires that he/you verify that it works in the prod filecoin cluster once deployed
  • poojaketanshah has integrated the faucet into her script
  • https://github.com/filecoin-project/go-filecoin/pull/938 is merged or closed
P0

Most helpful comment

the 'correct' way to do this is to run a faucet. Which is essentially just an http server you post your address to, to cause a node that has money to send some to you. This is easy to write simply, and will be very useful for us in testnet and beyond.

All 5 comments

the 'correct' way to do this is to run a faucet. Which is essentially just an http server you post your address to, to cause a node that has money to send some to you. This is easy to write simply, and will be very useful for us in testnet and beyond.

If @whyrusleeping's method above is possible before stage 1 launch, that'll be wonderful. If not, we can also bootstrap this by using iptb or gengen to spin up a couple nodes that have money and power and then send money to new nodes as they come online.

If we do it the second way, we will still need a way to keep track of which nodes have come online so we can send them funds. Also because we might not want to send funds to the same node twice for the purpose of the team week testnet.

I think we should do why suggestion, as it will be less or about the same amount of work and give the better ux.
On 19. Sep 2018, 18:57 +0200, Pooja Shah notifications@github.com, wrote:

If @whyrusleeping's method above is possible before stage 1 launch, that'll be wonderful. If not, we can also bootstrap this by using iptb or gengen to spin up a couple nodes that have money and power and then send money to new nodes as they come online.
If we do it the second way, we will still need a way to keep track of which nodes have come online so we can send them funds. Also because we might not want to send funds to the same node twice for the purpose of the team week testnet.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Simplest version of this is to have a command you can issue from your node that sends a message via libp2p stream to a faucet node, which does the thing. One less new kind of interface to secure, one less thing that might not work (http connection to the faucet, imagine it is running in a cloud somewhere), one less thing to run.

Was this page helpful?
0 / 5 - 0 ratings