Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[release/1.3.1] [CO-354] Introduce NetworkMagic #3558

Merged

Commits on Sep 10, 2018

  1. [CO-354] Fix stylish-haskell

    mhuesch committed Sep 10, 2018
    Configuration menu
    Copy the full SHA
    bad8163 View commit details
    Browse the repository at this point in the history
  2. [CO-354] Introduce NetworkMagic

    Building on the previous commit, we add the `NetworkMagic` datatype,
    which allows us to discriminate addresses originating from different
    networks.
    
    In order to make this commit as simple and easy-to-review as possible,
    I stub out the added arguments of type `NetworkMagic` with a dummy
    variable: `fixedNM`. This puts of the (fairly involved) work of
    threading `NetworkMagic` values from the nearest occurrence of
    `ProtocolMagic` to where said values are needed.
    
    The remainder of the work will come in a separate commit.
    
    ---
    Merged with:
    [CO-354] Make use of Blake2b_256 for constructing NetworkMagic
    [CO-354] NetworkMagic: use Int32 rather than Word8
        We opt to keep the full 32bits of the ProtocolMagicId, instead of
        truncating to 8 bits. This reduces the probability of collisions.
    
        While we would ideally use a Word32 (since sign has no meaning in
        identifier-space), we're stuck using Int32 because that is how
        ProtocolMagicId is defined.
    ---
    
    Co-authored-by: Michael Hueschen <michael.hueschen@iohk.io>
    Co-authored-by: Luke Nadur <luke.nadur@iohk.io>
    3 people committed Sep 10, 2018
    Configuration menu
    Copy the full SHA
    b12682e View commit details
    Browse the repository at this point in the history