-
Notifications
You must be signed in to change notification settings - Fork 38
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
morph: use Notary Actor for notary requests submission #2310
Conversation
890bf06
to
961666c
Compare
Checked on the dev-env against the nspcc-dev/neo-go#2955, SNs are able to properly enter the netmap:
|
Codecov Report
@@ Coverage Diff @@
## master #2310 +/- ##
==========================================
+ Coverage 29.94% 30.01% +0.07%
==========================================
Files 400 400
Lines 30269 30205 -64
==========================================
+ Hits 9063 9066 +3
+ Misses 20467 20400 -67
Partials 739 739
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
}...) | ||
|
||
if len(mainTx.Signers) > 3 { | ||
// Invoker signature (simple signature account of storage node is expected). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then a fake one works fine as well, we're only supposed to be adding IR signatures now (we don't have any other cases for now), so we don't care who is the third signer, a correct signature is supposed to be present there anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that to create a proper notary.FakeSimpleAccount(pub)
we need to parse existing verification script to get the pub
out of it. The same problem with multisig account. And I'd like to completely avoid parsing, it's just not needed here and this signer is unesed anyway.
961666c
to
4e52720
Compare
7ed29f9
to
bdc463a
Compare
70e0423
to
51f907c
Compare
Backwards compatibility code is added to the notary preparator.
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>
It's unused and not needed, default fallback lifetime is set by Notary actor. Signed-off-by: Anna Shaleva <anna@nspcc.ru>
51f907c
to
d45e68c
Compare
This PR is a tiny part of neo-go version upgrade.
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.
Refs. nspcc-dev/neo-go#2981.
TODO: