@@ -5,7 +5,7 @@ sidebar_position: 1
55slug : /knowledge/advanced/simple-networking/spec
66---
77
8- (source https://github.com/zdave-parity/jam-np/blob/main/simple.md from 2025-09-19 )
8+ (source https://github.com/zdave-parity/jam-np/blob/main/simple.md from 2025-12-04 )
99
1010<!-- The raw MD from above will be downloaded and appended -->
1111 # JAM Simple Networking Protocol (JAMNP-S)
@@ -180,9 +180,12 @@ Core Index = u16
180180
181181Ed25519 Signature = [u8; 64]
182182
183+ Segments-Root = [u8; 32]
183184Erasure-Root = [u8; 32]
184185Shard Index = u16
186+ Work-Package Bundle = [u8] (Encoded as in GP)
185187Bundle Shard = [u8]
188+ Segment = [u8; 4104]
186189Segment Shard = [u8; 4104 / R] (R is the recovery threshold; 342 with 1023 validators, 2 with 6)
187190```
188191
@@ -362,8 +365,9 @@ Submission of a work-package from a builder to a guarantor.
362365The second message should contain all the extrinsic data referenced by the work-package, formatted
363366as in work-package bundles, which are defined in the Computation of Work Results section of the GP.
364367
365- Note that the content of imported segments _ should not_ be sent; it is the responsibility of the
366- receiving guarantor to fetch this data from the availability system.
368+ Note that if the builder can provide the content of imported segments, CE 146 should be used to submit
369+ the full work-package bundle. Otherwise it is the responsibility of the receiving guarantor to fetch
370+ this data from the availability system.
367371
368372```
369373Work-Package = As in GP
@@ -377,6 +381,31 @@ Builder -> Guarantor
377381<-- FIN
378382```
379383
384+ ### CE 146: Work-package bundle submission
385+
386+ Submission of a complete work-package bundle from a builder to a guarantor.
387+
388+ Note that the bundle parts are sent in separate messages to allow for authorizing the work-package before reading the rest of the bundle.
389+
390+ The import proof corresponds to $\mathit{J}$ as defined in the gray paper.
391+
392+ ```
393+ Work-Package = As in GP
394+ Extrinsic = [u8]
395+ Import-Proof = len++[Hash]
396+ Segments-Root Mappings = len++[Work-Package Hash ++ Segments-Root]
397+
398+ Builder -> Guarantor
399+
400+ --> Core Index ++ Segments-Root Mappings
401+ --> Work-Package
402+ --> [Extrinsic] (Message size should equal sum of extrinsic data lengths)
403+ --> [Segment] (All imported segments)
404+ --> [Import-Proof] (Import proofs for all imported segments)
405+ --> FIN
406+ <-- FIN
407+ ```
408+
380409### CE 134: Work-package sharing
381410
382411Sharing of a work-package between guarantors on the same core assignment.
@@ -406,9 +435,7 @@ mappings cannot be verified, the guarantor may, at their discretion, either refu
406435work-package or blindly trust the mappings.
407436
408437```
409- Segments-Root = [u8; 32]
410438Segments-Root Mappings = len++[Work-Package Hash ++ Segments-Root]
411- Work-Package Bundle = As in GP
412439
413440Guarantor -> Guarantor
414441
@@ -541,6 +568,21 @@ Auditor -> Assurer
541568<-- FIN
542569```
543570
571+ ### CE 147: Bundle request
572+
573+ Request for a work-package bundle.
574+
575+ This protocol should be used by auditors to request work-package bundle from guarantors
576+ for auditing. In case the guarantor fails to provide the valid bundle, the auditor should fall back to recovering the bundle with CE 138
577+ ```
578+ Auditor -> Guarantor
579+
580+ --> Erasure-Root
581+ --> FIN
582+ <-- Work-Package Bundle
583+ <-- FIN
584+ ```
585+
544586### CE 139/140: Segment shard request
545587
546588Request for one or more segment shards.
@@ -594,6 +636,31 @@ Guarantor -> Assurer
594636<-- FIN
595637```
596638
639+ ### CE 148: Segment request
640+
641+ Request for one or more segments.
642+
643+ This protocol should be used by guarantors or builders to request import segments from other guarantors in order
644+ to complete work-package bundles.
645+
646+ The number of segments requested in a single stream should not exceed $W_M$ ($W_M = 3072$,
647+ this constant is defined in the GP).
648+
649+ If the guarantor fails to return the valid data, the requestor should fall back to using CE 139/140
650+
651+ ```
652+ Segment Index = u16
653+ Import-Proof = len++[Hash]
654+
655+ Guarantor -> Guarantor
656+
657+ --> [Segments-Root ++ len++[Segment Index]]
658+ --> FIN
659+ <-- [Segment]
660+ <-- [Import-Proof]
661+ <-- FIN
662+ ```
663+
597664### CE 141: Assurance distribution
598665
599666Distribution of an availability assurance ready for inclusion in a block.
@@ -654,7 +721,7 @@ is expected to be checked against a different database.
654721```
655722Preimage = [u8]
656723
657- Node -> Node
724+ Validator -> Node
658725
659726--> Hash
660727--> FIN
0 commit comments