Fix data model IA on peers shared errors (doc)

This commit is contained in:
NicolasCantu 2024-03-06 16:52:48 +01:00
parent 0724f60501
commit 9c6124c61b
3 changed files with 277 additions and 172 deletions

View File

@ -26,7 +26,7 @@
## 2. <a name='Porte'></a>Portée ## 2. <a name='Porte'></a>Portée
## 3. <a name='Documentsderfrence'></a>3. Documents de référence ## 3. <a name='Documentsderfrence'></a>Documents de référence
Voir [_Doc_references.md](_Doc_references.md). Voir [_Doc_references.md](_Doc_references.md).
@ -34,15 +34,88 @@ Voir [_Doc_references.md](_Doc_references.md).
### 4.1. <a name='Cls'></a>Clés ### 4.1. <a name='Cls'></a>Clés
1. ImageRecover Base "key_recover_spend_list"
1.1 KeyRecoverSpend
1.2 KeyRecoverScan pseudo-code:
2. ImageRevoke
2.1 KeyRevokeSpend ```json
2.2 KeyRevokeScan [
{
"label": "",
"device_footprint": "",
"third_party_list": [
{
"device_footprint": "",
"sp_address": ""
}
],
"key_revoke_sp_address": ""
}
]
```
### 4.2. <a name='Peers'></a>Peers ### 4.2. <a name='Peers'></a>Peers
shared_peer_list_merged
pseudo-code:
```json
[
{
"shared_peer": {
"domain": "String",
"address_ip": "String",
"relay": {
"address_port": "",
"data_max_size": 0,
"pow_difficulty": 0,
"pow_pattern": "",
"pow_prefix": "",
"pow_timeout": 0,
"faucet_sp_address": ""
},
"l1_node": {
"address_port": null,
"explorer_base_url": null,
"sp_address_anchorage": null,
"sp_address_reward": null
},
"l1_miner": {
"sp_address_minig_reward": null,
"block_mined_list": []
},
"l2_node_list": [
{
"address_port": null,
"explorer_base_url": null,
"sp_address_anchorage": null,
"sp_address_reward": null,
"nbits": null,
"magic_number": null,
"challenge": null,
"l2_miner": {
"sp_address_minig_reward": null,
"sp_address_refunder": null,
"block_hash_mined_list": []
},
"l2_certif": {
"sp_address_certif_l1": null,
"sp_address_refunded": null,
"block_certified_list": []
}
}
],
"block_certif": {
"block_hash_list": [],
"certif_hash": [],
"l1_tx": null
}
}
}
]
```
### 4.3. <a name='Process'></a>Process ### 4.3. <a name='Process'></a>Process
### 4.4. <a name='Messages'></a>Messages ### 4.4. <a name='Messages'></a>Messages
@ -55,6 +128,30 @@ Voir [_Doc_references.md](_Doc_references.md).
### 5.1. <a name='Cls-1'></a>Clés ### 5.1. <a name='Cls-1'></a>Clés
Base "key_recover_spend_list"
pseudo-code:
```json
[
{
"label": "",
"keyrecoverSpend": {
"seed_rand_1": "",
"seed_rand_2": "",
"part_enc": ""
},
"key_recover_scan": "",
"process_shards_backup_list": [
{
"hash": "",
"members": []
}
]
}
]
```
### 5.2. <a name='Peers-1'></a>Peers ### 5.2. <a name='Peers-1'></a>Peers
### 5.3. <a name='Process-1'></a>Process ### 5.3. <a name='Process-1'></a>Process

View File

@ -11,39 +11,40 @@
* 3.3.1. [ItemMemberPublicAttributeGroup](#ItemMemberPublicAttributeGroup) * 3.3.1. [ItemMemberPublicAttributeGroup](#ItemMemberPublicAttributeGroup)
* 3.3.2. [ItemMemberRoleConfidentialAttributeGroup](#ItemMemberRoleConfidentialAttributeGroup) * 3.3.2. [ItemMemberRoleConfidentialAttributeGroup](#ItemMemberRoleConfidentialAttributeGroup)
* 3.3.3. [ItemMemberRolePrivateAttributeGroup](#ItemMemberRolePrivateAttributeGroup) * 3.3.3. [ItemMemberRolePrivateAttributeGroup](#ItemMemberRolePrivateAttributeGroup)
* 4. [ItemCommitment](#ItemCommitment) * 3.4. [ItemCommitment](#ItemCommitment)
* 4.1. [ItemCommitmentRoleConfidentialAttributeGroup](#ItemCommitmentRoleConfidentialAttributeGroup) * 3.4.1. [ItemCommitmentRoleConfidentialAttributeGroup](#ItemCommitmentRoleConfidentialAttributeGroup)
* 4.2. [ItemCommitmentPrivateAttributeGroup](#ItemCommitmentPrivateAttributeGroup) * 3.4.2. [ItemCommitmentPrivateAttributeGroup](#ItemCommitmentPrivateAttributeGroup)
* 4.2.1. [ItemCommitmentPublicAttributeGroup](#ItemCommitmentPublicAttributeGroup) * 3.5. [ItemDeposit](#ItemDeposit)
* 4.3. [ItemDeposit](#ItemDeposit) * 3.5.1. [ItemDepositPublicAttributeGroup](#ItemDepositPublicAttributeGroup)
* 4.3.1. [ItemDepositPublicAttributeGroup](#ItemDepositPublicAttributeGroup) * 3.5.2. [ItemDepositRoleConfidentialAttributeGroup](#ItemDepositRoleConfidentialAttributeGroup)
* 4.3.2. [ItemDepositRoleConfidentialAttributeGroup](#ItemDepositRoleConfidentialAttributeGroup) * 3.5.3. [ItemDepositPrivateAttributeGroup](#ItemDepositPrivateAttributeGroup)
* 4.3.3. [ItemDepositPrivateAttributeGroup](#ItemDepositPrivateAttributeGroup) * 3.6. [ItemEnum](#ItemEnum)
* 4.4. [ItemEnum](#ItemEnum) * 3.7. [ItemPayment](#ItemPayment)
* 4.5. [ItemPayment](#ItemPayment) * 3.7.1. [ItemPaymentPublicAttributeGroup](#ItemPaymentPublicAttributeGroup)
* 4.5.1. [ItemPaymentPublicAttributeGroup](#ItemPaymentPublicAttributeGroup) * 3.7.2. [ItemPaymentRoleConfidentialAttributeGroup](#ItemPaymentRoleConfidentialAttributeGroup)
* 4.5.2. [ItemPaymentRoleConfidentialAttributeGroup](#ItemPaymentRoleConfidentialAttributeGroup) * 3.7.3. [ItemPaymentPrivateAttributeGroup](#ItemPaymentPrivateAttributeGroup)
* 4.5.3. [ItemPaymentPrivateAttributeGroup](#ItemPaymentPrivateAttributeGroup) * 3.8. [ItemPeer](#ItemPeer)
* 4.6. [ItemPeer](#ItemPeer) * 3.8.1. [ItemPeerPublicAttributeGroup](#ItemPeerPublicAttributeGroup)
* 4.6.1. [ItemPeerPublicAttributeGroup](#ItemPeerPublicAttributeGroup) * 3.8.2. [ItemPeerPrivateAttributeGroup](#ItemPeerPrivateAttributeGroup)
* 4.6.2. [ItemPeerPrivateAttributeGroup](#ItemPeerPrivateAttributeGroup) * 3.9. [ItemProcess](#ItemProcess)
* 4.7. [ItemProcess](#ItemProcess) * 3.9.1. [ItemProcessPublicAttributeGroup](#ItemProcessPublicAttributeGroup)
* 4.7.1. [ItemProcessPublicAttributeGroup](#ItemProcessPublicAttributeGroup) * 4. [Encryption](#Encryption)
* 5. [Encryption](#Encryption) * 4.1. [KeyEncryption](#KeyEncryption)
* 5.1. [KeyEncryption](#KeyEncryption) * 4.2. [Aes256GcmIv96Bit](#Aes256GcmIv96Bit)
* 5.2. [Aes256GcmIv96Bit](#Aes256GcmIv96Bit) * 5. [Messages](#Messages)
* 6. [Messages](#Messages) * 5.1. [Message](#Message)
* 6.1. [Message](#Message) * 5.2. [MessageConnect](#MessageConnect)
* 6.2. [MessageConnect](#MessageConnect) * 5.3. [MessageGeneric](#MessageGeneric)
* 6.3. [MessageGeneric](#MessageGeneric) * 5.4. [Pow](#Pow)
* 6.4. [Pow](#Pow) * 5.5. [SharedProcess](#SharedProcess)
* 6.5. [SharedProcess](#SharedProcess) * 5.6. [SharedPeer](#SharedPeer)
* 6.6. [SharedPeer](#SharedPeer) * 6. [Relay](#Relay)
* 7. [Relay](#Relay) * 7. [L1Node](#L1Node)
* 7.1. [L1Node](#L1Node) * 7.1. [L1NodeMining](#L1NodeMining)
* 7.2. [L1Miner](#L1Miner) * 7.2. [L2Node](#L2Node)
* 7.3. [L2Node](#L2Node) * 7.3. [L2NodeMining](#L2NodeMining)
* 7.4. [L2Certif](#L2Certif) * 7.4. [L2Certif](#L2Certif)
* 7.5. [BlockCertif](#BlockCertif)
* 8. [Metadata](#Metadata) * 8. [Metadata](#Metadata)
* 8.1. [MetadataContractPublic](#MetadataContractPublic) * 8.1. [MetadataContractPublic](#MetadataContractPublic)
* 8.2. [MetadataPrivate](#MetadataPrivate) * 8.2. [MetadataPrivate](#MetadataPrivate)
@ -202,7 +203,7 @@ The `Item` struct serves as a foundational element, detailing the basic structur
| `priv_key_signet_scan` | ```String``` | yes | | | `priv_key_signet_scan` | ```String``` | yes | |
| `randSeedPart2` | ```String``` | yes | | | `randSeedPart2` | ```String``` | yes | |
## 4. <a name='ItemCommitment'></a>ItemCommitment ### 3.4. <a name='ItemCommitment'></a>ItemCommitment
`ItemCommitment` links an item with commitment-specific attributes across public, confidential, and private spheres, fully representing a commitment. `ItemCommitment` links an item with commitment-specific attributes across public, confidential, and private spheres, fully representing a commitment.
@ -213,7 +214,7 @@ The `Item` struct serves as a foundational element, detailing the basic structur
| `role_confidential_attribute_group` | ```ItemCommitmentRoleConfidentialAttributeGroup``` | | The role-specific confidential attribute group for this commitment. | | `role_confidential_attribute_group` | ```ItemCommitmentRoleConfidentialAttributeGroup``` | | The role-specific confidential attribute group for this commitment. |
| `private_attribute_group` | ```ItemCommitmentPrivateAttributeGroup``` | | The private attribute group associated with this commitment. | | `private_attribute_group` | ```ItemCommitmentPrivateAttributeGroup``` | | The private attribute group associated with this commitment. |
### 4.1. <a name='ItemCommitmentRoleConfidentialAttributeGroup'></a>ItemCommitmentRoleConfidentialAttributeGroup #### 3.4.1. <a name='ItemCommitmentRoleConfidentialAttributeGroup'></a>ItemCommitmentRoleConfidentialAttributeGroup
This struct encompasses role-specific confidential attributes for commitments, securing sensitive commitment information. This struct encompasses role-specific confidential attributes for commitments, securing sensitive commitment information.
@ -221,7 +222,7 @@ This struct encompasses role-specific confidential attributes for commitments, s
|-----------------------------|-------------------|--------|------------------------------------------------------------------| |-----------------------------|-------------------|--------|------------------------------------------------------------------|
| `payload_list_confidential` | ```Vec<String>``` | | A list of confidential payloads associated with this commitment. | | `payload_list_confidential` | ```Vec<String>``` | | A list of confidential payloads associated with this commitment. |
### 4.2. <a name='ItemCommitmentPrivateAttributeGroup'></a>ItemCommitmentPrivateAttributeGroup #### 3.4.2. <a name='ItemCommitmentPrivateAttributeGroup'></a>ItemCommitmentPrivateAttributeGroup
`ItemCommitmentPrivateAttributeGroup` contains private attributes for commitments, ensuring privacy for the most sensitive commitment details. `ItemCommitmentPrivateAttributeGroup` contains private attributes for commitments, ensuring privacy for the most sensitive commitment details.
@ -229,7 +230,7 @@ This struct encompasses role-specific confidential attributes for commitments, s
|------------------------|-------------------|--------|-------------------------------------------------------------| |------------------------|-------------------|--------|-------------------------------------------------------------|
| `payload_list_private` | ```Vec<String>``` | | A list of private payloads associated with this commitment. | | `payload_list_private` | ```Vec<String>``` | | A list of private payloads associated with this commitment. |
#### 4.2.1. <a name='ItemCommitmentPublicAttributeGroup'></a>ItemCommitmentPublicAttributeGroup ##### 4.2.1. <a name='ItemCommitmentPublicAttributeGroup'></a>ItemCommitmentPublicAttributeGroup
This struct groups public attributes related to commitments, such as goals and provider types, to publicly share commitment details. This struct groups public attributes related to commitments, such as goals and provider types, to publicly share commitment details.
@ -243,7 +244,7 @@ This struct groups public attributes related to commitments, such as goals and p
| `ref_request_pcd_hash_list` | ```Vec<String>``` | | A list of reference hashes for RequestPcd documents related to this commitment. | | `ref_request_pcd_hash_list` | ```Vec<String>``` | | A list of reference hashes for RequestPcd documents related to this commitment. |
| `payload_public_list` | ```Vec<String>``` | | A list of public payloads associated with this commitment. | | `payload_public_list` | ```Vec<String>``` | | A list of public payloads associated with this commitment. |
### 4.3. <a name='ItemDeposit'></a>ItemDeposit ### 3.5. <a name='ItemDeposit'></a>ItemDeposit
It combines an item with deposit-specific attributes, including public, confidential, and private groups, to comprehensively represent a deposit. It combines an item with deposit-specific attributes, including public, confidential, and private groups, to comprehensively represent a deposit.
@ -254,7 +255,7 @@ It combines an item with deposit-specific attributes, including public, confiden
| `role_confidential_attribute_group` | ```ItemDepositRoleConfidentialAttributeGroup``` | | The role-specific confidential attribute group for this deposit. | | `role_confidential_attribute_group` | ```ItemDepositRoleConfidentialAttributeGroup``` | | The role-specific confidential attribute group for this deposit. |
| `private_attribute_group` | ```ItemDepositPrivateAttributeGroup``` | | The private attribute group associated with this deposit. | | `private_attribute_group` | ```ItemDepositPrivateAttributeGroup``` | | The private attribute group associated with this deposit. |
#### 4.3.1. <a name='ItemDepositPublicAttributeGroup'></a>ItemDepositPublicAttributeGroup #### 3.5.1. <a name='ItemDepositPublicAttributeGroup'></a>ItemDepositPublicAttributeGroup
It details public attributes for deposits, including target addresses and goals, facilitating the understanding of deposit objectives. It details public attributes for deposits, including target addresses and goals, facilitating the understanding of deposit objectives.
@ -269,7 +270,7 @@ It details public attributes for deposits, including target addresses and goals,
| `payload_list_public` | ```Vec<String>``` | | A list of public payloads associated with this deposit. | | `payload_list_public` | ```Vec<String>``` | | A list of public payloads associated with this deposit. |
| `audit_code_list_public` | ```Vec<String>``` | | A list of public audit codes associated with this deposit. | | `audit_code_list_public` | ```Vec<String>``` | | A list of public audit codes associated with this deposit. |
#### 4.3.2. <a name='ItemDepositRoleConfidentialAttributeGroup'></a>ItemDepositRoleConfidentialAttributeGroup #### 3.5.2. <a name='ItemDepositRoleConfidentialAttributeGroup'></a>ItemDepositRoleConfidentialAttributeGroup
Similar to its commitment counterpart, this struct holds confidential attributes specific to deposits, protecting sensitive deposit information. Similar to its commitment counterpart, this struct holds confidential attributes specific to deposits, protecting sensitive deposit information.
@ -278,7 +279,7 @@ Similar to its commitment counterpart, this struct holds confidential attributes
| `payload_list_confidential` | ```Vec<String>``` | | A list of confidential payloads associated with this deposit. | | `payload_list_confidential` | ```Vec<String>``` | | A list of confidential payloads associated with this deposit. |
| `audit_code_list_confidential` | ```Vec<String>``` | | A list of confidential audit codes associated with this deposit. | | `audit_code_list_confidential` | ```Vec<String>``` | | A list of confidential audit codes associated with this deposit. |
#### 4.3.3. <a name='ItemDepositPrivateAttributeGroup'></a>ItemDepositPrivateAttributeGroup #### 3.5.3. <a name='ItemDepositPrivateAttributeGroup'></a>ItemDepositPrivateAttributeGroup
`ItemDepositPrivateAttributeGroup` secures private deposit attributes, safeguarding the most sensitive aspects of deposits. `ItemDepositPrivateAttributeGroup` secures private deposit attributes, safeguarding the most sensitive aspects of deposits.
@ -287,7 +288,7 @@ Similar to its commitment counterpart, this struct holds confidential attributes
| `payload_list_private` | ```Vec<String>``` | | A list of private payloads associated with this deposit. | | `payload_list_private` | ```Vec<String>``` | | A list of private payloads associated with this deposit. |
| `audit_code_private` | ```String``` | | A private audit code associated with this deposit. | | `audit_code_private` | ```String``` | | A private audit code associated with this deposit. |
### 4.4. <a name='ItemEnum'></a>ItemEnum ### 3.6. <a name='ItemEnum'></a>ItemEnum
This enumeration represents different types of items within a system, where each variant encapsulates a specific struct for a type of item: This enumeration represents different types of items within a system, where each variant encapsulates a specific struct for a type of item:
@ -299,7 +300,7 @@ This enumeration represents different types of items within a system, where each
* **```Artefact(ItemArtefact)```**: Contains an item of type ItemArtefact, representing an artefact. * **```Artefact(ItemArtefact)```**: Contains an item of type ItemArtefact, representing an artefact.
* **```Commitment(ItemCommitment)```**: Contains an item of type ItemCommitment, representing a commitment. * **```Commitment(ItemCommitment)```**: Contains an item of type ItemCommitment, representing a commitment.
### 4.5. <a name='ItemPayment'></a>ItemPayment ### 3.7. <a name='ItemPayment'></a>ItemPayment
`ItemPayment` links an item with payment-specific attributes across public, confidential, and private groups, offering a full view of a payment. `ItemPayment` links an item with payment-specific attributes across public, confidential, and private groups, offering a full view of a payment.
@ -310,7 +311,7 @@ This enumeration represents different types of items within a system, where each
| `role_confidential_attribute_group` | ```ItemPaymentRoleConfidentialAttributeGroup``` | | The role-specific confidential attribute group for this payment. | | `role_confidential_attribute_group` | ```ItemPaymentRoleConfidentialAttributeGroup``` | | The role-specific confidential attribute group for this payment. |
| `private_attribute_group` | ```ItemPaymentPrivateAttributeGroup``` | | The private attribute group associated with this payment. | | `private_attribute_group` | ```ItemPaymentPrivateAttributeGroup``` | | The private attribute group associated with this payment. |
#### 4.5.1. <a name='ItemPaymentPublicAttributeGroup'></a>ItemPaymentPublicAttributeGroup #### 3.7.1. <a name='ItemPaymentPublicAttributeGroup'></a>ItemPaymentPublicAttributeGroup
This struct organizes public payment attributes, detailing aspects like service provider addresses and payment goals, for public knowledge. This struct organizes public payment attributes, detailing aspects like service provider addresses and payment goals, for public knowledge.
@ -328,7 +329,7 @@ This struct organizes public payment attributes, detailing aspects like service
| `payload_list_public` | ```Vec<String>``` | | A list of public payloads associated with this payment. | | `payload_list_public` | ```Vec<String>``` | | A list of public payloads associated with this payment. |
| `audit_code_list_public` | ```Vec<String>``` | | A list of public audit codes associated with this payment. | | `audit_code_list_public` | ```Vec<String>``` | | A list of public audit codes associated with this payment. |
#### 4.5.2. <a name='ItemPaymentRoleConfidentialAttributeGroup'></a>ItemPaymentRoleConfidentialAttributeGroup #### 3.7.2. <a name='ItemPaymentRoleConfidentialAttributeGroup'></a>ItemPaymentRoleConfidentialAttributeGroup
It holds confidential payment attributes, maintaining the confidentiality of critical payment information. It holds confidential payment attributes, maintaining the confidentiality of critical payment information.
@ -337,7 +338,7 @@ It holds confidential payment attributes, maintaining the confidentiality of cri
| `payload_list_confidential` | ```Vec<String>``` | | A list of confidential payloads associated with this payment. | | `payload_list_confidential` | ```Vec<String>``` | | A list of confidential payloads associated with this payment. |
| `audit_code_list_confidential` | ```Vec<String>``` | | A list of confidential audit codes associated with this payment. | | `audit_code_list_confidential` | ```Vec<String>``` | | A list of confidential audit codes associated with this payment. |
#### 4.5.3. <a name='ItemPaymentPrivateAttributeGroup'></a>ItemPaymentPrivateAttributeGroup #### 3.7.3. <a name='ItemPaymentPrivateAttributeGroup'></a>ItemPaymentPrivateAttributeGroup
ItemPaymentPrivateAttributeGroup protects private payment attributes, ensuring the highest level of privacy for payment details. ItemPaymentPrivateAttributeGroup protects private payment attributes, ensuring the highest level of privacy for payment details.
@ -346,7 +347,7 @@ ItemPaymentPrivateAttributeGroup protects private payment attributes, ensuring t
| `payload_list_private` | ```Vec<String>``` | | A list of private payloads associated with this payment. | | `payload_list_private` | ```Vec<String>``` | | A list of private payloads associated with this payment. |
| `audit_code_private` | ```String``` | | A private audit code associated with this payment. | | `audit_code_private` | ```String``` | | A private audit code associated with this payment. |
### 4.6. <a name='ItemPeer'></a>ItemPeer ### 3.8. <a name='ItemPeer'></a>ItemPeer
`ItemPeer` combines basic item information with layers, public, and private attributes, fully detailing a peer within the system. `ItemPeer` combines basic item information with layers, public, and private attributes, fully detailing a peer within the system.
@ -357,7 +358,7 @@ ItemPaymentPrivateAttributeGroup protects private payment attributes, ensuring t
| `public_attribute_group` | ```ItemPeerPublicAttributeGroup``` | | Groupe d'attributs publics associés à ce pair. | | `public_attribute_group` | ```ItemPeerPublicAttributeGroup``` | | Groupe d'attributs publics associés à ce pair. |
| `private_attribute_group` | ```ItemPeerPrivateAttributeGroup``` | | Groupe d'attributs privés associés à ce pair. | | `private_attribute_group` | ```ItemPeerPrivateAttributeGroup``` | | Groupe d'attributs privés associés à ce pair. |
#### 4.6.1. <a name='ItemPeerPublicAttributeGroup'></a>ItemPeerPublicAttributeGroup #### 3.8.1. <a name='ItemPeerPublicAttributeGroup'></a>ItemPeerPublicAttributeGroup
It outlines public peer attributes, such as service provider addresses and PoW details, for transparency in peer-related information. It outlines public peer attributes, such as service provider addresses and PoW details, for transparency in peer-related information.
@ -375,7 +376,7 @@ It outlines public peer attributes, such as service provider addresses and PoW d
| `daily_sp_tx_mine_list` | ```Vec<String>``` | | A daily list of service provider transactions mined by this peer. | | `daily_sp_tx_mine_list` | ```Vec<String>``` | | A daily list of service provider transactions mined by this peer. |
| `daily_sp_tx_mine_reward_list` | ```Vec<String>``` | | A daily list of rewards for service provider transactions mined by this peer. | | `daily_sp_tx_mine_reward_list` | ```Vec<String>``` | | A daily list of rewards for service provider transactions mined by this peer. |
#### 4.6.2. <a name='ItemPeerPrivateAttributeGroup'></a>ItemPeerPrivateAttributeGroup #### 3.8.2. <a name='ItemPeerPrivateAttributeGroup'></a>ItemPeerPrivateAttributeGroup
`ItemPeerPrivateAttributeGroup` contains a private configuration ```String``` for a peer, keeping certain peer configurations confidential. `ItemPeerPrivateAttributeGroup` contains a private configuration ```String``` for a peer, keeping certain peer configurations confidential.
@ -383,7 +384,7 @@ It outlines public peer attributes, such as service provider addresses and PoW d
|----------------|--------------|--------|-----------------------------------------------------------------| |----------------|--------------|--------|-----------------------------------------------------------------|
| `config` | ```String``` | | A private configuration ```String``` associated with this peer. | | `config` | ```String``` | | A private configuration ```String``` associated with this peer. |
### 4.7. <a name='ItemProcess'></a>ItemProcess ### 3.9. <a name='ItemProcess'></a>ItemProcess
`ItemProcess` associates an item with a process, including public attribute groups, to represent processes within the system comprehensively. `ItemProcess` associates an item with a process, including public attribute groups, to represent processes within the system comprehensively.
@ -392,7 +393,7 @@ It outlines public peer attributes, such as service provider addresses and PoW d
| `item` | ```Item``` | | Represents the item associated with this process. | | `item` | ```Item``` | | Represents the item associated with this process. |
| `item_process_public_attribute_group` | ```ItemProcessPublicAttributeGroup``` | | The public attribute group associated with this process. | | `item_process_public_attribute_group` | ```ItemProcessPublicAttributeGroup``` | | The public attribute group associated with this process. |
#### 4.7.1. <a name='ItemProcessPublicAttributeGroup'></a>ItemProcessPublicAttributeGroup #### 3.9.1. <a name='ItemProcessPublicAttributeGroup'></a>ItemProcessPublicAttributeGroup
This struct details public attributes related to processes, like roles groups, to facilitate understanding of process organization. This struct details public attributes related to processes, like roles groups, to facilitate understanding of process organization.
@ -400,9 +401,9 @@ This struct details public attributes related to processes, like roles groups, t
|----------------|------------|--------|-----------------------------------------------------------| |----------------|------------|--------|-----------------------------------------------------------|
| `roles_group` | RolesGroup | | Represents a group of roles associated with this process. | | `roles_group` | RolesGroup | | Represents a group of roles associated with this process. |
## 5. <a name='Encryption'></a>Encryption ## 4. <a name='Encryption'></a>Encryption
### 5.1. <a name='KeyEncryption'></a>KeyEncryption ### 4.1. <a name='KeyEncryption'></a>KeyEncryption
The `KeyEncryption` struct provides details about encryption keys, including the attribute it's for, the key itself, and the algorithm used, crucial for securing data within the system. The `KeyEncryption` struct provides details about encryption keys, including the attribute it's for, the key itself, and the algorithm used, crucial for securing data within the system.
@ -412,7 +413,7 @@ The `KeyEncryption` struct provides details about encryption keys, including the
| `key` | ```String``` | Yes | An optional encryption key. | | `key` | ```String``` | Yes | An optional encryption key. |
| `algorithm` | ```String``` | Yes | An optional encryption algorithm used with this key. | | `algorithm` | ```String``` | Yes | An optional encryption algorithm used with this key. |
### 5.2. <a name='Aes256GcmIv96Bit'></a>Aes256GcmIv96Bit ### 4.2. <a name='Aes256GcmIv96Bit'></a>Aes256GcmIv96Bit
This struct represents an encryption scheme using `AES-256-GCM` with a 96-bit initialization vector (IV), specifying the key details for robust data encryption. This struct represents an encryption scheme using `AES-256-GCM` with a 96-bit initialization vector (IV), specifying the key details for robust data encryption.
@ -420,9 +421,9 @@ This struct represents an encryption scheme using `AES-256-GCM` with a 96-bit in
|----------------|-----------------------------|--------|------------------------------------------------------------------------------| |----------------|-----------------------------|--------|------------------------------------------------------------------------------|
| `key` | ```GenericArray<u8, u32>``` | | Represents an encryption key for the AES-256-GCM algorithm with a 96-bit IV. | | `key` | ```GenericArray<u8, u32>``` | | Represents an encryption key for the AES-256-GCM algorithm with a 96-bit IV. |
## 6. <a name='Messages'></a>Messages ## 5. <a name='Messages'></a>Messages
### 6.1. <a name='Message'></a>Message ### 5.1. <a name='Message'></a>Message
`Message` encapsulates a client message, including an encrypted request and its hash, essential for secure and verifiable client-server communication. `Message` encapsulates a client message, including an encrypted request and its hash, essential for secure and verifiable client-server communication.
@ -431,7 +432,7 @@ This struct represents an encryption scheme using `AES-256-GCM` with a 96-bit in
| `message` | ```Message``` | | Represents a message, assuming `Message` is a predefined struct. | | `message` | ```Message``` | | Represents a message, assuming `Message` is a predefined struct. |
| `request_enc` | ```String``` | | The encrypted request content. | | `request_enc` | ```String``` | | The encrypted request content. |
### 6.2. <a name='MessageConnect'></a>MessageConnect ### 5.2. <a name='MessageConnect'></a>MessageConnect
The `MessageConnect` struct is designed to handle connection-related messages, facilitating the establishment of connections within the system. The `MessageConnect` struct is designed to handle connection-related messages, facilitating the establishment of connections within the system.
@ -439,7 +440,7 @@ The `MessageConnect` struct is designed to handle connection-related messages, f
|----------------|---------------|--------|------------------------------------------------------------------| |----------------|---------------|--------|------------------------------------------------------------------|
| message | ```Message``` | | Represents a message, assuming `Message` is a predefined struct. | | message | ```Message``` | | Represents a message, assuming `Message` is a predefined struct. |
### 6.3. <a name='MessageGeneric'></a>MessageGeneric ### 5.3. <a name='MessageGeneric'></a>MessageGeneric
`Message` provides a general structure for messages, including shared peers and processes, and details like PoW challenges, supporting diverse communication needs `Message` provides a general structure for messages, including shared peers and processes, and details like PoW challenges, supporting diverse communication needs
@ -451,7 +452,7 @@ The `MessageConnect` struct is designed to handle connection-related messages, f
| `pow` | ```Pow``` | | Represents a Proof of Work (PoW) challenge, assuming `Pow` is a predefined struct. | | `pow` | ```Pow``` | | Represents a Proof of Work (PoW) challenge, assuming `Pow` is a predefined struct. |
| `raw_transaction_list` | ```Vec<String>``` | Yes | Transaction to broadcast | | `raw_transaction_list` | ```Vec<String>``` | Yes | Transaction to broadcast |
### 6.4. <a name='Pow'></a>Pow ### 5.4. <a name='Pow'></a>Pow
The `Pow` struct outlines a Proof of Work challenge, including data hash, timestamp, and nonce, to ensure computational effort for security purposes. The `Pow` struct outlines a Proof of Work challenge, including data hash, timestamp, and nonce, to ensure computational effort for security purposes.
@ -463,7 +464,7 @@ The `Pow` struct outlines a Proof of Work challenge, including data hash, timest
| `pattern` | ```String``` | | The pattern that the PoW solution must match. | | `pattern` | ```String``` | | The pattern that the PoW solution must match. |
| `difficulty` | ```usize``` | | The difficulty level of the PoW challenge. | | `difficulty` | ```usize``` | | The difficulty level of the PoW challenge. |
### 6.5. <a name='SharedProcess'></a>SharedProcess ### 5.5. <a name='SharedProcess'></a>SharedProcess
`SharedProcess` identifies a shared process within the system, aiding in the management and coordination of collaborative processes. `SharedProcess` identifies a shared process within the system, aiding in the management and coordination of collaborative processes.
@ -471,27 +472,26 @@ The `Pow` struct outlines a Proof of Work challenge, including data hash, timest
|----------------|--------------------|--------|---------------------------------------------| |----------------|--------------------|--------|---------------------------------------------|
| `processes` | `Vec<ItemProcess>` | | A list of SP addresses related to the role. | | `processes` | `Vec<ItemProcess>` | | A list of SP addresses related to the role. |
### 6.6. <a name='SharedPeer'></a>SharedPeer ### 5.6. <a name='SharedPeer'></a>SharedPeer
`SharedPeer` specifies a peer within the network, playing a key role in distributed information sharing and communication. `SharedPeer` specifies a peer within the network, playing a key role in distributed information sharing and communication.
| Attribute Name | Type | Option | Description | | Attribute Name | Type | Option | Description |
|----------------|----------------|--------|-------------------------------------------------------------------------------| |----------------|----------------|--------|---------------------------------------------------------|
| `domain` | ```String``` | | The domain associated with the shared peer. | | `domain` | ```String``` | Yes | The domain associated with the shared peer. |
| `address_ip` | ```String``` | | The IP address of the shared peer. | | `address_ip` | ```String``` | | The IP address of the shared peer. |
| `relay` | ```Relay``` | | Represents a relay node in the network. | | `relay` | ```Relay``` | | Represents a relay node in the network. |
| `l1_node` | ```L1Node``` | | Represents a level 1 (L1) node in the network. | | `l1_node` | ```L1Node``` | Yes | Represents a level 1 (L1) node in the network. |
| `l1_miner` | ```L1Miner``` | | Represents a level 1 (L1) miner in the network. | | `l1_miner` | ```L1Miner``` | Yes | |
| `l2_node` | ```L2Node``` | | Represents a level 2 (L2) node in the network. | | `l2_node_list` | ```[L2Node]``` | | Represents a table of level 2 (L2) node in the network. |
| `l2_certif` | ```L2Certif``` | | Represents a level 2 (L2) certification authority or function in the network. |
## 7. <a name='Relay'></a>Relay ## 6. <a name='Relay'></a>Relay
Represents a `Relay` in the network, specifying its address and port, data handling capacity, and Proof of Work (PoW) requirements. Represents a `Relay` in the network, specifying its address and port, data handling capacity, and Proof of Work (PoW) requirements.
| Attribute Name | Type | Option | Description | | Attribute Name | Type | Option | Description |
|---------------------|--------------|--------|-------------------------------------------------------------------| |---------------------|--------------|--------|-------------------------------------------------------------------|
| `ddress_port` | ```u16``` | | The port address of the relay. | | `address_port` | ```u16``` | | The port address of the relay. |
| `data_max_size` | ```usize``` | | Maximum size of data the relay can handle. | | `data_max_size` | ```usize``` | | Maximum size of data the relay can handle. |
| `pow_difficulty` | ```u32``` | | The difficulty level for the Proof of Work required by the relay. | | `pow_difficulty` | ```u32``` | | The difficulty level for the Proof of Work required by the relay. |
| `pow_pattern` | ```String``` | | The pattern used for the Proof of Work. | | `pow_pattern` | ```String``` | | The pattern used for the Proof of Work. |
@ -499,57 +499,65 @@ Represents a `Relay` in the network, specifying its address and port, data handl
| `pow_timeout` | ```u32``` | | Timeout for pow | | `pow_timeout` | ```u32``` | | Timeout for pow |
| `faucet_sp_address` | ```u32``` | | Faucet address | | `faucet_sp_address` | ```u32``` | | Faucet address |
### 7.1. <a name='L1Node'></a>L1Node ## 7. <a name='L1Node'></a>L1Node
The `L1Node` struct details a Level 1 blockchain node, including its network, IP address, and status, integral to blockchain operations and interactions. The `L1Node` struct details a Level 1 blockchain node, including its network, IP address, and status, integral to blockchain operations and interactions.
| Attribute Name | Type | Option | Description | | Attribute Name | Type | Option | Description |
|----------------|---------------------|--------|--------------------------------------------------------------| |------------------------|----------------|--------|-------------------------------|
| `id` | ```u32``` | | Unique identifier for the L1 node. | | `address_port` | ```u16``` | | The port address of the node. |
| `network` | ```String``` | | The blockchain network the L1 node is part of. | | `explorer_base_url` | ```String``` | | The base URL of the explorer. |
| `ip_address` | ```String``` | | IP address of the L1 node. | | `sp_address_anchorage` | ```String``` | | The SP anchorage address. |
| `port` | ```u16``` | | Port number the L1 node listens on. | | `sp_address_reward` | ```String``` | | The SP reward address. |
| `status` | ```String``` | | Current status of the L1 node (e.g., active, inactive). | | `l2_mining` | ```L2Mining``` | Yes | |
| `last_checked` | ```DateTime<Utc>``` | | Timestamp of the last health check performed on the L1 node. | | `l2_certif` | ```L2Certif``` | Yes | |
### 7.2. <a name='L1Miner'></a>L1Miner ### 7.1. <a name='L1NodeMining'></a>L1NodeMining
`L1Miner` describes a miner on a Level 1 blockchain, detailing its network, mining power, and status, crucial for understanding blockchain mining dynamics.
| Attribute Name | Type | Option | Description | | Attribute Name | Type | Option | Description |
|----------------|--------------|--------|----------------------------------------------------------| |---------------------------|-------------------|--------|---------------------------|
| `id` | ```u32``` | | Unique identifier for the L1 miner. | | `sp_address_minig_reward` | ```string``` | | SP mining reward address. |
| `network` | ```String``` | | The blockchain network the L1 miner is part of. | | `block_mined_list` | ```Vec<String>``` | | List of mined blocks. |
| `ip_address` | ```String``` | | IP address of the L1 miner. |
| `port` | ```u16``` | | Port number the L1 miner listens on. |
| `status` | ```String``` | | Current status of the L1 miner (e.g., active, inactive). |
| `mining_power` | ```u16``` | | The mining power of the L1 miner in hashes per second. |
### 7.3. <a name='L2Node'></a>L2Node ### 7.2. <a name='L2Node'></a>L2Node
This struct represents a Level 2 (Layer 2) blockchain node, focusing on scalability solutions and includes details such as its network and operation layer. This struct represents a Level 2 (Layer 2) blockchain node, focusing on scalability solutions and includes details such as its network and operation layer.
| Attribute Name | Type | Option | Description | | Attribute Name | Type | Option | Description |
|----------------|--------------|--------|---------------------------------------------------------| |------------------------|--------------|--------|-------------------------------|
| `id` | ```u32``` | | Unique identifier for the L2 node. | | `address_port` | ```u16``` | | The port address of the node. |
| `network` | ```String``` | | The blockchain network the L2 node is part of. | | `explorer_base_url` | ```String``` | | The base URL of the explorer. |
| `ip_address` | ```String``` | | IP address of the L2 node. | | `sp_address_anchorage` | ```String``` | | The SP anchorage address. |
| `port` | ```u16``` | | Port number the L2 node listens on. | | `sp_address_reward` | ```String``` | | The SP reward address. |
| `status` | ```String``` | | Current status of the L2 node (e.g., active, inactive). | | `nbits` | ```u32``` | | Number of bits. |
| `layer` | ```String``` | | Indicates the layer (L2) the node operates at. | | `magic_number` | ```u32``` | | The magic number. |
| `challenge` | ```String``` | | The challenge. |
### 7.3. <a name='L2NodeMining'></a>L2NodeMining
| Attribute Name | Type | Option | Description |
|---------------------------|-------------------|--------|-----------------------------|
| `sp_address_minig_reward` | ```string``` | | SP mining reward address. |
| `sp_address_refunder` | ```string``` | | SP refunder address. |
| `block_hash_mined_list` | ```Vec<String>``` | | List of mined block hashes. |
### 7.4. <a name='L2Certif'></a>L2Certif ### 7.4. <a name='L2Certif'></a>L2Certif
`L2Certif` specifies a Layer 2 certification authority, including its network and certification type, vital for managing certifications on Layer 2 solutions. `L2Certif` specifies a Layer 2 certification, including its network and certification type, vital for managing certifications on Layer 2 solutions.
| Attribute Name | Type | Option | Description | | Attribute Name | Type | Option | Description |
|----------------|--------------|--------|----------------------------------------------------------------------------| |------------------------|------------------------|--------|--------------------------------|
| `id` | ```u32``` | | Unique identifier for the L2 certification authority. | | `sp_address_certif_l1` | ```String``` | | Level 1 certification address. |
| `network` | ```String``` | | The blockchain network the L2 certif is part of. | | `sp_address_refunded` | ```string``` | | Refunded address. |
| `ip_address` | ```String``` | | IP address of the L2 certification authority. | | `block_certified_list` | ```Vec<BlockCertif>``` | | List of certified blocks. |
| `port` | ```u16``` | | Port number the L2 certification authority listens on. |
| `status` | ```String``` | | Current status of the L2 certification authority (e.g., active, inactive). | ### 7.5. <a name='BlockCertif'></a>BlockCertif
| `certif_type` | ```String``` | | Type of certification or service provided by the L2 certif. |
| Attribute Name | Type | Option | Description |
|-------------------|-------------------|--------|-------------------------------|
| `block_hash_list` | ```Vec<String>``` | | List of block hashes. |
| `certif_hash` | ```Vec<String>``` | | List of certification hashes. |
| `l1_tx` | ```String``` | | Level 1 transaction. |
## 8. <a name='Metadata'></a>Metadata ## 8. <a name='Metadata'></a>Metadata

View File

@ -1,6 +1,6 @@
<mxfile host="Electron" modified="2024-03-06T14:00:38.224Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/23.1.5 Chrome/120.0.6099.109 Electron/28.1.0 Safari/537.36" etag="qL1fVQsuK1z3YtfG2JJh" version="23.1.5" type="device"> <mxfile host="Electron" modified="2024-03-06T15:07:22.501Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/23.1.5 Chrome/120.0.6099.109 Electron/28.1.0 Safari/537.36" etag="j0pJT2eE_cVT8KCkafA3" version="23.1.5" type="device">
<diagram id="bWoO5ACGZIaXrIiKNTKd" name="Page-1"> <diagram id="bWoO5ACGZIaXrIiKNTKd" name="Page-1">
<mxGraphModel dx="3676" dy="1894" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> <mxGraphModel dx="3915" dy="2039" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root> <root>
<mxCell id="0" /> <mxCell id="0" />
<mxCell id="1" parent="0" /> <mxCell id="1" parent="0" />
@ -56,7 +56,7 @@
<mxPoint x="-717" y="67" as="sourcePoint" /> <mxPoint x="-717" y="67" as="sourcePoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="77" value="ImageRevoke" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontColor=#000000;fontStyle=1" parent="1" vertex="1"> <mxCell id="77" value="ImageRevoke" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontStyle=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="-770.93" y="37.92" width="110" height="29" as="geometry" /> <mxGeometry x="-770.93" y="37.92" width="110" height="29" as="geometry" />
</mxCell> </mxCell>
<mxCell id="154" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;labelBackgroundColor=none;fontColor=#000000;" parent="1" source="155" target="2" edge="1"> <mxCell id="154" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;labelBackgroundColor=none;fontColor=#000000;" parent="1" source="155" target="2" edge="1">
@ -118,7 +118,7 @@
<mxCell id="280" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="181" target="279" edge="1"> <mxCell id="280" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="181" target="279" edge="1">
<mxGeometry relative="1" as="geometry" /> <mxGeometry relative="1" as="geometry" />
</mxCell> </mxCell>
<mxCell id="181" value="ImageRecover" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontColor=#000000;fontStyle=1" parent="1" vertex="1"> <mxCell id="181" value="ImageRecover" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontStyle=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="-772" y="252.71000000000004" width="110" height="29" as="geometry" /> <mxGeometry x="-772" y="252.71000000000004" width="110" height="29" as="geometry" />
</mxCell> </mxCell>
<mxCell id="259" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="189" target="202" edge="1"> <mxCell id="259" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="189" target="202" edge="1">
@ -767,7 +767,7 @@
<mxCell id="YAJWOaMnfQJNXjO860FT-287" value="SHA256" style="label;whiteSpace=wrap;html=1;image=img/clipart/Gear_128x128.png" parent="1" vertex="1"> <mxCell id="YAJWOaMnfQJNXjO860FT-287" value="SHA256" style="label;whiteSpace=wrap;html=1;image=img/clipart/Gear_128x128.png" parent="1" vertex="1">
<mxGeometry x="-1785.88" y="-322.96" width="137.39" height="40" as="geometry" /> <mxGeometry x="-1785.88" y="-322.96" width="137.39" height="40" as="geometry" />
</mxCell> </mxCell>
<mxCell id="mM1gybHHXk3-ZNENjHdL-284" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.224;entryY=0.065;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="8" target="181"> <mxCell id="mM1gybHHXk3-ZNENjHdL-284" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.224;entryY=0.065;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="8" target="181" edge="1">
<mxGeometry relative="1" as="geometry" /> <mxGeometry relative="1" as="geometry" />
</mxCell> </mxCell>
</root> </root>