Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feed peer selection governor with big ledger peers obtained from a snapshot #4850

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on May 21, 2024

  1. Refactor ledgerPeersThread signature:

    This change tidies up a function signature to make use of records
    that were created previously for use by other functions. They bundle
    many common related values together to facilitate passing them around.
    crocodile-dentist committed May 21, 2024
    Configuration menu
    Copy the full SHA
    d7b268b View commit details
    Browse the repository at this point in the history
  2. Reorder STM actions:

    This change binds useLedgerPeers after unblocking due to a demand
    for ledger peers by its clients. If this value has changed in the
    configuration while the thread was dormant, ie. a race, it will be
    picked up when the function unblocks.
    crocodile-dentist committed May 21, 2024
    Configuration menu
    Copy the full SHA
    b7dac93 View commit details
    Browse the repository at this point in the history
  3. Expose functionality of calculating big ledger peers:

    Moved utility functions to ouroboros-network-api to support
    calculating big ledger peer snapshots by upstream libraries,
    for eg. Genesis consensus mode and bootstrapping a node with
    a recent snapshot of these peers.
    crocodile-dentist committed May 21, 2024
    Configuration menu
    Copy the full SHA
    ced1571 View commit details
    Browse the repository at this point in the history
  4. Support for serialization of peer snapshot:

    This change adds ToCBOR and FromCBOR instances that are necessary
    to serialize a snapshot of ledger peers.
    crocodile-dentist committed May 21, 2024
    Configuration menu
    Copy the full SHA
    5e98e10 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. Enable distribution of big ledger peers obtained from snapshot:

    Depending on its topology configuration, a node may provide diffusion
    layer with a snapshot of big ledger peers from some slot. This value
    is provided as an argument when diffusion is initialized, and is
    provided to ledgerPeersThread function, which contains the logic
    when these peers, if any, can be provided to peer selection governor
    when it requests them. This is especially useful when consensus is
    ran in Genesis mode and when the node is bootstrapping so it may have
    opportunity to connect to these trustworthy peers when they may not
    be yet available on its own ledger.
    crocodile-dentist committed May 27, 2024
    Configuration menu
    Copy the full SHA
    fbb9902 View commit details
    Browse the repository at this point in the history
  2. Added a property test that verifies validity of peer snapshot CBOR

    encoding, as well as checking that ToCBOR and FromCBOR are working
    together correctly.
    crocodile-dentist committed May 27, 2024
    Configuration menu
    Copy the full SHA
    ae7a451 View commit details
    Browse the repository at this point in the history
  3. Added ledger peer snapshot property tests

    Improved naming of functions related to calculating big ledger stake
    distribution which were to moved public ouroboros-network-api component.
    crocodile-dentist committed May 27, 2024
    Configuration menu
    Copy the full SHA
    ba520a7 View commit details
    Browse the repository at this point in the history