Skip to content

point-protos-to-cap-dev#1913

Draft
yashnevatia wants to merge 1 commit intomainfrom
point-protos-to-cap-dev
Draft

point-protos-to-cap-dev#1913
yashnevatia wants to merge 1 commit intomainfrom
point-protos-to-cap-dev

Conversation

@yashnevatia
Copy link
Contributor

Requires

Supports

@yashnevatia yashnevatia requested review from a team as code owners March 20, 2026 12:48
Copilot AI review requested due to automatic review settings March 20, 2026 12:48
@github-actions
Copy link

👋 yashnevatia, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link

✅ API Diff Results - github.com/smartcontractkit/chainlink-common

✅ Compatible Changes (2)

pkg/capabilities/v2/chain-capabilities/aptos.(*ViewRequest) (1)
  • GetLedgerVersion — ➕ Added
pkg/capabilities/v2/chain-capabilities/aptos.ViewRequest (1)
  • LedgerVersion — ➕ Added

📄 View full apidiff report

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

Updates this repo’s capabilities protobuf bindings to align with the newer chainlink-protos/cre version (per LINK-777), regenerating the checked-in .pb.go outputs accordingly.

Changes:

  • Bump github.com/smartcontractkit/chainlink-protos/cre/go to v0.0.0-20260312152957-059f906b6597.
  • Regenerate EVM capabilities protobuf Go bindings (notably updating embedded chain selector descriptors).
  • Regenerate Aptos capabilities protobuf Go bindings, adding an optional ledger_version field to ViewRequest.

Reviewed changes

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

File Description
pkg/capabilities/v2/chain-capabilities/evm/client.pb.go Regenerated EVM protobuf Go output; updates raw descriptor content (incl. chain selector list).
pkg/capabilities/v2/chain-capabilities/aptos/client.pb.go Regenerated Aptos protobuf Go output; introduces optional ledger_version on ViewRequest.
go.mod Updates dependency on chainlink-protos/cre/go to the newer pseudo-version.
go.sum Updates checksums to match the new chainlink-protos/cre/go version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +349 to +354
func (x *ViewRequest) GetLedgerVersion() uint64 {
if x != nil && x.LedgerVersion != nil {
return *x.LedgerVersion
}
return 0
}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

LedgerVersion is documented as "nil means use latest ledger version", but the generated GetLedgerVersion() accessor returns 0 when the pointer is nil, which makes it easy for callers to accidentally lose presence information and send ledger version 0 (a potentially valid value) instead of "latest". Consider changing the proto/API semantics to avoid relying on nil presence (e.g., use an explicit sentinel like 0==latest, or a wrapper/oneof that forces callers to check presence), and/or ensure callers use req.LedgerVersion != nil rather than GetLedgerVersion() when deciding whether to pin a ledger version.

Copilot uses AI. Check for mistakes.
@yashnevatia yashnevatia marked this pull request as draft March 20, 2026 13:04
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