Skip to content

Fixes unexecutable transaction#7635

Merged
sstanculeanu merged 5 commits into
feat/supernova-async-execfrom
fix-unexecutable-txs
Jan 27, 2026
Merged

Fixes unexecutable transaction#7635
sstanculeanu merged 5 commits into
feat/supernova-async-execfrom
fix-unexecutable-txs

Conversation

@miiu96
Copy link
Copy Markdown
Contributor

@miiu96 miiu96 commented Jan 23, 2026

Reasoning behind the pull request

• Remove unexecutable transactions from the transaction cache once the block execution result is notarized
• Return the correct transaction status on the /transaction/:txHash endpoint for this case

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
Copy link
Copy Markdown

codecov Bot commented Jan 24, 2026

Codecov Report

❌ Patch coverage is 63.76812% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.65%. Comparing base (fb0a35e) to head (543dce6).
⚠️ Report is 6 commits behind head on feat/supernova-async-exec.

Files with missing lines Patch % Lines
process/block/baseProcess.go 31.57% 12 Missing and 1 partial ⚠️
...external/transactionAPI/apiTransactionProcessor.go 66.66% 5 Missing and 4 partials ⚠️
process/block/preprocess/transactions.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           feat/supernova-async-exec    #7635      +/-   ##
=============================================================
- Coverage                      77.66%   77.65%   -0.01%     
=============================================================
  Files                            877      877              
  Lines                         121554   121612      +58     
=============================================================
+ Hits                           94404    94441      +37     
- Misses                         20909    20921      +12     
- Partials                        6241     6250       +9     

☔ 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 self-requested a review January 26, 2026 07:35
return false, err
}

if atp.shardCoordinator.SelfId() == core.MetachainShardId {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

move this after epoch check? before GetStorer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This function also verifies that the transaction returned by the endpoint is included in a block that has an execution results.
If no execution result is found, the function returns an error, since the transaction may not have been executed yet.
So, If I move the check upper the check will be skipped.

_, err := executionResultsStorer.GetFromEpoch(headerHash, miniblockMetadata.GetEpoch())
return err
// check if the transaction miniblock metadata has a mb header on execution result
// if yes - the transaction was execution
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// if yes - the transaction was execution
// if yes - the transaction was executed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

}

for _, txHash := range unexecutableTxHashes {
cacheID := process.ShardCacherIdentifier(bp.shardCoordinator.SelfId(), bp.shardCoordinator.SelfId())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

will this work for cross shard? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this will work also for the cross shard transactions, because the miniblock with the proposed transactions always is an intra shard miniblocks.
after execution we will have new miniblocks that can be cross shard.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the miniblock yes, but the transactions I think are still in the proper pool, not all of them in self-self

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.

there is a common cache for all transactions with senders in own shard, and only those transactions can be un-executable.

@@ -1827,17 +1842,17 @@ func (bp *baseProcessor) saveTxsToStorage(dataPool dataRetriever.ShardedDataCach
for _, txHash := range txHashes {
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 we still at least log the error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

@miiu96 miiu96 self-assigned this Jan 26, 2026
@sstanculeanu sstanculeanu merged commit bfbc71b into feat/supernova-async-exec Jan 27, 2026
9 of 11 checks passed
@sstanculeanu sstanculeanu deleted the fix-unexecutable-txs branch January 27, 2026 11:35
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