mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-23 15:26:42 +00:00

* [NOD-1420] Start working on ConsensusStateManager. Might be redundant due to recent changes * [NOD-1420] Convert model to externalapi in utxo_algerbra helpers * [NOD-1420] Add UTXO-diff algebra * [NOD-1420] Prepare skeleton of calculateAcceptanceDataAndMultiset * [NOD-1420] Added skeleton for AddBlockToVirtual * [NOD-1420] Implement PopulateTransactionWithUTXOEntries * [NOD-1420] Implement restorePastUTXO * [NOD-1420] Implement finality check * [NOD-1420] Move handling of tips to consensusStateManager * [NOD-1420] Implement calculateAcceptanceDataAndMultiset * [NOD-1420] Start implementing resolveBlockStatus * [NOD-1420] Implement resolveBlockStatus * [NOD-1420] Update related fields in end of resolveSingleBlockStatus * [NOD-1420] Start working on selectVirtualParents * [NOD-1420] Implemented BlockHeap * [NOD-1420] Implement selectVirtualParents * [NOD-1420] Implement updateVirtual * [NOD-1420] Added comments where they were missing * [NOD-1420] Place all consensusStateManager functions in correct files * [NOD-1420] Return the missing outpoints from populateTransactionWithUTXOEntriesFromVirtualOrDiff * [NOD-1420] Outpoint.ID -> TransactionID * [NOD-1420] Fix Stringer tests * [NOD-1420] Copy hash.FromString into utils * [NOD-1420] SetParents should return an error * [NOD-1420] Remove all reachabilityManager references from consensusStateManager * [NOD-1420] Remove VirtualData. Get the info from the stores where needed * [NOD-1420] Invert parameters to IsAncestorOf * [NOD-1420] Use model.AcceptanceData * [NOD-1420] Don't return accumulatedMassBefore in error cases * [NOD-1420] Don't expect store functions to return nil when the requested data was found - instead add HasXXX functions * [NOD-1420] addTransactionToMultiset sets isCoinbase properly * [NOD-1420] expected hash string length is externalapi.DomainHashSize * 2 * [NOD-1420] Rename reachabilityTree -> reachabilityManager + updateReindexRoot if isNextVirtualSelectedParent * [NOD-1420] ValidateCoinbaseTransaction in csm.verifyAndBuildUTXO * [NOD-1420] Re-write HAsUTXODiffChild * [NOD-1420] delete past_utxo.go.bak * [NOD-1420] Implement validateCoinbaseTransaction in CSM * [NOD-1420] Imlemented missing functionality in ValidateTransactionAndPopulateWithConsensusData * [NOD-1420] Moved merge depth logic to MergeDepthManager * [NOD-1420] Add logs
41 lines
1.3 KiB
Go
41 lines
1.3 KiB
Go
package constants
|
|
|
|
const (
|
|
// BlockVersion represents the current version of blocks mined and the maximum block version
|
|
// this node is able to validate
|
|
BlockVersion = 1
|
|
|
|
// SompiPerKaspa is the number of sompi in one kaspa (1 KAS).
|
|
SompiPerKaspa = 100_000_000
|
|
|
|
// MaxSompi is the maximum transaction amount allowed in sompi.
|
|
MaxSompi = 21_000_000 * SompiPerKaspa
|
|
|
|
// MaxCoinbasePayloadLength is the maximum length in bites allowed for a block's coinbase's payload
|
|
MaxCoinbasePayloadLength = 150
|
|
|
|
// MaxBlockSize is the maximum size in bytes a block is allowed
|
|
MaxBlockSize = 1_000_000
|
|
|
|
// MaxBlockParents is the maximum number of blocks a block is allowed to point to
|
|
MaxBlockParents = 10
|
|
|
|
// MassPerTxByte is the number of grams that any byte
|
|
// adds to a transaction.
|
|
MassPerTxByte = 1
|
|
|
|
// MassPerScriptPubKeyByte is the number of grams that any
|
|
// scriptPubKey byte adds to a transaction.
|
|
MassPerScriptPubKeyByte = 10
|
|
|
|
// MassPerSigOp is the number of grams that any
|
|
// signature operation adds to a transaction.
|
|
MassPerSigOp = 10000
|
|
|
|
// MergeSetSizeLimit is the maximum number of blocks in a block's merge set
|
|
MergeSetSizeLimit = 1000
|
|
|
|
// MaxMassAcceptedByBlock is the maximum total transaction mass a block may accept.
|
|
MaxMassAcceptedByBlock = 10000000
|
|
)
|