Giter Site home page Giter Site logo

channel-id and min_conf about bolts HOT 4 CLOSED

lightning avatar lightning commented on August 30, 2024
channel-id and min_conf

from bolts.

Comments (4)

Roasbeef avatar Roasbeef commented on August 30, 2024

Why would the min_conf attribute have any direct affect on the channel-id? The temporary-channel-id is in place in order to properly de-multiplex updates to pending channels in the scenario that a node attempts to open up several channels at once.

The channel-id on this message is in place so future updates to that channel (htlc adds, settles, etc) are properly targeted in the case of multiple channels open between nodes.

Personally, I'd rather just use the full funding outpoint (txid:value) to identity updates to channels as it's much more stable than a ID based off of a block height or tx offset. However, with the way it's currently specified in the draft spec, I don't see how both sides could ever compute different channel ID's aside from re-orgs.

from bolts.

pm47 avatar pm47 commented on August 30, 2024

Why would the min_conf attribute have any direct affect on the channel-id?

Consider the following scenario where min_conf=1:

                                   +---+
                                 --|   | <-- seen by A
                                /  +---+
           +---+      +---+    /  
...  ------|   |------|   |----
           +---+      +---+    \
                                \  +---+
                                 --|   | <-- seen by B
                                   +---+

A and B will compute a different channel-id right?

Personally, I'd rather just use the full funding outpoint (txid:value) to identity updates to channels as it's much more stable than a ID based off of a block height or tx offset.

I still like the short id, because it may cause trouble only if a reorg occurs and min_conf is too low, and in that case the funder may double spend the funding tx which is a far greater concern anyway.

from bolts.

rustyrussell avatar rustyrussell commented on August 30, 2024

Pierre-Marie Padiou [email protected] writes:

Why would the min_conf attribute have any direct affect on the channel-id?

Consider the following scenario where min_conf=1:

                                   +---+
                                 --|   | <-- seen by A
                                /  +---+
           +---+      +---+    /  
...  ------|   |------|   |----
           +---+      +---+    \
                                \  +---+
                               --|   | <-- seen by B
                                 +---+

A and B will compute a different channel-id right?

Personally, I'd rather just use the full funding outpoint (txid:value) to identity updates to channels as it's much more stable than a ID based off of a block height or tx offset.

Well, personally I'd rather remove all of this muxing stuff from the
spec until a later date, but...

I still like the short id, because it may cause trouble only if a reorg occurs and min_conf is too low, and in that case the funder may double spend the funding tx which is a far greater concern anyway.

Yes: invalid channel ID after we consider funding locked is grounds for
panic. The protocol implications are kind of secondary...

Cheers,
Rusty.

from bolts.

pm47 avatar pm47 commented on August 30, 2024

Note: Addressed in commit 04cf906 of PR #1 by forcing min_conf=6, and has been included in competing PR #11: will close when either PR gets merged.

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.