Skip to content

Add WT and DeriveRemaining capability#1311

Merged
Unheilbar merged 169 commits intodevelopfrom
PLEX-347_derive_remaining
Sep 4, 2025
Merged

Add WT and DeriveRemaining capability#1311
Unheilbar merged 169 commits intodevelopfrom
PLEX-347_derive_remaining

Conversation

@Unheilbar
Copy link
Contributor

@Unheilbar Unheilbar commented Jul 30, 2025

This PR introduces:

  1. Write non-standard capability for solana
  2. Derive remaining non-standard capability for receiving remaining accounts slice
  3. Borsh encoder for consensus capability

Core PR with E2E test: smartcontractkit/chainlink#19091
Core PR with current ref: smartcontractkit/chainlink#19224
Common PR with encoder support: smartcontractkit/chainlink-common#1520
depends on:#1307

augustbleeds
augustbleeds previously approved these changes Sep 4, 2025
Copy link
Contributor

@augustbleeds augustbleeds 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! no blocking comments


chainName, err := chainselectors.SolanaNameFromChainId(chainID)
if err == nil {
wtID, err := writetarget.NewWriteTargetID("", chainName, chainID, "1.0.0")
Copy link
Contributor

Choose a reason for hiding this comment

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

this is interesting, why do we use the write target name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aligned with EVM WT


transactionID := txID.String()
options := []utils.SetTxConfig{txmutils.SetEstimateComputeUnitLimit(false), txmutils.SetComputeUnitLimit(500_000)}
if err := ts.txm.Enqueue(ctx, ts.accounts.forwarderProgramID.String(), tx, &transactionID, blockhash.Value.LastValidBlockHeight, options...); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

we can add a todo for simulating the tx to estimate the compute units. we don't need to do it now since we're only updating one value

accountCtxHash = "account_context_hash"
)

func NewEncoder(config *values.Map) (consensustypes.Encoder, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, this is great!

Copy link
Contributor

@augustbleeds augustbleeds left a comment

Choose a reason for hiding this comment

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

lgtm

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
13.7% Coverage on New Code (required ≥ 75%)

See analysis details on SonarQube

@Unheilbar Unheilbar merged commit e212e55 into develop Sep 4, 2025
43 of 44 checks passed
@Unheilbar Unheilbar deleted the PLEX-347_derive_remaining branch September 4, 2025 20:09
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