Skip to content

refactor: Cover audit low items - #11

Merged
sontrinh16 merged 2 commits into
auditfrom
son/cover_audit_low_items
Sep 22, 2026
Merged

sontrinh16 merged 2 commits into
auditfrom
son/cover_audit_low_items

Conversation

@sontrinh16

Copy link
Copy Markdown

Summary

Addresses audit finding L-01, where errors from store.Get were silently discarded and reported as missing state.

  • Update bond weight, validator coin, lock, and unlock getters to return (value, found, error).
  • Propagate store read errors through keeper operations, message handlers, governance handlers, end-block processing, and gRPC queries.
  • Return decoding errors for malformed bond weight, lock, and unlock state instead of panicking.
  • Correct the module name in the v1-to-v2 migration error message.

Testing

  • Add injected store failure coverage for all four getters.
  • Add malformed stored-value coverage for bond weights, locks, and unlocks.
  • Update existing tests for the new getter signatures.

Signed-off-by: sontrinh16 <trinhleson2000@gmail.com>
@sontrinh16
sontrinh16 requested a review from hieuvubk September 22, 2026 06:17

@hieuvubk hieuvubk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sontrinh16
sontrinh16 merged commit a3c7f4a into audit Sep 22, 2026
4 checks passed
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