Giter Site home page Giter Site logo

Comments (6)

Roasbeef avatar Roasbeef commented on July 26, 2024

Excellent find! I'm not sure how we missed this the first time around...

I think your suggested solution is pretty straightforward. To eliminate the circular dependency nodes simply sign the channel auth digest (channelID+Bitcoin keys), leaving out the other parties signature from that digest.

Additionally, I think we need to enforce an additional constraint on the signatures within the announcement themselves. In order for us to possibly implement hash-based state reconciliation (rsync algo, hash time series, Patricia trie, etc), we need to ensure that only one encoding of the signature is accepted. Otherwise, our encoding won't be deterministic. In order words, we should enforce a low S (just like in Bitcoin) encoding for all announcement signatures propagated within the network.

from bolts.

cdecker avatar cdecker commented on July 26, 2024

Actually re-reading the spec I think we are mixing a few concerns here, the funding_locked message, which is part of the channel lifecycle messages are being misused to also transfer the signatures. Maybe we should split the signatures out into their own messages? That way we would have explicit opt-in to channel announcements by both parties.

And is there a point to also signing the signatures at all? Maybe we should reorder fields so that we have the 4 signatures at the beginning and they simply sign everything below the signature fields (offset 256):

[64:node-signature-1]
[64:node-signature-2]
[64:bitcoin-signature-1]
[64:bitcoin-signature-2]
[8:channel-id]
[33:node-id-1]
[33:node-id-2]
[33:bitcoin-key-1]
[33:bitcoin-key-2]
[2:len]
[len:features]

from bolts.

pm47 avatar pm47 commented on July 26, 2024

is there a point to also signing the signatures at all?

I think you're right, signing the node ids & bitcoin keys is enough and it's easier to implement this way 👍

from bolts.

rustyrussell avatar rustyrussell commented on July 26, 2024

from bolts.

rustyrussell avatar rustyrussell commented on July 26, 2024

from bolts.

cdecker avatar cdecker commented on July 26, 2024

The chicken-and-egg problem should be addressed by #96, while the discussion about splitting off the signature exchange from the channel lifecycle is being tracked in #97. Seems this is fixed, closing 😉

from bolts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.