electrs icon indicating copy to clipboard operation
electrs copied to clipboard

Fix: Output index should be u32 to prevent clobbering when over 65536 outputs.

Open junderw opened this issue 1 year ago • 1 comments

Warning: REQUIRES RE-INDEX!!!!

Problem: If tx has over 16 bits of outputs, the indexing will clobber index 0 with index 65536 and so on.

Solution: 4 billion outputs is impossible without a hard fork. Use u32.

junderw avatar Feb 04 '24 12:02 junderw

Tested ACK @ 5b2075b2ec631d8126571add525a836a6dc6d932

Successfully reindexed both Liquid and testnet db. The out of range prevout bug, which reproduced locally on current electrs version, did not reproduced after reindexing on 5b2075b2ec631d8126571add525a836a6dc6d932.

On liquid, everything seems to work fine with the new index (peg ins and assets notably)

natsoni avatar Feb 21 '24 13:02 natsoni