[BUG] fully_reserved_by_training abort is unreachable on a short segment #2014
Title
fully_reserved_by_training abort is unreachable on a short segment
Summary
The intended guard for a target whose nodes are all training-reserved lives inside the punishable-segment evaluation:
reserved := am.keeper.CollectEpochReservedNodeWeightsBetween(ctx, ch.EpochIndex, ch.StartHeight, finish-1, keeper.ReservationScopeShield) // ... if shielded[ch.Target] > 0 && expected <= 0 { if !rotate && am.keeper.BuildEpochReservationView(ctx, ch.EpochIndex).FullyReservedAt(ch.Target, finish-1) { return am.keeper.MarkChallengeAborted(ctx, ch.Target, "fully_reserved_by_training") }
Because Bug with min punishable window returns before this code, a fully reserved target is never aborted; it is paid instead. The reservation check should run before the duration check (or at create time, see Bug 3).
💬 Comments (2)
solved thank you
🔄 Auto-synced from Issue #2014 every hour.
https://github.com/gonka-ai/gonka/commit/0853195ca2da7bb7553805ba26be9d0fb03ffaf1