#dusk Picking deterministic sortition-the actual selection algorithm underneath staking
A generator can't know, two blocks from now, who's about to out-earn them.
Not because the process rolls dice.
It doesn't.
Every part of it is fully deterministic.
It's that the numbers determinism depends on haven't been created yet.
Let me explain.
I kept writing weighted by stake, but unpredictable in my earlier posts without ever explaining what actually is that.
A commenter asked in the replies how selection really works under the hood, so I went back to find the actual algorithm from he Mechanism docs, instead of repeating the same vague as everyone else.
The selection process is called deterministic sortition.
Here's the mechanism ⚙️.
Selection walks down the list of eligible provisioners in order.
Each one's stake gets checked against a score. Meet or beat it, you're in, credit assigned.
Fall short, your stake gets subtracted from the score, and the next provisioner in line gets checked instead.
The score itself comes from hashing four things together:
The previous block's seed, the current round, the current step, and which credit number is being handed out.
Feed it the same four inputs twice, you get the same score twice.
That's the deterministic half.
The unpredictable half is the seed.
Each block's seed is the generator's own signature on the seed before it.
Nothing about tomorrow's seed exists until tomorrow's generator actually signs it.
You can't front-run a number that hasn't been produced yet.
One more detail worth sitting with:
winning a credit costs you 1 DUSK of weight for the next extraction in that same round.
Small number, but it means a single enormous staker can't just sweep every credit in a committee outright.
The math leans, slightly, toward spreading it around.
I'm Curious whether that 1 $DUSK nudge actually does anything for a staker sitting on millions, or whether it's a rounding error dressed up as fairness
@Dusk
A generator can't know, two blocks from now, who's about to out-earn them.
Not because the process rolls dice.
It doesn't.
Every part of it is fully deterministic.
It's that the numbers determinism depends on haven't been created yet.
Let me explain.
I kept writing weighted by stake, but unpredictable in my earlier posts without ever explaining what actually is that.
A commenter asked in the replies how selection really works under the hood, so I went back to find the actual algorithm from he Mechanism docs, instead of repeating the same vague as everyone else.
The selection process is called deterministic sortition.
Here's the mechanism ⚙️.
Selection walks down the list of eligible provisioners in order.
Each one's stake gets checked against a score. Meet or beat it, you're in, credit assigned.
Fall short, your stake gets subtracted from the score, and the next provisioner in line gets checked instead.
The score itself comes from hashing four things together:
The previous block's seed, the current round, the current step, and which credit number is being handed out.
Feed it the same four inputs twice, you get the same score twice.
That's the deterministic half.
The unpredictable half is the seed.
Each block's seed is the generator's own signature on the seed before it.
Nothing about tomorrow's seed exists until tomorrow's generator actually signs it.
You can't front-run a number that hasn't been produced yet.
One more detail worth sitting with:
winning a credit costs you 1 DUSK of weight for the next extraction in that same round.
Small number, but it means a single enormous staker can't just sweep every credit in a committee outright.
The math leans, slightly, toward spreading it around.
I'm Curious whether that 1 $DUSK nudge actually does anything for a staker sitting on millions, or whether it's a rounding error dressed up as fairness
@Dusk
