Skip to content

Commit

Permalink
Merge branch 'PNY-develop' of https://github.com/decenomy/DSW
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-at-decenomy committed May 13, 2021
2 parents b4136b1 + 009badd commit b48cc7c
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 37 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 4)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2020)
Expand Down
4 changes: 2 additions & 2 deletions contrib/bitrpc/bitrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@


if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:47777")
access = ServiceProxy("http://127.0.0.1:36780")
else:
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:47777")
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:36780")
cmd = sys.argv[1].lower()

if cmd == "backupwallet":
Expand Down
6 changes: 3 additions & 3 deletions contrib/debian/examples/pivx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@

# Use as many addnode= settings as you like to connect to specific peers
#addnode=69.164.218.197
#addnode=10.0.0.2:17777
#addnode=10.0.0.2:36779

# Alternatively use as many connect= settings as you like to connect ONLY to specific peers
#connect=69.164.218.197
#connect=10.0.0.1:17777
#connect=10.0.0.1:36779

# Listening mode, enabled by default except when 'connect' is being used
#listen=1
Expand Down Expand Up @@ -79,7 +79,7 @@
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96

# Listen for RPC connections on this TCP port:
#rpcport=47777
#rpcport=36780

# You can use Peony or peonyd to send commands to Peony/peonyd
# running on another host using this option:
Expand Down
6 changes: 3 additions & 3 deletions contrib/innosetup/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Peony Core"
#define MyAppVersion "3.0.0.0"
#define MyAppVersion "4.0.0.1"
#define MyAppPublisher "2021 DECENOMY Core Developers"
#define MyAppURL "https://peony.net"
#define MyAppExeName "peony-qt.exe"
Expand All @@ -13,7 +13,7 @@
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{67A6CA9B-71C3-4FE2-AA2E-D0DF3D53C4EB}
AppId={{6BA22CA9-5CEF-44B5-8924-D95AE9673C6F}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
Expand Down Expand Up @@ -50,7 +50,7 @@ Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Components]
Name: app; Description: "{#MyAppName} {#MyAppVersion}"; Types: full compact custom; Flags: fixed
Name: bootstrap; Description: "Bootstrap blockchain files"; Types: full; ExtraDiskSpaceRequired: 7368332846;
Name: bootstrap; Description: "Bootstrap blockchain files"; Types: full; ExtraDiskSpaceRequired: 104857600;

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Expand Down
2 changes: 1 addition & 1 deletion contrib/linearize/linearize-hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
if 'host' not in settings:
settings['host'] = '127.0.0.1'
if 'port' not in settings:
settings['port'] = 47777
settings['port'] = 36780
if 'min_height' not in settings:
settings['min_height'] = 0
if 'max_height' not in settings:
Expand Down
2 changes: 1 addition & 1 deletion contrib/qos/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Qos ###

This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 17777, but not if the destination IP is within a LAN (defined as 192.168.x.x).
This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 36779, but not if the destination IP is within a LAN (defined as 192.168.x.x).

This means one can have an always-on peonyd instance running, and another local peonyd/peony-qt instance which connects to this node and receives blocks from it.
6 changes: 3 additions & 3 deletions contrib/qos/tc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11
# ret=$?
#done

#limit outgoing traffic to and from port 17777. but not when dealing with a host on the local network
#limit outgoing traffic to and from port 36779. but not when dealing with a host on the local network
# (defined by $LOCALNET)
# --set-mark marks packages matching these criteria with the number "2"
# these packages are filtered by the tc filter with "handle 2"
# this filter sends the packages into the 1:11 class, and this class is limited to ${LIMIT}
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 17777 ! -d ${LOCALNET} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 17777 ! -d ${LOCALNET} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 36779 ! -d ${LOCALNET} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 36779 ! -d ${LOCALNET} -j MARK --set-mark 0x2
4 changes: 2 additions & 2 deletions contrib/seeds/generate-seeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ def main():
g.write(' * IPv4 as well as onion addresses are wrapped inside an IPv6 address accordingly.\n')
g.write(' */\n')
with open(os.path.join(indir,'nodes_main.txt'), 'r', encoding="utf8") as f:
process_nodes(g, f, 'pnSeed6_main', 17777)
process_nodes(g, f, 'pnSeed6_main', 36779)
g.write('\n')
with open(os.path.join(indir,'nodes_test.txt'), 'r', encoding="utf8") as f:
process_nodes(g, f, 'pnSeed6_test', 27777)
process_nodes(g, f, 'pnSeed6_test', 46779)
g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')

if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion contrib/spendfrom/spendfrom.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def connect_JSON(config):
testnet = config.get('testnet', '0')
testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False
if not 'rpcport' in config:
config['rpcport'] = 47778 if testnet else 47777
config['rpcport'] = 46780 if testnet else 36780
connect = "http://%s:%s@127.0.0.1:%s"%(config['rpcuser'], config['rpcpassword'], config['rpcport'])
try:
result = ServiceProxy(connect)
Expand Down
2 changes: 1 addition & 1 deletion doc/REST-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ Only supports JSON as output format.

Risks
-------------
Running a web browser on the same node with a REST enabled pivxd can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:47777/rest/tx/1234567890.json">` which might break the nodes privacy.
Running a web browser on the same node with a REST enabled pivxd can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:36780/rest/tx/1234567890.json">` which might break the nodes privacy.
2 changes: 1 addition & 1 deletion doc/man/pivx-cli.1
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Send commands to node running on <ip> (default: 127.0.0.1)
.HP
\fB\-rpcport=\fR<port>
.IP
Connect to JSON\-RPC on <port> (default: 47777 or testnet: 47778)
Connect to JSON\-RPC on <port> (default: 36780 or testnet: 46780)
.HP
\fB\-rpcwait\fR
.IP
Expand Down
8 changes: 4 additions & 4 deletions doc/man/pivx-qt.1
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Support filtering of blocks and transaction with bloom filters (default:
.HP
\fB\-port=\fR<port>
.IP
Listen for connections on <port> (default: 17777 or testnet: 27777)
Listen for connections on <port> (default: 36779 or testnet: 46779)
.HP
\fB\-proxy=\fR<ip:port>
.IP
Expand Down Expand Up @@ -458,7 +458,7 @@ Set the masternode private key
\fB\-masternodeaddr=\fR<n>
.IP
Set external address:port to get to this masternode (example:
128.127.106.235:17777)
128.127.106.235:36779)
.HP
\fB\-budgetvotemode=\fR<mode>
.IP
Expand Down Expand Up @@ -529,8 +529,8 @@ Password for JSON\-RPC connections
.HP
\fB\-rpcport=\fR<port>
.IP
Listen for JSON\-RPC connections on <port> (default: 47777 or testnet:
47778)
Listen for JSON\-RPC connections on <port> (default: 36780 or testnet:
46780)
.HP
\fB\-rpcallowip=\fR<ip>
.IP
Expand Down
6 changes: 3 additions & 3 deletions doc/tor.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ versions of Tor see [Section 3](#3-automatically-listen-on-tor).*

HiddenServiceDir /var/lib/tor/pivx-service/
HiddenServiceVersion 2
HiddenServicePort 17777 127.0.0.1:17777
HiddenServicePort 36779 127.0.0.1:36779
HiddenServicePort 61472 127.0.0.1:61472

The directory can be different of course, but (both) port numbers should be equal to
your pivxd's P2P listen port (17777 by default).
your pivxd's P2P listen port (36779 by default).

-externalip=X You can tell pivx about its publicly reachable address using
this option, and this can be a v2 .onion address (v3 .onion
Expand Down Expand Up @@ -87,7 +87,7 @@ as well, use `discover` instead:

./pivxd ... -discover

and open port 17777 on your firewall (or use -upnp).
and open port 36779 on your firewall (or use -upnp).

If you only want to use Tor to reach .onion addresses, but not use it as a proxy
for normal IPv4/IPv6 communication, use:
Expand Down
4 changes: 2 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-mnconf=<file>", strprintf(_("Specify masternode configuration file (default: %s)"), PIVX_MASTERNODE_CONF_FILENAME));
strUsage += HelpMessageOpt("-mnconflock=<n>", strprintf(_("Lock masternodes from masternode configuration file (default: %u)"), DEFAULT_MNCONFLOCK));
strUsage += HelpMessageOpt("-masternodeprivkey=<n>", _("Set the masternode private key"));
strUsage += HelpMessageOpt("-masternodeaddr=<n>", strprintf(_("Set external address:port to get to this masternode (example: %s)"), "128.127.106.235:17777"));
strUsage += HelpMessageOpt("-masternodeaddr=<n>", strprintf(_("Set external address:port to get to this masternode (example: %s)"), "128.127.106.235:36779"));
strUsage += HelpMessageOpt("-budgetvotemode=<mode>", _("Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)"));

strUsage += HelpMessageGroup(_("Zerocoin options:"));
Expand Down Expand Up @@ -943,7 +943,7 @@ bool AppInit2()
// Make sure enough file descriptors are available
int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1);
int nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS);
int nMaxConnections = std::max(nUserMaxConnections, 0);
int nMaxConnections = std::max(nUserMaxConnections, 2 * MAX_OUTBOUND_CONNECTIONS);

// Trim requested connection counts, to fit into system limitations
nMaxConnections = std::max(std::min(nMaxConnections, (int)(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS)), 0);
Expand Down
2 changes: 1 addition & 1 deletion src/masternodeconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool CMasternodeConfig::read(std::string& strErr)
if (configFile != NULL) {
std::string strHeader = "# Masternode config file\n"
"# Format: alias IP:port masternodeprivkey collateral_output_txid collateral_output_index\n"
"# Example: mn1 127.0.0.2:17777 P3HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0"
"# Example: mn1 127.0.0.2:36779 P3HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0"
"#\n";
fwrite(strHeader.c_str(), std::strlen(strHeader.c_str()), 1, configFile);
fclose(configFile);
Expand Down
5 changes: 3 additions & 2 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "script/script.h"
#include "script/standard.h"
#include "util.h"
#include "qt/pivx/qtutils.h"

#ifdef WIN32
#ifdef _WIN32_WINNT
Expand Down Expand Up @@ -875,8 +876,8 @@ QString loadStyleSheet()
if (!theme.isEmpty()) {
cssName = QString(":/css/") + theme;
} else {
cssName = QString(":/css/default");
settings.setValue("theme", "default");
cssName = QString(":/css/default-dark");
setTheme(false);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/qt/pivx/masternodeswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void MasterNodesWidget::onDeleteMNClicked()
if (lineCopy.size() == 0) {
lineCopy = "# Masternode config file\n"
"# Format: alias IP:port masternodeprivkey collateral_output_txid collateral_output_index\n"
"# Example: mn1 127.0.0.2:17777 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0\n";
"# Example: mn1 127.0.0.2:36779 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0\n";
}

streamConfig.close();
Expand Down
2 changes: 1 addition & 1 deletion src/qt/pivx/masternodewizarddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ bool MasterNodeWizardDialog::createMN()
if (lineCopy.size() == 0) {
lineCopy = "# Masternode config file\n"
"# Format: alias IP:port masternodeprivkey collateral_output_txid collateral_output_index\n"
"# Example: mn1 127.0.0.2:17777 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0"
"# Example: mn1 127.0.0.2:36779 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0"
"#";
}
lineCopy += "\n";
Expand Down
2 changes: 1 addition & 1 deletion src/qt/pivx/qtutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void setSortTxTypeFilter(QComboBox* filter)
void setupSettings(QSettings* settings)
{
if (!settings->contains("lightTheme")) {
settings->setValue("lightTheme", false);
setTheme(false);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/rpc/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ UniValue addnode(const JSONRPCRequest& request)
"2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n"

"\nExamples:\n" +
HelpExampleCli("addnode", "\"192.168.0.6:17777\" \"onetry\"") + HelpExampleRpc("addnode", "\"192.168.0.6:17777\", \"onetry\""));
HelpExampleCli("addnode", "\"192.168.0.6:36779\" \"onetry\"") + HelpExampleRpc("addnode", "\"192.168.0.6:36779\", \"onetry\""));

if(!g_connman)
throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
Expand Down Expand Up @@ -261,7 +261,7 @@ UniValue getaddednodeinfo(const JSONRPCRequest& request)
" \"connected\" : true|false, (boolean) If connected\n"
" \"addresses\" : [ (list of objects) Only when connected = true\n"
" {\n"
" \"address\" : \"192.168.0.201:17777\", (string) The Peony server IP and port we're connected to\n"
" \"address\" : \"192.168.0.201:36779\", (string) The Peony server IP and port we're connected to\n"
" \"connected\" : \"outbound\" (string) connection, inbound or outbound\n"
" }\n"
" ]\n"
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ std::string HelpExampleRpc(std::string methodname, std::string args)
{
return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", "
"\"method\": \"" +
methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:47777/\n";
methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:36780/\n";
}

void RPCSetTimerInterfaceIfUnset(RPCTimerInterface *iface)
Expand Down

0 comments on commit b48cc7c

Please sign in to comment.