Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 1.3% on proxy.golang.org
Top 0.4% dependent packages on proxy.golang.org
Top 1.0% dependent repos on proxy.golang.org
Top 1.7% forks on proxy.golang.org
Top 1.0% docker downloads on proxy.golang.org

proxy.golang.org : github.com/decred/dcrd/blockchain

Package blockchain implements Decred block handling and chain selection rules. The Decred block handling and chain selection rules are an integral, and quite likely the most important, part of decred. Unfortunately, at the time of this writing, these rules are also largely undocumented and had to be ascertained from the bitcoind source code. At its core, Decred is a distributed consensus of which blocks are valid and which ones will comprise the main block chain (public ledger) that ultimately determines accepted transactions, so it is extremely important that fully validating nodes agree on all rules. At a high level, this package provides support for inserting new blocks into the block chain according to the aforementioned rules. It includes functionality such as rejecting duplicate blocks, ensuring blocks and transactions follow all rules, orphan handling, and best chain selection along with reorganization. Since this package does not deal with other Decred specifics such as network communication or wallets, it provides a notification system which gives the caller a high level of flexibility in how they want to react to certain events such as orphan blocks which need their parents requested and newly connected main chain blocks which might result in wallet updates. Before a block is allowed into the block chain, it must go through an intensive series of validation rules. The following list serves as a general outline of those rules to provide some intuition into what is going on under the hood, but is by no means exhaustive: Errors returned by this package are either the raw errors provided by underlying calls or of type blockchain.RuleError. This allows the caller to differentiate between unexpected errors, such as database errors, versus errors due to rule violations through type assertions. In addition, callers can programmatically determine the specific rule violation by examining the ErrorCode field of the type asserted blockchain.RuleError. This package includes spec changes outlined by the following BIPs:

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/decred/dcrd/blockchain
Keywords: blockchain, cryptocurrency, dcrd, decred, decred-daemon, decred-nodes, go, golang, p2p, peer-to-peer
License: ISC
Latest release: 11 months ago
First release: almost 6 years ago
Namespace: github.com/decred/dcrd
Dependent packages: 132
Dependent repositories: 32
Stars: 687 on GitHub
Forks: 281 on GitHub
Docker dependents: 1
Docker downloads: 5,649
See more repository details: repos.ecosyste.ms
Last synced: about 9 hours ago

    Loading...
    Readme
    Loading...