Bitcoin ABC 0.30.5
P2P Digital Currency
|
Classes | |
class | CompactProofs |
struct | Config |
struct | ConflictingProofComparator |
Compare conflicting proofs. More... | |
class | Delegation |
class | DelegationBuilder |
struct | DelegationId |
class | DelegationState |
class | Hello |
struct | LimitedProofId |
struct | ManualWinners |
struct | next_request_time |
struct | Node |
struct | Peer |
class | PeerManager |
struct | PendingNode |
class | Poll |
struct | PrefilledProof |
class | Processor |
class | Proof |
struct | proof_index |
class | ProofBuilder |
struct | ProofComparatorByScore |
Compare proofs by score, then by id in case of equality. More... | |
struct | ProofId |
class | ProofPool |
Map a proof to each utxo. More... | |
struct | ProofPoolEntry |
struct | ProofPoolEntryProofIdKeyExtractor |
struct | ProofRadixTreeAdapter |
Radix tree adapter for storing a proof as a tree element. More... | |
struct | ProofRefComparatorByAddress |
Compare proof references by pointer address. More... | |
struct | ProofRefCompare |
class | ProofRegistrationState |
class | ProofsRequest |
class | ProofValidationState |
struct | query_timeout |
struct | RemoteProof |
class | Response |
class | SaltedProofHasher |
class | SaltedProofIdHasher |
struct | score_index |
struct | ShortIdProcessorPrefilledProofAdapter |
class | SignedStake |
struct | Slot |
class | Stake |
struct | StakeCommitment |
class | StakeContenderCache |
Cache to track stake contenders for recent blocks. More... | |
struct | StakeContenderCacheEntry |
struct | StakeContenderId |
StakeContenderIds are unique for each block to ensure that the peer polling for their acceptance has strong guarantees that a newly finalizing block does not disrupt determining if the previous block had valid stake winners. More... | |
struct | stakecontenderid_index |
struct | TestProofBuilder |
struct | TestVoteRecord |
class | Vote |
class | VoteItemUpdate |
struct | VoteMapComparator |
struct | VoteRecord |
Vote history. More... | |
Typedefs | |
using | ProofShortIdProcessor = ShortIdProcessor< PrefilledProof, ShortIdProcessorPrefilledProofAdapter, ProofRefCompare > |
using | AnyVoteItem = std::variant< const ProofRef, const CBlockIndex *, const CTransactionRef > |
using | VoteMap = std::map< AnyVoteItem, VoteRecord, VoteMapComparator > |
using | StakeId = uint256 |
using | ProofRef = RCUPtr< const Proof > |
using | ProofIdSet = std::unordered_set< ProofId, SaltedProofIdHasher > |
Enumerations | |
enum class | ProofRegistrationResult { NONE = 0 , ALREADY_REGISTERED , IMMATURE , INVALID , CONFLICTING , REJECTED , COOLDOWN_NOT_ELAPSED , DANGLING , MISSING_UTXO } |
enum struct | VoteStatus : uint8_t { Invalid , Rejected , Accepted , Finalized , Stale } |
enum | StakeContenderStatus : uint8_t { UNKNOWN = 0 , ACCEPTED = (1 << 0) , IN_WINNER_SET = (1 << 1) } |
enum class | ProofValidationResult { NONE = 0 , NO_STAKE , DUST_THRESHOLD , DUPLICATE_STAKE , WRONG_STAKE_ORDERING , INVALID_STAKE_SIGNATURE , TOO_MANY_UTXOS , INVALID_PAYOUT_SCRIPT , INVALID_PROOF_SIGNATURE , EXPIRED , MISSING_UTXO , COINBASE_MISMATCH , HEIGHT_MISMATCH , AMOUNT_MISMATCH , NON_STANDARD_DESTINATION , DESTINATION_NOT_SUPPORTED , DESTINATION_MISMATCH , IMMATURE_UTXO } |
enum class | DelegationResult { NONE = 0 , INVALID_SIGNATURE , TOO_MANY_LEVELS } |
Functions | |
template<typename L , typename F > | |
static bool | reduceLevels (uint256 &hash, const std::vector< L > &levels, F f) |
template<typename L > | |
static bool | reduceLevels (uint256 &hash, const std::vector< L > &levels) |
static bool | isImmatureState (const ProofValidationState &state) |
PeerId | selectPeerImpl (const std::vector< Slot > &slots, const uint64_t slot, const uint64_t max) |
Internal methods that are exposed for testing purposes. More... | |
static const uint256 | GetVoteItemId (const AnyVoteItem &item) |
static bool | VerifyProof (const Amount &stakeUtxoDustThreshold, const Proof &proof, bilingual_str &error) |
static bool | VerifyDelegation (const Delegation &dg, const CPubKey &expectedPubKey, bilingual_str &error) |
static bool | isNull (const AnyVoteItem &item) |
static bool | IsStandardPayoutScript (const CScript &scriptPubKey) |
ProofRef | buildRandomProof (Chainstate &active_chainstate, uint32_t score, int height, const CKey &masterKey) |
bool | hasDustStake (const ProofRef &proof) |
Variables | |
constexpr size_t | MAX_DELEGATION_LEVELS {20} |
The maximum number of delegation levels we are willing to verify. More... | |
static constexpr uint64_t | PEERS_DUMP_VERSION {1} |
static constexpr uint32_t | AVALANCHE_MAX_IMMATURE_PROOFS = 4000 |
Maximum number of immature proofs the peer manager will accept from the network. More... | |
static constexpr Amount | PROOF_DUST_THRESHOLD = 100 * COIN |
Minimum amount per utxo. More... | |
constexpr uint32_t | MIN_VALID_PROOF_SCORE = 100 * PROOF_DUST_THRESHOLD / COIN |
const CScript | UNSPENDABLE_ECREG_PAYOUT_SCRIPT |
using avalanche::AnyVoteItem = typedef std::variant<const ProofRef, const CBlockIndex *, const CTransactionRef> |
Definition at line 87 of file processor.h.
using avalanche::ProofIdSet = typedef std::unordered_set<ProofId, SaltedProofIdHasher> |
Definition at line 52 of file proofpool.h.
using avalanche::ProofRef = typedef RCUPtr<const Proof> |
using avalanche::ProofShortIdProcessor = typedef ShortIdProcessor<PrefilledProof, ShortIdProcessorPrefilledProofAdapter, ProofRefCompare> |
Definition at line 50 of file compactproofs.h.
using avalanche::StakeId = typedef uint256 |
using avalanche::VoteMap = typedef std::map<AnyVoteItem, VoteRecord, VoteMapComparator> |
Definition at line 139 of file processor.h.
|
strong |
Enumerator | |
---|---|
NONE | |
INVALID_SIGNATURE | |
TOO_MANY_LEVELS |
Definition at line 37 of file validation.h.
|
strong |
Enumerator | |
---|---|
NONE | |
ALREADY_REGISTERED | |
IMMATURE | |
INVALID | |
CONFLICTING | |
REJECTED | |
COOLDOWN_NOT_ELAPSED | |
DANGLING | |
MISSING_UTXO |
Definition at line 145 of file peermanager.h.
|
strong |
Definition at line 12 of file validation.h.
enum avalanche::StakeContenderStatus : uint8_t |
Enumerator | |
---|---|
UNKNOWN | |
ACCEPTED | |
IN_WINNER_SET |
Definition at line 25 of file stakecontendercache.h.
|
strong |
Enumerator | |
---|---|
Invalid | |
Rejected | |
Accepted | |
Finalized | |
Stale |
Definition at line 79 of file processor.h.
ProofRef avalanche::buildRandomProof | ( | Chainstate & | active_chainstate, |
uint32_t | score, | ||
int | height, | ||
const CKey & | masterKey | ||
) |
|
static |
bool avalanche::hasDustStake | ( | const ProofRef & | proof | ) |
|
static |
Definition at line 202 of file peermanager.cpp.
|
static |
|
static |
|
static |
|
static |
PeerId avalanche::selectPeerImpl | ( | const std::vector< Slot > & | slots, |
const uint64_t | slot, | ||
const uint64_t | max | ||
) |
Internal methods that are exposed for testing purposes.
Definition at line 927 of file peermanager.cpp.
|
static |
Definition at line 89 of file processor.cpp.
|
static |
Definition at line 57 of file processor.cpp.
|
staticconstexpr |
Maximum number of immature proofs the peer manager will accept from the network.
Note that reorgs can cause the immature pool to temporarily exceed this limit, but a change in chaintip cause previously reorged proofs to be trimmed.
Definition at line 44 of file peermanager.h.
|
constexpr |
The maximum number of delegation levels we are willing to verify.
A Schnorr signature verification takes about 35us on a 2022 average machine, so 20 levels will roughly take under 1ms (accounting some overhead) while being more than enough to cover all the real world usage.
Definition at line 26 of file delegation.h.
|
constexpr |
|
staticconstexpr |
Definition at line 29 of file peermanager.cpp.
const CScript avalanche::UNSPENDABLE_ECREG_PAYOUT_SCRIPT |