monero-wallet-cli Error message: refresh failed When I run *monero-wallet-cli * I get an error message. However, the Wallet does start.

The code is being run in a MSYS2 MinGW 64-bit terminal on Windows 10 Pro.

Another window is open running ./monerod --offline (not enough space or resources to copy a 41GB blockchain)

Copy from terminal:
#

  ./monero-wallet-cli This is the command line monero wallet. It needs
  to connect to a monero daemon to work correctly. WARNING: Do not reuse
  your Monero keys on an another fork, UNLESS this fork has key reuse
  mitigations built in. Doing so will harm your privacy.

  Monero 'Lithium Luna' (v0.12.1.0-master-aa6850c7) Logging to
  C:\Users\XXXXXXX\monero\build\release\bin\monero-wallet-cli.log
  Specify wallet file name (e.g., MyWallet). If the wallet doesn't
  exist, it will be created. Wallet file name (or Ctrl-C to quit):
  ZuzzimWallet1 Wallet and key files found, loading...

  Opened wallet:
  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSANITISEDXXXXXXXXXXXXXXXXXXXXXX
  ********************************************************************** Use the "help" command to see the list of available commands. Use
  "help " to see a command's documentation.

  ********************************************************************** Starting refresh... Error: refresh failed: internal error: Index out of bounds of hashchain. Blocks received: 0 Background refresh thread**
  started [wallet 42X2yL]:

Questions:
1. Should I be concerned about the error message and what is causing it?

See comment above. This is a bug. Coins are not at risk.


Would this be a good hardware setup for Monero mining? I'm completely new to mining Monero but I want to give it a try and get more knowledge of hardware. So I got a good price for an Asrock D1800M. It is a BGA Celeron and the system should use around 20W without GPUs.

Is this CPU enough to power up to three AMD RX 480 GPU?
Is PCIe x1 enough for mining with GPUs?
And what power does an RX 480 use while mining?

Thank you very much for reading this and big thanks for every answer!

GPU mining configurations often use the cheapest CPU. Thus, your CPU should be powerful enough to work with 3 Rx 480.  Yes, PCIE x 1 should work for mining but you have to buy a riser (recommended to use a powered riser).  RX 480 draws around 150W (from specification) - 200W. Probably give some more allowance when buying your Power Supply and don't go cheap on it.

Lastly, don't forget about cooling with 3 Rx 480 it could get very hot.

You can come and visit the other miners at https://www.reddit.com/r/MoneroMining/ or you can read specifically this


CryptoNight heavy vs CryptoNight light Which version of the CryptoNight algorithm can we use for ASIC resistance. My understanding is that CryptoNight v7 is not ASIC resistant. Can you please explain the algorithm versions.

Thanks in advance.

There isn't a lifetime effective ASIC resistant algorithm. ASIC chips are custom manufactured computing devices specifically designed for a particular hashing algorithm. So, after an ASIC device is made to compute the hashing algorithm, you need to fork and change the mining algorithm so that ASICs tailored to the old algorithm can no longer mine effectively.

Monero issues regularly scheduled hard-forks, which are upgrades to the Monero network and prevent ASIC devices to mine Monero coins.


Calculating the circulating supply using daemon RPC Is there an easy way to calculate the currently circulating supply using daemon RPC calls?

There is the get_coinbase_tx_sum RPC call which takes height and count parameters, and returns how many moneros were created between block height and block height + count.

So by setting height to zero and count to the current block height, you get the current money supply (the daemon might take some time to compute everything at once though).


RPC is node fully synced In my test environment, which is ssh,bash and screen, I'm launching a monerod followed by several other programs wallet-rpc/cli and more, which are all depending on monerod.

To prevent any confusion, I would like to wait for monerod to be fully synced, before launching the dependent programs.

Can I RPC the daemon, and get the local blockheight / network blockheight, so I can wait for the sync to complete?

My solution (Updated to wait if daemon is not ready)

get_info() {
    local JSON=$( curl -s -X POST http://127.0.0.1:28081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_info"}' -H 'Content-Type: application/json' | grep "$1" | grep -o '[0-9]*' )
    [ "${JSON}" = "" ] \
    || {
        echo ${JSON}
        return 0
    } \
    && {
        return 1
    }
}

wait_for_sync() {
    local TARGET=0
    local HEIGHT=0
    local CNT=0
    until [[ ${TARGET} -ne 0 ]]
    do
        ((CNT++))
        echo -en "${WHITE}Waiting for daemon: ${RED}${CNT}${RESTORE}\r"
        sleep 1
        TARGET=$(get_info '"target_height"' | grep -o '[0-9]*')
    done
    echo -ne "\033[2K"
    echo -n "${WHITE}Waiting for daemon to sync: ${HEIGHT}/${TARGET}${RESTORE}"
    while [ ${HEIGHT} -lt ${TARGET} ]
    do
        HEIGHT=$(get_info '"height"' | grep -o '[0-9]*')
        echo -ne "\r${WHITE}Waiting for daemon to sync: ${HEIGHT}/${TARGET}${RESTORE}"
        sleep 1
    done
    echo " ${GREEN}OK Synced${RESTORE}"
}

I have found the best way to deal with this is just to start them all up at once. Monero RPC methods that are dependent on a fully synchronized blockchain will return with a relevant status code if the chain is not fully synced, and thus code can deal with this scenario as and when this happens.

If you find a situation it's imperative the blockchain is fully synchronized before starting some other tool/service, you could call the daemon RPC method get_info which shows you the daemon's current height in the height field and the blockchain target height in the target_height field. Therefore, you are syncing whilst height is less than target_height.


Why is the payment ID specified on a per TX basis? I understand that the payment ID is stored in the tx-extra field. Only one payment ID can be specified when sending, even when sending to multiple addresses, because it's specified on a per-tx basis.

I'm assuming that it was made this way to preserve space. Specifying it on a per-output basis would mean it being repeated many times for each denomination even for the simplest transaction to one address. Was this the only reason?

With ringCT, would it make sense to consider enabling payment ID on a per-output basis? Was this considered, and if it was, what would be the main pros/cons. I take it that with ringCT, we would have to repeat the pID 2 times (output+change) if we want to prevent leaking which output is which.

From my understanding, the payment ID is not associated with a specific output. It is included in a different portion of the transaction, near the transaction hash and public key.

There is no practical reason to use more than one payment ID. Its only purpose is for merchants and exchanges to verify which person sent the funds to them. There is a direct harm to the network with the substantial additional transaction size if a per-output method was chosen.

I do not believe that there is any risk of leaking which inputs and outputs are the "real" ones when using a payment ID. It should be computed separately. Even if it is not, I would suggest adding 1 to the default mixin, which would provide the same security improvement with less additional bloat.


How do I know if Monero is running on Putty? When I run Monero, it seems to be eating up my CPU space. How do I run it on a VPS? I've got a VPS, and I installed PuTTY.  What is next?

Once you have PuTTY open and you have an SSH connection to your VPN server try the following commands:
Download the current Monero Core binaries
wget https://downloads.getmonero.org/linux64
Make a directory and extract the files
mkdir monero
tar -xjvf linux64 -C monero

Keep monerod running forever by using Linux Screen
screen -S myFullNode

This ensures that when you close the PuTTY SSH connection the node will continue to run. There is an optional flag for monerod --detach but I don't use this.
It should be installed already, if not yum install screen

Launch the daemon
cd monero
./monerod

Return to main terminal to run your wallet or w/e
Ctrl + a + d
cd monero
./monero-wallet-cli

Make a new wallet, open an existing wallet or w/e

To view your monerod node
screen -r myFullNode


What makes monero different from other anonymous coins? Is there a break down of how monero is different from other anonymous coins as of 2017 July?

If by others anonymous cryptocurrencies you mean Zcash and Dash,  you can check out this article: Monero vs Dash vs Zcash


How to set up a mining pool? What do I need to acquire in order to configure a mining pool? I want to make a "charity pool", where part of the pool fee will be donated to a charity voted upon by the miners. I really want to get this going. I need to know what resources I need and how much running a pool will cost for say 6 months. Please be specific! And if you want to get involved let me know, I could use help.

If you have limited linux skills, i suggest you try Monerodo, which is an ubuntu with a bunch of monero software pre-installed, including a pool software.

Otherwise, you can start looking at zone117x node-cryptonote-pool.

Either way, you will have to tweak the software to implement the "voting" part.

As to the cost, it can be as free as submitting a PR :)

It is not easy to attract miners. So if your goal is not financial (nothing wrong with that) it is probably the most efficient way.


What is RingCT and how does it compare to Confidential Transactions? What is RingCT and how does the addition of Ring Signatures enhance the privacy properties of RingCT compared to Confidential Transactions as designed by Greg Maxwell?

https://people.xiph.org/~greg/confidential_values.txt

RingCT is based on the Confidential Transactions research you cited (combined with ring signatures)

RingCT just like Confidential Transactions hides the amount of each transaction. Unlike Confidential Transactions, RingCT will also make the payments unlinkable.

Confidential Transactions include a cryptographic proof that the sum of the input amounts is the same as the sum of the output amounts, without revealing the actual numbers. You are still able trace which address sent and received BTC.

RingCT protects the privacy of more than just the transaction amounts. Monero transactions are already untraceable thanks to ring signatures and unlinkable thanks to stealth addresses. There are also plans to use I2P to protect IP address with the Kovri C++ router project.


What is the maximum value for x in the command "monerod --db-sync-mode fastest:async:[x]" I've tried:

--db-sync-mode fastest:async:100000

Is there any maximum/higher value I can use instead of 100000?

The maximum value is 2^64-1 (which is, never actually reached in practice).


Has RingCT been reviewed by the other Monero Research Lab members? Shen Noether has created RingCT and I trust that he has done so in a safe and correct manner, but it never hurts to have more eyes on the crypto. RingCT is currently in testnet and being rigorously tested in testnet, but has Surae Noether or Sarang Noether looked over the whitepaper?

Yes absolutely. It wasn't designed in isolation, it was a group effort with members of the Core Team and the MRL involved. Since Shen did the bulk of the work, and was responsible for much of the innovative cryptography, he is the primary author on the research bulletin. You'll notice, however, that Adam Mackenzie and the Monero Core Team are also listed as authors on the research bulletin:)


What is the regex for a Monero address or Payment ID? What is the best, most correct way of regex'ing the address and payment ID for Monero?

A Monero address:

4[0-9AB][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{93}

A payment ID:

([0-9a-fA-F]{16}|[0-9a-fA-F]{64})


JSON-RPC Not Working as Shown in Wallet Guide I am trying to follow the example from https://getmonero.org/resources/developer-guides/wallet-rpc.html#getbalance

and getting this result:

    $ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"getbalance","params":{"account_index":0}}' -H 'Content-Type: application/json'
    {
      "error": {
        "code": -32601,
        "message": "Method not found"
      },
      "id": "0",
      "jsonrpc": "2.0"
    }

?????

That looks very much like user error.

You use port 18081, which is the default daemon RPC port, and are giving it a wallet RPC.

Ask the wallet instead, using the port you selected for it.


How to filter all transactions with a payment id that converts to a message? Is there a way to scan the blockchain for all payment id's that are actually messages when converted from hex to ascii? This would be an interesting use case of marking transactions you want public as a message. How would one go about doing this?

There is a function in BlockchainDB which iterates through all transactions: for_all_transactions. Call this with a function which extracts the payment id (see find_tx_extra_field_by_type and get_payment_id_from_tx_extra_nonce), and scan its bytes for suitability (isprint).


Stealth addresses: where do they come from? I wonder what the origin of stealth addresses is.

I learned that they were introduced for BitCoin, by Peter Todd. However, I cannot find any literature describing or analysing the specific instantiation in Monero:

P=H_s(rA)G + B

x=H_s(aR) + b

Does this construction differ from what Peter Todd proposed?
Who came up with this construction, is this something described in literature?
Has there been any public cryptanalysis on this construction?

The white paper (CryptoNote 2.0, Nicolas van Saderhagen) does not refer to any source, as far as I can tell.

"Stealth Address" is really just a fancy name for a neat use of Elliptic Curve Diffie-Hellman key exchange. Its use in Monero is described here in detail, but not under that name. This allows for the sender to effectively salt the output and privately communicate the salt to the recipient. I have no idea who and when coined the term "stealth address" to describe it.

As for cryptanalysis, it's all using existing well-known primitives and should be trivial. There's a nice presentation from UCL going through various set-ups, and looking at the site of origin, I also discovered that a nice paper has been published recently.

Courtois N. and Mercer R. (2017). Stealth Address and Key Management Techniques in Blockchain Systems. In Proceedings of the 3rd International Conference on Information Systems Security and Privacy ISBN 978-989-758-209-7, pages 559-566. DOI: 10.5220/0006270005590566

But let's look at it from another angle, and try to build it from bottom up.

What's the minimum you need to do to be able to transact Monero? All you need is outputs and amounts (post-RCT, commitments take the role of amounts). The network verifies the signature, and the signature is produced by using the individul one-time output's private key.

So, all you really need are keypairs P=xG. You could create the destination key by any means you want.

For example, I (the receiver) could roll some x, communicate the P to you, and you make a TX with output P. You could omit the TX keys entirely because I already know my P and x and can tell my wallet to use them when I want to spend. This is because I (the receiver), have decided what the output will be.

This is practically the same as Bitcoin. I give you a public key (well, hash of it) and you pay to the public key (hash).

With CN we could do it the same way. Network doesn't force you to use ECDH & TX keys. However, due to use of ring signatures, we must be sure to never receive twice to the same key. With this in mind, it would be a big hassle to receive. You'd have to generate a new unique key whenever someone wants to send you something. If someone intercepts the payment request, he could monitor the blockchain for appearance of that P and know when you received something.

So, we want a way for the sender to roll the destination output P, in such a way that he won't know x, but such that I will.

For that, I could have some key B=bG for passive receiving, and the sender could construct outputs like P = R + B where he picks some random R=rG. Problem is, he needs to tell me the r as well in order for me to be able to spend so I could recreate the output's secret key x = r + b, compute the public key P, and use that to check that the output is indeed recorded on the blockchain and later spend it. We could make this work today, between me and you. All it requires is a wallet modification. It's not the best however, as you need to communicate the r via secure channel if I am to keep my privacy.

What about using blockchain for communication? That way I can't lose or forget the r and with that lose access to my funds. Problem is, while blockchain is great for record-keeping it is public so it's insecure communication channel. And what's a good way to privately communicate via insecure channel? ECDH.

We could say, OK, let's have the sender roll the outputs like: P=Hs(rB)G+B. Now he can tell me (write it to the blockchain) the R, and I can re-create the keys with x = Hs(bR)+b. Cool. Now someone intercepting the R can't tell that some P is for me, even if he knows my address B. But now, I can't ever be audited otherwise I have to leak my secret key to the auditor and then he could run off with everything. I can't even reveal selective, already spent, outputs, because someone knowing shared secret (bR) and secret key (x) of an output could work out my secret spend key b.

That's why we make the receiving address use dual keys, and then one is enough to check ownership without risk of revealing x, and the other is required to recover the x. With that we arrive to the current set-up.


Different symbols in monero full node map There are different symbols on monero full list node map (https://monerohash.com/nodes-distribution.html)
What are the differences between these symbols:
yellow circle
green circle
blue reverse drop

A blue reverse drop indicates the approximate location of the node as per geolocation of the IP address. A green circle indicates that the approximate location of more than 1, but less than 10 nodes is the same. A yellow circle indicates that the approximate location of more than 10 nodes is the same. For both the green and yellow circle it probably means that multiple people are hosting a node on a VPS hosting provider that is located there.


Loki Daemon Node Crashed with Error Adding Block with hash and stuck at 99.99% sync My Loki daemon node crashed and when restarting I get the following error of: Error Adding Block with Hash: -- I tried restarting a few times and waited. How can I fix this?

After trying a few times to sync and constantly getting stuck at 99% with that same error. I had to delete the Loki blockchain and just download it again. Instead of resyncing, just download the loki blockchain directly from: https://imaginary.stream/loki/

I did the following:

cd ~/.loki/lmdb
rm data.mdb
wget https://imaginary.stream/loki/data.mdb

Then start your loki daemon again.


Are there protocol-level incentives regarding mix-in selection? If I'm not mistaken, the current wallet randomly selects outputs for mix-in from the TXO set using a certain probability density function.

Is this behaviour somehow supported by protocol-level incentives, other than maximizing transaction privacy (e.g. fees)? Or might we, in the future, see wallets which constantly (re-)use certain outputs in their ring signature for performance or other reasons?
Could such wallets undermine the mandatory mix-in rules?

There's no direct incentive scheme at the present moment.

The only protocol requirement is for the number of decoy outputs in the ring signature (and that they're of the same denomination, for non-RCT TX-es). Which ones get chosen is up to the wallet.

If someone were to use a different one, he would probably be fingerprinting his TX-es in some way. It would likely not be possible to exactly be sure which ones because of some false-positives from other wallets, but still - some could be marked as "likely origination from xx wallet implementation". If enough people used the xx wallet, each user would still be hidden among other users of xx wallet.

Considering that with RCT you will be able to pick any random output on the blockchain as decoy, it doesn't make sense to re-use same ones. At the end, you'd be sacrificing your privacy - for what? So, there's that indirect incentive to stick to the default.

I'm sure that this aspect will attract more research as monero grows, which will provide more substantial answer to your question. Some research has already been done, see MRL-0001 and MRL-0004.


How do I use the start_mining command? I'm new, and I need help.
I started a Monero node, and as soon as it was synchronized, it closed the node. I don't know why. Can somebody tell me the reason?
Also I want to know how to insert the right command for start_mining. It is telling me that is the wrong command.

monerod, the Monero node, should not exit once it's synchronized. Maybe a bug caused it to crash. If this is so, please include any error messages or logs or console output.

As for the start_mining command, it takes a first parameter for the Monero address you want to mine with (the address to which any block reward will be paid to), and an optional number of threads to use (you want to ensure each thread has at least 2MB of cache memory to use).

For example:

start_mining 4xxxxxxxxxxxxxxx 2

This will start 2 mining threads, paying to 4xxxxxxxxxxxxxxx.

Note that this is solo mining, and the time between getting blocks can be pretty large if your hash rate isn't so good. If you have low hash rate, consider pool mining, unless the high variance doesn't bother you. In the long run, the payout is about the same.


Monero wallet says sent 25 XMR, other wallet says 0 received! I transferred some monero from one GUI wallet to another one and while transaction shows up in both wallets the sending wallet sent 25 XMR (and shows that) the receiving wallet says 0 XMR received (with the same transaction ID).

How do I sort this out?

Update to add important infor:

GUI version v0.14.0.0 (Qt 5.7.0)
Embedded Monero version: v0.14.0.2
Downloaded this morning

If it is important the receiving wallet was a ledger backed one.

My guess would be due to the recent hard fork and verification times being slowed down. I'm running a full  node and things look weird at the moment. The data is on the blockchain and should eventually sync. It doens't look like the Ledger bug is affecting you.

https://www.reddit.com/r/ledgerwallet/comments/aywyj2/is_monero_safe_to_use_again/


Why is there a multiply by 8 in the hash_to_ec and derivation_to_scalar functions? Trying to get an intuition about the hashing that Monero is doing.

Some definitions:

Let P represent a point on the Ed25519 curve that's also a part of the group.

Let H represent a hash function.

Let E(P) be the function that encodes P into a 32-byte repesentation.

Let D(b) be the function that decodes a 32-byte representation to a point on the curve.

The Monero source code for hash_to_ec function, which maps an Ed25519 Point to another Ed25519 Point does something like this:

H_p(P) = 8*D(H(E(P)))

(see https://github.com/monero-project/monero/blob/1a4298685aa9e694bc555ae69be59d14d3790465/src/crypto/crypto.cpp#L245)

Why the 8?

Also, the derivation_to_scalar function, which maps an Ed25519 Point to a scalar does something like this:

H_s(P) = H(H(8*E(P)) || output_index)

see https://github.com/monero-project/monero/blob/1a4298685aa9e694bc555ae69be59d14d3790465/src/crypto/crypto.cpp#L139 and https://github.com/monero-project/monero/blob/1a4298685aa9e694bc555ae69be59d14d3790465/src/crypto/crypto.cpp#L154

I can understand concatenating the output_index, but I don't understand why the multiply by 8 is there.

Can someone shed light on either/both of these constructions? The only guess I have is that somehow, multiplying by 8 after hashing guarantees the resulting point is in the Group.

These multiplications are trying to address a similar problem discovered in the key image exploit - small order subgroup issues.

The derivation_to_scalar issue is easier to describe; it is listed on Daniel Bernstein's page about twist security. If an attacker provides a small order point (i.e. a point whose group has 8 members) in tx_extra for the transaction public key, then sends a small amount of XMR to each of those points in the group, whichever output is spent by the user will tell the attacker (and any "public" viewers of the chain that know where to look) the lower 3-bits of the secret view key. Mutiplying by 8 guarantees that the result of the ECDH step will always be in the main group, and therefore will never leak anything about the secret key.

Alternatively, curve25519 sets the lower 3-bits of the key (scalar) to zero. This reduces the security by 3-bits while simultaneously making the key a multiple of 8. All scalar point multiplications with this type of key will therefore result on the primary group.

hash_to_ec is a little different - it converts a 32-byte scalar to a y-coordinate then "recovers" the x-coordinate based on the ED25519 curve. So the point recovered might be on the ED25519 curve, but not the primary ED25519 group. Multiplying by 8 gets the "nearest" point in the primary group.


Monero to Bitcoin transaction XMR.TO Does XMR.to have any extra fees when sending money ?
How do I prove to seller that I send bitcoin to him ? After I pay to XMR.to with Monero and set the bitcoin address they need to send money to they will give me a bitcoin address that they used to send money to the seller ?

XMR.to has slightly lower exchange rates (usally around 1%) than the big exchanges, but even for small payments they cover all Bitcoin onchain transaction fees and their transactions usually will be included in the next Bitcoin block so they have a pretty good fee estimator and/or are well connected with Bitcoin miners.

When creating a new payment on xmr.to you will get a "secret key" in form "xmrto-xxxxxx" which you should write down and you will be able to track your order here: https://xmr.to/track

Orders up to 0.1 BTC will be processed immediately and your Bitcoin transaction will land in the Mempool usually within seconds, you will receive a transaction ID which you will be able to track in every Bitcoin block explorer.


How could you lower the risk of accepting zero confirmation transactions? As far as I heard monero nodes don't add double spent tx to their txpool (source), so if I connect to enough nodes it should be possible to lower the risk of a double spend attack right? (I could also cluster my control nodes if connection limitations would be a problem)

Via that logic it would also make sense to add nodes that are close or operated by mining pools.

What other options are there to also lower the risk?

I read this answer but since monero does not have things like Replace by Fee it sounds to me less friendly to attack.

Connecting to more nodes increases the speed at which you will see a transaction double spending one you already have in your txpool, and thus mark this transaction as such. However, this is not foolproof since a miner does not have to relay a transaction for it to be mined.

Thus, this is risk based calculation, which should depend on things like the amount involved, whether a double spending tx was seen (since you don't know which one will get mined), how much recourse you have in case of actual double spend, the amount of time you wait for a possible double spend before acting on the tx, etc.


Monero-Core build instructions? It seems some work is being made on monero-core and I wanted to check out the most recent builds. However the repository (https://github.com/mbg033/monero-core) lists build instructions as TODO. Is there a makefile someone could point me to? Running 64bit Linux.

Yes, written instructions for installing Monero on your system can be found here with a video tutorial including GUI setup and testing here

Dependencies:

# update Ubuntu's repository
sudo apt update

#install git to download latest Monero source code from github
sudo apt install git

# install dependencies to be able to compile Monero
sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev

# or git and all dependencies in one command
# sudo apt install git build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev

Compilation:

# download the latest bitmonero source code from github
git clone https://github.com/monero-project/bitmonero.git

# go into bitmonero folder
cd bitmonero/

# apply patch for using Onion Blockchain Explorer (optional)
# https://github.com/moneroexamples/onion-monero-blockchain-explorer
# curl https://raw.githubusercontent.com/moneroexamples/compile-monero-09-on-ubuntu-16-04/master/res/tx_blob_to_tx_info.patch | git apply -v -
#

# compile the release version.
make # or make -j number_of_threads, e.g., make -j 2

# alternatively `make release` can be used instead of `make`. This compiles
# the source code without compiling unique tests which is faster, and can
# avid problems if there are compilation errors with compiling the tests

Installation:

The Monero binaries should now be located in ./build/release/bin

# launch the Monero daemon and let it synchronize with the Monero network
/opt/bitmonero/bitmonerod

# launch the Monero wallet
/opt/bitmonero/simplewallet

Once the above is complete, prepare the source code:

git clone https://github.com/mbg033/monero-core.git
cd monero-core
./get_libwallet_api.sh

Compile QT:

sudo apt-get install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-xmllistmodel
qmake
make

Launch:

 release/monero-core


Setup remote-connectable node? I'd like to setup a full remote node for personal usage (meaning I want it to act as a full node to help decentralize the network, but I don't want it to be open to everyone for use with the GUI / CLI - just for me).

Is there an available bash script or detailed instructions that will let me get a full (remote-connectable) node up and running? This would include opening relevant ports so that I am able to connect remotely.

Edit: Authorization to connect to RPC is not a requirement for an answer, simply instructions on how to make the full node remote connectable will suffice.

you'll want to restrict the RPC, otherwise other people that get access to your node can shut it down.

./monerod --rpc-bind-ip <external.ip.of.node> --restricted-rpc --confirm-external-bind

Binding to the external IP will allow you to connect from outside of your home. You might want to also use --rpc-bind-port <portnumber> if you want to reduce the chance that others will find your open node, like this guy: https://moneroworld.com/#nodes


Overclocking In Linux With Wolf or Silentarmy Does anyone know of an overclocking utility for AMD/ATI cards in Linux similar to wattman for windows? The latest crimson drivers don't seem to have such a utility built in. Moreover, the settings for overclocking in wolf's xmr miner don't seem to do anything and I don't see similar settings in silentarmy's miner.

I tried on Lubuntu 16.04 with sgminer-gm, and the settings didn't seem to change anything as well. It is as if the card is just ignoring the OC settings.

It seems that for Linux, it's not so straight-forward to OC. I remember reading somewhere that you can do it by changing the GPU BIOS. Haven't done it myself yet so can't really give guidelines.

Here I found mention use of some aticonfig script to OC. Maybe it's worth investigating further. Some more info here.


Monero GUI isn't synchronizing I open and connect to the daemon.  The wallet says it's synched, but it's been two months since I've last opened the wallet.  There's no way it is synching and I've sent a deposit that isn't showing up.

Your daemon may have crash or been out of sync.
Considering the two month you mention, you should download the last 0.12.2 GUI from the website which solves a bunch of problems with the daemon.


Instead of trying to figure out how a pool operates by analyzing network traffic, you'd be better off studying the source code of working pools such as:

node-monero-pool
Monero Stratum
Miningcore


WINDOWS - GUI v0.12 does not launch / start The new GUI (v0.12) does not start / launch, whilst GUI v0.11 used to work properly. How do I resolve this issue?

This issue can be caused by two things, namely (i) the path to monero-wallet-gui.exe contains a non-ASCII character or (ii) monero-wallet-gui.exe cannot properly use OpenGL rendering. The first issue will throw an error similar to this:

"Runtime Error" - This application requested the runtime to exit in an unusual way.

The second issue, however, will not throw an error. These issues are resolved as follows:
Issue 1:
Ensure the GUI v0.12 binaries (the .zip file) are extracted to a directory whose full path does not include non-ASCII characters. Thereafter, however, it could be that you incur issue 2.

Issue 2:
Launch the GUI v0.12 via the start-low-graphics-mode.bat that is included. This ensures the GUI uses the Qt Quick 2D Renderer instead of relying on OpenGL. More information about the Qt Quick 2D Renderer can be found here.

Qt Quick 2D Renderer is an alternative renderer for Qt Quick 2 that uses the Raster paint engine to render the contents of the scene graph instead of OpenGL. As a result of not using OpenGL to render the scene graph, some features and optimizations are no longer available. Most Qt Quick 2 applications will run without modification though any attempts to use unsupported features will be ignored. By using the Qt Quick 2D Renderer it is now possible to run Qt Quick 2 applications on hardware and platforms that do not have OpenGL support.
Qt Quick 2D Renderer is a Qt module that contains a scene graph renderer plugin.


Please wait 20 minutes for your entire balance to become spendable I keep receiving a message that shows my Monero balance, but spendable balance is zero. The prompt reads "Please wait 20 minutes for your entire balance to become spendable". It has been over an hour. What should I do?

Any transaction (XMR) received has to be 10 blocks old before becoming spendable.

New blocks are mined roughly every 2 minutes, so roughly 20 minutes.

If the monerod/node you are connected to is not fully synced, your balance will not become spendable until the node is synced past your transactions block + 10.

Same problem, if your wallet is having problems syncing from whatever node you are connected to.


Viewkey for outgoing transactions Here fluffy mentions the possibility of maybe modifying a viewkey in such a way that you can also see outgoing transactions. Does anyone have any more info on what exactly he meant or how it would work?

Recently there was a post on Reddit asking almost the same question which generated quite some additional discussion (although without much positive outlook). Here's a comment by me giving an answer to the original question:

I asked moneromooo about this on IRC, and he said that what's mentioned by u/fluffyponyza in the presentation probably refers to an idea that was discussed on IRC a very long time ago and implemented in moneromooo's viewkey-R branch. The basic idea seems to be to generate the tx pubkey somehow deterministically with some nonce such that a view-only wallet (i.e. an auditor) can recognize outgoing transfers. This approach is however quite problematic and unreliable as the wallet owner needs to follow a specific procedure when creating a tx so that the auditor can see outgoing transfers; i.e. there needs to be trust between the two parties for the scheme to work. As such, the development was abandoned.
Here's the log of IRC on 2017-April-10: https://paste.fedoraproject.org/paste/hnmDKpT5U~kJyCHi0NP4BV5M1UNdIGYhyRLivL9gydE=


MyMonero still safe? I've been reading a lot of people mentioning they have had their XMR stolen from mymonero. I'm not sure if they are falling for phishing scams or if the 13 words seeds are compromised on mymonero and I am worried. It seems as though mymonero hasn't received any updates since 2016 so I am also worried they might disappear and I won't be able to access my funds.

My questions.

Is MyMonero.com no longer safe?

If MyMonero.com goes down can I use my private key in the GUI or CLI clients?

While I don't know positively that mymonero.com is or is not compromised (I don't have any indication that it is), any web-based wallet is inherently unsafe compared with an official CLI or GUI based wallet. There are gradations of safeness one could say and a web-based wallet is on the very insecure end of the spectrum. On the top end would be a disconnected (cold) dedicated hardware wallet.

The good (and trusted) gentleman who runs mymonero.com advises not to store large amounts in the wallet. Basically, a good rule of thumb is: Only store as much money in a web wallet as you are willing to pay for the comfort of having a web wallet. Basically, only store as much money there as you are prepared to lose and don't come crying if your money is gone if you stored it in a web wallet.

As stated on the sign-up page of mymonero.com:

  Understand the Risks in Using MyMonero MyMonero is a web-based
  interface that allows you to use Monero without running a full Monero
  node. However, because this convenience comes at a cost: it is
  extremely difficult for MyMonero to securely deliver its code to your
  browser. This means that there is considerable risk in using MyMonero
  for large amounts!

  It is recommended that you treat MyMonero as you would treat your
  actual wallet, and not store very large amounts in it. For long-term
  storage of Monero you should create a cold wallet using MoneroAddress
  or similar.

A sobering and very enlightening reddit is here:
https://www.reddit.com/r/Monero/comments/52sw9r/9830_xmr_stolen_from_my_mymonerocom_wallet_be/

The upshot is that the number of potential exploits that can be used to exploit a web wallet are tremendous and out of the control of the web service providing the service. This is in addition to the possibility of the web service itself being compromised and delivering faulty code.

Edit:
There is a communication from fluffyponyza here about recent thefts from mymonero.com: https://www.reddit.com/r/Monero/comments/7kmzkv/psa_regarding_recent_reports_of_mymonero_thefts/

Also forgot to answer your second question:

  If MyMonero.com goes down can I use my private key in the GUI or CLI
  clients?

Yes you can. You need your viewkey and spendkey and your address which you can get from the mymonero.com under Account => Account Details. You have to do this obviously while the site is alive.

Just start the Monero GUI, and after you have choosen your language click on "Restore wallet from key or mnemonic seed". Then click the "Restore from Keys" tab.

Put in your address and viewkey and spendkey keys and you are away.


What is src/blocks/checkpoints.dat and why is it not plaintext in the source code? What is src/blocks/checkpoints.dat and why is it not plaintext in the source code?

In the source code src/blocks for Lithium Luna I see checkpoints.dat but it is not plaintext. I was under the impression that all source code should be human readable.

Can someone explain what this file is and what scenarios result in non-plaintext files in source code? Many thanks!

It is the set of block hashes from the genesis block to a fairly recent block, and is used to speed sync up for historical blocks. It is typically updated shortly before a new release.

Those hashes are stored as is so they can be read without having to parse hex strings, which would be slower and use more memory.


Longest orphaned chain In the history of Monero, what was the longest chain of orphaned blocks?

Can I easily find the answer by inspecting the blockchain?

Its dificult to tell what is the longest, I personaly believe that should be the one created on the 4 september 2014 attack at block 122051, that block is hardcoded on the code so the daemon never sync for the orphan blockchain...

Still, I believe that some botnets keep mining on old block versions, thats the reason why on the daemon some times show messages pointing that we are X blocks haead

At the momment I dont think any explorer show that chains


Calculating subaddresses The PR for subaddresses and MRL-0006 say that the value m is calculated as:

m = H_s(a, i) or H_s(a || i)

I have found another question attempted to find the answer to my same question, however I am not sure if it is up to date and also is not completely specific. (How is m calculated when generating subaddresses)

Is this prefix going to be included in the actually v0.12 release? I cannot find any related code in the v0.12 branch on Github. Additionally, is the i value varint encoded? In the code linked at the above question, it looks like it simply would append the two uint32_t values.

I seemed to have found where I was confused, as the subaddress code was moved the the device directory

https://github.com/monero-project/monero/commit/27a196b1268718dbc41e308c93b35c58f2da2eb4#diff-202edf76a605025eecb843af6b25fe80L114

This seems like a confusing change to me.


Are multiple base points or generator points used for the ed25519 curve in monero / CN? Does the point ever change for different keys or other functions that use the curve?
If the point never changes is the only curve input parameter the index (r) that is used in the scalar multiplication?
I saw that the base point (G) is (x, -4/5)  or hex 5866666666666666666666666666666666666666666666666666666666666666
source. But link there to here where the coordinates of the base point
are stated as [15112221349535400772501151409588531511454012693041857206046113283949847762202, 46316835694926478169428394003475163141307993866256225615783033603165251855960] how is the connection from the hex value to the point?

Yes. There is nothing special about the base point G that you mention. It's just an arbitrary point agreed upon by convention to be used to transform private keys (scalars) into public keys via scalar multiplication. Scalar multiplication with points other than G happens during the Diffie Hellman exchange which is part of the generation of stealth addresses. There is also another base point H which is used for creating Pedersen Commitments. H is specifically chosen such that the discrete logarithm with respect to G is unknown (i.e. H = nG, but H was chosen such that n will never be known).
Because of (1.), you now know that scalar multiplication is done with arbitrary points and not just with G.
EC points exist in a 2D finite field, so can be represented with two coordinates. However, because the Ed25519 curve is symmetrical across the y-axis, it's possible to represent a point simply with the y-coordinate and a sign bit that indicates which of the two possible x-coordinates is the correct one. This is called compressed representation, and is how Monero EC points are stored on the blockchain.

5866666666666666666666666666666666666666666666666666666666666666 is a little endian hex representation (i.e. the byte order is reversed) of the decimal number 46316835694926478169428394003475163141307993866256225615783033603165251855960, which is the y-coordinate stated in the link you've mentioned.


How will RingCT interact with view keys? Can view keys reveal the amount of a transaction? Will they be able to view outgoing as well as ingoing transactions?

View keys will be able to reveal the amount of an incoming transaction, as currently. They will not be able to view outgoing transactions, as currently. Basically, nothing changes on that front.


Are there VPN providers accepting monero? Bitcoin is pretty widely accepted to purchase VPN services. I'm curious if monero is accepted by anyone yet.

Cryptostorm accepts Monero directly. Some community feedback for the VPN can be found on Reddit.

Any Bitcoin accepting VPN can be paid with xmr.to or shapeshift


Are there any open source block explorer available? If so, can a link to their source code please be provided?

There is the Onion Monero Blockchain Explorer. The README says it's open source but no license is explicitly mentioned.


What is the "SpendProofV1..." or "OutProofV1..." in the details of a sent transaction in the GUI? I'm guessing it's either the Confidential Transaction range-proof? Or is it some kind of proof-of-payment I can send to the recipient to prove... payment...?

Either way, what privacy or security is lost if that detail is shared or exposed?

tl;dr:

OutProofV1 strings prove you had access to the wallet that constructed a particular transaction. SpendProofV1 strings are used when some wallet information has been lost (because txkeys are lost forever if you don't store them), and instead prove you had full knowledge of the private keys of the inputs being spent in a transaction.

Strings beginning with "OutProofV1" directly disclose the per-recipient "key derivation", which in turn allows someone to determine the per-output shared secret for the output you claim to have sent. Indirectly, this information allows the id of the related transaction to be identified, and then the amount of the output sent to the recipient to be decrypted and any encrypted payment id to be decrypted. If you know a list of potential wallet addresses that the transaction could have been destined for, you can test whether any of those wallet addresses were the destination of the transaction.

Strings beginning with "SpendProofV1" indirectly disclose the id of the related transaction.

Knowing the id of a transaction allows all public information about that transaction to be discovered (such as any old-style unencrypted payment id used, the time and date of the transaction, the ring size used and the fee amount paid to mine the transaction).

Monero's untraceability (i.e. knowledge of the inputs actually being spent in the transaction) is unaffected either way. Your wallet address is not leaked in either scenario either.

The full answer:

If you see a string beginning with "OutProofV1", then the characters that follow contain the per-recipient "key derivation" (32 byte elliptic curve point) and a Schnorr signature (two 32 byte scalars). These are base58 encoded.

The the "key derivation" can be used to calculate the per-output shared secret which can be used to decrypt the amount sent and decrypt any encrypted payment id that is present.

The Schnorr signature proves that you have knowledge of the transaction private key that correlates with both the key derivation and the transaction public key.

Although the OutProofV1 string directly only discloses the per-recipient key derivation, it indirectly discloses more than this. The per-output shared secret can be calculated and used to attempt to decrypt the amount of every single output on the blockchain (via the ecdhInfos section of each transaction). When a decrypted amount appears that is within the allowed range of Monero output amounts (i.e. less than 2^64 piconero), this is very strong evidence that the shared secret applies to that particular output.

Therefore knowledge of the OutProofV1 string discloses the related transaction, the amount of the output transmitted in that transaction (only the amount of the output destined for the other person, and not the amount of your change output), and can decrypt the encrypted payment id associated with that transaction.

If a database of possible wallet addresses is available (e.g. by scraping Monero addresses from internet web sites), then it would be possible to use the key derivation to check whether the output was destined for any of those wallet addresses. Note that this only works if there is a possible wallet address list to check against. If the wallet address of the recipient is unknown, then it is impossible to determine it. It would not be possible to test if the change addresses in the transaction are destined for any particular wallet address, because the key derivation that applies to your change outputs is different than the key derivation disclosed by the OutProofV1 string.

If you see a string beginning with "SpendProofV1", this means that the transaction private key (txkey) was not available. This could be because you had made the transaction from a different wallet. If you don't preserve knowledge of a txkey after making a transaction, it is lost forever and cannot be recovered by scanning the blockchain. It also means you will be unable to recover the per-output shared secret for the output sent to the other person in the transaction.

Since you can't prove knowledge of the txkey or the per-output shared secret, you can instead prove that you owned the outputs that were spent in the transaction. The transaction you originally sent would have already included a ring signature proving that you owned one output per ring in the transaction.

The SpendProofV1 string contains a second, newly created ring signature that proves exactly the same input ownership again, but using different random initialization data. Only someone that owned the inputs of the transaction would be able to create this second valid ring signature. That is all the SpendProofV1 string contains. There is no key derivation communicated, because it is unknown by the wallet in this scenario.

Since the ring signature(s) in the SpendProofV1 string will be valid for one of the transactions on the blockchain, it would be possible to identify the transaction from this SpendProofV1 string.

In both scenarios, knowing the id of a transaction allows all public information about that transaction to be discovered (such as any old-style unencrypted payment id used, the time and date of the transaction, the ring size used and the fee amount paid to mine the transaction).

In both scenarios, Monero's untraceability (i.e. knowledge of the inputs actually being spent in the transaction) is unaffected. Your wallet address is not leaked in either scenario either.


How to run xmr-stak with AMD gpu on Ubuntu 18.04 I have tried several attempts but without success. AMDGPU-PRO 17.40, 17.50, Oibaf PPA and something more, but nothing makes clinfo gives right results and xmr-stak working.

Any ideas?

The AMD drivers are indeed frustrating on Linux, but these are required by XMR-Stak for AMD cards. You will almost certainly need to download the official drivers from AMD and try the various releases until you find one that works with your specific card. For me, this was only amdgpu-pro-17.40.2712-510357, but it depends which card you have. There are several minor point releases and finding one that works is honestly trial and error unfortunatley.

The other issue you may face is that you are on Ubuntu 18.04 - and none of the currently released drivers state supporting Ubuntu 18.04, you might get lucky though.


How do I fix build error about fPIC? I recently built Monero from master on Manjaro, and there were no issues.  I then built the same commit on an Ubuntu computer and received an error about fPIC.

Like ... .rodata' can not be used when making a shared object; recompile with -fPIC

Note that the Ubuntu dependencies had previously been installed via apt package manager.  Similarly, the Manjaro dependencies had been installed via pacman package manager.  Also, Ubuntu (Lubuntu) is actually 16.04.3 LTS, and Manjaro is 17.1.5.

Also note: I successfully built by editing CMakeLists.txt and commenting out set(PIC_FLAG "-fPIC") and add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS) (not 100% sure the second one was needed).  I'd rather just recompile with fPIC, but I don't quite understand what that entails.

Side question: what is it about Manjaro that prevented this fPIC issue?

Real question: how do I go about fixing my dependencies to deal with fPIC?

I did this to recompile libgtest-dev with -fPIC and it worked for me.

sudo apt-get install libgtest-dev
cd /usr/src/gtest/
sudo cmake -DCMAKE_CXX_FLAGS="-fPIC"
sudo make
sudo mv libg* /usr/lib/


Why do we use different H values in a vector Pedersen Commitment? The usual Pedersen Commitment looks like such:

C = xG + aH

Where x and a are scalars.

However, we can also commit vectors, s.t.

C = xG + (a_1 * H_1 + a_2 * H_2)

Could anyone point out why we change the H values for each vector value (a_1 and a_2)? To my knowledge, having the same H for a_1 and a_2 would still be perfectly hiding.

a_1 means 'a subscript 1' denoting the first scalar value in the vector a.

I believe H_i is calculated s.t. H_i = Hash(G + i) * G

It is correct that using the same H each time would be perfectly hiding. However, the job of a Pedersen Commitment is not only to hide, but to commit.

If you used the same H each time, then all you would be committing to would be the sum of all components. You could later pretend that you had committed to a different number of components or to different component values as long as they still added up to the same amount.


How is a block hash calculated? I am trying to understand how Monero hashes blocks.
I understand there is something called a "block hashing blob" that is combined with a nonce, but how can I get the block hashing blob for a specific block?
I tried the Monero Daemon JSON API get_block, which has a field blob in the return value (Python):
from Crypto.Hash import keccak

hash_blob = daemon.get_block(1)["blob"]
k = keccak.new(digest_bits=256)
hash_bin = bytes.fromhex(hash_blob)
k.update(hash_bin)
print(k.hexdigest())

The hash blob returned for get_block(1)["blob"] is:
0100d186c49a05418015bb9ae982a1975da7d79277c2705727a56894ba0fb246adaabb1f4632e345fc7c30013d01ff0109c0a710025f391ad90e8b64ef432a0a28d0d9d699189b9c1322248ddbdb699c101a3cd9c3c0a8a5040233b81ac838467f7c59079e80517be1a45de51248a9bd841bf783e0aca7b2d5e2808ece1c023dc61a8cab11504ef1a36c51affeb7eed222cd09c98bf5045e489c23b409c9bc80c2d72f022caa4a9af327b36df136599a104278cf44342b0732bb5ad8c4c3582531add94b80a8d6b90702f9edf7d361176a29d1ce53e890e6ebc1e721d9719d273b69f1eb15d96025c6348088aca3cf02022e5ba472765cb2297f51f1a47aaf5f358cf48e16593c25bfc1880578014a65ed8090cad2c60e021b82a36cde1c9a6103d99ea6ebfb9f82b2547cef8934d8e87cf5e20c098ede9c80e08d84ddcb0102b37974cac8678446a230fb3e1b0ec06d56666bf0bf43dd64ff096a01f5aa2fda80c0caf384a30202a0c492751cb53389c9228f68b1ec1be831fb774a285f06c4ee02053858486e8221012a9fca96074c5216f9622c58c5c95024e53ff579d128913548363cb14d7f637400

and running the above code for it prints:
e26f21cfccf0ac4297647c879be976ed427e97ce02745dbbd6385decc8af6b53

querying the deamon for block 1, as in get_block(1)["header"]["hash"], I get hash:
771fbcd656ec1464d3a02ead5e18644030007a0fc664c0a964d30922821a8148

So, obviously this is quite different. get_block_template seems to produce something that could be combined with a nonce to build a valid hash, but this seems to be only for new blocks.
How do I calculate the hashes for an existing block? Some pseudocode or similar is fine, I tried to read some of the Monero C code, but it jumps around and my C/C++ is a bit limited, so couldn't quite figure it out.
I understand the block hashing blob would need things like coinbase transaction, merkle tree root, nonce, etc. But I also understand I need to combine them in a very specific way to get the exact correct hash. So first to build the block hashing blob, then to combine it with nonce..
An example for a block would be great but anything helps..
EDIT: I modified the daemon to add the block hashing blob to the get_block RPC method. With this I get the block hashing blob for block 1 as:
0100d186c49a05418015bb9ae982a1975da7d79277c2705727a56894ba0fb246adaabb1f4632e345fc7c3052578a3816ec18ca6db2ec4f594b7c8a778caa4c52d2c1705bcbab9798a9ea7b01
However, calling cn_slow_hash from pycryptonight on this does not give the correct hash:
pycryptonight.cn_slow_hash(binascii.unhexlify(hashblob), x)
Where x is the hash variant, I tried values 0-4. The block hash in the get_block(1) is 771fbcd656ec1464d3a02ead5e18644030007a0fc664c0a964d30922821a8148 but the value returned by variant 0 for above is 5aeebb3de73859d92f3f82fdb97286d81264ecb72a42e4b9f1e6d62eb682d7c0.
If I run the same for height 1407480 as in question Can't seem to reconstruct hashing blob for old block, I get the same hashing blob as mentioned in that question (0606f8e7a8ce05a5449f2dc32fff0730d58751fac5a2b9d58c59622f8a8d58d18e9886eddcdb01bb8c00006b4c34591fb7dd7d6664881f7c7e675aae7709d0acca033c6226727125c2127a17), but hashing it does not give the same hash as given for the block. Just like in that question, not able to get the correct hash.. But also do not understand how the author of that question fixed it.
What could be wrong with the hashing I use here?

How is block hash calculated?

You create a block hashing blob (which is the block header, the tree root hash of the blocks transactions and a varint of the transaction count), then hash this using the RandomX1 hashing algorithm.

The hash blob returned for get_block(1)["blob"] is...

That is not a block hashing blob, that's the block blob as returned from the RPC get_block.

How do I calculate the hashes for an existing block?

For an existing block, obtain the block blob (per above), parse it to extract the header and transactions, construct your hashing blob (per above) and hash that.

...then to combine it with nonce

An existing block already has the nonce data, which can be in both the block header / in the miner transaction. Thus you don't need to do anything particular with the nonce data for an existing block - rather what you need is the block blob data and a way to parse it (extract the header and transactions) so you can construct a hashing blob.
1 Note you need to use the correct PoW hashing algorithm based on the block height you are checking as the algorithm bas changed over time. The current algorithm is RandomX, but if you want to validate block 1 (which is something you mentioned) you'd need to use the original CryptoNight algorithm in that case.
UPDATE (based on comments below)
Note the term "block hash" can refer to either the PoW hash or the block ID (as used by block explorers etc). These use the same input data as described above but use different hash functions. For the latter you need to use Keccak-256.


How can I use a private node on Wolfram Warptangent? I'm using the instructions found on https://www.moneroclub.com/node with no luck. Are these commands still used in monero-wallet-cli?

First thing to note is that simplewallet was renamed to monero-wallet-cli in Wolfram Warptangent. Secondly, it could be that the node is currently offline. There are other remote nodes available here. To quote:

node.moneroworld.com are nodes that are from Monero long-term community members, so high trust level
2nodez.moneroworld.com are nodes from anyone (includes the nodes in node.moneroworld.com)
Connect to a random remote node by pointing your wallet to node.moneroworld.com or 2nodez.moneroworld.com, using the following commands:
(linux / unix-type)
./monero-wallet-cli --daemon-host node.moneroworld.com
or ./monero-wallet-cli --daemon-host 2nodez.moneroworld.com
(windows)
monero-wallet-cli.exe --daemon-host node.moneroworld.com
or monero-wallet-cli.exe --daemon-host 2nodez.moneroworld.com
or download this file to your monero folder and double click on it.
Remote nodes are secure - they can't spend your money. You do sacrifice privacy though, and you really should be running your own node, you know, because decentralization. But I understand that convenience wins out.

Note that you have to launch monero-wallet-cli from the terminal (on Linux and mac OS X) or from the command prompt (on Windows) with the aforementioned commands. To open the command prompt on Windows you have to go to the folder monero-cli-wallet is located and make sure your cursor isn't located on any of the files. Subsequently do SHIFT + right click and it will give you an option to "Open command window here".


How does CryptoNight "depend on all the previous blocks"? Originally, I thought the CryptoNight puzzle was similar to the SHA2 puzzle, with a more exotic hash function replacing SHA2. In other words, the puzzle was essentially H(prev||nonce) < diff, but with H being the slow_hash in the CryptoNote code.

However, the CryptoNote website's description actually says, "As opposed to scrypt, every new block (64 bytes in length) depends on all the previous blocks. As a result a hypothetical "memory-saver" should increase his calculation speed exponentially."

I looked at the mining code, but I couldn't figure out how the puzzle differed from the one I described above. With that in mind, what exactly is the CryptoNight puzzle? How, exactly, does it depend on all the previous blocks (rather than merely the one immediately prior to it) in a way that scrypt does not?

I think the CryptoNote website's page about the egalitarian proof of work is about the inner working of the hash function, not about how the hash of a block is computed (which is basically cn_slow_hash(block_header + tree_hash(block_transaction_hashes)) as you thought).

Internally, the Scrypt function computes blocks of pseudo-random data. Something like:

B0 = SMix(B0, N)
B1 = SMix(B1, N)
B2 = SMix(B2, N)
...

The computation of the next value of block Bi only depends on the current value of Bi, therefore the computations of blocks B0, B1, B2... can be done in parallel.

The CryptoNight function also computes blocks internally, but computing a block depends on the previous blocks. Something like:

B1 = AES_rounds(B0)
B2 = AES_rounds(B1)
B3 = AES_rounds(B2)
...

Therefore the blocks can only be computed one after the other, because computing B5 requires B4, which requires B3, which requires B2, etc.

Description of the CryptoNight algorithm: https://cryptonote.org/cns/cns008.txt


Monero Fork: Transaction hash is not generated from the wallet RPC I have forked monero and created a separate chain. When I transfer money using the wallet RPC, money gets transferred and the remaining amount is updated in the balance. Then, the transaction hash is not created. After checking with an explorer, I can see it's in the mempool. Blocks are not created for more than 22 hrs but network hashrate is 2 Mhs.

Any solutions, Please.

Thanks in advance.

If the tx is in the mempool, a tx hash must exist. If the wallet RPC is not returning to you the tx hash in the result of the transfer call, your fork codebase has issues. Blocks not being mined could be related, but could equally be an issue with your miners or pool implementation (which obviously also need to be updated inline with your fork code changes).


Kovri network analysis - Monero vs non Monero usage Can a Kovri network observer distinguish Monero traffic from non network traffic? If no how could the success of a campaign to increase non Monero Kovri usage be measured?

The kovri traffic is hidden by i2p protocol.
This protocol hide the final destination to each node in the path to this destination.
So there is technically no way to tell if the traffic is monero traffic or anything else.
That's the beauty of i2p.

To be more technical: garlic routing and garlic encryption take care of encrypting your message in the same layered-deepness than the nodes you should go through within the tunnel to your destination.
You will use successively each node public key to encrypt the message layer by layer so that each node on the path will use its private key to decrypt the outer layer and know the next node to pass inner message to, and so on until the final destination.

There is no way to measure the non-monero usage of kovri.


Any thought on the Minergate hard fork of Dashcoin? Is it a 51% attack? You can read the whole thing on the Dashcoin thread on bitcointalk.org
I'll keep things short. Since Dashcoin is a copy of Bytecoin, it was effected by the same bug found by the Monero team back in Feb and published in April. Dashcoin team then released a fix in May to all exchanges and pools, here are a couple of quotes from the bitcointalk thread:

Minergate are aware about the problem since 13 April (they integrated
fix for Monero and Bytecoin), they got a separate fix for DSH since 9
May, and they get notified about the double spending less than 24
hours after it occurred on their chain.
They said their damage is 10000 DSH, we offered them 20000. The reply
after was they have too much tech difficulties to roll back. That was
1 or 2 days after the split. Their next offer was to join their chain,
but at the time there was already 17000000 DSH double spent on their
chain.
Now their damage purely because of mining is between 150000 and 200000
DSH, and they cannot simply roll back because it will damage too much
reputation.

After suspending Dashcoin payouts for a few days, Minergate finally released a statement which basically saying they decided to stay on the old chain and apply their own "fix" to it.
I have great doubt they would actually "fix" anything since they don't even have a GitHub repo for Dashcoin...
However, the problem is Minergate controls a majority of the hashing power of Dashcoin (145.9 kH/s Minergate    188.4 kH/s total, checked as I wrote this), and it seems like they got HitBTC on board too (Cryptopia seems like agree to use the new chain). So what they are doing is hijacking their miner's consensus and hashing power to stay on the their "fixed" chain, which results in a hard fork.
By July 6th

Original Dashcoin blocks: 762722
Minergate Dashcoin blocks: 781184
Chainradar Dashcoin blocks: 781136
Check block 781135 on minergate and chainradar, they are the same.

This is not even a hard fork, this is a pure hostile takeover, and most of their miners don't even know what is going on.
I stopped mining with Minergate since I found out about their bad reputation. But what this hard fork action implies, is much scary IMO.
Any thoughts on what is going to happen?

I don't think we can blame Minergate for a bug in other organization's code... Like with all cryptocurrencies the blockchain with most users will win despite the question which of the branches of blockchain is officially sanctioned.


Monero hashrate falls dramatically on Azure Windows 10 Pro I am mining Monero offline using ./monerod --ofline on a Windows 10 Pro virtual machine with 2 VCUs in Microsoft Azure.

Mining is performed in M2SYS using the start_mining command with 2 threads (this is the maximum).

I use show_hr to view the hash rate.

The initial hash rate average was 65 h/s. I left it running overnight and noticed that at somepoint the hashrate dropped to 17 h/s. This was an instant drop and not a general tapering off.

I am trying to understand why this drastic hash rate fall has happened? I initially thought this could be an issue with cloud hosting when a session is not active however this makes no sense to me as most servers run efficiently without a user being logged in in an active session.

I have since used stop_mining and start_mining 2 to restart mining. However, the hashrate is still much lower than when I first started yesterday. Any ideas? Could this be a timing coincidence with a general change in the monero hashrate - if so, how do I comfirm this?

Mining of cloud based virtual servers will always be poor and susceptible to changes in HR. With virtual servers you are sharing CPU resources, and with CrytoNight, you need 2MB CPU cache per thread for optimal performance. A virtual server will never give you exclusivity over CPU cache, hence you'll see changes. Further, most hosting companies forbid mining, so If they detect it, they'll drop your resources.

TL;DR never mine on cloud virtual servers.


Monero block reward schedule Does the Monero block reward just decrease and I don't mean the transaction fee. Are there any specific dates of this when it will happen?

Monero has a "smooth" emission. This means the block reward decreases gradually until it hits 0.3 XMR per minute. Subsequently, the tail emission kicks in and the block reward will remain 0.3 XMR per minute indefinitely. This will occur in approximately 2023. Note that the tail emission is not inherent to CryptoNote, but was specifically implemented in Monero.

In the CryptoNote whitepaper the emission is described as follows:

  6.1 Smooth emission

  The upper bound for the overall amount of CryptoNote digital coins is:

  MSupply = 2^64 − 1 atomic units.

  This is a natural restriction based only on implementation limits, not on intuition such as “N coins ought to be enough for anybody”. To ensure the smoothness of the emission process we use the following formula for block
  rewards:

  BaseReward = (MSupply − A) >> 18

  Where A is amount of previously generated coins.


Run monero only in local network I want to run some tests on monero, but I only want monerod to communicate to peers on my local network.  I don't want it download the official blockchain.  I want my wallet, which I will run from my local network, to only send transactions to the monerod instance running on my local network.  Therefore, the blockchain on my computer will only have transactions from me.  Is this possible?  I see that you can run monerod in offline mode, but I'm not sure if this does what I want.

Start 2 nodes of a stagenet which only like talking to each other:

monerod --stagenet --no-igd --hide-my-port --data-dir node1 --p2p-bind-ip 127.0.0.1 --p2p-bind-port 48080 --rpc-bind-port 48081 --zmq-rpc-bind-port 48082 --add-exclusive-node 127.0.0.1:38080
monerod --stagenet --no-igd --hide-my-port --data-dir node2 --p2p-bind-ip 127.0.0.1 --rpc-bind-ip 0.0.0.0 --confirm-external-bind --add-exclusive-node 127.0.0.1:48080

Then start cli wallet on the same machine:

monero-wallet-cli --stagenet

and create a wallet. Use your new stagenet address to mine on one of the nodes by typing

start_mining <yourwalletaddress> 1

in the monerod window.

Notes:

This also works on windows
The above statements will create two directories in the working directory named node1 and node2 to hold the blockchain.
The new wallet files will also be in the working directory.


Monero pool configuration I am trying to configure a pool using node-cryptonote-pool.

I have a few questions about how to setup config.json.

This section in particular: Code

And even more specifically, these lines:

"transferFee": 5000000000, //fee to pay for each transaction

"minPayment": 100000000000, //miner balance required before sending payment

"denomination": 100000000000 //truncate to this precision and store remainder

Should transferFee be 0? What about the other 2 settings? Thanks in advance!

"transferFee" should be set to 0, as it's an obsolete setting: the wallet will calculate the fee for this transaction based on its size.

"minPayment" is the amount of monero a miner should reach before a payment is made.

"denomination" is the granularity of the payment made. That is, payments will be made in multiples of that number (most likely leaving some unsent small amount in the miner's pending balance).

Note that all amounts above are expressed in atomic units, of which there are 1e12 per monero. For example, 1 monero is 1000000000000, 0.1 monero is 100000000000, etc.

To give a more real world example of minPayment and denomination, you could compare it to a scheme where you pay someone, but only using fairly large coins. For instance, with 0.10 coins, if the person you're paying has a balance of 0.46, you can pay 0.4 (4 coins), and the remaining still unpaid balance is 0.06.

With RingCT, denomination does not matter anymore, since amounts are not decomposed in several outputs anymore, so there is no dust problem. Therefore, denomination can be set to 1.


Funds in limbo because the transaction took too long, how do I get them back? I sent XMR in two transaction attempts to an exchange that required the purchase be funded within 3 hours.
For some reason, even though I had smaller previous transactions go through successfully, these did not.
The recipient says my transaction id is not in their system.
One of them looks fully completed in XMRchain.net.  The other shows up in my wallet's transaction list as "unidentified recipient".
In either case, they don't have the money and neither do I.  This was 5 days ago.  When I look up the transaction id, the confirmations are in the 4000s.
How do I get the funds back?

The recipient says my transaction id is not in their system.

Assuming you sent to the correct address and the tx has been mined, you can provide the recipient with a proof of payment. See: How to prove payment

One of them looks fully completed in XMRchain.net. The other shows up in my wallet's transaction list as "unidentified recipient".

If you sent funds and the tx has has been mined (so you can find it on an explorer like xmrchain.net), the only way to "get them back" is by asking the recipient to refund you.

If you sent funds that have not been broadcast or mined (i.e. they are stuck pending), see this Q/A.

When I look up the transaction id, the confirmations are in the 4000s... How do I get the funds back?

See point #1 above.


Is the Bytecoin proposed scheme to scan numerous addresses faster interesting for Monero? What was the technical scheme proposed by Bytecoin to scan a set of addresses faster, for instance for merchants? Was it discussed for Monero?

Bytecoin's scheme is to create addresses which differ in their spend key, but not in their view key. In that way, they are able to scan incoming transactions once, using the shared view key, while being able to distinguish the provenance (assuming they assign one such key per possible sender).

I like this system, as it's pretty simple, very scalable, and even decreases the space needed on the blockchain due to not needing a payment id.

I do not think it was discussed for Monero, though moneromooo has said to like that scheme.

It is pertinent to note that these different addresses are still half identical, and thus two such addresses can be trivially known to be the same owner.


Uptime proof for your Loki Network Service Node? Is there a way to check the uptime of my Loki Network Service node?

The easiest way is to use the telegram bot to monitor your loki service node: Message on telegram: @LokiSNBot

Or do it via the website: https://lokiblocks.com/  -- You can get your Service Node pub key on the command line with: ./lokid print_sn_status


Do you experience much more crashes/restarts of xmr-stak with the latest 2.3.0 version (Vega 64 rig)? I was using the old 2.2 version for about 3 months. I used it along with the 'JJ's XMR-STAK HashRate Monitor and Restart Tool' on Windows 10 with the blockchain AMD driver (Aug 2017). Mining rig contains 4x Vega 64 and one Vega 56. On a good day it will restart itself about 5-6 times "soft restart" and 2-3 times "hard" (OS restarts itself). On a bad day it will go up to 15-20 softs, and 4-5 hards.

Recently I've installed the new 2.3.0 version (monero7) and now I experience about 30-40 soft restarts and about 10-15 hard using the exact same configuration settings for the cards and the miner.

Do you experience similar problem with XMR-Stak 2.3.0?

Any idea how to avoid it?

(btw, I've tried to use the newest AMD driver - not just the hashrate was about 10% lower and in the same time power consumption 10% higher but also the restart rate was about the same).

At this time, with cryptonight_v7 you're not mining Monero. You should use the cryptonight_v8 algorithm with the latest xmr-stak 2.7.1 to mine Monero, but when the question was posted probably there was no v8.

Anyway, the new algo (before the v7 and now the v8) is more hungry with power consumption and you must use different settings to find a good sweet spot.

The new xmr-stak version provides you an autoconfig function pretty useful with double thread enabled. So, you can use it to find the best settings for your hardware.

Apart from that, the AMD blockchain driver (Aug 2017) is a BETA software and it can cause many issues. The latest Adrenalin is more stable and, enabling compute mode, it can give you same hashrate as blockchain driver.

Last, but not least, soft and hard restarts (or crashes) in the most part of cases are due to overclocking, undervolting or power issue. A VEGA card can require a lot of power during mining, so check if your PSU can handle all that hardware and try to set less aggressive settings for overclocking and undervolting.


Technical questions about addresses and keys As I understand, the private spend key is 256-bit value and this key determines exactly all other keys. Are there exactly 2^256 options when creating a wallet? i.e. does every 256-bit value can be used to generate a unique wallet? (I know that in bitcoin for example, this is not the case - 2 private keys may correspond to the same bitcoin address)
When generating a wallet using the official cli wallet, every private spend key corresponds to a mnemonic seed. How does this affect the size of the set of keys that can be generated by the official cli wallet? Can it generate every possible private spend key or is the mnemonic seed mechanism limits it?

That's almost right. Due to specifics of underlying elliptic cryptography, the biggest private key is l-1, where  l is defined in the CN whitepaper as:

l = 2^252 + 27742317777372353535851937790883648493

Anything bigger than that will get wrapped around by performing mod l operation so you'll always end up with a private key below l.

Also, private view key doesn't have to be deterministic and you could generate it independently. It's more practical to derive it from the private spend key, though.

No limits. You can represent any 256 bit number with the mnemonic and vice versa. The mnemonic scheme is an encoding. It's really the same number but in different base (1626) where each "digit" is represented by a word from the dictionary. The last word is a checksum so the mnemonic also had some error-checking integrated.


What is a mining pool, and why should I join one? I see that Monero's software allows me to mine on my home computer. What is a mining pool and how is it different from just mining on my own?

A mining pool spreads the risk/reward of hitting a block, so you'll get more consistent results--though you'll likely pay an administration fee.

Think of it in terms of a lottery pool. If every week you put in $10 and the total is $100 in your lottery pool, you'll get 10% of the winning payout--minus any administration fees. Whereas if you buy $10 of tickets by yourself, your odds of winning go down, but you receive 100% of the reward and pay no administration fee.


Difference between "Wallet" and "Account" By looking at Moneropedia, words Account and Wallet may seem to be interchangeable, yet there are different methods for each at monero-wallet-rpc (e.g. create_wallet and create_account). So what's the difference between these two? I obviously cannot use Monero without having a wallet. But do I have to get an account as well?

Accounts were created as part of the subaddress scheme.

A wallet has a seed. From this seed, the primary address private spend and view keys are derived. From these private keys, subaddresses are derived. Subaddresses are grouped into accounts.

This primary address is the first address in the first account in the wallet.

Each account has its own balance, and can have multiple subaddresses associated with it. Since accounts are only groupings of subaddresses, there is no such thing as an account address (unless you count the first subaddress in the account as the "account address").

So a wallet can have multiple accounts, and each account can have multiple subaddresses.

Since accounts and subaddresses are deterministically derived from the seed, you only need to know the seed in order to restore the account/subaddress structure when restoring a wallet (although any labels you assign to the accounts/subaddresses will need to be noted separately).


Where can I find the issue tracker for the smart mining? I'm trying out the smart mining. Seems a bit wonky. Just wondering where I can follow its issues. Github?

See https://github.com/monero-project/monero/issues. It looks like I must have a lot more filler for the post to be accepted.


Monerod not syncing past ~1200700 in TAILS - Segmentation fault I have been unsuccessfully trying to sync the blockchain for the past 5 days using the latest 32bit Linux Monero Core on Tails live USB. I followed the instructions in the Tails/Tor post on /r/Monero to the letter and everything works until it reaches around 1200700 blocks then I keep getting 'Segmentation fault' message. I tried placing the data directory on different HDD's and SSD's and keep encountering the same problem. Would greatly appreciate any help as I'd love to have a node running and support the Monero community.

Please update your monerod to the latest version 0.10.1.0 Wolfram Warptangent.

There has been a hard fork to introduce RingCT transactions at block 1220517 and if you are running an old version, it will not be able to sync with the network.


Could proof-of-stake be implemented in a privacy coin, even in principle? Is there, even in principle, a smart way to implement proof-of-stake in any privacy currency where you are always hiding your balance from others?

(I'm not interested in discussing the advantages of proof-of-work over proof-of-stake, etc. That's not the point.)

For Proof of Stake in e.g. Ethereum, someone that owns funds can become a "validator" by sending a special type of transaction that locks up their ether into a deposit. The process of creating and agreeing to new blocks is then done through a consensus algorithm that all current validators can participate in.

Monero already has a type of transaction, called a coinbase transaction, which produces an output with an unencrypted amount. This is necessary in order to verify that miners are creating new XMR at the consensus enforced inflation rate.

A new type type of transaction could be devised that did reveal the output amount in a similar way, in order to be eligible as a validator. Let's call such outputs VEOs (validator eligibility outputs). These VEO outputs would be clearly identifiable on the blockchain because they would be the only outputs created in non-coinbase transactions that also have non-encrypted output amounts.

It'd be important that such VEOs cannot be referenced as decoys in other transactions, because it'd be important that funds can be demonstrated to be parked as VEOs and not spent. Therefore a consensus rule would need to be written that required that when VEOs are referenced in a transaction, they can only be referenced by the owner of that VEO (i.e. no ring signature would be allowed for untraceability).

When the VEO is spent in a transaction (which would unpark the funds and remove that output's validator eligibility), a regular Monero output with an encrypted amount would be created, and so this new output could then be spent in the future with Monero's regular transaction value secrecy and untraceability features.

TL;DR: Yes.


Invalid rpc-bind-ip address when using a bash script to pass node IP to the --rpc-bind-ip argument I need to install monero on 30 machines and I created a for script to do this.

for i in {1..10}

  monero --rpc-bind-ip 10.0.0.$i

done

The problem is that I keep getting a response of invalid IP during monero execution. Anyone know how to successfully pass the variable into --rpc-bind-ip?

Thanks!

Firstly your bash script is invalid:

you are missing do after the for line
monero should be monerod
you would also need the --detach option, as without it, monerod is running interactively.

Next, your script is actually trying to launch 10 instances of the daemon on a single machine. Not 10 machines each running monero. Also, these 10 instances are each trying to bind the RPC server to separate IP addresses on this same single machine, and I doubt very much you have 10 addresses assigned to your ethernet card(s) on this single machine.


How can I accept Monero payments from my classifieds ads website with unique client information Can someone suggest a solution for me please? I am in the UK.

I will be creating a classifieds website and I am looking for a way to accept Monero payments from my advertisers.  I am not a coder, but I can create a simple website using the Wordpress plugins.  I don’t have a computing background. I will be running my website from my PC, so I would prefer solutions which do not involve mobile phones. However, I do like what Monerujo has to offer and if there is no other way, I will get a smartphone with android to run it and use it.  I would prefer a solution that does not involve third party payment processors.

I’m aware of Woocommerce though I have never used it.  I have a Trezor hard wallet which doesn’t have Monero capability, but I will buy a Nano wallet which does offer Monero integration if need be.  I have not used crypto-currencies and know nothing to little. So I’d like a solution which is simple to use on  a PC with Windows 10 64bits  I am wondering if I can make it for what I want to do which I will now describe.

I would like users on my website to be able to pay with Monero. My website will have mainly free adverts, but some categories and locations will incur a charge. Let us say, £5 for a week for the UK site, or the equivalent in foreign currencies. My site will be global and I want to give customers the option to pay in Monero.

How could I accept Monero from my customers direct from my website? Customers will be paying weekly amounts for placing classified ads. Depending on the currency fluctuation, I am assuming the rates will change daily so customers would need to pay the correct amount.  The payments should be automated as they will be coming from different countries. I would need to know who is sending what. Each transaction should have some kind of unique reference which no other customer will have. I would prefer not to use payment providers like Coinbase, I'd prefer payments direct.

What software, wallet, and payment conversion could do all the above? After each sale I’d like to receive an email sent to me, telling me who paid what for which classifieds.

Thanks in advance.

If you're not a coder and want to allow people to pay in Monero, maybe the easiest way is to consider https://globee.com, a payment processor which allows people to pay with Monero, while settling in your choice of Monero, Bitcoin or fiat (maybe not yours though, do check).


Can Monero recover from an inflation bug event? Is this scenario likely?

An inflation bug is introduced by pushing malicious code / 51% attack on the network by a state level actor
Malicious party prints x amount of Monero and then randomly distributes them between Y number of addresses
Inflation bug is identified and patched by the community
Attacker slowly dumps newly minted fake Monero on the masses since nobody knows how many were printed <- assuming newly minted Monero stay on-ledger after patch (I am not sure if this is even possible)

History shows that Monero community is very careful and alert. The key image malleability bug (which could have allowed double spending) was fixed before anyone could exploit it.


What does the "hashes" field mean in an authentication message received from a pool? I'm still trying to get a handle on how all this pool mining stuff works so I decided to use this guy's project -- https://github.com/cryptonoter/CryptoNoter/ to give it a whirl.  In particular I notice when I send a message (I believe this is when I'm authenticating into the pool) ...

{"type":"auth","params":{"site_key":{"IF_EXCLUSIVE_TAB":"ifExclusiveTab","FORCE_EXCLUSIVE_TAB":"forceExclusiveTab","FORCE_MULTI_TAB":"forceMultiTab","CONFIG":{"LIB_URL":"https://mylocal.devbox.com/lib/","WEBSOCKET_SHARDS":[["wss://mylocal.devbox.com/proxy"]]},"CRYPTONIGHT_WORKER_BLOB":"blob:https://mylocal.devbox.com/1fa1d80d-4650-4b78-a22d-c2a31933d956"},"type":"anonymous","user":null,"goal":0}}

I get a response that looks like

{"type":"authed","params":{"token":"","hashes":0}}

What does this mean?  In particular, what is the "hashes" field?

It's the number of valid shares that the miner has sent to the pool.

Relevant excerpt from the CryptoNoter source:

// (whenever the upstream pool accepts a share)

// increment the number of accepted shares
conn.accepted++;

// notify the miner via websockets
buf = {
    "type": "hash_accepted",
    "params": {
        "hashes": conn.accepted
    }
}
buf = JSON.stringify(buf);
conn.ws.send(buf);


More than one real input per transaction? Is it possible to have more than one real input in a monero transaction?

If yes, how can you know how many mixins are there and how many real inputs?

If no, how do you explain this: https://moneroblocks.info/search/db7523bd6d72b91eb841eb2815cb4dc0810191fec87d5e86a6c45e4a05671a44

It's written that it has 43 inputs, and that it has 5 mixins? What did I misunderstand?

Yes, transactions can be composed of multiple real inputs. In that case, each input will be mixed with n 'fake' inputs (n is the number of other members in the ring, a.k.a mixin). The mixin level is the same for all inputs.
For instance, the transaction in the link you provided is composed of 43 real inputs, each one of them has been mixed with 5 fake inputs. This means that in the entire transaction 43*5=215 fake inputs were used (43*6=258 counting the real ones).


What are the pros and cons of changing the term "mixin"? At one point there was some discussion to change the term "mixin" to something different, such as "ring partner" or "fake out", due to the fact that mixin doesn't do a good job of describing what a ring signature is doing (its passive, whereas mixin seems active) and the fact that the "scale" of the mixin can either be 0-based or 1-based (the confusion between chain radar and other explorers calling mixins different), whereas "ring partner" and "fake out" have implicit 1 based and 0 based scales, respectively.

What are pros and cons of changing the term mixin to something else?

Pros:

Another name may lead to less confusion about what mixin means
Another term would help avoid confusion with active mixing, such as in Bitcoin CoinJoin transactions

Cons:

Mixin has been the name since the beginning of Monero and is used by all other CryptoNote based coins. For long term users a new name would take some time getting accustomed to.
No clear choice has (yet) been identified as the mixin term replacement (you chose 2 different ones in your question itself)


What data do the wallet files contain? I see 3 files with the name of my wallet:

wallet-name, wallet-name.keys, wallet-name.address.txt

What is stored inside them? Does the wallet store the public and private keys and nothing else? Or does it contain the list of transactions related to the wallet as well and their location on the blockchain?

In other words, if I copy my cold wallet to a connected PC, and this connected PC has downloaded the blockchain as well, do I need to rescan the whole blockchain or will the wallet immediately know the list of blocks where my coins are stored?

Note: re-post of a question asked on reddit

What is stored inside them? Does the wallet store the public and private keys and nothing else? Or does it contain the list of transactions related to the wallet as well and their location on the blockchain?

The wallet-name.address.txt stores only the address. It is just for convenience if you want to know your address without having to open the wallet. In my opinion it presents a security risk as it could be easily replaced with a .txt file containing a different address, by malware or someone accessing your computer.
The wallet-name.keys stores your private keys. If it's a watch-only-wallet, it will store only your private view key. Important information inside of it can be recovered from the seed mnemonic. It is stored encrypted with your wallet password. The keys file also contains user options like "always-confirm-transfers", etc, plus the refresh height (to skip old blocks from before the wallet was first created)
The wallet-name stores all other wallet data (also encrypted with your wallet password), such as:

All the outputs belonging to the wallet, which are found by scanning the blockchain when you're refreshing the wallet. To avoid having to do the scanning every time, the wallet stores them once found.
A key image for each signed output. This information is required to be able to check whether an output was spent or not. Without this information, the wallet will not display the correct balance.

Each signed output will always generate the same key image, which is then compared against all the key images on the blockchain. If found, it means that the output was already spent.
The key images are a mechanism used to prevent double-spends.
If it's a watch-only wallet, it will not have this, as it can't sign the outputs (for which the private spend key is needed).
However, you can import key images produced by the full-wallet counterpart, and have the correct balance displayed.

Metadata for each outgoing transaction (personal notes, tx keys, transaction history)
A set of block hashes, to detect blockchain reorgs

  In other words, if I copy my cold wallet to a connected PC, and this
  connected PC has downloaded the blockchain as well, do I need to
  rescan the whole blockchain or will the wallet immediately know the
  list of blocks where my coins are stored?

Yes, if you've restored your cold wallet from keys. It is true that your copy of the blockchain has all the information, but to know the balance, wallet needs to scan it with wallet-specific private view key to find outputs belonging to it. Then, it needs to sign them, generate key images, and compare against those found on the blockchain so it can mark each output as spent or unspent.

After you refresh your cold wallet for the first time, and if you don't discard the wallet files but choose to keep them saved on your cold PC, next time you transfer a fresh copy of the blockchain over to your cold PC you won't have to do it from scratch as it will already be refreshed up to a certain block height.

For more details about cold spending process, see here.


Are range proofs output specific? For example imagine the situation where i have one unspent output valued at 0.5 XMR

In another wallet i also have another unspent output valued at 0.5 XMR

even thought these outputs share the same values they have different history's

when i construct a range proof for these outputs separately will the range proof be the same? or does the range proof generate uniquely based on the output you are using?

By same i mean that the data the range proof is constructed from is an exact match in the two cases with no data differing.

First of all, each Pedersen Commitment hides the committed amount by adding a random "blinding factor", so two commitments committing to the same amount will look completely differently.

Second, the range proof generation algorithm internally uses a lot of random numbers, so even for the same Pedersen Commitment, two or more range proofs will look completely differently. This property is true for all cryptographic signature schemes in general for security reasons: when the algorithm is run for a certain public key, the resulting signature data is always random and unique.


Ring signature and blockchain analysis I'm struggling to understand how ring signatures protect against blockchain analysis.

Each time a transaction is made on the Monero blockchain some outputs already present on the blockchain are used to make a ring signature so that there is no way of knowing which output in the ring is spent.

But as the ring signature is built with old outputs found in the blockchain is it not obvious that the first time an output appears in the blockchain is when this output was really spent?

Remember that other users (those that are not the "owner" of an output) also use this output in their rings as soon as it appears in the blockchain.
So an output might (and most likely will) appear many times in many different rings prior to be actually spent by its owner.


How are Monero blocks found and confirmed? (solo mining) In case of solo mining - how are Monero blocks found and confirmed? If using monerod - let's say solo mining is started with start_mining somewalletaddress threadcount. What is the principle of block finding and confirmation? It would be nice to see a simplified step by step process.

It's pretty similar to Bitcoin:

First, a block template is created. This is a block skeleton, which looks like a block but is not actually valid due to not having a PoW hash which matches the current difficulty. This block template includes a coinbase tx to the address you specified, and a Merkle tree of the transations it includes.

Then, a loop will increment a nonce in the block and hash to see if the resulting hash comes within the difficulty limit. If yes, you found a block. If not, you continue. If you've searched the whole nonce space without finding a block and the chain still hasn't moved, you have to change something else (the set of transactions to include, or the block timestamp), then you can repeat over the nonce again.

Once a block is found, it's relayed to other nodes, and you resume mining on top of that new block.

If the chain changes while you're mining, you update according to the rules, ten resuming mining on top of the new chain tip.


How can I verify the Monero coin supply without using a block explorer? Is there a command I can give the Monero daemon to calculate the total of all coinbase transactions so far?

How do block explorers calculate the Monero coin supply and how can I verify their accuracy?

Starting with v0.10.1, there is now a command print_coinbase_tx_sum that give you this information.


"waiting on daemon synchronization to finish" Issue In the GUI, it pops up "waiting on daemon synchronization to finish" but has been saying this for over an hour now. Am I being too impatient? In the past, it usually syncs up in a couple minutes. I am running it on windows 10 with a SSD if that helps. Thanks in advance

Try starting the monerod separately from the GUI instead of starting the daemon within the GUI.  You should be able to more easily troubleshoot any issues you are experiencing with the daemon with its console messages showing on the screen.

Depending on your Internet connection it may take a while to download and sync the blockchain.

If you run monerod in a separate window, you can type "status" to see: