Add DifficultyRatio to GetBlockChainInfoResult, and bump the minor rpc
version accordingly. This is to maintain consistency with GetDifficulty
RPC. Also deprecate the existing Difficuly field in
GetBlockChainInfoResult, to be removed in a future major version bump.
This modifies the getblock and getblockheader RPC results to include the
total number of hashes expected to produce the chain up to the requested
block in hex and updates the JSON-RPC API documentation accordingly.
This modifies the getblock and getblockheader RPC results to be a little
more consistent in their ordering, to include the extra data field in
the getblockheader results, and to update the JSON-RPC API documentation
for both to match reality. The documentation was missing several fields
and had some typos.
This modifies the ChainTips function in blockchain to return the results
using a type defined in the blockchain package itself instead of
directly returning a dcrjson type. This is preferable since nothing
else in the module depends on dcrjson and therefore allows the
dependency on the dcrjson module to be broken.
It also updates the RPC server that makes use of the function to perform
the necessary conversions.
Finally, the associated module hierarchy documentation is updated to
properly remove the no longer required dependency.
It should be noted that this is a breaking change to the API and thus
will need a v2 major version bump of the blockchain module to be
published before the changes can be externally consumed.
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.
This modifies the results provided by the getrawtransaction and
searchrawtransactions RPCs to make them consistent with each other.
In particular, it adds the transaction expiry, block height, and block
index fields to the searchrawtransactions result and ensures that both
omit the block height when it is zero so that it is not included in the
results for mempool transactions.
Since populating the block index requires additional details to be
stored to the transaction index to efficiently provide, only the
infrastructure is added and the value is left as the default for now,
which means it will be omitted and therefore not change the visible
behavior.
Finally, it also updates the RPC server help to provide consistent
descriptions for the fields and also updates the JSON-RPC documentation.
This adds an amount field to TransactionInput intended for specifying the prev out amount when creating a transaction. createraw/ssrtx/sgentx/transaction rpcs are also updated accordingly as well as associated tests.
A typo in assignField is also corrected.
The 'txaccepted' method is currently showing an out of date parameter within json_rpc_api.md. The first parameter is currently set to 'TxSha', however it should be set to either 'TxID' or 'TxHash' .
This modifies the example for connecting to the dcrd RPC server from
node.js to work with node.js v8.11.1 LTS and v10.0.1 along with calling
out the tested version and requirement for the additional ecdhCurve
parameter on v8.11.1 LTS.
Bite the bullet now and remove carriage return (`\r`) from all
documentation files to allow further edits without messy diffs.
No further changes have been made besides `sed -i 's/\r//g' docs/*`.
This implements the getchaintips JSON-RPC and updates the associated
JSON-RPC API documentation accordingly.
It should be noted that until the entire block index is loaded into
memory, the chain tips tracking currently only works with tips that have
been seen since the daemon was started.
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.
modifications to the stakebase tx vin[0] required adding a stakebase
field to Vin and VinPrevOut structs as well as updating the
rpc documentation for the affected calls.
The following updates were done throughout and were made to make important
information in the docs stand out at a glance:
- updates to requests info
- stylistic changes to displaying params
- returns and their types
The extended methods section was also removed (entries are now listed as
standard methods) since that section only applied to upstream. A doc entry for
loadtxfilter was also added.
This improves the help text for stakedifficulty field of the
getmininginfo RPC to clarify it is the value for the next block.
Also, update the JSON-RPC docs entry to include the field which should
have been done previously.
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.
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