Skip to content

feat: add transactionReceipts subscription support in eth_subscribe #…#10190

Merged
jframe merged 5 commits intobesu-eth:mainfrom
vivek-0509:feature/transaction-receipts-subscription
Apr 10, 2026
Merged

feat: add transactionReceipts subscription support in eth_subscribe #…#10190
jframe merged 5 commits intobesu-eth:mainfrom
vivek-0509:feature/transaction-receipts-subscription

Conversation

@vivek-0509
Copy link
Copy Markdown
Contributor

PR description

Add support for transactionReceipts subscription type in eth_subscribe.

When subscribed, all transaction receipts for each new canonical block are pushed to the client as a JSON array over WebSocket. Includes an optional transactionHashes filter parameter (max 200 hashes) to receive only specific transaction receipts.

Receipt format is identical to eth_getTransactionReceipt HTTP API response.

Changes:

  • Add TRANSACTION_RECEIPTS subscription type
  • Add TransactionReceiptsSubscriptionService (BlockAddedObserver) with reorg handling and memoized receipt building
  • Add optional transactionHashes filter parameter (max 200)
  • Add TransactionReceiptListResult wrapper for JSON array serialization
  • Wire up service in RunnerBuilder
  • Add 15 unit tests covering: subscription lifecycle, reorg handling, filtering, memoization, and request parsing

Fixed Issue(s)

fixes #9347

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests
  • hive tests: Engine or other RPCs modified?

…esu-eth#9347

Signed-off-by: Vivek Singh Solanki <viveksolanki0509@gmail.com>
…ransactionReceiptsSubscriptionService

Signed-off-by: Vivek Singh Solanki <viveksolanki0509@gmail.com>
…Result

Signed-off-by: Vivek Singh Solanki <viveksolanki0509@gmail.com>
@vivek-0509 vivek-0509 force-pushed the feature/transaction-receipts-subscription branch from 78e180d to 6de8f47 Compare April 10, 2026 05:54
@vivek-0509
Copy link
Copy Markdown
Contributor Author

@jframe Done with all the changes

@jframe
Copy link
Copy Markdown
Contributor

jframe commented Apr 10, 2026

Could you also add a changelog entry since this is a new feature otherwise LGTM

Signed-off-by: Vivek Singh Solanki <viveksolanki0509@gmail.com>
@vivek-0509
Copy link
Copy Markdown
Contributor Author

@jframe done

@jframe jframe enabled auto-merge (squash) April 10, 2026 06:52
@vivek-0509
Copy link
Copy Markdown
Contributor Author

@jframe Do i need to rebase it again??

@jframe jframe merged commit a594202 into besu-eth:main Apr 10, 2026
33 checks passed
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.

Support transactionReceipts subscription in eth_subscribe

2 participants