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

Common: Genesis state logic improved #1755

Closed
wants to merge 1 commit into from

Conversation

cbrzn
Copy link
Contributor

@cbrzn cbrzn commented Feb 28, 2022

This is a very WIP PR that aims to improve the genesis state management in the common library. Open to any feedback just wanted to see what you think

  • State root and hash of genesis block can be passed as GenesisState in attribute customChains
  • Now we show genesis block hash and state root in client process logs
  • Genesis state is now storing storage, nonce, code and balance attributes to work with complex genesis files

Ideas on TODO:

  • Handle geth genesis file format in common
  • Add some examples
  • Study if we can remove the static files in genesisState() method and try to retrieve it from configuration given, this way we can remove a lot of code from Common package

@codecov
Copy link

codecov bot commented Feb 28, 2022

Codecov Report

Merging #1755 (1cecab7) into master (c842a97) will increase coverage by 1.04%.
The diff coverage is 70.00%.

Impacted file tree graph

Flag Coverage Δ
block 85.57% <ø> (ø)
blockchain 83.28% <ø> (ø)
client ?
common 42.53% <70.00%> (-51.38%) ⬇️
devp2p 82.36% <ø> (-0.14%) ⬇️
ethash 90.76% <ø> (ø)
trie 86.18% <ø> (ø)
tx 89.94% <ø> (ø)
util 92.62% <ø> (ø)
vm 81.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@holgerd77
Copy link
Member

This is tackling too many things at once (as written per DM), will close this. Please re-submit separately (first: tests for existing functionality, second: geth genesis inclusion).

@holgerd77 holgerd77 closed this Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants