Skip to content
  • Grégoire Henry's avatar
    P2p: change version selection · 65593eb3
    Grégoire Henry authored and Julien's avatar Julien committed
    This patch is not compatible with current mainnet `nedes`, but three
    other patches provides a three-stage migration plan.
    
    Instead of sending a list of triplet `(name, major, miner)`, we now
    only announce only one triplet `(chain_name, distributed_db_version,
    p2p_version)`.
    
    The `chain_name` must be the exact same on each host.
    
    The two others `*_version` are negotiated independently with the
    following algorithm:
    - announce the greater known version;
    - choose the minimal number between the announced one and the received
      one;
    - accept the connection only the chosen version is known locally.
    
    This algorithm is fairly complete unless we introduce "hole" in the
    sequence of acceptable version numbers.
    65593eb3