To optimize how we determine if we've already ingested a block, we should keep a blocks table with only header data (block hash and height). This way, if we receive a new chainhook payload we can determine with full certainty if we have already ingested that block before instead of comparing only block heights which may be deceptive and vulnerable to reorgs.
To optimize how we determine if we've already ingested a block, we should keep a
blocks
table with only header data (block hash and height). This way, if we receive a new chainhook payload we can determine with full certainty if we have already ingested that block before instead of comparing only block heights which may be deceptive and vulnerable to reorgs.