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 Seid Rollback state mismatch error #557

Merged
merged 2 commits into from
Dec 5, 2024
Merged

Conversation

yzang2019
Copy link
Collaborator

Describe your changes and provide context

This PR will fix a bug where SeiDB rollback will report errors or failure due to it was using a wrong commitInfo after rollback.

Testing performed to validate your change

Will fix the errors like this:

Rolled back app state to height 118546578 and hash 2338A536D9EA0FAF1D80ADE8569D5340BCF2665C12137974E45B85D32D6F073D
panic: Application state height does not match the tendermint state height

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/server.NewRollbackCmd.func1(0xc00089fa00?, {0xc000620e20?, 0x0?, 0x1?})
	/root/go/pkg/mod/github.com/sei-protocol/[email protected]/server/rollback.go:68 +0x5ce
github.com/spf13/cobra.(*Command).execute(0xc0001e0000, {0xc000620e00, 0x1, 0x1})
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:916 +0x87c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000005500)
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:961
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x4d0b068?, {0xc00021c5d0, 0xa})
	/root/go/pkg/mod/github.com/sei-protocol/[email protected]/server/cmd/execute.go:35 +0x145
main.main()
	/home/ubuntu/sei-chain/cmd/seid/main.go:16 +0x2b

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 54.87%. Comparing base (a4eb451) to head (9a21710).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
storev2/rootmulti/store.go 0.00% 10 Missing ⚠️
server/rollback.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #557      +/-   ##
==========================================
- Coverage   54.87%   54.87%   -0.01%     
==========================================
  Files         631      631              
  Lines       54937    54946       +9     
==========================================
+ Hits        30148    30149       +1     
- Misses      22633    22641       +8     
  Partials     2156     2156              
Files with missing lines Coverage Δ
server/rollback.go 0.00% <0.00%> (ø)
storev2/rootmulti/store.go 2.56% <0.00%> (-0.05%) ⬇️

... and 1 file with indirect coverage changes

@yzang2019 yzang2019 merged commit 2815ef1 into main Dec 5, 2024
14 of 15 checks passed
@yzang2019 yzang2019 deleted the yzang/fix-rollback branch December 5, 2024 15:21
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