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_indicescolumn will store the intersection of the transaction rings using indices from the main Monero chain.
Do the following to add the fork_indices column.
- Run the following commands to enter the
psqlshell.sudo su postgres psql - Add the
fork_indicescolumn to thexmr_keyimagestable.ALTER TABLE xmr_keyimages ADD fork_indices INTEGER[];Note: We could have added the
fork_indicescolumn when creating thexmr_keyimagestable 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. - Populate the
fork_indicescolumn with the contents ofdist_ring_indices.UPDATE xmr_keyimages SET fork_indices=distinct_ring_indices;