QRL Improvement Proposal (QIP-004)
Overview & status
|Author||Kaushal Singh (@cyyber), Peter Waterland (@surg0r)|
|Status||proposal accepted completed|
Purpose of this QIP is to initiate development of multi signature wallet support on QRL network, based on finalised specification.
Currently, QRL doesn’t have support to multi-signature wallet address. So to execute any transaction only a proof of signature is required either by the main address or the slave address. Thus the introduction of multi-signature wallet address will fill this gap and will allow multiple authorities to have a transaction from a single wallet once the consent has been established.
In order to create and spend from a multisig wallet new transaction types are required. multisig_create and multisig_spend are the two new transaction types which will be introducted to support multisig wallet.
multisig_create transaction type will be used to create a new multi sig wallet. It will have following input fields other than common transaction fields.
- Signatories - List of qrl addresses, will act as signatory. There could be maximum 100 signatories and minimum 2.
- Weights - List of integer values which will be denoting the weightage of each signatory.
- Threshold - Threshold value is an integer value and any successful multisig transaction must have sum of weights greater than or equals to threshold value.
multisig_spend transaction type is to move funds from a multisig wallet to another address which could be a normal qrl address or another multisig address. It will have following input fields other than common transaction fields.
- Multi Sig Address - Multi Sig Address from which amount needs to be spent
- Address To - Address which will receive the amount. This could be a normal QRL address or another multi sig address.
- Amount - Amount to be spent
- Shared Key - Shared key refers to the multi sig spend transaction hash. In case a shared key is provided, this transaction, will not require other details such as multi sig address, address to and amount as these details will be derived from the shared key.
multisig_spend transaction will only be executed once minimum required threshold is met.
Address format of a multisig address
MultiSig addresses will be derived by following to maintain the standard QRL address format.
Prefix ‘Q’ + 3 bytes descriptor + hash of (descriptor + txn hash) + last 4 bytes of the hash of (descriptor + previous hash)
Descriptor Format (https://docs.theqrl.org/developers/address/)
|HF||0 .. 3||4||SHA2-256|
|SIG||4 .. 7||4||Signature Scheme|
|P1||8 .. 11||4||Height|
|P2||12 .. 15||4||Address Format|
|P3||16 .. 23||8||Not used|
- HF will be 1 for SHA2-256.
- SIG will be 1 to represent multisig addresses.
- P1 will be 0 as the multi sig addresses itself doesn’t have any height.
- P2 will be 0.
- P3 will be 0 as it is unused.
So a multi sig address generated by multisig_create transaction having transaction hash 5a4c37ef7e5b7cc5a2a58ab730269ed8f4cbf08a005dc3508e31465535e1d6bb will be derived by following
Prefix = ‘Q’
Descriptor = 110000
SHA2_256(Descriptor+Txn hash) = 3674370317e1cac0ca13f896ab5b6472a261ba0d2b2961d3adba1b9060f6e8f7
SHA2_256(Descriptor+Prev Hash) = fe2088fb
MultiSig Address = Q1100003674370317e1cac0ca13f896ab5b6472a261ba0d2b2961d3adba1b9060f6e8f7fe2088fb
The introduction of multisig wallet on QRL Node will need a hard fork, as two new transaction will be introduced in it. Therefore, the changes will not be backward compatible.
Implementation of Multisig wallet is in progress.
Join our mailing list, contact the team or join our vibrant and friendly community of users, developers and enthusiasts on Discord or one of our other social channels