Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
2da17d6
less rounds per epoch
sstanculeanu Feb 26, 2026
6954817
Merge branch 'feat/supernova-async-exec' into test-fast-epochs-feat/s…
sstanculeanu Feb 26, 2026
823a2b1
Merge branch 'request-epoch-start-block' of https://github.com/multiv…
sstanculeanu Feb 27, 2026
511dce1
Merge branch 'feat/supernova-async-exec' into test-fast-epochs-feat/s…
sstanculeanu Mar 2, 2026
19b6b23
Merge branch 'wait-for-execution-results' of https://github.com/multi…
sstanculeanu Mar 2, 2026
6fd4c28
Merge branch 'feat/supernova-async-exec' into test-fast-epochs-feat/s…
sstanculeanu Mar 3, 2026
2719d29
Merge branch 'fix-importdb-proof-requests' of https://github.com/mult…
sstanculeanu Mar 3, 2026
2909cb6
Merge branch 'fix-importdb-proof-requests' of https://github.com/mult…
sstanculeanu Mar 3, 2026
fe6cc0d
Merge branch 'fix-importdb-proof-requests' of https://github.com/mult…
sstanculeanu Mar 3, 2026
f2673a1
Merge branch 'fix-epoch-start-data-reference' into test-fast-epochs-f…
ssd04 Mar 4, 2026
7ec39de
Merge branch 'feat/supernova-async-exec' into test-fast-epochs-feat/s…
AdoAdoAdo Mar 5, 2026
0cf337f
Merge branch 'fix-epoch-start-data-reference' into test-fast-epochs-f…
AdoAdoAdo Mar 5, 2026
2121d58
Merge branch 'feat/supernova-async-exec' into test-fast-epochs-feat/s…
ssd04 Mar 6, 2026
f77da3b
Merge branch 'improve-delay-for-proof-and-sign' into test-fast-epochs…
ssd04 Mar 9, 2026
e44a299
Merge branch 'improve-delay-for-proof-and-sign' into test-fast-epochs…
ssd04 Mar 10, 2026
1973a97
Merge branch 'improve-delay-for-proof-and-sign' into test-fast-epochs…
ssd04 Mar 11, 2026
61f1113
Merge branch 'update-mx-chain-comm-go' into test-fast-epochs-feat/sup…
ssd04 Mar 13, 2026
4fd1e6b
Merge branch 'better-delay-management-multikey' into test-fast-epochs…
ssd04 Mar 16, 2026
23276df
Merge branch 'tx-selection-grace-period' into test-fast-epochs-feat/s…
ssd04 Mar 17, 2026
a9255a2
Merge branch 'fix-pending-miniblocks-meta' into test-fast-epochs-feat…
ssd04 Mar 19, 2026
95ba5fe
trigger trie prunning from async execution flow
ssd04 Mar 24, 2026
1be0302
fix intermediate nonce index
ssd04 Mar 24, 2026
322b33c
add unit tests
ssd04 Mar 24, 2026
247357f
tests fix
ssd04 Mar 24, 2026
e77ce87
tests fix
ssd04 Mar 24, 2026
6cd66c1
Merge branch 'async-trie-prunning-trigger' into test-fast-epochs-feat…
ssd04 Mar 25, 2026
1714b93
remove prune trie for metablock v2 flow
ssd04 Mar 25, 2026
f496e52
Merge branch 'async-trie-prunning-trigger' into test-fast-epochs-feat…
ssd04 Mar 25, 2026
6ac7375
handle intermediate blocks based on hashes instead of nonces
ssd04 Mar 26, 2026
6d21b8e
add Reset() for spm and ewl
BeniaminDrasovean Mar 26, 2026
587f961
add missing comment
BeniaminDrasovean Mar 26, 2026
75a6db2
export pruning reset on accountsDB
BeniaminDrasovean Mar 26, 2026
ae2aad9
fix unit tests
ssd04 Mar 26, 2026
b7fa2ee
added more unit tests
ssd04 Mar 26, 2026
78cab66
remove unused common func
ssd04 Mar 26, 2026
4ad7332
Merge pull request #7803 from multiversx/reset-for-storage-pruning-ma…
ssd04 Mar 26, 2026
a1a33e3
integrate pruning context reset
ssd04 Mar 26, 2026
c63af73
fix typo
ssd04 Mar 26, 2026
02eac92
Merge branch 'feat/supernova-async-exec' into async-trie-prunning-tri…
ssd04 Mar 26, 2026
0fb30e9
Merge branch 'async-trie-prunning-trigger' into test-fast-epochs-feat…
ssd04 Mar 26, 2026
a672116
Merge branch 'feat/supernova-async-exec' into async-trie-prunning-tri…
AdoAdoAdo Mar 26, 2026
93f4d3c
Merge branch 'feat/supernova-async-exec' into async-trie-prunning-tri…
ssd04 Mar 26, 2026
1d50884
Merge branch 'feat/supernova-async-exec' into async-trie-prunning-tri…
ssd04 Mar 27, 2026
c46a0e8
clean ewl on failed consensus
AdoAdoAdo Mar 27, 2026
85aa07a
remove cancelPrune from markForEviction
AdoAdoAdo Mar 27, 2026
54c6ae1
rename receiver
AdoAdoAdo Mar 27, 2026
4bb1aa4
Merge branch 'pruning-v3-cleanup' into test-fast-epochs-feat/supernov…
ssd04 Mar 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions cmd/node/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@

# ChainParametersByEpoch defines chain operation configurable values that can be modified based on epochs
ChainParametersByEpoch = [
{ EnableEpoch = 0, RoundDuration = 6000, RoundsPerEpoch = 200, MinRoundsBetweenEpochs = 20, ShardConsensusGroupSize = 7, ShardMinNumNodes = 10, MetachainConsensusGroupSize = 10, MetachainMinNumNodes = 10, Hysteresis = 0.2, Adaptivity = false, Offset = 0 },
{ EnableEpoch = 1, RoundDuration = 6000, RoundsPerEpoch = 200, MinRoundsBetweenEpochs = 20, ShardConsensusGroupSize = 10, ShardMinNumNodes = 10, MetachainConsensusGroupSize = 10, MetachainMinNumNodes = 10, Hysteresis = 0.2, Adaptivity = false, Offset = 0 },
{ EnableEpoch = 2, RoundDuration = 600, RoundsPerEpoch = 2000, MinRoundsBetweenEpochs = 50, ShardConsensusGroupSize = 10, ShardMinNumNodes = 10, MetachainConsensusGroupSize = 10, MetachainMinNumNodes = 10, Hysteresis = 0.2, Adaptivity = false, Offset = 2 }
{ EnableEpoch = 0, RoundDuration = 6000, RoundsPerEpoch = 100, MinRoundsBetweenEpochs = 20, ShardConsensusGroupSize = 7, ShardMinNumNodes = 10, MetachainConsensusGroupSize = 10, MetachainMinNumNodes = 10, Hysteresis = 0.2, Adaptivity = false, Offset = 0 },
{ EnableEpoch = 1, RoundDuration = 6000, RoundsPerEpoch = 100, MinRoundsBetweenEpochs = 20, ShardConsensusGroupSize = 10, ShardMinNumNodes = 10, MetachainConsensusGroupSize = 10, MetachainMinNumNodes = 10, Hysteresis = 0.2, Adaptivity = false, Offset = 0 },
{ EnableEpoch = 2, RoundDuration = 600, RoundsPerEpoch = 1000, MinRoundsBetweenEpochs = 50, ShardConsensusGroupSize = 10, ShardMinNumNodes = 10, MetachainConsensusGroupSize = 10, MetachainMinNumNodes = 10, Hysteresis = 0.2, Adaptivity = false, Offset = 2 }
]

# EpochChangeGracePeriodEnableEpoch represents the configuration of different grace periods for epoch change with their activation epochs
Expand Down Expand Up @@ -81,7 +81,7 @@
NumHeadersToRequestInAdvance = 10
},
{
EnableRound = 440,
EnableRound = 260,
MaxRoundsWithoutNewBlockReceived = 100,
MaxRoundsWithoutCommittedBlock = 100,
RoundModulusTriggerWhenSyncIsStuck = 200,
Expand All @@ -102,7 +102,7 @@

EpochStartConfigsByRound = [
{ EnableRound = 0, MaxRoundsWithoutCommittedStartInEpochBlock = 50 },
{ EnableRound = 440, MaxRoundsWithoutCommittedStartInEpochBlock = 500 },
{ EnableRound = 260, MaxRoundsWithoutCommittedStartInEpochBlock = 500 },
]

ConsensusConfigsByEpoch = [
Expand All @@ -121,7 +121,7 @@
{ StartEpoch = 1, StartRound = 0, Version = "2" },

# TODO The value of StartEpoch parameter for version 3 should be the same with the SupernovaEnableEpoch flag from enableEpoch.toml file and StartRound the same with the SupernovaEnableRound flag from enableRounds.toml
{ StartEpoch = 2, StartRound = 440, Version = "3" },
{ StartEpoch = 2, StartRound = 260, Version = "3" },
]

[StoragePruning]
Expand Down Expand Up @@ -714,7 +714,7 @@
MaxDeviationTimeInMilliseconds = 25

[[Antiflood.ConfigsByRound]]
Round = 440
Round = 260
NumConcurrentResolverJobs = 50 # TODO: analyse for meta on bootstrap there was a constant used with value 10
NumConcurrentResolvingTrieNodesJobs = 3

Expand Down
2 changes: 1 addition & 1 deletion cmd/node/config/enableRounds.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

[RoundActivations.SupernovaEnableRound]
Options = []
Round = "440"
Round = "260"
12 changes: 11 additions & 1 deletion epochStart/bootstrap/disabled/disabledAccountsAdapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package disabled
import (
"context"

vmcommon "github.com/multiversx/mx-chain-vm-common-go"

"github.com/multiversx/mx-chain-go/common"
"github.com/multiversx/mx-chain-go/state"
vmcommon "github.com/multiversx/mx-chain-vm-common-go"
)

type accountsAdapter struct {
Expand Down Expand Up @@ -99,6 +100,10 @@ func (a *accountsAdapter) RecreateTrieIfNeeded(_ common.RootHashHolder) error {
func (a *accountsAdapter) CancelPrune(_ []byte, _ state.TriePruningIdentifier) {
}

// ResetPruning -
func (a *accountsAdapter) ResetPruning() {
}

// SnapshotState -
func (a *accountsAdapter) SnapshotState(_ []byte, _ uint32) {
}
Expand Down Expand Up @@ -142,6 +147,11 @@ func (a *accountsAdapter) Close() error {
return nil
}

// GetEvictionWaitingListSize returns 0 for the disabled accounts adapter
func (a *accountsAdapter) GetEvictionWaitingListSize() int {
return 0
}

// IsInterfaceNil -
func (a *accountsAdapter) IsInterfaceNil() bool {
return a == nil
Expand Down
8 changes: 8 additions & 0 deletions integrationTests/mock/blockProcessorMock.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type BlockProcessorMock struct {
) error
OnExecutedBlockCalled func(header data.HeaderHandler, rootHash []byte) error
ProposedDirectSentTransactionsToBroadcastCalled func(proposedBody data.BodyHandler) map[string][][]byte
PruneTrieAsyncHeaderCalled func()
}

// ProcessBlock mocks processing a block
Expand Down Expand Up @@ -231,6 +232,13 @@ func (bpm *BlockProcessorMock) RemoveHeaderFromPool(headerHash []byte) {
}
}

// PruneTrieAsyncHeader -
func (bpm *BlockProcessorMock) PruneTrieAsyncHeader() {
if bpm.PruneTrieAsyncHeaderCalled != nil {
bpm.PruneTrieAsyncHeaderCalled()
}
}

// VerifyBlockProposal -
func (bpm *BlockProcessorMock) VerifyBlockProposal(
headerHandler data.HeaderHandler,
Expand Down
6 changes: 6 additions & 0 deletions process/asyncExecution/executionManager/executionManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/multiversx/mx-chain-go/process"
"github.com/multiversx/mx-chain-go/process/asyncExecution/cache"
"github.com/multiversx/mx-chain-go/process/asyncExecution/disabled"
"github.com/multiversx/mx-chain-go/process/asyncExecution/executionTrack"
"github.com/multiversx/mx-chain-go/sharding"
"github.com/multiversx/mx-chain-go/storage"
)
Expand Down Expand Up @@ -228,6 +229,11 @@ func (em *executionManager) RemovePendingExecutionResultsFromNonce(nonce uint64)
return em.executionResultsTracker.RemoveFromNonce(nonce)
}

// PopDismissedResults returns all batches of dismissed execution results and clears the internal queue
func (em *executionManager) PopDismissedResults() []executionTrack.DismissedBatch {
return em.executionResultsTracker.PopDismissedResults()
}

// ResetAndResumeExecution resets the managed components to the last notarized result and resumes execution
func (em *executionManager) ResetAndResumeExecution(lastNotarizedResult data.BaseExecutionResultHandler) error {
if check.IfNil(lastNotarizedResult) {
Expand Down
66 changes: 66 additions & 0 deletions process/asyncExecution/executionTrack/executionResultsTracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,24 @@ import (

var log = logger.GetOrCreate("process/asyncExecution/executionTrack")

const maxDismissedBatches = 100

// DismissedBatch holds a group of dismissed execution results alongside the anchor
// result that preceded them. The anchor's root hash is the "previous root hash"
// for the first dismissed result's EWL OldRoot entry.
type DismissedBatch struct {
AnchorResult data.BaseExecutionResultHandler
Results []data.BaseExecutionResultHandler
}

type executionResultsTracker struct {
lastNotarizedResult data.BaseExecutionResultHandler
mutex sync.RWMutex
executionResultsByHash map[string]data.BaseExecutionResultHandler
nonceHash *nonceHash
lastExecutedResultHash []byte
consensusCommittedHashes map[uint64][]byte // tracks which hash was committed by consensus for each nonce
dismissedBatches []DismissedBatch
}

// NewExecutionResultsTracker will create a new instance of *executionResultsTracker
Expand Down Expand Up @@ -211,6 +222,18 @@ func (ert *executionResultsTracker) cleanConfirmedExecutionResults(headerExecuti
if !areEqual {
ert.lastExecutedResultHash = lastMatchingHash

// Compute anchor for dismissed batch
var anchor data.BaseExecutionResultHandler
if idx > 0 {
anchor = pendingExecutionResult[idx-1]
} else {
anchor = ert.lastNotarizedResult
}
ert.addDismissedBatch(DismissedBatch{
AnchorResult: anchor,
Results: pendingExecutionResult[idx:],
})

// different execution result should clean everything starting from this execution result and return CleanResultMismatch
ert.cleanExecutionResults(pendingExecutionResult[idx:])

Expand Down Expand Up @@ -314,6 +337,14 @@ func (ert *executionResultsTracker) Clean(lastNotarizedResult data.BaseExecution
ert.mutex.Lock()
defer ert.mutex.Unlock()

pending, _ := ert.getPendingExecutionResults()
if len(pending) > 0 {
ert.addDismissedBatch(DismissedBatch{
AnchorResult: ert.lastNotarizedResult,
Results: pending,
})
}

ert.executionResultsByHash = make(map[string]data.BaseExecutionResultHandler)
ert.nonceHash = newNonceHash()

Expand Down Expand Up @@ -342,6 +373,21 @@ func (ert *executionResultsTracker) removePendingFromNonceUnprotected(nonce uint
return nil
}

// Compute anchor: last pending result before the dismissal point
var anchor data.BaseExecutionResultHandler
for _, result := range pendingExecutionResult {
if result.GetHeaderNonce() < nonce {
anchor = result
}
}
if anchor == nil {
anchor = ert.lastNotarizedResult
}
ert.addDismissedBatch(DismissedBatch{
AnchorResult: anchor,
Results: resultsToRemove,
})

// Remove from executionResultsByHash and nonceHash, but preserve consensusCommittedHashes
// to continue blocking stale results from being added for these nonces
ert.removeExecutionResultsFromMaps(resultsToRemove)
Expand All @@ -364,6 +410,26 @@ func (ert *executionResultsTracker) removePendingFromNonceUnprotected(nonce uint
return nil
}

func (ert *executionResultsTracker) addDismissedBatch(batch DismissedBatch) {
if len(ert.dismissedBatches) >= maxDismissedBatches {
log.Warn("dismissed batches queue is full, dropping oldest batch",
"maxDismissedBatches", maxDismissedBatches,
"droppedResults", len(ert.dismissedBatches[0].Results),
)
ert.dismissedBatches = ert.dismissedBatches[1:]
}
ert.dismissedBatches = append(ert.dismissedBatches, batch)
}

// PopDismissedResults returns all batches of dismissed execution results and clears the internal queue
func (ert *executionResultsTracker) PopDismissedResults() []DismissedBatch {
ert.mutex.Lock()
defer ert.mutex.Unlock()
batches := ert.dismissedBatches
ert.dismissedBatches = nil
return batches
}

// IsInterfaceNil returns true if there is no value under the interface
func (ert *executionResultsTracker) IsInterfaceNil() bool {
return ert == nil
Expand Down
Loading
Loading