Skip to content

[Design] Authorization Sample Selection Algorithm

bitkis edited this page Dec 7, 2018 · 1 revision

Algorithm's idea has been taken from Dash (https://github.com/dashpay/dash/blob/master/src/masternode.cpp#L96) Selection performed with following steps:

  1. Pick some block hash. Right now block selected as block_height - N, where block_height - current block height (at the moment of selection), N = 20;
  2. For every subset of supernodes (each subset represents a supernodes belonging to particular tier, based on it's stake amount) we select two supernodes with biggest score (hash numeric value), where score calculated as:
    1. concatenate supernode public address with block hash;
    2. hash result using crypto::cn_fast_hash() function;
    3. threat hash value as 256 bit integer;