frostfsid: Remove old data on update #95

Merged
fyrchik merged 2 commits from fyrchik/frostfs-contract:fix-frostfsid-update into support/v0.19 2024-09-04 19:51:18 +00:00
Showing only changes of commit cdfd7cb028 - Show all commits

View file

@ -73,6 +73,17 @@ const (
func _deploy(data any, isUpdate bool) {
ctx := storage.GetContext()
if isUpdate {
storage.Delete(ctx, "netmapScriptHash")
storage.Delete(ctx, "containerScriptHash")
dkirillov marked this conversation as resolved Outdated

Should we also delete notary key and o prefix?

Should we also delete `notary` key and `o` prefix?

I believe notary was actually removed during the previous update (see support/v0.18 branch)
Added o prefix removal.

I believe `notary` was actually removed during the previous update (see support/v0.18 branch) Added `o` prefix removal.

I don't see we explicitly deleted such key #50/files

Or we just didn't set it?

I don't see we explicitly deleted such key https://git.frostfs.info/TrueCloudLab/frostfs-contract/pulls/50/files#diff-0854a7a4bf47e1957519dccfa5d54a2c5c8d08ee Or we just didn't set it?

common.RmAndCheckNotaryDisabledKey(data, notaryDisabledKey) -- this line was present in the previous release.

`common.RmAndCheckNotaryDisabledKey(data, notaryDisabledKey)` -- this line was present in the previous release.
it := storage.Find(ctx, "o", storage.KeysOnly)
for iterator.Next(it) {
key := iterator.Value(it)
storage.Delete(ctx, key)
}
}
args := data.(struct {
admin interop.Hash160
})