Commit Graph

62 Commits

Author SHA1 Message Date
David Hill
e26e71a9a2 multi: replace godoc.org with pkg.go.dev 2020-02-18 19:35:19 -06:00
Dave Collins
eb3fa80a66
docs: Update for secp256k1 v2 module. 2019-10-08 10:14:16 -05:00
Dave Collins
e54dde10e9
docs: Update for mempool v3 module. 2019-08-12 19:54:31 -05:00
Dave Collins
e523e05b9b
docs: Update for peer v2 module. 2019-08-12 15:52:52 -05:00
Dave Collins
9f926baa61
docs: Update for connmgr v2 module. 2019-08-12 15:36:53 -05:00
Dave Collins
5564a0aff8
docs: Update for blockchain v2 module. 2019-08-08 13:10:22 -05:00
Dave Collins
18a2a68b8c
blockchain/standalone: Prepare v1.0.0.
This updates the documentation for the new blockchain/standalone module
along with main module dependencies to ensure it is tested as well as
uses the latest version of the code as the new module is integrated.

It also serves as a base for blockchain/stake/v1.0.0.

The new modules has the following direct dependencies:

- github.com/decred/dcrd/chaincfg/chainhash@v1.0.1
- github.com/decred/dcrd/wire@v1.2.0
2019-08-06 23:24:31 -05:00
Dave Collins
e6bd4b1c97
docs: Update for rpcclient v4 module. 2019-07-30 12:56:44 -05:00
Dave Collins
051fa9f424
docs: Update for blockchain/stake v2 module. 2019-07-28 14:47:25 -05:00
Dave Collins
99d7b179a3
docs: Update for database v2 module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new module version
2019-07-22 19:53:52 -05:00
Dave Collins
5e7afe5b08
docs: Update for rpcclient v3 module. 2019-07-22 13:34:11 -05:00
Dave Collins
0035880ac7
docs: Update for dcrjson/v3 module. 2019-07-22 13:29:31 -05:00
Dave Collins
6a3c1fea49
docs: Update for txscript v2 module. 2019-06-24 15:13:40 -05:00
Dave Collins
a0b84e4005
docs: Update for dcrutil v2 module. 2019-06-19 12:09:20 -05:00
David Hill
893aa30dce multi: Use https links where available. 2019-06-18 14:20:06 -05:00
Dave Collins
6bb0838e84
docs: Update for dcrec/edwards v2 module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new module version.
2019-06-14 11:34:48 -05:00
Dave Collins
67ace6e117
docs: Update for chaincfg v2 module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new module version
2019-06-12 20:14:35 -05:00
Dave Collins
c1cf192f03
docs: Update for hdkeychain v2 module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new module version
2019-03-29 11:40:35 -05:00
Jamie Holdstock
598bd32a11 docs: move json rpc docs to mediawiki. 2019-03-19 17:33:38 +00:00
Dave Collins
334820db6d
docs: Update for lru module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new lru module.
2019-03-18 10:08:29 -05:00
Dave Collins
6f106adf57
docs: Update for mempool v2 module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new module version
2019-02-14 18:52:48 -06:00
Dave Collins
895020ac5e
docs: Update for rpcclient v2 module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new module version
2019-02-14 11:44:01 -06:00
Dave Collins
9265b40510
docs: Update for dcrjson v2 module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new module version.
2019-02-13 19:23:38 -06:00
Dave Collins
176ee29497
docs: Update for fees package.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to include the recently added fees package.
2018-12-07 22:59:23 -06:00
Dave Collins
817373d9d7
docs: Revamp main README.md and update docs.
This revamps the main README.md file in an attempt to provide a more
user-friendly introduction to the software and why someone would want to
run it and also updates the docs/README.md to remove some sections that
do not apply to Decred and update some others to reflect reality.

It also adds minimum recommended specifications for dcrd to the main
README.md and updates the build instruction for module-aware builds and
the recent changes the run_test.sh script.

Finally, it updates the contact information to point to the
decred.org/community page.
2018-09-12 15:11:03 -05:00
Dave Collins
ae9c2aae56
docs: Update docs for versioned modules.
This updates the overall docs README to include all of the new modules
as well as introduce a module hierarchy diagram.
2018-08-14 04:53:08 -05:00
Markus Richter
8deac318d0 docs: Fix links for internal packages.
dcrrpclient and dcrjson have been merged into dcrd.
Adjust links accordingly.
2018-03-09 16:16:58 +00:00
Markus Richter
1e42b8524d multi: Properly capitalize Decred.
Decred is inconsistencly capitalized in the code base,
change all occurences of decred to Decred.
2018-03-01 17:41:35 -06:00
Donald Adu-Poku
3603aeadb2 mempool: Add docs.go and flesh out README.md. 2018-02-21 12:27:31 +00:00
Donald Adu-Poku
bd8ff54a4b docs: Add fullblocktests entry and minor consistency updates 2017-12-31 12:25:01 +00:00
Josh Rickmar
6842aa006d Merge remaining dcrutil code into a dcrd package.
This merge commit adds the following code from the
github.com/decred/dcrutil package into a new
github.com/decred/dcrd/dcrutil package:

* Address handling
* Amount type
* AppDataDir func
* bitflags functions
* Block wrapper type
* Hash160 func
* Tx wrapper type
* WIF type

as well as all tests for this code.

The old github.com/decred/dcrutil/hdkeychain package has also been
merged and moved to github.com/decred/dcrd/dcrutil/hdkeychain.

dcrd packages have been updated to use the new packages and the dep
files have been updated for this change.
2017-10-11 22:06:36 -04:00
Dave Collins
e2b74d501c
multi: Update markdown files for GFM changes.
The github markdown interpreter has been changed such that it no longer
allows spaces in between the brackets and parenthesis of links and now
requires a newline in between anchors and other formatting.  This
updates all of the markdown files accordingly.

While here, it also corrects a couple of inconsistencies in some of the
README.md files and correct some previous merge conflicts.
2017-07-16 15:33:12 -05:00
John C. Vernaleo
e7b128a672 multi: Update markdown in README files to match change in github parser.
This borrows a lot from btcsuite/btcd 9918e2a56196fb6b1b2837a9e7fb84f3454098fd
2017-05-26 12:06:19 -04:00
Javed Khan
25c93e46e6 connmgr: Refactor connection management into pkg
This commit introduces package connmgr which contains connection
management related functionality.

The following is an overview of the features the package provides:

- Maintain fixed number of outbound connections
- Optional connect-only mode
- Retry persistent connections with increasing back-off
- Source peers from DNS seeds
- Use Tor to resolve DNS
- Dynamic ban scores
- Test coverage

In addition, btcd has been refactored to make use of the new package by
extending the connection manager to work with the server to source and
maintain peer connections. The following is a broad overview of the
changes to integrate the package:

- Simplify peer state by removing pending, retry peers
- Refactor to remove retries which are now handled by connmgr
- Use callback to add addresses sourced from the  DNS seed

Finally the following connection-related things have been improved as a
part of this refactor:

- Fixes 100% cpu usage when network is down
- Fixes issues with max peers
- Simplify outbound peer connections management
2017-03-21 19:42:19 -05:00
Dave Collins
26b74c431c
docs: Add chainhash to README.md
Upstream commit 4a5223266c.
2016-11-18 13:07:59 -06:00
Dave Collins
e90b0c967f
docs: Add mempool entry to developer tools section. 2016-10-23 20:47:05 -05:00
Dave Collins
b8df516b4b
docs: Add fullblocktests entry and make consistent. 2016-10-23 13:34:14 -05:00
Javed Khan
bff2ba70fd connmgr: Refactor connection management into pkg
This commit introduces package connmgr which contains connection
management related functionality.

The following is an overview of the features the package provides:

- Maintain fixed number of outbound connections
- Optional connect-only mode
- Retry persistent connections with increasing back-off
- Source peers from DNS seeds
- Use Tor to resolve DNS
- Dynamic ban scores
- Test coverage

In addition, btcd has been refactored to make use of the new package by
extending the connection manager to work with the server to source and
maintain peer connections. The following is a broad overview of the
changes to integrate the package:

- Simplify peer state by removing pending, retry peers
- Refactor to remove retries which are now handled by connmgr
- Use callback to add addresses sourced from the  DNS seed

Finally the following connection-related things have been improved as a
part of this refactor:

- Fixes 100% cpu usage when network is down (#129)
- Fixes issues with max peers (#577)
- Simplify outbound peer connections management
2016-10-22 01:11:57 -05:00
Dave Collins
f21410e47c
blockchain: Add block validation infrastructure.
This adds a full-blown testing infrastructure in order to test consensus
validation rules.  It is built around the idea of dynamically generating
full blocks that target specific rules linked together to form a block
chain.  In order to properly test the rules, each test instance starts
with a valid block that is then modified in the specific way needed to
test a specific rule.

Blocks which exercise following rules have been added for this initial
version.  These tests were largely ported from the original Java-based
'official' block acceptance tests as well as some additional tests
available in the Core python port.  It is expected that further tests
can be added over time as consensus rules change.

* Enough valid blocks to have a stable base of mature coinbases to spend
  for futher tests
* Basic forking and chain reorganization
* Double spends on forks
* Too much proof-of-work coinbase (extending main chain, in block that
  forces a reorg, and in a valid fork)
* Max and too many signature operations via various combinations of
  OP_CHECKSIG, OP_MULTISIG, OP_CHECKSIGVERIFY, and OP_MULTISIGVERIFY
* Too many and max signature operations with offending sigop after
  invalid data push
* Max and too many signature operations via pay-to-script-hash redeem
  scripts
* Attempt to spend tx created on a different fork
* Attempt to spend immature coinbase (on main chain and fork)
* Max size block and block that exceeds the max size
* Children of rejected blocks are either orphans or rejected
* Coinbase script too small and too large
* Max length coinbase script
* Attempt to spend tx in blocks that failed to connect
* Valid non-coinbase tx in place of coinbase
* Block with no transactions
* Invalid proof-of-work
* Block with a timestamp too far in the future
* Invalid merkle root
* Invalid proof-of-work limit (bits header field)
* Negative proof-of-work limit (bits header field)
* Two coinbase transactions
* Duplicate transactions
* Spend from transaction that does not exist
* Timestamp exactly at and one second after the median time
* Blocks with same hash via merkle root tricks
* Spend from transaction index that is out of range
* Transaction that spends more that its inputs provide
* Transaction with same hash as an existing tx that has not been
  fully spent (BIP0030)
* Non-final coinbase and non-coinbase txns
* Max size block with canonical encoding which exceeds max size with
  non-canonical encoding
* Spend from transaction earlier in same block
* Spend from transaction later in same block
* Double spend transaction from earlier in same block
* Coinbase that pays more than subsidy + fees
* Coinbase that includes subsidy + fees
* Invalid opcode in dead execution path
* Reorganization of txns with OP_RETURN outputs
* Spend of an OP_RETURN output
* Transaction with multiple OP_RETURN outputs
* Large max-sized block reorganization test (disabled by default since
  it takes a long time and a lot of memory to run)

Finally, the README.md files in the main and docs directories have been
updated to reflect the use of the new testing framework.
2016-10-17 12:16:53 -05:00
David Hill
05ab7141d3 travis: Add go 1.7 and drop go 1.5 support. (#740) 2016-08-18 11:06:26 -05:00
Janus Troelsen
4a5223266c docs: Add chainhash to README.md (#739) 2016-08-17 10:41:50 -05:00
Dave Collins
8a9956da04 docs: Update READMEs with some current details.
Upstream commit 37938375dc.
2016-05-30 13:28:17 -05:00
Steven Roose
24e41c843b Update installation instructions using Glide (#698)
The main README.md file had newer installation that uses Glide, while these did not.
2016-05-21 17:30:26 -05:00
Dave Collins
756eff2fee peer: Refactor peer code into its own package.
Contains the following upstream commits:

- 00bddf7540
- 250228c32f
- f1bd2f8d6e
- cbbe3a8bbe
- aa03d68e1e

In addition to the normal required changes for syncing, the following
changes have been made in order to facilitate integration of the new
package into Decred:

- Removed check in PushRejectMsg against protocol version since all
  peers since the initial version support it
- Fixed leaked timer in `syncMiningStateAfterSync` function
- Add the Decred-specific OnGetMiningState and OnMiningState handlers to
  the new peer package
- Add handler for the new mining state messages to the 'serverPeer' type
  and register them
- Use the new constant for wire.InitialProtocolVersion in the reject
  message instead of hard coded number
- Remove logic specific to the regression network since Decred does not
  have it
2016-05-20 13:58:23 -05:00
Julian Yap
5c791721d6 Fix rpclisten and listen port references in documentation 2016-04-13 23:07:35 -10:00
Dave Collins
37938375dc docs: Update READMEs with current details.
This commit updates the main README.md and docs/README.md files to
replace the references to the now dead btcgui project with the
Windows-only Paymetheus project.

While here, it also updates some information to make it more current and
accurately describe the current status.
2016-03-11 14:53:15 -06:00
Frank Braun
1e22c04fa6 Remove btcsuite artifact and word doubling.
Adjust links for Decred.
2016-02-12 08:58:43 -05:00
John C. Vernaleo
5076a00512 Initial Decred Commit.
Includes work by cjepson, ay-p, jolan, and jcv.

Initial conceptual framework by tacotime.
2016-02-07 14:00:12 -05:00
Justus Ranvier
756f58b581
add installation instructions for Gentoo 2015-11-08 14:55:08 -06:00
Javed Khan
00bddf7540 peer: Refactor peer code into its own package.
This commit introduces package peer which contains peer related features
refactored from peer.go.

The following is an overview of the features the package provides:

- Provides a basic concurrent safe bitcoin peer for handling bitcoin
  communications via the peer-to-peer protocol
- Full duplex reading and writing of bitcoin protocol messages
- Automatic handling of the initial handshake process including protocol
  version negotiation
- Automatic periodic keep-alive pinging and pong responses
- Asynchronous message queueing of outbound messages with optional
  channel for notification when the message is actually sent
- Inventory message batching and send trickling with known inventory
  detection and avoidance
- Ability to wait for shutdown/disconnect
- Flexible peer configuration
  - Caller is responsible for creating outgoing connections and listening
    for incoming connections so they have flexibility to establish
    connections as they see fit (proxies, etc.)
  - User agent name and version
  - Bitcoin network
  - Service support signalling (full nodes, bloom filters, etc.)
  - Maximum supported protocol version
  - Ability to register callbacks for handling bitcoin protocol messages
- Proper handling of bloom filter related commands when the caller does
  not specify the related flag to signal support
  - Disconnects the peer when the protocol version is high enough
  - Does not invoke the related callbacks for older protocol versions
- Snapshottable peer statistics such as the total number of bytes read
  and written, the remote address, user agent, and negotiated protocol
  version
- Helper functions for pushing addresses, getblocks, getheaders, and
  reject messages
  - These could all be sent manually via the standard message output
    function, but the helpers provide additional nice functionality such
    as duplicate filtering and address randomization
- Full documentation with example usage
- Test coverage

In addition to the addition of the new package, btcd has been refactored
to make use of the new package by extending the basic peer it provides to
work with the blockmanager and server to act as a full node.  The
following is a broad overview of the changes to integrate the package:

- The server is responsible for all connection management including
  persistent peers and banning
- Callbacks for all messages that are required to implement a full node
  are registered
- Logic necessary to serve data and behave as a full node is now in the
  callback registered with the peer

Finally, the following peer-related things have been improved as a part
of this refactor:

- Don't log or send reject message due to peer disconnects
- Remove trace logs that aren't particularly helpful
- Finish an old TODO to switch the queue WaitGroup over to a channel
- Improve various comments and fix some code consistency cases
- Improve a few logging bits
- Implement a most-recently-used nonce tracking for detecting self
  connections and generate a unique nonce for each peer
2015-10-23 06:17:29 +05:30