Entries in the Column Hash of the Table Blocks are with different Endianess.
clightning=# select height,hash from blocks where height < 704390 limit 10;
height | hash
--------+--------------------------------------------------------------------
704384 | \x16d21ffcb083152845de0e272e9344802db1954e0b2609000000000000000000
704385 | \x14fe28544948d000c28972a52e04ee0a367adea7f3e40a000000000000000000
704386 | \x9d9794f66a3e575711161d7097b152e231fa43305e7306000000000000000000
704387 | \xcbed94f7979f1f92b31663db567955a884736d1d04be02000000000000000000
704388 | \xa3ee441fc79a2792da9424e270ed60b3db75466684d302000000000000000000
704389 | \x33329d09746da50be2998704096a50bbb50bc00ac7990b000000000000000000
704225 | \x00000000000000000006a4b424229e1f6913422d59d070b62bd37ada926d3fea
549524 | \x00000000000000000001e08b870b2d6d31d8ba20f5bdad8e7cb809fd8ce6a8fb
601046 | \x000000000000000000125c9e34c7e49692a3a88c664dae35f7c72c4ade4ad7f1
601260 | \x0000000000000000000debf11962f89e2ae08f8ff75803b0da6170af6c5c346b
(10 rows)
These entries were written by the same lightningd binary using PostgreSQL 18 on the same machine in one run.
I assume the error is in wallet_filteredblock_add() (called from got_filteredblock in gossip_control.c) where the hash is written uncorrected from the bcli call.
Entries in the Column Hash of the Table Blocks are with different Endianess.
clightning=# select height,hash from blocks where height < 704390 limit 10;
height | hash
--------+--------------------------------------------------------------------
704384 | \x16d21ffcb083152845de0e272e9344802db1954e0b2609000000000000000000
704385 | \x14fe28544948d000c28972a52e04ee0a367adea7f3e40a000000000000000000
704386 | \x9d9794f66a3e575711161d7097b152e231fa43305e7306000000000000000000
704387 | \xcbed94f7979f1f92b31663db567955a884736d1d04be02000000000000000000
704388 | \xa3ee441fc79a2792da9424e270ed60b3db75466684d302000000000000000000
704389 | \x33329d09746da50be2998704096a50bbb50bc00ac7990b000000000000000000
704225 | \x00000000000000000006a4b424229e1f6913422d59d070b62bd37ada926d3fea
549524 | \x00000000000000000001e08b870b2d6d31d8ba20f5bdad8e7cb809fd8ce6a8fb
601046 | \x000000000000000000125c9e34c7e49692a3a88c664dae35f7c72c4ade4ad7f1
601260 | \x0000000000000000000debf11962f89e2ae08f8ff75803b0da6170af6c5c346b
(10 rows)
These entries were written by the same lightningd binary using PostgreSQL 18 on the same machine in one run.
I assume the error is in wallet_filteredblock_add() (called from got_filteredblock in gossip_control.c) where the hash is written uncorrected from the bcli call.