Closed noel2004 closed 2 years ago
Should also evaluate the cost that DA has induced. Current circuit for block_2_2_2_2 (no DA) is:
[INFO] snarkJS: Curve: bn-128 [INFO] snarkJS: # of Wires: 52473 [INFO] snarkJS: # of Constraints: 52639 [INFO] snarkJS: # of Private Inputs: 164 [INFO] snarkJS: # of Public Inputs: 2 [INFO] snarkJS: # of Labels: 242393 [INFO] snarkJS: # of Outputs: 0
When data avaliability has been induced, about 30k constraints has been added into the circuit for block 2_2_2_2
should notice that the size should increase linearly with nTxs
[INFO] snarkJS: Curve: bn-128 [INFO] snarkJS: # of Wires: 81318 [INFO] snarkJS: # of Constraints: 81804 [INFO] snarkJS: # of Private Inputs: 164 [INFO] snarkJS: # of Public Inputs: 2 [INFO] snarkJS: # of Labels: 447045 [INFO] snarkJS: # of Outputs: 2
Has made fixing according to the comments
The missed decode circuit for float40 is completed now, but many templatize works on circuits still being left (now they are mostly hard-coded) ...
BREAKING: the new feature require more input field in witness so the prover-cluster would be broken for this new circuit. Merging should be suspended until rollup manager has supported data availability (https://github.com/fluidex/rollup-state-manager/issues/178)
This work is mainly for issue #144, include following parts:
[X] Improve decode_tx circuit to encode tx data which would be put on chain
[x] add hash_input circuit to hash tx data
[x] put things together into block circuit, make hash an public output signal
(All of works above should include test cases)
For first phase we just put transfer on chain, and data encoded as follows:
We have no token records on L2 so just purpose the maximum count is 2^16 (2 bytes, according to the discussion in issue)