monero-project / monero-site

https://getmonero.org
BSD 3-Clause "New" or "Revised" License
275 stars 384 forks source link

incorrect description of suggested_confirmations_threshold in wallet RPC documentation #2075

Closed dimalinux closed 1 year ago

dimalinux commented 1 year ago

suggested_confirmations_threshold has a description in 2 places on this page that says:

Estimation of the confirmations needed for the transaction to be included in a block.

At minimum, that description is horribly confusing given that a transaction must be included in a block to have a confirmation. I'm not sure what it should say. Maybe something like this?

A suggested number of confirmations to wait for before considering the transaction to be irreversible.

Here's how the value is getting set: https://github.com/monero-project/monero/blob/v0.18.1.2/src/wallet/wallet_rpc_server.cpp#L102-L117

plowsof commented 1 year ago

Thanks, it is confusing and seems wrong, i'll have to ask around for a more informed opinion than my own because im thinking ' 10 conf's are when funds are confirmed ' but looking at that function, it's taking into account the block reward (entry.amount + block_reward - 1) / block_reward; and then it provides a different threshold for outputs that are locked, and takes into account the networks hashrate* so there may be some kind of attack this is attempting to account for / broader explanation needed

UPDATE: moneromooo has kindly provided an explanation https://libera.monerologs.net/monero-dev/20221016