Re: topic 87 — confirming the WeavingStates root cause (converges with topic 100)

Hi, following up on topic 87, which is closed so I’m posting here.

VoidDragon’s Oct 4 reply on topic 87 suggested the mechanism may have been misunderstood and pointed to topic 100. I’ve read that thread, including VoidDragon’s Oct 5 diagnosis there: “the core issue is that WeavingStates is not cleared on a successful Merkle tree update — a cached WeavingStates value is re-applied into a new session, duplicating the hash.”

Confirming: yes, that is exactly the mechanism reported in topic 87. The trace at HEAD (pallets/weaver/src/lib.rs):

  • weave_weft (line 403) only replaces WeavingStates when the new strand count strictly exceeds the stored count. Nothing in the pallet ever removes or resets it; on_initialize only reads it (line 496).
  • An honest session 0 finalization therefore leaves {hash: R0, count: 3, next_session: 1} in storage permanently. With an unchanged authority set, no later root can beat count 3.
  • When the next session’s draft finalizes, threshold_reached (line 499) is computed from the stale count, true with zero new attestations, and the stale hash is written into the new session’s LoomState (lines 505-513).
  • The session then never advances: the advance check (line 514) needs next_session != current_session, but both are 1 from here on. No new gatekeeper root can ever be installed. That is the liveness leg.

On how the two reports relate: they share this root cause but stress different legs. Topic 87’s primary impact is the liveness death above, plus an honestly-capped double mint (the receiver is bound in the leaf preimage, so only the original depositor profits, one extra mint per replayed session). Topic 100’s leg is the replay-guard key scoping in pull_thread, which lets the same proof re-mint under every session holding the carried-forward root. Clearing WeavingStates on finalization kills the shared root cause; the key-scoping fix in topic 100 is still needed for its own leg.

So on the question from topic 87: the issue is actionable, and the mechanism is the one diagnosed on topic 100.

Shahmeer

I have no idea why your previous post was removed, but I remember it.

Could you take a look at the last response in topic 100 please? Does it partially fix issue in your report?

Hi. I read the latest response on topic 100. Short answer: no, not for this report’s primary leg.

Topic 100’s proposed fixes are pull_thread-scoped: requiring session to equal CurrentWeavingSession before verifying, and rekeying PulledThreads on proof identity instead of the caller-supplied session. Both kill the replay-mint path — topic 100’s unlimited leg and our honestly-capped double-mint leg.

Neither touches the WeavingStates lifecycle that our liveness leg rests on. weave_weft still only replaces the stored state when the new strand count strictly exceeds the stored count, on_initialize still only reads WeavingStates, the stale hash still gets written into the new session’s LoomState, and the advance check still stalls with next_session equal to current_session. No new gatekeeper root can ever be installed after the first finalization. That liveness death is fully intact under topic 100’s fixes.

So the two reports converge on the mint side and diverge on liveness. Clearing WeavingStates at finalization is still required, which is this report’s fix and primary impact.

Shahmeer