-
Notifications
You must be signed in to change notification settings - Fork 37
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
fix/Notary request tracking #2459
fix/Notary request tracking #2459
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2459 +/- ##
==========================================
+ Coverage 29.44% 29.47% +0.03%
==========================================
Files 399 399
Lines 30410 30432 +22
==========================================
+ Hits 8954 8971 +17
- Misses 20713 20717 +4
- Partials 743 744 +1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
b38126b
to
414934f
Compare
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.
Does it really close #2315? How about someone (an IR node) sending an epoch update prematurely?
@roman-khimov, TBH, yesterday I figured out that it was not a problem at all. Yes, we parse every notary request and are ready to sign each of them but not every method has a handler and a parser for it: e.g. our beloved But why have I added the last commit then? I still think that |
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.
Otherwise LGTM.
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.
We've discussed and came to the solution that transctions cache isn't needed and can be removed. The only purpose of this cache is to filter out notary requests that were sent by the alphabet node itself. Instead of this we can add a check for notary request: the second signer of fallback transaction shouldn't be the committee member.
Disadvantage of this approach is that we have to always keep the list of committee members up-to-date. It can be reached with RPC-based cache (but then a lot of getcommittee
RPC requests are expected) or with cache that is subscribed to the committee updates (we need to add some code to our cache than).
@roman-khimov, what do you think?
Do you mean
So is it a node key that is a problem of is it a whole committee that is a problem? What if SN uses the same key as some IR node? Hi, neo-project/neo#2763, anyway. |
Yes.
But is it possible? I thought that SN and IR are always different antities with different accounts. If not, then the described way isn't workable. |
Nothing technically prevents SN from using the same key as IR. |
Public structs that implement public interfaces with constructors that return interfaces instead of structs; and all of that is in a one package only. Not a part of best practices. Signed-off-by: Pavel Karpy <[email protected]>
Missing attribute type does not allow to hash the entire TX. Signed-off-by: Pavel Karpy <[email protected]>
Allows skipping any checks if notary request has been received the second time (every request always returns back). Signed-off-by: Pavel Karpy <[email protected]>
Notary requests can be sent by anybody who has GAS and knows how an Alphabet node parses them. Add predefined allowed events on notary request parsing level. Closes nspcc-dev#2315. Signed-off-by: Pavel Karpy <[email protected]>
414934f
to
4fd9775
Compare
Closes #2315