-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Shard count recap and discussion #2033
Comments
Another con for downsizing is application level complexity. Dapps will know when and how to migrate |
yeah, I'd prefer this as well |
Regardless of what path we take, I do think that there are things we can do to make phase 1 more friendly to changing shard count. Particularly, currently we compute the start shards of historical epochs by starting from So I propose instead, we store a variable This lets us modify shard counts nearly seamlessly; the only issue is that at a shard count change boundary a shard might occasionally be skipped and have to wait for the next cycle (1-64 slots), which is a small cost in any case. |
We had some dicussions during previous PR reviews. This issue is a recap for discussing phase 1 shard count setting strategies.
Based on #2027 changes
Previous research:
k
andN
active validators, @vbuterin proposed three solutions:k = 135
, setshard_count = N/k
shard_count = 100
, setk = N/shard_count
k = shard_count = sqrt(N)
Note that the committee selection algorithm was very different from now.
Status-quo
TARGET_COMMITTEE_SIZE
MAX_SHARDS := 2**10
as the upper bound of shard count.INITIAL_ACTIVE_SHARDS := 2**6
as the initial number of shards.get_active_shard_count
that returnsINITIAL_ACTIVE_SHARDS
.TBD
1. Dynamic shard count or fixed shard count (only update by hard forks)
N
active validators forE
epochs, increase shard count toN // (SLOTS_PER_EPOCH * TARGET_COMMITTEE_SIZE)
.P
, increase shard count.MAX_SHARDS
in the spec.2. Do we downsize shard count if a large number of validators become inactive?
If we go with dynamic shard count, it's also possible to "freeze" the shards with the lowest gasprice when we have a low validator participants rate.
TARGET_COMMITTEE_SIZE
is fixed now, lacking enough validators results in infrequent crosslinking for all shards.3. Initial shard count
64
initial shards.I personally hope to make it simple (i.e., fixed shard count only increase shard count with hard forks), but also hope to hear more ideas. 🙂
The text was updated successfully, but these errors were encountered: