Commit Graph

127 Commits

Author SHA1 Message Date
Dave Collins
553c8a6efb
release: Bump for v1.3.0. 2018-08-08 09:09:04 -05:00
Dave Collins
9e1579771b
multi: Reset testnet and bump to version 3.
This adds a new testnet3 network with new genesis block, block one
ledger, treasury address, and network magic.

All consensus rules that were voted in by testnet2 are automatically
active on the new testnet3 without having to vote them in again.
Consequently, there are no consensus vote agendas defined for it.
2018-08-08 08:09:32 -05:00
Dave Collins
1e0133e787
multi: Remove unnecessary network name funcs.
This removes the funcs which were used to override the test network name
as they were inherited from the upstream code and, once testnet v2 was
introduced, were no longer needed, but unfortunately weren't removed
accordingly.
2018-08-08 06:22:06 -05:00
David Hill
0abd44a7a9 multi: Use saner permissions saving certs. 2018-06-05 10:32:33 -05:00
Dave Collins
66010e4134
multi: Return fork len from ProcessBlock.
This modifies the ProcessBlock function in the blockchain package to
return the fork length for the connected block and updates all callers
and tests accordingly.  Several of the internal functions which
ProcessBlock calls are also updated in order to bubble the necessary
information back up so it can be returned.  It does not make any
behavioral changes.

This is being done to better expose information about the position of
the block within the chain to callers without them having to make
additional queries.
2018-05-27 20:20:43 -05:00
Dave Collins
678ff1efdd
multi: Replace btclog with slog.
This modifies all packages within the repository to the use the Decred
fork of btclog which has been renamed to slog and updates the dependency
files accordingly.
2018-05-23 14:22:10 -05:00
vctt94
14d0c207f6 dcrctl: Fix --skipverify failing if rpc.cert not found. 2018-05-07 15:57:47 -05:00
Dave Collins
0921280e6e
multi: Correct clean and expand path handling.
This corrects an issue introduced by commit
c6f9474348 which resulted in empty paths
that were cleaned and expanded being transformed into "." instead of
having no effect as intended.
2018-05-03 16:21:35 -05:00
Dave Collins
1329f871c1
release: Bump for v1.2.0. 2018-03-07 13:19:37 -06: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
Dave Collins
7647b2594d
checkdevpremine: Remove utility.
This tool is no longer necessary now that the agreed upon period of time
has passed.
2018-02-23 09:38:21 -06:00
Josh Rickmar
c6f9474348 Expand ~ to correct home directory on all OSes.
This fixes the behavior of expanding ~ on Windows and macOS, as well
as adding support for ~otheruser to expand to the home directory of
otheruser.

Modify the default sample config to reflect the change in the meaning
of ~ on Windows, and the unintended meaning of ~ on macOS.  Include
defaults for all 3 of the major operating system classes since
uncommenting the default Unix option on macOS or Windows would change
the blockchain data directory to a non-default location.
2018-02-22 20:35:44 -06:00
Donald Adu-Poku
a0438c81c3 rpcserver: add batched request support (json 2.0) 2018-02-13 17:12:08 -06:00
Dave Collins
20a8ccc27b
blockchain: Use hash values in structs.
This modifies the BestState struct in the blockchain package to store
hashes directly instead of pointers to them and updates callers to deal
with the API change in the exported BestState struct.

In general, the preferred approach for hashes moving forward is to store
hash values in complex data structures, particularly those that will be
used for cache entries, and accept pointers to hashes in arguments to
functions.

Some of the reasoning behind making this change is:

- It is generally preferred to avoid storing pointers to data in cache
  objects since doing so can easily lead to storing interior pointers into
  other structs that then can't be GC'd
- Keeping the hash values directly in the structs provides better
  cache locality
2018-01-30 13:37:26 -06:00
Dave Collins
4d20cc1217
stake/multi: Don't return errors for IsX functions.
This modifies the IsSStx, IsSSGen, and IsSSRtx functions to only return
a bool and introduces CheckSStx, CheckSSGen, and CheckSSRtx to return
the actual error as needed by consensus.

This is being done because "is" functions are much nicer to use when
they don't return an error and the callers that use them almost never
care why they aren't of the type, they just want to determine if they
are.  In the few cases where the caller does care, they can use of the
new check functions.

While here, also update the comments to call out what the more common
names for the transaction types are and to add comments to the test
functions for consistency.

Finally, it updates all callers in the repo accordingly.
2018-01-30 10:20:12 -06:00
Markus Richter
321d5040c2 checkdevpremine: Fix comment
The comment didn't reflect the code (probably a copy and paste error).
2018-01-09 18:33:07 -06:00
Markus Richter
f196b7878f checkdevpremine: Make file naming consistent
Similar to all other utilities in github.com/decred/dcrd/cmd/...
The main Go file for "utility" is usually named utility.go and not
main.go.
2018-01-09 18:33:07 -06:00
Markus Richter
d104ac0ba7 checkdevpremine: Implement --notls option 2018-01-09 18:33:07 -06:00
Markus Richter
0e4b0c8b0d checkdevpremine: Remove --skipverify option
The option --skipverify has never been implemented, therefore it is
better to remove it altogether.
2018-01-09 18:33:07 -06:00
Alex Yocom-Piatt
d4172fb0eb Bump for v1.1.2 2017-11-20 18:53:16 -06: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
a4d4179143
rpcclient: Merge dcrrpcclient repo. 2017-10-11 14:25:50 -05:00
Josh Rickmar
27981a5a7d Move self signed certificate code into certgen package.
Use this package instead of relying on dcrutil certificate generation
functions.
2017-10-10 17:23:38 -04:00
Alex Yocom-Piatt
1500e972e2 Bump for v1.1.0 (#867) 2017-09-22 11:56:37 -05:00
Jean-Christophe Mincke
5115a422f0 multi: Error descriptions are in lower case.
Functions fmt.Error(), errors.New() are inspected.

Files under the dcrd/vendor directory are ignored.
2017-09-08 18:03:59 +02:00
Donald Adu-Poku
539fb844cc glide: use jessevdk/go-flags for consistency. 2017-08-30 19:08:18 -05:00
David Hill
aa2b50714e Bump for v1.0.8 (#832) 2017-08-24 16:15:38 -05:00
David Hill
a8469025e4 Bump for v1.0.7 2017-08-15 14:47:48 -05:00
Dave Collins
511594960e
blockchain: Sync main chain flag on ProcessBlock.
Contains the following upstream commits:
- 42a4366ba8
  - This is a NOOP since it has already previously been applied
- 77913ad2e8

Most of the changes related to this merge have already previously
applied, so this primarily just minimizes the differences versus
upstream.
2017-07-26 14:16:13 -05:00
John C. Vernaleo
384c024c66 dcrctl: Add --walletrpcserver option.
This option allows one to specify a different option for the wallet
rpc server it will connect to.  This is primarily meant to be used in
the config file so that a single dcrctl.conf may be used in the
situation where the wallet is on one host and dcrd is on another host.
2017-07-17 13:47:39 -04:00
John C. Vernaleo
0d406ffde8 Bump for v1.0.5 2017-06-20 16:47:02 -04:00
Josh Rickmar
ce4b77d3d9 all: Remove seelog logger.
The btclog package has been changed to defining its own logging
interface (rather than seelog's) and provides a default implementation
for callers to use.

There are two primary advantages to the new logger implementation.

First, all log messages are created before the call returns.  Compared
to seelog, this prevents data races when mutable variables are logged.

Second, the new logger does not implement any kind of artifical rate
limiting (what seelog refers to as "adaptive logging").  Log messages
are outputted as soon as possible and the application will appear to
perform much better when watching standard output.

Because log rotation is not a feature of the btclog logging
implementation, it is handled by the main package by importing a file
rotation package that provides an io.Reader interface for creating
output to a rotating file output.  The rotator has been configured
with the same defaults that btcd previously used in the seelog config
(10MB file limits with maximum of 3 rolls) but now compresses newly
created roll files.  Due to the high compressibility of log text, the
compressed files typically reduce to around 15-30% of the original
10MB file.
2017-06-20 10:58:10 -04:00
John C. Vernaleo
016915c33d Add -j/json option to dcrctl.
This option lets dcrctl print the raw json it both
sends and receives for commands.

Inspired by the similar option in dcrtime.
2017-06-15 09:37:23 -04:00
John C. Vernaleo
b90ee0c98a Bump for v1.0.3 2017-06-07 13:45:19 -04:00
John C. Vernaleo
5bed758f85 Bump for v1.0.1 2017-04-28 11:22:19 -05:00
John C. Vernaleo
5c3e0d6454 Bump for v1.0.0
Remove beta label
2017-04-26 13:26:02 -05:00
David Hill
44c5d6ad7d Add new tool, promptsecret (#649)
promptsecret is used to read a secret from stdin without echoing and
write it to stdout.
2017-03-31 14:00:18 -04:00
David Hill
7cb68f472a dcrctl: Be smarter about automatic configuration.
dcrctl does not require dcrd so it should not keep complaining about
it missing.  Just skip automatic configuration if dcrd's configuration
is missing, but still set it up in the future if one appears and dcrctl
is still lacking a configuration file.
2017-03-20 14:17:06 -04:00
John C. Vernaleo
ef71103c95 Remove variables for testnet v1. 2017-03-16 20:19:07 -04:00
David Hill
caa57df468 travis: enable gometalinter (#603)
* Hook up gometalinter

* travis: enable unconvert

* travis: enable gosimple
2017-03-08 15:44:15 -05:00
John C. Vernaleo
f60aab08be Differentian dev and release in -V
By default, put 'dev' in the prerelease field.

For release builds we can add 'release' with the build scripts.

Update comment for current (post 1.5) usage on ldflags -X while there.
2017-02-20 09:24:36 -05:00
Josh Rickmar
33483abb2c dcrctl: Remove --terminal feature (#580)
The problem of securely prompting for secrets and not leaving secrets in shell
history can be solved in better ways, such as implementing a tool to read a
secret and write it back to standard output, allowing the secret to be piped to
dcrctl.  Luckily dcrctl already supports this feature!

No (official) tool exists so far, but the workflow would look like this:

  promptsecret | dcrctl --wallet walletpassphrase - 60

While here removing unneeded deps from the glide files, also throw in an
unrelated dcrrpcclient dep update.
2017-02-17 08:25:23 -05:00
John C. Vernaleo
4af97d2d70 Bump for v0.8.2 2017-02-15 14:27:36 -05:00
John C. Vernaleo
71e3acce1e Bump for v0.8.0 2017-02-13 14:48:52 -05:00
John C. Vernaleo
a4de235531 Bump for v0.7.0 2016-12-23 17:05:03 -05:00
Josh Rickmar
da8a0334fa Pull in latest dcrutil. (#508)
Switch to using P-521 for certs created by dcrd and gencerts.
2016-12-07 14:59:21 -05:00
David Hill
b26ffbdb1b Bump to v0.6.1 (#492) 2016-11-25 21:34:20 -06:00
Dave Collins
c162fbde71
multi: Upstream chainhash abstraction sync
Contains the following commits:

- 711f33450c
- b6b1e55d1e
  - Reverted because Travis is already at a more recent version
- bd4e64d1d4

Also, the merge commit contains the necessary decred-specific
alterations, converts all other references to sha to hash to keep with
the spirit of the merged commits, and various other cleanup intended to
bring the code bases more in line with one another.
2016-11-16 12:48:40 -06:00
Dave Collins
748ecb2a52
blockchain: Associate time src with chain instance.
Upstream commit 00ebb9d14d

Also, the merge commit contains the necessary decred-specific
alterations.
2016-11-11 18:06:09 -06:00
John C. Vernaleo
3000ee0e6b Bump for v0.6.0 2016-11-04 07:42:06 -04:00