Commit graph

3492 commits

Author SHA1 Message Date
Anirudha Bose
e9a51e8dcd rpcclient: implement getwalletinfo command 2020-09-25 12:18:06 -04:00
Friedger Müffke
1340513786 Fix link to using bootstrap.dat 2020-09-23 08:53:11 -04:00
Anirudha Bose
ac3f235eb9 rpcclient: implement getaddressinfo command
Fields such as label, and labelspurpose are not included, since they
are deprecated, and will be removed in Bitcoin Core 0.21.
2020-09-21 09:47:58 -04:00
Elliott Minns
6daaf73544
GetBlockTemplate RPC client implementation (#1629)
* GetBlockTemplate RPC client implementation

* Txid added to the getblocktemplate result

* Omitempty for TxID and improved comment for GetBlockTemplate 'rules' field
2020-09-21 09:42:35 -04:00
Anirudha Bose
f4024160f3 btcjson: add test for null params in searchrawtransactions
Closes PR #1476.
2020-09-21 09:42:09 -04:00
Tristyn
e5521de652 sample-btcd.conf: fix typo 2020-09-17 09:03:52 -04:00
Jake Sylvestre
297c6120bb ci: add go 1.15 to tests 2020-09-17 01:38:18 -04:00
Anirudha Bose
c693bd8bc5 rpcclient: add deriveaddresses RPC command 2020-09-14 10:30:47 -04:00
ipriver
42782bba18 removed unnecessary GOMAXPROCS function calls 2020-09-14 09:57:30 -04:00
Anirudha Bose
ff59bbc14a wire: add proper types for flag field and improve docs
Summary of changes:

- Add a new const TxFlagMarker to indicate the flag prefix byte.
- Add a new TxFlag type to enumerate the flags supported by the
  tx parser.

  This allows us to avoid hardcoded magics, and will make it easier
  to support new flags in future.
- Improve code comments.

Closes #1598.
2020-09-14 09:50:13 -04:00
Andrew Tugarinov
5ae1f21cd9 Added ListSinceBlockMinConfWatchOnly method. 2020-09-14 09:48:40 -04:00
Federico Bond
6f49f1f194 btcjson,rpcclient: add support for PSBT commands to rpcclient 2020-09-14 09:37:27 -04:00
Mikael Lindlof
fff96610aa rpc: Add getnodeaddresses JSON-RPC support
Add NodeAddresses function to rpcserverConnManager
interface for fetching known node addresses.
2020-09-14 09:36:05 -04:00
Olaoluwa Osuntokun
9ef973c282
Merge pull request #1625 from yyforyongyu/fix-notfound-message
btcd+netsync: support witness tx and block in notfound msg
2020-09-08 16:58:19 -07:00
Anirudha Bose
2547246f84 GitHub Actions: Enable Go Race detector and code coverage
This modifies the goclean.sh script to run tests with the
race detector enabled. It also enables code coverage, and
uploads the results to coveralls.io.

Running tests with -race and -cover flags was disabled in
6487ba1 and 6788df7 respectively, due to some limits on
time/goroutines being hit on Travis CI. Since we have
migrated to GitHub Actions, it is desirable to bring them
back.
2020-09-08 10:19:55 -04:00
Mikael Lindlof
eb05726dac Nullable optional JSON-RPC parameters
Fix command marshalling dropping params following params with nil value.

#1591 Allow specifying null parameter value from command line.
2020-09-08 10:01:44 -04:00
Anirudha Bose
bdab8dfe81 chaincfg: Add RegisterHDKeyID func to populate HD key ID pairs
Currently, the only way to register HD version bytes is by initializing
chaincfg.Params struct, and registering it during package init.
RegisterHDKeyID provides a way to populate custom HD version bytes,
without having to create new chaincfg.Params instances. This is useful
for library packages who want to use non-standard version bytes for
serializing extended keys, such as the ones documented in SLIP-0132.

This function is complementary to HDPrivateKeyToPublicKeyID, which is
used to lookup previously registered key IDs.
2020-09-08 09:59:33 -04:00
Anirudha Bose
3b926ef77b btcjson: update ListTransactionsResult for Bitcoin 0.20.0
This only adds new fields as optional, in order to make this change
backwards compatible with older versions of Bitcoin Core.
2020-09-08 09:51:20 -04:00
Calvin Kim
95fea6420c blockchain: Remove unnecessary tx hash 2020-09-08 09:46:04 -04:00
Anirudha Bose
ba3fe57507
rpcclient: support listtransactions RPC with watchonly argument
Co-authored-by: Gert-Jaap Glasbergen <gertjaap@decoscrypto.com>
2020-09-08 09:43:02 -04:00
Hanjun Kim
7cbf95675a btcec: add a comment indicating where curve name taken from
Related with #1565
2020-09-08 09:37:33 -04:00
Hanjun Kim
8facfdd04d btcec: set curve name in CurveParams
Set curve name(secp256k1) in KoblitzCurve.CurveParams

Fixes #1564
2020-09-08 09:37:33 -04:00
yyforyongyu
61634447e7
btcd+netsync: support witness tx and block in notfound msg 2020-09-03 18:53:16 +08:00
Christian Lehmann
23d149cbfb Added symlink to index.md for github readme preview. 2020-09-01 03:35:40 -04:00
Christian Lehmann
355472b0f7 Major rework on documentation to make it compatible to readthedocs.org 2020-09-01 00:48:08 -04:00
Federico Bond
35194e2dac btcjson,wire: fix invalid use of string(x) to convert byte value 2020-08-31 16:01:10 -04:00
Federico Bond
d13e907952 btcd: fix conversion of int to string failing in Go 1.15 2020-08-31 16:01:10 -04:00
Christian Lehmann
90a5c7997c Add Dockerfile to build and run btcd on Docker. 2020-08-31 15:42:42 -04:00
Anirudha Bose
fffe4a909b rpcclient: Implement importmulti JSON-RPC client command 2020-08-31 15:28:48 -04:00
Mikael Lindlof
d2c0123bef Implement signmessagewithprivkey JSON-RPC command
Reuse the Bitcoin message signature header const
also in verifymessage.
2020-08-31 10:12:54 -04:00
Mikael Lindlof
b68c50e33c Add getblockfilter JSON-RPC client command
Add type for second getblockfilter param
2020-08-31 10:02:54 -04:00
Anirudha Bose
7145eef75b rpcserver: add parity with bitcoind for validateaddress
Updated the rpcserver handler for validateaddress JSON-RPC command to
have parity with the bitcoind 0.20.0 interface.

The new fields included are - isscript, iswitness, witness_version, and
witness_program. The scriptPubKey field has been left out since it
requires wallet access.

This update has no impact on the rpcclient.ValidateAddress method,
which uses the btcjson.ValidateAddressWalletResult type for modelling
the response from bitcoind.
2020-08-31 09:58:27 -04:00
wakiyamap
36d4ae08e8 Fix monetary unit 2020-08-31 09:56:19 -04:00
Olaoluwa Osuntokun
7d69fb9ba6 peer: prevent last block height going backwards
This modifies the UpdateLastBlockHeight function to ensure the new
height is after the existing height before updating it in order to
prevent it from going backwards so it properly matches the intent of the
function which is to report the latest known block height for the peer.

Without this change, the value will properly start out at the latest
known block height reported by the peer during version negotiation,
however, it will be set to lower values when syncing from the peer due
to requesting old blocks and blindly updating the height.

It also adds a test to ensure proper functionality.

This is a backport of https://github.com/decred/dcrd/pull/1747
2020-08-31 09:47:41 -04:00
Anirudha Bose
efae8e9967 Add rpclient implementation of getdescriptorinfo RPC 2020-08-31 09:41:49 -04:00
Rjected
70a0132485 blockchain: remove unknown block version warning 2020-08-31 02:42:30 -04:00
John C. Vernaleo
56cc42fe07 btcd: bump version to v0.21.0-beta 2020-08-28 08:13:36 -04:00
Anirudha Bose
4527c5671f Update CHANGES file for 0.21.0 release
Also updated changes for 0.20.1, and added a small note about changes
since 0.12.0.
2020-08-27 15:26:14 -04:00
Dan Cline
2a0d6fd0e3 release: remove old scripts and update process doc
- remove prep_release.sh and notes.sample
- update license in release.sh
- add notes for maintainers on the release process
- mention CHANGES file modifications
2020-08-27 15:14:38 -04:00
Dan Cline
4255e1ed7b release: update release script path 2020-08-27 15:14:38 -04:00
Olaoluwa Osuntokun
1db1b6f821
Merge pull request #1609 from guggero/disable-windows-service
config+service_windows: add flag to disable win service
2020-07-30 16:23:43 -07:00
Javed Khan
24db7d7c0c netsync: handle notfound messages from peers
backport from https://github.com/decred/dcrd/pull/2253

When a peer sends a notfound message, remove the hash from requested
map.  Also increase notfound ban score and return early if it
disconnects the peer.
2020-07-28 09:23:35 -04:00
qqjettkgjzhxmwj
69773a7b41 Update json_rpc_api.md
Corrections suggested by @onyb https://github.com/btcsuite/btcd/pull/1608#discussion_r458363077
2020-07-22 17:12:47 -04:00
qqjettkgjzhxmwj
3c56a6bd3a updated docs for getblock-verbosity fixes 2020-07-22 17:12:47 -04:00
Oliver Gugger
c7390232d3
config+service_windows: add flag to disable win service
To run integration tests with btcd on Windows in non-interactive
environments (such as the Travis build with Windows machines), we
need to make sure we can still spawn a child process instead of only a
windows background service.
2020-07-22 12:57:09 +02:00
Anirudha Bose
d28c7167a5 btcec: Avoid panic in fieldVal.SetByteSlice for large inputs
The implementation has been adapted from the dcrec module in dcrd. The
bug was initially fixed in decred/dcrd@3d9cda1 while transitioning to a
constant time algorithm. A large set of test vectors were subsequently
added in decred/dcrd@8c6b52d.

The function signature has been preserved for backwards compatibility.
This means that returning whether the value has overflowed, and the
corresponding test vectors have not been backported.

This fixes #1170 and closes a previous attempt to fix the bug in #1178.
2020-07-13 09:43:36 -04:00
Javed Khan
875b51c9fb peer: knownInventory, sentNonces - use generic lru
While here, also rename and generalize limitMap and apply to
other maps which need to be bounded.
2020-07-08 16:44:04 -04:00
Anirudha Bose
e2d9cf4b55 rpcclient: Add GetTransactionWatchOnly method 2020-06-29 10:15:10 -04:00
Federico Bond
7b2ff5d180 Add getbalances RPC client command 2020-06-29 10:14:04 -04:00
Torkel Rogstad
e4f59022a3 Add fundrawtransaction RPC call 2020-06-15 09:44:04 -04:00