prysmaticlabs / prysm

Go implementation of Ethereum proof of stake
https://www.offchainlabs.com
GNU General Public License v3.0
3.47k stars 1.01k forks source link

Enforce Max Committees per Slot #579

Closed terencechain closed 6 years ago

terencechain commented 6 years ago

getCommitteeParams has a bug. The max number of committees per slot should be bounded by the total number of shards. The max committees per slot should also be bounded by total number of shards divide cycle length.

From 2.1 spec:

min(len(avs) // CYCLE_LENGTH // (MIN_COMMITTEE_SIZE * 2) + 1, SHARD_COUNT // CYCLE_LENGTH)

Here is the line that needs to change: https://github.com/prysmaticlabs/prysm/blob/master/beacon-chain/casper/sharding.go#L62

prestonvanloon commented 6 years ago

@IvanTheGreatDev Are you working on this?

0xKiwi commented 6 years ago

Yes, I made a solution a while back but no one looked at it, you can see the commit mentioned earlier. Should I PR it?

On Tue, Oct 9, 2018, 6:31 AM Preston Van Loon notifications@github.com wrote:

@IvanTheGreatDev https://github.com/IvanTheGreatDev Are you working on this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/prysmaticlabs/prysm/issues/579#issuecomment-428142658, or mute the thread https://github.com/notifications/unsubscribe-auth/AF9j9p5rkmGhXjAFV9qIiW5fSn0V4Ir5ks5ujHsDgaJpZM4W7n4Z .