Add public key as argument for container_contract.Delete() method #28

Merged
fyrchik merged 1 commit from acid-ant/frostfs-contract:feature/27-cnt-del-add-arg into master 2023-06-16 11:54:53 +00:00
Member

Close #27

Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com

Close #27 Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant requested review from storage-core-committers 2023-06-01 08:37:52 +00:00
acid-ant requested review from storage-core-developers 2023-06-01 08:37:53 +00:00
fyrchik requested review from storage-services-committers 2023-06-01 10:55:22 +00:00
fyrchik requested review from storage-services-developers 2023-06-01 10:55:22 +00:00
fyrchik reviewed 2023-06-01 10:56:50 +00:00
@ -311,3 +311,3 @@
//
// If the container doesn't exist, it panics with NotFoundError.
func Delete(containerID []byte, signature interop.Signature, token []byte) {
func Delete(containerID []byte, signature interop.Signature, token []byte, publicKey interop.PublicKey) {
Owner

What about making it the third parameter (like in Put)?

What about making it the third parameter (like in `Put`)?
Author
Member

Done.

Done.
fyrchik marked this conversation as resolved
acid-ant force-pushed feature/27-cnt-del-add-arg from dc0e6c5e73 to 2da0ff5750 2023-06-01 11:09:18 +00:00 Compare
dstepanov-yadro approved these changes 2023-06-02 07:50:32 +00:00
aarifullin approved these changes 2023-06-05 11:22:00 +00:00
alexvanin requested changes 2023-06-06 08:27:11 +00:00
@ -311,3 +311,3 @@
//
// If the container doesn't exist, it panics with NotFoundError.
func Delete(containerID []byte, signature interop.Signature, token []byte) {
func Delete(containerID []byte, signature interop.Signature, publicKey interop.PublicKey, token []byte) {
Owner

It should break compatibility with current version of the node. For the Neo VM Delete() with 3 arguments and Delete() with 4 arguments are completely different methods.

I suggest to add one more method and reuse the code of Delete() method. See Put() and PutNamed() methods. So newer versions of node will use new method and older versions stick with current Delete() method.

It should break compatibility with current version of the node. For the Neo VM `Delete()` with 3 arguments and `Delete()` with 4 arguments are completely different methods. I suggest to add one more method and reuse the code of `Delete()` method. See `Put()` and `PutNamed()` methods. So newer versions of node will use new method and older versions stick with current `Delete()` method.
Owner

However, if we don't care about compatibility there for some reason, this is okay.

However, if we don't care about compatibility there for some reason, this is okay.
Owner
We can mark it as deprecated and use https://github.com/nspcc-dev/neo-go/blob/master/docs/compiler.md#Overloads .
Owner
We can mark it as deprecated and use https://github.com/nspcc-dev/neo-go/blob/master/docs/compiler.md#Overloads .
Owner

Let's break compatibility because we don't have any public networks to be compatible with.

Let's break compatibility because we don't have any public networks to be compatible with.
alexvanin approved these changes 2023-06-15 10:22:32 +00:00
fyrchik merged commit 2da0ff5750 into master 2023-06-16 11:54:53 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-committers
TrueCloudLab/storage-services-developers
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-contract#28
No description provided.