Skip to content

implemented direct sent transactions cache#7527

Merged
sstanculeanu merged 20 commits into
feat/supernova-async-execfrom
direct-sent-transactions-cache
Feb 10, 2026
Merged

implemented direct sent transactions cache#7527
sstanculeanu merged 20 commits into
feat/supernova-async-execfrom
direct-sent-transactions-cache

Conversation

@sstanculeanu

Copy link
Copy Markdown
Collaborator

Reasoning behind the pull request

  • some transactions might come from direct send, which means they will not be available on all nodes

Proposed changes

  • store the transactions received via direct send in a new cache
  • when proposing a header, if there are some porposed transactions received via direct send, broadcast them on the network

Testing procedure

  • with feat branch + specific binary to allow direct send

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@codecov

codecov Bot commented Dec 10, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.52%. Comparing base (0eb2bcc) to head (2e31d75).
⚠️ Report is 21 commits behind head on feat/supernova-async-exec.

Files with missing lines Patch % Lines
process/coordinator/process.go 62.50% 14 Missing and 1 partial ⚠️
update/factory/fullSyncInterceptors.go 0.00% 9 Missing ⚠️
consensus/spos/bls/v2/subroundBlock.go 63.15% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           feat/supernova-async-exec    #7527      +/-   ##
=============================================================
+ Coverage                      77.51%   77.52%   +0.01%     
=============================================================
  Files                            878      878              
  Lines                         122096   122173      +77     
=============================================================
+ Hits                           94639    94718      +79     
+ Misses                         21152    21142      -10     
- Partials                        6305     6313       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sstanculeanu sstanculeanu marked this pull request as ready for review December 10, 2025 14:40
@sstanculeanu sstanculeanu changed the base branch from feat/supernova-async-exec to fixes-async-exec December 12, 2025 19:17
@sstanculeanu sstanculeanu changed the base branch from fixes-async-exec to fix-bootstrap-meta December 15, 2025 14:39
Base automatically changed from fix-bootstrap-meta to fixes-async-exec December 16, 2025 09:33
return true
}

func (sr *subroundBlock) sendDirectSentTransactions(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need this kind of feature ? The answer is probably yes, as this open up possibilities of private pools, and different mechanics for that.

I wonder whether there is a moment, earlier than this, in which the broadcasting can happen.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes, this should cover the private pools scenario

we decided to broadcast these transactions on the leader, with the proposed header.. not sure when can be done earlier


// Save will save the received data into the cacher
func (txip *TxInterceptorProcessor) Save(data process.InterceptedData, peerOriginator core.PeerID, _ string) (bool, error) {
func (txip *TxInterceptorProcessor) Save(data process.InterceptedData, peerOriginator core.PeerID, _ string, broadcastMethod p2p.BroadcastMethod) (bool, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can't you find some better method on doing this. Like having broadcast method pushed on interceptor.save does not look good.

Also, we have peerOriginator which is used only for printing out the trace.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

on this interceptor, yes, peerOriginator is only for print.. but it is useful for heartbeat related messages

indeed, having the broadcast method on Save seems odd, but only on Save we know that the intercepted data is valid

Base automatically changed from fixes-async-exec to feat/supernova-async-exec December 18, 2025 10:30
sstanculeanu and others added 4 commits January 21, 2026 17:41
…ersx/mx-chain-go into direct-sent-transactions-cache

# Conflicts:
#	process/block/shardblockProposal_test.go
…ersx/mx-chain-go into direct-sent-transactions-cache

# Conflicts:
#	integrationTests/mock/transactionCoordinatorMock.go
#	process/block/shardblockProposal_test.go
#	process/block/shardblock_test.go
#	testscommon/transactionCoordinatorMock.go
#	update/mock/transactionCoordinatorMock.go
AdoAdoAdo
AdoAdoAdo previously approved these changes Feb 5, 2026
sasurobert
sasurobert previously approved these changes Feb 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements a caching mechanism for transactions received via direct send. The feature addresses the issue where direct-sent transactions might not be available on all nodes, by storing them in a dedicated cache and broadcasting them when proposing a block header.

Changes:

  • Adds a new DirectSentTransactions cache to the data pool infrastructure
  • Implements logic to identify and cache direct-sent intra-shard transactions in TxInterceptorProcessor
  • Adds functionality to broadcast cached direct-sent transactions during block proposal (v3 headers only)
  • Updates all relevant interfaces, mocks, stubs, and tests

Reviewed changes

Copilot reviewed 60 out of 60 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
process/interceptors/processor/txInterceptorProcessor.go Core logic to cache direct-sent transactions and remove them when received via broadcast
process/coordinator/process.go Implements ProposedDirectSentTransactionsToBroadcast to gather and marshal direct-sent transactions for broadcasting
consensus/spos/bls/v2/subroundBlock.go Integrates direct-sent transaction broadcasting into the consensus block proposal flow
dataRetriever/dataPool/dataPool.go Adds DirectSentTransactions cache to the data pool
process/block/baseProcess.go Adds validation for direct-sent cache and proxies coordinator method
config/config.go Adds configuration structure for direct-sent transactions cache
cmd/node/config/config.toml Adds default configuration values (30s span and expiry)
Various mock/stub files Updates to implement new interface methods across test infrastructure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread process/coordinator/process.go
Comment thread process/interceptors/processor/txInterceptorProcessor.go
Comment thread process/coordinator/process.go
…ersx/mx-chain-go into direct-sent-transactions-cache

# Conflicts:
#	epochStart/bootstrap/process_test.go
@sstanculeanu sstanculeanu dismissed stale reviews from sasurobert and AdoAdoAdo via bcb671a February 6, 2026 14:36
@sstanculeanu sstanculeanu merged commit 3ce7096 into feat/supernova-async-exec Feb 10, 2026
10 of 11 checks passed
@sstanculeanu sstanculeanu deleted the direct-sent-transactions-cache branch February 10, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants