Research Article
Blockchain-Based Cyber Threat Intelligence Sharing Using Proof-of-Quality Consensus
Algorithm 2
Pseudocode for proof-of-quality algorithm.
| Data:: Validators | | : Validator Rating Matrix | | : Number of selected validators | | : q-first variable | | Result: Calculate (equation (9)) and reach Consensus | (1) | initialisation\; | | /for each validator/ | (2) | fordo | (3) | Outlier Detection; | (4) | Calculate ; //equation (4) | (5) | ; //create ordered list equation (5) | (6) | ifthen | (7) | ; //to all validators | (8) | end | (9) | end | (10) | Construct matrix ;//equation (6) | | / each validator vote on / | (11) | fordo | (12) | fordo | (13) | Construct matrix ; //equation (7) | (14) | end | (15) | end | (16) | Construct matrix ; //equation (8) | (17) | do | (18) | calculate ; //equation (9) | (19) | if unique winner then | (20) | Consensus = TRUE | (21) | else | (22) | ; | (23) | end | (24) | While Consensus = TRUE; |
|