![]() |
Bitcoin ABC
0.25.8
P2P Digital Currency
|
Typedefs | |
using | ProofShortIdProcessor = ShortIdProcessor< PrefilledProof, ShortIdProcessorPrefilledProofAdapter, ProofRefCompare > |
using | BlockUpdate = VoteItemUpdate< CBlockIndex * > |
using | ProofUpdate = VoteItemUpdate< ProofRef > |
using | BlockVoteMap = std::map< const CBlockIndex *, VoteRecord, CBlockIndexWorkComparator > |
using | ProofVoteMap = std::map< const ProofRef, VoteRecord, ProofComparatorByScore > |
using | StakeId = uint256 |
using | ProofRef = RCUPtr< const Proof > |
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 | isOrphanState (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 bool | VerifyProof (const Proof &proof, bilingual_str &error) |
static bool | VerifyDelegation (const Delegation &dg, const CPubKey &expectedPubKey, bilingual_str &error) |
ProofRef | buildRandomProof (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 uint32_t | AVALANCHE_MAX_ORPHAN_PROOFS = 4000 |
Maximum number of orphan proofs the peer manager will accept from the network. More... | |
static constexpr Amount | PROOF_DUST_THRESHOLD = 1 * COIN |
Minimum amount per utxo. More... | |
constexpr uint32_t | MIN_VALID_PROOF_SCORE = 100 * PROOF_DUST_THRESHOLD / COIN |
using avalanche::BlockUpdate = typedef VoteItemUpdate<CBlockIndex *> |
Definition at line 80 of file processor.h.
using avalanche::BlockVoteMap = typedef std::map<const CBlockIndex *, VoteRecord, CBlockIndexWorkComparator> |
Definition at line 84 of file processor.h.
using avalanche::ProofRef = typedef RCUPtr<const Proof> |
using avalanche::ProofShortIdProcessor = typedef ShortIdProcessor<PrefilledProof, ShortIdProcessorPrefilledProofAdapter, ProofRefCompare> |
Definition at line 52 of file compactproofs.h.
using avalanche::ProofUpdate = typedef VoteItemUpdate<ProofRef> |
Definition at line 81 of file processor.h.
using avalanche::ProofVoteMap = typedef std::map<const ProofRef, VoteRecord, ProofComparatorByScore> |
Definition at line 86 of file processor.h.
using avalanche::StakeId = typedef uint256 |
|
strong |
Enumerator | |
---|---|
NONE | |
INVALID_SIGNATURE | |
TOO_MANY_LEVELS |
Definition at line 36 of file validation.h.
|
strong |
Enumerator | |
---|---|
NONE | |
ALREADY_REGISTERED | |
ORPHAN | |
INVALID | |
CONFLICTING | |
REJECTED | |
COOLDOWN_NOT_ELAPSED |
Definition at line 135 of file peermanager.h.
|
strong |
Definition at line 12 of file validation.h.
|
strong |
Enumerator | |
---|---|
Invalid | |
Rejected | |
Accepted | |
Finalized | |
Stale |
Definition at line 58 of file processor.h.
bool avalanche::hasDustStake | ( | const ProofRef & | proof | ) |
|
static |
Definition at line 175 of file peermanager.cpp.
|
static |
|
static |
Definition at line 36 of file delegation.cpp.
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 729 of file peermanager.cpp.
|
static |
Definition at line 69 of file processor.cpp.
|
static |
Definition at line 38 of file processor.cpp.
|
staticconstexpr |
Maximum number of orphan proofs the peer manager will accept from the network.
Under good conditions, this allows the node to collect relevant proofs during IBD. Note that reorgs can cause the orphan 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 |