Closed ajtowns closed 1 year ago
Thanks for reporting this. I have added a check for duplicates.
The total
field in the input data is passed about a bit in the script, but never actually printed. We only emit the verified total from the utxo set. We should probably exit non-zero if this doesn't match though.
Hi,
There's no checks in validate_reserves.py to prevent double counting, eg:
where
3BMEX95VgAacEZRJksocYrPzJ328pcSFXG
is repeated gives no error. It does correctly reportProven amount(BTC): 0.01001581
, however does not indicate this doesn't match the claimed 0.01831904 BTC. I think that due tochunk_size = 60000
you could successfully double count utxos and get an incorrect "Proven amount" by repeating a scriptPubKey in different chunks.Requiring the "addresses" section be sorted (so that
address[n].addr < address[n+1].addr
would likely be a simple way of fixing this.(I didn't observe any repeated addresses or repeated utxos in the 2023-03-09 PoR data)