This updates all code in the main module to use the latest major modules
versions to pull in the latest updates.
A more general high level overview of the changes is provided below,
however, there is one semantic change worth calling out independently.
The verifymessage RPC will now return an error when provided with
an address that is not for the current active network and the RPC server
version has been bumped accordingly.
Previously, it would return false which indicated the signature is
invalid, even when the provided signature was actually valid for the
other network. Said behavior was not really incorrect since the
address, signature, and message combination is in fact invalid for the
current active network, however, that result could be somewhat
misleading since a false result could easily be interpreted to mean the
signature is actually invalid altogether which is distinct from the case
of the address being for a different network. Therefore, it is
preferable to explicitly return an error in the case of an address on
the wrong network to cleanly separate these cases.
The following is a high level overview of the changes:
- Replace all calls to removed blockchain merkle root, pow, subsidy, and
coinbase funcs with their standalone module equivalents
- Introduce a new local func named calcTxTreeMerkleRoot that accepts
dcrutil.Tx as before and defers to the new standalone func
- Update block locator handling to match the new signature required by
the peer/v2 module
- Introduce a new local func named chainBlockLocatorToHashes which
performs the necessary conversion
- Update all references to old v1 chaincfg params global instances to
use the new v2 functions
- Modify all cases that parse addresses to provide the now required
current network params
- Include address params with the wsClientFilter
- Replace removed v1 chaincfg constants with local constants
- Create subsidy cache during server init and pass it to the relevant
subsystems
- blockManagerConfig
- BlkTmplGenerator
- rpcServer
- VotingWallet
- Update mining code that creates the block one coinbase transaction to
create the output scripts as defined in the v2 params
- Replace old v2 dcrjson constant references with new types module
- Fix various comment typos
- Update fees module to use the latest major module versions and bump it v2
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
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.