Commit Graph

6994 Commits

Author SHA1 Message Date
Jonas Schnelli
962ec4b5e4 [QA] add setban/listbanned/clearbanned tests 2017-03-02 13:23:03 -08:00
Jonas Schnelli
ed3f13a057 [RPC] add setban/listbanned/clearbanned RPC commands 2017-03-02 13:23:03 -08:00
Jonas Schnelli
997829713c [net] extend core functionallity for ban/unban/listban 2017-03-02 13:23:03 -08:00
Alex van der Peet
94ee48c42a New RPC command disconnectnode 2017-03-02 13:23:03 -08:00
Stephen
6699b42518 Add paytxfee to getwalletinfo, warnings to getnetworkinfo 2017-03-02 13:23:03 -08:00
Daniel Kraft
e940185294 Fix univalue handling of \u0000 characters.
Univalue's parsing of \u escape sequences did not handle NUL characters
correctly.  They were, effectively, dropped.  The extended test-case
fails with the old code, and is fixed with this patch.
2017-03-02 13:23:03 -08:00
zkbot
14711a4a43 Auto merge of #2141 - bitcartel:1969_free_rate_limiter, r=daira
Closes #1969. Large shielded transactions using the default fee are no longer treated as "free" transactions
2017-03-02 03:51:14 +00:00
zkbot
c1cff6069f Auto merge of #2130 - str4d:2095-metrics-reindex-msg, r=arcalinea
Do not ask a UI question on metrics screen

Based on bitcoin/bitcoin#8257.

Closes #2095.
2017-03-02 03:08:29 +00:00
zkbot
1a41597af8 Auto merge of #2114 - bitcartel:fix_fr_test_bug_and_new_testnet_addresses, r=daira
Closes #2113. Fixes bug in test and updates testnet fr addresses.

Updating the testnet fr addresses will introduce a consensus change on testnet, so all testnet nodes will be required to upgrade.  See #2113 for more information.
2017-03-02 02:18:33 +00:00
zkbot
312fbd9d0e Auto merge of #1932 - aniemerg:1522-pause-mining-for-joinsplit, r=arcalinea
Pause mining during JoinSplit creation

Closes #1522 .
2017-03-02 01:23:44 +00:00
Allan Niemerg
49c2cecb9f Pause mining during joinsplit creation 2017-03-01 16:54:26 -08:00
zkbot
44ccf1ff20 Auto merge of #2123 - bitcartel:2112_z_getoperationresult_returns_executing_status, r=arcalinea
Closes #2112 where z_getoperationresult could return stale status.

The problem was similar to a check-then-act race condition.  Status object was obtained from an operation, which might be in an 'executing' state.  Instead of checking the state recorded in the status object, the operation was queried again to see if it was in a finished state (failed,success,cancelled) and if yes, the status object was returned to the user.  However, if the operation had changed state in the background, the status object would be stale.
2017-03-02 00:24:26 +00:00
Simon
ebe750a882 Part of #1969. Changing min fee calculation also changes the dust threshold. 2017-02-28 11:44:07 -08:00
Simon
0f724e716d Closes #1969. Default fee now sufficient for large shielded tx.
Sets default min relay tx fee to 100, which is used to initialize
nSatoshisPerK for min fee calculation.  The default z_sendmany
fee of 10000 is now sufficient to cover a tx of size 100000 bytes,
so txs will not be treated as "free" and hit the free rate limiter.
2017-02-28 11:43:04 -08:00
zkbot
6f5d8fbe81 Auto merge of #2126 - bitcartel:checkpoint_mainnet_67500, r=daira
Add checkpoint at block 67500 (mainnet)

Close #2125
2017-02-28 01:01:56 +00:00
zkbot
98ddf87d18 Auto merge of #2128 - bitcartel:checkpoint_testnet_38000, r=daira
Add checkpoint at block 38000 (testnet)

Closes #2127
2017-02-28 00:12:04 +00:00
Jack Grigg
0cd769fbb7 Treat metrics screen as non-interactive for now
Closes #2095
2017-02-23 12:55:14 +00:00
Jack Grigg
f42cde3c30 Remove reference to -reindex-chainstate
Revert this when bitcoin/bitcoin#7917 is merged.
2017-02-23 12:42:28 +00:00
Pieter Wuille
5d66d0a11e Do not ask a UI question from bitcoind 2017-02-23 12:40:45 +00:00
Simon
5a888f7294 Add testnet checkpoint at block 38000 2017-02-22 22:34:20 -08:00
Simon
b897de531c Add mainnet checkpoint at block 67500 2017-02-22 21:36:44 -08:00
Simon
2f21206cfc Closes #2112 where z_getoperationresult could return stale status. 2017-02-22 16:14:56 -08:00
Simon
1003180260 Keep first three original testnet fr addresses so existing coinbase
transactions on testnet remain valid during upgrade.  New addresses
will be used starting from block 53127.
2017-02-22 11:04:17 -08:00
zkbot
4e338b0c36 Auto merge of #2093 - bitcartel:sent_network_alerts, r=daira
Closes #2092. Maintain record of alerts sent onto mainnet.
2017-02-20 17:28:40 +00:00
Simon
4340ec9705 Update founders reward addresses for testnet 2017-02-20 09:23:06 -08:00
Simon
2911b35712 Fix bug where test was generating but not saving keys to wallet on disk. 2017-02-20 09:23:06 -08:00
Simon
f47269cda9 Add assert to check alert message length is valid 2017-02-17 11:55:41 -08:00
Leo Arias
82c754f628 Fix the path to the example configuration 2017-02-11 13:52:15 -06:00
Simon
2ddec8f0e4 Bump version to 1.0.6 as part of release process 2017-02-10 09:55:49 -08:00
zkbot
93baaeee3e Auto merge of #2081 - daira:1955-single-address-mining, r=bitcartel
Address @str4d's comment on #1965 about the case where -gen is not set

https://github.com/zcash/zcash/pull/1965#discussion_r100414069

Note that the case of calling the ``setgenerate true`` RPC with the wallet disabled was already handled correctly.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-02-10 08:58:19 +00:00
zkbot
eaaa5f625f Auto merge of #2082 - str4d:univalue-subtree, r=bitcartel
Add UniValue as subtree

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6637
- bitcoin/bitcoin#6239
- bitcoin/bitcoin#6379
- bitcoin/bitcoin#6456
- bitcoin/bitcoin#6788
2017-02-10 07:46:58 +00:00
zkbot
e51bd1b556 Auto merge of #1990 - str4d:1985-replace-json-spirit-with-univalue, r=str4d
Convert entire source tree from json_spirit to UniValue

This PR cherry-picks bitcoin/bitcoin#6121 and then migrates the Zcash-specific code to UniValue.

Also cherry-picks:
- bitcoin/bitcoin#6241
- bitcoin/bitcoin#6234

Closes #1985.
2017-02-10 05:15:53 +00:00
Jack Grigg
f54db399f2 Get rid of fPlus argument to FormatMoney in Zcash-specific code 2017-02-10 02:19:14 +00:00
Jack Grigg
c24109ecc3 UniValue::getValues const reference 2017-02-10 02:19:12 +00:00
Jack Grigg
2cc6bab201 Update UniValue includes in Zcash-specific code 2017-02-10 02:19:06 +00:00
Cory Fields
1dc626314d build: match upstream build change 2017-02-10 02:19:03 +00:00
Wladimir J. van der Laan
a8c22cc4d1 util: use locale-independent parsing in ParseDouble
Use locale-indepent C++ based parsing instead of C's strtod,
which checks for different input based on the user's locale.
Fixes #6443.
2017-02-10 02:19:02 +00:00
Wladimir J. van der Laan
2aee461930 univalue: Avoid unnecessary roundtrip through double for numbers
JSON makes no distinction between numbers and reals, and our code
doesn't need to do so either.

This removes VREAL, as well as its specific post-processing in
`UniValue::write`. Non-monetary amounts do not need to be forcibly
formatted with 8 decimals, so the extra roundtrip was unnecessary
(and potentially loses precision).

Zcash: cherry-picked from commit 7650449a6777710cf818d41862626164da0cd412
Dropped changes to qa/rpc-tests/rest.py pending addition of /rest/headers/
2017-02-10 02:19:01 +00:00
Wladimir J. van der Laan
d5bf1afae9 rpc: Make ValueFromAmount always return 8 decimals
This is the format that was always returned to JSON clients.
The difference was not noticed before, because VREAL values
are post-processed by univalue.

By implementing the functionality directly it breaks the dependency
of rpcserver on utilmoneystr. FormatMoney is now only used for debugging
purposes.

To test, port over the formatting tests from util_tests.cpp to
rpc_tests.cpp.
2017-02-10 02:18:59 +00:00
Wladimir J. van der Laan
fed500e2dd rpc: Accept scientific notation for monetary amounts in JSON
Add a function `ParseFixedPoint` that parses numbers according
to the JSON number specification and returns a 64-bit integer.

Then this in `AmountFromValue`, rather than `ParseMoney`.

Also add lots of tests (thanks to @jonasschnelli for some of them).

Fixes issue #6297.
2017-02-10 02:18:58 +00:00
Wladimir J. van der Laan
e76a3849c6 Changes necessary now that zero values accepted in AmountFromValue
- Add an accept test for zero amounts, and a reject test for negative
  amounts
- Remove ugly hack in `settxfee` that is no longer necessary
- Do explicit zero checks in wallet RPC functions
- Don't add a check for zero amounts in `createrawtransaction` - this
  could be seen as a feature
2017-02-10 02:18:57 +00:00
Wladimir J. van der Laan
a5beb3a51b Get rid of fPlus argument to FormatMoney
It's never used with any other value than false, the default.
2017-02-10 02:18:55 +00:00
Wladimir J. van der Laan
c66dff3dc7 Don't go through double in AmountFromValue and ValueFromAmount
My prime gripe with JSON spirit was that monetary values still had to be
converted from and to floating point which can cause deviations (see #3759
and https://bitcoin.stackexchange.com/questions/22716/bitcoind-sendfrom-round-amount-error).

As UniValue stores internal values as strings, this is no longer
necessary. This avoids risky double-to-integer and integer-to-double
conversions completely, and results in more elegant code to boot.
2017-02-10 02:18:54 +00:00
Jonas Schnelli
fbc98d7720 remove $(@F) and subdirs from univalue make 2017-02-10 02:18:52 +00:00
Jonas Schnelli
a10a6e2a0e [Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
2017-02-10 02:18:51 +00:00
Jack Grigg
0025fb4b0e Merge commit 'a4071034f6ad640ef91057fa3f45098c4933f444' as 'src/univalue' 2017-02-10 02:18:46 +00:00
Jonas Schnelli
7fc7bab25d remove univalue, prepare for subtree 2017-02-10 00:56:22 +00:00
Jack Grigg
02972a1bcd [cleanup] Simplify test code 2017-02-10 00:53:15 +00:00
Jack Grigg
873c40365a [cleanup] Remove unused import 2017-02-10 00:53:14 +00:00
Jack Grigg
cc71666a51 unsigned int -> size_t for comparing with UniValue.size() 2017-02-10 00:53:13 +00:00