Skip to content

Commit

Permalink
BTCZ node 2.0.7-10 | Servicing patch (#68)
Browse files Browse the repository at this point in the history
* Deprecation and RawTX update

* Version correction

*New deprecation height at block 1,093,192
  • Loading branch information
MarcelusCH authored May 22, 2022
1 parent 8a82569 commit f8842ec
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BitcoinZ 2.0.7
# BitcoinZ 2.0.7-10
**Keep running wallet to strengthen the BitcoinZ network. Backup your wallet in many locations & keep your coins wallet offline.**

### Ports:
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 7)
define(_CLIENT_VERSION_BUILD, 50)
define(_CLIENT_VERSION_BUILD, 60)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2020)
define(_COPYRIGHT_YEAR, 2022)
AC_INIT([BitcoinZ],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://github.com/btcz/bitcoinz/issues],[BitcoinZ])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
Expand Down
6 changes: 6 additions & 0 deletions contrib/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
bitcoinz (2.0.7-10) stable; urgency=medium

* 2.0.7-10 release.

-- The BitcoinZ Community <[email protected]> May 2022

bitcoinz (2.0.7) stable; urgency=high

* 2.0.7 release.
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "bitcoinz-2.0.7"
name: "bitcoinz-2.0.7-10"
enable_cache: true
distro: "debian"
suites:
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoinz-cli.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH BITCOINZ-CLI "1" "May 2019" "bitcoinz-cli v2.0.7" "User Commands"
.TH BITCOINZ-CLI "1" "May 2022" "bitcoinz-cli v2.0.7-10" "User Commands"
.SH NAME
bitcoinz-cli \- manual page for bitcoinz-cli v2.0.7
bitcoinz-cli \- manual page for bitcoinz-cli v2.0.7-10
.SH DESCRIPTION
BitcoinZ RPC client version v2.0.7
BitcoinZ RPC client version v2.0.7-10
.PP
In order to ensure you are adequately protecting your privacy when using
BitcoinZ, please see <https://z.cash/support/security/index.html>.
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoinz-tx.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH BITCOINZ-TX "1" "May 2019" "bitcoinz-tx v2.0.7" "User Commands"
.TH BITCOINZ-TX "1" "May 2022" "bitcoinz-tx v2.0.7-10" "User Commands"
.SH NAME
bitcoinz-tx \- manual page for bitcoinz-tx v2.0.7
bitcoinz-tx \- manual page for bitcoinz-tx v2.0.7-10
.SH DESCRIPTION
BitcoinZ bitcoinz\-tx utility version v2.0.7
BitcoinZ bitcoinz\-tx utility version v2.0.7-10
.SS "Usage:"
.TP
bitcoinz\-tx [options] <hex\-tx> [commands]
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoinzd.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH BITCOINZD "1" "May 2019" "bitcoinzd v2.0.7" "User Commands"
.TH BITCOINZD "1" "May 2022" "bitcoinzd v2.0.7-10" "User Commands"
.SH NAME
bitcoinzd \- manual page for bitcoinzd v2.0.7
bitcoinzd \- manual page for bitcoinzd v2.0.7-10
.SH DESCRIPTION
BitcoinZ Daemon version v2.0.7
BitcoinZ Daemon version v2.0.7-10
.PP
In order to ensure you are adequately protecting your privacy when using
BitcoinZ, please see <https://z.cash/support/security/>.
Expand Down
4 changes: 2 additions & 2 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 7
#define CLIENT_VERSION_BUILD 50
#define CLIENT_VERSION_BUILD 60

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand All @@ -28,7 +28,7 @@
* Copyright year (2009-this)
* Todo: update this when changing our copyright comments in the source
*/
#define COPYRIGHT_YEAR 2020
#define COPYRIGHT_YEAR 2022

#endif //HAVE_CONFIG_H

Expand Down
2 changes: 1 addition & 1 deletion src/deprecation.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Deprecation policy:
// * Shut down 16 weeks' worth of blocks after the estimated release block height.
// * A warning is shown during the 2 weeks' worth of blocks prior to shut down.
static const int APPROX_RELEASE_HEIGHT = 925000;
static const int APPROX_RELEASE_HEIGHT = 1028680; // +6 month
static const int WEEKS_UNTIL_DEPRECATION = 16;
static const int DEPRECATION_HEIGHT = APPROX_RELEASE_HEIGHT + (WEEKS_UNTIL_DEPRECATION * 7 * 24 * 24);

Expand Down
2 changes: 1 addition & 1 deletion src/metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ void ThreadShowMetricsScreen()
std::cout << std::endl;

// Thank you text
std::cout << _("BTCZ Node Version 2.0.7 (YODA) - Protocol 770008") << std::endl;
std::cout << _("BTCZ Node Version 2.0.7-10 (YODA) - Protocol 770008") << std::endl;
std::cout << _("Thank you for running a BitcoinZ node!") << std::endl;
std::cout << _("You're helping to strengthen the network and contributing to a social good :)") << std::endl;
}
Expand Down
36 changes: 23 additions & 13 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
" \"reqSigs\" : n, (numeric) The required sigs\n"
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
" \"addresses\" : [ (json array of string)\n"
" \"zcashaddress\" (string) BitcoinZ address\n"
" \"btczaddress\" (string) BitcoinZ address\n"
" ,...\n"
" ]\n"
" }\n"
Expand Down Expand Up @@ -503,8 +503,9 @@ UniValue createrawtransaction(const UniValue& params, bool fHelp)
" ]\n"
"2. \"addresses\" (string, required) a json object with addresses as keys and amounts as values\n"
" {\n"
" \"address\": x.xxx (numeric, required) The key is the BitcoinZ address, the value is the " + CURRENCY_UNIT + " amount\n"
" ,...\n"
" \"address\": x.xxx (numeric, required, optional if data used) The key is the BitcoinZ address, the value is the " + CURRENCY_UNIT + " amount\n"
" ,... (other optional address)\n"
" ,\"data\": \"hex\", (string, optional) A key-value pair. The key must be \"data\", the value is hex-encoded data\n"
" }\n"
"3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
"4. expiryheight (numeric, optional, default="
Expand Down Expand Up @@ -583,20 +584,29 @@ UniValue createrawtransaction(const UniValue& params, bool fHelp)
std::set<CTxDestination> destinations;
vector<string> addrList = sendTo.getKeys();
for (const std::string& name_ : addrList) {
CTxDestination destination = DecodeDestination(name_);
if (!IsValidDestination(destination)) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, std::string("Invalid BitcoinZ address: ") + name_);
}

if (!destinations.insert(destination).second) {
throw JSONRPCError(RPC_INVALID_PARAMETER, std::string("Invalid parameter, duplicated address: ") + name_);
}

CScript scriptPubKey = GetScriptForDestination(destination);
CAmount nAmount = AmountFromValue(sendTo[name_]);

CTxOut out(nAmount, scriptPubKey);
// Add data field acceptence
if (name_ == "data") {
std::vector<unsigned char> data = ParseHexV(sendTo[name_].getValStr(),"Data");
CTxOut out(0, CScript() << OP_RETURN << data);
rawTx.vout.push_back(out);
} else {
CTxDestination destination = DecodeDestination(name_);
if (!IsValidDestination(destination)) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, std::string("Invalid BitcoinZ address: ") + name_);
}
if (!destinations.insert(destination).second) {
throw JSONRPCError(RPC_INVALID_PARAMETER, std::string("Invalid parameter, duplicated address: ") + name_);
}
CScript scriptPubKey = GetScriptForDestination(destination);
CAmount nAmount = AmountFromValue(sendTo[name_]);
CTxOut out(nAmount, scriptPubKey);
rawTx.vout.push_back(out);
}


}

return EncodeHexTx(rawTx);
Expand Down

0 comments on commit f8842ec

Please sign in to comment.