@@ -98,8 +98,15 @@ const (
9898 codeTransactionIDByScheduledTransactionID = 82 // index of transaction ID by scheduled transaction ID
9999 codeBlockIDByScheduledTransactionID = 83 // index of block ID by scheduled transaction ID
100100
101+ // The storage prefixes `codeChunkDataPack` and `codeIndexChunkDataPackByChunkID` are used primarily by execution nodes
102+ // to persist their own results for chunks they executed.
103+ // - `codeIndexChunkDataPackByChunkID` stores the chunkID → chunkDataPackID index, and
104+ // - `codeChunkDataPack` stores the chunk data pack by its own ID.
105+ // This breakup allows us to store chunk data packs in a different database in a concurrent safe way.
106+ codeIndexChunkDataPackByChunkID = 99
107+ codeChunkDataPack = 100
108+
101109 // legacy codes (should be cleaned up)
102- codeChunkDataPack = 100
103110 codeCommit = 101
104111 codeEvent = 102
105112 codeExecutionStateInteractions = 103
@@ -111,15 +118,10 @@ const (
111118 codeLightTransactionResultIndex = 109
112119 codeTransactionResultErrorMessage = 110
113120 codeTransactionResultErrorMessageIndex = 111
114- // Compared to the deprecated `codeChunkDataPack`, which stored chunkID -> storedChunkDataPack relationship:
115- // - `codeIndexChunkDataPackByChunkID` stores the chunkID->chunkDataPackID index, and
116- // - `codeChunkDataPack` stores chunkDataPackID -> storedChunkDataPack relationship.
117- // This breakup allows us to store chunk data packs in a different database in a concurrent safe way
118- codeIndexChunkDataPackByChunkID = 112
119- codeIndexCollection = 200
120- codeIndexExecutionResultByBlock = 202
121- codeIndexCollectionByTransaction = 203
122- codeIndexResultApprovalByChunk = 204
121+ codeIndexCollection = 200
122+ codeIndexExecutionResultByBlock = 202
123+ codeIndexCollectionByTransaction = 203
124+ codeIndexResultApprovalByChunk = 204
123125
124126 // TEMPORARY codes
125127 disallowedNodeIDs = 205 // manual override for adding node IDs to list of ejected nodes, applies to networking layer only
0 commit comments