Skip to content

Extra fields in outport driver structures#7653

Merged
miiu96 merged 8 commits intofeat/supernova-async-execfrom
outport-driver-updates
Jan 30, 2026
Merged

Extra fields in outport driver structures#7653
miiu96 merged 8 commits intofeat/supernova-async-execfrom
outport-driver-updates

Conversation

@miiu96
Copy link
Copy Markdown
Contributor

@miiu96 miiu96 commented Jan 30, 2026

Reasoning behind the pull request

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?

@miiu96 miiu96 self-assigned this Jan 30, 2026
sstanculeanu
sstanculeanu previously approved these changes Jan 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends outport handling to support unexecutable transactions in the driver structures for header v3 blocks and aligns dependency versions with corresponding core and indexer changes.

Changes:

  • Cache and propagate unexecutable transaction hashes from execution results into the outport transaction pool, and clean them from the tx pool when no longer needed.
  • Adjust outport pool creation so that for header v3 blocks regular transactions are not added at header time but are instead associated with per-execution-result pools.
  • Bump mx-chain-core-go and mx-chain-es-indexer-go to versions that support the new outport structures and behavior.

Reviewed changes

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

Show a summary per file
File Description
process/block/baseProcess.go Hoists the cacheID computation out of the loop in cleanupUnexecutableTxsFromPool, keeping behavior the same while avoiding repeated ShardCacherIdentifier calls.
outport/process/outportDataProvider.go Adds addInPoolUnexecutableTransactions, wires it into execution-result processing, and updates createPool to return an empty pool for header v3 so unexecuted txs are not pre-added.
outport/process/outportDataProvider_test.go Extends existing tests to seed the new unexecutable-tx cache entries and adds focused tests for addInPoolUnexecutableTransactions behavior and error handling.
go.mod Updates mx-chain-core-go and mx-chain-es-indexer-go requirements to newer pseudo-versions that include unexecutable-transaction support.
go.sum Synchronizes checksums with the updated go.mod dependency versions.

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

Comment thread outport/process/outportDataProvider.go Outdated
func (odp *outportDataProvider) createPool(rewardsTxs map[string]data.TransactionHandler) (*outportcore.TransactionPool, error) {
func (odp *outportDataProvider) createPool(rewardsTxs map[string]data.TransactionHandler, header data.HeaderHandler) (*outportcore.TransactionPool, error) {
if header.IsHeaderV3() {
// transactions will be indexer after execution
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Comment text contains a grammatical error: "transactions will be indexer after execution" should be "transactions will be indexed after execution".

Suggested change
// transactions will be indexer after execution
// transactions will be indexed after execution

Copilot uses AI. Check for mistakes.
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

Comment on lines +530 to +535
func (odp *outportDataProvider) createPool(rewardsTxs map[string]data.TransactionHandler, header data.HeaderHandler) (*outportcore.TransactionPool, error) {
if header.IsHeaderV3() {
// transactions will be indexer after execution
return &outportcore.TransactionPool{}, nil
}

Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The new createPool behavior for header v3 (returning an empty TransactionPool when header.IsHeaderV3() is true) is not covered by tests; adding a test that exercises PrepareOutportSaveBlockData with a v3 header and asserts that the returned TransactionPool does not contain regular transactions would help ensure this path behaves as intended.

Copilot uses AI. Check for mistakes.
Comment thread outport/process/outportDataProvider.go Outdated
}
tx, ok := txI.(*transaction.Transaction)
if !ok {
log.Warn("addInPoolUnexecutableTransactions - cannot cast object from ache to transaction", "txHash", txHash, "type", fmt.Sprintf("%T", txI))
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Typo in log message: "cannot cast object from ache to transaction" should read "cannot cast object from cache to transaction" to clearly indicate the source of the casted value.

Suggested change
log.Warn("addInPoolUnexecutableTransactions - cannot cast object from ache to transaction", "txHash", txHash, "type", fmt.Sprintf("%T", txI))
log.Warn("addInPoolUnexecutableTransactions - cannot cast object from cache to transaction", "txHash", txHash, "type", fmt.Sprintf("%T", txI))

Copilot uses AI. Check for mistakes.
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 merged commit ee9262c into feat/supernova-async-exec Jan 30, 2026
8 of 9 checks passed
@miiu96 miiu96 deleted the outport-driver-updates branch January 30, 2026 13:31
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