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

cmd: add genesis flag to solo, allow specifying a custom genesis file… #682

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

libotony
Copy link
Member

… to solo

Description

This PR added a new flag --genesis to solo, allowing specifying a custom genesis file for starting a solo instance. If not, the default devnet genesis will be applied.

If there is a custom genesis applied to solo, built-in dev accounts will not be funded and the mnemonic words will not be displayed.

Builtin Contract Authority's state will be ignored, solo will use a default master key proposing blocks.

Fixes vechain/protocol-board-repo#158

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Start with thor solo --genesis <file-to-genesis.json> observe the log, test with API

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing E2E tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

@libotony libotony requested a review from a team as a code owner March 25, 2024 15:36
darrenvechain
darrenvechain previously approved these changes Mar 25, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.26%. Comparing base (e8a40c0) to head (14fafb1).
Report is 3 commits behind head on master.

❗ Current head 14fafb1 differs from pull request most recent head 1bb1d81. Consider uploading reports for the commit 1bb1d81 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #682      +/-   ##
==========================================
+ Coverage   57.24%   57.26%   +0.02%     
==========================================
  Files         156      156              
  Lines       17205    17218      +13     
==========================================
+ Hits         9849     9860      +11     
- Misses       6392     6394       +2     
  Partials      964      964              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@libotony libotony removed the next release candidate Ok to merge for next release label Apr 18, 2024
@libotony libotony marked this pull request as ready for review April 18, 2024 13:43
@darrenvechain
Copy link
Member

Hey @libotony I noticed we already have the --network flag to specify a genesis file for custom nets, should we re-use this flag?

@libotony
Copy link
Member Author

Hey @libotony I noticed we already have the --network flag to specify a genesis file for custom nets, should we re-use this flag?

It is a bit different, --network includes mainnet/testnet, I think that will make devs confusion, also the word network is not proper for describing the feature for solo.

@otherview otherview merged commit 351f86c into vechain:master Apr 23, 2024
10 checks passed
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.

4 participants