From 9ed7c6640fa5bbcb0fc20367a53c3b191f53f4c8 Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Wed, 22 Jan 2020 10:02:37 -0800 Subject: [PATCH 1/3] feat: require deterministic map serialization --- data-model-layer/data-model.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data-model-layer/data-model.md b/data-model-layer/data-model.md index c337c9c9..d85d44eb 100644 --- a/data-model-layer/data-model.md +++ b/data-model-layer/data-model.md @@ -115,6 +115,8 @@ Map is a recursive kind. Values in maps are accessed by their "key". Maps can also be iterated over, yielding key+value pairs. +**Maps must be serialized in a deterministic way (key sorting should be consistent regardless of insertion order or language specific sorting).** The sorting is not defined by the data model, each codec should find the best sorting algorithm, but the sorting must be consitent between languages and is most often implemented as additional code during serialization since most formats do not already have deterministic maps. + #### Link kind A link represents a link to another IPLD Block. The link reference From 64b587d691729f9688ad8156dbd8d537d89670a4 Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Thu, 23 Jan 2020 10:36:39 -0800 Subject: [PATCH 2/3] fix: unnecessary bolding --- data-model-layer/data-model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-model-layer/data-model.md b/data-model-layer/data-model.md index d85d44eb..ed8529b0 100644 --- a/data-model-layer/data-model.md +++ b/data-model-layer/data-model.md @@ -115,7 +115,7 @@ Map is a recursive kind. Values in maps are accessed by their "key". Maps can also be iterated over, yielding key+value pairs. -**Maps must be serialized in a deterministic way (key sorting should be consistent regardless of insertion order or language specific sorting).** The sorting is not defined by the data model, each codec should find the best sorting algorithm, but the sorting must be consitent between languages and is most often implemented as additional code during serialization since most formats do not already have deterministic maps. +Maps must be serialized in a deterministic way (key sorting should be consistent regardless of insertion order or language specific sorting). The sorting is not defined by the data model, each codec should find the best sorting algorithm, but the sorting must be consitent between languages and is most often implemented as additional code during serialization since most formats do not already have deterministic maps. #### Link kind From 826962e8c9b8d4ce302a9d4a4c98ab6ff1b6638f Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Mon, 27 Jan 2020 10:22:21 -0800 Subject: [PATCH 3/3] Update data-model-layer/data-model.md Co-Authored-By: Volker Mische --- data-model-layer/data-model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-model-layer/data-model.md b/data-model-layer/data-model.md index ed8529b0..617a3e0c 100644 --- a/data-model-layer/data-model.md +++ b/data-model-layer/data-model.md @@ -115,7 +115,7 @@ Map is a recursive kind. Values in maps are accessed by their "key". Maps can also be iterated over, yielding key+value pairs. -Maps must be serialized in a deterministic way (key sorting should be consistent regardless of insertion order or language specific sorting). The sorting is not defined by the data model, each codec should find the best sorting algorithm, but the sorting must be consitent between languages and is most often implemented as additional code during serialization since most formats do not already have deterministic maps. +Codecs must be able to serialize Maps in a deterministic way (key sorting should be consistent regardless of insertion order or language specific sorting). The sorting is not defined by the data model, each codec should find the best sorting algorithm, but the sorting must be consistent between languages and is most often implemented as additional code during serialization since most formats do not already have deterministic maps. #### Link kind