Skip to content

Harden validation for write report Solana - #742

Merged
Unheilbar merged 3 commits into
mainfrom
increase-prevalidation-coverage-solana
Sep 4, 2026
Merged

Harden validation for write report Solana#742
Unheilbar merged 3 commits into
mainfrom
increase-prevalidation-coverage-solana

Conversation

@Unheilbar

Copy link
Copy Markdown
Contributor

No description provided.


var acc *soltypes.GetAccountInfoReply
acc, err = capcommon.WithQuickRetry(ctx, s.lggr, func(ctx context.Context) (*soltypes.GetAccountInfoReply, error) {
acc, err := s.SolanaService.GetAccountInfoWithOpts(ctx, soltypes.GetAccountInfoRequest{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This could lead to a state where an unrelated RPC failure results in a "System error" when a report potentially is already on-chain. Are we ok with that tradeoff?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think if the node experiences RPC failure it won't be able to retreive transmissionState from logs as well. Having RPC failure here will probably be even easier to debug in this case (easier than "transmission state not found..")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hm, yeah thats fair.

acc, err = capcommon.WithQuickRetry(ctx, s.lggr, func(ctx context.Context) (*soltypes.GetAccountInfoReply, error) {
acc, err := s.SolanaService.GetAccountInfoWithOpts(ctx, soltypes.GetAccountInfoRequest{
Account: soltypes.PublicKey(receiver),
Opts: &soltypes.GetAccountInfoOpts{},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we match elsewhere like in forwarder_client and use CommitmentProcessed

silaslenihan
silaslenihan previously approved these changes Sep 3, 2026

@silaslenihan silaslenihan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Unheilbar
Unheilbar enabled auto-merge September 3, 2026 20:59
Comment thread chain_capabilities/solana/actions/forwarder_client.go
Comment thread chain_capabilities/solana/actions/write_report_test.go Outdated
@cl-sonarqube-production

Copy link
Copy Markdown

@Unheilbar
Unheilbar added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit 4211e20 Sep 4, 2026
20 of 21 checks passed
@Unheilbar
Unheilbar deleted the increase-prevalidation-coverage-solana branch September 4, 2026 17:01
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.

4 participants