Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] use the same binary on multiple filecoin networks #6376

Open
coryschwartz opened this issue Jun 2, 2021 · 2 comments
Open
Assignees
Labels
P2 P2: Should be resolved

Comments

@coryschwartz
Copy link

Is your feature request related to a problem? Please describe.

The lotus binary can only built for a single network. This fact complicates lotus distribution and or limits the ability to join other networks when binaries are installed through a distributed package.

  • Docker images must be tagged with the filecoin network even when built from the same code version ( https://hub.docker.com/r/travisperson/lotus/tags?page=1&ordering=last_updated)
  • 1-click digitalocean images are only usable on mainnet, even though it would be useful for people to be able to use the image to develop new applications.
  • 1-click amazon AMIs require multiple images for the same code version.
  • Pre-built binaries would only work for one network.
  • Lotus availability through package managers (oh, snap! #6202) would only work for a single networks.

Describe the solution you'd like
We can simplify the process of building and distributing packages and ease a little of the pain for daap developers by using the same binary to run on multiple networks. Prior art can be seen everywhere, for example:

  • geth --networkid value
  • bitcoin-qt -testnet
  • CHIA_ROOT="~/.chia/testnet" chia start all

I suspect we can do this easily by implementing getters for network parameters.I wrote a proof-of-concept PR here #6354 . This PR removes various build flags used for building different networks, unexports the const parameters, and re-exports a NetworkParams object with getters for those same params. In this implementation, the network is selected based on an environment variable, which seems reasonable to me, but it could be implemented with a command-line flag instead if there is a preference for that.

Describe alternatives you've considered

Alternatively, network parameters could be passed by configuration file

Additional context

@BigLep
Copy link
Member

BigLep commented Jun 7, 2021

@coryschwartz : I assigned this issue to you and put on the board. In light of the new direction we're moving to for Filecoin/Lotus reviews, can you get your PR reviewed by someone else on your team before we block waiting for a maintainer?

@f8-ptrk
Copy link
Contributor

f8-ptrk commented Jun 9, 2021

we had a discussion about this feature and the "risks" it arries in another ticket, i'll see if i can find it

if the binary overrides the .lotusminer repo without user interaction please put this on hold - it's dangerous!

[edit]

#5508

@jennijuju jennijuju added P2 P2: Should be resolved and removed hint/needs-triaging labels Jun 14, 2021
@jennijuju jennijuju added this to the v1.11.x milestone Jun 14, 2021
@jennijuju jennijuju removed this from the 1.11.1 milestone Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 P2: Should be resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants