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

[web3.js] Protect against overflowing _rpcWebSocketGeneration #28426

Closed
steveluscher opened this issue Oct 17, 2022 · 0 comments · Fixed by #28428
Closed

[web3.js] Protect against overflowing _rpcWebSocketGeneration #28426

steveluscher opened this issue Oct 17, 2022 · 0 comments · Fixed by #28428
Labels
community Community contribution javascript Pull requests that update Javascript code

Comments

@steveluscher
Copy link
Contributor

Here's a new take on solana-labs/solana-web3.js#1106. What if the actual problem is that we max out _rpcWebSocketGeneration such that it can't be incremented any more? After all, it has a ceiling of Number.MAX_SAFE_INTEGER.

Suggested fixes

  • Replace this with a bigint.
  • Implement wraparound logic.
@steveluscher steveluscher added community Community contribution javascript Pull requests that update Javascript code labels Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant