fluidex / circuits

GNU Affero General Public License v3.0
10 stars 5 forks source link

combine UpdateL2Key and DepositToNew? #194

Open HAOYUatHZ opened 2 years ago

HAOYUatHZ commented 2 years ago

We only need one of them. And if having them both it will affect them performance.

So should we use UpdateL2Key or DepositToNew?

lispc commented 2 years ago

?? i did not know we had updatel2key

noel2004 commented 2 years ago

For data availability, the encoded public data may become too large if a deposit / transfer data need to comply with a L2 key (254bit). So it would be a better practice to divide a "big" tx into some separated piece if the guarantee of atomic is not needed. For depositToNew it is just that case, i.e. we can separate it into a "register L2 key" tx and a "deposit to existed address“ tx and do not require the two op is atomic.

Currently the code is still confused so we may need to do some renaming / refactoring work so they become more clearer and easier to be understood:

HAOYUatHZ commented 2 years ago