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

genProof: fromBlock is always 0 #1043

Closed
3 tasks done
yuetloo opened this issue Jan 17, 2024 · 0 comments · Fixed by #1050
Closed
3 tasks done

genProof: fromBlock is always 0 #1043

yuetloo opened this issue Jan 17, 2024 · 0 comments · Fixed by #1050
Assignees

Comments

@yuetloo
Copy link
Contributor

yuetloo commented Jan 17, 2024

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am not running a deprecated version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Expected Behavior

genProofs() should take the startBlock argument value if provided

Current Behavior

As seen in this line, fromBlock is set to 0 if transactionHash is not provided
https://github.com/privacy-scaling-explorations/maci/blob/dev/cli/ts/commands/genProofs.ts#L262C32-L263C1

    let fromBlock = startBlock ? Number(startBlock) : 0;
    fromBlock = transactionHash
      ? await signer.provider!.getTransaction(transactionHash).then((tx) => tx?.blockNumber ?? 0)
      : 0;

Failure Information

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2
  3. you get it...

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • MACI version:
  • Firmware Version:
  • Operating System:
  • SDK version:
  • Toolchain version:

Failure Logs

Please include any relevant log snippets or files here.

@yuetloo yuetloo changed the title genProof: blockFrom is always 0 genProof: fromBlock is always 0 Jan 17, 2024
@ctrlc03 ctrlc03 self-assigned this Jan 18, 2024
@ctrlc03 ctrlc03 added this to MACI Jan 18, 2024
ctrlc03 added a commit that referenced this issue Jan 18, 2024
Ensure the start block is not overriden by the tx hash check. Also ensure we fetch logs at least for
1 block if fromBlock is equal to lastBlock

fix #1043 fix #1044
@ctrlc03 ctrlc03 moved this to In Progress in MACI Jan 18, 2024
ctrlc03 added a commit that referenced this issue Jan 18, 2024
Ensure the start block is not overriden by the tx hash check. Also ensure we fetch logs at least for
1 block if fromBlock is equal to lastBlock

fix #1043 fix #1044
@github-project-automation github-project-automation bot moved this from In Progress to Done in MACI Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants