hermeznetwork / circuits

Implements hermez network zk-Snarks circuits
GNU Affero General Public License v3.0
55 stars 21 forks source link

Massive migrations data availability #17

Closed krlosMata closed 3 years ago

krlosMata commented 3 years ago

Feature

Compute data availability for all processed transactions, including L1, transactions In order to provide massive migration feature. So far, data availability for L1 transactions was forced to be 0. Therefore it was not possible to proof that a certain forceTransfer transactions was done to a specific merkle tree index. By including L1 transactions into data availability, it is ensured that any transaction type is represented in smart contract calldata and be used for afterwards for any purpose such as massive migrations

L1 data availability

L1 data availability would be computed as L2 data availability with a slightly difference in amount field:

L1TxData:  [ NLevels  bits ] fromIdx
           [ NLevels  bits ] toIdx
           [    16  bits   ] effectiveAmountF
           [     8  bits   ] fee

Note that this could not be for L2 transactions since L2 transactions must be valid in order to be processed

Steps

krlosMata commented 3 years ago