PEPE: 53 Title: Multi-signatures Authors: Sérgio Flores <[email protected]> Type: Standard Status: Draft Created: 2018-11-2
This PEPE specifies the multisignature scheme employed in Phantasma blockchain.
Sometimes it is required to restrict a contract who belong to multiple parties, in a way that specific action requires permission from two or more involved parties.
Runtime.IsWitness() should be called several times for each expected witness address. If all addresses are required as witnesses, then the script can fail early as soon as one of those checks return false. Otherwise for an N out M witnesses, the script should increment a counter N each time it finds a positive value, then compare with M.
TODO
Sample PVM code
load $witness 0x{addressStr} push $witness extcall "Address()" extcall "Runtime.IsWitness" pop $result jmpif $result, @success throw @success: nop