lpp

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 27 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,
	metrics peering.Metrics,
	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