Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to adopt the new notary actor API #2955

Closed
notimetoname opened this issue Mar 28, 2023 · 1 comment
Closed

Not able to adopt the new notary actor API #2955

notimetoname opened this issue Mar 28, 2023 · 1 comment
Assignees

Comments

@notimetoname
Copy link

notimetoname commented Mar 28, 2023

Context

Trying to update notary API in the neofs-node and can't receive new notary requests via WSClient subscription mechanism. I do not change any subscription code, do not change any contracts code, do not update neo-go version, just a deprecated API -> new API adoption. Signers of a notary requests are 1. Proxy contract, 2. Alphabet multi-signature, 3. request invoker (SN in practice).

No errors are returned after Notarize call, and no errors found in neo-go logs. Also tried to remove any filters in the subscription (to receive every new notary request) and still no desired requests.

SN logs after Notarize:

▶ docker logs s01 2>&1 | grep "notary request invoked"      
2023-03-28T16:47:46.561Z        debug   client/notary.go:482    notary request invoked  {"method": "addPeer", "valid_until_block": 100, "fallback_valid_for": 40, "tx_hash": "9d279365e4c88e5cb219acb02db3010224a955d51604551a41514cd35da2c39e"}
2023-03-28T16:47:50.513Z        debug   client/notary.go:482    notary request invoked  {"method": "addPeer", "valid_until_block": 100, "fallback_valid_for": 40, "tx_hash": "712a1124ffd73471ca4522cd66e55b3bb4d874be141c5b28f3e331bd2a6c0cfd"}
2023-03-28T16:55:19.319Z        debug   client/notary.go:482    notary request invoked  {"method": "addPeer", "valid_until_block": 600, "fallback_valid_for": 40, "tx_hash": "a425b4d3e205896831d49fd1962ddc52575060ac051f2274bc1a92f9ff7e0810"}

neo-go logs at the same time:

2023-03-28T16:47:50.512Z        DEBUG   processing rpc request  {"method": "submitnotaryrequest", "params": "[ANSHfHCmkpkAAAAAAFZXqwEAAAAAsQAAAANfH+TIGs52hlVR9dZiozSKRA5xlQDYzFqQTVJvyabKtVugLJpv54nJVoA77DUxEZu6123QRJILDebDGU/hwQABIgE5ERHAHwwYc3RhcnRDb250YWluZXJFc3RpbWF0aW9uDBTpFGiNtejGWapJ+UofpCKWWtqmMEFifVtSAw
AAQgxA5X14oIwm3ZO2E7+MifrJxfvBqq6QPbX+g2GqBpF5tvCDUrCdmj1It7GrIQJdy2C2rp7BIRsn5UiThnOzxBZnCyoRDCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcIRQZ7Q3DoAAADuzh6lAAAAAAAAAABu/roAAAAAALEAAAACO+w1MRGbutdt0ESSCw3mwxlP4cEA7p6iLCfjS9AUj8QQjgj3To9QSLIAAyIAIGoAAAAhMmzUUh9tPTRhCIvWlVXeVPtu0XyV4fcH2K88Keh23vQBQAJCDEAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIMQHEt+HHK9p77Zwy3sDIumIrr1hvFf7RA6LwISVOWdPmBI06Zi38ddnFX2HzIRYLdokBhlqokCnfJS4imwTsZLt8oDCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcJBVuezJ0IMQBRRhTkFQWvtF8QnHGPK6TFJmIE29lnvb4Vd9a9aHn1/9aUr7LEd0X8sL6twkUTYwySw/+/RTmsMz26PZmKDe2
8oDCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcJBVuezJw==]"}
2023-03-28T16:47:50.512Z        DEBUG   processing rpc request  {"method": "submitnotaryrequest", "params": "[AKlvsSjYBj8AAAAAAF45VwIAAAAAsQAAAARfH+TIGs52hlVR9dZiozSKRA5xlQDYzFqQTVJvyabKtVugLJpv54nJVoDGoG1Va1eLawTr6fkswnM6G2YH0IA77DUxEZu6123QRJILDebDGU/hwQABIgLRDKgKIQOMhilZ5WtD4g95GHxP6eC8fIxmwWA+bPDsf4erawjcNR
IjL2RuczQvczA0Lm5lb2ZzLmRldmVudi90Y3AvODA4Mi90bHMSHy9kbnM0L3Mw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bItwYdpvhKxsTaoA77DUxEZu6123QRJILDebDGU/hwQABIgKsDIMKIQIrtAQcUNYH/4cd7H5M13eDiODqaEnYTMvZqo8y4WqBMR
IfL2RuczQvczAxLm5lb2ZzLmRldmVudi90Y3AvODA4MBoZCgpVc2VyLUFnZW50EgtOZW9GU1wvMC4zMxoTCglVTi1MT0NPREUSBlJVIE1PVxoLCgVQcmljZRICMjIgARHAHwwHYWRkUGVlcgwU9DDwkReTdC0s59dN+IjvNWLK5itBYn1bUgQAAAAqEQwhArNiK/QBe9/jF8WK7V9MdT8ga324lgRvp9d0u8S/f43CEUGe0Nw6QgxAbkGqrmdBHJLUBD2YgzFZ+KCa3gctOeDLFrbpqbFBYq/ggPrQCb3gB56ZfTI8MXKRtp
xYLkZNw7FEkx3qXAye5igMIQIrtAQcUNYH/4cd7H5M13eDiODqaEnYTMvZqo8y4WqBMUFW57MnAAAAUe6JkAAAAAAAAAAAbv66AAAAAACxAAAAAjvsNTERm7rXbdBEkgsN5sMZT+HBAM5nr0fZFXAUyNsi3Bh2m+ErGxNqAAMiACBqAAAAIf0MbCq9MePzKFscFL502LQ7W+VmzSJFynE01/8kESpxAUACQgxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAABCDECUmN9IKC1TWdIuaiWFDxc4acqGi4AIe2KrN/umIupELd/XBMmpL4k+dSjG9LRuoXc6pjtkUIzDaghlpkiUE0lDKAwhAiu0BBxQ1gf/hx3sfkzXd4OI4OpoSdhMy9mqjzLhaoExQVbnsydCDEDoALkocfSvvmwbYXOmCbas8Bh9bOxI6LlIjgWJ+EU+jkXnZzKuLr1OPgMfaq4bxLwcUyZpTjDsxecBQMQT6zhnKAwhAiu0BBxQ1gf/hx3sfkzXd4OI4OpoSdhMy9mqjzLhaoExQVbnsyc=]"}
2023-03-28T16:47:50.512Z        DEBUG   processing rpc request  {"method": "submitnotaryrequest", "params": "[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ThoxuascYhu0deMPpKsQLDQVbnsyc=]"}

4 requests from 4 nodes, no errors.

At the same time, sending notary requests works just fine: epochs do tick.

NOTE: I DO consider that I could have adopted the new API wrong. If it is my fault, I would like to ask to expand comments/docs/etc cause I have not solved my problem and do not know how to localize the error without any additional help now.

Steps to reproduce:

  1. Checkout demo neofs-node (that is the current master with demo commit only);
  2. Build necessary images: make bin/neofs-node image-dirty-storage bin/neofs-ir image-dirty-ir i expect it to be 0.35.0-96-g5bbfb13b tagged (depending on your local tags state);
  3. Checkout demo neofs-devenv (i expect a reader to be familiar with it and be able to run it (no macOS, filled /etc/hosts, etc));
  4. Run devenv: make up/basic;
  5. See an empty netmap (it means no addPeer notary requests have been caught by the Alphabet nodes);
▶ neofs-cli netmap snapshot -g -r s01.neofs.devenv:8080     
Epoch: 7
  1. Have fun.
@AnnaShaleva AnnaShaleva self-assigned this Apr 14, 2023
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 18, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.
@AnnaShaleva
Copy link
Member

The reason is that Notary actor do not add "dummy" witness for multisignature account if no witness can be provided. And the old neofs-node code does (it was the old way of submitting notary requests). See the 7-th step of the documentation, the right way to construct incomplete multisignature witness with no known signatures is to leave it empty (as the Notary actor does).

So the problem is on neofs side.

@AnnaShaleva AnnaShaleva closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2023
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 19, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 19, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 19, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 19, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 20, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 20, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 20, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 21, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
AnnaShaleva added a commit to nspcc-dev/neofs-node that referenced this issue Apr 21, 2023
And adjust the way how newly-created SN notary request is defined.
Notary actor doesn't fill dummy witness for multisignature account
(and that's the way how the system is supposed to function, see
the documentation 7-th instruction at
https://github.com/nspcc-dev/neo-go/blob/master/docs/notary.md#2-request-submission).
Thus, to check the request was just received from the storage node
we must ensure the inner ring witness has empty invocation script.

That was the reason of nspcc-dev/neo-go#2955.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants