package
1.0.1
Repository: https://github.com/zoobc/zoobc-core.git
Documentation: pkg.go.dev

# Constants

BatchReceiptLookBackHeight number of main blocks to look back, from current block, to select receipts from.
time to wait, after pushBlock for batch receipts and relative merkle root to be generated.
BlacklistingPeriod, how long a peer in blaclisting status.
BlockchainsyncCheckInterval time, in seconds, between checks if spine blocks have finished to be downloaded.
BlockchainsyncSpineTimeout timeout, in seconds, for spine blocks to be downloaded from the network download spine blocks and snapshot (if present) timeout.
BlockchainsyncWaitingTime time, in seconds, to wait before start syncing the blockchain.
No description provided by the author
Offset from last block height considered safe to be included in proof of ownership message (its blcokhash).
No description provided by the author
CONSTANT.
No description provided by the author
CheckMempoolExpiration time in Minutes.
Gap of the CleanTimedoutTxCandidateThread.
No description provided by the author
CommitPhaseEndDay end of each phase in day (14 -> day 14 hour 23 minute 59 second 59).
No description provided by the author
ConnectPriorityPeersGap, interval of peer thread trying connect to priority peer (in second).
ConnectPriorityPeersGapScale, the gap scale of conneting priority schedule.
CONSTANT: multiplier for when receipts are < half -- means node making blocks, but with no receipts, will live 2 weeks from full score.
No description provided by the author
No description provided by the author
Starting score for newly registered nodes.
DownloadSnapshotNumberOfRetries number of times to retry downloading failed snapshot file chunks from other peers.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FeedbackCPUMinSamples CPU usage sampling time interval.
FeedbackLimitCPUPercentage max CPU percentage, sampled in FeedbackCPUMinSamples to trigger anti-spam filter.
No description provided by the author
FeedbackLimitLowPerc percentage of hard limit to be considered critical level.
No description provided by the author
FeedbackLimitLowPerc percentage of hard limit to be considered high level.
No description provided by the author
FeedbackLimitLowPerc percentage of hard limit to be considered low level.
No description provided by the author
FeedbackLimitLowPerc percentage of hard limit to be considered medium level.
No description provided by the author
FeedbackMinSamples min number of samples to calculate average of a FeedbackVar (eg.
FeedbackSamplingInterval interval between sampling system metrics for feedback system.
FeedbackThreadInterval interval between a new feedback sampling is triggered (must be higher than FeedbackSamplingInterval).
FeedbackTotalSamples total number of samples kept im memory.
Starting score for pre seed nodes (registered at genesis).
GetMoreBlocksDelay returns delay between GetMoreBlocksThread in seconds.
GoRoutineHardLimit max number of concurrent goroutine allowed.
CONSTANT: multiplier for when receipts are > half -- means node making blocks with FULL receipts will take 12 weeks (3 months) to go from 0 to max score.
No description provided by the author
LinkedReceiptScore the score for each receipt that proved have relation with previous published receipt via merkle root.
No description provided by the author
10 minutes before including in spine block.
1440 mainchain blocks (= MinRollbackHeight).
MaxBlocksCacheStorage maximum number of blocks to be cache.
No description provided by the author
MaxMempoolTransactions is maximum transaction in mempool For consideration, max mempool tx should equal or greater than MaxNumberOfTransactionsInBlock Or just leave it 0 for unlimited mempool transaction.
MaxParticipationScore maximum achievable score, this will be important to maintain smithing process so it doesn't smith too fast.
TODO: when fixing linked receipts, revert to: 2 * PriorityStrategyMaxPriorityPeers.
100.
No description provided by the author
MaxScoreChange the maximum score that node wll get.
MaxScrambleCacheRound.
MaxSeverConnectionIdle is a duration for the amount of time after which an idle connection would be closed by sending a GoAway.
1000.
MempoolExpiration time in Minutes.
No description provided by the author
circa half week for a network that on average generates 2 blocks per minute.
No description provided by the author
NumberOfPriorityPeersToBeAdded how many priority peers we want to add at once.
No description provided by the author
No description provided by the author
No description provided by the author
P2PClientConnShortTimeout timeout in seconds for a gRpc client (p2p) connection.
No description provided by the author
No description provided by the author
P2PRequestHardLimit max number of opened (running) incoming P2P api requests (tx broadcast by other peers).
No description provided by the author
No description provided by the author
punishment amount.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PriorityStrategyBuildScrambleNodesGap, interval of scramble thread to build scramble node (in block height).
PriorityStrategyMaxPriorityPeers, max priority peers will have.
PriorityStrategyMaxStayedInUnresolvedPeers max time a peer can stay before being cycled out from unresolved peers.
ProofOfOriginExpirationOffset expiration offset in seconds for proof of origin response.
No description provided by the author
No description provided by the author
this multiplier is used to expand the receipt selection windows, this avoid multiple database read.
No description provided by the author
No description provided by the author
No description provided by the author
sha256.
No description provided by the author
No description provided by the author
ReceiptPoolMaxLife max blocks a receipt can stay in the pool before being discarded.
No description provided by the author
No description provided by the author
ResolvePeersGap, interval of peer thread trying to resolve a peer (in second).
ResolvePendingPeersGap, interval of peer thread trying to resolve a peer (in second).
No description provided by the author
ScalarReceiptScore the converter score to avoid calculation in float number, this value is following OneZBC to maintain the number scale like balance does.
CONSTANT.
ScrambleNodesSafeHeight height before which scramble nodes are always recalculated ( this is to allow first nodes that bootstrap the network to update their priority peers till every node has exchanged all peer node addresses).
3600.
No description provided by the author
No description provided by the author
10 KB.
No description provided by the author
TODO: snapshotV2 will update on production.
No description provided by the author
SyncNodeAddressDelay, delay in millis to execute send/get address info api call, to make sure even if many nodes start at the same time they won't execute requests at the same time.
every 30 min.
Timeout of the transaction candidate in second.
LinkedReceiptScore the score for each receipt that can't proved have relation with previous published receipt via merkle root.
UnresolvedPendingPeerExpirationTimeOffset max time in seconds a node should try to connect to/resolve a pending node address (one hour).
UpdateBlacklistedStatusGap, interval of a tread that will update the status of blacklisted node.
UpdateNodeAddressGap, interval in seconds of peer thread to update and broadcast node dynamic address.
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BlockchainSendingBlockTransactions needs blockchain lock because transactions are tightly coupled of what blocks the node has.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BlockPoolScanPeriod define the periodic time to scan the whole block pool for legal block to persist to the chain.
CheckTimedOutBlock to use in scheduler to check timedout block while waiting transaction.
No description provided by the author
probably this will always be 1.
No description provided by the author
No description provided by the author
15 years in production.
33 million * 10^8 in production.
60 seconds.
No description provided by the author
DatasetPropertyLength is max length of string property name in dataset.
DatasetValueLength is max length of string property value in dataset.
10 in production.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FeeVote part.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MainchainGenesisAccountAddress encoded "ZBC_AQTEH7K4_L45WJPLL_HCEC65ZH_7XC5N3XD_YNKPHK45_POH7PQME_AFAFBDWM" MainchainGenesisAccountAddress hex "042643fd5c5f3b64bd6b38882f7727fdc5d6eee3c354f3ab9d7b8ff7c1840140".
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MainChainSmithingPeriod one main block every 15 seconds + block pool delay (max +30 seconds).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
64kb.
128kb.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MultiSigFieldMissing indicate fields is missing, no need to read the bytes.
MultiSigFieldPresent indicate fields is present, parse the byte accordingly.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
1 year in production.
TODO: revert after demo , 3 months in production.
72 hours in production.
1 hour in production.
NodePublicKey TODO: this is valid for pub keys generated using Ed25519.
NodeSignature node always signs using Ed25519 algorithm, that produces 64 bytes signatures.
OneDay 1 day in seconds.
OneFeePerByteTransaction use to level up accuracy fee per byte of transaction bytes Will be useful when ordering tx in mempool based on fee per byte.
OneHour 1 hour in seconds.
OneYear 1 year in seconds.
ProofOfOwnershipExpiration number of blocks after a proof of ownership message 'expires' (is considered invalid).
No description provided by the author
No description provided by the author
SignatureType variables.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SpineChainSmithingPeriod intervals between spine blocks in seconds reduce to 24 hours.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SQLiteLimitVariableNumber equivalent to SQLITE_LIMIT_VARIABLE_NUMBER from sqlite.
SQLMaxConnectionLifetime Reprensent the expiration of opened database connetion Setting it to 0 means that there is no maximum lifetime and the connection is reused forever (which is the default behavior).
SQLMaxIdleConnections Represent number of maximum idle connetion in sql pool connection.
SQLMaxOpenConnetion represent the number of maximum open connetion to the database Setting it to 1 'disables' the connection pool which could lead to db lock when in a multithreaded application ( such as in a go application extensively using goroutines).
2 minute.
No description provided by the author
No description provided by the author
3600 seconds.
No description provided by the author
No description provided by the author
TransactionTimeOffset use to put time offset for transaction timestamp when validate 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

# Structs

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author