-
Notifications
You must be signed in to change notification settings - Fork 242
Allow configuring initial validators in the HC config #4542
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks reasonable. I will let someone else decide if it's a good idea or not...
I think it would work. The best way to test it I guess would be to replace (part of) the validator config in hyperchains_SUITE with this. However, this adds a third (fourth?) path for configuring validators, there is the web-app, directly through the NPM-thingie, and the directly with json file way already... 🤔 |
Trees3 = initialize_validators(TxEnv, Trees2, initial_validators()), | ||
Trees4 = init_epochs(TxEnv, Trees3, child_epoch_length(), pinning_reward_value()), | ||
aect_call_state_tree:prune(0, Trees4). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order here is debateable, but I guess the idea is to not have an overlap between json and config 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work fine. Executing contracts.json first would keep the flexibility to have a custom contracts and initialize them before adding/initializing the validators from aeternity.yaml. That was my reason picking that order.
The current workflow is indeed: web-app -> hyperchain-kit (CLI) -> contracts.json, while one can directly use the CLI. That would dramatically simplify the process of initializing a Hyperchain, without any additional tools in a single configuration file. Do you have any concerns adding this option in the node? |
038052d
to
a2ed306
Compare
I wonder if I should add |
No, not at all! |
* Allow configuring initial validators in the HC config * Add initial_validators test
No description provided.