Skip to content
  • Sylvain R.'s avatar
    Proto,tx_rollup: Turn withdraw operation into generic Transfer_ticket · 7b451fb6
    Sylvain R. authored and Marge Bot's avatar Marge Bot committed
    
    
    Before this patch, withdrawing an asset from a transaction rollup
    worked as follows.
    
      1. A `Withdraw' operation in the layer-2 has to be batched and
         submitted to the layer-1
      2. A commitment for this batch has to be posted to the layer-1
      3. Once this commitment is finalized, a `Tx_rollup_withdraw'
         operation can be submitted
    
    This logic does not play well with commitment merklisation, because it
    implies providing the same proof several time (the proof about the
    message_result_hash being part of the commitment).
    
    As a consequence, we refine this logic by adding a new operation,
    `Tx_rollup_dispatch_tickets', which is used to handle all the
    withdrawals of a given batch at once. Then, we introduce
    `Transfer_tickets', which allows implicit accounts to give tickets
    back to smart contracts.
    
    Co-authored-by: Thomas Letan's avatarThomas Letan <lthms@nomadic-labs.com>
    7b451fb6