-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Implement native Notary contract #3178
base: master
Are you sure you want to change the base?
Conversation
Close #2896. Use a stub for native Notary contract hash since this contract is not implemented yet. Thus, technically, NotaryAssisted attribute verification will always fail on real network until native Notary is implemented. Signed-off-by: Anna Shaleva <[email protected]>
…ribute Signed-off-by: Anna Shaleva <[email protected]>
Transactions network fee should be split between Primary node and Notary nodes. Signed-off-by: Anna Shaleva <[email protected]>
Signed-off-by: Anna Shaleva <[email protected]>
Once Notary contract is implemented, this hash will be replaced by a proper Notary contract hash. The exact value won't be changed since Notary contract has constant hash as any other native contract. Signed-off-by: Anna Shaleva <[email protected]>
No functional changes, just a refactoring for better code readability. Signed-off-by: Anna Shaleva <[email protected]>
Close #2897. Depends on #3175. Signed-off-by: Anna Shaleva <[email protected]>
Is this PR to be merged now or after next release? |
|
This contract has a
In this method, we verify that Here is an attack vector. A malicious notary can sign as many transactions as it wants and then publish at most 500 txs on chain while If it's not a malicious notary, someone could still get a chance to make the notary sign something multiple times and cache them then publish them at once. By the way, do you know how many core modules will be affected by this |
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.
I am not seeing the part of the code we discussed on Discord, @AnnaShaleva, you mentioned about a delegated powered notary signing.
"The contract itself don't send the transactions. It's a designated Notary node who is powered to send transactions on behalf of notary service users. "
I want to check that because it should be, at least, similar to the oracles design.
Signed-off-by: Anna Shaleva <[email protected]>
No functional changes, just a refactoring. Signed-off-by: Anna Shaleva <[email protected]>
To be able to process existing NeoFS chains that use Notary - yes, it's the last PR. But ideally in future we'd like to implement
It's a part of Notary service plugin. See the example implementation in https://github.com/nspcc-dev/neo-go/blob/master/pkg/services/notary/notary.go. |
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.
as @dusmart said , verify
method should be used with extreme caution. and is there a fork introduced?
That's a valid concern, but there are multiple ways to handle it, we'll get to it after #3175 merge. |
Test the situation described in https://github.com/neo-project/neo/pull/3175/files/00b54ff6d20cc84b435beaa790fe72a9d8f78bec#r1530493475. Signed-off-by: Anna Shaleva <[email protected]>
Signed-off-by: Anna Shaleva <[email protected]>
Updated to fresh master, more tests added. |
No functional changes, I just finally made my code analizer work properly. Signed-off-by: Anna Shaleva <[email protected]>
Co-authored-by: Shargon <[email protected]>
Fetch changes from the fresh master and fix build errors. Signed-off-by: Anna Shaleva <[email protected]>
@neo-project/core, a batch of tests is added, rebased onto fresh master and ready for review. |
me not in favor of this pr but me won't stop other people from liking it however, at least, maintain it as a hardfork same as #3175 |
#3175 is HF-free to me (in that it can't be probed from contracts), but what I've said numerous times about these PRs (and the reason I wanted them in 3.7) is that we want to ensure C# node can process NeoFS chains. We've got two of them: https://github.com/neo-project/neo/blob/master/src/Neo.CLI/config.fs.testnet.json And they can't be processed unless Notary is available (from the genesis for testnet and at some height around a year ago for mainnet). That's why I specifically wanted to have this contract enabled at the genesis block. However, testnet likely can survive another HF enabled at 0 (like it has all of A/B/C at 0 now and it's not a problem). I have an idea about mainnet FS chain as well, luckily it switches to the notary at some height after the Aspidochelone HF, so maybe we can move B/C HF heights retrospectively and if D is to be compatible with FS chain (likely it'll be) then we could arrange safe (for FS chain) enablement of this contract at D. No guarantees, but we'll try to check it. |
Good, then let us check if NeoFS networks are compatible with hardfork-dependent Notary contract. I'll write the results here and update this PR to enable Notary contract starting from the |
Description
Implement native Notary contract.
Close #2425. Depends on #3175 (will rebase this PR after #3175 merge). Tests are in progress, but the code is ready for review.
Type of change
How Has This Been Tested?
Checklist: