@@ -37,21 +37,24 @@ public struct ProtocolConfig: Sendable, Codable, Equatable {
3737 // GR: The total gas allocated for a work-package’s Refine logic.
3838 public var workPackageRefineGas : Gas
3939
40+ // GT: The total gas allocated across all cores for Accumulation.
41+ public var totalAccumulationGas : Gas
42+
4043 // H = 8: The size of recent history, in blocks.
4144 public var recentHistorySize : Int
4245
4346 // I = 4: The maximum amount of work items in a package.
4447 public var maxWorkItems : Int
4548
49+ // J = 8: The maximum sum of dependency items in a work-report.
50+ public var maxDepsInWorkReport : Int
51+
4652 // K = 16: The maximum number of tickets which may be submitted in a single extrinsic.
4753 public var maxTicketsPerExtrinsic : Int
4854
4955 // L = 14, 400: The maximum age in timeslots of the lookup anchor.
5056 public var maxLookupAnchorAge : Int
5157
52- // WT = 128: The size of a transfer memo in octets.
53- public var transferMemoSize : Int
54-
5558 // N = 2: The number of ticket entries per validator.
5659 public var ticketEntriesPerValidator : Int
5760
@@ -67,16 +70,16 @@ public struct ProtocolConfig: Sendable, Codable, Equatable {
6770 // R = 10: The rotation period of validator-core assignments, in timeslots.
6871 public var coreAssignmentRotationPeriod : Int
6972
70- // S = 4,000,000: The maximum size of service code in octets.
71- public var maxServiceCodeSize : Int
72-
7373 // U = 5: The period in timeslots after which reported but unavailable work may be replaced.
7474 public var preimageReplacementPeriod : Int
7575
7676 // V = 1023: The total number of validators.
7777 public var totalNumberOfValidators : Int
7878
79- // WC = 684: The basic size of our erasure-coded pieces.
79+ // WC = 4,000,000: The maximum size of service code in octets.
80+ public var maxServiceCodeSize : Int
81+
82+ // WE = 684: The basic size of our erasure-coded pieces.
8083 public var erasureCodedPieceSize : Int
8184
8285 // WM = 2^11: The maximum number of entries in a work-package manifest.
@@ -92,6 +95,9 @@ public struct ProtocolConfig: Sendable, Codable, Equatable {
9295 // WS = 6: The size of an exported segment in erasure-coded pieces.
9396 public var erasureCodedSegmentSize : Int
9497
98+ // WT = 128: The size of a transfer memo in octets.
99+ public var transferMemoSize : Int
100+
95101 // Y = 500: The number of slots into an epoch at which ticket-submission ends.
96102 public var ticketSubmissionEndSlot : Int
97103
@@ -119,8 +125,10 @@ public struct ProtocolConfig: Sendable, Codable, Equatable {
119125 coreAccumulationGas: Gas ,
120126 workPackageAuthorizerGas: Gas ,
121127 workPackageRefineGas: Gas ,
128+ totalAccumulationGas: Gas ,
122129 recentHistorySize: Int ,
123130 maxWorkItems: Int ,
131+ maxDepsInWorkReport: Int ,
124132 maxTicketsPerExtrinsic: Int ,
125133 maxLookupAnchorAge: Int ,
126134 transferMemoSize: Int ,
@@ -154,8 +162,10 @@ public struct ProtocolConfig: Sendable, Codable, Equatable {
154162 self . coreAccumulationGas = coreAccumulationGas
155163 self . workPackageAuthorizerGas = workPackageAuthorizerGas
156164 self . workPackageRefineGas = workPackageRefineGas
165+ self . totalAccumulationGas = totalAccumulationGas
157166 self . recentHistorySize = recentHistorySize
158167 self . maxWorkItems = maxWorkItems
168+ self . maxDepsInWorkReport = maxDepsInWorkReport
159169 self . maxTicketsPerExtrinsic = maxTicketsPerExtrinsic
160170 self . maxLookupAnchorAge = maxLookupAnchorAge
161171 self . transferMemoSize = transferMemoSize
@@ -215,9 +225,13 @@ extension ProtocolConfig {
215225 ? other. workPackageAuthorizerGas : workPackageAuthorizerGas,
216226 workPackageRefineGas: other. workPackageRefineGas. value != 0
217227 ? other. workPackageRefineGas : workPackageRefineGas,
228+ totalAccumulationGas: other. totalAccumulationGas. value != 0
229+ ? other. totalAccumulationGas : totalAccumulationGas,
218230 recentHistorySize: other. recentHistorySize != 0
219231 ? other. recentHistorySize : recentHistorySize,
220232 maxWorkItems: other. maxWorkItems != 0 ? other. maxWorkItems : maxWorkItems,
233+ maxDepsInWorkReport: other. maxDepsInWorkReport != 0
234+ ? other. maxDepsInWorkReport : maxDepsInWorkReport,
221235 maxTicketsPerExtrinsic: other. maxTicketsPerExtrinsic != 0
222236 ? other. maxTicketsPerExtrinsic : maxTicketsPerExtrinsic,
223237 maxLookupAnchorAge: other. maxLookupAnchorAge != 0
@@ -295,8 +309,12 @@ extension ProtocolConfig {
295309 workPackageRefineGas = try decode (
296310 . workPackageRefineGas, defaultValue: Gas ( 0 ) , required: required
297311 )
312+ totalAccumulationGas = try decode (
313+ . totalAccumulationGas, defaultValue: Gas ( 0 ) , required: required
314+ )
298315 recentHistorySize = try decode ( . recentHistorySize, defaultValue: 0 , required: required)
299316 maxWorkItems = try decode ( . maxWorkItems, defaultValue: 0 , required: required)
317+ maxDepsInWorkReport = try decode ( . maxDepsInWorkReport, defaultValue: 0 , required: required)
300318 maxTicketsPerExtrinsic = try decode (
301319 . maxTicketsPerExtrinsic, defaultValue: 0 , required: required
302320 )
@@ -434,6 +452,14 @@ extension ProtocolConfig {
434452 }
435453 }
436454
455+ public enum TotalAccumulationGas : ReadGas {
456+ public typealias TConfig = ProtocolConfigRef
457+ public typealias TOutput = Gas
458+ public static func read( config: ProtocolConfigRef ) -> Gas {
459+ config. value. totalAccumulationGas
460+ }
461+ }
462+
437463 public enum RecentHistorySize : ReadInt {
438464 public typealias TConfig = ProtocolConfigRef
439465 public static func read( config: ProtocolConfigRef ) -> Int {
@@ -448,6 +474,13 @@ extension ProtocolConfig {
448474 }
449475 }
450476
477+ public enum MaxDepsInWorkReport : ReadInt {
478+ public typealias TConfig = ProtocolConfigRef
479+ public static func read( config: ProtocolConfigRef ) -> Int {
480+ config. value. maxDepsInWorkReport
481+ }
482+ }
483+
451484 public enum MaxTicketsPerExtrinsic : ReadInt {
452485 public typealias TConfig = ProtocolConfigRef
453486 public static func read( config: ProtocolConfigRef ) -> Int {
0 commit comments