This repository has been archived by the owner on Jun 6, 2023. It is now read-only.
ProveReplicaUpdate messages fail when they include sectors from multiple deadlines #1577
Labels
bug
Something isn't working
change-behaviour
Changes behaviour or state interpretation, necessitating a network version upgrade
P1
High priority, required for basic network functionality and growth
Milestone
The new actors version introduced in the OhSnap upgrade (network version 14) has a bug that prevents "batched"
ProveReplicaUpdate
messages from succeeding if these batches span multiple deadlines.Impact
At the moment, no known Filecoin client proves multiple replica updates in a single message so this bug should not have any impact. Furthermore, "problematic" update batches will fail cleanly so this bug cannot be used to corrupt network state.
Details
specs-actors/actors/builtin/miner/miner_actor.go
Line 2253 in b263592
newSectors
array inspecs-actors/actors/builtin/miner/miner_actor.go
Line 2335 in b263592
Unfortunately, the index (
i
) into thenewSectors
array is from the inner loop. If the message updates a sectors in a single deadline, everything will just "work". However, if a message updates sectors in multiple deadlines, subsequent iterations of the outer loop will overwrite sectors in thenewSectors
array instead of extending it.Fortunately, any such message will fail cleanly when it hits
specs-actors/actors/builtin/miner/miner_actor.go
Line 2351 in b263592
newSectors
array is pre-filled withnil
.newSectors
array. This means the final element in this array will always benil
.sectors.Store
will return an error if any "sector info" in the passed array isnil
.Therefore, any message that attempts to prove replica updates update across multiple deadlines will fail cleanly when it attempts to "write back" the updated sectors.
The text was updated successfully, but these errors were encountered: