Commit Graph

209 Commits

Author SHA1 Message Date
jl777
b40d83c9c5 Rpc and tx create 2018-07-21 01:54:49 -11:00
jl777
26204e59df Add coinsupply rpc 2018-07-12 00:18:58 -11:00
jl777
2732d384f4 Stub getnewaddress64 2018-06-30 03:37:42 -11:00
jl777
4f02fc4009 Getbalance64 2018-06-30 02:52:29 -11:00
Scott Sadler
45acf7d462 Merge remote-tracking branch 'jl/jl777' into momo 2018-06-19 20:50:56 -03:00
jl777
2200781907 Snapshot roc 2018-06-12 00:26:46 -11:00
Scott Sadler
81389fc7b4 merge dev; tests broken, need to use wallet for block rewards 2018-05-29 19:04:47 -03:00
Scott Sadler
0b485d3c66 rpc methods for cross chain transactions 2018-05-22 15:16:37 -03:00
Scott Sadler
e4f943d86d cross chain rpc methods 2018-05-18 19:29:33 -03:00
jl777
e390692576 Display invalidateblock, reconsiderblock, resendwallettransactions 2018-05-10 13:08:25 +03:00
jl777
b0fa5bad4d calc_MoM 2018-04-27 13:16:37 +03:00
jl777
9edf27ec05 +print 2018-04-22 16:05:56 +03:00
jl777
ebc4965c18 Test 2018-04-17 21:22:11 +03:00
jl777
0ce6dd741f Test 2018-04-17 21:20:50 +03:00
jl777
6a1216c1a1 Test 2018-04-17 21:19:11 +03:00
jl777
6c537f91c0 Merge branch 'dev' into devmerge
# Conflicts:
#	src/init.cpp
#	src/komodo_bitcoind.h
#	src/komodo_events.h
#	src/komodo_notary.h
#	src/komodo_structs.h
#	src/main.cpp
#	src/pow.cpp
#	src/rpcblockchain.cpp
2018-04-16 06:57:36 +03:00
Scott Grayson
0c4f43951e Merge branch 'dev' of https://github.com/jl777/komodo into trunk-merge
* 'dev' of https://github.com/jl777/komodo: (1062 commits)
  Delay PoW check until connect block
  Declare
  KOMODO_NEWBLOCKS
  Prevent autorewind if syncing. Not a critical update
  Change n0/n1 size to int32_t
  Syntax
  Fix n -> static n0/n1
  Test
  Test
  Test
  KOMODO_LONGESTCHAIN = height;
  Sync main.cpp to jl777
  -print
  -USD/EUR
  readme
  curl fix
  -print
  Fix buffer overflows and reduce KMD men usage
  -print
  Test
  ...
2018-04-15 21:59:37 -04:00
jl777
5740b2aa6b Add allMoMs 2018-04-12 18:45:25 +03:00
jl777
fb9c365218 Calculate MoMoM 2018-04-12 11:44:28 +03:00
Scott Sadler
375927407b betprotocol functions 2018-04-03 04:48:24 -03:00
TheTrunk
8b78a8199e Bitcore port 2018-03-27 13:34:52 +02:00
jl777
eb9facd492 Merge branch 'dev' into jl777 2018-03-25 22:24:20 +03:00
jl777
9000990c30 Merge remote-tracking branch 'zcash/master' into rebase2
# Conflicts:
#	.travis.yml
#	Makefile.am
#	README.md
#	configure.ac
#	depends/Makefile
#	depends/builders/darwin.mk
#	depends/funcs.mk
#	depends/hosts/darwin.mk
#	depends/packages/googlemock.mk
#	depends/packages/googletest.mk
#	depends/packages/libsnark.mk
#	depends/packages/libsodium.mk
#	depends/packages/packages.mk
#	depends/packages/rust.mk
#	src/Makefile.am
#	src/Makefile.gtest.include
#	src/chainparams.cpp
#	src/chainparams.h
#	src/checkpoints.h
#	src/clientversion.h
#	src/coins.cpp
#	src/consensus/consensus.h
#	src/gtest/test_mempool.cpp
#	src/httprpc.cpp
#	src/init.cpp
#	src/komodo-tx.cpp
#	src/main.cpp
#	src/miner.cpp
#	src/policy/fees.cpp
#	src/policy/fees.h
#	src/rpcmining.cpp
#	src/rpcrawtransaction.cpp
#	src/rpcserver.cpp
#	src/test/policyestimator_tests.cpp
#	src/test/rpc_wallet_tests.cpp
#	src/test/transaction_tests.cpp
#	src/txdb.cpp
#	src/txmempool.cpp
#	src/wallet/asyncrpcoperation_sendmany.cpp
#	src/wallet/rpcwallet.cpp
#	src/wallet/wallet.cpp
#	src/wallet/wallet.h
#	src/zcash/CreateJoinSplit.cpp
#	zcutil/build.sh
2018-03-25 18:44:38 +03:00
jl777
076452eeaa Merge pull request #539 from jl777/jl777
MoM support
2018-03-24 17:05:12 +02:00
jl777
4329679df7 height_MoM rpc 2018-03-24 12:59:36 +02:00
Jonathan "Duke" Leto
589c42c1c1 Make help examples show komodo-cli 2018-03-03 16:51:58 -08:00
Jonathan "Duke" Leto
41572034cb Fix the port in curl examples shown at the bottom of all RPC method help texts 2018-03-03 16:49:58 -08:00
Jack Grigg
6e9c7629af Implement z_mergetoaddress for combining UTXOs and notes
Closes #2493.
2018-02-22 13:23:18 +00:00
Homu
a0a010c85c Auto merge of #2839 - arcalinea:add_deprecation_alert, r=bitcartel
Add getdeprecationinfo RPC method to return deprecation block height

Closes #2828

Returns:
```
{
  "version": xxxxx,                      (numeric) the server version
  "subversion": "/MagicBean:x.y.z[-v]/",     (string) the server subversion string
  "deprecationheight": xxxxx,            (numeric) the deprecation block height
}
```
2018-02-02 10:23:37 -08:00
Jay Graber
9d2974ed5b Add getdeprecationinfo rpc call to return current version and deprecation block height. 2018-01-02 11:38:39 -08:00
Jack Grigg
e85b33a52e Add RPC methods for exporting/importing viewing keys 2017-12-20 00:46:37 +00:00
jl777
eea03b7b5d jumblr_pause and jumblr_resume
Thanks to @amigo for the feature request
2017-11-22 10:53:16 +04:00
Simon
45232b1961 Add payment disclosure as experimental feature. 2017-11-14 13:29:05 -08:00
Homu
fb2f98e00b Auto merge of #2555 - jasondavies:fix-2554, r=str4d
Fix various thread assertion errors caused during shutdown.

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6719
- bitcoin/bitcoin#6990
- bitcoin/bitcoin#8421
  - Second commit only in this PR
- bitcoin/bitcoin#11006

I've cherry-picked the relevant commits, along with a note in each commit referring to the original Bitcoin commit ID (and the Zcash issue numbers where applicable).  I've tested each issue with/without these patches applied.

Closes #2214, #2334, and #2554.
2017-10-23 15:15:14 -07:00
Simon
06c19063bb Implement RPC shield_coinbase #2448. 2017-09-21 15:04:12 -07:00
Wladimir J. van der Laan
c0fe29370a Make HTTP server shutdown more graceful
Shutting down the HTTP server currently breaks off all current requests.
This can create a race condition with RPC `stop` command, where the calling
process never receives confirmation.

This change removes the listening sockets on shutdown so that no new
requests can come in, but no longer breaks off requests in progress.

Meant to fix bitcoin/#6717.

Zcash: cherry-picked from commit 5e0c22135600fe36811da3b78216efc61ba765fb
2017-08-01 20:24:27 +01:00
jl777
5539178c7f Test 2017-07-12 12:26:38 +02:00
jl777
eeaaf55488 Jumblr 2017-07-12 12:15:20 +02:00
Kevin Pan
26d27a15ce "getblocktemplate" could work without wallet 2017-06-20 10:41:46 +08:00
jl777
945f015d80 Initial merge 2017-03-30 04:35:16 +03:00
Bob McElrath
c922edd00f Add explicit shared_ptr constructor due to C++11 error 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
858afa1a4a Implement RPCTimerHandler for Qt RPC console
Implement RPCTimerHandler for Qt RPC console, so that `walletpassphrase`
works with GUI and `-server=0`.

Also simplify HTTPEvent-related code by using boost::function directly.

Zcash: QT changes ommitted
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
afd64f76ea evhttpd implementation
- *Replace usage of boost::asio with [libevent2](http://libevent.org/)*.
boost::asio is not part of C++11, so unlike other boost there is no
forwards-compatibility reason to stick with it. Together with #4738 (convert
json_spirit to UniValue), this rids Bitcoin Core of the worst offenders with
regard to compile-time slowness.

- *Replace spit-and-duct-tape http server with evhttp*. Front-end http handling
is handled by libevent, a work queue (with configurable depth and parallelism)
is used to handle application requests.

- *Wrap HTTP request in C++ class*; this makes the application code mostly
HTTP-server-neutral

- *Refactor RPC to move all http-specific code to a separate file*.
Theoreticaly this can allow building without HTTP server but with another RPC
backend, e.g. Qt's debug console (currently not implemented) or future RPC
mechanisms people may want to use.

- *HTTP dispatch mechanism*; services (e.g., RPC, REST) register which URL
paths they want to handle.

By using a proven, high-performance asynchronous networking library (also used
by Tor) and HTTP server, problems such as #5674, #5655, #344 should be avoided.

What works? bitcoind, bitcoin-cli, bitcoin-qt. Unit tests and RPC/REST tests
pass. The aim for now is everything but SSL support.

Configuration options:

- `-rpcthreads`: repurposed as "number of  work handler threads". Still
defaults to 4.

- `-rpcworkqueue`: maximum depth of work queue. When this is reached, new
requests will return a 500 Internal Error.

- `-rpctimeout`: inactivity time, in seconds, after which to disconnect a
client.

- `-debug=http`: low-level http activity logging
2017-03-24 09:03:59 +13:00
Jack Grigg
bec25c91cb Revert "Closes #1680, temporary fix for rpc deadlock inherited from upstream."
This reverts commit f4404d7b5b.
2017-03-24 09:03:59 +13:00
zkbot
a7cf698873 Auto merge of #2100 - str4d:2074-rpc, r=arcalinea
Bitcoin 0.12 RPC PRs 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6266
- bitcoin/bitcoin#6257
- bitcoin/bitcoin#6271
- bitcoin/bitcoin#6158
- bitcoin/bitcoin#6307
- bitcoin/bitcoin#6290
- bitcoin/bitcoin#6262
- bitcoin/bitcoin#6088
- bitcoin/bitcoin#6339
- bitcoin/bitcoin#6299 (partial, remainder in #2099)
- bitcoin/bitcoin#6350
- bitcoin/bitcoin#6247
- bitcoin/bitcoin#6362
- bitcoin/bitcoin#5486
- bitcoin/bitcoin#6417
- bitcoin/bitcoin#6398 (partial, remainder was included in #1950)
- bitcoin/bitcoin#6444
- bitcoin/bitcoin#6456 (partial, remainder was included in #2082)
- bitcoin/bitcoin#6380
- bitcoin/bitcoin#6970

Part of #2074.
2017-03-04 02:57:46 +00:00
Philip Kaufmann
db954a65ac use const references where appropriate 2017-03-03 10:57:05 -08:00
Wladimir J. van der Laan
84d1d5fd6f rpc: Accept strings in AmountFromValue
Accept strings containing decimal values, in addition to bare values.

Useful from JSON-RPC implementations where it's not possible to have
direct control over the text of numbers (e.g. where numbers are always
doubles), and it's still desired to send an exact value.

This would allow users to post JSON content with numbers encoded like
`{"value": "0.00000001"}` instead of `{"value": 0.00000001}` which some
php/python encoders wrap into 1e-8, or worse.
2017-03-02 13:26:34 -08:00
Forrest Voight
483672f772 When processing RPC commands during warmup phase, parse the
request object before returning an error so that id value can
be used in the response.

Prior to this commit, RPC commands sent during Bitcoin's
warmup/startup phase were responded to with a JSON-RPC error
with an id of null, which violated the JSON-RPC 2.0 spec:

id: This member is REQUIRED. It MUST be the same as the value
of the id member in the Request Object. If there was an error
in detecting the id in the Request object (e.g. Parse
error/Invalid Request), it MUST be Null.
2017-03-02 13:23:03 -08:00
Peter Todd
d3d5483eef Add getblockheader RPC call
Alternative to getblock that works even when the block itself has been
pruned, returning all available information.
2017-03-02 13:23:03 -08:00
Matt Corallo
3d8013a01b Add fundrawtransaction RPC method 2017-03-02 13:23:03 -08:00