Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
210bf07
update proto
AdoAdoAdo Sep 15, 2025
8888495
update header handler and add set functions for execution results
AdoAdoAdo Sep 15, 2025
44bdaa2
update the header interface and the other implementations
AdoAdoAdo Sep 15, 2025
ffa6752
Update data/block/executionResult.proto
AdoAdoAdo Sep 15, 2025
f549122
unittests for previous changes
sstanculeanu Sep 15, 2025
746fdaf
fix json tag
AdoAdoAdo Sep 16, 2025
62363e1
Merge pull request #395 from multiversx/change-execution-results-unit…
AdoAdoAdo Sep 16, 2025
d3ab229
fix comments
AdoAdoAdo Sep 16, 2025
e06d55e
Merge branch 'change-execution-results' of github.com:multiversx/mx-c…
AdoAdoAdo Sep 16, 2025
e31b527
Merge pull request #394 from multiversx/change-execution-results
AdoAdoAdo Sep 16, 2025
99b300d
extended api block
miiu96 Aug 19, 2025
a5d8104
api execution result
miiu96 Sep 18, 2025
c64c1bb
fixes
miiu96 Sep 18, 2025
2df5a4e
change epoch type
miiu96 Sep 18, 2025
ca96e9e
update block types Supernova
AdoAdoAdo Sep 26, 2025
537434b
Merge pull request #396 from multiversx/api-execution-result-after-merge
miiu96 Sep 29, 2025
ced445d
Merge branch 'feat/supernova-async-exec' of github.com:multiversx/mx-…
AdoAdoAdo Sep 29, 2025
c2bf212
extra field meta block v3
miiu96 Sep 30, 2025
61456f4
extra methods
miiu96 Oct 1, 2025
e9eafa7
fix linter
miiu96 Oct 1, 2025
be325b3
add SetMiniBlockHeadersHandlers
AdoAdoAdo Oct 2, 2025
d818217
remove the un executable block type
AdoAdoAdo Oct 3, 2025
cd12889
add unit tests
AdoAdoAdo Oct 6, 2025
ff8e601
extra checks
AdoAdoAdo Oct 6, 2025
6bc1921
Merge pull request #402 from multiversx/update-execution-result-handler
AdoAdoAdo Oct 6, 2025
c1e8eb2
Merge pull request #400 from multiversx/extra-field-meta-v3
miiu96 Oct 8, 2025
b8a298d
extend chain handler to include last executed block info
ssd04 Oct 20, 2025
46c8ae5
set epoch shart handler
AdoAdoAdo Oct 20, 2025
251cec7
Merge pull request #404 from multiversx/updates-meta-block-v3
AdoAdoAdo Oct 22, 2025
1bb235b
Merge pull request #406 from multiversx/merge-master-into-rc/supernov…
sstanculeanu Oct 22, 2025
6c0233b
Merge branch 'rc/supernova' of https://github.com/multiversx/mx-chain…
sstanculeanu Oct 22, 2025
a99e14e
fix after merge: brought back error
sstanculeanu Oct 22, 2025
22f9707
Merge pull request #409 from multiversx/merge-rc-supernova-into-feat/…
sstanculeanu Oct 24, 2025
b095563
shardDataProposal
sstanculeanu Oct 27, 2025
ff06ba9
Merge branch 'feat/supernova-async-exec' into extend-chain-handler
ssd04 Oct 28, 2025
580fe39
Added integrity checkd for header V3 and unit tests
mradian1 Oct 29, 2025
c4d156d
Added genesis handling and unit tests
mradian1 Oct 30, 2025
1ae429e
MX-17279 Added checks for must be nil conditions on several fields
mradian1 Oct 30, 2025
8b022e1
shardDataProposal extra getter/setter
sstanculeanu Oct 31, 2025
11fb098
Merge pull request #405 from multiversx/extend-chain-handler
ssd04 Nov 3, 2025
9fa760b
Merge branch 'feat/supernova-async-exec' of https://github.com/multiv…
sstanculeanu Nov 3, 2025
1dd9514
fixes after review
sstanculeanu Nov 4, 2025
fe86f38
MX-17249 Added fields integrity checks for meta header v3
mradian1 Nov 4, 2025
7349eb0
Merge pull request #410 from multiversx/shard-data-proposal
sstanculeanu Nov 4, 2025
1e325c2
added num pending miniblocks on shard data proposal
sstanculeanu Nov 5, 2025
5517211
fix linter
sstanculeanu Nov 5, 2025
2eedb1f
MX-17279 Fixes after review
mradian1 Nov 5, 2025
f8d7d3d
MX-17279 Added Todos for implementing CheckFieldsIntegrity for meta
mradian1 Nov 5, 2025
5a51774
export equal method for shard info handler interfaces
AdoAdoAdo Nov 5, 2025
0f3ef75
Merge pull request #413 from multiversx/equal-shard-info-handlers
sstanculeanu Nov 5, 2025
ee30be2
Merge branch 'feat/supernova-async-exec' of https://github.com/multiv…
sstanculeanu Nov 5, 2025
4875e9e
add set current block header
ssd04 Nov 5, 2025
7b89506
last executed header methods
ssd04 Nov 6, 2025
2f5ca76
Merge pull request #411 from multiversx/validation-new-headers
AdoAdoAdo Nov 6, 2025
9084e42
MX-17249 removed genesis conditions, added unit test
mradian1 Nov 6, 2025
5fa1c4e
Merge remote-tracking branch 'origin/feat/supernova-async-exec' into …
mradian1 Nov 6, 2025
7278559
Merge pull request #412 from multiversx/num-pending-on-shard-data-pro…
sstanculeanu Nov 6, 2025
e515033
updates
miiu96 Nov 6, 2025
0bbd415
Merge branch 'feat/supernova-async-exec' into extend-chain-handler-2
ssd04 Nov 6, 2025
30fc247
Merge pull request #414 from multiversx/extend-chain-handler-2
AdoAdoAdo Nov 6, 2025
dd79366
update chain handler
ssd04 Nov 6, 2025
da2facd
update chain handler
ssd04 Nov 6, 2025
bdd7219
MX-17249 Added unit tests
mradian1 Nov 6, 2025
1df9a06
MX-17249 Fixes after copilot review
mradian1 Nov 7, 2025
218d35f
Merge pull request #417 from multiversx/chain-handler-execution-info
AdoAdoAdo Nov 7, 2025
28cfc7a
Merge remote-tracking branch 'origin/feat/supernova-async-exec' into …
mradian1 Nov 7, 2025
162b802
FEAT: GetMiniBlockHeadersWithDst returns finalized executed mbs
mariusmihaic Nov 7, 2025
a7c7d5c
FEAT: Add GetProposedMiniBlockHeadersWithDst and common functionalities
mariusmihaic Nov 10, 2025
4ba1604
extend outport structure
miiu96 Nov 10, 2025
4799708
MX-17279 - Added checks for more fields in meta execution result and …
mradian1 Nov 10, 2025
9d980e8
FEAT: GetProposedMiniBlockHeadersWithDst unit tests and common functi…
mariusmihaic Nov 10, 2025
45aed58
extra fields
miiu96 Nov 10, 2025
7437907
Merge branch 'feat/supernova-async-exec' into outport-block-update-he…
miiu96 Nov 10, 2025
9dec9c7
MX-17279 - Fixes after review
mradian1 Nov 10, 2025
baa24b2
Merge pull request #415 from multiversx/validation-new-meta-headers
mradian1 Nov 11, 2025
5e27a00
FIX: After review
mariusmihaic Nov 11, 2025
e5fb997
FIX: Unit test
mariusmihaic Nov 11, 2025
481b6cd
Merge pull request #418 from multiversx/MX-17302-get-mb-headers-with-…
AdoAdoAdo Nov 12, 2025
e84bcb6
change name and extra field
miiu96 Nov 13, 2025
347994c
small fix
miiu96 Nov 13, 2025
0275a81
FEAT: Add GetEpoch method to interface for epoch retrieval
AdoAdoAdo Nov 14, 2025
d43ba82
update chain handler with last execution result
AdoAdoAdo Nov 17, 2025
fccb3d1
Merge branch 'feat/supernova-async-exec' into outport-block-update-he…
miiu96 Nov 19, 2025
64e9daf
fixes after review
miiu96 Nov 19, 2025
24a8058
fix
miiu96 Nov 19, 2025
b868208
extend interface
ssd04 Nov 19, 2025
6b72c65
Merge pull request #420 from multiversx/extend-epoch-start-shard-handler
AdoAdoAdo Nov 19, 2025
b084c60
Merge pull request #416 from multiversx/outport-block-update-header-a…
miiu96 Nov 21, 2025
cc27cc8
Merge pull request #419 from multiversx/meta-processing
AdoAdoAdo Nov 21, 2025
6b59946
adapt stateAccesses to supernova changes
BeniaminDrasovean Nov 25, 2025
6b5ce98
renaming
BeniaminDrasovean Nov 25, 2025
d5c8e7b
export stateAccessesForBlock as map
BeniaminDrasovean Nov 27, 2025
a0196c9
FEAT: Meta trigger registry v3 proto
mariusmihaic Nov 28, 2025
18b825f
FEAT: Interface for meta trigger registry
mariusmihaic Nov 28, 2025
99f8b28
FEAT: SetEpoch in MetaTriggerRegistryHandler
mariusmihaic Nov 28, 2025
c84ebac
FEAT: Unit tests for full coverage
mariusmihaic Dec 2, 2025
814023d
DOC: Missing comm
mariusmihaic Dec 2, 2025
60bc94b
getOrderedCrossMiniBlocksWithDst should return executed miniblocks
AdoAdoAdo Dec 2, 2025
34d0af6
small refactor and fix failing tests
BeniaminDrasovean Dec 3, 2025
4b517e3
Merge pull request #422 from multiversx/MX-17370-meta-v3-trigger-regi…
AdoAdoAdo Dec 3, 2025
e9cd706
remove duplicated code
BeniaminDrasovean Dec 3, 2025
527d6c7
add AllShardID check
AdoAdoAdo Dec 3, 2025
26c12b2
remove duplicated code
AdoAdoAdo Dec 3, 2025
0b12099
Merge remote-tracking branch 'origin/feat/supernova-async-exec' into …
AdoAdoAdo Dec 3, 2025
05f0fc6
unexport funcs
AdoAdoAdo Dec 3, 2025
6b47d8a
unexport funcs
AdoAdoAdo Dec 3, 2025
03b31cc
Merge pull request #423 from multiversx/final-cross-shard-mbs-referen…
AdoAdoAdo Dec 3, 2025
d2ad08b
Merge remote-tracking branch 'origin/feat/supernova-async-exec' into …
BeniaminDrasovean Dec 4, 2025
6563116
added logDataHandler interface
sstanculeanu Dec 5, 2025
e807828
updated logData
sstanculeanu Dec 5, 2025
452dc72
getter for logHandler
sstanculeanu Dec 5, 2025
7e23fce
updated interface
sstanculeanu Dec 5, 2025
afb8148
proper logData struct
sstanculeanu Dec 5, 2025
1631f01
removed debug log
sstanculeanu Dec 5, 2025
7b923c0
update GetHeaderBytesAndType func with supernova headers
BeniaminDrasovean Dec 8, 2025
48547ee
Merge pull request #425 from multiversx/logDataHandler
sstanculeanu Dec 8, 2025
ad3638b
Merge pull request #426 from multiversx/get-header-type-update
BeniaminDrasovean Dec 8, 2025
f2d0282
Merge remote-tracking branch 'origin/feat/supernova-async-exec' into …
BeniaminDrasovean Dec 8, 2025
28456d4
removed duplicated logData
sstanculeanu Dec 8, 2025
a053bc6
Merge pull request #427 from multiversx/duplicated-log-data
sstanculeanu Dec 8, 2025
6ef95ad
Merge remote-tracking branch 'origin/feat/supernova-async-exec' into …
BeniaminDrasovean Dec 8, 2025
658ba67
fix after merge
BeniaminDrasovean Dec 8, 2025
2b266c6
add shard trigger v3
ssd04 Dec 11, 2025
5984187
Merge pull request #428 from multiversx/shard-trigger-v3
AdoAdoAdo Dec 11, 2025
1d518f1
Merge remote-tracking branch 'origin/feat/supernova-async-exec' into …
BeniaminDrasovean Dec 16, 2025
a02123e
fix getting ordered cross miniBlocks with destination.
AdoAdoAdo Dec 16, 2025
bcbea61
rename
AdoAdoAdo Dec 16, 2025
01b870a
Merge pull request #429 from multiversx/fix-ordered-cross-mbs
AdoAdoAdo Dec 16, 2025
e36a883
Merge branch 'feat/supernova-async-exec' into stateAccesses-for-super…
BeniaminDrasovean Jan 12, 2026
5951813
Merge pull request #421 from multiversx/stateAccesses-for-supernova
BeniaminDrasovean Jan 19, 2026
7407465
extend structures
miiu96 Jan 30, 2026
9865f31
Merge pull request #430 from multiversx/extend-outpot-structures
miiu96 Jan 30, 2026
fc549fe
deprecate stateAccesses and use stateAccessesForBlock
BeniaminDrasovean Feb 10, 2026
8354a71
change json field name
BeniaminDrasovean Feb 10, 2026
c268d7d
fix LogData
BeniaminDrasovean Feb 10, 2026
184d4fb
small rename for jsontag
BeniaminDrasovean Feb 10, 2026
d16453c
Merge pull request #431 from multiversx/state-accesses-backwards-inco…
BeniaminDrasovean Feb 10, 2026
015123f
extra fields outport block
miiu96 Feb 19, 2026
014ae9f
Merge pull request #432 from multiversx/header-gas-cosuption-executio…
miiu96 Feb 19, 2026
41a7420
Merge pull request #378 from multiversx/feat/supernova-async-exec
sstanculeanu Apr 3, 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
4 changes: 4 additions & 0 deletions core/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ type HeaderType string
const (
// MetaHeader defines the type of *block.MetaBlock
MetaHeader HeaderType = "MetaBlock"
// MetaHeaderV3 defines the type of *block.MetaBlockV3
MetaHeaderV3 HeaderType = "MetaBlockV3"
// ShardHeaderV1 defines the type of *block.Header
ShardHeaderV1 HeaderType = "Header"
// ShardHeaderV2 defines the type of *block.HeaderV2
ShardHeaderV2 HeaderType = "HeaderV2"
// ShardHeaderV3 defines the type of *block.HeaderV3
ShardHeaderV3 HeaderType = "HeaderV3"
)

// NodeType represents the node's role in the network
Expand Down
26 changes: 26 additions & 0 deletions data/api/apiBlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ type Block struct {
EpochStartShardsData []*EpochStartShardData `json:"epochStartShardsData,omitempty"`
ScheduledData *ScheduledData `json:"scheduledData,omitempty"`
Proof *HeaderProof `json:"proof,omitempty"`
LastExecutionResult *ExecutionResult `json:"lastExecutionResult,omitempty"`
ExecutionResults []*ExecutionResult `json:"executionResults,omitempty"`
}

// HeaderProof is a structure that hold information about header proof
Expand All @@ -53,6 +55,30 @@ type HeaderProof struct {
IsStartOfEpoch bool `json:"isStartOfEpoch,omitempty"`
}

// ExecutionResultInfo is a structure that holds information about an execution result and some extra field
type ExecutionResultInfo struct {
ExecutionResult ExecutionResult `json:"executionResult"`
NotarizedAtHeaderHash string `json:"notarizedAtHeaderHash"`
}

// ExecutionResult is a structure that holds information about execution results
type ExecutionResult struct {
HeaderHash string `json:"headerHash"`
HeaderNonce uint64 `json:"headerNonce"`
HeaderRound uint64 `json:"headerRound"`
HeaderEpoch uint32 `json:"headerEpoch"`
RootHash string `json:"rootHash"`
ReceiptsHash string `json:"receiptsHash"`
MiniBlocks []*MiniBlock `json:"miniBlocks,omitempty"`
DeveloperFees string `json:"developerFees,omitempty"`
AccumulatedFees string `json:"accumulatedFees,omitempty"`
GasUsed uint64 `json:"gasUsed,omitempty"`
ExecutedTxCount uint64 `json:"executedTxCount,omitempty"`
ValidatorStatsRootHash string `json:"validatorStatsRootHash,omitempty"`
AccumulatedFeesInEpoch string `json:"accumulatedFeesInEpoch,omitempty"`
DevFeesInEpoch string `json:"devFeesInEpoch,omitempty"`
}

// ScheduledData is a structure that hold information about scheduled events
type ScheduledData struct {
ScheduledRootHash string `json:"rootHash,omitempty"`
Expand Down
74 changes: 55 additions & 19 deletions data/block/block.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//go:generate protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/multiversx/protobuf/protobuf --gogoslick_out=$GOPATH/src block.proto
//go:generate protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/multiversx/protobuf/protobuf --gogoslick_out=. block.proto

package block

import (
Expand Down Expand Up @@ -206,40 +207,31 @@ func (h *Header) SetShardID(shId uint32) error {
return nil
}

// GetMiniBlockHeadersWithDst as a map of hashes and sender IDs
// GetMiniBlockHeadersWithDst returns a map of hashes and sender IDs
func (h *Header) GetMiniBlockHeadersWithDst(destId uint32) map[string]uint32 {
if h == nil {
return nil
}

hashDst := make(map[string]uint32)
for _, val := range h.MiniBlockHeaders {
if val.ReceiverShardID == destId && val.SenderShardID != destId {
hashDst[string(val.Hash)] = val.SenderShardID
}
}
addShardMBHeadersMBToDestMap(h.MiniBlockHeaders, hashDst, destId)

return hashDst
}

// GetProposedMiniBlockHeadersWithDst returns empty map, as this method just implements the interface needed for supernova
func (h *Header) GetProposedMiniBlockHeadersWithDst(_ uint32) map[string]uint32 {
return make(map[string]uint32)
}

// GetOrderedCrossMiniblocksWithDst gets all cross miniblocks with the given destination shard ID, ordered in a
// chronological way, taking into consideration the round in which they were created/executed in the sender shard
func (h *Header) GetOrderedCrossMiniblocksWithDst(destId uint32) []*data.MiniBlockInfo {
if h == nil {
return nil
}
miniBlocks := make([]*data.MiniBlockInfo, 0)

for _, mb := range h.MiniBlockHeaders {
if mb.ReceiverShardID == destId && mb.SenderShardID != destId {
miniBlocks = append(miniBlocks, &data.MiniBlockInfo{
Hash: mb.Hash,
SenderShardID: mb.SenderShardID,
Round: h.Round,
})
}
}

return miniBlocks
return getOrderedCrossMiniblocksWithDst(h.MiniBlockHeaders, h.Round, destId)
}

// GetMiniBlockHeadersHashes gets the miniblock hashes
Expand Down Expand Up @@ -594,6 +586,39 @@ func (h *Header) GetAdditionalData() headerVersionData.HeaderAdditionalData {
return nil
}

// GetGasLimit always returns 0
func (h *Header) GetGasLimit() uint32 {
return 0
}

// GetExecutionResultsHandlers always returns nil
func (h *Header) GetExecutionResultsHandlers() []data.BaseExecutionResultHandler {
return nil
}

// GetLastExecutionResultHandler always returns nil
func (h *Header) GetLastExecutionResultHandler() data.LastExecutionResultHandler {
return nil
}

// SetLastExecutionResultHandler always returns an error as v1 Header has no support for execution results
func (h *Header) SetLastExecutionResultHandler(_ data.LastExecutionResultHandler) error {
if h == nil {
return data.ErrNilPointerReceiver
}

return data.ErrFieldNotSupported
}

// SetExecutionResultsHandlers always returns an error as v1 Header has no support for execution results
func (h *Header) SetExecutionResultsHandlers(_ []data.BaseExecutionResultHandler) error {
if h == nil {
return data.ErrNilPointerReceiver
}

return data.ErrFieldNotSupported
}

// CheckFieldsForNil checks a predefined set of fields for nil values
func (h *Header) CheckFieldsForNil() error {
if h == nil {
Expand Down Expand Up @@ -626,3 +651,14 @@ func (h *Header) CheckFieldsForNil() error {

return nil
}

// CheckFieldsIntegrity checks a predefined set of fields for integrity - included for backward compatibility
// TODO check if we can implement meaningful integrity checks for v1 header
func (h *Header) CheckFieldsIntegrity() error {
return nil
}

// IsHeaderV3 returns false as the first header version is not v3
func (h *Header) IsHeaderV3() bool {
return false
}
Loading
Loading