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

fix(rpc): add more invalid check for fee history (backport: #1720) #241

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented May 10, 2023

Closes: https://github.com/monacohq/blockchain-team-qa-documentation/issues/74 https://github.com/monacohq/blockchain-team-qa-documentation/issues/75

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@mmsqe mmsqe requested a review from yihuang May 10, 2023 01:34
blockEnd = int64(blockNumber)
} else if int64(blockNumber) < blockEnd {
return nil, fmt.Errorf("%w: requested %d, head %d", errRequestBeyondHead, blockEnd, int64(blockNumber))

Check failure

Code scanning / gosec

Potential integer overflow by integer type conversion

Potential integer overflow by integer type conversion
blockEnd = int64(blockNumber)
} else if int64(blockNumber) < blockEnd {

Check failure

Code scanning / gosec

Potential integer overflow by integer type conversion

Potential integer overflow by integer type conversion
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Merging #241 (6f1dd50) into release/v0.20.x-cronos (0efdee3) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@                    Coverage Diff                     @@
##           release/v0.20.x-cronos     #241      +/-   ##
==========================================================
- Coverage                   56.73%   56.68%   -0.05%     
==========================================================
  Files                         108      108              
  Lines                       10234    10243       +9     
==========================================================
  Hits                         5806     5806              
- Misses                       4181     4190       +9     
  Partials                      247      247              
Impacted Files Coverage Δ
rpc/backend/chain_info.go 8.58% <0.00%> (-0.41%) ⬇️

@mmsqe mmsqe merged commit 64a0800 into crypto-org-chain:release/v0.20.x-cronos May 15, 2023
mmsqe added a commit that referenced this pull request Jun 14, 2023
* fix(rpc): nextBaseFee for fee history (backport: evmos#1720) (#234)

* fix blk number for next base fee

* add test

* add change doc

* cross check next fee

* calc base fee based on params

elasticity_multiplier & base_fee_change_denominator

* concurrent call with maxBlockFetchers

* test with get feemarket params

* Update CHANGELOG.md

---------

Signed-off-by: yihuang <huang@crypto.com>
Co-authored-by: yihuang <huang@crypto.com>

* fix(rpc): add more invalid check for fee history (backport: evmos#1720)  (#241)

* align request beyond head block

* align invalid reward percentile

---------

Signed-off-by: yihuang <huang@crypto.com>
Co-authored-by: yihuang <huang@crypto.com>
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