Giter VIP home page Giter VIP logo

commonjs's People

Contributors

arnaucube avatar eduadiez avatar invocamanman avatar jbaylina avatar krlosmata avatar laisolizq avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

commonjs's Issues

utils massive-migrations

Implement necessary function utilities for massive-migrations:

  • compute set-idx circuit hash public input
  • add method to RollupDB to retrieve i¡account info leaf given its idx and batch number

Massive migrations data availability

  • add data-availability when processing L1 transactions
  • apply nullifyAmount in L1 transactions in its data-availability
  • process L1tx then L2Tx then L2NopTx

remove exit-tree

Please, check new specification in the following link
Also, check circuit issue regarding this topic here

Overview changes

  • update state-utils.js: add new fields exitBalance and accumulateHash
  • update batch-builder.js: remove exit-tree. Add logic to add exits to exitBalance and compute accumulatedHash
  • update rollupDB.js: remove storage exit-tree, ability to retrieve new exit information

withdraw-multi-token

Check feature in this issue

Overview changes

  • add utils-multi-token-withdraw.js functions to properly retrieve data to be used when using this feature

Improve feePlanTokens initial value

Initial value for feePlanTokens is an empty array initialized with 0 values. This leads to compute accumulated fees for tokenID = 0 even if the fee is not going to be recollected.
In order to NOT accumulate unnecessary fees, feePlanTokens could be initialized with a tokenID values that do not accumulate fees.
tokenID = 2^32 - 1 could be used since this would be a tokenID not used in the rollup unless 2**32 - 1 tokens are added which is not currently feasible.

this.feePlanTokens = Array(this.totalFeeTransactions).fill(2**32 - 1);

Branch organization: upgrade-v1 and massive-migrations

  • feature/upgrade-v1
    • contains all the necessary code that implements new features in rollup v1
  • feature/massive-migrations
    • contains code to perform massive-migrations

I think after we have everytihng coded for upgrade-v1, we need to rebase feature/massive-migrations into feature/upgrade-v1 and adpat it. Afterward, we can continue code masisve-migration to feature/massive-migration branch

Send max balance

Feature goal

The aim of this protocol feature is to allow the user to sent all his current balance on L1 transactions.

Specification

  • batch-builder should detect when processing a L1 transaction and its amount signed. If amount signed is MAX_AMOUNT_F = 0xFFFFFFFFFF the current balance account is taken from transfer
  • zk-inputs should update new balance of the receiver accordingly

related to hermeznetwork/circuits#32

add auxToIdx to L2TxData if toIdx == 0

Issue

Since in transferToEthAddr or transferToBjj the toIdx signed is IDX 0, it does not provide enough information as data-availability to reconstruct the state tree

Fix

Therefore auxToIdx must be included on data availability on L2 transactions of type transferToEthAddr or transferToBjj instead of toIdx

L2 tx data: maxNumBatch

  • add new field for each transaction maxNumBatch
  • update L2 signature(add maxNumBatch) , hashGlobalInput(add currentNumBatch)
  • add comparator maxNumBatch < currentNumBatch

extend rollupDB

RollupDB should be extended to fully support massive-migrations.
Therefore, the following procedures should be implemented:

processBatchMigrate: mimics migrate circuit logic to insert new leafs into the state-tree

Possible implementation

Add new function in rollupDB: buildBatchMigration

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.