Feature/random sc#899
Conversation
Release v1.291.0
- BuyEntropy: add missing else branch so invalid inputs (bad tier, zero/oversize bits, underpaid fee) refund the full invocation reward instead of silently keeping it. - END_TICK: move reveals.set(..., zeroReveal) out of the a no-show aren't permanently locked out.
Release v1.292.0
Change BuyEntropy_output.entropy from Array<bit_4096,32> to a single bit_4096, copy the first numberOfBits bits, and refund any payment beyond numberOfBits*100 instead of silently keeping it. Co-Authored-By: N-010 <N-010@users.noreply.github.com>
Rework the collateral lifecycle so a provider's stake stays locked from commit until they reveal: - refund the stake on a valid reveal, slash (burn) it on a no-show - reject an empty commit before any state change to avoid double refund - stop paying silent providers from the treasury at END_TICK Adds lockedCollateralAmounts and revealedThisTickFlags state, and gtests covering the collateral lifecycle.
cf127d3 to
d7968d6
Compare
edit: this version refunds everyone on empty tick. |
@ThatsNotMyCode Thx for your alternative.
The whole reason for adding the second flag in this commit was precisely to distinguish "did someone commit this tick" from "did someone reveal this tick". @come_from_beyond called out that they are not the same signal. |
|
Alternative that preserves fresh committers during empty tick... Edit: updated based on your comment |
Thanks for iterating. Two issues with this version:
The correct discriminator is
Empty-tick detection on If you actually want refund-everyone semantics, that's defensible too, but it's the opposite of preserving fresh committers — we should agree on the design intent first, then write code that matches it. |
No description provided.