I am doing a project based on blockchain, and I found that Monero is a good candidate for my project because of its ring signature scheme.

The scenario is that I would like to create a transaction and choose a group of addresses to produce a ring signature for this transaction. However, I cannot find the method to produce a ring signature of addresses I choosed.

I am wondering is there any convenient way to achieve this goal?

1 Answer 1


The code that currently randomly selects inputs is here:


You can modify this code to instead specify your own choice of inputs.

  • I read the related code, but there is a question still confusing me. I know that Monero has changed to use Ring CT schema, which means the mixing addresses do not need to have the same amount of coin. But the source code in blockchain.cpp still query the database using the "amount" parameter. I am not sure whether this piece of source code is called in today monero's running process.
    – Pure Air
    Apr 4, 2018 at 0:29
  • @YiLiu On the blockchain, ring members are referenced by (amount, position) rather than by some other means (e.g. public key). Therefore, prior to RingCT, if you wanted to reference the 5th output that has ever existed on the blockchain with amount 3, you write (3, 5) as a ring member reference. In RingCT, all amounts are considered to be zero for the purposes of lookup and database storage. So to reference the 12345th ever RingCT output as one of your ring members in a transaction, on the blockchain you'd write in (0, 12345) as the reference.
    – knaccc
    Apr 4, 2018 at 1:28

Your Answer

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

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