@@ -42,6 +42,8 @@ Meaning that a given `document` is signed by some available keyring.
A public key is following the [Substrate's definition of an Account public key](https://wiki.polkadot.network/docs/learn-keys#account-keys), that is an Ed25519, Sr25519 or Ecdsa public key.
> TODO: precise where is the signatory's public key stored in a document?
## Constants
Constant | Goal
...
...
@@ -62,8 +64,8 @@ xpercent | Minimum percent of sentries to reach to match the distance r
msValidity | Maximum age of an active membership (in seconds)
stepMax | Maximum distance between each WoT member and a newcomer
medianTimeBlocks | Number of blocks used for calculating median time.
minTimeChange | The minimum allowed value for time changing
maxTimeChange | The maximum allowed value for time changing
minTimeChange | The minimum allowed value for time changing TODO: OK ou pas ?
maxTimeChange | The maximum allowed value for time changing TODO: OK ou pas ?
blockGenTime | The average time between two blocks
## Documents
...
...
@@ -88,6 +90,8 @@ Where:
The concrete binary version of a document must follow Substrate's definition: see [how to compose a signed extrinsic](https://github.com/scs/substrate-api-client/blob/4589ccbc5643053a845729c77b175215471cff3f/compose-macros/src/lib.rs) for more details.
> TODO: préciser
### Metadata
Every document must end with the following values:
...
...
@@ -97,6 +101,8 @@ Every document must end with the following values:
* Spec version: to ensure the action is compliant with current specification (i.e. the protocol)
* Action version: to ensure the action is compliant with current actions definition (format, parameters)
> TODO: préciser
### Signature
Every document is signed over the whole data (document + metadata).
...
...
@@ -115,6 +121,10 @@ An identity is to published in the process of becoming a new WoT member, thus pr
Fees are returned to the sender if the operation succeeds.
> TODO: quelle protection si pas de monnaie ?
>
> TODO: calcul des frais
#### Format
Dubp.identify(user_id, metadata)
...
...
@@ -162,6 +172,8 @@ Where:
*`0x3db211c9fccee8b149b1a9b2e478a689e6750060395b49fe40125ba1050228a3` is the hexadecimal value of genesis hash
* The last three `()` metadata values are required for the current specification checks
> TODO: vérifier/revoir les specification checks
### Revocation
#### Definition
...
...
@@ -172,6 +184,8 @@ A revocation is the act for its owner to permanently disable the membership of a
Fees are returned to the sender if the operation succeeds.
> TODO: suffisant ? calcul
#### Use case
Disabling the membership of an Account, because, for example:
...
...
@@ -186,7 +200,7 @@ Disabling the membership of an Account, because, for example:
#### Example
A valid revocation document:
A valid revokation document:
```
sign(
...
...
@@ -211,12 +225,14 @@ sign(
Where:
*`0x00` is the value meaning _non-perishable_
*`0x00` is the Nonce special value _00_ as Nonce is not controlled for this particular document
*`0x00` is the Nonce special value _00_ (TODO: confirm) as Nonce is not controlled for this particular document
*`100` is the current spec version
*`1` is the current tx version
*`0x3db211c9fccee8b149b1a9b2e478a689e6750060395b49fe40125ba1050228a3` is the hexadecimal value of genesis hash
* The last three `()` metadata values are required for the current specification checks
> TODO: vérifier/revoir les specification checks
### Certification
#### Definition
...
...
@@ -229,6 +245,8 @@ Fees are returned to the sender if he is a member.
The idea is to make this operation _free_ and allowed only for members. Non-members would pay the fee and see the certification fail, so fees won't be returned for them.
> TODO: calcul
#### Format
Dubp.certify(target_pubkey, metadata)
...
...
@@ -274,6 +292,8 @@ Where:
*`0x3db211c9fccee8b149b1a9b2e478a689e6750060395b49fe40125ba1050228a3` is the hexadecimal value of genesis hash
* The last three `()` metadata values are required for the current specification checks
> TODO: vérifier/revoir les specification checks
### Membership
A _membership_ is the mean by which an Account owner expresses its will to become or remain a member of the WoT (so the owner can produce the UD, blocks and certify people).
...
...
@@ -282,6 +302,10 @@ A _membership_ is the mean by which an Account owner expresses its will to becom
Fees are returned to the sender if the operation succeeds, making it free for members.
> TODO: quelles règles pour permettre à un non-membre de publier son adhésion sans risque de spam ? Problème du non-membre qui n'a pas de quoi financer les frais.
>
> TODO: calcul
#### Format
Dubp.adhere(metadata)
...
...
@@ -319,6 +343,8 @@ Where:
*`0x3db211c9fccee8b149b1a9b2e478a689e6750060395b49fe40125ba1050228a3` is the hexadecimal value of genesis hash
* The last three `()` metadata values are required for the current specification checks
> TODO: vérifier/revoir les specification checks
### UD production
#### Definition
...
...
@@ -335,6 +361,8 @@ The operation fails if the production equals `0`, which can occur for the follow
* no UD was officialized since the account has become member
* all the available UDs were already produced
> TODO: fees amount?
#### Format
Dubp.produce_ud(metadata)
...
...
@@ -386,6 +414,8 @@ A transaction allows transferring money from an account to another.
There are no fees if the transaction is made by a member account (more precisely: fees are returned if the transaction succeeds).
> TODO: calcul
#### Format
Dubp.transfer(amount, to, produce_ud_if_needed, metadata)
...
...
@@ -445,6 +475,8 @@ Where:
*`0x3db211c9fccee8b149b1a9b2e478a689e6750060395b49fe40125ba1050228a3` is the hexadecimal value of genesis hash
* The last three `()` metadata values are required for the current specification checks
> TODO: vérifier/revoir les specification checks
### Session
#### Definition
...
...
@@ -469,8 +501,12 @@ Public keys to be used for:
* GRANDPA
* I'm online
> TODO
#### Example
> TODO
### AtomicSwap
See [Substrate's AtomicSwap pallet](https://docs.substrate.io/rustdocs/latest/pallet_atomic_swap/index.html).
...
...
@@ -499,6 +535,9 @@ extrinsics_root | Merkle root of the body elements
state_root | Merkle root of the Storage
digest | TODO: pas clair
> TODO: décrire précisément comment les champs s'enchaîne en hexa ou autre
> TODO: préciser comment BABE s'intègre dans le bloc (slot number notamment)