-
Notifications
You must be signed in to change notification settings - Fork 114
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
Migrate chain mask list config to full shard id list #831
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.
a general rule for submitting PRs: remove unused comments
also, can you link this PR to the issue you want to solve? |
we probably want to merge this to master branch instead of dev |
33c889f
to
cc8851c
Compare
this is a breaking change in terms of how we write the config (not of consensus). please give a review when you have time @qizhou |
also cc @pingke if we want to make the config json universal regardless of client version |
will update to make the config parsing backward-compatible, i.e. automatically converting chain mask list to full shard id list |
@@ -455,7 +497,10 @@ def from_dict(cls, d): | |||
config.QUARKCHAIN = QuarkChainConfig.from_dict(config.QUARKCHAIN) | |||
config.MONITORING = MonitoringConfig.from_dict(config.MONITORING) | |||
config.MASTER = MasterConfig.from_dict(config.MASTER) | |||
config.SLAVE_LIST = [SlaveConfig.from_dict(s) for s in config.SLAVE_LIST] | |||
config.SLAVE_LIST = [ | |||
SlaveConfig.from_dict(s, config.QUARKCHAIN.CHAINS) |
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.
Oh, I think I may point to incorrect config variable (although CHAINS would work), which should be QUARKCHAIN.CHAINS_SIZE
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.
since the backward-compatible conversion only works if shard size per chain is 1, I added an enforcing check as follows
check(all(chain.SHARD_SIZE == 1 for chain in chains))
which needs the whole QUARKCHAIN.CHAINS
config
Add full_shard_id_list to slave to assign the shards it will run. In this case, each slave can run different number of shards.
resolves #826