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

Migrate chain mask list config to full shard id list #831

Merged
merged 4 commits into from
Mar 24, 2020

Conversation

lyhe18
Copy link
Contributor

@lyhe18 lyhe18 commented Feb 28, 2020

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

@lyhe18 lyhe18 requested a review from a team February 28, 2020 00:29
quarkchain/cluster/cluster_config.py Outdated Show resolved Hide resolved
quarkchain/cluster/cluster_config.py Outdated Show resolved Hide resolved
quarkchain/cluster/master.py Outdated Show resolved Hide resolved
@hanyunx hanyunx linked an issue Feb 28, 2020 that may be closed by this pull request
Copy link
Contributor

@ninjaahhh ninjaahhh left a 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

@ninjaahhh
Copy link
Contributor

also, can you link this PR to the issue you want to solve?

quarkchain/cluster/cluster_config.py Outdated Show resolved Hide resolved
quarkchain/core.py Outdated Show resolved Hide resolved
quarkchain/core.py Outdated Show resolved Hide resolved
devnet/singularity/cluster_config.json Outdated Show resolved Hide resolved
quarkchain/cluster/master.py Outdated Show resolved Hide resolved
quarkchain/cluster/master.py Show resolved Hide resolved
quarkchain/cluster/rpc.py Outdated Show resolved Hide resolved
@ninjaahhh
Copy link
Contributor

we probably want to merge this to master branch instead of dev

@lyhe18 lyhe18 changed the base branch from dev to master March 8, 2020 22:31
@ninjaahhh ninjaahhh changed the base branch from master to dev March 9, 2020 17:18
quarkchain/cluster/rpc.py Outdated Show resolved Hide resolved
quarkchain/cluster/slave.py Outdated Show resolved Hide resolved
quarkchain/cluster/slave.py Outdated Show resolved Hide resolved
quarkchain/cluster/master.py Outdated Show resolved Hide resolved
@ninjaahhh ninjaahhh force-pushed the fixing_chain_mask_config branch from 33c889f to cc8851c Compare March 12, 2020 05:58
@ninjaahhh ninjaahhh changed the base branch from dev to master March 12, 2020 05:59
@ninjaahhh
Copy link
Contributor

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

@ninjaahhh
Copy link
Contributor

also cc @pingke if we want to make the config json universal regardless of client version

@ninjaahhh
Copy link
Contributor

will update to make the config parsing backward-compatible, i.e. automatically converting chain mask list to full shard id list

quarkchain/cluster/cluster_config.py Outdated Show resolved Hide resolved
quarkchain/cluster/cluster_config.py Outdated Show resolved Hide resolved
@@ -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)
Copy link
Contributor

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

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix chain mask list for slave-shard relationship
4 participants