Archive Node: Duplicated entries in the zkapp_account_preconditions
table
#14777
Labels
itn3
https://docs.google.com/document/d/1ualsFs9NbgavFZj1Z4CYHf4PdRGblyz1wOl9BawT1iU
priority-high
Testworld-2-0-archive-node
Should be used to raise archive node issues with Testworld 2.0 network
triage
Paul have found an archive node issue on TW2.
When trying to patch the archive dbs with missing blocks, He got errors because there were multiple entries in the
zkapp_account_preconditions
table that are identical except for theid
field.That may have happened because there were distinct rows that became identical after the receipt_chain_hash field was patched. The duplicates are an issue because Zkapp_account_precondition.add_if_doesn't_exist function checks if a unique value exists, and return an error if there is more than one.
Probably the table should have a
UNIQUE
constraint on all the fields except id. The solution might be to find the duplicates, delete the extra ones, and fixup the references to the duplicates.For the "1" db, there are 80 entries with duplicates in
zkapp_account_precondition
, and in support of Paul theory of why there are duplicates, all have non-NULL entries forreceipt_chain_hash
.The text was updated successfully, but these errors were encountered: