Skip to content

Use SyncTransactionReceipt in SNAP sync#9621

Merged
Matilda-Clerke merged 36 commits intobesu-eth:mainfrom
Matilda-Clerke:use-synctransactionreceipt-in-snap-sync
Feb 3, 2026
Merged

Use SyncTransactionReceipt in SNAP sync#9621
Matilda-Clerke merged 36 commits intobesu-eth:mainfrom
Matilda-Clerke:use-synctransactionreceipt-in-snap-sync

Conversation

@Matilda-Clerke
Copy link
Copy Markdown
Contributor

PR description

Utilise SyncTransactionReceipt to avoid unnecessary processing and memory usage during SNAP sync

…ilise raw Bytes

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
@Matilda-Clerke Matilda-Clerke marked this pull request as ready for review January 14, 2026 01:35
@Matilda-Clerke
Copy link
Copy Markdown
Contributor Author

Initial testing shows on-par performance with snap sync on main, so I'm opening this up for review. Please understand that this PR extends from 9574 so will reduce slightly in size once 9574 is merged

@Matilda-Clerke
Copy link
Copy Markdown
Contributor Author

9574 has now been merged to main, and main merge to this branch

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…ap-sync' into use-synctransactionreceipt-in-snap-sync
@jframe
Copy link
Copy Markdown
Contributor

jframe commented Jan 15, 2026

Initial testing shows on-par performance with snap sync on main, so I'm opening this up for review. Please understand that this PR extends from 9574 so will reduce slightly in size once 9574 is merged

What is the memory usage during sync compare some control nodes, is it less? Can you share JVM memory usage and GC time.

@Matilda-Clerke
Copy link
Copy Markdown
Contributor Author

Comparing
syn-transaction-receipt-338-with-expanded-fields
with
transaction-receipt-expanded
I'm not sure this PR will result in any significant change in memory usage. Curious what others think

@macfarla macfarla moved this to Open PRs in 26.1.0 Release Jan 22, 2026
Signed-off-by: Matilda-Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
@Matilda-Clerke
Copy link
Copy Markdown
Contributor Author

Latest changes are showing a noticeable decreases in garbage collection activity and memory usage.
image
as well as a reduction in block creation time
image

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…ap-sync' into use-synctransactionreceipt-in-snap-sync
Signed-off-by: Matilda-Clerke <matilda.clerke@consensys.net>
Copy link
Copy Markdown
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

I think this can be improved ...

Copy link
Copy Markdown
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

LGTM

@Matilda-Clerke Matilda-Clerke merged commit 68f8b35 into besu-eth:main Feb 3, 2026
46 checks passed
@github-project-automation github-project-automation bot moved this from Open PRs to Done in 26.1.0 Release Feb 3, 2026
macfarla pushed a commit to CPerezz/besu that referenced this pull request Feb 6, 2026
* Add SyncTransactionReceipt, decoder, and update LogsBloomFilter to utilise raw Bytes

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Add unit test for LogBloomFilter changes

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Fix missing parentheses in comment in SyncTransactionReceiptDecoder

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Improve unit testing for SyncTransactionReceiptDecoder

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Improve unit testing for SyncTransactionReceiptDecoder

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Use random hashes for stateRoot in SyncTransactionReceiptDecoderTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Utilise SyncTransactionReceipt in SNAP sync

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Fix sync tests

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Fix ReceiptsMessage.syncReceipts

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Use cumulativeGasUsed instead of cumulativeGas

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Use cumulativeGasUsed instead of cumulativeGas

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Allow variables in SyncTransactionReceipt to be cleared

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Fix formatting issue

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Update to accomodate merged changes

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Fix compile issues

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Delete now unused GetReceiptsForHeadersTask

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Fix compile issues after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Avoid decoding and reencoding sync transaction receipts when possible

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Fix failing unit tests

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

---------

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda-Clerke <matilda.clerke@consensys.net>
pinges added a commit that referenced this pull request Feb 10, 2026
…9510 and #9621)

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
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