Skip to content

Compatibility issue due to #738 - bad signature for announcement ... ChannelUpdates #751

@n1bor

Description

@n1bor

When an pre #738 node connects to a newer node and opens a channel the channel opens but when 1st channel update is sent from new-> old version all channels are closed due to invalid sig error.
New versions sends this:
00:24:59.612 DEBUG fr.acinq.eclair.Diagnostics - OUT msg=ChannelUpdate(3045022100fa18a60f87a6e9553c66e902bb4ea7dffd345746c0cf982d49baea59d3a6a3b9022034c00ba7cd3a2d37e72dab8e5e38d84a6260617b0ebbff87e59d785b8750941101,6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000,86243000a5c0000,1541808455, 1,0,144,1,2,2,Some(1000000000))

Old version sees this:
00:24:59.613 WARN akka://eclair-node/user/$g/router fr.acinq.eclair.router.Router - bad signature for announcement shortChannelId=86243000a5c0000 ChannelUpdate(3045022100fa18a60f87a6e9553c66e902bb4ea7dffd345746c0cf982d49baea59d3a6a3b9022034c00ba7cd3a2d37e72dab8e5e38d84a6260617b0ebbff87e59d785b8750941101,6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000,86243000a5c0000,1541808455,0100, 144,1,2,2)

and fails this and all other channels.

I checked and the new version is correct in thinking there is a valid sig.

  test("channel update announcement check") {
    val ann = ChannelUpdate("3045022100fa18a60f87a6e9553c66e902bb4ea7dffd345746c0cf982d49baea59d3a6a3b9022034c00ba7cd3a2d37e72dab8e5e38d84a6260617b0ebbff87e59d785b8750941101",
        "6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000",ShortChannelId("86243000a5c0000"),1541808455,    1,0,144,1,2,2,Some(1000000000))
    
    assert(checkSig(ann, PublicKey("02d11c4c4f986ff547288d873f6a33758aab744927355b01272ee560a3ba44d01e")))
    //assert(checkSig(ann, PublicKey("03c436af41160a355fc1ed230a64f6a64bcbd2ae50f12171d1318f9782602be601")))
    assert(checkSig(ann, randomKey.publicKey) === false)
    import fr.acinq.eclair.wire.LightningMessageCodecs
    val encoded = LightningMessageCodecs.lightningMessageCodec.encode(ann).require
    
    println(encoded.toHex)
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions