Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1000 Bytes

pepe-53.mediawiki

File metadata and controls

40 lines (28 loc) · 1000 Bytes

  PEPE: 53
  Title: Multi-signatures
  Authors: Sérgio Flores <[email protected]>
  Type: Standard
  Status: Draft
  Created: 2018-11-2

Table of Contents

Abstract

This PEPE specifies the multisignature scheme employed in Phantasma blockchain.

Motivation

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.

Specification

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.

Contract ABI

TODO

Implementation

Sample PVM code

load $witness 0x{addressStr} push $witness extcall "Address()" extcall "Runtime.IsWitness" pop $result jmpif $result, @success throw @success: nop