paritytech / polkadot

Polkadot Node Implementation
GNU General Public License v3.0
7.12k stars 1.58k forks source link

Multisig is not flexible enough - Multisig pallet #2270

Open RainFallsSilent opened 3 years ago

RainFallsSilent commented 3 years ago

From pallet-multisig, I found that the second and thereafter signature of one multi-sig transaction must provide TimePoint:

pub struct Timepoint<BlockNumber> {
    /// The height of the chain at the point in time.
    height: BlockNumber,
    /// The index of the extrinsic at the point in time.
    index: u32,
}

This means that we need to wait for the block with the previous transaction to be connected to the blockchain before we can sign the transaction. I think this will increase the difficulty of the operation and reduce the speed of signing transactions. I want to complete the entire multi-sig transaction offline, if there is any scheme that does not require Timepoint for signing multi-sign transactions?

bkchr commented 3 years ago

Cc @shawntabrizi

shawntabrizi commented 3 years ago

This is an implementation detail of our multisig pallet. Unfortunately, the call hash for multiple of the same calls are the same, so we need a timepoint in order to distinguish a multisig transaction uniquely.

It could be implemented in other ways if you wanted to build your own pallet.

However, you would never really be able to do everything offline, since any multisig pallet would basically require each user to submit a transaction. For an offline multisig, you want to take advantage of the multisig features of sr25519, but this is not well supported in our ecosystem yet.

burdges commented 3 years ago

I'll do an overhall of the multisig features of sr25519 soon-ish, but not before mid February.

RainFallsSilent commented 3 years ago

Thanks for your reply. I have understood the specific situation. I will first do it in the way of multi-sig, because I want to send the transaction to Polkadot, but I still hope to have a scheme that can be signed offline.

kevingzhang commented 3 years ago

@burdges Is there any update on this issue? Have you finally got some time to take care of the new mulsig implementation of sr25519 (probably in Schnorrkel)?

burdges commented 3 years ago

As always I over estimate my available time, we've an intern who looked into part of this, since its not that hard, but realistically blocked on my doing an initial part. I'll try to push at least something through..