Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties
label


Status
Status
colourGrey
titleNot started
Stakeholders
Outcome
Due date
Owner


...

We should declare the initial set of OOB (Out-Of-the-Box) Iroha Special Instructions for Hyperledger Iroha 2.0.0 release.

Action items

Problem

Iroha whitepaper, current implementation and users' expectations are different in terms of out-of-the-box Iroha Special Instructions set.

...

  • Domain related
    •  Register/Unregister<Identifiable>
    •  Mint/Burn<Id, Value>
    •  Transfer<Id, Value, Id>
  • Math
    • Integer
      •  Add/Substract<EvaluatesTo<u32>, EvaluatesTo<u32>>
      •  Multiply/Divide<EvaluatesTo<u32>, EvaluatesTo<u32>>
      •  RaiseTo<EvaluatesTo<u32>, EvaluatesTo<u32>>
      •  Mod<EvaluatesTo<u32>, EvaluatesTo<u32>>
    • Comparison:
      •  Equate<Value, Value>
      •  Greater/Less<EvaluatesTo<u32>, EvaluatesTo<u32>>
    • Bool
      •  Not<EvaluatesTo<bool>>
      •  And/Or<EvaluatesTo<bool>, EvaluatesTo<bool>>
  • Compositions
    •  Sequence<Vec<Instruction>>
    •  Pair<Instruction, Instruction>
    •  If<EvaluatesTo<bool>, Instruction, Option<Instruction>>
  • Vectors
    •  Contains<EvaluatesTo<Vec<Value>>, EvaluatesTo<Value>>
    •  ContainsAny/ContainsAll<EvaluatesTo<Vec<Value>>, EvaluatesTo<Vec<Value>>>
  • Variables
    •  Where<Value, BTreeMap<String, Value>>
    •  ContextValue<String>
  • Queries
    •  Execute<Query>
  • Misc
    •  Fail<String>

...

  • Register/Unregister
    •  Register or unregister Domain in Peer
    •  Register or unregister Account in Domain
    •  Register or unregister Asset Definition in Domain
    •  Register or unregister Peer Id in Peer 
    •  Register or unregister Signatory in Account
  • Mint
    •  Mint or burn value to or from an Asset 


Provide a set of tools for DeFi:

  • Register DEX
    •  Register new DEX
  • Register Liquidity Source
    •  Register XYK Pool
    •  Register Order Book

Alternatives 

  • Do not have categories and generic instructions using a plain set of instructions like "AddDomain, RegisterAccount" - as cons we can point out naming and extensibility problems
  • Do not have granularity and differences between register, mint, add - as cons we can point out different business-related meanings for similar actions and to a wide set of options in one bucket

...