2

I have few questions related monero payment gateway.

1.) If I want to create more than one address in single wallet using JSON-RPC, then how to do it? I have created integrated address but it does not look like new address. Can you guide me for this?

2.) I have installed monerod in Linux and when i tried to run with testnet rpc wallet then it is getting error.

2018-03-05 05:00:03.698 [P2P0]  WARN    global  src/cryptonote_core/cryptonote_core.cpp:1283    Last scheduled hard fork time shows a daemon update is needed now.
2018-03-05 05:00:03.698 [P2P0]  WARN    global  src/cryptonote_core/cryptonote_core.cpp:1284    **********************************************************************

When I Tried to run ./monerod --testnet then it is getting this error:

2018-03-05 05:25:43.226 [P2P0]  WARN    global  src/cryptonote_core/cryptonote_core.cpp:1282    **********************************************************************
2018-03-05 05:25:43.227 [P2P0]  WARN    global  src/cryptonote_core/cryptonote_core.cpp:1283    Last scheduled hard fork time shows a daemon update is needed now.
2018-03-05 05:25:43.227 [P2P0]  WARN    global  src/cryptonote_core/cryptonote_core.cpp:1284    **********************************************************************
2018-03-05 05:25:44.363 [P2P0]  WARN    net.dns src/common/dns_utils.cpp:487    WARNING: no two valid MoneroPulse DNS checkpoint records were received

I have wait 30 mins but still no sync has started. Can you guide me on it?

Then After I tried to run below command and it is getting error:

./monerod --testnet --log-level 1,*msg*:INFO

error

2018-03-05 05:31:09.252 [P2P1]  WARN    global  src/cryptonote_core/cryptonote_core.cpp:1282    **********************************************************************
2018-03-05 05:31:09.252 [P2P1]  WARN    global  src/cryptonote_core/cryptonote_core.cpp:1283    Last scheduled hard fork time shows a daemon update is needed now.
2018-03-05 05:31:09.252 [P2P1]  WARN    global  src/cryptonote_core/cryptonote_core.cpp:1284    **********************************************************************
2018-03-05 05:31:09.877 [P2P3]  WARN    net.p2p src/p2p/net_node.inl:1629   [5.9.100.248:28080 OUT] COMMAND_REQUEST_SUPPORT_FLAGS invoke failed. (-3, LEVIN_ERROR_CONNECTION_DESTROYED)
2018-03-05 05:31:10.416 [P2P1]  WARN    net.dns src/common/dns_utils.cpp:487    WARNING: no two valid MoneroPulse DNS checkpoint records were received
2018-03-05 05:31:12.520 [P2P2]  WARN    net.p2p src/p2p/net_node.inl:1629   [212.83.175.67:28080 OUT] COMMAND_REQUEST_SUPPORT_FLAGS invoke failed. (-3, LEVIN_ERROR_CONNECTION_DESTROYED)
2018-03-05 05:31:15.261 [P2P3]  WARN    net.p2p src/p2p/net_node.inl:1629   [212.83.172.165:28080 OUT] COMMAND_REQUEST_SUPPORT_FLAGS invoke failed. (-3, LEVIN_ERROR_CONNECTION_DESTROYED)

I am using this command for run testnet for RPC:

./monero-wallet-rpc --testnet --rpc-bind-port 1822 --disable-rpc-login --daemon-address 127.0.0.1:28081 --wallet-dir /home/kiran/monero

Please help me about it.

3
  • Can anyone help on it? Commented Mar 5, 2018 at 14:19
  • Responded. If you feel like it sufficiently answered your question, please mark it as such.
    – dEBRUYNE
    Commented Mar 5, 2018 at 16:34
  • Thanks, @dEBRUYNE for your best reply. it is really up to the marked answer. Commented Mar 6, 2018 at 4:46

1 Answer 1

2

The current release only allows for one address per wallet. In other words, one has to create multiple wallets in order to get multiple unlinkable addresses (integrated addresses created in the same wallet share the same plain address). Fortunately, the notion of subaddresses materialized and was implemented. They will be included in the next release. Currently, to utilize subaddresses one has to use binaries compiled from master. Note that both the sender and receiver need to binaries compiled from master to properly utilize subaddresses.

1.) If I want to create more than one address in single wallet using JSON-RPC, then how to do it? I have created integrated address but it does not look like new address. Can you guide me for this?

To properly answer this question, we first have to briefly explain how subaddresses work in the wallet. Basically, one can have multiple accounts that each have their own subaddresses. A new wallet will start with the primary address, which has index 0/0 (the first number is the account index, whereas the second number is the subaddress index). Now, if you create a new subaddress on the primary account, it will have index 0/1. You can, however, also opt to create a new account (which is basically a subaddress itself). This new account will then have index 1/0. If, subsequently, you create a new subaddress on this account, it will have index 1/1. The following subaddress will have index 1/2. You probably get the idea by now.

Now, if you want to create a new account, you'd have to use the create_account RPC call. Aforementioned code tells us that the (optional) input is label (as a string) and the outputs are account_index (as an unsigned integer) and address (as a string and this address has index n/0, i.e., the 0-th address). The JSON RPC call is then utilized as follows:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_account","params":{"label":""}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "account_index": <insert-account-index>
    "address": "<insert-subaddress>"
  }
}

To create a new subaddress, one has to use the create_address RPC call. Aforementioned code tells us that the inputs are label (optional and as a string) and account_index (as an unsigned integer) and the outputs are address (as a string) and address_index (as an unsigned integer). The JSON RPC call is then utilized as follows:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_account","params":{"label":"","account_index":<insert-account-index>}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "address": "<insert-subaddress>"
    "address_index": <insert-subaddress_index>
  }
}

2.) I have installed monerod in Linux and ran into issues when i tried to run with testnet rpc wallet

The root cause of your issues is that you're running release binaries, which can currently not properly sync on testnet, as the testnet seednodes are running master binaries. Thus, to resolve your sync and connection issues, you ought to compile binaries from master and use those. Instructions on compiling Monero from source can be found here. Two more notes:

Last scheduled hard fork time shows a daemon update is needed now.

This message can be ignored until a new version is out (we're using version 0.11.1.0 at the time of writing).

2018-03-05 05:25:44.363 [P2P0] WARN net.dns src/common/dns_utils.cpp:487 WARNING: no two valid MoneroPulse DNS checkpoint records were received

This warning can also be safely ignored:

What is a "[P2P0]WARNING: no two valid MoneroPulse DNS checkpoint records were received" warning?

What is MoneroPulse?

P.S. More information about subaddresses can be found here:

https://monero.stackexchange.com/questions/tagged/sub-address

2
  • If I want to fetch all addresses using json_rpc so, which method i want to use? Commented Mar 6, 2018 at 6:33
  • You can use either of those -> get_address, get_balance, and get_accounts. Inputs and outputs can be found here.
    – dEBRUYNE
    Commented Mar 6, 2018 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.