lpp

package
v0.6.1-alpha.4-prerelease Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package lpp implements a peering.NetworkProvider based on the libp2p.

The set of known peers is managed in several places:

  • TrustManager contains a registry of trusted peers and their pub keys. That's the main reference DB for the authentication. It is persistent.
  • libp2p.Peerstore -- loaded with addresses and public keys based on the TrustManager. It is used by the libp2p for address resolution and protocol negotiation.
  • In-memory copy of the trust DB in the netImpl struct (maps: peerNy*) with additional runtime data needed for a fast lookup of peers by their libp2p IDs, as well as for authentication etc.

The main identification of a peer is its public key. The address (peeringURL) may change over time (because of NAT, and similar reasons).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetworkProvider

func NewNetworkProvider(
	myPeeringURL string,
	port int,
	nodeKeyPair *cryptolib.KeyPair,
	trusted peering.TrustedNetworkManager,
	log *logger.Logger,
) (peering.NetworkProvider, peering.TrustedNetworkManager, error)

NewNetworkProvider is a constructor for the TCP based peering network implementation.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL