hermeznetwork / commonjs Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
Implement necessary function utilities for massive-migrations
:
set-idx
circuit hash public inputRollupDB
to retrieve i¡account info leaf given its idx
and batch number
nullifyAmount
in L1 transactions in its data-availabilityL1tx
then L2Tx
then L2NopTx
Please, check new specification in the following link
Also, check circuit issue regarding this topic here
state-utils.js
: add new fields exitBalance
and accumulateHash
batch-builder.js
: remove exit-tree. Add logic to add exits to exitBalance
and compute accumulatedHash
rollupDB.js
: remove storage exit-tree, ability to retrieve new exit informationtokenID2
for on-chain transactionsCheck feature in this issue
utils-multi-token-withdraw.js
functions to properly retrieve data to be used when using this featureInitial 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);
Check this issue for more details
withdraw-utils.js
to match new specificationfeature/upgrade-v1
feature/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
The aim of this protocol feature is to allow the user to sent all his current balance on L1 transactions.
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 transferzk-inputs
should update new balance of the receiver accordinglyrelated to hermeznetwork/circuits#32
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
Therefore auxToIdx
must be included on data availability on L2 transactions of type transferToEthAddr
or transferToBjj
instead of toIdx
maxNumBatch
L2 signature
(add maxNumBatch
) , hashGlobalInput
(add currentNumBatch
)maxNumBatch
< currentNumBatch
contracts
use a local version of this function. It should be moved to commonjs
in order to use same implementation across all testsRollupDB 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
Add new function in rollupDB
: buildBatchMigration
check this issue for further details
batch-builder.js
to proper handle new account ypefeature/upgrade-v1
to feature/massive-migrations
massive-migrations-utils.js
to last v1 updatesgetStateTreeInfo
in rollupDB
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.