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

Problem: opBlockhash broke after sdk50 #534

Merged
merged 15 commits into from
Oct 4, 2024

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Oct 2, 2024

Closes: #XXX

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 marked this pull request as ready for review October 2, 2024 02:32
@mmsqe mmsqe requested a review from yihuang October 2, 2024 02:32
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 26.19048% with 31 lines in your changes missing coverage. Please review.

Project coverage is 46.48%. Comparing base (617eac9) to head (6904d69).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
app/upgrades.go 0.00% 9 Missing ⚠️
x/evm/keeper/abci.go 27.27% 5 Missing and 3 partials ⚠️
x/evm/keeper/keeper.go 33.33% 7 Missing and 1 partial ⚠️
x/evm/types/key.go 0.00% 5 Missing ⚠️
x/evm/keeper/state_transition.go 75.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #534      +/-   ##
===========================================
- Coverage    46.56%   46.48%   -0.09%     
===========================================
  Files          181      181              
  Lines        14512    14529      +17     
===========================================
- Hits          6758     6754       -4     
- Misses        7040     7059      +19     
- Partials       714      716       +2     
Files with missing lines Coverage Δ
x/evm/types/params.go 42.37% <100.00%> (+0.99%) ⬆️
x/evm/keeper/state_transition.go 73.48% <75.00%> (+0.61%) ⬆️
x/evm/types/key.go 0.00% <0.00%> (ø)
x/evm/keeper/abci.go 52.63% <27.27%> (-25.15%) ⬇️
x/evm/keeper/keeper.go 80.16% <33.33%> (-5.16%) ⬇️
app/upgrades.go 23.07% <0.00%> (-26.93%) ⬇️

x/evm/keeper/keeper.go Outdated Show resolved Hide resolved
return err
}

k.SetHeaderHash(ctx)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

path flow from Begin/EndBlock to a panic call
x/evm/keeper/abci.go Fixed Show fixed Hide fixed
x/evm/keeper/abci.go Fixed Show fixed Hide fixed
for i := ctx.BlockHeight() - headerHashNum; i >= 0; i-- {
h, err := ethermint.SafeUint64(i)
if err != nil {
panic(err)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
for i := ctx.BlockHeight() - headerHashNum; i >= 0; i-- {
h, err := ethermint.SafeUint64(i)
if err != nil {
panic(err)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

path flow from Begin/EndBlock to a panic call
x/evm/keeper/keeper.go Fixed Show fixed Hide fixed
x/evm/keeper/abci.go Outdated Show resolved Hide resolved
x/evm/keeper/keeper.go Outdated Show resolved Hide resolved
x/evm/keeper/keeper.go Outdated Show resolved Hide resolved
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixHeaderHash)
height, err := ethermint.SafeUint64(ctx.BlockHeight())
if err != nil {
panic(err)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
k.SetHeaderHash(ctx)
headerHashNum, err := ethermint.SafeInt64(cfg.Params.GetHeaderHashNum())
if err != nil {
panic(err)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
k.SetHeaderHash(ctx)
headerHashNum, err := ethermint.SafeInt64(cfg.Params.GetHeaderHashNum())
if err != nil {
panic(err)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

path flow from Begin/EndBlock to a panic call
x/evm/types/key.go Outdated Show resolved Hide resolved
x/evm/types/key.go Outdated Show resolved Hide resolved
x/evm/keeper/keeper.go Outdated Show resolved Hide resolved
x/evm/keeper/keeper.go Outdated Show resolved Hide resolved
x/evm/keeper/keeper.go Outdated Show resolved Hide resolved
x/evm/types/key.go Outdated Show resolved Hide resolved
@mmsqe mmsqe enabled auto-merge (squash) October 4, 2024 07:02
@mmsqe mmsqe merged commit 853e1e5 into crypto-org-chain:develop Oct 4, 2024
38 of 41 checks passed
@yihuang yihuang deleted the blk_hash branch October 4, 2024 08:00
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