-
Notifications
You must be signed in to change notification settings - Fork 773
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
Shift networking configuration into configs #4401
Comments
The configurations we need to add are:
So what we need to do, is add these fields into the ChainSpec: https://github.com/sigp/lighthouse/blob/stable/consensus/types/src/chain_spec.rs#L32 We should add them into the networking section here: https://github.com/sigp/lighthouse/blob/stable/consensus/types/src/chain_spec.rs#L165 Then for each of the hard-coded networks, i.e mainnet, put in the default values: https://github.com/sigp/lighthouse/blob/stable/consensus/types/src/chain_spec.rs#L473 For all the networks, just use the defaults listed above. Then for all the places where we have these values being used in the code, replace them with the values from the chain spec. Most places should have access to a generic So for example, the first one is Then in the code that we are using it, like here: https://github.com/sigp/lighthouse/blob/stable/beacon_node/lighthouse_network/src/config.rs#L47 and here: https://github.com/sigp/lighthouse/blob/stable/beacon_node/lighthouse_network/src/config.rs#L457 we need to accept an EthSpec. So, ideally the function could require the generic, i.e pub fn gossipsub_config<TSpec:EthSpec>(...) { ... } It gets used here: so you can pass the TSpec into the function. That should resolve the first one. @pawanjay176 should be able to help with all of these. |
## Issue Addressed Addresses [#4401](#4401) ## Proposed Changes Shift some constants into ```ChainSpec``` and remove the constant values from code space. ## Additional Info I mostly used ```MainnetEthSpec::default_spec()``` for getting ```ChainSpec```. I wonder Did I make a mistake about that. Co-authored-by: armaganyildirak <[email protected]> Co-authored-by: Paul Hauner <[email protected]> Co-authored-by: Age Manning <[email protected]> Co-authored-by: Diva M <[email protected]>
## Issue Addressed Addresses [#4401](#4401) ## Proposed Changes Shift some constants into ```ChainSpec``` and remove the constant values from code space. ## Additional Info I mostly used ```MainnetEthSpec::default_spec()``` for getting ```ChainSpec```. I wonder Did I make a mistake about that. Co-authored-by: armaganyildirak <[email protected]> Co-authored-by: Paul Hauner <[email protected]> Co-authored-by: Age Manning <[email protected]> Co-authored-by: Diva M <[email protected]>
## Issue Addressed Addresses [#4401](#4401) ## Proposed Changes Shift some constants into ```ChainSpec``` and remove the constant values from code space. ## Additional Info I mostly used ```MainnetEthSpec::default_spec()``` for getting ```ChainSpec```. I wonder Did I make a mistake about that. Co-authored-by: armaganyildirak <[email protected]> Co-authored-by: Paul Hauner <[email protected]> Co-authored-by: Age Manning <[email protected]> Co-authored-by: Diva M <[email protected]>
## Issue Addressed Addresses [#4401](#4401) ## Proposed Changes Shift some constants into ```ChainSpec``` and remove the constant values from code space. ## Additional Info I mostly used ```MainnetEthSpec::default_spec()``` for getting ```ChainSpec```. I wonder Did I make a mistake about that. Co-authored-by: armaganyildirak <[email protected]> Co-authored-by: Paul Hauner <[email protected]> Co-authored-by: Age Manning <[email protected]> Co-authored-by: Diva M <[email protected]>
## Issue Addressed Addresses [#4401](#4401) ## Proposed Changes Shift some constants into ```ChainSpec``` and remove the constant values from code space. ## Additional Info I mostly used ```MainnetEthSpec::default_spec()``` for getting ```ChainSpec```. I wonder Did I make a mistake about that. Co-authored-by: armaganyildirak <[email protected]> Co-authored-by: Paul Hauner <[email protected]> Co-authored-by: Age Manning <[email protected]> Co-authored-by: Diva M <[email protected]>
Addresses [sigp#4401](sigp#4401) Shift some constants into ```ChainSpec``` and remove the constant values from code space. I mostly used ```MainnetEthSpec::default_spec()``` for getting ```ChainSpec```. I wonder Did I make a mistake about that. Co-authored-by: armaganyildirak <[email protected]> Co-authored-by: Paul Hauner <[email protected]> Co-authored-by: Age Manning <[email protected]> Co-authored-by: Diva M <[email protected]>
Addresses [sigp#4401](sigp#4401) Shift some constants into ```ChainSpec``` and remove the constant values from code space. I mostly used ```MainnetEthSpec::default_spec()``` for getting ```ChainSpec```. I wonder Did I make a mistake about that. Co-authored-by: armaganyildirak <[email protected]> Co-authored-by: Paul Hauner <[email protected]> Co-authored-by: Age Manning <[email protected]> Co-authored-by: Diva M <[email protected]>
Description
The following consensus PRs shift some of the network constants into the configuration files:
We should move these constants also.
Our configuration setup is located here: https://github.com/sigp/lighthouse/blob/stable/consensus/types/src/eth_spec.rs
We need to modify this to incorporate constants and in the associated code. Please hit me up for further info/help if needed :)
The text was updated successfully, but these errors were encountered: