blockchaininnovation / zkzkrollup

1 stars 0 forks source link

[WIP] merkle tree #10

Closed ashWhiteHat closed 1 year ago

ashWhiteHat commented 1 year ago

ref lib

ashWhiteHat commented 1 year ago

Valueは回路に入るフィールドの実体。 実際に値がないが割り当てができるものをValueにしている。 Value::known()で具体的な数の割り当て。 値が割り当てされている場合にもされていない場合にも利用できる。

ashWhiteHat commented 1 year ago

2次元配列のTree https://github.com/DrPeterVanNostrand/halo2-merkle/blob/main/src/main.rs#L365

Circuit I/O Private Inputs: leaf, path Public Inputs: c_bits

8*3 Tree https://github.com/DrPeterVanNostrand/halo2-merkle/blob/main/src/main.rs#L33

MerkleCircuit > MerkleChip

use merkle in halo2

ashWhiteHat commented 1 year ago

merkle tree description from scratch https://medium.com/coinmonks/merkle-tree-a-simple-explanation-and-implementation-48903442bc08

implementation https://github.com/jeremythen/simple-merkle-tree-implementation/blob/main/index.js

ashWhiteHat commented 1 year ago

Test https://github.com/privacy-scaling-explorations/halo2/blob/v2023_02_02/halo2_gadgets/src/sinsemilla/merkle.rs#L359

ashWhiteHat commented 1 year ago

Circuitは全体で一つでCHIPを組み合わせる