diff --git a/docs/api/runtime-calls.md b/docs/api/runtime-calls.md index e15a49ff9e7cf075fa9aab540e9d9c310ebdbbe9..4ed2a87ed940922376f99c7518ea5138f9d7b899 100644 --- a/docs/api/runtime-calls.md +++ b/docs/api/runtime-calls.md @@ -13,7 +13,7 @@ through on-chain governance mechanisms. ## User calls -There are **78** user calls from **23** pallets. +There are **79** user calls from **23** pallets. ### Account - 1 @@ -721,7 +721,7 @@ Link an account to an identity claim membership it must fullfill the requirements (certs, distance) -for main wot claim_membership is called automatically when validating identity +TODO #159 for main wot claim_membership is called automatically when distance is evaluated positively for smith wot, it means joining the authority members #### renew_membership - 2 @@ -777,7 +777,22 @@ The origin must be allow to certify. </details> -Request an identity to be evaluated +Request caller identity to be evaluated +positive evaluation will result in claim/renew membership +negative evaluation will result in slash for caller + +#### request_distance_evaluation_for - 4 + +<details><summary><code>request_distance_evaluation_for(target)</code></summary> + +```rust +target: T::IdtyIndex +``` +</details> + + +Request target identity to be evaluated +only possible for unvalidated identity #### update_evaluation - 1 @@ -790,6 +805,7 @@ computation_result: ComputationResult (Inherent) Push an evaluation result to the pool +this is called internally by validators (= inherent) #### force_update_evaluation - 2 @@ -802,20 +818,19 @@ computation_result: ComputationResult </details> -Push an evaluation result to the pool +Force push an evaluation result to the pool -#### force_set_distance_status - 3 +#### force_valid_distance_status - 3 -<details><summary><code>force_set_distance_status(identity, status)</code></summary> +<details><summary><code>force_valid_distance_status(identity)</code></summary> ```rust identity: <T as pallet_identity::Config>::IdtyIndex -status: Option<(<T as frame_system::Config>::AccountId, DistanceStatus)> ``` </details> -Set the distance evaluation status of an identity +Force set the distance evaluation status of an identity Removes the status if `status` is `None`. @@ -836,7 +851,7 @@ Removes the status if `status` is `None`. claim membership it must fullfill the requirements (certs, distance) -for main wot claim_membership is called automatically when validating identity +TODO #159 for main wot claim_membership is called automatically when distance is evaluated positively for smith wot, it means joining the authority members #### renew_membership - 2 diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md index 5feb1cf038c4e5e5ae19be103634e356ec1b6515..5d52e4bbc8efb248c0e28cddf594592184cdb197 100644 --- a/docs/api/runtime-errors.md +++ b/docs/api/runtime-errors.md @@ -1,6 +1,6 @@ # Runtime errors -There are **186** errors from **37** pallets. +There are **194** errors from **37** pallets. <ul> <li>System - 0 @@ -740,6 +740,13 @@ Cannot issue a certification to a revoked identity Issuer or receiver not found. </details> </li> +<li> +<details> +<summary> +<code>NotEnoughCertsReceivedToRequestDistanceEvaluation</code> - 16</summary> +Not enough certs received to request distance evaluation. +</details> +</li> </ul> </li> <li>Identity - 41 @@ -818,7 +825,7 @@ Invalid revocation key. <details> <summary> <code>IssuerNotMember</code> - 10</summary> -Issuer is not member and can not perform this action +Issuer is not member and can not perform this action. </details> </li> <li> @@ -853,21 +860,28 @@ Reverting to an old key is prohibited. <details> <summary> <code>AlreadyRevoked</code> - 15</summary> -Already revoked +Already revoked. </details> </li> <li> <details> <summary> <code>CanNotRevokeUnconfirmed</code> - 16</summary> -Can not revoke identity that never was member +Can not revoke identity that never was member. </details> </li> <li> <details> <summary> <code>CanNotRevokeUnvalidated</code> - 17</summary> -Can not revoke identity that never was member +Can not revoke identity that never was member. +</details> +</li> +<li> +<details> +<summary> +<code>AccountNotExist</code> - 18</summary> +Cannot link to an inexisting account. </details> </li> </ul> @@ -969,31 +983,66 @@ No author for this block. <li> <details> <summary> -<code>NoIdentity</code> - 4</summary> +<code>CallerHasNoIdentity</code> - 4</summary> Caller has no identity. </details> </li> <li> <details> <summary> -<code>QueueFull</code> - 5</summary> +<code>CallerIdentityNotFound</code> - 5</summary> +Caller identity not found. +</details> +</li> +<li> +<details> +<summary> +<code>CallerNotMember</code> - 6</summary> +Caller not member. +</details> +</li> +<li> +<details> +<summary> +<code>TargetIdentityNotFound</code> - 7</summary> +Target identity not found. +</details> +</li> +<li> +<details> +<summary> +<code>QueueFull</code> - 8</summary> Evaluation queue is full. </details> </li> <li> <details> <summary> -<code>TooManyEvaluators</code> - 6</summary> +<code>TooManyEvaluators</code> - 9</summary> Too many evaluators in the current evaluation pool. </details> </li> <li> <details> <summary> -<code>WrongResultLength</code> - 7</summary> +<code>WrongResultLength</code> - 10</summary> Evaluation result has a wrong length. </details> </li> +<li> +<details> +<summary> +<code>DistanceRequestOnlyAllowedForUnvalidated</code> - 11</summary> +Targeted distance evaluation request is only possible for an unvalidated identity +</details> +</li> +<li> +<details> +<summary> +<code>ValidDistanceResultAlreadyAvailable</code> - 12</summary> +Can not request distance evaluation when a valid result has already been published recently +</details> +</li> </ul> </li> <li>SmithSubWot - 50 @@ -1110,6 +1159,13 @@ Cannot issue a certification to a revoked identity Issuer or receiver not found. </details> </li> +<li> +<details> +<summary> +<code>NotEnoughCertsReceivedToRequestDistanceEvaluation</code> - 16</summary> +Not enough certs received to request distance evaluation. +</details> +</li> </ul> </li> <li>SmithMembership - 52 diff --git a/docs/api/runtime-events.md b/docs/api/runtime-events.md index cd058e2b44ecf4afb7ca98486c4ad0aefeb5649d..6a5a5766fdcd74c455bdb205d9ade234ecf67381 100644 --- a/docs/api/runtime-events.md +++ b/docs/api/runtime-events.md @@ -1,6 +1,6 @@ # Runtime events -There are **126** events from **37** pallets. +There are **127** events from **37** pallets. <ul> <li>System - 0 @@ -716,6 +716,18 @@ A member has been removed from the blacklist. member: T::MemberId ``` +</details> +</li> +<li> +<details> +<summary> +<code>MemberAddedToBlacklist(member)</code> - 6</summary> +A member has been blacklisted. + +```rust +member: T::MemberId +``` + </details> </li> </ul> @@ -1282,11 +1294,11 @@ who: T::AccountId <li> <details> <summary> -<code>EvaluationUpdated(evaluator)</code> - 1</summary> -A distance evaluation was updated. +<code>EvaluatedValid(idty_index)</code> - 1</summary> +Distance rule was found valid ```rust -evaluator: T::AccountId +idty_index: T::IdtyIndex ``` </details> @@ -1294,12 +1306,11 @@ evaluator: T::AccountId <li> <details> <summary> -<code>EvaluationStatusForced(idty_index, status)</code> - 2</summary> -A distance status was forced. +<code>EvaluatedInvalid(idty_index)</code> - 2</summary> +Distance rule was found invalid ```rust idty_index: T::IdtyIndex -status: Option<(<T as frame_system::Config>::AccountId, DistanceStatus)> ``` </details> diff --git a/resources/metadata.scale b/resources/metadata.scale index 60cf370fe64aecd0dc9bbdd157c56e90b5653228..4d9337c0598516f0e43d5730c9ced0abce0e5a1b 100644 Binary files a/resources/metadata.scale and b/resources/metadata.scale differ