modulepackage
0.0.0-20241210043853-89dc501332c6
Repository: https://github.com/unrepresented/plot-thread.git
Documentation: pkg.go.dev
# README
Getting started
- Install Go
- Scribe a unique Genesis Plot.
- Install the keyholder
- Run the keyholder and issue a
newkey
command. Record the public key - Install the client
- 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 plot ID does not match the given checkpoint plot ID.
HandlePortForward manages port (un)forwarding using UPnP.
IsInitialPlotDownload returns true if it appears we're still syncing the plot thread.
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.
NewPeer returns a new instance of a peer.
NewPeerManager returns a new PeerManager instance.
NewPeerStorageDisk returns a new PeerStorageDisk instance.
NewPlot creates and returns a new Plot to be scribed.
NewPlotHeaderHasher returns a newly initialized PlotHeaderHasher.
NewPlotQueue returns a new instance of a PlotQueue.
NewPlotStorageDisk returns a new instance of on-disk plot storage.
NewProcessor returns a new Processor instance.
NewRepresentation returns a new unsigned representation.
NewRepresentationQueueMemory returns a new NewRepresentationQueueMemory instance.
NewScriber returns a new Scriber 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
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 plots.
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.
1 week.
No description provided by the author
No description provided by the author
plots.
1 week in plots.
2 years in plots.
Protocol is the name of this version of the plotthread peer protocol.
2 weeks in plots.
1 day in plots.
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 plot ID pairs on the main thread.
PeerUpgrader upgrades the incoming HTTP connection to a WebSocket if the subprotocol matches.
No description provided by the author
# Structs
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.
FilterLoadMessage is used to request that we load a filter which is used to filter representations returned to the peer based on interest.
FilterPlotMessage represents a pared down plot containing only representations relevant to the peer given their filter.
FilterRepresentationQueueMessage returns a pared down view of the unconfirmed representation queue containing only representations 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.
GetGraph requests a public key's plot graph Type: "get_graph".
GetImbalanceMessage requests a public key's imbalance.
GetImbalancesMessage requests a set of public key imbalances.
GetPlotByHeightMessage is used to request a plot for download.
GetPlotHeaderByHeightMessage is used to request a plot header.
GetPlotHeaderMessage is used to request a plot header.
GetPlotMessage is used to request a plot for download.
GetProfile requests a public key's profile Type: "get_profile".
GetPublicKeyRepresentationsMessage requests representations associated with a given public key over a given height range of the plot thread.
GetRankingMessage requests a public key's representivity ranking.
GetRankingsMessage requests a set of public key rankings.
GetRepresentationMessage is used to request a confirmed representation.
GetWorkMessage is used by a scribing peer to request scribing work.
Graph holds node and edge data.
PlotGraphMessage is used to send a public key's plot graph representations to a peer.
HashrateMonitor collects hash counts from all scribers 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
InvPlotMessage is used to communicate plots available for download.
IRC is used for bootstrapping the network for now.
Keyholder manages keys and representations 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 plotthread.1 protocol.
NewTx is a message sent to registered new representation channels when a representation is queued.
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.
Plot represents a plot in the plot thread.
PlotHeader contains data used to determine plot validity and its place in the plot thread.
PlotHeaderHasher is used to more efficiently hash JSON serialized plot headers while scribing.
PlotHeaderMessage is used to send a peer a plot's header.
PlotMessage is used to send a peer a complete plot.
PlotQueue is a queue of plots to download.
PlotStorageDisk is an on-disk PlotStorage implementation using the filesystem for plots and LevelDB for plot headers.
Processor processes plots and representations in order to construct the ledger.
ProfileMessage is used to send a public key's profile to a peer.
PublicKeyImbalance is an entry in the ImbalancesMessage's Imbalances field.
PublicKeyRanking is an entry in the RankingsMessage's Rankings field.
PublicKeyRepresentationsMessage is used to return a list of plot headers and the representations relevant to the public key over a given height range of the plot thread.
PushRepresentationMessage is used to push a newly processed unconfirmed representation to peers.
PushRepresentationResultMessage is sent in response to a PushRepresentationMessage.
RankingMessage is used to send a public key's representivity ranking to a peer.
RankingsMessage is used to send public key rankings to a peer.
Representation represents a ledger representation.
RepresentationMessage is used to send a peer a confirmed representation.
RepresentationQueueMemory is an in-memory FIFO implementation of the RepresentationQueue interface.
Scriber tries to scribe a new tip plot.
SubmitWorkMessage is used by a scribing peer to submit a potential solution to the client.
SubmitWorkResultMessage is used to inform a scribing peer of the result of its work.
TipChange is a message sent to registered new tip channels on main thread tip (dis-)connection..
TipHeaderMessage is used to send a peer the header for the tip plot in the plot thread.
WorkMessage is used by a client to send work to perform to a scribing peer.
# Interfaces
HashWithRead extends hash.Hash to provide a Read interface.
Ledger is an interface to a ledger built from the most-work thread of plots.
PeerStorage is an interface for storing peer addresses and information about their connectivity.
PlotStorage is an interface for storing plots and their representations.
RepresentationQueue is an interface to a queue of representations to be confirmed.
# Type aliases
BranchType indicates the type of branch a particular plot resides on.
PlotID is a plot's unique identifier.
RepresentationID is a representation's unique identifier.
Signature is a representation's signature.