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

core/chains/evm/assets: FuzzWei skip large exponents #11948

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Conversation

jmank88
Copy link
Contributor

@jmank88 jmank88 commented Feb 6, 2024

@vyzaldysanchez observed a randomly generated case of 0e488888880 timing out. It seems this is simply too large of a number, and our existing bounds on 1000 characters in the string does not sufficiently limit cases with exponent notation. This PR introduces a small check to limit based on exponent size as well, a few orders of magnitude below the observed case.

Copy link
Contributor

github-actions bot commented Feb 6, 2024

I see that you haven't updated any README files. Would it make sense to do so?

@jmank88 jmank88 requested review from vyzaldysanchez, a team and EasterTheBunny February 6, 2024 22:46
func tryParseExp(v string) int64 {
i := strings.IndexAny(v, "Ee")
if i == -1 {
return -1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I am thinking we'll have to bound negative exponents too 🤔

@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jmank88 jmank88 marked this pull request as ready for review February 6, 2024 23:12
@jmank88 jmank88 requested a review from a team as a code owner February 6, 2024 23:12
@jmank88 jmank88 added this pull request to the merge queue Feb 6, 2024
Merged via the queue into develop with commit 4cb9669 Feb 6, 2024
93 checks passed
@jmank88 jmank88 deleted the fuzzwei-limits branch February 6, 2024 23:38
aalu1418 added a commit that referenced this pull request Feb 7, 2024
* Minor changes (#11943)

* core/chains/evm/assets: FuzzWei skip large exponents (#11948)

* core/chains/evm/assets: fix FuzzWei range detection (#11950)

* Adding ocr2 to configs

* Solana bumps

* Reverting mistake rebase changes

* Bump go deps

* Added ocr2 conf

* fix typo + gomodtidy

* bump solana

* bump solana: fix test compilation

* fix: setup CI to pull CL image version for toml

* bump solana to merged commit

---------

Co-authored-by: aalu1418 <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Feb 7, 2024
* Implement LLO relayer interface

* Fix case coverage for loops

* Point chain repos to latest

* generate mocks

* Adding ocr2 to configs + fix solana e2e tests (#11952)

* Minor changes (#11943)

* core/chains/evm/assets: FuzzWei skip large exponents (#11948)

* core/chains/evm/assets: fix FuzzWei range detection (#11950)

* Adding ocr2 to configs

* Solana bumps

* Reverting mistake rebase changes

* Bump go deps

* Added ocr2 conf

* fix typo + gomodtidy

* bump solana

* bump solana: fix test compilation

* fix: setup CI to pull CL image version for toml

* bump solana to merged commit

---------

Co-authored-by: aalu1418 <[email protected]>

* Add MockRelayer function

* Make sonarqube run

* Exclude integration tests from sonarqube duplicate coverage

* Properly format sonarqube file

---------

Co-authored-by: Damjan Smickovski <[email protected]>
Co-authored-by: aalu1418 <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants