Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to generate proofs from merged Poll on Rinkeby testnet #2

Open
johnson86tw opened this issue Apr 18, 2022 · 0 comments
Open

Comments

@johnson86tw
Copy link
Owner

johnson86tw commented Apr 18, 2022

In contract Poll id 1, messgeAq.subTreesMerged and messageAq.treeMerged all returned true. But when generating proofs, in the process of genMaciStateFromContract(), it failed to run the function maciState.stateAq.mergeSubRoots() and give me the following error:

❯ yarn hardhat run scripts/maci-cycle/6-genProofs.ts --network rinkeby
yarn run v1.22.18
$ /Users/johnson/Desktop/qv-contracts/node_modules/.bin/hardhat run scripts/maci-cycle/6-genProofs.ts --network rinkeby
Generating typings for: 0 artifacts in dir: typechain/ for target: ethers-v5
Successfully generated 3 typings!
Successfully generated 11 typings for external artifacts!
Running docker-compose to generate proofs...
Creating qv-contracts_maci_run ... 
Creating qv-contracts_maci_run ... done
fromBlock = 0
(node:1) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(this.subTreesMerged === false)

    at AccQueue.mergeSubRoots (/root/maci/crypto/ts/AccQueue.ts:411:9)
    at /root/maci/contracts/ts/genMaciState.ts:389:31
    at step (/root/maci/contracts/build/genMaciState.js:44:23)
    at Object.next (/root/maci/contracts/build/genMaciState.js:25:53)
    at fulfilled (/root/maci/contracts/build/genMaciState.js:16:58)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✨  Done in 70.69s.

The possible problem might be the poll id 0. It has merged signup state but not merged message because there is no message to merge in the ballot. (I do not publish any message before the deadline) But in this case, it works fine on localhost. So maybe it's not the cause.

I tried a normal approach that poll id 0 is all merged and generated the proofs on Rinkeby testnet. It works.

Reproduce information:

Contract addresses on Rinkeby, and the problem is in the poll id 1.

{
  "poseidonT5": "0x2bb2F59B2F316e1Fd68616b83920A1fe15E32a81",
  "poseidonT3": "0x7B80a9E97FCbB2D84F29079B7dfB438d8eD96D06",
  "poseidonT6": "0x62Dec77d6D6D73768521EBd4FBDa7c62085E052e",
  "poseidonT4": "0x3A23442e35e76E0927dfe0F4FCff8A231Ff8425D",
  "vkRegistry": "0xE11cB907Cd3500D46b5D4604a88485A6b71b6669",
  "pollFactory": "0x331e05dd620db64B7e319B9Eb61756a996EeDbB1",
  "messageAqFactory": "0x715cdd46cE636BeeCa0903061d3a62EeffE56541",
  "stateAq": "",
  "maci": "0x4C0AE44837d01aec7C85f77238e3F93b8eBaAEa5",
  "ppt": "",
  "qv": "0x9b888e4391E5361c3072f4BeF9D74f21A6Ac1cd8"
}

coordinator private key:

macisk.232d0cc27d0ebb93aa81cad1ca38198559c692d40e17b7620e17a36c0ec780c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant