From 5e45d9ba78fa7b1baf48f1d7f2a3cd3a207f2b56 Mon Sep 17 00:00:00 2001 From: Wes Biggs Date: Mon, 19 Aug 2024 14:39:11 -0500 Subject: [PATCH 1/2] Proposed schemas for DSNP 1.3 items --- dsnp/index.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/dsnp/index.ts b/dsnp/index.ts index 75df9ca..353095b 100644 --- a/dsnp/index.ts +++ b/dsnp/index.ts @@ -180,7 +180,7 @@ export const schemas = new Map([ model: publicKey, modelType: "AvroBinary", payloadLocation: "Itemized", - settings: ["AppendOnly", "SignatureRequired"], + settings: ["SignatureRequired"], dsnpVersion: "1.3", }, ], @@ -212,7 +212,7 @@ chainMapping[GENESIS_HASH_TESTNET_PASEO] = { broadcast: { "1.2": 2 }, reply: { "1.2": 3 }, reaction: { "1.1": 4 }, - update: { "1.2": 5 }, + update: { "1.2": 6 }, "public-key-key-agreement": { "1.2": 7 }, "public-follows": { "1.2": 8 }, "private-follows": { "1.2": 9 }, @@ -225,7 +225,6 @@ chainMapping[GENESIS_HASH_MAINNET] = { broadcast: { "1.2": 2 }, reply: { "1.2": 3 }, reaction: { "1.1": 4 }, - profile: { "1.2": 6 }, update: { "1.2": 5 }, "public-key-key-agreement": { "1.2": 7 }, "public-follows": { "1.2": 8 }, @@ -245,14 +244,13 @@ chainMapping["default"] = { broadcast: { "1.2": 2 }, reply: { "1.2": 3 }, reaction: { "1.1": 4 }, - profile: { "1.2": 5 }, - update: { "1.2": 6 }, - "public-key-key-agreement": { "1.2": 7 }, - "public-follows": { "1.2": 8 }, - "private-follows": { "1.2": 9 }, - "private-connections": { "1.2": 10 }, - "public-key-assertion-method": { "1.3": 11 }, - "profile-resources": { "1.3": 12 }, + update: { "1.2": 5 }, + "public-key-key-agreement": { "1.2": 6 }, + "public-follows": { "1.2": 7 }, + "private-follows": { "1.2": 8 }, + "private-connections": { "1.2": 9 }, + "public-key-assertion-method": { "1.3": 10 }, + "profile-resources": { "1.3": 11 }, }; /** From fab7836f2b3e89bf73160bbb2b5683d0d9d818f1 Mon Sep 17 00:00:00 2001 From: Wes Biggs Date: Sat, 24 Aug 2024 22:43:53 -0500 Subject: [PATCH 2/2] default chain mapping copies mainnet. profile-resources created on testnet. public-key-assertion-method and profile-resources are now proposed on mainnet and waiting for council approval. --- dsnp/index.ts | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/dsnp/index.ts b/dsnp/index.ts index 353095b..126d619 100644 --- a/dsnp/index.ts +++ b/dsnp/index.ts @@ -218,7 +218,7 @@ chainMapping[GENESIS_HASH_TESTNET_PASEO] = { "private-follows": { "1.2": 9 }, "private-connections": { "1.2": 10 }, "public-key-assertion-method": { "1.3": 11 }, - // "profile-resources": { "1.3": TBD }, + "profile-resources": { "1.3": 570 }, }; chainMapping[GENESIS_HASH_MAINNET] = { tombstone: { "1.2": 1 }, @@ -234,24 +234,12 @@ chainMapping[GENESIS_HASH_MAINNET] = { // "profile-resources": { "1.3": TBD }, }; /* - * Schema in "default" deployments (e.g. to a clean local chain) are - * numbered according to the `schemas` array (beginning with 1). If - * you have a non-standard deployment, call `setSchemaMapping()` - * manually. + * Schemas in "default" deployments (e.g. to a clean local node) are + * generally the same as mainnet. As schemas are approved on mainnet + * they will be added to the Frequency source code in + * https://github.com/frequency-chain/frequency/blob/main/resources/genesis-schemas.json. */ -chainMapping["default"] = { - tombstone: { "1.2": 1 }, - broadcast: { "1.2": 2 }, - reply: { "1.2": 3 }, - reaction: { "1.1": 4 }, - update: { "1.2": 5 }, - "public-key-key-agreement": { "1.2": 6 }, - "public-follows": { "1.2": 7 }, - "private-follows": { "1.2": 8 }, - "private-connections": { "1.2": 9 }, - "public-key-assertion-method": { "1.3": 10 }, - "profile-resources": { "1.3": 11 }, -}; +chainMapping["default"] = JSON.parse(JSON.stringify(chainMapping[GENESIS_HASH_MAINNET])); /** * Gets the schemaId from the Frequency instance configured for