How to create multiple addresses in a single wallet using Monero-JSON-RPC? 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.

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


Transaction fees are very high for small transactions Transaction fee are currently fixed (around 0.002 XMR/kB) which is penalising for small transaction (0.026 XMR/TX). Buying an item for 0.2 XMR incurs a transaction fee of 13% which I would call confiscatory.

I understand that the current system is there to prevent the network from being spammed with loads of small transactions. But it is also detrimental to genuine users of the network.

A transaction fee that is a percentage of the transaction (say 0.1%) would go a long way to improve user-friendliness.

Is there no method to prevent spamming other than setting a minimum absolute amount of fee?

Transaction fee are currently fixed (around 0.002 XMR/kB) which is penalising for small transaction (0.026 XMR/TX). Buying an item for 0.2 XMR incurs a transaction fee of 13% which I would call confiscatory.

Still cheaper than Bitcoin :) But yeah, they're high.

  A transaction fee that is a percentage of the transaction (say 0.1%) would go a long way to improve user-friendliness.

Please no. Why should someone with more pay more fee? He costs the network the same in terms of bandwidth / storage, and the only difference is the value of some bits in a transaction. Also, you can't really enforce this because you don't know the amount being transacted in the first place. If you just set it as default an trust the sender to follow it, it would kind of leak the amount being transacted, which we really don't really want.

  Is there no method to prevent spamming other than setting a minimum absolute amount of fee?

Some PoW just to submit a TX could work as well, but then why would miners bother to include TX-es in a block? Might as well mine empty ones. But, our problem with fees has other causes, and needs some adjustments, I believe. We have dynamic block size and dynamic minimum fee. Now, this is a dynamic minimum fee, so you expect it to be cheap, but at the present it's not really, so why is this?

Non-RCT TX-es could be 1-2kB, so that means 12x to 6x lower fee/TX. For those, both formulas worked well. You could squeeze 30 TX-es in a block, if there's demand in the mempool you could make it 31 and have a 3.3% increase which would easily be covered by even the min. fee. However, a 20% increase in block size would not be economic for the miner, unless people paid multipliers of min. fee. This is designed only for peak times. If there's organic growth, that cheap 3.3% increase could make block size slowly creep up. If you study the 2 formulas, you will find that this would also make the min. fee you pay per TX slowly decrease.

However, introducing RCT made a one-time bump in TX sizes, but the formulas were not changed together with this. Now, you can squeeze only 5 TX-es in a block, and if there's some demand, adding just 1 more TX means an increase of 20% in block size, which comes with a big penalty! It acts as a kind of wall which makes it hard to kick-off block size dynamics. This is the source of the problem. There was one proposal to address this by tweaking some parameters in the dynamic formulas, which ought to bring the min. fees down and fix the relations.

Edit 2017-06: The above problem was fixed in the April HF by increasing the min. penalty-free blocksize to 300kB, and it will be further alleviated by reducing TX size (estimated to 50%) with range proofs optimizations bringing TX size/penalty-free blocksize down to 2.3% from the above 20% which was the root cause of issues.


Number of private keys that have been used on the Monero network Rich lists are impossible to produce with Monero.

Is it still possible to determine the total number private keys have ever been used to control available outputs on the network?

Obviously the number cold storage wallets that were created offline and have never been used is unknown. Counting the number of available outputs and combining that with prior transaction data can we somehow determine how many how many private keys control (or previously controlled) those outputs?

No, or it'd be a break of the crypto.
Poloniex can probably get a lower bound (probably much lower than the real number), since it's the main Monero exchange and has been for a long time. But from the blockchain, no. Every single output on the blockchain is on its own one time address, and can't be attached to a standard address without that standard address' private view key.


What exactly do miners communicate with a pool? What JSON messages are exchanged with the pool, and how does one connect to a pool? With mining.subscribe? I read somewhere that the stratum protocol that CryptoNote coins use is different to, say, sha256 coins. I am currently trying to develop a Python CryptoNote miner.

Monero pools all (to my knowledge) use (roughly) the following payloads:

{
    "method": "login",
    "params": {
        "login": "wallet_address",
        "pass": "pool_pass",
        "rigid": "",
        "agent": "user-agent/0.1"
    },
    "id":1
}

{
    "result": {
        "job": {
            "blob": "blob hex",
            "target": "target hex",
            "job_id": "job id"
        },
        "id": "login-id",
        "status": "OK"
    },
    "id":1
}

{
    "method":"submit",
    "params": {
        "id": "login-id",
        "job_id": "job-id",
        "nonce": "deadbeef",
        "result": "hash hex"
    },
    "id":1
}

{
    "result": {
        "status": "OK"
    }
    "id":1
}

{
    "method": "job",
    "params": {
        "blob": "blob hex",
        "target": "target hex",
        "job_id": "job id"
    },
    "id":1
}

The sensible way to get the exact payloads is to run a network capture while mining to a pool.

As for connection to the pool, this is done using a raw TCP socket to the pools address and port. Every payload is a single line of the whole JSON payload string ending with a linefeed character (\n).

Once connected with your socket, you first send the login payload. The pool will respond with the job result payload (or error). Mine the blob and send the pool a submit payload.

The pool at any time may send you method job payload. You should finish mining any existing job and then use that new job.

I have thrown together a fully working example of both a Python pool miner and a solo miner for you here.


Why isn't monero mining a widespread method to earn money on websites? Monero mining in the browser has been done by criminals without the consent of both hosts and visitors of hacked websites.
The method of earning money via ads in the internet has severe downsides for both hosts and visitors: hosts can only earn significant money if they know their audience well, and if their visitors do not use ad blockers. Visitors have to fear data breaches of very personal data. Hosts have to make extra effort concerning data security and evaluation.

Why aren't many more websites using monero mining as a tool to earn money (legitimately by announcing it)? I'm thinking about newspapers, video streaming like youtube, social networks, even stackexchange etc. I would be perfectly willing to give computing power and the energy cost in exchange for those services. Are there any downsides of mining vs ads except for the energy cost the visitor has to pay?

Bonus imaginary internet points for answers that also provide information about the expected gain per visitor per minute for both monero mining and using ads.

The short answer: Monero's RandomX PoW algorithm, is using low level functionality of your CPU, which can not be utilized from a web browser.


How to link Monero GUI wallet to Ledger Nano x windows 10 desktop - ledger-live-desktop-2.8.0-win. Installed all. GUI accounts set up and montero loaded. Just want to move crypto to ledger hardware wallet.

You need following things checked before you even start:

Ledger Nano X with the most fresh Firmware (IMPORTANT!). Check if there is an update in Ledger Live app. If there is, update the Firmware first.
The newest, Monero App installed on Ledger Nano X
Monero GUI installed on your computer

I personally, like to make "dummy" wallet first in Monero GUI (Just click Create New Wallet). By doing so you can fully synchronize the Node with blockchain before you even start playing with your hardware wallet. When Blockchain is fully synchronized on the Node, you can create a second wallet which will be "hardware" wallet.
Basically what you need to do is to follow the instructions below:

https://github.com/monero-ecosystem/monero-GUI-guide/blob/master/en/ch02.md
https://support.ledger.com/hc/en-us/articles/360006352934-Monero-XMR-

First is the instruction from Monero GUI Guide (There is pdf in your Monero GUI folder). Latter is instruction from Ledger support page. Both should help you connect your hardware wallet to Monero GUI.
When you are done, you can simply send your Monero to the wallet address which is visible in Monero GUI as well as on your Ledger Device (They should match).
In case of any trouble let us know.


Help with cryptonote-universal-pool for use with other cryptonotes besides Monero I'm hoping someone with a little more experience can help me with this pool I am setting up on a VPS for the CryptoNote DigitalNote (XDN).  I have the server up and running, node, wallet, daemon, redis all configured but I am running into an error when miners try to connect.  The VPS node init.js displays this error when a miner tries to connect:

http://i.imgur.com/5vh9yQK.jpg
Error: Failed to parse block at Object.BlockTemplate.nextBlob etc

I tried using LucasJones' version of cryptonote-utils as recommended here (cryptonote-universal-pool Stratum authentication failed) but that just introduces another error with address verification so it isn't fixing anything just covering up the block error.  I've been told that this may have to do with XDN adding merged mining and that it changed the block format.

Does anyone have any advice for getting this setup?  It's so close.  Thank you.

At least part of the solution might be in the answer below - address checking assumes Monero, and between various CryptoNote cryptocurrencies there are some differences in how addresses are made - see here for some explanation and you can try some XDN address in the tool to see how it is built - the difference is mainly in the network byte so any code dealing with addresses would need to be looked at and patched accordingly.

The second error is most likely due to an address being passed which doesn't match the expected format. This can be due to two reasons: either the address is really wrong (Monero addresses are 95 characters long, and start with a 4), or the pool's address being wrongly set (the pool will compare the first character of the miner address with the pool address' first character and expect the same).
The address validation code is at the end of lib/utils.js (isValidAddress). You can add traces to see which part of it fails.

With regards to merged mining support, I'm not aware of some ready-to-use solution and I don't know how to solve your problem (and I doubt many here have experience with XDN in particular, but maybe someone pops in with a better answer), it might be worthwhile to look into this pool released by the XDN team: https://github.com/xdn-project/cryptonote-universal-pool
Analyzing the difference between that one and the original might give some hints. Maybe that pool works out of the box - did you try that one as well?


Is it possible to have a full Monero node, a Monero testnet node, and an Aeon node all on the same VPS? I recently came across a great VPS deal (2 cores, 2GB RAM, 100GB SSD) and was wondering if its possible to install all three nodes on the same server? I don't know a lot about networking though. Will the ports clash or something? Are there any extra settings that would help with this setup?

Aeon has not yet integrated LMDB so the 2GB RAM is probably not enough. Although it should work (slower) if the swap is big enough.


"Failed to lock C:\ProgramData\bitmonero.daemon_lock" I am trying to run monerod.  After a few weeks. Getting this error.

2016-Nov-04 15:45:51.273766 Initializing cryptonote protocol...
2016-Nov-04 15:45:51.274768 Cryptonote protocol initialized OK
2016-Nov-04 15:45:51.275771 Initializing p2p server...
2016-Nov-04 15:45:51.720954 Set limit-up to 2048 kB/s
2016-Nov-04 15:45:51.721957 Set limit-down to 8192 kB/s
2016-Nov-04 15:45:51.721957 Set limit-up to 2048 kB/s
2016-Nov-04 15:45:51.721957 Set limit-down to 8192 kB/s
2016-Nov-04 15:45:51.728975 Binding on 0.0.0.0:18080
2016-Nov-04 15:45:51.728975 Net service bound to 0.0.0.0:18080
2016-Nov-04 15:45:51.728975 Attempting to add IGD port mapping.
2016-Nov-04 15:45:52.882042 Added IGD port mapping.
2016-Nov-04 15:45:52.882042 P2p server initialized OK
2016-Nov-04 15:45:52.882042 Initializing core rpc server...
2016-Nov-04 15:45:52.882042 Binding on 127.0.0.1:18081
2016-Nov-04 15:45:52.883045 Core rpc server initialized OK on port: 18081
2016-Nov-04 15:45:52.883045 Initializing core...
2016-Nov-04 15:45:52.890063 Failed to lock C:\ProgramData\bitmonero.daemon_lock
2016-Nov-04 15:45:52.891066 ERROR C:/msys64/DISTRIBUTION-BUILD/src/cryptonote_core/cryptonote_core.cpp:271 Failed to lock "C:\ProgramData\bitmonero"
2016-Nov-04 15:45:52.891066 Deinitializing rpc server...
2016-Nov-04 15:45:52.892069 Deinitializing p2p...
2016-Nov-04 15:45:52.902096 Deinitializing core...
2016-Nov-04 15:45:52.912122 Closing IO Service.
2016-Nov-04 15:45:52.912122 Failed to deinitialize core...
2016-Nov-04 15:45:52.913125 Deinitializing cryptonote_protocol...

Any idea whats causing it?

Most likely you were running it before and killed it uncleanly. Windows takes a few minutes to notice that the owner of a file lock has died, before it cleans up the lock.


Is it possible to create a lighter wallet than simplewallet without giving up a view key? In the question How much information is passed from the daemon to simplewallet when scanning for a wallet's transactions?, it was clarified that simplewallet receives the entirety of every block from the connected daemon in order to maintain the wallet's balance and tx history. This means that while a wallet does not need to maintain the entire blockchain, it does need to receive and scan the entire chain, though the newest version of monero-wallet-cli can fast-sync all blocks up to a certain height if it is known that there are no outputs in those blocks belonging to a wallet.

With the intention of designing the lightest possible wallet that keeps all keys (view key, spend key, etc) private, is there information that simplewallet currently receives that it does not always need (for example, if the transaction does not belong to a wallet) and therefore sending that information could have been avoided if designed to minimize data transfer? If so, what is the bare minimum information needed to find all of the outputs in the blockchain that belong to your wallet?

If it makes a difference, this can be answered from both the perspectives of the daemon being trusted and untrusted.

Most of the space in a block is transactions. Most of the space in transactions is signatures (especially with RingCT). The wallet doesn't actually verify signatures, the daemon does it (you're running your own daemon, right ?) Signatures are an obvious candidate for eliding when transmitting new data from the daemon to the wallet.

Pretty much all of the rest in a transaction is needed if the wallet keeps the keys, but it's not very much. The block data can be skipped, if you must. You lose things like timestamps, but hey, you want light.


Problems in generating LSAG KeyImage I am trying to generate LSAG KeyImage by myself in C which is K̃ = kπ*Hp(R).

And I take result of MiniNero as a reference..

def test_keyImage():
    private_key = "907cf0eb0e0bbd761a7ed9bc8777fa5530e8262792a3e718533a1a357a1e4199"
    public_keys = "a9931c8d70237a279b8d3181f947830f0c3a21032d22b5d6e81c3afeba51bb0c", "210330a31c3caab4087c19fbe770514e5e6b80eda552d1e5f8becabd12c4540e","824ec9615ece05e6f5707facd88abbfb79b32f97b6a68be5304b5b2dfc06df01"
    public_join = ''.join(pub)
    hashpj = MiniNero.cn_fast_hash(public_join)
    print(hashpj)

    HR = MiniNero.hashToPointCN(hashpj)
    print(HR)

The result:

hashpj:1dd1fdba911ce449e0d64ed4daf5ec7b9ab46465e7e60a4465e6c83f1152f332
HR:    996b4d50ed204c7f14b106c818a7268a9cd66166ff194e13beefb6880c8aac39

As code above, I join 3 public keys to form R and run with cn_fast_hash(), then using hashToPointCN() to get HR.
However, can not get the same value from my C code implement.

ge_p2 point;
ge_p1p1 point2;
ge_p3 point3;

uint8_t hash_result[32];
uint8_t final_res[32];

keccak(pub_keys, 96, hash_result, 32); //keccak(PSK, 32, result, 32);

for(i=0; i<32; i++){
    printf("%02x", hash_result[i]);}

ge_fromfe_frombytes_vartime(&point, hash_result);
ge_mul8(&point2, &point);
ge_p1p1_to_p3(&point3, &point2);
ge_p3_tobytes(final_res, &point3);

printf("\n");
for(i=0; i<32; i++)
    printf("%02x", final_res[i]);

The result:

1dd1fdba911ce449e0d64ed4daf5ec7b9ab46465e7e60a4465e6c83f1152f332
4543c4d7a442df56119ea1fa97eee1d0b8a2e485b48b3741f498bb63d2d593b3

From the result, we can see that keccak hash is right, but I can not get the same result as  what MiniNero.hashToPointCN() does.

Please help me on this problem, I am lost here...

Your tests are not the same.

If you look at the source for hashToPointCN, you will see:

def hashToPointCN(hexVal):
    u= hexToInt(cn_fast_hash(hexVal)) % q
    ...

It hashes the input.

So in your Python test, you are outputting the result of cn_fast_hash, which is being used as input to hashToPointCN, which is hashing again and then returning a result point.

Your C test is correct in that you are only hashing the input once.

Thus, if you amended your Python to:

HR = MiniNero.hashToPointCN(public_join)
print(HR)

You'd get the same result as the C version:

4543c4d7a442df56119ea1fa97eee1d0b8a2e485b48b3741f498bb63d2d593b3

As an FYI, you can see exactly how a key image is generated in the source code of Monero here: src/crypto/crypto.cpp#L481-L498


RingCT: What happens if accidentially decoy "Input + Output" sum up to 0? In Ring CT the validattors check whether there is one combination of "Output + Input", that sums up to zero. What happens if "Real-Input + Output" does not sum up to zero, but accidentally some other combination (using the decoy as input) does?

Think of ring signatures as rows. When a single input is being spent, there is a row for each possible input (all are decoy inputs except for one real input). Each row contains a proof that a particular input is being spent, and a proof that the sum of that encrypted input amount - all encrypted output amounts - fee = 0.

The way ring signatures work is that you can't tell which row contains the real proof, but you know for sure that one of the rows must contain a valid proof (and that the valid proof row correlates with the declared input key image). Because each proof applies to the entire row, you can't mix and match encrypted input values from one possible input with a spend of a different input in the ring.

In the case of multiple inputs, there is a ring signature for each real input. The spender generates a "pseudo-out" for each of those rings, which is a re-encryption of the value of the real input being spent (using a different 'blinding factor' so that you can't tell which original encrypted input value this a re-encryption of). These pseudo-outs are declared by the spender as part of the  transaction. Each row also proves that the declared psuedo-out is an encryption of the same value as the original encrypted input amount value for the input in that row. It is also  then proven that the sum of all "pseudo-out" re-encrypted input amounts - all encrypted output amounts - fee = 0. Again, only the proof contained in one row of each ring signature is the genuine proof, and you can't tell which row this is.


Help me with digest authentication using java So i am trying to authenticate myself to the monero-rpc-wallet, the server requires me to use digest authentication.

If my username is: Alladin and password: open sesame

The www-authenticate header looks like this:

    WWW-Authenticate: Digest qop="auth",algorithm=MD5,realm="monero-wallet-rpc",nonce="hHQVNuEdyZszjmEPwS/jkQ==",stale=false
Digest qop="auth",algorithm=MD5-sess,realm="monero-wallet-rpc",nonce="hHQVNuEdyZszjmEPwS/jkQ==",stale=false

And my java code to implement it looks like this:

connection.addRequestProperty("Authorization", "Digest [don't know what goes here]");

The place where i put "don't know what goes here", can someone go through the steps in showing me what i need to put in there?

If i figure this out i can build a nice java library that communicates with the wallet-rpc that has authentication built it. Right now i am able to build the library without this authentication because i don't know how to do it, but would much prefer to have the added security of authentication.

I took a look over here: https://en.wikipedia.org/wiki/Digest_access_authentication and from how I understand it you must do the following

Get the nonce and realm from that first message:

  algorithm=MD5,realm="monero-wallet-rpc",nonce="hHQVNuEdyZszjmEPwS/jkQ=="

Then use the following flow:

HA1=MD5(MD5(username:realm:password):nonce:cnonce) //cnonce is a client nonce
HA2=MD5(method:digestURI)
response=MD5(HA1:nonce:HA2)

Your response would look something like:

import java.security.*;

..

java.security.SecureRandom random = java.security.SecureRandom.getInstance("SHA1PRNG");
random.setSeed(System.currentTimeMillis());
byte[] nonceBytes = new byte[16];
random.nextBytes(nonceBytes);

String clientNonce = new String(org.apache.commons.codec.binary.Base64.encodeBase64(nonceBytes), "UTF-8");
String serverNonce = "hHQVNuEdyZszjmEPwS/jkQ==";

String HA1String = "aladdin:monero-wallet-rpc:open sesame";
String HA2String = "GET:<your-uri>";
byte[] ha1Bytes = HA1String.getBytes("UTF-8");
byte[] ha2Bytes = HA2String.getBytes("UTF-8");

MessageDigest md = MessageDigest.getInstance("MD5");
String HA1_1 = new String(md.digest(ha1Bytes)) + ":" + serverNonce + ":" + clientNonce;
byte[] ha1_1 = HA1_1.getBytes("UTF-8");

String HA1 = new String(md.digest(ha1_1);
String HA2 = new String(md.digest(ha2Bytes));

String HA1nonceHA2 = HA1+ "hHQVNuEdyZszjmEPwS/jkQ==" + HA2;
byte[] ha1nonceha2bytes = HA1nonceHA2.getBytes("UTF-8");

String responseVal = new String(md.digest(ha1nonceha2bytes));

String response = "Digest "+
                 "username=\"aladdin\",\r\n"+
                 "realm=\"monero-wallet-rpc\",\r\n"+
                 "nonce=\"" + serverNonce + "\",\r\n"+
                 "uri=\"" + <your-uri> + "\",\r\n"+
                 "qop=auth,\r\n"+
                 "nc=00000001,\r\n"+ //Increment this each time.
                 "cnonce=\"" + clientNonce + "\",\r\n"+
                 "response=\"" + responseVal + "\""

connection.addRequestProperty("Authorization", response);

That should at least get you close. Remember null checks etc.


Getting balance of my address connecting to a remote node via RPC API? I'm looking to build a Monero web wallet, but I'm not sure how to go about querying the remote Monero nodes to get an updated balance of an address. Let's say I have the Monero private keys, how do I get the balance from a remote RPC API Monero node? What is the API call I need to make? Is there an example of how this is done?

You'll want to use the monero-wallet-rpc. Documentation for the API methods are here.

Note, this is a different application than the main Monero daemon monerod.

UPDATE based on comments:

If you don't want to work with wallet files you will need to implement something like this. You'll see it invokes a daemon RPC method /get_address_info with parameters address and view_key.


Method not found using Monero JSON-RPC in PHP Fatal error: Uncaught RuntimeException: Request have return error: Method not found; Request: {"jsonrpc":"2.0","method":"getblockcount","params":null,"id":1}; in jsonRPCClient.php:166

I don't know what to do. I started monero-wallet-rpc on the port and configured the example.php with port, localhost, username and password.
First I was running with no-rpc-auth and it gave me same error, then I deleted that argument and launched and told me unauthorized, then I edited the example.php and same error is up.
I also launched monerod in screen.

getblockcount is a daemon RPC, but you mention monero-wallet-rpc mostly. It is likely you are trying to call this RPC on the wallet, not on the daemon, and the wallet rightfully errors out.


How does the code for scalar reduction work? In this piece of code:

https://github.com/monero-project/monero/blob/master/src/crypto/crypto_ops_builder/ref10CommentedCombined/sc_reduce.c#L35

We reduce a scalar by mod l.

what is the significance of these numbers:

  s11 += s23 * 666643;
  s12 += s23 * 470296;
  s13 += s23 * 654183;
  s14 -= s23 * 997805;
  s15 += s23 * 136657;
  s16 -= s23 * 683901;

The constants 666643,470296...


Daemon sync never starting - can't receive my funds I'm pretty new to Monero and I've checked many FAQ's or forums to solve this issue, but I can't find a good answer. I've recently bought some Monero coins on Agoradesk. Sent it to my Monero GUI wallet, but it keeps saying : "Waiting for Daemon to sync". I have already disabled my firewall settings, VPN out...etc
I also find this message in the log :
[6/04/21 14:03] 2021-04-06 12:03:03.403 I Monero 'Oxygen Orion' (v0.17.1.9-release)
Error: Couldn't connect to daemon: 127.0.0.1:18081
How can I solve the issue and get my funds?

Your wallet version is up to date. Your wallet is telling you it can't reach the daemon.
To see why the demon fails to start, check the $HOME/.bitmonero/bitmonero.log, you should have information about any error at the end of it. You might have to add "--log-level 1" in the wallet settings page as daemon parameters to get more verbosity in the daemon logs.


For what reason could I use the monerod 'ban' command? For what reason could I use the monerod 'ban' command?
What harm can it prevent?

If you run an instance of monerod with internet open bind ports, you may want to ban ips that are malicious or suspecious, like one trying a DOS attack or a node running a buggy version.

Dropping the packet based on its IP, before parsing it, drastically reduces the load on the server and the attack surface.


What is the difference between simplewallet, wallet and wallet2? There seems to be 3 variations of wallets in the Monero code.

I could not find "wallet" so I'm unsure it exists, unless wallet2 refers to being a second wallet but not a simple one?

What is the difference between simplewallet, wallet and wallet2?

simplewallet.[cpp|h] is the source code for the command-line wallet monero-wallet-cli.

wallet2.[cpp|h] is the source code for the core wallet functionality. simplewallet therefore makes heavy use of this.

  There seems to be 3 variations of wallets in the Monero code.

No, there are only two wallets in the source tree. There is the command-line wallet, monero-wallet-cli, as detailed above and the wallet RPC server, monero-wallet-rpc. Both of these are simply wrappers around the core wallet functionality as implemented in wallet2.

There is also an optional wallet API library that can be built (source in the wallet/api directory) which is designed to allow for a simpler interface to the core wallet code), and there is also some old "light" wallet library code, but consensus seems to be that this is unused by anything and is therefore redundant now.


Why is the viewkey able to track incoming transactions, but not outgoing transactions? This question basically boils down to why can't we have a single key that we can publish, such that an auditor could see incoming transactions, outgoing transactions, and thus a balance of a certain account.

To answer this question, we first have to explain how Monero works. The letters used in this answer correspond to the letters used for the math in the CryptoNote whitepaper. Note that scalars (private keys) are always represented by lowercase letters in equations and points (public keys) are always represented by uppercase letters.

In Monero you have two set of keys, namely the private view key (a) and the private spendkey (b), and the public view key (A) and public spend key (B). The public view key (A) and public spend key (B) are the counterparts of the private view key (a) and private spend key (b). That is, the private view key and private spend key are multiplied by the base point (G) to create their counterparts, the public view key (A = aG) and public spend key (B = bG). The public keys are needed to generate a public address. A detailed explanation of how this is done can be found here, but is irrelevant for this question. The view key that we can publish is known as the tracking key (a,B) in the CryptoNote whitepaper.

To illustrate how this view key works, we first have to explain how transaction outputs work in Monero. In Monero, coins are received to a unique, one-time stealth address. The formula for stealth addresses is as follows:

P = Hs(rA)G + B

Where:

P -- the final stealth address (one-time output key, the destination where funds will actually be sent);
Hs* -- a hashing algorithm that returns a scalar (i.e., the hash output is interpreted as an integer and reduced modulo l);
r -- the new random scalar Alice chose for this transaction;
A -- Bob's public view key;
G -- the standard Ed25519 base point;
B -- Bob's public spend key.

Stealth addresses are created as follows. First, the sender (Alice) does ECDH (Elliptic curve Diffie–Hellman) with her randomly-chosen r and the receiver's (Bob) public view key, A. This is point D (D = rA), which is a shared, secret point known only to Alice and Bob (D = D'). Thus, no one other than Alice or Bob is able to compute D. Second, Alice uses D to generate a new scalar, f, with f = Hs(D). Third, Alice computes F = fG. Lastly, Alice computes P = F + B (Bob's public spend key). Note that F is equal to Hs(rA)G in the formula above. Also Alice computes R by multiplying r by G, the curve's base point, (R = rG) and attaches it to the transaction.

If Bob receives a transaction, he wants to check if it belongs to him. This is done as follows. First, Bob retrieves R, which Alice has attached to the transaction. Second, Bob computes D'. In this step Bob doesn't (yet) know if D' is equal to D. D' = aR. Third, Bob computes f' = Hs(D'). Fourth, Bob computes F' = f'G. Fifth, Bob computes P' = F' + B. Lastly, Bob checks if P' is equal to P, which was included in the transaction as the destination. If P' = P the transaction output belongs to Bob.

From the aforementioned formula and explanation we can infer that, if an auditor knows a and B of Bob, he is able to compute aR (= D') for every transaction on the blockchain. Given that he also knows B, he is able to compute all stealth addresses for Bob (P) and thus is able to view all transactions and corresponding amounts Bob has received. Thus, the view key is able to track all incoming transactions for the corresponding account.

If Bob receives a transaction that belongs to him, he also wants to check if the outputs in this transaction have already been spent. This is done as follows. First, Bob recomputes f' = Hs(D') (as above). Second, Bob derives x = f' + b (to reiterate, b is Bob's private spend key). Third, to check if P is spent, Bob computes its "key image" and queries the blockchain to see if it is marked as spent. Key image = I = xHp(P). Lastly, to spend P, Bob needs to sign a new transaction with x.

From these steps we can infer that key images require the private spend key of Bob. Thus, if we want to track key images of a certain account (and thus the outgoing transactions), we would have to give the auditor our private spend key as well, which means he can also spend our funds! However, Bob would be able to retrieve the key images from the wallet and publish them, since an auditor wouldn't be able to derive the private spend key from the key images. This is a benefit of asymmetric cryptography. An auditor could subsequently query the blockchain to see which of Bob's published key images has been spent. Furthermore, he is able to compel Bob to publish corresponding key images for all outputs Bob has received. Given that he can also see all incoming transactions with the view key, he would be able to compute a balance for Bob's account.

I acknowledge this answer is quite technical and would certainly understand if you don't fully grasp it. It's quite difficult to answer this question in a less technical way. However, if you read the excellent articles of core-team member luigi1111, you would probably be able to understand. Most of this answer is based on his articles, hence.

P.S. luigi1111's articles can be found here:

https://steemit.com/monero/@luigi1111/understanding-monero-cryptography-privacy-introduction

https://steemit.com/monero/@luigi1111/understanding-monero-cryptography-privacy-part-2-stealth-addresses


Would it be possible to use PoS on Monero without corrupting privacy and if possible how? Is there a possibility of zero-knowledge proof of stake without disclosing your balance?

It is possible to generate a proof of balance (reserve proof), which states you own at least the claimed amount.
See rpc doc about it.
So theoretically, it is possible.


Is it true that ledger nano s can only store monero and one other coin? I read somewhere that ledger nano s can only store monero and 1 other app due to space limitations on the device. Monero takes alot of space on the device and only one other app can be used. What other hardware wallets are in the works for monero integration?

I have Bitcoin, Ethereum, and Monero but now there's no more space. So, well, it's 3 at least.


Can you have a multsig wallet with the current Monero protocol? Can you create a bitcoin-style multisig wallet in Monero in the current protocol?

You would have n participants, such that k of them can authorize a transaction.

Yes. Essentially, you can split up the private spend key according to a (k,n)-secret sharing scheme. Then any k participants can collect the keys together to recreate this private spend key and then sign transactions.

Now the question is, how is the key generated, how are the shares generated, and who/what brings the shares together.

One simple way is this have a trusted dealer generate the key and distribute the shares, and a trusted signer to collect the shares and sign transactions. If you are doing this for your own cold storage uses, this should be sufficient.

If you don't want a trusted signer, you can use secure multi-party computation. You can have a transaction X, and then k participants can do a computation that signs X. By the properties of Secure multi-party computation, the shares won't be revealed, and the only thing computed is a signature for X. In this way, the k participants don't have to trust any central signer, or even each other.

If you don't want a trusted dealer, you can again use secure multi-party computation. In particular, you can design an algorithm that produces a spend-key, produces shares of it according to the secret sharing scheme, and then encrypts each share with a public key of a participant, P_n. This algorithm requires a certain amount of random data r. The m dealers each generate their own random data or entropy r_i, and do the above computation using r = the xor of all the r_i. As long as one dealer chooses a random r_i and then destroys that r_i, r can not be calculated. These m dealers can be the n participants, although in practice you would probably only need k of the participants to be dealers, since they have spend power anyways.

By using both of these suggestions, this multisig scheme is as powerful as a bitcoin style multisig. It can actually be implemented in any cryptocurrency, regardless of protocol. It actually is a little bit better than a bitcoin multisig because:

It is indistinguishable from a monero address, helping to protect privacy. (Bitcoin miners and nodes which actually ignore multisig transactions with too many participants).
The above property also makes this cheaper as well, since transactions to and from an address are the same size regardless of whether its multisig or not.

Unfortunately, I don't know any software that implements this yet. It would make a good project, if anyone's up for it.

EDIT: Just found the fair play project. It can be used for secure multiparty computation.


How can someone run all blockchain and check if certain block has tx belonging to viewkey Based on JAXX problem in integrate the monero wallet on their service I was wonder how can one run all the blockchain and check the blocks for belolonging TX from certain viewkey
Is there any avaliable script with this function ?

A certain account will always scan all blocks to look if any transactions belong to it, i.e., if P' = P* (note that P is a stealth address). As you may have already noticed, this will be quite resource intensive. Therefore, services like MyMonero usually use high end servers to do this. In addition, they charge a fee (such as the import fee in case of MyMonero) to cover some of the costs.

*A more extensive explanation can be found below and is taken from luigi1111's article:

  Now let's look at Bob's perspective:

  Bob receives a transaction; he wants to check if it belongs to him.
  Bob retrieves R, which Alice has helpfully attached to the transaction.
  Bob computes D'. Note Bob doesn't (yet) know if D' is equal to D. D' = aR.
  Bob computes f' = Hs(D').
  Bob computes F' = f'G.
  Bob computes P' = F' + B.

  Bob checks if P' is equal to P, which was included in the transaction as the destination. If yes, Bob realizes he's been paid and does some additional steps (below). If no, Bob ignores the transaction.

To add, I'll clarify some of the letters used in the quote above. In addition, the view key that we can publish is known as the tracking key (a,B) in the CryptoNote whitepaper.

R = Public transaction key

D = Shared secret that is only known to Alice (sender) and Bob (receiver)

Note that D = rA (private tx key (r) times public view key (A) from Bob), whereas D' = aR (private view key (a) times public transaction key (R) that was included by Alice)

Hs = Hash to scalar, i.e., a hashing algorithm that returns a scalar (private key).

G = The Ed25519 base point

B = Bob's public spend key

  Is there any avaliable script with this function ?

You can simply type payments <payment_ID> into the wallet to see all transactions belong to that account. If you need to check for payments programmatically, then see below from the "Accepting Monero Payments" page:

  Checking for a Payment Programatically

  In order to check for a payment programatically you can use the
  get_payments or get_bulk_payments JSON RPC API calls.

  get_payments: this requires a payment_id parameter with a single payment ID.

  get_bulk_payments: this is the preferred method, and requires two parameters, payment_ids - a JSON array of payment IDs - and an
  optional min_block_height - the block height to scan from.

  An example of returned data is as follows:

  It is important to note that the amounts returned are in base Monero
  units and not in the display units normally used in end-user
  applications. Also, since a transaction will typically have multiple
  outputs that add up to the total required for the payment, the amounts
  should be grouped by the tx_hash or the payment_id and added together.
  Additionally, as multiple outputs can have the same amount, it is
  imperative not to try and filter out the returned data from a single
  get_bulk_payments call.

  Before scanning for payments it is useful to check against the daemon
  RPC API (the get_info RPC call) to see if additional blocks have been
  received. Typically you would want to then scan only from that
  received block on by specifying it as the min_block_height to
  get_bulk_payments.

  Programatically Scanning for Payments

  Get the current block height from the daemon, only proceed if it has    increased since our last scan
  Call the get_bulk_payments RPC API    call with our last scanned height and the list of all payment IDs in    our system
  Store the current block height as our last scanned height
  Remove duplicates based on transaction hashes we have already    received and processed

Some background information that may come in handy when you are trying to understand this Q&A on a deeper, more technical level:

1     What is a stealth address?

[2]     Constructing a Stealth Monero Address?

[3]     Examples of real stealth address from the blockchain

[4]     Why does the stealth address involve a hash function?

[5]     Mandatory vs optional stealth address use

[6] Why is the viewkey able to track incoming transactions, but not outgoing transactions?

[7] What are the "public" viewkeys and spendkeys?

[8] https://github.com/TheKoziTwo/xmr-integration


How can I spend coins if other people can't see my balance? So I have 5 monero, but if nobody else can see my balance, how can I prove that these coins are in my posession, and that they have not been spent yet.

I just fail to see how Monero can ensure that without the ability to view either a list of transactions or balances.

If I understand correctly, I can see my received transactions with my viewkey, and my sent transactions with my spendkey, but how can I prove that the coins have not been spent before if I don't disclose my spendkey?

I understand most of Bitcoin transactions and I have a more than basic understanding of encryption and how public and private keys work.

Also, please link easy-to-understand posts about the security of monero.

When you have 5 monero it actually means that you have some unspent outputs with the total value being 5 monero. Those outputs are actually one-time use containers and you always empty them completely to make new ones.

So, if you had 5 monero in a single container, when sending 3 monero to someone, you'd empty your original container and create new ones of 3+2; one for the recipient and one for you. The recipient's wallet is then able to recognize (using private view key) and access the corresponding one-time private key (using private spend key) to the corresponding container(s).

Spending actually means using the one-time private key to sign to empty some container, which gives you the right to create new containers of the same value. The network doesn't check that it's full because it doesn't know which container you're emptying (it's hidden among other containers in the ring signature - the network can't know from which one you "took"). Instead, the network does check that you don't take from the same one 2 times, which effectively prevents double-spends but still keeps the "real" container hidden among other ones used in the ring signature. The mechanism for this is called a key image, and it's described here: What is a key image?


How are spend/out/in proofs sent to verifiers? I am currently reading the Zero to Monero book, section 8.1.2/8.1.3/8.1.4. I am unable to understand how these proofs work. Each section talks about generating a signature, however, the tx structure does not store them in the MG field (or do they?). So how can the verifiers know about these proofs?

You can use email, or a USB stick, FTP, pastebin sites... It doesn't matter how you send that information, as long as it arrives verbatim.
The wallet saves the proofs as binary by default, but if you're going to transfer that data via text protocols which aren't 8 bit clean, you can switch it to ASCII export (using "set export-format ascii" in monero-wallet-cli).
These proofs should not be in the transactions, otherwise they'd necessarily be public, which would defeat the purpose of being private by default while being to prove particular things to a particular party.


Will Monero suffer the transaction fee problem like Bitcoin? Currently, BTC has a problem with small transfers, i.e sending £1 will cost £4 which is just ridiculous. Will XMR ever have the same problem? I know LTC have sloved this issue and Bitcoin cash has also solved this issue?

Assuming the block sizes and average block times are given, a cryptocurrency has a well defined maximum average throughput byte-wise. It's true for  Bitcoin (and its forks, of course). See the edit for Monero block sizes - they aren't limited, but the miners are discouraged from increasing them too fast. Assuming all the transactions are of roughly same size, there is a maximum throughput in transactions per second. It gets higher if blocks are bigger, or transactions are smaller, or blocks are more frequent.
Now suppose we hit this maximum in terms of announced transactions per second, and miners can't fit all the announced transactions into blocks. The rational behavior for miner, given a constant block size, is to include the transactions with highest fee per byte (that's why they don't care that you "only" try to send £1 - this transaction is as big in terms of bytes as sending £1,000,000). In Bitcoin, the maximum theoretical average is ~10 tx/s, and on practice it's even lower as many transactions aren't of a minimum size. Once the currency got popular enough, the demand arguably got bigger than that. Note that some people claim that the transaction pool was spammed  during the discussion on bigger blocks, exactly to make a point that this problem is real - whether or not it is true, I don't know.
Bitcoin Cash aims to solve this problem by having bigger blocks. Essentially, they solved it by not having that high of a demand for transactions. Litecoin has much higher blocks frequency, as well as lower demand for transactions.
Monero is in a good place in terms of fees per byte, but the bytes per transaction ratio is relatively high (cost of anonymity). It is actively worked on - with Bulletproofs, the transactions will get much smaller. It may not change fees per byte, but it greatly reduces fees per transaction - which is relevant in scope of your question.
Monero can get the same problem as the one recently encountered by Bitcoin, if the demand for transactions suddenly goes far beyond the throughput of the system. It doesn't seem to be the case as of now.

Edit: This is a simplified explanation without considering Monero dynamic block size algorithm. The described trade-offs seemingly still apply, so leaving it for now.


How does Monero help people in developed countries? Monero prides itself on being the best option (according to many) for transaction privacy. Do people really care?

When people make purchases today online or in store, a large, increasing number pay with a credit/debit card. While some people do not have access to credit cards for certain reasons, debit cards are readily available and work almost anywhere.

A consumer does not need to worry about their neighbors finding out what they buy with their cards. Neighbors already do not have access to my Amazon search history. They can only guess the person's income.

If a consumer walks into a store, the store won't reasonably use the consumer's address or personal information beyond making the initial transaction. Online, sites like Amazon can build a profile of someone based on my purchasing habits, but Monero won't really solve this problem since Amazon will still have users log in to their personal account.

Most stores do not charge people more money for paying with a card instead of cash. If there is ever a dispute of charges, a cardholder can call the bank and have the stolen funds transferred back immediately.

From a consumer perspective, using Monero, even if a phone wallet existed, is not any easier than the system that already exists.

The real question is, what value does Monero offer to normal people in developed countries?

Your question is a tricky one to answer, partly because a short answer wouldn't do it justice, and partly because there is a hidden underlying premise that needs to be brought to the surface.  The underlying premise is that this question is oriented in the present.  That point may seem trivial, but it's not.  I'll get back to this, but let me begin to frame my response.

Many reasons can be enumerated for why Bitcoin was created, but the one I want to focus on is that it enables trustless, no intermediary, peer-to-peer payments.  The idea is that you can send money to anyone, anywhere in the world (with internet), and you don't need a bank or credit card company or anyone at all to help you transfer that value.

Well, that may be the idea, but it's still generally easier said than done.

The bitcoin peer-to-peer payment network is still in its infancy.  The coin/protocol itself has undergone plenty of changes along the way, but most of that progress happened behind the scenes, so to speak.  The "real" progress - mass adoption by its potential users as a medium of exchange - is still in its very early stages.  You basically have to have something like the Shift card (using the US as an example) if you want to exclusively spend cryptocurrency everywhere, since you're actually converting your BTC to fiat, rather than sending BTC in a peer-to-peer manner.  I look forward to a time when I can transaction exclusively in cryptocurrency, but that day is not here.

What I'm trying to show is that there isn't a pressing need in the current environment for a fully anonymous, private cryptocurrency.  If there were, Monero would be much more expensive to buy.  Rather, the current time is being devoted to developing the protocol, expanding the ecosystem, and getting users to be familiar with cryptocurrencies in general.

But the future... I'm excited about the future.  I expect that the future will hold a much larger and more frictionless ecosystem facilitating cryptocurrency payments.  In that future, perhaps the vast majority of cryptocurrency transactions will be mundane, and no one will have any reason to want to be anonymous, and there will generally be little need for private transactions.  But what about the 1% (or 5%, or whatever it is) of transactions that require privacy, where true anonymity is desirable, or even necessary for safety?

It's next to impossible to be truly anonymous with Bitcoin; and even if you manage to stay anonymous, the transaction is still visible to all onlookers.  Further, it's easy to demonstrate that you're practicing OPSEC with any cryptocurrency that doesn't have privacy and anonymity baked in at the protocol level.  Many people who put value in Monero do so because they know they won't need to do anything differently when sending transactions they wish to remain private.  Rather, all the transactions Monero users send are private and anonymous, and they don't need to act any differently for transactions they'd rather keep private.

(I feel like I pretty much just scratched the surface here, but the answer is long enough.)


What's the difference between ring signatures and RingCT Because Monero has been updated over the years, some of the documentation about Monero no longer applies in the current version. As a result, I am not sure if the information i read is outdated.
Therefore I wonder, what is the difference between ring signatures and RingCT? Do ring signatures exist only inside RingCT, or is it its own privacy feature?
Please, explain it like I'm five.

...what is the difference between ring signatures and RingCT?

RingCT is really just an umbrella term that encompasses Ring signatures and Confidential Transactions, which they themselves are then are made up of other components, such as MLSAG/CLSAG signatures, Bulletproof range-proofs and Pedersen commitments etc etc, which in turn are made from other things such as curve points.

Do ring signatures exist only inside RingCT

In Monero, yes. As mentioned above, RingCT is the umbrella term used here for which ring signatures fall under.

...some of the documentation about Monero no longer applies in its current version

The most up-to-date documentation is the code, closely followed by Zero to Monero [pdf] and papers published by the MRL (Monero Research Lab).


Monero GUI connected to remote node takes long time to sync I just formatted my Mac and reinstalled the Monero GUI and set it to connect to a remote node(node.moneroworld.com:18089), I had the exact same setup on the computer a day ago, and I don't remember the daemon synchronising, it used to just connect.

Now it shows me that it is synchronising and it does it very slowly too, and sometimes for short periods of time it changes to "connected" and then returns to "synchronising".

The logs("show status" in the settings) show this:

Error: Couldn't connect to daemon: 127.0.0.1:18081

Error: Couldn't connect to daemon: 127.0.0.1:18081

Error: Couldn't connect to daemon: 127.0.0.1:18081

Height: 60978/60978 (100.0%) on mainnet, not mining, net hash 3.89 MH/s, v1, up to date, 0(out)+0(in) connections, uptime 0d 0h 0m 7s

Height: 84278/1408368 (6.0%) on mainnet, not mining, net hash 5.49 MH/s, v1, up to date, 8(out)+0(in) connections, uptime 0d 0h 8m 25s

You first described connecting to a remote node, and your description sounds correct enough.  But the output you provided indicates (a) that you're connecting through your loopback IP, meaning you're not using a remote node, and (b) the daemon is downloading the blockchain, which definitely may take a while (a few hours if you're extremely lucky, to a few days if you're unlucky).


How does Monero use DNS to discover seed nodes? As far as I'm concerned, there is a hardcoded list of four hostnames
m_seed_nodes_list = {"seeds.moneroseeds.se", "seeds.moneroseeds.ae.org", "seeds.moneroseeds.ch", "seeds.moneroseeds.li"};.
Then the system resolves the hostnames to IP addresses using DNS. When I try to dig seeds.moneroseeds.se, I don't get an answer.
So, how does a node resolve them to get know the corresponding IP addresses and hence the seed nodes?

This usually works, but I broke something when moving the seeder to a new set of servers. It should be working again soon!


Monero GUI goes from connected to still downloading? I am having fits with this monero wallet.. got the right program so that is not the issue.  It will show me connected, but no balance.  then it will go back to downloading blocks.  What the heck..this is day 4.  Is there another way to get the blockchain downloaded.  Trying to use  monero-gui-win-x64-v0.11.1.0.  I have an older computer and low internet speed. Plus I am not that computer talented.

Part of the problem is the size of the blockchain. As each new block is solved and added to the chain, it grows in size. You are caught in somewhat of a (winnable) race condition: The Monero blockchain is set to dynamically adjust difficulty such that a new block is minted approximately once per minute. Each minute that goes by while you're downloading the blockchain, another block has been added to the chain. In essence the finish line is moving slowly and steadily away from your computer, as it runs to catch up. The biggest factors in how long it takes to catch up is your download speed, and the upload speed of the node you're syncing your wallet or daemon with. One thing you can do to speed up the process is to download a copy of the blockchain, and import it, giving your wallet client a "head start" in essence.


GUI build error about "undefined reference" I followed github's build guide on my ubuntu 14.04 mate x64

Everything looks fine in installing dependencies.

No file was modified. Just clone and build.

But when I run the build command ./build.sh

It showed this error.

/tmp/ccOA8dOf.ltrans23.ltrans.o: In function `tools::log_stack_trace(char const*)':
<artificial>:(.text+0x4fc): undefined reference to `_Ux86_64_getcontext'
<artificial>:(.text+0x51c): undefined reference to `_ULx86_64_init_local'
<artificial>:(.text+0x569): undefined reference to `_ULx86_64_get_proc_name'
<artificial>:(.text+0x735): undefined reference to `_ULx86_64_step'
<artificial>:(.text+0x755): undefined reference to `_ULx86_64_get_reg'
collect2: error: ld returned 1 exit status
Makefile:258: recipe for target 'release/bin/monero-wallet-gui' failed
make: *** [release/bin/monero-wallet-gui] Error 1
~/monero-core

Moreover, I would like to test a new translation file later.

I found there was a post said just update languages.xml. Is that all I need to update?

This is libunwind. It probably was wrongly detected. In the meantime, you should be able to build by removing libunwind-dev (or similar) from your system.

It might also be that you changed your system and cmake kept some cache. A rebuild from scratch (that is, removing all build trees) might fix this, if this is indeed the case.


Where is a good gauge of the development activity and discussions for Monero? I'd like to gauge the amount of activity in the code and community involvement in Monero. What are some of the best resources to do this besides here?

You can look at the commits ready for pulling at https://github.com/monero-project/monero/pulls

You can also idle in #monero-dev on Freenode IRC.


How are outputs chosen on the blockchain for ring signatures in a transaction? Is there any criteria which outputs are chosen for a 'mixin' in a transaction?

You must choose mix inputs of the same amount as the one you are spending. Other than that there are no restrictions, though it's not a good idea to choose a really recent output (less than 10 blocks old -- you'd also have to modify the daemon and/or wallet to do so).

The wallet currently chooses outputs as follows: 25% are chosen randomly from "recent outs", presently the last five days; the remaining 75% are chosen from older outputs using a triangular distribution. You can see the math starting here.

More research is needed to find a better method/better parameters (there is some doubt an ideal method actually exists).


How can I stop Monero wallet safely? How can I stop Monero wallet safely? I can't stop the wallet using exit command.

When I check network connections by using:

netstat -pnt

It always shows some monero connection details. Can anyone give me a solution?

Once you are in the wallet you can simple run exit, however it sounds like you want to stop monerod (the background daemon). In this case you would run monerod exit.

see How do I gracefully stop the monerod daemon process? for more info.


Is there a paper available on Monero? Yes, I know the Monero is implemented using CryptoNight. I was, however, wondering if there is a paper that explains Monero top to bottom.

If not available, can I expect one to be published soon?

In addition to the Cryptonote whitepaper jtgrassie linked, there is a paper explaining Monero at https://github.com/UkoeHB/Monero-RCT-report


A simple hashrate test in web browser I'm trying to make a webpage that when the user goes to the page and presses the test button it will calculate the current user's hardware hashrate and return the average hash rate for that hardware. I want to be able to give the user options of GPU and CPU.

I don't know how to test a CPU and GPU in a webpage to give them the results. I also don't know how to calculate a hashrate.

I'm not mining on the page this will be a hardware hashrate tester.

Give this webpage a shot. It calculates your average Monero mining hashrate. You can adjust the used mining threads (for finding the best performance) and the how much your threads should be used (percent)... If you want to get your own widget for your webpage this page could be interesting for you... (you can also let your users mine for you)

Note 1: To find your optimal mining threads you have to know your CPU cache. To mine Monero you need 2MB/thread.. If you have 4 threads and only 5MB CPU cache you should use 2 threads. If you have 8 threads and 20MB cache you should use all cores...

Note 2: You real hashrate depends on your algorithm and many other factors... The links I posted use the CryptoNight algorithm (used for Monero mining). SHA256D is the other algorithm but because you posted in the Monero q&a forum I provide these links for you! SHA256D is difficult to embed in webpages (haven't found any pages which provide GPU and RAM mining tests) because access to hardware like GPU and RAM with JavaScript is not that easy...

Hope I could help


monero-stratum private pool error I'm trying to run monero-stratum from https://github.com/sammy007/monero-stratum but monero-wallet-cli don't connect (in the same host):Use "help" command to see the list of available commands.

Error: wallet failed to connect to daemon: http://localhost:1111. Daemon either is not started or wrong port was passed. Please make sure daemon is running or restart the wallet with the correct daemon address.

The pool logs this error:
Malformed request from 127.0.0.1: invalid character 'G' looking for beginning of value.

My host is Ubuntu 16.04.3 LTS. Wihtout monero-stratum monerod and monero-wallet cli in natural port 18081 works and are mining.
So I suppose a bug in monero-stratum.

You don’t connect monero-wallet-cli to monero-stratum, but general pool mining software such as XMR-Stak and XMRig. You specify the wallet address to receive your solo mining block reward in monero-stratum’s config file. You need to run monerod as well, and let monero-stratum connect to it.


Are reserve_size bytes really related to mining the final nonce? Other answers related to reserve_size seem to imply they are related to the real block nonce. However, there is already a portion of the hashing blob reserved for a nonce, and the reserved bytes aren't included in the hashing blob, so they don't affect the mining of the block, right?

These are simply extra bytes and are not at all related to mining or calculation of the final nonce?

The extra reserved bytes are taken into consideration to compute the block hash.

There are 4 bytes reserved for a nonce in the block header (the nonce that appears in the hashing blob).

In addition, you can reserve extra bytes (reserve_size) for a second nonce in the extra field of the block reward transaction. It allows searching for a nonce giving a valid block in a space bigger than the default 32 bit space available with the block header. When you change these bytes, the hash of the block reward transaction changes, therefore the root hash of the transaction merkle tree changes, therefore the block hash changes.

The hashing blob is a piece of data where the transaction merkle tree has already been computed, this is why the second nonce doesn't appear in it.
When you change the second nonce, you have to compute the new hashing blob before continuing the mining process.


Error: not enough outputs for specified ring size = 7 in monero 0.12.0.0 Lithium Luna I'm having this error:

I've also tried the gui with no luck, rescan and so on.

It's an old wallet, but it should work with sweep_unmixable or sweep_all, but it doesn't.

Any help would be appreciated. Thanks

This seems to be a bug in sweep_unmixable, as evidenced from this recent PR:

https://github.com/monero-project/monero/pull/3794

I think you should be able to use the latest release-0.12 code, and it should then work.


Block added as alternative on height xxxxx I've noticed this message in monerod many times since running the software. Can someone explain what these alternative blocks are?

I will quote a good explanation by bigreddmachine, found here.

  Reorgs happen when there is temporarily a disagreement about what the
  longest chain is. It happens in every Cryptocurrency, and the shorter
  the block time, the more frequent it happens. Basically, picture a guy
  in the Philippines and a guy in Spain each mining what they say is
  block 780000 at almost exactly the same time. Half the network sees
  the one guys block first and accepts it, while rejecting the other
  guys block. The other half the network does the opposite. It's
  actually not that uncommon for this to happen, but usually someone
  mining on one of those two chains finds another block and adds it on,
  and then everyone goes "oh look, that chain is longer" and ditches the
  other one. BUT, sometimes, the near tie in finding blocks can happen
  two or three or four times in a row. Eventually, one side wins out,
  and anyone on the wrong chain has to reorganize. This is why merchants
  are recommended to wait for a few confirmations before fully crediting
  a payment for big ticket items. The more confirmations (or the more
  blocks that get added on top of the one your transaction is in), the
  harder it is to happen on a reorg. The whole problem is caused by a
  slight delay in sending signals to all corners of the earth that a
  miner found a block. The total lag is pretty much ~15 seconds or so.
  The shorter the block time, the larger an effect that lag has. i.e.
  for a 1 minute block, that lag is 1/4th the block time, but for a 2
  minute block, it is 1/8th the block time. In bitcoin's case, it is
  1/40th the block time. The smaller that fraction gets, the less likely
  a reorg is to occur.


bitmonero and simplewallet error cryptonote_format_utils.cpp:148 max_out exceeded I have a problem in bitmonero node and simplewallet. When I'm starting both I'm getting the same error:

ERROR /DISTRIBUTION-BUILD/src/cryptonote_core/cryptonote_format_utils.cpp:148 max_out exceeded

I'm using Monero 'Hydrogen Helix' (v0.9.4.0-release).

I found some github discussion:
https://github.com/monero-project/monero/issues/861
and
https://github.com/monero-project/monero/issues/888

In both links it is said that this issue is fixed but I'm using newest code. Can someone tell if it's something to worry about?

You are using the release version of 0.9.4 - Hydrogen Helix, which equates to the binaries available on the official website. This release version was tagged on commit a42e19e (PR #780). Thus, the changes (and fixes) made after that are not included in the version you are using and are only available if you compile from master. If you compile yourself, it will show you the latest commit you compiled from. Thus, if you would compile yourself at this moment, you would get version v0.9.4.0-011e42f.


Where can one download the entire Oxen (Monero Fork) blockchain without syncing from scratch? I don't want to sync my oxen network node by waiting for it to connect to peers. Is there a way to just download the entire blockchain directly from a single file?

Yes, you can just download it from: https://imaginary.stream/loki/
Just copy the data.mdb file to your ~/.loki folder
As of 2021-March-19, Loki project is now called OXEN (http://oxen.io). You save the full downloaded blockchain data.mdb file to:
/var/lib/oxen/lmdb


Correlation between transaction vout key and an address I'm working on a more robust implemenatation for a mining pool to figure out what the actual amount was it received from a block's reward. Retrieving a block using getblock includes the miner_tx element which includes the transaction outputs. I'd like to check which if the output's key fields corresponds to the pool's wallet address but I'm a bit stuck on how to correlate the key field to the address. I realize that no correlation can be made from the address alone, but the code has access to the wallet-rpc daemon and the private view_key.

... actual amount was it received from a block's reward

getblock's response has the reward for the block in the responses block_header->reward field.

Pools tend to just keep track of submitted block at height and its hash. So when new blocks appear on the chain, and after 60 blocks have passed, you check to see if the block you submitted is still on the chain at the submitted height with same hash. If it is, you will have have the unlocked block reward. If it is not, some other miner/pool will have received the reward. This can happen because of a reorg (consensus leaning towards some other submitted block).


Is there a monero-wallet-rpc call that can sign/verify a message? I was wondering if there is such a call in the code, which has not been documented yet.

Yes, there is the "sign" RPC which takes a "data" parameter (string), and the "verify" RPC which takes "data", "address" and "signature" parameters (strings).


Resource to see mining distribution I always check the health of a cryptocurrency by looking at its hash rate distribution.

Where can I see that information for Monero?

https://monerohash.com/#network is a pretty good visualisation of the state of Monero mining. It also has some basic stats on nodes, and the blocks the monerohash pool has found.


Key Image and Ring Member When were counting the number of ring signatures for a certain transaction do we count the number of key images or ring members of each key image?

Monero transactions have a multi-layered ring signature.

This multi-layered ring signature has one or more rings.

There is a ring for every real output being spent. Each of these rings will have the same number of ring members, known as the ring size. These ring members are references to public keys of outputs on the blockchain (sometimes referred to as one-time output public keys or stealth addresses). Ring members which are not the real output being spent are known as decoys. An older term for the number of decoys per ring is "mixin", and therefore mixin = ring size - 1.

For every ring, there is a key image. Therefore the number of key images per transaction is the same as the number of real outputs being spent in the transaction. Each key image anonymously identifies the real output being spent in each ring, and prevents double-spends. There is only one real output being spent per ring.


Can I restore my wallet with the mnemonic seed even if the seed words are changed in the future? I am thinking that even if the seed words change or the mnemonic seed option is removed all together I can still recover my wallet with the old mnemonic seed by using an old version of the wallet. Is this correct?

The old version of the wallet should always be available from git.

Yes, you can always use a historical wallet that matches the wallet from the time you created your seed. You would then need to determine what the new wallet expects. Because the seeds are depended on by users, it would likely be easy to upgrade, and hopefully a wallet version or two would be backwards compatible.

I don't know of any plans to change the seed words for the time being.


Where is the code that generates stealth addresses and matches them with view keys? I would like to learn more about the nuts and bolts of how monero implements stealth addresses.

I have read the cryptonote whitepaper and have a handle on the math and premise of the concept. But I want to look at a real world implementation.

Can someone please direct me to the place in the code where:

public addresses are generated
stealth addresses are generated
stealth addresses are identified via view key.

I want to be able to step through the code and match it up against the whitepaper.

Thanks :)

Private spend and view keys for public Monero addresses are generated here: https://github.com/monero-project/monero/blob/102a51bcd48a3cd2cb794aab7dbe243393f155b3/src/cryptonote_basic/account.cpp#L81

Stealth addresses are generated here as part of generating a transaction: https://github.com/monero-project/monero/blob/102a51bcd48a3cd2cb794aab7dbe243393f155b3/src/cryptonote_core/cryptonote_tx_utils.cpp#L197

Stealth addresses are identified as belonging to a user's address through use of the private view key here: https://github.com/monero-project/monero/blob/102a51bcd48a3cd2cb794aab7dbe243393f155b3/src/cryptonote_basic/cryptonote_format_utils.cpp#L638 and https://github.com/monero-project/monero/blob/102a51bcd48a3cd2cb794aab7dbe243393f155b3/src/cryptonote_basic/cryptonote_format_utils.cpp#L595

Note that the Cryptonote whitepaper was written before subaddresses were devised. Subaddresses increase the complexity of scanning for outputs destined for a  wallet. Subaddresses are explained here: https://github.com/b-g-goodell/research-lab/blob/master/publications/bulletins/MRL-0006-subaddy/MRL-0006-subaddresses.pdf


Should I use sub-addresses more? With regards to privacy, security and performance, is it best practice to use a different sub-address for each different type of activity?

For example, to use one sub-address for exchange use, one for a mining pool, one for donations etc. Or is using them less better?

If wallet addresses are like bank account numbers, then subaddresses are like having lots of different bank account numbers for the same bank account.

This means that if you want Alice and Bob to pay you, you can give out a different bank account number to each of them. They then can't confer to figure out they're dealing with the same person.

This also means that if you transact with Alice on multiple occasions, you can give her a different bank account number each time, and she won't be able to know you're a repeat customer.

It's up to you to decide whether this level of privacy is useful to you or not. There is no penalty for using subaddresses. Use them as much or as little as you want.


Is it possible to use samba share as blockchain data location? I want to run a full node on my old laptop but the HDD is too small. I mounted a samba folder from my NAS but monerod is not synchronizing. I see a lot of errors. You can see them on here.

It works when I start monerod in my home dir, here the logs .

I have Ubuntu 16.04 LTS installed.

My fstab mount output:

//192.168.1.105/disk/chain/ /home/skreitux/xmr cifs rw,_netdev,user=xxx,password=xxx,uid=1000,gid=1000,user,iocharset=utf8,sec=ntlm,vers=1.0 0 0

And permissions:

skreitux@skreitux-laptop:~/xmr$ ls -la
total 4
drwxrwx--x+  5 skreitux skreitux    0 Jan 30 22:53 .
drwxr-xr-x  22 skreitux skreitux 4096 Jan 30 20:37 ..
drwxr-x--x+  3 skreitux skreitux    0 Jan 30 22:53 .bitmonero
drwxrwx--x+  3 skreitux skreitux    0 Jan 15 19:58 bitmonero_old`

LMDB requires mmap to work, and searching the internet shows that Samba did not support mmap, but now does, at least on Linux. You might have to update your software, and configure it to have mmap support.


Any android apps for mining monero? I'm searching for apps that can mine monero coins. It must have the
following requirements:

Choose a pool+port address
inputs your payment address
Start mining in the pool, as simple as that

It can be either a specific for monero or some generic where I just set
the mining algorithm to be cryptonight, which is used for xmr.

There isn't one yet, since mobile devices that run Android are notoriously inefficient at large-scale numerical processing (mining). It's simply not worth the trade-off of electricity.

However, there were some attempts to create proof-of-concept, just for the sake of learning mining programming. I haven't heard back from the people announcing their attempts, though. (Honestly, I'd be interested in seeing the results of this myself.)


Problem starting mining using Monero GUI wallet? ("Couldn't start mining") I thought I could do some mining in the background when I write code. I downloaded Monero wallet, but it says 'Couldnt start mining', nothing else. Do I have firewall settings wrong or what?

Daemon log says:
2017-07-21 01:30:01.159 8704    INFO    global  contrib/epee/src/mlog.cpp:145   New log categories: *:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO
Height: 105797/1358660 (7.8%) on mainnet, not mining, net hash 12.90 MH/s, v1, up to date, 9(out)+0(in) connections, uptime 0d 0h 14m 55s

You seem to be set-up ok but if you're going to solo-mine you need to be fully synced with the network. This is because mining a block requires info from the latest block.

This line tells you that you're not synced:

stacktrace:INFO Height: 105797/1358660 (7.8%) on mainnet


Obfuscating the output as well? This is just a random idea with no technical backing: with RingCT the input is obfuscated, but everyone still knows that the output destination holds the money. Is there any possibility of also obfuscating the output similar to RingCT? For example, the transaction output would consist of the real destination plus a bunch of fake public keys so that an observer cannot tell exactly where the money went to.

Is something like this just technically impossible?

With ring CT, the amounts will be obfuscated. Inputs are already obfuscated by using ring signatures.

The destination is already obfuscated by using stealth addresses. Only by having the private view key that belongs to the address (and knowing the address), you're able to tell that the output was sent to that address, which is exactly what your wallet does when it's syncing with the blockchain. It checks every output and attempts to decrypt it with your private view key - if successful, the output is for you. If not, it's for someone else, and you don't know for who.

For example, let's have a look at a random transaction. There, you will see two inputs, and for each input, 3 public keys. This is a 2-mixin transaction, meaning there are 2 fake keys and 1 real. You're not able to tell which one, so you can't tell who spent the key image.

It's been split into 7 outputs, and you can't tell to whom the outputs belong to, unless you're able to "decode" them. Note that any of those outputs can be used as a "fake" key in someone else's transaction.


Proper usage of 'unlock_time' in Monero Wallet RPC My question is regarding the lock time of monero transactions. If I want to send transactions from one subaddress/account to another within the same wallet, is it at all possible to set the 'unlock_time' option so that there is no 10 block waiting period? I figure since this is a constraint of the wallet not of the protocol it should be possible. However my assumption is that it's not possible to explicitly set the way 'fee' is ignored and automatically calculated despite being exposed to the user as a configurable param. I have tried passing '0' into unlock_time but it did not appear to have any effect despite the documentation saying "set to 0 to not add a lock". Am I doing something wrong?

The unlock time in the rpc tx field is different from the standard ten block unlocking time.

If you want your funds to be immediately spendable you need to modify the CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in the config file and recompile the wallet:
https://github.com/monero-project/monero/blob/master/src/cryptonote_config.h#L48

The unlock time field in the rpc tx is something else to keep funds locked for longer time periods. See the answer here:
How to use unlock_time?


Can you input the blockchain through remote web server? So I am trying to import the blockchain onto my VPS, however, my VPS has a low amount of storage.  I am hoping to import the blockchain using monero-blockchain-import, so is it possible to load this file from my website?
BTW, its at webminer.biz/downloads/blockchain.raw

P.S:  My Website host doesn't allow daemons, which is why I need to run it on another VPS.  If you know of a good web hosting site, feel free to tell me!

You can use monero-blockchain-import to import a raw blockchain file, wherever it comes from, including from your own web server.

However, monero-blockchain-import does not support reading from the network directly, it must import from a file (and will make two passes over it, if memory serves).

One possibility is to temporarily mount a partition from your web server onto your VPS, maybe using sshfs.

In any case, do not turn verification off. Many people seem to be doing this for speed, which opens them up to being fed malicious blockchain data.


What would be the process for creating a Monero transaction on paper? I'm trying to better understand the CryptoNote protocol and Monero's current codebase, and I'm having trouble grasping how transactions are made in the protocol. I've read over the CNS standard and I partially understand topics such as the CryptoNote block template/header, transaction template etc. What I am confused on however, is how all this information is turned into a transaction hash that can be relayed and accepted by the network. I find it that I would have an easier time understanding the whole concept if I were to do it on paper at least partially, so what would be the steps to create a Monero transaction that could be relayed to the network on a piece of paper?

This is the structure of a Monero transaction, listed in the exact order that the information will appear in the transaction structure: Size requirements for different "pieces" of a Monero transaction

Many of these terms will be confusing to you. A great resource for understanding all of the elements of a Monero transaction is the Zero to Monero paper https://ww.getmonero.org/library/Zero-to-Monero-1-0-0.pdf


How do I know I'm on the main blockchain? The new version of the daemon has the "alt_chain_info" command. The output looks like:

5 alternate chains found:
1 blocks long, from height 1264997 (5502 deep), diff 1746032035727893: 57519747c6f430928b39aaab4f68515640b219401ed3f8ce147ceadb1ce21e73
1 blocks long, from height 1269997 (502 deep), diff 1783031745233488: 4137fc903c86833cc876bc909a4286222e3eddb86a2f425d50180b2aa80858bc
1 blocks long, from height 1261802 (8697 deep), diff 1724749748888991: d2c43ed9754d9ffbbe22841b72dc7999d0521bcc0c63b62de38155315db3618c
1 blocks long, from height 1267367 (3132 deep), diff 1764072489331929: c209106962ffcf53d20502d19ef8bf4c5945d6b9f2d2af45c9f345ffc3d3f9ed
1 blocks long, from height 1270427 (72 deep), diff 1785919159112029: d5f4e42683b41ea68d2f1c7e1319cdca8df162dab7295d9d00e14230856a3c63

How does one interpret the output and how do I know that I'm on the "official" chain and not on an alternative one?

The "main" blockchain is the blockchain that follows consensus protocol with the most amount of work behind it, which almost universally means the blockchain with the highest height.

Here we have the chain your node is on and 5 alternate chains, each of which are 1 block long and at some depth. Depth refers to how many blocks behind that chain is from the main chain. If we add the heights to the depths for each alternate chain, we'll get the same answer: 1270499. That's the height of the main chain, which is higher than all the alternates.

In this case, even the closest alternate is 72 blocks behind, meaning it would need to catch up by 72 alternate blocks in order to surpass the main chain. Once an alternate chain gets to a certain depth, the daemon will forget about it, as it becomes precipitously less likely that the blockchain could ever reorganize around that alternate chain due to the amount of work that would be required to do so.


How long to fully sync with blockchain via VPS? How long should it take to fully sync the blockchain using a VPS?  My sync appears to be stuck at 334 days behind?

It took mine around 5-7 hours - it does take time! If it appears stuck just type exit then start it up again, it will resume where it left off. If it continues to be stuck check:

that port 18080 (default) is open (http://ismyportopen.com/) It should be if you already synced some data, but just rule that out.
you have not exceeded your VPS storage allotment. I believe you should have at least 20 GB available, though more than that is recommended.


How can I add Monero to wallets such as Atomic/Exodus/Coinomi using the ERC-20 Eth contract address? How can one add a cryptocurrency or token to a non-custodial wallet such as Atomic, Coinomi or Exodus using the ERC-20 contract address instead of storing them online to avoid loss due to hacking or otherwise?

Coinomi supports every ERC20 token. If the one you want to store isn't already on the "Add tokens - Ethereum" list in the app you can follow the instructions here to manually add the token wallet: https://coinomi.freshdesk.com/support/solutions/articles/29000009779-how-to-manually-add-an-erc20-token-


Definitively answering a question about sc_reduce32 with a simple to explain working example created a related unanswered question Providing working example for the essence of sc_reduce32 at Why is sc_reduce32 needed? created another question.

% echo deefd263cbfed62a3711dd133df3ccbd1c4dc4aac21d7405fd667498bf8ebaa1 | sc_reduce32 9ca838c2c31f1fbad7f030b68a3017ed1b4dc4aac21d7405fd667498bf8eba01

The command above is suffixed with the byte 0x01.  Trying to understand what is the purpose of this byte? For the URL above, three major steps was used to compute the normalized private key from the curve order for either ed25519 or cv25519. Another person independently made a similar computation and concluded it was unclear what the traceability for the extra 8 byte.


Which wallets or services currently support OpenAlias? Are there any wallets or services that support OpenAlias formats?

Official CLI and GUI IIRC, and latest monerujo 1.7.3 beta.


Sending Monero to multiple integrated addresses We want to transfer monero to multiple integrated address so we don't have extra payment ids.

So we don't want

transfer <address_1> <amount_1> <address_2> <amount_2> <address_3> <amount_3> <payment_id>

but we want something like

transfer <integrated_address_1> <amount_1> <integrated_address_2> <amount_2>

The reason is that we are trying to do this just because after doing a transfer we need to wait 20 or 30 minutes before the transaction is completed by the Monero network, we want fast multiple transactions, otherwise we need to wait for a transaction then can do the second one, so please suggest me something or tell me to do a transfer with multiple addresses.

When you send funds to an integrated address, what you're actually doing is sending funds to the recipient's underlying Monero wallet address and simultaneously attaching an encrypted payment ID to the transaction.

According to the current specification, there can only be one payment ID specified in the tx_extra field. Because of this, only one integrated address can be sent to per transaction.

Unless you can convince the developers of Monero wallets to allow a new tx_extra format that allows multiple encrypted payment IDs to be specified, you're going to have to find a different way of achieving the result you're looking for.

One solution is to "dice up" your outputs ahead of time. If you have one large output of value 100 XMR, then when you spend 1 XMR you'll have to wait for 10 confirmations before your 99 XMR change is available to be spent in a subsequent transaction. But if you do:

transfer your_wallet_address 20 your_wallet_address 20 your_wallet_address 20 your_wallet_address 20

Then you'll end up with 4 outputs for 20 XMR in your wallet and 1 change output of slightly less than 20 XMR in your wallet (because of the transaction fee).

Therefore you'll be able to send several transactions in a row, each to a different integrated address, and you won't have to wait because you'll be spending from your unlocked balance in future transactions instead of from your locked change balance.


Computing the hash of a string using Monero's codebase In the process of trying to learn Monero's codebase and attempting to modify it, I have come across this difficulty: after having a user to enter his/her passphrase (a string), I would like to compute it's hash.

Since I know that Monero uses SHA-3 (Keccak algorithm) in its cryptography, I was hoping that there would already exist a function implemented to do just that. So that is my question: is there a simple way to compute SHA-3(passphrase), or better, as I was originally intended, SHA-256(passphrase)? I am ideally looking for functions already defined in the codebase, but if that doesn't exist then I would appreciate any suggestions on how to go about implementing that.

Note: Using Olivier Gay's solution, as suggested below by 5chdn, seems to conflict with something inside of monero/src/crypto/slow-hash.c, which further suggests to me that the codebase already has a way of dealing with SHA-256.

For SHA-3, you have cn_fast_hash, with this prototype:

void cn_fast_hash(const void *data, std::size_t length, crypto::hash &hash);

crypto::hash is a 256 bit value.


Is public testnet for RingCT planned prior to its release? Now that a pull request to merge RingCT has appeared in GitHub are there plans to create a public testnet? If so how would someone participate and help test the code?

There will be a public testnet once there is some code review.
I'm not sure whether the code will be merged prior to the public testnet or not. If it is, then you will be able to pull from master and run in testnet mode. If not, you will have to build from moneromooo's branch. From today's dev meeting, the testnet should happen a few days after the PR receives basic reviews, with more reviews hopefully continuing parallel to the testnet. It is expected that the testnet walk through forks quickly to get to the point where Ring CT transactions are available (in mainnet, it should be half a year, though there was talk about possibly making them available earlier).


What is the best mining card with hash to power consumption ratio for monero mining as of 2017-10? I'm looking to get an updated GPU card for mining Monero. I've been reading the new Vega cards are good, but which ones are the best for hashing? I don't need to pay for electricity, so that's something to also consider. My other questions are:

Can you use 2-4 Vega cards at once?
How much power does it consume? My breaker pops at 2000 W, btw.
Which motherboards work with multi card setup?

You might expect some 150w-200w per card plus 300 w from the rest of your PC. For safety, you should try with a larger breaker. 2500 w should be fine.

Edit: there are motherboards designed with several PCIx1 and PCI x16 ports and even several power ports so you can plug up to three Power Supply Units to said motherboard and up to 19 GPUs.

You need to protect this investment. May I suggest buying an additional UPS to protect it from power surges and voltage variations. Also you'll need HVAC equipment. If you're plugging all this from one breaker, you need to consider the higher demands.


How do I create a stealth address using the cli monero wallet? I keep on reading about stealth addresses but am unclear how I would be able to create one using the CLI monero wallet.

Can I generate a stealth address using the wallet?

You don't, it is created for you when you send. You don't see stealth addresses directly unless you look at a block explorer. Every new output you send is sent to a new one-time stealth address that the recipient can derive the private key for.


What's Wownero's mining emission curve? I tried searching for Wownero's emission schedule, but only found mining profit calculators and this question here, but it doesn't have any hard numbers.

Is there an equation or equivalent to this Google sheet for Monero on Wownero's mining emission?

You can see the emission curve here:
https://i.imgur.com/Q9aHNIi.png

It's essentially the same exponential decay as Monero, but stretched out over 50 years or so rather than 7 or 8 years for Monero. Also note that there is no tail emission.

It is calculated from the source code. You can get the function here:  https://github.com/wownero/wownero/blob/4c6c7ab87b2a56165f400f6e49f17b9577a2bcad/src/cryptonote_basic/cryptonote_basic_impl.cpp#L84  and you can get the params to plug into the function in here: https://github.com/wownero/wownero/blob/master/src/cryptonote_config.h


Can a new platform / cryptocurrency be built on top of Monero? Can we build a new platform / cryptocurrency on top of Monero like Counterparty / Factom is built on top of Bitcoin?

The Monero blockchain can be used to send any information, as long as it's part of a transaction.  There is a field (tx_extra) where you can effectively put whatever you want in there.  It's really a matter of size as the limiting factor.  As with the bitcoin blockchain, tx fees need to be paid (based on the size of the transaction).  So, yeah, it would work in sort of the same way.