Update Fork Indices Column

We need to update the fork_indices column in the xmr_keyimages table to contain the intersection of all transaction rings which had the same key image. See the discussion in Create Fork Indices Column for context.

  1. Run the find_ring_intersection_from_forks.py script present in the scripts/hardforks directory.
    python3 find_ring_intersection_from_forks.py
    
  2. You can query the number of transaction rings where number of mixins has changed due to the hard fork information by runnng the following query in the psql shell.
    SELECT COUNT(*) FROM xmr_keyimages WHERE ARRAY_LENGTH(distinct_ring_indices, 1) <> ARRAY_LENGTH(fork_indices, 1) AND block_height <= 2530000;
    
    The result of this query was 86338. Note that the query restricts the block height to 2530000.