weixin_39617484 2020-11-21 19:04
浏览 0

Michaelconnor/one public input

Description

Hash all public inputs of each proof down to 1 public input.

Changed all .code files to include a publicInputHash, which is the hash of all previously public inputs.

Changed both shield contracts: parameters, added a check on the publicInputHash Edited bit-lengths of commitments, nullifiers, and roots to 256-bit. The intermediate merkle nodes retain the 216-bit length. The publicInputHash is 248-bits; for maximal security within the field size.

Changed node.js controllers to deal with this new publicInputHash. Edited / added some zkp-utils functions to solve problems relating to hashing and padding.

Motivation and Context

Preparation for batching.

How Has This Been Tested

./nightfall-test plus other manual tests as I went along

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [X] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [X] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [X] All new and existing tests passed.

该提问来源于开源项目:EYBlockchain/nightfall

  • 写回答

5条回答 默认 最新

  • weixin_39617484 2020-11-21 19:04
    关注

    Please SQUASH and merge, once reviewed (the person merging can do this by selecting this option from the drop-down menu). There are a few too many commits.

    评论

报告相同问题?