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

Should we change the way for multi commitee signatures when voting for an Oracle validator or a State Validator? #2269

Open
superboyiii opened this issue Jan 27, 2021 · 13 comments
Labels
Discussion Initial issue state - proposed but not yet accepted

Comments

@superboyiii
Copy link
Member

Summary or problem description
Now we're using multi signature mechanism in the RoleManagement mehod DesignateAsRole. So there's a issue that it means we have to collect 11 committees to vote an address as one of the Roles. It doesn't make sense becasue the first one has to send the incomplete signature to the second one, the second one sends to the third one....until the 11th one signs and relays it. How can we do that? Online or offline? How can we ensure the content is not be modified or how to avoid duplicated signature. It's a very complex way and not easy to do. Especially the committees don't know each other and don't know how to send it to the others.

So I think we'd better find another feasible way for multi-signature senarios. I know @roman-khimov is working on this on neo-go and already has a solution. Maybe we can have a look at his way.
@erikzhang @shargon

@superboyiii superboyiii added the Discussion Initial issue state - proposed but not yet accepted label Jan 27, 2021
@shargon
Copy link
Member

shargon commented Jan 27, 2021

Duplicate signature won't work, because CheckMultisignature already checked this. But it is the same problem as Oracle. We decided to sign it offline, @roman-khimov already proposes to create a P2P message to relay this signature, now it is easier to do it with a plugin.

@shargon
Copy link
Member

shargon commented Jan 27, 2021

I can make a plugin for this problem using #2101 if you want

@roman-khimov
Copy link
Contributor

#1573. It is designed more for automated signing, but in this particular case if all parties agree on the contents of transaction (and it shouldn't be that hard, it will probably be discussed off-chain and then when transaction is created anyone can test-invoke it and see what it does) then they can independently send a request to the Notary service with the same main transaction and it will do the magic needed.

@shargon
Copy link
Member

shargon commented Jan 27, 2021

if we want to use the plugin for every one, we can't, because his signature need to be whitelisted

@ZhangTao1596
Copy link
Contributor

ZhangTao1596 commented Jan 27, 2021

Why not collect signatures in RoleManager contract? Every committee member can invoke the contract with their signature, once more than half committee inovked we can get the result.
This is the draft #2272

@Tommo-L
Copy link
Contributor

Tommo-L commented Jan 27, 2021

I prefer to add a HelperContract to deal with it.

@shargon
Copy link
Member

shargon commented Jan 27, 2021

With a contract, it could be expensive, and slower, with a plugin it could be faster but limited to white list address. What do you think @erikzhang ?

@erikzhang
Copy link
Member

How do you delete the partial signatures in a contract?

@vncoelho
Copy link
Member

vncoelho commented Jan 27, 2021

@shargon @roman-khimov,
As you know, I like this discussion a lot.

I think that it is of great importance that we have a plugin that manage multi signatures aggregation.

  1. Initially, from the committee side, they will just send the transaction incomplete to a node that has this plugin enabled.
    The node will then aggregate the signatures and when ready relay the transaction automatically.

In a more advance view:

  1. We can have the P2P working for it, then nodes that have this plugin enabled will naturally rebroadcast the incomplete transactions as well, filling their mempool with a limited amount of it (that will also expire within a couple of time if not finalized).

@ZhangTao1596
Copy link
Contributor

ZhangTao1596 commented Jan 27, 2021

How do you delete the partial signatures in a contract?

Add height expiration and clear them in OnPersist. Only committee invoking in the same time period like 1 day will work.

@shargon
Copy link
Member

shargon commented Jan 28, 2021

I think that If people pay for store it, it could be there, also there could be a clean method for remove transactions according to validUntilBlock.

@vncoelho
Copy link
Member

Exactly. @shargon .

Maybe just one of the signers paying may be enough.

@vncoelho
Copy link
Member

vncoelho commented Feb 4, 2021

Talking to @snowypowers we discussed about Voting. This discussion provided gave some insights.

Perhaps the committee could just vote in a single signature manner in order to elect members of Oracle and StateService.
That would make their role simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants