Specify which challenge function to used when NSPEC006 required a state update challenge, a delivery challenge, or a swap challenge.

Technical Specification

Challenge decision diagram

Below is the decision diagram indicating when to challenge.

graph TD init(User come online
before 4th Epoch) --> ava{Is a PoEA
available at
the operator?} ava -- Yes --> verif1{Is PoEA valid ?} ava -- No --> SUC(Initiate State
Update Challenge) verif1 --No--> SUC verif1 --Yes --> verif2{Are all
delivered ?} verif2 --No--> DC(Initiate delivery/swap
challenge) SUC --> answerSUC{Was the
answered ?} answerSUC --Yes-->verif2 answerSUC --No-->Recovery(Recovery) verif2 --Yes--> Safe(Safe) Recovery DC --> answerDC{Was the
answered ?} answerDC --Yes--> Safe answerDC --No--> Recovery style Recovery fill:#FF0000 style Safe fill:#00FF00

PoEA = Proof Of exclusive Allotment

  • Challenges cannot be initialized during the first epoch, this means that the user might have to wait for the first epoch to pass if a challenge is required.
  • A challenge is considered unanswered if there no response after a quarter of an eon after the challenge opening.

Challenge summary table

Type Challenge function When to use Answer function Challenge Input Answer input
Sate update challenge challengeStateUpdateWithProofOfExclusiveBalanceAllotment For accounts with A(e1)>0 A(e-1) \gt 0 answerStateUpdateChallenge AiK(e1)\mathfrak{A}_i^K(e-1), SIGop(SiK(e))SIG_{op}(\mathfrak{S}_i^K(e)), SiK(e)\mathfrak{S}_i^K(e) AiK(e)\mathfrak{A}_i^K(e), SIGop(SiK(e))SIG_{op}(\mathfrak{S}_i^K(e)), SIGi(SiK(e))SIG_{i}(\mathfrak{S}_i^K(e))
Sate update challenge challengeStateUpdateWithProofOfActiveStateUpdateAgreement When account was created at e1 e-1 or can also be used when A(e1)=0 A(e-1) = 0 answerStateUpdateChallenge SIGop(SiK(e))SIG_{op}(\mathfrak{S}_i^K(e)) , SiK(e)\mathfrak{S}_i^K(e) AiK(e)\mathfrak{A}_i^K(e), SIGop(SiK(e))SIG_{op}(\mathfrak{S}_i^K(e)), SIGi(SiK(e))SIG_{i}(\mathfrak{S}_i^K(e))
Delivery challenge challengeTransferDeliveryWithProofOfActiveStateUpdateAgreement To enforce transfer delivery, for non finalized transfers (last in recipient passive set) answerTransferDeliveryChallengeWithProofOfPassiveStateUpdate SIGop(SAK) SIG_{op}(\mathfrak{S}_A^K) , λA(TA,BKPAK) \lambda_A(\mathfrak{T}_{A,B}^K \in\mathbb{P}_A^K) ABK(e) \mathfrak{A}_B^K(e) ,λP(TA,BKPBK)\lambda_P(\mathfrak{T}_{A,B}^K \in\mathbb{P}_B^K)
Delivery challenge challengeTransferDeliveryWithProofOfPassiveStateUpdate To enforce transfer delivery, for finalized transfers answerTransferDeliveryChallengeWithProofOfPassiveStateUpdate AAK(e)\mathfrak{A}_A^K(e), λA(TA,BKPAK)\lambda_A(\mathfrak{T}_{A,B}^K \in\mathbb{P}_A^K) ABK(e) \mathfrak{A}_B^K(e) ,λP(TA,BKPBK)\lambda_P(\mathfrak{T}_{A,B}^K \in\mathbb{P}_B^K)
Swap delivery challenge challengeSwapEnactmentWithProofOfActiveStateUpdateAgreement To enforce fair price of swaps answerSwapChallengeWithProofOfExclusiveBalanceAllotmen AiX(e)\mathfrak{A}_i^X(e), λA(XiX,YPiX)\lambda_A(\mathfrak{X}_i^{X,Y} \in\mathbb{P}_i^X ) AiY(e)\mathfrak{A}_i^Y(e), λA(XiX,YPiY)\lambda_A(\mathfrak{X}_i^{X,Y} \in\mathbb{P}_i^Y )

Example Implementation

Challenge service from the NOCUST client library:


  • 15.10.2019 - First complete draft

All content herein is licensed under GPL License.

results matching ""

    No results matching ""