Inspiration
I noticed that running the scaffolding command in Starport takes a long time. I also saw Starport is looking for a solution to add a plugins feature. It will be nice to help users deploy Cosmos blockchain quickly.
What it does
Better Starport dramatically reduces the scaffolding command running time. In addition, it adds plugins support to Starport to allow a user to extend the features of Starport easily. I also add scaffolding for Akash deployment.
How we built it
I investigate the code for the scaffolding speedup, which takes a long time to run. I noticed that generating go proto takes the majority of the time. I believe it is unnecessary to generate go proto whenever users run scaffolding commands. Therefore, I add an option in config.yaml to make generating proto optional during scaffolding. I also add options to turn off go tidy and go fmt, which can also help reduce the command running time.
For the plugins feature, I utilize the go plugin. Each plugin will be a git repo, requiring a main package that implements func NewCmds() *cobra.Command and a Makefile with plugin build command. I also added plugins install and plugins use to Starport. plugins install will read config.yml in the user's project to download and compile plugins. Then users can use plugins use to load and use a specific plugin.
For Akash deployment support, I added Akash docker-compse.yaml and deploy.yaml placeholder templates based on the existing project. I also added a Makefile to enable project build without Starport, since Akash docker image does not have Starport installed.
Challenges we ran into
The main challenge is identifying the root cause of why the Starport scaffolding command is slow.
I also have not worked with the Go plugin before, so I need to experiment with it to ensure it can serve the purpose.
Accomplishments that we're proud of
- Better Starport reduces the scaffolding command run time to under 1 second.
- Starport can support plugins now!
What we learned
- I have not used Starport before. It is exciting to learn how to use Starport to develop the Cosmos app quickly.
- I also have a deeper understanding of Go plugin.
What's next for Better Starport
Currently, the plugins feature is just a POC. It still requires a lot of work to make it more robust.
Built With
- akash
- go
- starport

Log in or sign up for Devpost to join the conversation.