这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@gusin13
Copy link
Contributor

@gusin13 gusin13 commented Aug 29, 2025

No description provided.

@gusin13 gusin13 marked this pull request as ready for review September 1, 2025 11:31
Copilot AI review requested due to automatic review settings September 1, 2025 11:31
@cursor
Copy link

cursor bot commented Sep 1, 2025

🚨 Bugbot Trial Expired

Your team's Bugbot trial has expired. Please contact your team administrator to turn on the paid plan to continue using Bugbot.

A team admin can activate the plan in the Cursor dashboard.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where the index field in cmtcrypto.Proof was being omitted from JSON serialization when its value was 0 due to the omitempty tag. The fix introduces a custom proof struct without the omitempty tag to ensure the index field is always included in the JSON output.

  • Introduces a CustomProof struct that always includes the index field in JSON serialization
  • Adds a ConvertProof function to transform cmtcrypto.Proof to CustomProof
  • Updates all usage locations to use the new CustomProof struct instead of the original cmtcrypto.Proof

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
bsn/cosmos/clientcontroller/msg.go Adds CustomProof struct and ConvertProof function, updates SubmitFinalitySignature to use CustomProof
bsn/cosmos/clientcontroller/consumer.go Updates SubmitBatchFinalitySigs to use ConvertProof function
itest/test_helpers.go Updates GenFinalitySigExecMsg to use ConvertProof function and reorders imports
bsn/cosmos/clientcontroller/msg_test.go Adds comprehensive tests for the CustomProof functionality
CHANGELOG.md Documents the bug fix in the changelog

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@Lazar955 Lazar955 left a comment

Choose a reason for hiding this comment

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

Looks good, just fix the comment above

@gusin13 gusin13 merged commit 833ad96 into main Sep 2, 2025
19 checks passed
@gusin13 gusin13 deleted the gusin13/fix-cmtproof-index branch September 2, 2025 20:51
mergify bot pushed a commit that referenced this pull request Sep 2, 2025
Lazar955 pushed a commit that referenced this pull request Sep 3, 2025
<hr>This is an automatic backport of pull request #668 done by
[Mergify](https://mergify.com).

Co-authored-by: Gurjot Singh <111540954+gusin13@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants