Skip to content

stellar: bill the transaction named in the WriteReport reply - #841

Merged
ilija42 merged 4 commits into
mainfrom
fix/stellar-write-metering-from-reply
Oct 23, 2026
Merged

ilija42 merged 4 commits into
mainfrom
fix/stellar-write-metering-from-reply

Conversation

@ilija42

@ilija42 ilija42 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Stellar's WriteReport billed the local submit fee after a submit, while nodes that returned early billed the canonical tx. On a failed duplicate the reply and the metering described two different transactions, and a missing submit fee billed 0.

  • Metering after a submit now comes from the reply's on-chain fee, as on EVM: every node bills the canonical transaction, and a missing fee yields no record.
  • Errors return empty metadata and the wrapper returns nil, as on EVM. The generated capability server drops the output on error anyway, so nothing reached the DON.
  • Drops meteringFromSubmitResponse.

…other chains do

After a submit, metering now comes from the reply's on-chain fee instead of the local submit response, so a node whose duplicate failed bills the canonical tx like every other node, and a missing fee yields no record instead of 0. Errors return empty metadata and the wrapper returns nil: the generated capability server drops the output on error, so metering next to an error never reached the DON. Removes meteringFromSubmitResponse.
Wire the shared gasmeter into the Stellar LOOP like EVM and Solana: read the host [Metering] config, build the meter with the chain selector and capability DON id, and emit one usage record per write from meteringFromReply so the record names the same canonical transaction and fee the DON bills. Bumps chain_capabilities/common and chainlink-common to the versions that carry gasmeter.
Reverts 014c0d7. The cre:workflow:gas record needs [Metering] on the chain-capabilities DON configs first and will go in its own PR. This PR stays limited to billing the transaction named in the reply.
@ilija42
ilija42 marked this pull request as ready for review October 22, 2026 14:34
@ilija42
ilija42 requested review from a team as code owners October 22, 2026 14:34
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
56.3% Coverage on New Code (required ≥ 75%)
7.08% Technical Debt Ratio on New Code (required ≤ 4%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

@ilija42
ilija42 added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 1e2cce6 Oct 23, 2026
19 of 20 checks passed
@ilija42
ilija42 deleted the fix/stellar-write-metering-from-reply branch October 23, 2026 10:28
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.

3 participants