elective-stereophonic
elective-stereophonic
Introduction to Smart Phasing  
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Nxt Client: Nxt 1.11.14

Author Topic: Introduction to Smart Phasing  (Read 3173 times)

Riker

  • Core Dev
  • Hero Member
  • *****
  • Karma: +436/-42
  • Offline Offline
  • Posts: 1774
    • View Profile
Introduction to Smart Phasing
« on: June 25, 2017, 05:35:50 am »

As explained in the nxt wiki https://nxtwiki.org/wiki/Phasing , Phasing is about deferring the execution of a transaction until certain conditions are met.
Currently, phasing approval models and minimum balance models allows flexible definition of approval rules for a transaction (a.k.a “Smart Transactions”), however, they cannot be mixed and matched to provide more functional approval modals.

Smart Phasing
To support more advanced phasing logic, we now added to Ardor the ability to create "Composite" voting models.
A composite model defines the voting models building blocks and the logic to bind them into an "Approve" or "Reject" decision.
The composite model supports the AND (&), OR (|) and NOT (!) logical operators and defines an expression which applies these operators on a combination of simple voting models.

Examples:
Using a NOT operator, allows you to setup a "dead man switch" so that funds are transferred to another account only in case an account did not approve this transaction until a certain height i.e. the account owner is assumed dead.

Using a NOT and AND operators, you can define that a transaction is approved at certain height only if none of the accounts in the whitelist has voted against it.

You can also define more complex conditions like approve a transaction only in case an account from a whitelist (i.e. a regulator, manager, judge etc) has approved it OR an account holding a certain number of tokens approved it i.e a user a stake holder etc.

User interface:

New page to define approval models:
https://drive.google.com/open?id=0B6CzL2REgWiMa3dOSmxlWERwcW8

Define the logical expressioin for the composite model by referring to other voting models:
https://drive.google.com/open?id=0B6CzL2REgWiMUWFpU1VQRHU3T28

View the row approval model JSON data:
https://drive.google.com/open?id=0B6CzL2REgWiMa0EtbnU0X1p5bzQ

Reference the approval model when submitting a transaction:
https://drive.google.com/open?id=0B6CzL2REgWiMOVNhU0J1d2RfaVU
Logged
NXT Core Dev
Account: NXT-HBFW-X8TE-WXPW-DZFAG
Public Key: D8311651 Key fingerprint: 0560 443B 035C EE08 0EC0  D2DD 275E 94A7 D831 1651

Riker

  • Core Dev
  • Hero Member
  • *****
  • Karma: +436/-42
  • Offline Offline
  • Posts: 1774
    • View Profile
Re: Introduction to Smart Phasing
« Reply #1 on: June 25, 2017, 06:39:14 am »

Comments:
1. The feature is not yet on testnet
2. Credits goes to petko for developing the server side logic
Logged
NXT Core Dev
Account: NXT-HBFW-X8TE-WXPW-DZFAG
Public Key: D8311651 Key fingerprint: 0560 443B 035C EE08 0EC0  D2DD 275E 94A7 D831 1651

blackyblack1

  • Hero Member
  • *****
  • Karma: +165/-82
  • Offline Offline
  • Posts: 1759
    • View Profile
Re: Introduction to Smart Phasing
« Reply #2 on: June 25, 2017, 11:27:17 am »

That sounds really cool.
Logged

MrV777

  • Hero Member
  • *****
  • Karma: +112/-4
  • Offline Offline
  • Posts: 981
    • View Profile
Re: Introduction to Smart Phasing
« Reply #3 on: June 26, 2017, 06:51:24 pm »

Quote
Using a NOT operator, allows you to setup a "dead man switch" so that funds are transferred to another account only in case an account did not approve this transaction until a certain height i.e. the account owner is assumed dead.

Is it easy to have something like this just repeat?  For example: An account has to approve the TX once every 30 days, or the funds will all be moved (or the account runs out of money to pay the fees  ::) )?
Logged
NXT: NXT-BK2J-ZMY4-93UY-8EM9V
NXT nodes: 209.222.98.250, 216.155.128.10

qq2536007339

  • Hero Member
  • *****
  • Karma: +41/-9
  • Offline Offline
  • Posts: 507
    • View Profile
Re: Introduction to Smart Phasing
« Reply #4 on: June 30, 2017, 08:54:57 am »

Looks nice,so this will require simple coding?
Logged
你送我未来币,我是要的。NXT-DJ68-PG7W-4JEU-2LU5T

ThomasVeil

  • Hero Member
  • *****
  • Karma: +183/-11
  • Offline Offline
  • Posts: 1397
    • View Profile
Re: Introduction to Smart Phasing
« Reply #5 on: July 01, 2017, 09:28:45 am »

Neat. Is that for Nxt or Ardor or both?
Could have been a good chance for some marketing. New features and good development is something not many coins can claim to have.
Logged
NXT-BPV3-837M-QZTQ-9DQ69  oxpal.com

Riker

  • Core Dev
  • Hero Member
  • *****
  • Karma: +436/-42
  • Offline Offline
  • Posts: 1774
    • View Profile
Re: Introduction to Smart Phasing
« Reply #6 on: July 01, 2017, 03:53:32 pm »

Ardor for now. Perhaps nxt later.
Logged
NXT Core Dev
Account: NXT-HBFW-X8TE-WXPW-DZFAG
Public Key: D8311651 Key fingerprint: 0560 443B 035C EE08 0EC0  D2DD 275E 94A7 D831 1651
 

elective-stereophonic
elective-stereophonic
assembly
assembly