Crate kaspa_consensus_core

Source
Expand description

§Consensus Core

This crate implements primitives used in the Kaspa node consensus processing.

Modules§

acceptance_data
api
block
blockhash
blockstatus
coinbase
config
constants
daa_score_timestamp
errors
hashing
header
mass
merkle
muhash
network
Network Types
pruning
sign
subnets
trusted
tx
Transaction
utxo

Structs§

BlockHasher
hashes::Hash writes 4 u64s so we just use the last one as the hash here
ChainPath
Hash
@category General

Traits§

HashMapCustomHasher

Type Aliases§

BlockHashMap
This HashMap skips the hashing of the key and uses the key directly as the hash. Should only be used for block hashes that have correct DAA, otherwise it is susceptible to DOS attacks via hash collisions.
BlockHashSet
Same as BlockHashMap but a HashSet.
BlockLevel
BlueWorkType
Integer type for accumulated PoW of blue blocks. We expect no more than 2^128 work in a single block (btc has ~2^80), and no more than 2^64 overall blocks, so 2^192 is definitely a justified upper-bound.
HashKTypeMap
Map from Block hash to K type
KType
The type used to represent the GHOSTDAG K parameter