@startuml
note "With B a Block\nWith W the Median fork window\nWith Cur the current block of the main branch" as N1
state Local_Tx {
[*] --> To_send : Signed locally
To_send : B = none
To_send --> Awaiting : Node answered\n200 OK to POST
Awaiting : B = Cur
Awaiting --> Refused : Not registered in [B; B+W]
Refused --> To_send : Send back
Refused --> [*] : Drop
}
state Registered {
[*] --> Validating : Posted\nsin the blockchain
Validating : B = Block containing the Tx
Awaiting --> Validating : Found in the blockchain
Validating --> Validated : Cur-B > W
Validated --> Validating : Blockchain\nrollback,\ntx still present
Validated --> Awaiting : Blockchain\nrollback,\ntx not\npresent anymore
}
@enduml
@startuml
note "With B a Block\nWith W the Median fork window\nWith Cur the current block of the main branch" as N1
state Local_Tx {
[*] --> To_send : Signed locally
To_send : B = none
To_send --> Awaiting : Node answered\n200 OK to POST
Awaiting : B = Cur
Awaiting --> Refused : Not registered in [B; B+W]
Refused --> To_send : Send back
Refused --> [*] : Drop
}
state Registered {
[*] --> Validating : Posted\nsin the blockchain
Validating : B = Block containing the Tx
Awaiting --> Validating : Found in the blockchain
Validating --> Validated : Cur-B > W
Validated --> Validating : Blockchain\nrollback
Validated --> Awaiting : Blockchain\nrollback\ntx local removed
Validated --> [*] : Blockchain\nrollback\ntx removed
Validating --> [*] : Blockchain\nrollback\ntx removed
}
@enduml