Skip to content

fix(gno): use first present precommit for Commit height/round instead of index 0 - #5483

Open
aronpark1007 wants to merge 1 commit into
unionlabs:mainfrom
aronpark1007:fix/gno-precommit-first-present-upstream
Open

fix(gno): use first present precommit for Commit height/round instead of index 0#5483
aronpark1007 wants to merge 1 commit into
unionlabs:mainfrom
aronpark1007:fix/gno-precommit-first-present-upstream

Conversation

@aronpark1007

Copy link
Copy Markdown
Contributor

Summary

  • Commit::height() / Commit::round() only ever looked at precommits[0], defaulting to 0 whenever that specific validator hadn't signed the block.
  • This caused the height check to be compared against a wrong (zero) value, which surfaced as an intermittent failure depending on which validators had signed.

Changes

  • Find the first present precommit instead of always indexing [0], so height/round are read from a validator that actually signed.

Test plan

  • Verified on union-devnet after migrating the gno light client contract with this fix — confirmed working on-chain.

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