8000 Use BigNumber for nonces by voltrevo · Pull Request #162 · getwax/bls-wallet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

Use BigNumber for nonces #162

Merged
merged 1 commit into from
Mar 8, 2022
Merged

Conversation

voltrevo
Copy link
Collaborator
@voltrevo voltrevo commented Mar 8, 2022

What is this PR doing?

Switches to storing nonces as BigNumber in EthereumService, since that's the only place we were still using number. I think I mostly already fixed this when doing the bundle conversion.

Turns out we're already relying on wallet.getTransactionCount() from ethers which uses number, so... that's a bit awkward. I did some quick math though and if tx fees are as low as 1 cent then you still have to go through $trillions in fees before exhausting the safe integer range of number. Let's just assume that in such a scenario the organization running the affected aggregator would have the resources to deal with the problem before it happens :).

How can these changes be manually tested?

Run the premerge script.

Does this PR resolve or contribute to any issues?

Resolves #10.

Checklist

  • I have manually tested these changes
  • Post a link to the PR in the group chat

Guidelines

  • If your PR is not ready, mark it as a draft
  • The resolve conversation button is for reviewers, not authors
    • (But add a 'done' comment or similar)

@github-actions github-actions bot added the aggregator Aggregator backend related label Mar 8, 2022
@jacque006 jacque006 merged commit 0eeb639 into main Mar 8, 2022
@jacque006 jacque006 deleted the bw-10-store-nonces-consistently branch March 8, 2022 17:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
aggregator Aggregator backend related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store nonces in a consistent way
2 participants
0