We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
When the node start from 0, HIP30 epoch hasn't been reached yet and the function below will still return shard 2 or 3 instead of 0 or 1
// ShardIDFromKey returns the shard ID statically determined from the input key func (conf *ConfigType) ShardIDFromKey(key *bls_core.PublicKey) (uint32, error) { var pubKey bls.SerializedPublicKey if err := pubKey.FromLibBLSPublicKey(key); err != nil { return 0, errors.Wrapf(err, "cannot convert libbls public key %s to internal form", key.SerializeToHexStr()) } epoch := conf.networkType.ChainConfig().StakingEpoch numShards := conf.shardingSchedule.InstanceForEpoch(epoch).NumShards() shardID := new(big.Int).Mod(pubKey.Big(), big.NewInt(int64(numShards))) return uint32(shardID.Uint64()), nil }
What to expect The shard belonging should be dependent on the latest epoch activation despite where the node has synced so far
The text was updated successfully, but these errors were encountered:
ShardIDFromKey
No branches or pull requests
Describe the bug
When the node start from 0, HIP30 epoch hasn't been reached yet and the function below will still return shard 2 or 3 instead of 0 or 1
What to expect
The shard belonging should be dependent on the latest epoch activation despite where the node has synced so far
The text was updated successfully, but these errors were encountered: