[TrueCloudLab#3] container: Rename neofs to frostfs

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
Denis Kirillov 2023-01-11 10:49:28 +03:00 committed by fyrchik
parent 4052e4873b
commit 9c004cab2e
4 changed files with 15 additions and 15 deletions

View file

@ -1,4 +1,4 @@
name: "NeoFS Container"
name: "FrostFS Container"
safemethods: ["count", "get", "owner", "list", "eACL", "getContainerSize", "listContainerSizes", "version"]
permissions:
- methods: ["update", "addKey", "transferX",

View file

@ -44,7 +44,7 @@ type (
)
const (
neofsIDContractKey = "identityScriptHash"
frostfsIDContractKey = "identityScriptHash"
balanceContractKey = "balanceScriptHash"
netmapContractKey = "netmapScriptHash"
nnsContractKey = "nnsScriptHash"
@ -113,7 +113,7 @@ func _deploy(data interface{}, isUpdate bool) {
storage.Put(ctx, netmapContractKey, args.addrNetmap)
storage.Put(ctx, balanceContractKey, args.addrBalance)
storage.Put(ctx, neofsIDContractKey, args.addrID)
storage.Put(ctx, frostfsIDContractKey, args.addrID)
storage.Put(ctx, nnsContractKey, args.addrNNS)
storage.Put(ctx, nnsRootKey, args.nnsRoot)
@ -179,7 +179,7 @@ func PutNamed(container []byte, signature interop.Signature,
ownerID := ownerFromBinaryContainer(container)
containerID := crypto.Sha256(container)
neofsIDContractAddr := storage.Get(ctx, neofsIDContractKey).(interop.Hash160)
frostfsIDContractAddr := storage.Get(ctx, frostfsIDContractKey).(interop.Hash160)
cnr := Container{
value: container,
sig: signature,
@ -272,7 +272,7 @@ func PutNamed(container []byte, signature interop.Signature,
}
if len(token) == 0 { // if container created directly without session
contract.Call(neofsIDContractAddr, "addKey", contract.All, ownerID, [][]byte{publicKey})
contract.Call(frostfsIDContractAddr, "addKey", contract.All, ownerID, [][]byte{publicKey})
}
runtime.Log("added new container")

View file

@ -1,5 +1,5 @@
/*
Container contract is a contract deployed in NeoFS sidechain.
Container contract is a contract deployed in FrostFS sidechain.
Container contract stores and manages containers, extended ACLs and container
size estimations. Contract does not perform sanity or signature checks of

View file

@ -31,7 +31,7 @@ func deployContainerContract(t *testing.T, e *neotest.Executor, addrNetmap, addr
args[2] = addrBalance
args[3] = util.Uint160{} // not needed for now
args[4] = addrNNS
args[5] = "neofs"
args[5] = "frostfs"
c := neotest.CompileFile(t, e.CommitteeHash, containerPath, path.Join(containerPath, "config.yml"))
e.DeployContract(t, c, args)
@ -146,14 +146,14 @@ func TestContainerPut(t *testing.T) {
stackitem.NewByteArray([]byte(base58.Encode(cnt.id[:]))),
})
cNNS := c.CommitteeInvoker(nnsHash)
cNNS.Invoke(t, expected, "resolve", "mycnt.neofs", int64(nns.TXT))
cNNS.Invoke(t, expected, "resolve", "mycnt.frostfs", int64(nns.TXT))
t.Run("name is already taken", func(t *testing.T) {
c.InvokeFail(t, "name is already taken", "putNamed", putArgs...)
})
c.Invoke(t, stackitem.Null{}, "delete", cnt.id[:], cnt.sig, cnt.token)
cNNS.Invoke(t, stackitem.Null{}, "resolve", "mycnt.neofs", int64(nns.TXT))
cNNS.Invoke(t, stackitem.Null{}, "resolve", "mycnt.frostfs", int64(nns.TXT))
t.Run("register in advance", func(t *testing.T) {
cnt.value[len(cnt.value)-1] = 10