Skip to content

Commit

Permalink
#73 Update Devcoin ports for mainnet, tesnet, signet and regtest.
Browse files Browse the repository at this point in the history
  • Loading branch information
develCuy committed May 19, 2022
1 parent 07261aa commit c678a34
Show file tree
Hide file tree
Showing 24 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion contrib/linearize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Required configuration file settings for linearize-hashes:

Optional config file setting for linearize-hashes:
* RPC: `host` (Default: `127.0.0.1`)
* RPC: `port` (Default: `8332`)
* RPC: `port` (Default: `52332`)
* Blockchain: `min_height`, `max_height`
* `rev_hash_bytes`: If true, the written block hash list will be
byte-reversed. (In other words, the hash returned by getblockhash will have its
Expand Down
8 changes: 4 additions & 4 deletions contrib/linearize/example-linearize.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ rpcpassword=somepassword
host=127.0.0.1

#mainnet default
port=8332
port=52332

#testnet default
#port=18332
#port=62332

#regtest default
#port=18443
#port=52443

#signet default
#port=38332
#port=42332

# bootstrap.dat hashlist settings (linearize-hashes)
max_height=313000
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 @@ -120,7 +120,7 @@ def get_rpc_cookie():
if 'host' not in settings:
settings['host'] = '127.0.0.1'
if 'port' not in settings:
settings['port'] = 8332
settings['port'] = 52332
if 'min_height' not in settings:
settings['min_height'] = 0
if 'max_height' not in settings:
Expand Down
2 changes: 1 addition & 1 deletion doc/JSON-RPC-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ RPC interface will be abused.
need to expose the RPC port to the host system. The default way to
do this in Docker also exposes the port to the public Internet.
Instead, expose it only on the host system's localhost, for example:
`-p 127.0.0.1:8332:8332`
`-p 127.0.0.1:52332:52332`

- **Secure authentication:** By default, Devcoin Core generates unique
login credentials each time it restarts and puts them into a file
Expand Down
8 changes: 4 additions & 4 deletions doc/REST-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Unauthenticated REST Interface

The REST API can be enabled with the `-rest` option.

The interface runs on the same port as the JSON-RPC interface, by default port 8332 for mainnet, port 18332 for testnet,
port 38332 for signet, and port 18443 for regtest.
The interface runs on the same port as the JSON-RPC interface, by default port 52332 for mainnet, port 62332 for testnet,
port 42332 for signet, and port 52443 for regtest.

REST Interface consistency guarantees
-------------------------------------
Expand Down Expand Up @@ -83,7 +83,7 @@ https://github.com/devcoin/bips/blob/master/bip-0064.mediawiki

Example:
```
$ curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp
$ curl localhost:62332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp
{
"chainHeight" : 325347,
"chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb",
Expand Down Expand Up @@ -117,4 +117,4 @@ Only supports JSON as output format.

Risks
-------------
Running a web browser on the same node with a REST enabled devcoind 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:8332/rest/tx/1234567890.json">` which might break the nodes privacy.
Running a web browser on the same node with a REST enabled devcoind 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:52332/rest/tx/1234567890.json">` which might break the nodes privacy.
2 changes: 1 addition & 1 deletion doc/fuzzing.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ EOF
$ make -C src/ devcoind
$ mkdir -p inputs/
$ honggfuzz/honggfuzz --exit_upon_crash --quiet --timeout 4 -n 1 -Q \
-E HFND_TCP_PORT=18444 -f inputs/ -- \
-E HFND_TCP_PORT=52444 -f inputs/ -- \
src/devcoind -regtest -discover=0 -dns=0 -dnsseed=0 -listenonion=0 \
-nodebuglogfile -bind=127.0.0.1:52444 -logthreadnames \
-debug
Expand Down
6 changes: 3 additions & 3 deletions doc/man/devcoin-cli.1
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ Password for JSON\-RPC connections
.HP
\fB\-rpcport=\fR<port>
.IP
Connect to JSON\-RPC on <port> (default: 8332, testnet: 18332, signet:
38332, regtest: 18443)
Connect to JSON\-RPC on <port> (default: 52332, testnet: 62332, signet:
42332, regtest: 52443)
.HP
\fB\-rpcuser=\fR<user>
.IP
Expand All @@ -104,7 +104,7 @@ timeout. (default: 0)
Send RPC for non\-default wallet on RPC server (needs to exactly match
corresponding \fB\-wallet\fR option passed to devcoind). This changes
the RPC endpoint used, e.g.
http://127.0.0.1:8332/wallet/<walletname>
http://127.0.0.1:52332/wallet/<walletname>
.HP
\fB\-stdin\fR
.IP
Expand Down
8 changes: 4 additions & 4 deletions doc/man/devcoin-qt.1
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ Default duration (in seconds) of manually configured bans (default:
Bind to given address and always listen on it (default: 0.0.0.0). Use
[host]:port notation for IPv6. Append =onion to tag any incoming
connections to that address and port as incoming Tor connections
(default: 127.0.0.1:8334=onion, testnet: 127.0.0.1:18334=onion,
signet: 127.0.0.1:38334=onion, regtest: 127.0.0.1:18445=onion)
(default: 127.0.0.1:52334=onion, testnet: 127.0.0.1:62334=onion,
signet: 127.0.0.1:42334=onion, regtest: 127.0.0.1:52445=onion)
.HP
\fB\-connect=\fR<ip>
.IP
Expand Down Expand Up @@ -720,8 +720,8 @@ Password for JSON\-RPC connections
.HP
\fB\-rpcport=\fR<port>
.IP
Listen for JSON\-RPC connections on <port> (default: 8332, testnet:
18332, signet: 38332, regtest: 18443)
Listen for JSON\-RPC connections on <port> (default: 52332, testnet:
62332, signet: 42332, regtest: 52443)
.HP
\fB\-rpcserialversion\fR
.IP
Expand Down
8 changes: 4 additions & 4 deletions doc/man/devcoind.1
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ Default duration (in seconds) of manually configured bans (default:
Bind to given address and always listen on it (default: 0.0.0.0). Use
[host]:port notation for IPv6. Append =onion to tag any incoming
connections to that address and port as incoming Tor connections
(default: 127.0.0.1:8334=onion, testnet: 127.0.0.1:18334=onion,
signet: 127.0.0.1:38334=onion, regtest: 127.0.0.1:18445=onion)
(default: 127.0.0.1:52334=onion, testnet: 127.0.0.1:62334=onion,
signet: 127.0.0.1:42334=onion, regtest: 127.0.0.1:52445=onion)
.HP
\fB\-connect=\fR<ip>
.IP
Expand Down Expand Up @@ -729,8 +729,8 @@ Password for JSON\-RPC connections
.HP
\fB\-rpcport=\fR<port>
.IP
Listen for JSON\-RPC connections on <port> (default: 8332, testnet:
18332, signet: 38332, regtest: 18443)
Listen for JSON\-RPC connections on <port> (default: 52332, testnet:
62332, signet: 42332, regtest: 52443)
.HP
\fB\-rpcserialversion\fR
.IP
Expand Down
8 changes: 4 additions & 4 deletions doc/release-notes/release-notes-0.10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ unauthenticated access to public node data.
It is served on the same port as RPC, but does not need a password, and uses
plain HTTP instead of JSON-RPC.

Assuming a local RPC server running on port 8332, it is possible to request:
- Blocks: http://localhost:8332/rest/block/*HASH*.*EXT*
- Blocks without transactions: http://localhost:8332/rest/block/notxdetails/*HASH*.*EXT*
- Transactions (requires `-txindex`): http://localhost:8332/rest/tx/*HASH*.*EXT*
Assuming a local RPC server running on port 52332, it is possible to request:
- Blocks: http://localhost:52332/rest/block/*HASH*.*EXT*
- Blocks without transactions: http://localhost:52332/rest/block/notxdetails/*HASH*.*EXT*
- Transactions (requires `-txindex`): http://localhost:52332/rest/tx/*HASH*.*EXT*

In every case, *EXT* can be `bin` (for raw binary data), `hex` (for hex-encoded
binary) or `json`.
Expand Down
8 changes: 4 additions & 4 deletions doc/release-notes/release-notes-0.12.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ arbitrary TCP connections inside SSL. On e.g. Ubuntu it can be installed with:

sudo apt-get install stunnel4

Then, to tunnel a SSL connection on 28332 to a RPC server bound on localhost on port 18332 do:
Then, to tunnel a SSL connection on 28332 to a RPC server bound on localhost on port 62332 do:

stunnel -d 28332 -r 127.0.0.1:18332 -p stunnel.pem -P ''
stunnel -d 28332 -r 127.0.0.1:62332 -p stunnel.pem -P ''

It can also be set up system-wide in inetd style.

Expand All @@ -430,8 +430,8 @@ caching. A sample config for apache2 could look like:
SSLCertificateKeyFile /etc/apache2/ssl/server.key

<Location /devcoinrpc>
ProxyPass http://127.0.0.1:8332/
ProxyPassReverse http://127.0.0.1:8332/
ProxyPass http://127.0.0.1:52332/
ProxyPassReverse http://127.0.0.1:52332/
# optional enable digest auth
# AuthType Digest
# ...
Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes/release-notes-0.15.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Devcoin Core 0.15.0 contains the following changes to the RPC interface and `dev

* When running Devcoin Core with a single wallet, there are **no** changes to the RPC interface or `devcoin-cli`. All RPC calls and `devcoin-cli` commands continue to work as before.
* When running Devcoin Core with multi-wallet, all *node-level* RPC methods continue to work as before. HTTP RPC requests should be send to the normal `<RPC IP address>:<RPC port>` endpoint, and `devcoin-cli` commands should be run as before. A *node-level* RPC method is any method which does not require access to the wallet.
* When running Devcoin Core with multi-wallet, *wallet-level* RPC methods must specify the wallet for which they're intended in every request. HTTP RPC requests should be send to the `<RPC IP address>:<RPC port>/wallet/<wallet name>` endpoint, for example `127.0.0.1:8332/wallet/wallet1.dat`. `devcoin-cli` commands should be run with a `-rpcwallet` option, for example `devcoin-cli -rpcwallet=wallet1.dat getbalance`.
* When running Devcoin Core with multi-wallet, *wallet-level* RPC methods must specify the wallet for which they're intended in every request. HTTP RPC requests should be send to the `<RPC IP address>:<RPC port>/wallet/<wallet name>` endpoint, for example `127.0.0.1:52332/wallet/wallet1.dat`. `devcoin-cli` commands should be run with a `-rpcwallet` option, for example `devcoin-cli -rpcwallet=wallet1.dat getbalance`.
* A new *node-level* `listwallets` RPC method is added to display which wallets are currently loaded. The names returned by this method are the same as those used in the HTTP endpoint and for the `rpcwallet` argument.

Note that while multi-wallet is now fully supported, the RPC multi-wallet interface should be considered unstable for version 0.15.0, and there may backwards-incompatible changes in future versions.
Expand Down
4 changes: 2 additions & 2 deletions doc/release-notes/release-notes-0.16.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Other changed command-line options

Testing changes
----------------
- The default regtest JSON-RPC port has been changed to 18443 to avoid conflict with testnet's default of 18332.
- The default regtest JSON-RPC port has been changed to 52443 to avoid conflict with testnet's default of 62332.
- Segwit is now always active in regtest mode by default. Thus, if you upgrade a regtest node you will need to either -reindex or use the old rules by adding `vbparams=segwit:0:999999999999` to your regtest devcoin.conf. Failure to do this will result in a CheckBlockIndex() assertion failure that will look like: Assertion `(pindexFirstNeverProcessed != nullptr) == (pindex->nChainTx == 0)' failed.

0.16.0 change log
Expand Down Expand Up @@ -312,7 +312,7 @@ Testing changes
- #11415 `69ec021` Disallow using addresses in createmultisig (achow101)
- #12278 `288deac` Add special error for genesis coinbase to getrawtransaction (MeshCollider)
- #11362 `c6223b3` Remove nBlockMaxSize from miner opt struct as it is no longer used (gmaxwell)
- #10825 `28485c7` Set regtest JSON-RPC port to 18443 to avoid conflict with testnet 18332 (fametrano)
- #10825 `28485c7` Set regtest JSON-RPC port to 52443 to avoid conflict with testnet 62332 (fametrano)
- #11303 `e542728` Fix estimatesmartfee rounding display issue (TheBlueMatt)
- #7061 `8c2de82` Add RPC call "rescanblockchain <startheight> <stopheight>" (jonasschnelli)
- #11055 `95e14dc` RPC getreceivedbyaddress should return error if called with address not owned by the wallet (jnewbery)
Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes/release-notes-0.18.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Configuration option changes
disabled, so a warning is now printed if a user selects such a
configuration. If you need to expose RPC in order to use a tool like
Docker, ensure you only bind RPC to your localhost, e.g. `docker run
[...] -p 127.0.0.1:8332:8332` (this is an extra `:8332` over the
[...] -p 127.0.0.1:52332:52332` (this is an extra `:52332` over the
normal Docker port specification).

- The `rpcpassword` option now causes a startup error if the password
Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes/release-notes-0.20.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ Command line
------------

- Command line options prefixed with main/test/regtest network names like
`-main.port=8333` `-test.server=1` previously were allowed but ignored. Now
`-main.port=52333` `-test.server=1` previously were allowed but ignored. Now
they trigger "Invalid parameter" errors on startup. (#17482)

New RPCs
Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes/release-notes-0.7.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Bug fixes

* Clicking on a devcoin: URI on Windows should now launch Devcoin-Qt properly.

* When running -testnet, use RPC port 18332 by default.
* When running -testnet, use RPC port 62332 by default.

* Better detection and handling of corrupt wallet.dat and blkindex.dat files.
Previous versions would crash with a DB_RUNRECOVERY exception, this
Expand Down
4 changes: 2 additions & 2 deletions doc/tor.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ You can also manually configure your node to be reachable from the Tor network.
Add these lines to your `/etc/tor/torrc` (or equivalent config file):

HiddenServiceDir /var/lib/tor/devcoin-service/
HiddenServicePort 52333 127.0.0.1:8334
HiddenServicePort 52333 127.0.0.1:52334

The directory can be different of course, but virtual port numbers should be equal to
your devcoind's P2P listen port (52333 by default), and target addresses and ports
should be equal to binding address and port for inbound Tor connections (127.0.0.1:8334 by default).
should be equal to binding address and port for inbound Tor connections (127.0.0.1:52334 by default).

-externalip=X You can tell devcoin about its publicly reachable addresses using
this option, and this can be an onion address. Given the above
Expand Down
2 changes: 1 addition & 1 deletion share/examples/devcoin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96

# Listen for RPC connections on this TCP port:
#rpcport=8332
#rpcport=52332

# You can use Devcoin or devcoind to send commands to Devcoin/devcoind
# running on another host using this option:
Expand Down
2 changes: 1 addition & 1 deletion src/chainparamsbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const CBaseChainParams& BaseParams()
}

/**
* Port numbers for incoming Tor connections (8334, 18334, 38334, 18445) have
* Port numbers for incoming Tor connections (52334, 62334, 42334, 52445) have
* been chosen arbitrarily to keep ranges of used ports tight.
*/
std::unique_ptr<CBaseChainParams> CreateBaseChainParams(const std::string& chain)
Expand Down
2 changes: 1 addition & 1 deletion src/devcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static void SetupCliArgs(ArgsManager& argsman)
argsman.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcwait", "Wait for RPC server to start", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcwaittimeout=<n>", strprintf("Timeout in seconds to wait for the RPC server to start, or 0 for no timeout. (default: %d)", DEFAULT_WAIT_CLIENT_TIMEOUT), ArgsManager::ALLOW_INT, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to devcoind). This changes the RPC endpoint used, e.g. http://127.0.0.1:8332/wallet/<walletname>", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to devcoind). This changes the RPC endpoint used, e.g. http://127.0.0.1:52332/wallet/<walletname>", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-stdin", "Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases). When combined with -stdinrpcpass, the first line from standard input is used for the RPC password.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-stdinrpcpass", "Read RPC password from standard input as a single line. When combined with -stdin, the first line from standard input is used for the RPC password. When combined with -stdinwalletpassphrase, -stdinrpcpass consumes the first line, and -stdinwalletpassphrase consumes the second.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-stdinwalletpassphrase", "Read wallet passphrase from standard input as a single line. When combined with -stdin, the first line from standard input is used for the wallet passphrase.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
Expand Down
4 changes: 2 additions & 2 deletions src/rpc/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ std::string HelpExampleCliNamed(const std::string& methodname, const RPCArgList&
std::string HelpExampleRpc(const std::string& methodname, const 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:8332/\n";
"\"method\": \"" + methodname + "\", \"params\": [" + args + "]}' -H 'content-type: text/plain;' http://127.0.0.1:52332/\n";
}

std::string HelpExampleRpcNamed(const std::string& methodname, const RPCArgList& args)
Expand All @@ -184,7 +184,7 @@ std::string HelpExampleRpcNamed(const std::string& methodname, const RPCArgList&
}

return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\": \"curltest\", "
"\"method\": \"" + methodname + "\", \"params\": " + params.write() + "}' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n";
"\"method\": \"" + methodname + "\", \"params\": " + params.write() + "}' -H 'content-type: text/plain;' http://127.0.0.1:52332/\n";
}

// Converts a hex string to a public key if possible
Expand Down
2 changes: 1 addition & 1 deletion src/test/addrman_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ BOOST_AUTO_TEST_CASE(addrman_ports)
BOOST_CHECK(addrman.Add(CAddress(addr1, NODE_NONE), source));
BOOST_CHECK_EQUAL(addrman.size(), 1U);

CService addr1_port = ResolveService("250.1.1.1", 8334);
CService addr1_port = ResolveService("250.1.1.1", 52334);
BOOST_CHECK(!addrman.Add(CAddress(addr1_port, NODE_NONE), source));
BOOST_CHECK_EQUAL(addrman.size(), 1U);
CAddrInfo addr_ret2 = addrman.Select();
Expand Down
Loading

0 comments on commit c678a34

Please sign in to comment.