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

testcase: use the output of vochain.NewGenesis to start a chain #586

Open
randomshinichi opened this issue Jul 19, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@randomshinichi
Copy link
Contributor

dvotecli genesis/vochain.NewGenesis() outputs a valid genesis.json (where Tendermint JSON wants integers represented as strings) but its output is never used in integration tests to spin up a node.

As a result, https://github.com/vocdoni/vocdoni-node/blob/master/vochain/genesis.go has invalid JSON where some integers are formatted as integers and some integers are formatted in the tmjson style (integers as strings). Unfortunately this breaks consensus which is why we haven't done this yet.

2 possible solutions:

  • define genesis not as a hardcoded json, but as a struct, which will then be used to directly run the node, or formatted into a json for external use (e.g. integration tests which require a json)
  • Have a test case which uses the output of dvotecli genesis to start a chain (slow)
@randomshinichi randomshinichi added the bug Something isn't working label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant