Transaction Inputs

Introduction

These rules apply to transaction inputs, excluding miner transactions.

Index

  1. Necessary Functions/Definitions
  2. Rules

Necessary Functions/Definitions

Default Minimum Decoys

This is the default number of decoys an input must at least have.

There are exceptions to this being the minimum decoy size for all transactions. See further down in Rules.

Hard-ForkMinimum Decoys1
1N/A
2 to 52
64
76
8 to 1410
15+15

Minimum And Maximum Decoys Used

To check a transaction inputs ring size we must first get the minimum and maximum number of decoys used in the transactions inputs2.

So if this was our transactions:

Input123
Ring size12816

The minium and maximum amount of decoys would be 7 and 15 respectively.

Mixable And Un-Mixable Inputs

A mixable input is one that has enough outputs on the chain with the same amount to be able to build a ring with the minimum amount of decoys needed.

A ringCT input, aka an output with 0 amount, is always considered mixable3.

For other inputs you first get the amount of outputs on chain with that amount and check if thats less than or equal to the default minimum amount of decoys if it is then the input is un-mixable otherwise it is mixable4.

Rules

No Empty Inputs

The transaction must have at least 1 input5.

No Empty decoys

All inputs must have decoys6.

Input Type

All inputs must be of type txin_to_key7.

Inputs Must Not Overflow

The inputs when summed must not overflow a u64 and the outputs when summed must not either8.

Unique Ring Members

From hard-fork 6 all ring members in an input must be unique, this is done by checking that no key_offset after the first is 09.

Unique Key Image

The key image must be unique in a transaction10 and the whole chain 11.

Torsion Free Key Image

The key image must be a canonical prime order point12.

Minimum Decoys

These rules are in effect from hard fork 2.

First you get the minimum number of decoys used in the transaction.

Then you get the amount of mixable and un-mixable inputs.

Now get the default minimum decoys allowed for the current hard-fork.

If the minimum amount of decoys used in the transaction is less than the default minimum decoys allowed then the transaction is only allowed if there is at least one input which is un-mixable13.

If there is an un-mixable then the transaction is not allowed to have more than 1 mixable input as well.

Special rules14:

  • For hard-fork 15 both 10 and 15 decoys are allowed.
  • From hard-fork 8 upwards the minimum amount of decoys used in a transaction must be equal to the minimum allowed.

Equal Number Of Decoys

From hard-fork 12 all inputs must have the same number of decoys15.

Sorted Inputs

From hard-fork 7 the inputs must be sorted by key image, in descending lexicographic order16.

10 Block Lock

From hard-fork 12 all ring members must be at least 10 blocks old17.

The Output Must Exist

The output a transaction references must exist in the chain18.

The Output Must Not Be Locked

The outputs, which are referenced in the inputs, unlock time must have passed, see the chapter on unlock time.