Host crash after updating to 1.5.5-rc1
BUG REPORT
If the host has sector updates in their contractmanager.wal after shutting down the node will crash when updating to v1.5.5-rc1
Stack Trace or error message
[server is unable to create the Sia node; unable to create host; [error during contract manager startup; error while loading the WAL at startup; failed to recover WAL: error loading WAL json: json: cannot unmarshal array into Go struct field sectorUpdate.SectorUpdates.ID of type contractmanager.sectorID]; [error while loading the WAL at startup; failed to recover WAL: error loading WAL json: json: cannot unmarshal array into Go struct field sectorUpdate.SectorUpdates.ID of type contractmanager.sectorID]]
ERROR: [server is unable to create the Sia node; unable to create host; [error during contract manager startup; error while loading the WAL at startup; failed to recover WAL: error loading WAL json: json: cannot unmarshal array into Go struct field sectorUpdate.SectorUpdates.ID of type contractmanager.sectorID]; [error while loading the WAL at startup; failed to recover WAL: error loading WAL json: json: cannot unmarshal array into Go struct field sectorUpdate.SectorUpdates.ID of type contractmanager.sectorID]]
contractmanager.wal
{
"Header": "Sia Contract Manager WAL",
"Version": "1.2.0"
}{
"ErroredStorageFolderAdditions": null,
"ErroredStorageFolderExtensions": null,
"StorageFolderAdditions": null,
"StorageFolderExtensions": null,
"StorageFolderRemovals": null,
"StorageFolderReductions": null,
"UnfinishedStorageFolderAdditions": null,
"UnfinishedStorageFolderExtensions": [],
"SectorUpdates": null
}{
"ErroredStorageFolderAdditions": null,
"ErroredStorageFolderExtensions": null,
"StorageFolderAdditions": null,
"StorageFolderExtensions": null,
"StorageFolderRemovals": null,
"StorageFolderReductions": null,
"UnfinishedStorageFolderAdditions": null,
"UnfinishedStorageFolderExtensions": null,
"SectorUpdates": [
{
"Count": 1,
"Folder": 1738,
"ID": [
89,
161,
200,
93,
202,
69,
22,
213,
246,
9,
75,
106
],
"Index": 29820
}
]
}
In v1.5.4 sectorID
marshals to an array, in v1.5.5 sectorID
marshals to a string from this change e6b5910c. Manually updating contractmanager.wal lets the host start.
How to reproduce it (as minimally and precisely as possible)
Perform an unclean shutdown on an active host running v1.5.4 then update to the RC
Environment
- Sia version: v1.5.5-rc1
- OS: Linux
Edited by Nate