@@ -9,47 +9,73 @@ import (
99// to be saved for a block. It has all the default fields
1010// plus some extra information for ease of search and filter
1111type Block struct {
12- UUID string `json:"uuid"`
13- Nonce uint64 `json:"nonce"`
14- Round uint64 `json:"round"`
15- Epoch uint32 `json:"epoch"`
16- Hash string `json:"-"`
17- MiniBlocksHashes []string `json:"miniBlocksHashes"`
18- MiniBlocksDetails []* MiniBlocksDetails `json:"miniBlocksDetails,omitempty"`
19- NotarizedBlocksHashes []string `json:"notarizedBlocksHashes"`
20- Proposer uint64 `json:"proposer"`
21- Validators []uint64 `json:"validators,omitempty"`
22- PubKeyBitmap string `json:"pubKeyBitmap"`
23- Size int64 `json:"size"`
24- SizeTxs int64 `json:"sizeTxs"`
25- Timestamp uint64 `json:"timestamp"`
26- TimestampMs uint64 `json:"timestampMs,omitempty"`
27- StateRootHash string `json:"stateRootHash"`
28- PrevHash string `json:"prevHash"`
29- ShardID uint32 `json:"shardId"`
30- TxCount uint32 `json:"txCount"`
31- NotarizedTxsCount uint32 `json:"notarizedTxsCount"`
32- AccumulatedFees string `json:"accumulatedFees"`
33- DeveloperFees string `json:"developerFees"`
34- EpochStartBlock bool `json:"epochStartBlock"`
35- SearchOrder uint64 `json:"searchOrder"`
36- EpochStartInfo * EpochStartInfo `json:"epochStartInfo,omitempty"`
37- GasProvided uint64 `json:"gasProvided"`
38- GasRefunded uint64 `json:"gasRefunded"`
39- GasPenalized uint64 `json:"gasPenalized"`
40- MaxGasLimit uint64 `json:"maxGasLimit"`
41- ScheduledData * ScheduledData `json:"scheduledData,omitempty"`
42- EpochStartShardsData []* EpochStartShardData `json:"epochStartShardsData,omitempty"`
43- Proof * api.HeaderProof `json:"proof,omitempty"`
44- RandSeed string `json:"randSeed,omitempty"`
45- PrevRandSeed string `json:"prevRandSeed,omitempty"`
46- Signature string `json:"signature,omitempty"`
47- LeaderSignature string `json:"leaderSignature,omitempty"`
48- ChainID string `json:"chainID,omitempty"`
49- SoftwareVersion string `json:"softwareVersion,omitempty"`
50- ReceiptsHash string `json:"receiptsHash,omitempty"`
51- Reserved []byte `json:"reserved,omitempty"`
52- ProposerBlsKey string `json:"proposerBlsKey,omitempty"`
12+ UUID string `json:"uuid"`
13+ Nonce uint64 `json:"nonce"`
14+ Round uint64 `json:"round"`
15+ Epoch uint32 `json:"epoch"`
16+ Hash string `json:"-"`
17+ MiniBlocksHashes []string `json:"miniBlocksHashes"`
18+ MiniBlocksDetails []* MiniBlocksDetails `json:"miniBlocksDetails,omitempty"`
19+ NotarizedBlocksHashes []string `json:"notarizedBlocksHashes"`
20+ Proposer uint64 `json:"proposer"`
21+ Validators []uint64 `json:"validators,omitempty"`
22+ PubKeyBitmap string `json:"pubKeyBitmap"`
23+ Size int64 `json:"size"`
24+ SizeTxs int64 `json:"sizeTxs"`
25+ Timestamp uint64 `json:"timestamp"`
26+ TimestampMs uint64 `json:"timestampMs,omitempty"`
27+ StateRootHash string `json:"stateRootHash"`
28+ PrevHash string `json:"prevHash"`
29+ ShardID uint32 `json:"shardId"`
30+ TxCount uint32 `json:"txCount"`
31+ NotarizedTxsCount uint32 `json:"notarizedTxsCount"`
32+ AccumulatedFees string `json:"accumulatedFees"`
33+ DeveloperFees string `json:"developerFees"`
34+ EpochStartBlock bool `json:"epochStartBlock"`
35+ SearchOrder uint64 `json:"searchOrder"`
36+ EpochStartInfo * EpochStartInfo `json:"epochStartInfo,omitempty"`
37+ GasProvided uint64 `json:"gasProvided"`
38+ GasRefunded uint64 `json:"gasRefunded"`
39+ GasPenalized uint64 `json:"gasPenalized"`
40+ MaxGasLimit uint64 `json:"maxGasLimit"`
41+ ScheduledData * ScheduledData `json:"scheduledData,omitempty"`
42+ EpochStartShardsData []* EpochStartShardData `json:"epochStartShardsData,omitempty"`
43+ Proof * api.HeaderProof `json:"proof,omitempty"`
44+ RandSeed string `json:"randSeed,omitempty"`
45+ PrevRandSeed string `json:"prevRandSeed,omitempty"`
46+ Signature string `json:"signature,omitempty"`
47+ LeaderSignature string `json:"leaderSignature,omitempty"`
48+ ChainID string `json:"chainID,omitempty"`
49+ SoftwareVersion string `json:"softwareVersion,omitempty"`
50+ ReceiptsHash string `json:"receiptsHash,omitempty"`
51+ Reserved []byte `json:"reserved,omitempty"`
52+ ProposerBlsKey string `json:"proposerBlsKey,omitempty"`
53+ ExecutionResultBlockHashes []string `json:"executionResultBlockHashes,omitempty"`
54+ }
55+
56+ // ExecutionResult is a structure containing all the fields that need
57+ //
58+ // to be saved for an execution results.
59+ type ExecutionResult struct {
60+ UUID string `json:"uuid"`
61+ Hash string `json:"-"`
62+ RootHash string `json:"rootHash"`
63+ NotarizedInBlockHash string `json:"notarizedInBlockHash"`
64+ AccumulatedFees string `json:"accumulatedFees"`
65+ DeveloperFees string `json:"developerFees"`
66+ TxCount uint64 `json:"txCount"`
67+ GasUsed uint64 `json:"gasUsed"`
68+ Nonce uint64 `json:"nonce"`
69+ Round uint64 `json:"round"`
70+ Epoch uint32 `json:"epoch"`
71+ MiniBlocksHashes []string `json:"miniBlocksHashes"`
72+ MiniBlocksDetails []* MiniBlocksDetails `json:"miniBlocksDetails,omitempty"`
73+ }
74+
75+ // PreparedBlockResults is the DTO that holds all the results after processing a block
76+ type PreparedBlockResults struct {
77+ Block * Block
78+ ExecutionResults []* ExecutionResult
5379}
5480
5581// MiniBlocksDetails is a structure that hold information about mini-blocks execution details
0 commit comments