I'm new in Monero. While reviewing the codebase of the Monero project, I'm stuck in the
m_global_output_index field in
transfer_details struct in the 'wallet2.h' file and want to know what it means. Really appreciate if someone can help~
In the CryptoNote protocol, outputs are organized into groups according to their amounts, and
m_global_output_index represents the index of a given output in its corresponding group. This reduces the size of the ring signature by only storing those indices of outputs in the signature instead of the actual public keys.
- In this pre-RingCT transaction, the output amount is denominated into 6 different digits, each having its own group of outputs. The meaning of "amount idx 278059 of 308522" on the right hand side is that there exist 308522 outputs of 0.005 XMR in the blockchain, and this newly generated output is the 278059th one in the group.
- After the activation of RingCT, the denomination of outputs is no longer necessary, and all the RingCT outputs (whose amounts are hidden) are stored in the same group (associated with the amount of 0 XMR by convention). There are 1491097 RingCT outputs as of now, and this transaction generated the two latest outputs at indices of 1491095 and 1491096.