floblockchain / flo

The Flo Blockchain allows for 1080 bytes of arbitrary data storage on every transaction! FLO is an Archival Blockchain dedicated to long-term data storage and preservation. It offers a secure and decentralized platform for storing important information like public records, ensuring their integrity and accessibility over time.
MIT License
32 stars 21 forks source link

Regtest RPC should be available on port 17413 #17

Closed OstlerDev closed 4 years ago

OstlerDev commented 4 years ago

Can you reliably reproduce the issue?

Yes

If so, please list the steps to reproduce below:

  1. Startup regtest node with an RPC user and password
  2. Attempt to curl against port 17413 and observe it does not work
    root@regtest-flocore:/flocore# curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://x:password@127.0.0.1:17413/
    curl: (7) Failed to connect to 127.0.0.1 port 17413: Connection refused
  3. Attempt to curl against the testnet rpc port 17313 and observe it works
    root@regtest-flocore:/flocore# curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://x:password@127.0.0.1:17313/
    {"result":{"chain":"regtest","blocks":129,"headers":129,"bestblockhash":"016c1f8caf46ed479d3078f5857dff602d7ed72b47dc5c9eb83b46cebf8d1fe7","difficulty":4.656542373906925e-10,"mediantime":1580857031,"verificationprogress":1,"chainwork":"0000000000000000000000000000000000000000000000000000000000000104","pruned":false,"softforks":[{"id":"bip34","version":2,"reject":{"status":false}},{"id":"bip66","version":3,"reject":{"status":false}},{"id":"bip65","version":4,"reject":{"status":false}}],"bip9_softforks":{"csv":{"status":"defined","startTime":0,"timeout":999999999999,"since":0},"segwit":{"status":"defined","startTime":0,"timeout":999999999999,"since":0}}},"error":null,"id":"curltext"}

Expected behaviour

The regtest RPC should be available on port 17413

Actual behaviour

The regtest RPC is incorrectly available on port 17313

What version of flo-core are you using?

Latest master

Any extra information that might be useful in the debugging process.

When I was looking through Litecoins source, they have their p2p port on 19335 for testnet, and 19444 for regtest, and then they defined their rpc port as 19332 for testnet and 19443 for regtest. https://github.com/litecoin-project/litecoin/blob/master/src/chainparamsbase.cpp#L40 https://github.com/litecoin-project/litecoin/blob/master/src/chainparams.cpp#L318

The same thing is true about Bitcoin: https://github.com/bitcoin/bitcoin/blob/master/src/chainparamsbase.cpp#L43 https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L288