upgradetypes.ModuleName has been mistakenly added to SetOrderBeginBlockers #21
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
primary issue
Highest quality submission among a set of duplicates
🤖_primary
AI based primary recommendation
🤖_03_group
AI based duplicate group recommendation
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2024-05-canto/blob/main/canto-main/app/app.go#L823
https://github.com/code-423n4/2024-05-canto/blob/main/ethermint-main/app/app.go#L695
Vulnerability details
Description
According to the upgrading guide of cosmos sdk for version 0.50.6, when using (legacy) application wiring, the following must be added to app.go:
However, in the app.go of Canto and Ethermint, the upgradetypes.ModuleName under SetOrderBeginBlockers has not been removed.
Impact
Running the same module twice in a single block cycle can introduce unnecessary computational overhead. This redundancy can slow down block processing without adding any benefit.
Proof of Concept
Consider this scenario, in every block processing, upgradetypes.ModuleName will be executed twice, one in preblock phase and one in beginblock phase. This will delay the overall performance of Canto blockchain as well as unnecessary consumption of resources.
Tools Used
Manual Review
Recommended Mitigation Steps
Remove the upgradetypes.ModuleName under SetOrderBeginBlockers as per upgrade guide.
Assessed type
Other
The text was updated successfully, but these errors were encountered: