Try   HackMD

HashTower 與開發心得 2023-03-21

Background

  • membership
    • Map
    • Merkle Tree
      • Incremental Binary Tree
    • RSA Accumulator
  • gas

HashTower

  • Amortized cost: O(1)
  • one-way hash function: 固定 / 瞄準 / ZK
  • idea
  • video
  • 不要被 tree 限制想像
  • 觀察變化的 pattern / 觀察操作的 pattern
  • Incremental hash (homomorphic hash)
  • Lazy
  • 用 circuit complexity 換 gas

Circom

  • 光看 document 不夠
  • 運用新的 anonymous component syntax
  • 用 zkrepl
  • 用 circom tester
  • IsZero 和 a === 0
  • 除法的例子
  • "證明"
  • 兩個程式寫在同一個程式裡
  • 所有 signal 都是 "input"

Javascript

  • 用 Javascript 先 prototyping circuit 和 contract (高階)
  • 用 Javascript 來驅動測試, 同時也測到 Javascript
  • 用簡單的測複雜的, 用複雜的測更複雜的

Solidity

  • 了解 gas cost
    • Hash
    • SSTORE
    • SLOAD
    • public signal
    • dynamic array

其他

  • 和 Semaphore 學習