Skip to content

feat(rpc): add costUnits to transaction meta - #494

Merged
sonicfromnewyoke merged 1 commit into
solana-foundation:mainfrom
streamingfast:streamingfast/v1.23.0
Sep 4, 2026
Merged

feat(rpc): add costUnits to transaction meta#494
sonicfromnewyoke merged 1 commit into
solana-foundation:mainfrom
streamingfast:streamingfast/v1.23.0

Conversation

@sduchesneau

Copy link
Copy Markdown
Contributor

The RPC reports the block cost model charge alongside the compute units consumed, on both the binary and the jsonParsed transaction meta.

@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown

Greptile Summary

Adds nullable costUnits fields to binary and JSON-parsed transaction metadata so callers can access the block cost model charge when reported by an RPC node.

  • Extends TransactionMeta with CostUnits.
  • Extends ParsedTransactionMeta with the matching field.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
rpc/types.go Adds matching optional costUnits JSON fields to both transaction metadata response representations.

Reviews (3): Last reviewed commit: "feat(rpc): add costUnits to transaction ..." | Re-trigger Greptile

@sonicfromnewyoke sonicfromnewyoke changed the title Add costUnits to transaction meta feat(rpc): add costUnits to transaction meta Sep 3, 2026
@sonicfromnewyoke

Copy link
Copy Markdown
Collaborator

good catch @sduchesneau

to bypass commitlint, could you run the next commands locally:

git commit --amend -m "feat(rpc): add costUnits to transaction meta"
git push --force-with-lease

@sduchesneau
sduchesneau force-pushed the streamingfast/v1.23.0 branch from 5d92ea1 to d6255cc Compare September 3, 2026 19:08
@sduchesneau

Copy link
Copy Markdown
Contributor Author

good catch @sduchesneau

to bypass commitlint, could you run the next commands locally:

git commit --amend -m "feat(rpc): add costUnits to transaction meta"
git push --force-with-lease

do you need a signed commit on top of that ?

@sonicfromnewyoke

Copy link
Copy Markdown
Collaborator

good catch @sduchesneau
to bypass commitlint, could you run the next commands locally:

git commit --amend -m "feat(rpc): add costUnits to transaction meta"
git push --force-with-lease

do you need a signed commit on top of that ?

yes, sorry forget to mention, signed commit is mandatory

you can check the next links:

after creating a signing key, you can add this public key on GH under Settings -> SSH and GPG keys -> "Signing key" - the same key can be registered twice, once for auth, once for signing, for example

and after that:

git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign true    # then -S is implicit

and your previous commit message rename should look like follows:

git commit --amend -S -m "feat(rpc): add costUnits to transaction meta"
git push --force-with-lease

@sduchesneau
sduchesneau force-pushed the streamingfast/v1.23.0 branch from d6255cc to 7cbacec Compare September 4, 2026 12:21
@sduchesneau

Copy link
Copy Markdown
Contributor Author

@sonicfromnewyoke should be good to go if you can approve the workflows again (same commit, with signature) Thanks!

@sonicfromnewyoke
sonicfromnewyoke merged commit 937b550 into solana-foundation:main Sep 4, 2026
1 check passed
@sonicfromnewyoke

Copy link
Copy Markdown
Collaborator

@sonicfromnewyoke should be good to go if you can approve the workflows again (same commit, with signature) Thanks!

many thanks for contribution 💪

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