Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Split parsing of genesis config from creating initial state #209

Merged
merged 21 commits into from
Nov 12, 2018

Conversation

ajsutton
Copy link
Contributor

PR description

Split the responsibility for parsing the content of genesis config from the actual creation if the genesis block and initial world state. Builds on #208

  • GenesisConfig is now two objects GenesisConfigFile and GenesisState. The former is responsible for parsing the config, the latter for acting on it to create state.
  • GenesisConfigFile also provides access to GenesisConfigOptions to access the config section (including consensus settings).
  • CliquePantheonController was incorrectly passing the chain ID as the network ID and the network ID as the number of download threads to use to EthProtocolManager. The simpler config setup made this more obvious so it has been fixed.

ajsutton and others added 20 commits October 30, 2018 06:25
…y in multiple places.

Fix discrepancy in how CliqueProtocolSchedule and CliquePantheonController loaded the block period configuration.
…fig as optionals instead of providing the default.
…e genesis config file and rename GenesisConfig to GenesisState as it is now just responsible for creating the initial state at genesis.
…tely as the GenesisConfigFile is already provided.
…r instead of the chain ID and use downloader parallelism setting instead of network ID for the number of threads.
Copy link
Contributor

@lucassaldanha lucassaldanha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

@ajsutton ajsutton merged commit 5566eb3 into PegaSysEng:master Nov 12, 2018
@ajsutton ajsutton deleted the fix-config branch November 12, 2018 02:42
shemnon pushed a commit to shemnon/pantheon that referenced this pull request Nov 14, 2018
…ng#209)

* Make GenesisConfigFile responsible for handling all the content in the genesis config file and rename GenesisConfig to GenesisState as it is now just responsible for creating the initial state at genesis.

* In CliqueProtocolController, pass the network ID to EthProtocolManager instead of the chain ID and use  downloader parallelism setting instead of network ID for the number of threads.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants