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: panic issue when doing refundStake and closeCorssChainChannel #362

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

j75689
Copy link
Collaborator

@j75689 j75689 commented Dec 14, 2023

Description

handleMsgSideChainUndelegate should not use the prefixCtx

Log

"UnmarshalJSON cannot decode empty bytes"
goroutine 128 [running]:
runtime/debug.Stack()
\truntime/debug/stack.go:24 +0x65
github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine.func2()
\tgithub.com/tendermint/tendermint@v0.35.9/consensus/state.go:614 +0x4c
panic({0x16a9940, 0xc00ddd0630})
\truntime/panic.go:884 +0x213
github.com/cosmos/cosmos-sdk/x/params/subspace.Subspace.Get({_, {_, _}, {_, _}, {_, _, _}, {_}}, {{0x1d7eaa0, ...}, ...}, ...)
\tgithub.com/cosmos/cosmos-sdk@v0.25.0/x/params/subspace/subspace.go:80 +0x148
github.com/cosmos/cosmos-sdk/x/sidechain.Keeper.BscSideChainId({{0x1d73bf8, 0xc0008d3c40}, {0xc000a08150, {0x1d73bf8, 0xc0008d3bd0}, {0x1d73c20, 0xc0008d3c70}, {0xc0000440f0, 0x9, 0x17}, ...}, ...}, ...)
\tgithub.com/cosmos/cosmos-sdk@v0.25.0/x/sidechain/params.go:39 +0x12f
github.com/cosmos/cosmos-sdk/x/stake.handleRefundStake({{0x1d7eaa0, 0xc0000c8020}, {0x1d894d8, 0xc00dd7a800}, {{0xa, 0x0, {}, {0x0, 0x0, 0x0}, ...}, ...}, ...}, ...)
\tgithub.com/cosmos/cosmos-sdk@v0.25.0/x/stake/endblock.go:293 +0x5f8
github.com/cosmos/cosmos-sdk/x/stake.EndBlocker({{0x1d7eaa0, 0xc0000c8020}, {0x1d894d8, 0xc00dd7a800}, {{0xa, 0x0, {}, {0x0, 0x0, 0x0}, ...}, ...}, ...}, ...)
\tgithub.com/cosmos/cosmos-sdk@v0.25.0/x/stake/endblock.go:46 +0xa3b

@codecov-commenter
Copy link

Codecov Report

Merging #362 (d940f55) into bc-fusion (065b547) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##           bc-fusion     #362      +/-   ##
=============================================
- Coverage      45.58%   45.58%   -0.01%     
=============================================
  Files            248      248              
  Lines          24411    24413       +2     
=============================================
  Hits           11128    11128              
- Misses         12613    12615       +2     
  Partials         670      670              

@unclezoro unclezoro merged commit 2b34b1a into bc-fusion Dec 14, 2023
2 checks passed
unclezoro pushed a commit that referenced this pull request Feb 26, 2024
* feat: bc fusion hardfork implementation (#358)

* fix: panic issue when doing refundStake and closeCorssChainChannel (#362)

* fix: handleMsgSideChainUndelegate should not pass prefixCtx

* fix: nil pointer when doing ibc method in endblock

* fix: add logs to sunset fork events and immediate sidechain undelegation (#364)

* fix: revert immediate sidechain undelegation and handle undelegation in endblock (#365)

* fix: disable ClaimMsg after FinalSunsetFork (#366)

* feat: add `MsgSideChainStakeMigration` and `StakeMigrationApp` (#367)

* feat: add `MsgSideChainStakeMigration` and `StakeMigrationApp`

* add missing tag

* fix `handleMsgSideChainStakeMigration`

* fix review comments

* rename `MsgTypeSideChainStakeMigration`

* add fee param for `MsgSideChainStakeMigration`

* fix: add missing register for new msg (#368)

* fix: error within `CreateRawIBCPackageByIdWithFee` (#369)

* fix: decimal for BCFusionStopGovThreshold (#370)

* fix: panic when totally unbound the validator in voting period (#371)

* fix: add missing event (#372)

* fix: wrong json tag (#373)

* fix: add missing tag of relayer fee in `handleMsgSideChainStakeMigration` (#376)

* feat: add IsAutoUnDelegate field to CrossStakeDistributeUndelegatedSynPackage and  prevent too many failed in auto refund (#377)

* feat: add IsAutoUnDelegate field to CrossStakeDistributeUndelegatedSynPackage

* fix: disable undelegate after SecondSunsetFork and prevent too many failed in auto refund

* chore: add more logs

* revert: cross stake changes

* fix: error handling in refund

* fix: transferPackage

* fix: CrossStakeDistributeUndelegatedSynPackageV2

* fix: reset context every time in refund loop (#378)

* fix: do not charge relayerFee for auto cross undelegate after SecondSunsetFork (#379)

* fix: do not charge relayerFee for auto cross undelegate after SecondSunsetFork

* fix: FeeCalculator

* chore: add logs for processed refunding count (#380)

* fix: close mirror, mirrorSync channel after FinalSunsetFork (#382)

* fix: disable MsgEditSideChainValidator after FirstSunsetFork and refine codes (#383)

* fix: change StakeMigrationRelayFee to 0.002BNB (#384)

* fix: appHash mismatch causes by channelsMap (#385)

---------

Co-authored-by: Roshan <48975233+Pythonberg1997@users.noreply.github.com>
unclezoro added a commit that referenced this pull request Feb 26, 2024
* fix: fix nil validator when publishing message (#356)

* feat: implement BEP-333(BNB Chain Fusion) (#381)

* feat: bc fusion hardfork implementation (#358)

* fix: panic issue when doing refundStake and closeCorssChainChannel (#362)

* fix: handleMsgSideChainUndelegate should not pass prefixCtx

* fix: nil pointer when doing ibc method in endblock

* fix: add logs to sunset fork events and immediate sidechain undelegation (#364)

* fix: revert immediate sidechain undelegation and handle undelegation in endblock (#365)

* fix: disable ClaimMsg after FinalSunsetFork (#366)

* feat: add `MsgSideChainStakeMigration` and `StakeMigrationApp` (#367)

* feat: add `MsgSideChainStakeMigration` and `StakeMigrationApp`

* add missing tag

* fix `handleMsgSideChainStakeMigration`

* fix review comments

* rename `MsgTypeSideChainStakeMigration`

* add fee param for `MsgSideChainStakeMigration`

* fix: add missing register for new msg (#368)

* fix: error within `CreateRawIBCPackageByIdWithFee` (#369)

* fix: decimal for BCFusionStopGovThreshold (#370)

* fix: panic when totally unbound the validator in voting period (#371)

* fix: add missing event (#372)

* fix: wrong json tag (#373)

* fix: add missing tag of relayer fee in `handleMsgSideChainStakeMigration` (#376)

* feat: add IsAutoUnDelegate field to CrossStakeDistributeUndelegatedSynPackage and  prevent too many failed in auto refund (#377)

* feat: add IsAutoUnDelegate field to CrossStakeDistributeUndelegatedSynPackage

* fix: disable undelegate after SecondSunsetFork and prevent too many failed in auto refund

* chore: add more logs

* revert: cross stake changes

* fix: error handling in refund

* fix: transferPackage

* fix: CrossStakeDistributeUndelegatedSynPackageV2

* fix: reset context every time in refund loop (#378)

* fix: do not charge relayerFee for auto cross undelegate after SecondSunsetFork (#379)

* fix: do not charge relayerFee for auto cross undelegate after SecondSunsetFork

* fix: FeeCalculator

* chore: add logs for processed refunding count (#380)

* fix: close mirror, mirrorSync channel after FinalSunsetFork (#382)

* fix: disable MsgEditSideChainValidator after FirstSunsetFork and refine codes (#383)

* fix: change StakeMigrationRelayFee to 0.002BNB (#384)

* fix: appHash mismatch causes by channelsMap (#385)

---------

Co-authored-by: Roshan <48975233+Pythonberg1997@users.noreply.github.com>

* docs: add change logs for release 0.26.7 (#386)

---------

Co-authored-by: forcodedancing <just.haha.it@gmail.com>
Co-authored-by: dylanhuang <j75689@gmail.com>
Co-authored-by: Roshan <48975233+Pythonberg1997@users.noreply.github.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.

3 participants