Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

fix!: make peer store methods atomic #368

Merged
merged 9 commits into from
Apr 21, 2023
Merged

Commits on Apr 11, 2023

  1. fix!: make peer store methods atomic

    The existing peer store interface has separate sub-stores for addresses,
    protocols, metadata, etc.
    
    Each method is async due to the underlying datastore being async.
    
    This means it's impossible to do atomic writes to the peer store if
    you have multiple sets of data to write.
    
    Internally, however, the default peer store implementation stores the
    peer data as a single datastore entry keyed on the peer id.
    
    This PR:
    
    1. Removes the sub-stores in favour of atomic `set`/`update` methods for peer data
    2. Removes `@libp2p/peer-store` specific init types
    3. Removes tagging methods in favour of `set`/`update` for peer data
    4. Removes references to consuming peer records since this is part of the identify protocol so should be handled there
    achingbrain committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    e6d041d View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2023

  1. Configuration menu
    Copy the full SHA
    7b78299 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    93ef259 View commit details
    Browse the repository at this point in the history
  3. chore: update interface

    achingbrain committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    30255d7 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2023

  1. chore: update events

    achingbrain committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    ea81b04 View commit details
    Browse the repository at this point in the history
  2. chore: remove events

    achingbrain committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    cf68c45 View commit details
    Browse the repository at this point in the history
  3. chore: add patch method

    achingbrain committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    dd363a6 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2023

  1. chore: make tags a map

    achingbrain committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    519f1f5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    11a28ea View commit details
    Browse the repository at this point in the history