cosmology-tech / starship

A k8s based unified development environment for Cosmos Ecosystem (and beyond)
https://docs.cosmology.zone/starship
MIT License
72 stars 25 forks source link

feature: custom faucet addition #225

Closed Anmol1696 closed 1 year ago

Anmol1696 commented 1 year ago

Overview

Alot of the chains are not able to support cosmjs facuet, which causes the issues around scaling.

Proposal

Create a custom go facuet binary that runs inside the docker image of the chain. This faucet will be a wrapper around running exec commands for tx send tokens.

We will also have the type of faucet be:

chains:
- name: osmosis-1
  type: osmosis
  numValidators: 1
  faucet:
    type: starship-faucet
    resources:
      ...

starship-faucet will have the same endpoints as cosmjs faucet, which are:

Implementation

Test

Anmol1696 commented 1 year ago

Need to create a job queue from /credit endpoint. The job itself should transfer tokens based on exec.Command using the chain binary to perform a send-transfer token request.

Good material on job queue: https://blog.devgenius.io/big-int-in-go-handling-large-numbers-is-easy-157cb272dd4f