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

Created on 27 Jan 2021  路  13Comments  路  Source: neo-project/neo

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

discussion

Most helpful comment

I can make a plugin for this problem using https://github.com/neo-project/neo/pull/2101 if you want

All 13 comments

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.

I can make a plugin for this problem using https://github.com/neo-project/neo/pull/2101 if you want

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.

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

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 https://github.com/neo-project/neo/pull/2272

I prefer to add a HelperContract to deal with it.

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 ?

How do you delete the partial signatures in a contract?

@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).

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.

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.

Exactly. @shargon .

Maybe just one of the signers paying may be enough.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

realloc picture realloc  路  4Comments

igormcoelho picture igormcoelho  路  4Comments

shargon picture shargon  路  4Comments

igormcoelho picture igormcoelho  路  3Comments

lock9 picture lock9  路  4Comments