Skip to content

Change accountBalanceIntervalTxBodyL to accommodate multi-assets #5533

@lehins

Description

@lehins

This is the second phase CIP-159 and continuation of #5503

Here is the CDDL specification for this new field taken from the CIP:

; We don't want to allow arbitrary precision intervals because it would make
; costing difficult so we constrain them to be 8-byte integers. 
balance_bound = uint .size 8

required_balance_interval<b> =
  [ inclusive_lower_bound: b, exclusive_upper_bound: b / nil ] /
  [ inclusive_lower_bound: b / nil, exclusive_upper_bound: b ]
; Note that when multi-asset interval is supplied, interval for ADA is optional
account_balance_interval =
  required_balance_interval<coin> /
  [ inclusive_lower_bound: coin / nil
  , exclusive_upper_bound: coin / nil
  , {+ policy_id => {+ asset_name => required_balance_interval<balance_bound> } }
  ] 
account_balance_intervals = 
  { + reward_account => account_balance_interval }
transaction_body = 
  {   0  : set<transaction_input>         
  ,   1  : [* transaction_output]      
  ...
  , ? 24 : account_balance_intervals ; new field
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions