Categorygithub.com/inconsiderable/pass-trail
modulepackage
0.0.0-20250213180436-f05a35a2862b
Repository: https://github.com/inconsiderable/pass-trail.git
Documentation: pkg.go.dev

# README

Getting started

  1. Install Go
  2. Track a unique Genesis Pass.
  3. Install the keyholder
  4. Run the keyholder and issue a newkey command. Record the public key
  5. Install the client
  6. Run the client using the public key from step 5. as the -pubkey argument

Complete steps for installation of Go and the ledger binaries on Linux can be found here.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

CheckpointCheck returns an error if the passed height is a checkpoint and the passed pass ID does not match the given checkpoint pass ID.
HandlePortForward manages port (un)forwarding using UPnP.
IsInitialPassDownload returns true if it appears we're still syncing the pass trail.
NewConsideration returns a new unsigned consideration.
NewConsiderationQueueMemory returns a new NewConsiderationQueueMemory instance.
NewDNSSeeder creates a new DNS seeder given a PeerStorage interface.
NewGraph initializes and returns a new graph.
NewHashrateMonitor returns a new HashrateMonitor instance.
NewImbalanceCache returns a new instance of a ImbalanceCache.
No description provided by the author
NewIRC returns a new IRC bootstrapper.
NewKeyholder returns a new Keyholder instance.
NewLedgerDisk returns a new instance of LedgerDisk.
NewOrderedHashSet creates and returns a new OrderedHashSet.
NewPass creates and returns a new Pass to be tracked.
NewPassHeaderHasher returns a newly initialized PassHeaderHasher.
NewPassQueue returns a new instance of a PassQueue.
NewPassStorageDisk returns a new instance of on-disk pass storage.
NewPeer returns a new instance of a peer.
NewPeerManager returns a new PeerManager instance.
NewPeerStorageDisk returns a new PeerStorageDisk instance.
NewProcessor returns a new Processor instance.
NewTracker returns a new Tracker instance.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
height at which we switch from bitcoin's difficulty adjustment algorithm to bitcoin cash's algorithm.
CheckpointsEnabled can be disabled for testing.
No description provided by the author
16.666..
No description provided by the author
LatestCheckpointHeight is used to determine if the client is synced.
No description provided by the author
No description provided by the author
No description provided by the author
pre-calculated.
if you change this it needs to be less than the maximum at the current height.
2 hours.
No description provided by the author
No description provided by the author
bytes (ascii/utf8 only).
given our JSON protocol we should respect Javascript's Number.MAX_SAFE_INTEGER value.
No description provided by the author
doesn't apply to passes.
1 week.
No description provided by the author
No description provided by the author
2 years in passes.
1 week in passes.
passes.
Protocol is the name of this version of the passtrail peer protocol.
2 weeks in passes.
1 day in passes.
2 weeks in seconds.
No description provided by the author
No description provided by the author
every 10 minutes.
No description provided by the author

# Variables

Checkpoints are known height and pass ID pairs on the main trail.
PeerUpgrader upgrades the incoming HTTP connection to a WebSocket if the subprotocol matches.
No description provided by the author

# Structs

Consideration represents a ledger consideration.
ConsiderationMessage is used to send a peer a confirmed consideration.
ConsiderationQueueMemory is an in-memory FIFO implementation of the ConsiderationQueue interface.
DNSSeeder returns known peers in response to DNS queries.
FilterAddMessage is used to request the addition of the given public keys to the current filter.
FilterConsiderationQueueMessage returns a pared down view of the unconfirmed consideration queue containing only considerations relevant to the peer given their filter.
FilterLoadMessage is used to request that we load a filter which is used to filter considerations returned to the peer based on interest.
FilterPassMessage represents a pared down pass containing only considerations relevant to the peer given their filter.
FilterResultMessage indicates whether or not the filter request was successful.
FindCommonAncestorMessage is used to find a common ancestor with a peer.
GetConsiderationMessage is used to request a confirmed consideration.
GetGraph requests a public key's pass graph Type: "get_graph".
GetImbalanceMessage requests a public key's imbalance.
GetImbalancesMessage requests a set of public key imbalances.
GetPassByHeightMessage is used to request a pass for download.
GetPassHeaderByHeightMessage is used to request a pass header.
GetPassHeaderMessage is used to request a pass header.
GetPassMessage is used to request a pass for download.
GetProfile requests a public key's profile Type: "get_profile".
GetPublicKeyConsiderationsMessage requests considerations associated with a given public key over a given height range of the pass trail.
GetRankingMessage requests a public key's considerability ranking.
GetRankingsMessage requests a set of public key rankings.
GetWorkMessage is used by a tracking peer to request tracking work.
Graph holds node and edge data.
PassGraphMessage is used to send a public key's pass graph considerations to a peer.
HashrateMonitor collects hash counts from all trackers in order to monitor and display the aggregate hashrate.
ImbalanceCache maintains a partial unconfirmed view of the ledger.
ImbalanceMessage is used to send a public key's imbalance to a peer.
ImbalancesMessage is used to send public key imbalances to a peer.
No description provided by the author
InvPassMessage is used to communicate passes available for download.
IRC is used for bootstrapping the network for now.
Keyholder manages keys and considerations on behalf of a user.
LedgerDisk is an on-disk implemenation of the Ledger interface using LevelDB.
Message is a message frame for all messages in the passtrail.1 protocol.
NewTx is a message sent to registered new consideration channels when a consideration is queued.
OrderedHashSet is a deduplicated collection of strings with preserved insertion order.
Pass represents a pass in the pass trail.
PassHeader contains data used to determine pass validity and its place in the pass trail.
PassHeaderHasher is used to more efficiently hash JSON serialized pass headers while tracking.
PassHeaderMessage is used to send a peer a pass's header.
PassMessage is used to send a peer a complete pass.
PassQueue is a queue of passes to download.
PassStorageDisk is an on-disk PassStorage implementation using the filesystem for passes and LevelDB for pass headers.
Peer is a peer client in the network.
PeerAddressesMessage is used to communicate a list of potential peer addresses known by a peer.
PeerManager manages incoming and outgoing peer connections on behalf of the client.
PeerStorageDisk is an on-disk implementation of the PeerStorage interface using LevelDB.
Processor processes passes and considerations in order to construct the ledger.
ProfileMessage is used to send a public key's profile to a peer.
PublicKeyConsiderationsMessage is used to return a list of pass headers and the considerations relevant to the public key over a given height range of the pass trail.
PublicKeyImbalance is an entry in the ImbalancesMessage's Imbalances field.
PublicKeyRanking is an entry in the RankingsMessage's Rankings field.
PushConsiderationMessage is used to push a newly processed unconfirmed consideration to peers.
PushConsiderationResultMessage is sent in response to a PushConsiderationMessage.
RankingMessage is used to send a public key's considerability ranking to a peer.
RankingsMessage is used to send public key rankings to a peer.
SubmitWorkMessage is used by a tracking peer to submit a potential solution to the client.
SubmitWorkResultMessage is used to inform a tracking peer of the result of its work.
TipChange is a message sent to registered new tip channels on main trail tip (dis-)connection..
TipHeaderMessage is used to send a peer the header for the tip pass in the pass trail.
Tracker tries to track a new tip pass.
WorkMessage is used by a client to send work to perform to a tracking peer.

# Interfaces

ConsiderationQueue is an interface to a queue of considerations to be confirmed.
HashWithRead extends hash.Hash to provide a Read interface.
Ledger is an interface to a ledger built from the most-work trail of passes.
PassStorage is an interface for storing passes and their considerations.
PeerStorage is an interface for storing peer addresses and information about their connectivity.

# Type aliases

BranchType indicates the type of branch a particular pass resides on.
ConsiderationID is a consideration's unique identifier.
PassID is a pass's unique identifier.
Signature is a consideration's signature.