opencanarias/taple-client

Dudas con la governanza

Closed this issue · 0 comments

Estimado equipo de TAPLE,

Es un placer dirigirme a ustedes. Actualmente, estoy llevando a cabo un Trabajo de Fin de Grado en el cual utilizaré TAPLE como parte fundamental de mi caso de estudio. Durante mi investigación, he revisado detalladamente la documentación disponible en su página web sobre cómo escribir las gobernanzas, y me han surgido algunas interrogantes que me gustaría aclarar:

  1. Respecto a la definición de los miembros, me gustaría saber si se permite utilizar el campo "definitions" de JSON SCHEMA para almacenar información adicional, como subesquemas y enumerados.

  2. Si el quorum se establece en 0.0, ¿cuál sería el efecto resultante? ¿Es posible utilizar esta configuración para eliminar la necesidad de aprobadores o validadores?

  3. Me gustaría obtener una mayor claridad en cuanto a la declaración de los testigos. Mi objetivo es asegurar que cada ciudadano pueda acceder únicamente a su propia información y cartera de puntos, sin tener acceso a los datos de otros ciudadanos. Por otro lado, el ayuntamiento debería tener acceso a la información de todos los ciudadanos, mientras que la empresa de reciclaje no debería tener acceso a la información personal de los ciudadanos.

Agradezco de antemano su atención y orientación en relación a estas cuestiones.

Adjunto la gobernanza por si ayuda:

{
	"members": [
		{
			"id": "b11a2304-c1a0-42b4-bafe-f22c73812051",
			"tags": {},
			"description": "Citizen 1",
			"key": "REDACTED"
		},
		{
			"id": "49038391-f970-4fae-90c7-dece4db3c131",
			"tags": {},
			"description": "Citizen 2",
			"key": "REDACTED"
		},
		{
			"id": "City Hall",
			"tags": {},
			"description": "City Hall",
			"key": "REDACTED"
		},
		{
			"id": "32c069c5-6ed7-4193-988c-0fc1e029552c",
			"tags": {},
			"description": "Container 1",
			"key": "REDACTED"
		},
		{
			"id": "abf385e8-fbdd-433d-80f6-1e6e16e42c87",
			"tags": {},
			"description": "Container 2",
			"key": "REDACTED"
		},
		{
			"id": "Trash Company",
			"tags": {},
			"description": "Trash Company",
			"key": "REDACTED"
		}
	],
	"schemas": [
		{
			"id": "Citizen",
			"tags": {},
			"content": {
				"type": "object",
				"properties": {
					"identidad": {
						"title": "Identidad",
						"description": "Identidad del ciudadano",
						"allOf": [
							{
								"$ref": "#/definitions/Identidad"
							}
						]
					},
					"direccion": {
						"title": "Direccion",
						"description": "Direcion del ciudadano",
						"allOf": [
							{
								"$ref": "#/definitions/Direcion"
							}
						]
					},
					"cuid": {
						"title": "Cuid",
						"description": "Codigo de identificaion unico del ciudadano",
						"maxLength": 36,
						"minLength": 36,
						"type": "string"
					}
				},
				"required": [
					"identidad",
					"direccion"
				],
				"definitions": {
					"Identidad": {
						"title": "Identidad",
						"description": "Data model for the identity of a citizen\n\natributes:\n\n    - nombre: str. Name\n    - apellidos: str. Surnames\n    - ni: str. DNI",
						"type": "object",
						"properties": {
							"nombre": {
								"title": "Nombre",
								"description": "Nombre del ciudadano",
								"type": "string"
							},
							"apellidos": {
								"title": "Apellidos",
								"description": "Primer apellido del ciudadano",
								"type": "string"
							},
							"ni": {
								"title": "Ni",
								"description": "DNI del ciudadano",
								"maxLength": 9,
								"minLength": 9,
								"type": "string"
							}
						},
						"required": [
							"nombre",
							"apellidos",
							"ni"
						]
					},
					"ViaType": {
						"title": "ViaType",
						"description": "Enumerate for the type of street",
						"enum": [
							"Calle",
							"Avenida",
							"Plaza",
							"Paseo",
							"Carretera",
							"Camino",
							"Alameda",
							"Otro"
						],
						"type": "string"
					},
					"Direcion": {
						"title": "Direcion",
						"description": "Data model for the address of a citizen\n\natributes:\n    - type: ViaType. Type of street\n    - direccion: str. Address\n    - codigo_postal: str. Postal code\n    - comunidad: str. Community\n    - ciudad: str. City",
						"type": "object",
						"properties": {
							"type": {
								"description": "Tipo de v\u00eda",
								"allOf": [
									{
										"$ref": "#/definitions/ViaType"
									}
								]
							},
							"direccion": {
								"title": "Direccion",
								"description": "Direccion",
								"type": "string"
							},
							"codigo_postal": {
								"title": "Codigo Postal",
								"description": "Codigo Postal",
								"maxLength": 5,
								"minLength": 5,
								"type": "string"
							},
							"comunidad": {
								"title": "Comunidad",
								"description": "Comunidad/Region/Provincia",
								"type": "string"
							},
							"ciudad": {
								"title": "Ciudad",
								"description": "Ciudad",
								"type": "string"
							}
						},
						"required": [
							"type",
							"direccion",
							"codigo_postal",
							"comunidad",
							"ciudad"
						]
					}
				}
			}
		},
		{
			"id": "RecycleOperation",
			"tags": {},
			"content": {
				"type": "object",
				"properties": {
					"type": {
						"description": "Tipo de residuo",
						"allOf": [
							{
								"$ref": "#/definitions/TrashType"
							}
						]
					},
					"peso": {
						"title": "Peso",
						"description": "Peso de los residuos, en gramos",
						"exclusiveMinimum": 0,
						"type": "number"
					},
					"container": {
						"title": "Container",
						"description": "Id del contenedor",
						"maxLength": 36,
						"minLength": 36,
						"type": "string"
					}
				},
				"required": [
					"type",
					"peso",
					"container"
				],
				"definitions": {
					"TrashType": {
						"title": "TrashType",
						"description": "Enumerate for the type of trash",
						"enum": [
							"Org\u00e1nico",
							"Papel y cart\u00f3n",
							"Vidrio",
							"Pl\u00e1stico",
							"Ropa y textil",
							"Electr\u00f3nicos",
							"Pilas y bater\u00edas",
							"Aceite",
							"No reciclable"
						],
						"type": "string"
					}
				}
			}
		},
		{
			"id": "PointTransaction",
			"tags": {},
			"content": {
				"type": "object",
				"properties": {
					"cuid": {
						"title": "Cuid",
						"description": "Codigo de identificaion unico del ciudadano",
						"maxLength": 36,
						"minLength": 36,
						"type": "string"
					},
					"value": {
						"title": "Value",
						"description": "Valor de la operaci\u00f3n",
						"ne": 0,
						"type": "integer"
					},
					"motivo": {
						"title": "Motivo",
						"description": "Motivo de la operaci\u00f3n",
						"type": "string"
					},
					"balance": {
						"title": "Balance",
						"description": "Balance actual de puntos",
						"default": 0,
						"type": "integer"
					}
				},
				"required": [
					"cuid",
					"value",
					"motivo"
				]
			}
		}
	],
	"policies": [
		{
			"id": "Citizen",
			"validation": {
				"quorum": 1.0,
				"validators": [
					"2daf002ddcf793fe73aa987fbf4aeddfca94bc89164d7a054c9bdb0b25407250"
				]
			},
			"approval": {
				"quorum": 1.0,
				"approvers": [
					"2daf002ddcf793fe73aa987fbf4aeddfca94bc89164d7a054c9bdb0b25407250"
				]
			},
			"invokation": {
				"owner": {
					"allowance": true,
					"approvalRequired": true
				},
				"set": {
					"allowance": false,
					"approvalRequired": true,
					"invokers": []
				},
				"all": {
					"allowance": false,
					"approvalRequired": true
				},
				"external": {
					"allowance": false,
					"approvalRequired": true
				}
			}
		},
		{
			"id": "RecycleOperation",
			"validation": {
				"quorum": 0.0,
				"validators": []
			},
			"approval": {
				"quorum": 0.0,
				"approvers": []
			},
			"invokation": {
				"owner": {
					"allowance": true,
					"approvalRequired": false
				},
				"set": {
					"allowance": true,
					"approvalRequired": false,
					"invokers": [
						"4c8fabf15e73471629997057172e9a375d9073ae9129129128331536950bf58d"
					]
				},
				"all": {
					"allowance": false,
					"approvalRequired": true
				},
				"external": {
					"allowance": false,
					"approvalRequired": true
				}
			}
		},
		{
			"id": "PointTransaction",
			"validation": {
				"quorum": 0.0,
				"validators": []
			},
			"approval": {
				"quorum": 0.0,
				"approvers": []
			},
			"invokation": {
				"owner": {
					"allowance": true,
					"approvalRequired": false
				},
				"set": {
					"allowance": true,
					"approvalRequired": true,
					"invokers": [
						"71a3844e1658cc630cc89b74fc3e9e730be8d7b352c4b8f88014ca9ba742e040",
						"15fb91cc18803632315f1c162f10e9982ab129a7cf91e754445e84f4ff36063e"
					]
				},
				"all": {
					"allowance": false,
					"approvalRequired": true
				},
				"external": {
					"allowance": false,
					"approvalRequired": true
				}
			}
		}
	]
}