-
Notifications
You must be signed in to change notification settings - Fork 157
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
Network selection and protocol upgrades should be handled at runtime #1402
Comments
@q9f is there more info to this issue? |
Yes, let me add some pointers. Filecoin does have different networks for mainnet and testing and these networks have different network versions ("hard forks" or "protocol upgrades"). Currently, there is no easy way to configure a filecoin network for the forest client. Instead, we have compile-time features that enable certain chain specifications:
(See Makefile for examples.) This is not optimal, it results in different binaries for different network specifications. Now, the ultimate goal of abstraction should be:
E.g.:
Or:
Or:
These are just ideas rather than expectations. I hope this clarifies what this issue is about. |
Take a look at the calibnet pr to see how it is currently done: #1370 |
This probably involves major refactoring. Related to #1396, we should be able to transition over network upgrades, sync from genesis, and eventually, allow for dynamic specification of chains. This would allow us to add support for any past and upcoming testnet by simply providing a |
Some remarks: If env var Also if a config file is present in cwd then this file should/could take precedence. To sum-up parameters resolution could work as follows:
To select a chain/network type, cli parameter
The existing parameters of today like
Some questions: Also we could have the network/chain configuration where genesis block is created from the same
See https://docs.filecoin.io/build/local-devnet/#manual-set-up. |
We should default to
No, this would be confusing for users. If a different config were to be used, it should be explicitly overridden by some kind of
The order should be:
Not sure what
Yes, if possible one config per chain specification.
That would be amazing! 👍 |
This was an old attempt at doing $XDG_CONFIG_HOME without $XDG_CONFIG_HOME lol I think we should break off from |
instead of compile-time; one binary should be able to handle all configurations.
Adding here some sub-tasks:
calibnet
/mainnet
selection via a cli flagoptional include of genesis bytes for builtin networkThe text was updated successfully, but these errors were encountered: