Commit Graph

43 Commits

Author SHA1 Message Date
Dave Collins
25c14e046a
main: Update to use all new major module versions.
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
2019-08-13 11:22:37 -05:00
Dave Collins
fe8ed953bc
release: Freeze version 2 mempool module use.
This freezes the root module usage of v2 of the mempool module by
removing the replacement and bumping the required version.  This means
building the software will still produce binaries based on the v2 module
until the v3 module is fully released.

All future releases will be moving to version 3 of the module.

Consequently, it bumps the required module versions as follows:

- github.com/decred/dcrd/mempool/v2 v2.1.0
2019-08-12 18:00:40 -05:00
Dave Collins
d81eb119a4
release: Freeze version 1 peer module use.
This freezes the root module usage of the peer module by removing the
replacement and bumping the required version.  This means building the
software will still produce binaries based on the v1 module until the v2
module is fully released.

All future releases will be moving to version 2 of the module.

Consequently, it bumps the required module versions as follows:

- github.com/decred/dcrd/peer@v1.2.0
2019-08-12 15:38:33 -05:00
Dave Collins
8801d9fa3a
release: Freeze version 1 connmgr module use.
This freezes the root module usage of the connmgr module by removing the
replacement and bumping the required version.  This means building the
software will still produce binaries based on the v1 module until the v2
module is fully released.

All future releases will be moving to version 2 of the module.

Consequently, it bumps the required module versions as follows:

- github.com/decred/dcrd/connmgr@v1.1.0
2019-08-12 15:36:48 -05:00
Dave Collins
a0c2441051
release: Freeze version 1 mining module use.
This freezes the root module usage of the mining module by removing the
replacement and bumping the required version.  This means building the
software will still produce binaries based on the v1 module until the v2
module is fully released.

All future releases will be moving to version 2 of the module.

Consequently, it bumps the required module versions as follows:

- github.com/decred/dcrd/blockchain@v1.2.0
- github.com/decred/dcrd/mining@v1.1.1
2019-08-12 15:06:15 -05:00
Dave Collins
9b2309fa8e
release: Freeze version 1 blockchain module use.
This freezes the root module usage of the blockchain module by removing
the replacement and bumping the required version.  This means building
the software will still produce binaries based on the v1 module until
the v2 module is fully released.

All future releases will be moving to version 2 of the module.

Consequently, it bumps the required module versions as follows:

- github.com/decred/dcrd/blockchain@v1.2.0
2019-08-08 13:10:18 -05:00
Dave Collins
8354a310bc
main: Consume latest module minors and patches.
This updates the main module to use the latest available minor and patch
versions of all modules and reverts the recent change that incorrectly
removed all of the blake256 references from the various go.sum files.

The following required direct dependencies are bumped as follows:

- github.com/decred/dcrd/blockchain/stake@v1.2.1
- github.com/decred/dcrd/blockchain/stake/v2@v2.0.1
- github.com/decred/dcrd/certgen@v1.1.0
- github.com/decred/dcrd/chaincfg@v1.5.2
- github.com/decred/dcrd/chaincfg/chainhash@v1.0.2
- github.com/decred/dcrd/chaincfg/v2@v2.2.0
- github.com/decred/dcrd/dcrutil/v2@v2.0.0
- github.com/decred/dcrd/gcs@v1.1.0
- github.com/decred/dcrd/hdkeychain/v2@v2.0.1
- github.com/decred/dcrd/txscript/v2@v2.0.0
- github.com/decred/dcrwallet/rpc/jsonrpc/types@v1.2.0
2019-08-08 10:05:35 -05:00
Nicola Larosa
1149d54cb9 multi: Use crypto/blake256.
This updates the code to make use of the new crypto/blake256 module instead of
github.com/dchest/blake256.

* change the references in the chaincfg/chainhash and gcs modules
* update chaincfg/chainhash to use the new Sum256 API
* remove references to dchest/blake256 from all go.sum files
2019-08-07 18:54:55 -05:00
Nicola Larosa
2fa28e2a43 crypto/blake256: Add module with zero alloc funcs. 2019-08-07 10:00:01 -05:00
Dave Collins
fa551363cb
gcs: Prepare v1.1.0.
This updates the gcs dependencies and serves as a base for gcs/v1.1.0.

The updated direct dependencies in this commit are as follows:

- github.com/decred/dcrd/blockchain/stake/v2@v2.0.0

The full list of updated direct dependencies since the previous
gcs/v1.0.2 release are as follows:

- github.com/decred/dcrd/blockchain/stake/v2@v2.0.0
- github.com/dchest/siphash@v1.2.1
- github.com/decred/dcrd/txscript/v2@v2.0.0
- github.com/decred/dcrd/wire@v1.2.0
2019-07-29 13:09:50 -05:00
Dave Collins
462a03c643
release: Freeze version 1 blockchain/stake module.
This serves as the final release of version 1 of the blockchain/stake
module.  All future releases will be moving to version 2 of the module.

Consequently, it bumps the required module version as follows:

- github.com/decred/dcrd/blockchain/stake@v1.2.0

It also removes the blockchain/stake override in the root module and
updates it so building the software will still produce binaries based on
the v1 module until the v2 module is fully released.
2019-07-28 14:39:09 -05:00
Dave Collins
b55cb42886
release: Freeze version 1 database module.
This serves as the final release of version 1 of the database module.
All future releases will be moving to version 2 of the module.

Consequently, it removes the database override in the root module and
updates it so building the software will still produce binaries based on
the v1 module until the v2 module is fully released.
2019-07-22 19:26:13 -05:00
Dave Collins
9e63126d48
hdkeychain: Prepare v2.0.1.
This updates the hdkeychain dependencies and serves as a base for
hdkeychain/v2.0.1.

Note that even though some of the updated dependencies consume a new
major version, they are only used internally or in the example code and
therefore a major version bump of the hdkeychain module is not required.

The updated direct dependencies in this commit are as follows:

- github.com/decred/dcrd/chaincfg/v2@v2.0.2
- github.com/decred/dcrd/dcrutil/v2@2.0.0
- github.com/decred/dcrd/dcrec/secp256k1@v1.0.2

The full list of updated direct dependencies since the previous
hdkeychain/v2.0.0 release are as follows:

- github.com/decred/dcrd/chaincfg/v2@v2.0.2
- github.com/decred/dcrd/dcrec@v1.0.0
- github.com/decred/dcrd/dcrutil/v2@2.0.0
- github.com/decred/dcrd/dcrec/secp256k1@v1.0.2
2019-07-22 19:03:51 -05:00
Dave Collins
3b6449ca31
main: Use rpcclient/v3.
This updates the main module and rpctest package (which is part of the
main module) to use v3 of the rpcclient module.
2019-07-22 18:12:53 -05:00
Dave Collins
ac5a93584c
release: Freeze version 2 rpcclient module.
This serves as the final release of version 2 of the rpcclient module.
All future releases will be moving to version 3 of the module.

Consequently, it bumps the module version as follows:

- github.com/decred/dcrd/rpcclient@v2.1.0

In addition, it updates the main module to use following module versions
as required:

- github.com/decred/dcrd/dcrutil@v1.4.0

It also removes the rpcclient override in the root module and updates it
so building the software will still produce binaries based on the v2
module until the v3 module is fully released.
2019-07-22 13:33:43 -05:00
Dave Collins
e86bf4da5a
multi: Use decred fork of go-socks.
This modifies the code to use the decred fork of the go-socks module
throughout and updates the affected modules to use the v1.0.0 release of
the socks module.
2019-07-22 12:14:42 -05:00
Josh Rickmar
599480f5c5 main: Use latest JSON-RPC types.
This also removes local replaces to my fork which were used in
development of dcrjson/v3.
2019-07-19 11:19:35 -05:00
Josh Rickmar
b112df6417 dcrjson: Introduce v3 and move types to module.
This commit introduces a new major version of the dcrjson module which
removes all dcrd RPC type support, instead focusing only on method and
type registration.  The dcrd methods and types are moved to the
github.com/decred/dcrd/rpc/jsonrpc/types module.

In order to improve backwards compatibility with dcrjson/v2, the API
has been modified to register methods as interface{} instead of
string.  This allows different method string types to be used to key
parameter types during registration and lookup, and will allow
dcrjson/v2 to forward registrations of RPC methods to v3 without
causing duplicate registrations errors for incompatible types.

With the introduction of the new types package, the RPC API has been
modified to replace concatenated hash blobs to JSON string arrays of
hash strings.  The RPC API major version is bumped to reflect this
change.

A future update to dcrjson/v2 will add additional registrations,
forwarding the registrations to v3 and replacing command types with
type aliases where possible.  Unfortunately, this can not be done
entirely in a single commit due to dcrjson/v2 and dcrjson/v3 sharing
the same directory in the source tree, and a branch will need to be
used for this update.

Module replacements are temporarily used to enable the changes for the
main module, including dcrctl.  After the aforementioned update to
dcrjson/v2 and a forthcoming update to dcrwallet's RPC types package,
these replacements will be removed.
2019-07-19 08:49:49 -05:00
JoeGruffins
f4aaa67d35 rpcclient: Add GetMasterPubkey.
This adds the GetMasterPubkey command to the rpc client, so that the
corresponding remote function can be reached.
2019-07-17 23:08:25 -05:00
Dave Collins
3203401fc5
main: Add requires for new version modules.
This adds requires for newer module versions that are not yet fully
integrated to the main go.mod file and a new file with a build tag
to ignore it which imports those modules to prevent go mod tidy from
removing the otherwise unused entries.
2019-06-26 20:21:16 -05:00
Dave Collins
7da223fd98
release: Freeze version 1 txscript module.
This serves as the final release of version 1 of the txscript module.
All future releases will be moving to version 2 of the module.

Consequently, it bumps the module version as follows:

- github.com/decred/dcrd/txscript@v1.1.0

It also removes the txscript override in the root module and updates it
so building the software will still produce binaries based on the v1
module until the v2 module is fully released.
2019-06-24 15:13:20 -05:00
Dave Collins
10147bc8f8
database: Use chaincfg/v2.
This updates the database module to use v2 of the chaincfg module and
bumps the root module to require dcrutil@v1.3.0 accordingly.

Since v2 of the chaincfg module is only used in the tests and standalone
utility, a major version bump of the database module is not required.
2019-06-19 14:18:43 -05:00
Dave Collins
eab91970f5
release: Freeze version 1 dcrutil module.
This serves as the final release of version 1 of the dcrutil module.
All future releases will be moving to version 2 of the module.

Consequently, it bumps the module version as follows:

- github.com/decred/dcrd/dcrutil@v1.3.0

It also removes the dcrutil override in the root module and updates it
so building the software will still produce binaries based on the v1
module until the v2 module is fully released.
2019-06-19 12:09:05 -05:00
David Hill
1cf1fc5998 release: freeze version 1 dcrec/secp256k1 module.
This serves as the final release of version 1 of the dcrec/secp256k1 module.
All future releases will be moving to version 2 of the module.
2019-06-17 12:12:59 -04:00
David Hill
bb479d1209 edwards: Introduce v2 module. 2019-06-14 08:21:57 -04:00
Dave Collins
d6bef4d815
release: Freeze version 1 chaincfg module.
This serves as the final release of version 1 of the chaincfg module.
All future releases will be moving to version 2 of the module.

Consequently, it bumps the module version as follows:

- github.com/decred/dcrd/chaincfg@v1.5.0

It also removes the chaincfg override in the root module and updates it
so building the software will still produce binaries based on the v1
module until the v2 module is fully released.
2019-06-12 20:14:11 -05:00
Dave Collins
074d50f49b
main/rpctest: Update for hdkeychain/v2.
This updates the rpctest package and main module to use version 2 of the
hdkeychain module.

The following is a summary of changes:

- Update all imports to use hdkeychain/v2
- Update module requirements to include new module and remove no longer
  needed old versions
- Add an override for the v2 module so CI always builds with the latest
  code
2019-04-01 13:19:52 -05:00
Dave Collins
bccd308af3
build: Tidy module sums (go mod tidy). 2019-03-25 11:37:00 -05:00
Dave Collins
fc4d68a327
main: Update for mempool/v2.
This updates the main module to use version 2 of the mempool module.

The following is a summary of changes:

- Update all imports to use mempool/v2
- Update module requirements to include new module and remove no longer
  needed old versions
- Add an override for the v2 module so CI is always builds with the
  latest code
- Update rpcserver getrawmempool to make use of new mempool
  VerboseTxDescs instead of the removed RawMempoolVerbose
- Update rpcserver getrawmempool to properly return the parameter
  provided for the transaction type instead of the type of variable in
  the case an invalid type is provided
- Update rpcserver getrawmempool to return the supported transaction
  types in the error when an invalid type is provided
2019-02-14 19:59:22 -06:00
Dave Collins
dd585b7b55
main: Tidy module to latest. 2019-02-14 19:50:05 -06:00
Dave Collins
78d83767f9
release: Freeze version 1 mempool module.
This serves as the final release of version 1 of the mempool module.
All future releases will be moving to version 2 of the module.

Consequently, it bumps the module version as follows:

- github.com/decred/dcrd/mempool@v1.2.0

It also removes the mempool override in the root module and updates it so building the
software will still produce binaries based on the v1 module until the v2
module is fully released.
2019-02-14 18:52:43 -06:00
Dave Collins
bbd3f3b0d1
rpctest: Update for rpccclient/v2 and dcrjson/v2.
This updates the rpctest harness to use version 2 of the rpcclient
module as well as version 2 of the dcrjson module.
2019-02-14 13:03:34 -06:00
Dave Collins
eab1e279c1
dcrctl: Update for dcrjson/v2 and wallet types.
This updates dcrctl to use version 2 of the dcrjson module and to make
use of the new separate type definitions provided by wallet so it
continues supporting communication with dcrwallet.
2019-02-14 12:32:12 -06:00
Dave Collins
797b43a13e
rpcclient: Introduce v2 module using wallet types.
This updates the rpcclient module to use version 2 of the dcrjson module
and to make use of the new separate type definitions provided by wallet
which are no longer available directly in the new dcrjson module.

Since this constitutes a major break to the API, it also bumps the
module version to version 2.

While here, it adds an override for dcrjson/v2 to the root module now to
ensure builds and CI always run the latest code outside of releases.

It should also be noted that this only introduces the new module and
does not update any external modules to make use of it yet.
Consequently, it also removes the rpcclient override in the root module
so building the software will still produce binaries based on the v1
module until this v2 module is fully released.
2019-02-14 11:43:57 -06:00
Dave Collins
e052b9cbf2
multi: Remove non-root module replacements.
This modifies all of the modules, with the exception of the root module,
to remove all replacement directives from their go.mod files and update
the requirements and module sums accordingly.

While it is nice to be able to build and test directly from each module
directory and have it pull in the latest untagged changes when
developing, having all of the overrides in each module makes it
infeasible to use the module tools to help maintain the modules and thus
makes it quite difficult to ensure they are all independently accurate
for external consumers.

By maintaining all of the overrides in the root module and invoking all
builds and tests from it, the overrides will apply to ensure the latest
code is being built and tested.

This also modifies the tests script used with in CI to run all of the
tests from the root module accordingly.
2019-02-08 18:01:43 -06:00
Dave Collins
1a370d38d6
release: Tidy module files with published versions. 2018-12-12 12:18:11 -06:00
Dave Collins
220d434b6e
release: Bump module versions and deps.
This bumps the various module versions as follows:

- github.com/decred/dcrd/dcrec/secp256k1@v1.0.1
- github.com/decred/dcrd/dcrjson@v1.1.0
- github.com/decred/dcrd/database@v1.0.3
- github.com/decred/dcrd/blockchain/stake@v1.1.0
- github.com/decred/dcrd/mining@v1.1.0
- github.com/decred/dcrd/certgen@v1.0.2
- github.com/decred/dcrd/connmgr@v1.0.2
- github.com/decred/dcrd/mempool@v1.1.0

In addition, it serves as a base for tagging releases of the following
module versions that have previous been bumped since the last release,
but not yet tagged:

- github.com/decred/dcrd/wire@v1.2.0
- github.com/decred/dcrd/chaincfg@v1.2.0
- github.com/decred/dcrd/dcrutil@v1.2.0
- github.com/decred/dcrd/txscript@v1.0.2
- github.com/decred/dcrd/blockchain@v1.1.0
- github.com/decred/dcrd/hdkeychain@v1.1.1
- github.com/decred/dcrd/peer@v1.1.0
- github.com/decred/dcrd/rpcclient@v1.1.0

Finally, it updates all of the dependencies for every module accordingly,
adds a few missing overrides for transitive dependencies, and tidies up
some of the go module sum files.
2018-12-10 11:18:00 -06:00
David Hill
ab7c1e8a67 release: Bump siphash version to v1.2.1. 2018-12-03 12:12:34 -06:00
Dave Collins
36f61d8ebd build: Tidy module sums (go mod tidy). 2018-08-16 20:03:27 -05:00
David Hill
e4bdae9b0c gcs: use dchest/siphash 2018-08-14 17:13:22 -04:00
Dave Collins
9536f0c88f
release: Bump module versions and deps.
This bumps the various module versions as follows:

- github.com/decred/dcrd/addrmgr@v1.0.2
- github.com/decred/dcrd/wire@v1.1.0
- github.com/decred/dcrd/chaincfg@v1.1.1
- github.com/decred/dcrd/connmgr@v1.0.1
- github.com/decred/dcrd/dcrutil@v1.1.1
- github.com/decred/dcrd/database@v1.0.1
- github.com/decred/dcrd/hdkeychain@v1.1.0
- github.com/decred/dcrd/txscript@v1.0.1
- github.com/decred/dcrd/blockchain/stake@v1.0.1
- github.com/decred/dcrd/gcs@v1.0.1
- github.com/decred/dcrd/blockchain@v1.0.1
- github.com/decred/dcrd/mining@v1.0.1
- github.com/decred/dcrd/mempool@v1.0.1
- github.com/decred/dcrd/peer@v1.0.1
- github.com/decred/dcrd/rpcclient@v1.0.1

It also updates all of the dependencies for every module accordingly and
adds a few missing overrides for transitive dependencies.
2018-08-09 14:30:22 -05:00
Dave Collins
295179fc0d
build: Refine build module support.
This further refines the modules to add the following new modules
instead of depending on the entire dcrd module:

- github.com/decred/dcrd/dcrjson@v1.0.0
- github.com/decred/dcrd/blockchain@v1.0.0
- github.com/decred/dcrd/blockchain/stake@v1.0.0
- github.com/decred/dcrd/gcs@v1.0.0
- github.com/decred/dcrd/mining@v1.0.0
- github.com/decred/dcrd/mempool@v1.0.0
- github.com/decred/dcrd/peer@v1.0.0
- github.com/decred/dcrd/rpcclient@v1.0.0

Also, it ensures modules that rely on other modules within the repo are
provided replacements to the latest repo code to ensure builds against
master and continuous integration use the latest code.

- github.com/decred/dcrd/addrmgr
- github.com/decred/dcrd/blockchain
- github.com/decred/dcrd/blockchain/stake
- github.com/decred/dcrd/chaincfg
- github.com/decred/dcrd/connmgr
- github.com/decred/dcrd/database
- github.com/decred/dcrd/dcrec/secp256k1
- github.com/decred/dcrd/dcrjson
- github.com/decred/dcrd/dcrutil
- github.com/decred/dcrd/gcs
- github.com/decred/dcrd/hdkeychain
- github.com/decred/dcrd/mempool
- github.com/decred/dcrd/mining
- github.com/decred/dcrd/peer
- github.com/decred/dcrd/rpcclient
- github.com/decred/dcrd/txscript
- github.com/decred/dcrd/wire
2018-08-05 20:45:45 -05:00
Dave Collins
807b534d07
multi: Remove go modules that do not build.
This removes a bunch of build modules that rely on a version of dcrd
that doesn't exist and updates the root module so dcrd can be built with
the upcoming go1.11 release.
2018-07-21 17:59:44 -05:00