package
2.2.6+incompatible
Repository: https://github.com/deso-protocol/core.git
Documentation: pkg.go.dev

# Functions

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
No description provided by the author
Exp returns a big.Float representation of exp(z).
No description provided by the author
Log returns the natural logarithm of x.
Log2 returns the binary logarithm of x.
Pow returns a big.Float representation of z**w.
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
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
No description provided by the author
No description provided by the author
No description provided by the author
CalcBlockRewardNanos computes the block reward for a given block height.
No description provided by the author
CalcNextDifficultyTarget computes the difficulty target expected of the next block.
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
No description provided by the author
No description provided by the author
Check whether the deposits being used to construct this transaction have RBF enabled.
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
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
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
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
No description provided by the author
DBDeleteAllStateRecords is an auxiliary function that is used to clean up the state before starting hyper sync.
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Note this deletes the follow for the follower *and* followed since a mapping should exist for each.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Note this deletes the like for the user *and* the liked post since a mapping should exist for each.
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
Note this deletes the message for the sender *and* receiver since a mapping should exist for each.
No description provided by the author
No description provided by the author
No description provided by the author
Note this deletes the message for the sender *and* receiver since a mapping should exist for each.
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
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
Note this deletes the repost for the user *and* the reposted post since a mapping should exist for each.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DBDeleteWithTxn is a wrapper function around BadgerDB delete function.
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
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
No description provided by the author
Specifying minTimestampNanos gives you all posts after minTimestampNanos Pass minTimestampNanos = 0 && maxTimestampNanos = 0 if you want all posts Setting maxTimestampNanos = 0, will default maxTimestampNanos to the current time.
DBGetAllPostsByTstamp returns all the posts in the db with the newest posts first.
DBGetAllProfilesByCoinValue returns all the profiles in the db with the highest coin values first.
No description provided by the author
No description provided by the author
DbGetBalanceEntriesHodlingYou fetches the BalanceEntries that hold the pkid passed in.
DbGetBalanceEntriesYouHold fetches the BalanceEntries that the passed in pkid holds.
DbGetBalanceEntry returns a balance entry from the database.
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
No description provided by the author
DBGetCommentPostHashesForParentStakeID returns all the comments, which are indexed by their stake ID rather than by their timestamp.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
This function returns a list of DiamondEntrys given by giverPKID to receiverPKID that contain post hashes.
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
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
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
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
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
No description provided by the author
Get NFT bid Entries *from the DB*.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DBGetNFTEntriesForPKID gets NFT Entries *from the DB*.
DBGetNFTEntriesForPostHash gets NFT Entries *from the DB*.
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
No description provided by the author
No description provided by the author
startPrefix specifies a point in the DB at which the iteration should start.
No description provided by the author
DBGetPaginatedProfilesByDeSoLocked returns up to 'numToFetch' profiles from the db.
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
This function returns a map of PKIDs that gave diamonds to a list of DiamondEntrys that contain post hashes.
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
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
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
No description provided by the author
DbGetTxindexFullTransactionByTxID TODO: This makes lookups inefficient when blocks are large.
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
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
DbGetUtxosForPubKey finds the UtxoEntry's corresponding to the public key passed in.
DBGetWithTxn is a wrapper function around the BadgerDB get function.
DBIteratePrefixKeys fetches a chunk of records from the provided db at a provided prefix, and beginning with the provided startKey.
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
No description provided by the author
TODO: are we sure we want to pass a pointer to an array here?.
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
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
No description provided by the author
Note that this adds a mapping for the follower *and* the pub key being followed.
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
Note that this adds a mapping for the user *and* the liked post.
No description provided by the author
No description provided by the author
No description provided by the author
Note that this adds a mapping for the sender *and* the recipient.
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
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
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
No description provided by the author
Note that this adds a mapping for the user *and* the reposted post.
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
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
DBSetWithTxn is a wrapper around BadgerDB Set function which allows us to add computation prior to DB writes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DecodeExtraData is used in consensus so don't change it.
DecodeFromBytes decodes a DeSoEncoder type from bytes.
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
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
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
No description provided by the author
No description provided by the author
No description provided by the author
Diff returns a diff of both values as long as both are of the same type and are a struct, map, slice, array or string.
No description provided by the author
EmptyDBEntry indicates an empty DB entry.
No description provided by the author
EncodeExtraData is used in consensus so don't change it.
No description provided by the author
EncodeKeyValue encodes DB key and value similarly to how DER signatures are encoded.
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
EncodeToBytes encodes a DeSoEncoder type to bytes, including encoder metadata such as existence byte, the encoder type, and the current blockHeight.
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
No description provided by the author
The number of hashing attempts in expectation it would take to produce the hash passed in.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FindLowestHash Mine for a given number of iterations and return the lowest hash value found and its associated nonce.
No description provided by the author
No description provided by the author
The frontend passes in the apiData.
GetBadgerDbPath returns the path where we store the badgerdb data.
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
No description provided by the author
At a particular diamond level, a fixed amount of DeSo is converted into creator coins and then sent to a user.
GetDataDir gets the user data directory where we store files in a cross-platform way.
Each diamond level is worth a fixed amount of DeSo.
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
GetMigrationVersion can be returned in GetVersionByte when implementing DeSoEncoders.
No description provided by the author
GetPrefixes loads all prefix_id byte array values into a DBPrefixes struct, and returns it.
No description provided by the author
No description provided by the author
No description provided by the author
GetSingleBalanceEntryFromPublicKeys fetches a single balance entry of a holder's creator or DAO coin.
No description provided by the author
GetStatePrefixes() creates a DBStatePrefixes object from the DBPrefixes struct and returns it.
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
No description provided by the author
No description provided by the author
No description provided by the author
InitDbWithGenesisBlock initializes the database to contain only the genesis block.
allowedHost is expected to be of the form "bitclout.com" See comments in this function for a description of these params Note: FeaturePolicy is apparently renamed to PermissionsPolicy.
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
No description provided by the author
No description provided by the author
IsByteArrayValidPublicKey is a general functionality that is used to verify if a byte array is a valid secp256k1 public key.
IsControlMessage is used by functions to determine whether a particular message is a control message.
No description provided by the author
No description provided by the author
No description provided by the author
IsRuleError returns true if the error is any of the errors specified above.
Return true if postEntry is a vanilla repost.
KeyValueToDBEntry is used to instantiate db entry from a <key, value> pair.
No description provided by the author
No description provided by the author
No description provided by the author
LogSelect is a helpful utility when developing or debugging queries.
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
No description provided by the author
This function attempts to make the file path provided.
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Decode filled message key of length MaxMessagingKeyNameCharacters array.
MigrationTriggered is a suggested conditional check to be called within RawEncodeWithoutMetadata and RawDecodeWithoutMetadata when defining the encoding migrations for DeSoEncoders.
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
No description provided by the author
NewBlockchain returns a new blockchain object.
No description provided by the author
TODO: Height not needed in this since it's in the header.
No description provided by the author
No description provided by the author
No description provided by the author
Create a new pool with no transactions in it.
No description provided by the author
No description provided by the author
No description provided by the author
Encode message key from varying length to a MaxMessagingKeyNameCharacters.
No description provided by the author
No description provided by the author
No description provided by the author
NewPeer creates a new Peer object.
No description provided by the author
No description provided by the author
No description provided by the author
NewServer initializes all of the internal data structures.
NewSnapshot creates a new snapshot instance.
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
PerformanceBadgerOptions are performance geared BadgerDB options that use much more RAM than the default settings.
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
PPrintJSON prints a JSON object but pretty.
No description provided by the author
ProofOfWorkHash is a hash function designed for computing DeSo block hashes.
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
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
No description provided by the author
No description provided by the author
No description provided by the author
PutUvarint encodes a uint64 into buf and returns the number of bytes written.
PutVarint encodes an int64 into buf and returns the number of bytes written.
RandInt32 returns a random 32-bit int.
RandInt64 returns a random 64-bit int.
RandomBytes returns a []byte with random values.
RandomBytesHex returns a hex string representing numBytes of entropy.
No description provided by the author
No description provided by the author
ReadMessage takes an io.Reader and de-serializes a single message from it.
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
ReadUvarint reads an encoded unsigned integer from r and returns it as a uint64.
ReadVarint reads an encoded signed integer from r and returns it as an int64.
No description provided by the author
No description provided by the author
No description provided by the author
ScaleFloatFormatStringToUint256 The most accurate way we've found to convert a decimal into a "scaled" value is to parse a string representation into a "whole" bigint and a "decimal" bigint.
No description provided by the author
No description provided by the author
No description provided by the author
SignTransactionWithDerivedKey the signature contains solution iteration, which allows us to recover signer public key from the signature.
No description provided by the author
No description provided by the author
No description provided by the author
StatePrefixToDeSoEncoder maps each state prefix to a DeSoEncoder type that is stored under that prefix.
No description provided by the author
TextAndHash corresponds to the Eth's accounts/account.go TextAndHash.
No description provided by the author
No description provided by the author
Uvarint decodes a uint64 from buf and returns that value and the number of bytes read (> 0).
No description provided by the author
No description provided by the author
Varint decodes an int64 from buf and returns that value and the number of bytes read (> 0).
No description provided by the author
WriteMessage takes an io.Writer and serializes and writes the specified message to it.

# 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
AddrRelayIntervalSeconds is the amount of time we wait before relaying each batch of addresses we've received recently.
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
No description provided by the author
No description provided by the author
No description provided by the author
BadgerDbFolder is the subfolder in the config dir where we store the badgerdb database by default.
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
No description provided by the author
No description provided by the author
No description provided by the author
Key in transaction's extra data map.
No description provided by the author
No description provided by the author
Key in transaction's extra data map.
ConfigDirAppName is the folder where we keep user data.
ConfigDirVendorName is the enclosing folder for user data.
ControlMessagesStart is used to indicate the ID value at which control messages start.
Defines keys that may exist in a transaction's ExtraData map.
Defines keys that may exist in a transaction's ExtraData map.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FillOrKill: fulfill whatever you can immediately then cancel the entire order if it is unable to be completely fulfilled.
GoodTillCancelled: fulfill whatever you can immediately then store whatever is remaining of this order in the database.
ImmediateOrCancel: fulfill whatever you can immediately then cancel whatever is remaining of this order.
We intentionally skip zero as otherwise that would be the default value.
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
1M.
This string is added as a subdirectory of --data-dir flag that contains everything our node is doing.
No description provided by the author
Defines keys that may exist in a transaction's ExtraData map.
Key in transaction's extra data map containing the derived key used in signing the txn.
Key in transaction's extra data map.
Defines keys that may exist in a transaction's ExtraData map.
Defines keys that may exist in a transaction's ExtraData map.
No description provided by the author
No description provided by the author
Snapshot constants.
EnableTimer.
Txindex encoder types.
Txindex encoder types.
Block view encoder types.
Block view encoder types.
Txindex encoder types.
Txindex encoder types.
Block view encoder types.
Txindex encoder types.
Block view encoder types.
Txindex encoder types.
Txindex encoder types.
Txindex encoder types.
Block view encoder types.
Txindex encoder types.
Txindex encoder types.
Txindex encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
EncoderTypeEndBlockView encoder type should be at the end and is used for automated tests.
EncoderTypeEndTxIndex encoder type should be at the end and is used for automated tests.
Block view encoder types.
Txindex encoder types.
Txindex encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
Txindex encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
Txindex encoder types.
Block view encoder types.
Txindex encoder types.
Txindex encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
Txindex encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
Txindex encoder types.
Txindex encoder types.
Txindex encoder types.
Txindex encoder types.
Txindex encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
Block view encoder types.
No description provided by the author
Defines keys that may exist in a transaction's ExtraData map.
GetSnapshotTimeout is used in Peer when we fetch a snapshot chunk, and we need to retry.
No description provided by the author
10K.
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
No description provided by the author
No description provided by the author
No description provided by the author
This is the header version that the blockchain started with.
This version made several changes to the previous header encoding format: - The Nonce field was expanded to 64 bits - Another ExtraNonce field was added to provide *another* 64 bits of entropy, for a total of 128 bits of entropy in the header that miners can twiddle.
These constants define the various supported inventory vector types.
These constants define the various supported inventory vector types.
Key in transaction's extra map -- The presence of this key indicates that this post is a repost with a quote.
No description provided by the author
MaxAddrsPerAddrMsg is the maximum number of addresses we allow in a single addr message from a peer.
MaxBlockIndexNodes needs to allow the block index to grow large enough to accommodate multiple forks of material length while allowing us to avoid an out-of-memory issue due to a "disk-fill" attack.
MaxBlocksInFlight is the maximum number of blocks that can be requested from a peer.
Defines keys that may exist in a transaction's ExtraData map.
Define min / max possible values for GlobalParams.
MaxCreateProfileFeeNanos - Maximum value to which the create profile fee can be set.
MaxDeSoInputSizeBytes is the size required to encode an DeSoInput.
MaxDeSoOutputSizeBytes is the size required to encode an DeSoOutput.
Define min / max possible values for GlobalParams.
1GB.
Define min / max possible values for GlobalParams.
Used for sanity checks for now.
MaxNetworkFeeNanosPerKBValue - Maximum value to which the maximum network fee per KB can be set.
MaxOrphansInMemory is the maximum number of orphan blocks that we're willing to keep in memory.
No description provided by the author
250MB.
The maximum number of unconnected transactions the pool will store.
The maximum number of bytes a single unconnected transaction can take up.
No description provided by the author
No description provided by the author
MaxVarintLenN is the maximum length of a varint-encoded N-bit integer.
MaxVarintLenN is the maximum length of a varint-encoded N-bit integer.
MaxVarintLenN is the maximum length of a varint-encoded N-bit integer.
MessagesToFetchPerCall is used to limit the number of messages to fetch when getting a user's inbox.
Defines keys that may exist in a transaction's ExtraData map.
Defines keys that may exist in a transaction's ExtraData map.
Defines keys that may exist in a transaction's ExtraData map.
Used to distinguish v3 messages from previous iterations.
Messaging keys.
MetadataRetryCount is used to retry updating data in badger just in case.
Min/MaxCreateNFTFeeNanos - Min/max value to which the create NFT fee can be set.
MinCreateProfileFeeNanos - Minimum value to which the create profile fee can be set.
Min/MaxMaxCopiesPerNFTNanos - Min/max value to which the create NFT fee can be set.
Messaging key constants.
When exchanging Bitcoin for DeSo, we don't allow transactions to create less than this amount.
Defines keys that may exist in a transaction's ExtraData map.
MinNetworkFeeNanosPerKBValue - Minimum value to which the minimum network fee per KB can be set.
No description provided by the author
No description provided by the author
The minimum and maximum Bitcoin prices, used as a sanity-check.
MsgTypeAddr is used by peers to share addresses of nodes they're aware about with other peers.
Deprecated.
No description provided by the author
No description provided by the author
No description provided by the author
MsgTypeGetAddr is used to solicit Addr messages from peers.
No description provided by the author
MsgTypeGetHeaders is used to fetch headers from a peer.
MsgTypeGetSnapshot is used to retrieve state from peers.
No description provided by the author
No description provided by the author
MsgTypeHeaderBundle contains headers from a peer.
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
No description provided by the author
No description provided by the author
MsgTypeTransactionBundle contains transactions from a peer.
No description provided by the author
No description provided by the author
Sent after a peer has both sent its version message and received its peer's version message and completed the version negotiation.
The first message a peer sends.
No description provided by the author
No description provided by the author
No description provided by the author
The different network types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Key in transaction's extra data map.
Note that "any" forces the node to be archival in order to remain backwards-compatible with the rest of the network.
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
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
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
No description provided by the author
Every operation has a type that we document here.
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
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
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
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
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
PerformanceLogValueSize is 256 MB.
PerformanceMemTableSize is 3072 MB.
A PKID is an ID associated with a public key.
RebroadcastNodeAddrIntervalMinutes is how often we broadcast our own address to our peers.
Defines keys that may exist in a transaction's ExtraData map.
Defines keys that may exist in a transaction's ExtraData map.
Key in transaction's extra data map that points to a post that the current transaction is reposting.
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
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Derived Keys.
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
No description provided by the author
No description provided by the author
No description provided by the author
DeSo Diamonds.
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
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
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
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
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
No description provided by the author
NFT Burns.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
No description provided by the author
DAO Coin Limit Orders.
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
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
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
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
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
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
No description provided by the author
No description provided by the author
DAO Coins.
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
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Derived Key Transaction Spending Limits.
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
No description provided by the author
No description provided by the author
Global Params.
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
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
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
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
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
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
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
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
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
No description provided by the author
Messages.
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
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
No description provided by the author
No description provided by the author
No description provided by the author
NFT Bids.
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
NFT Transfers.
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
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
No description provided by the author
DAO Coin Transfer Restrictions.
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
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
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
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
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
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
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
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
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
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
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
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
No description provided by the author
NFTs.
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
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
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
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
No description provided by the author
No description provided by the author
No description provided by the author
These constants are used by the DNS seed code to pick a random last seen time.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Defines keys that may exist in a transaction's ExtraData map.
Defines keys that may exist in a transaction's ExtraData map.
SFArchivalNode is a flag complementary to SFHyperSync.
SFFullNodeDeprecated is deprecated, and set on all nodes by default now.
SFHyperSync is a flag used to indicate that the peer supports hyper sync.
100MB.
SnapshotBlockHeightPeriod is the constant height offset between individual snapshot epochs.
SnapshotOperationChecksumAdd operation is enqueued when we want to add bytes to the state checksum.
SnapshotOperationChecksumPrint is called when we want to print the state checksum.
SnapshotOperationChecksumRemove operation is enqueued when we want to remove bytes to the state checksum.
SnapshotOperationExit is used to quit the snapshot loop.
SnapshotOperationFlush operation enqueues a flush to the ancestral records.
SnapshotOperationProcessBlock operation signals that a new block has been added to the blockchain.
SnapshotOperationProcessChunk operation is enqueued when we receive a snapshot chunk during syncing.
The price of DeSo at the beginning.
Deprecated.
Deprecated.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Headers must always be Validated or ValidateFailed.
No description provided by the author
No description provided by the author
SyncStateFullyCurrent indicates that our header chain is current and that we've fetched all the blocks corresponding to this chain.
SyncStateNeedBlocksss indicates that our header chain is current and our block chain is current but that there are headers in our main chain for which we have not yet processed blocks.
SyncStateSyncingBlocks indicates that our header chain is current but that the block chain we have is not current yet.
SyncStateSyncingHeaders indicates that our header chain is not current.
SyncStateSyncingHistoricalBlocks indicates that our node was bootstrapped using hypersync and that we're currently downloading historical blocks.
SyncStateSyncingSnapshot indicates that our header chain is current, and we're syncing state from a snapshot.
Every 1M DeSo we sell causes the price to increase by a factor of 2.
TransactionSpendingLimit.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Uint32Dec decrements a uint32 by one.
Uint64Dec decrements a uint64 by one.
UnconnectedTxnExpirationInterval is how long we wait before automatically removing an unconnected transaction.
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
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
Keys for a GlobalParamUpdate transaction's extra data map.
UseridLengthBytes is the number of bytes of entropy to use for a userid.
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UTXOs can come from different sources.
TODO(DELETEME): Remove the StakeReward txn type.

# Variables

No description provided by the author
No description provided by the author
GenesisBlock defines the genesis block used for the DeSo mainnet and testnet.
1e18.
No description provided by the author
This is the public key corresponding to the BitcoinBurnAddress on mainnet.
No description provided by the author
No description provided by the author
DeSoMainnetParams defines the DeSo parameters for the mainnet.
DeSoTestnetParams defines the DeSo parameters for the testnet.
In early blocks there was a bug that allowed users to claim usernames that weren't actually available.
GenesisBlock defines the genesis block used for the DeSo mainnet and testnet.
GenesisBlock defines the genesis block used for the DeSo mainnet and testnet.
GenesisBlock defines the genesis block used for the DeSo mainnet and testnet.
GlobalDeSoParams is a global instance of DeSoParams that can be used inside nested functions, like encoders, without having to pass DeSoParams everywhere.
No description provided by the author
InitialGlobalParamsEntry to be used before ParamUpdater creates the first update.
This is used for various calculations but can be updated on the fly with a special transaction type in the event that the Bitcoin price fluctuates significantly.
No description provided by the author
No description provided by the author
"false" is used as a hack to indicate that an account should have a blue check mark.
Allow 150KB per minute in low-fee txns.
No description provided by the author
No description provided by the author
MaxBitcoinHeadersPerMsg is the maximum number of headers Bitcoin allows in a getheaders response.
MaxBlockRewardDataSizeBytes is the maximum size allowed for a BLOCK_REWARD's ExtraData field.
MaxHeadersPerMsg is the maximum numbers allowed in a GetHeaders response.
No description provided by the author
No description provided by the author
No description provided by the author
Mode determines if Timer will be used by the node.
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
1e38.
Defines values that may exist in a transaction's ExtraData map.
Prefixes is a static variable that contains all the parsed prefix_id values.
Profile pics are Base64 encoded plus ": ; ," used in the mime type spec.
No description provided by the author
The readOnlyUtxoView will update after the number of seconds specified here OR the number of transactions specified here, whichever comes first.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These transactions are simply here to bootstrap the profiles on the network.
StatePrefixes is a static variable that allows us to quickly fetch state-related prefixes.
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

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
AncestralCache is an in-memory structure that helps manage concurrency between node's main db flushes and ancestral records flushes.
No description provided by the author
No description provided by the author
This struct is mainly used to track a user's balance of a particular creator coin.
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
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
No description provided by the author
No description provided by the author
No description provided by the author
Add some fields in addition to the header to aid in the selection of the best chain.
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
No description provided by the author
This struct contains all the information required to support coin buy/sell transactions on profiles.
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
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
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DBEntry is used to represent a database record.
No description provided by the author
DBStatePrefixes is a helper struct that stores information about state-related prefixes.
No description provided by the author
No description provided by the author
No description provided by the author
DeSoBodySchema Within a post, the body typically has a particular schema defined below.
No description provided by the author
DeSoMempool is the core mempool object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeSoParams defines the full list of possible parameters for the DeSo network.
DiamondEntry stores the number of diamonds given by a sender to a post.
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
ExpectedResponse is a struct used to enforce timeouts on peers.
FilledDAOCoinLimitOrder only exists to support understanding what orders were fulfilled when connecting a DAO Coin Limit Order Txn.
No description provided by the author
FollowEntry stores the content of a follow transaction.
No description provided by the author
No description provided by the author
No description provided by the author
Entry for a public key forbidden from signing blocks.
No description provided by the author
GetDataRequestInfo is a data structure used to keep track of which transactions we've requested from a Peer.
No description provided by the author
No description provided by the author
InvVect defines an inventory vector which is used to describe data, as specified by the Type field, that a peer wants, has, or does not have to another peer.
LikeEntry stores the content of a like transaction.
No description provided by the author
No description provided by the author
No description provided by the author
MempoolTx contains a transaction along with additional metadata like the fee and time added.
MessageEntry stores the essential content of a message transaction.
No description provided by the author
MessagingGroupEntry is used to update messaging keys for a user, this was added in the DeSo V3 Messages protocol.
MessagingGroupKey is similar to the MessageKey, and is used to index messaging keys for a user.
MessagingGroupMember is used to store information about a group chat member.
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
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
No description provided by the author
MsgDeSoHeader definition.
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
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
VERACK messages have no payload.
No description provided by the author
This struct defines a single bid on an NFT.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
This struct defines an individual NFT owned by a PKID.
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
No description provided by the author
No description provided by the author
Peer is an object that holds all of the state for a connection to another node.
PGBalance represents PublicKeyToDeSoBalanceNanos.
PGBlock represents BlockNode and MsgDeSoHeader.
No description provided by the author
No description provided by the author
No description provided by the author
PGDAOCoinLimitOrder represents DAOCoinLimitOrderEntry.
PGDerivedKey represents DerivedKeyEntry.
No description provided by the author
No description provided by the author
PGForbiddenKey represents ForbiddenPubKeyEntry.
PGGlobalParams represents GlobalParamsEntry.
No description provided by the author
TODO: This doesn't need to be a table.
No description provided by the author
PGMetadataAcceptNFTBid represents AcceptNFTBidMetadata.
PGMetadataAcceptNFTTransfer represents AcceptNFTTransferMetadata.
No description provided by the author
PGMetadataBitcoinExchange represents BitcoinExchangeMetadata.
PGMetadataBlockReward represents BlockRewardMetadataa.
PGMetadataBurnNFT represents BurnNFTMetadata.
PGMetadataCreateNFT represents CreateNFTMetadata.
PGMetadataCreatorCoin represents CreatorCoinMetadataa.
PGMetadataCreatorCoinTransfer represents CreatorCoinTransferMetadataa.
PGMetadataDAOCoin represents DAOCoinMetadata.
PGMetadataDAOCoinLimitOrder represents DAOCoinLimitOrderMetadata.
No description provided by the author
PGMetadataDAOCoinTransfer represents DAOCoinTransferMetadata.
PGMetadataDerivedKey represents AuthorizeDerivedKeyMetadata.
PGMetadataFollow represents FollowMetadata.
PGMetadataLike represents LikeMetadata.
PGMetadataNFTBid represents NFTBidMetadata.
PGMetadataNFTTransfer represents NFTTransferMetadata.
PGMetadataPrivateMessage represents PrivateMessageMetadata.
PGMetadataSubmitPost represents SubmitPostMetadata.
PGMetadataSwapIdentity represents SwapIdentityMetadataa.
PGMetadataUpdateExchangeRate represents UpdateBitcoinUSDExchangeRateMetadataa.
PGMetadataUpdateNFT represents UpdateNFTMetadata.
PGMetadataUpdateProfile represents UpdateProfileMetadata.
PGNFT represents NFTEntry.
PGNFTBid represents NFTBidEntry.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PGTransaction represents MsgDeSoTxn.
PGTransactionOutput represents DeSoOutput, DeSoInput, and UtxoEntry.
No description provided by the author
No description provided by the author
This struct holds info on a readers interactions (e.g.
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
No description provided by the author
RepostEntry stores the content of a Repost transaction.
No description provided by the author
Server is the core of the DeSo node.
ServerMessage is the core data structure processed by the Server in its main loop.
ServerReply is used to signal to outside programs that a particular ServerMessage they may have been waiting on has been processed.
SingleAddr is similar to the wire.NetAddress definition from the btcd guys.
Snapshot is the main data structure used in hyper sync.
No description provided by the author
SnapshotOperation is passed in the snapshot's OperationChannel.
No description provided by the author
No description provided by the author
StateChecksum is used to verify integrity of state data.
No description provided by the author
No description provided by the author
Summary stats for a set of transactions of a specific type in the mempool.
No description provided by the author
No description provided by the author
SyncPrefixProgress keeps track of sync progress on an individual prefix.
SyncProgress is used to keep track of hyper sync progress.
Timer is used for convenience to time certain events during development.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UnconnectedTx is a transaction that has dependencies that we haven't added yet.
No description provided by the author
================================================================== UpdateGlobalParamsMetadata ==================================================================.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UtxoEntry identifies the data associated with a UTXO.
UtxoKey is a 32-byte txid with a 4-byte uint32 index identifying the particular output in the transaction where this utxo occurs.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

DeSoEncoder is an interface handling our custom, deterministic byte encodings.
DeSoMessage is the interface that a message we send on the wire must implement.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
BlockHash is a convenient alias for a block hash.
No description provided by the author
No description provided by the author
The operations that are permitted to be performed by a derived key.
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
No description provided by the author
No description provided by the author
DeSoInput represents a single unspent output from a previous txn.
No description provided by the author
GroupKeyName helps with handling key names in MessagingGroupKey.
InvType represents the allowed types of inventory vectors.
MempoolTxFeeMinHeap is a priority queue based on transaction fee rate.
EncoderMigrationHeights is used to store migration heights for DeSoEncoder types.
The MsgType is usually sent on the wire to indicate what type of struct is being sent in the payload part of the message.
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
No description provided by the author
No description provided by the author
No description provided by the author
DEPRECATED: Replace all instances with lib.PublicKey.
No description provided by the author
RuleError is an error type that specifies an error occurred during block processing that is related to a consensus rule.
No description provided by the author
No description provided by the author
SnapshotOperationType define the different operations that can be enqueued to the snapshot's OperationChannel.
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
TxnType specifies the type for a transaction message.
Have to define these because Go doesn't let you use raw byte slices as map keys.
No description provided by the author