Create Fork Indices Column

We will add a column named fork_indices to the xmr_keyimages table. Here is some motivation.

  • It will initially contain the distinct output indices corresponding to the transaction ring members.
  • For key images which have appeared in both the main Monero chain and at least one hard fork, we may be able to remove some of the output indices in the fork_indices.
  • Our analysis using hard fork data will translate (amount, index) pairs to one-time addresses on each chain and then find the intersection of the transaction rings corresponding to a key image from all five chains — Monero and the four hard forks.
  • The fork_indices column will store the intersection of the transaction rings using indices from the main Monero chain.

Do the following to add the fork_indices column.

  1. Run the following commands to enter the psql shell.
    sudo su postgres
    psql
    
  2. Add the fork_indices column to the xmr_keyimages table.
    ALTER TABLE xmr_keyimages ADD fork_indices INTEGER[];
    

    Note: We could have added the fork_indices column when creating the xmr_keyimages table in the Create Key Image Table step. We chose not to do so because this column is required only for the analysis using hard fork data.

  3. Populate the fork_indices column with the contents of dist_ring_indices.
    UPDATE xmr_keyimages SET fork_indices=distinct_ring_indices;