Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended queries optional #899

Merged
merged 111 commits into from
Aug 28, 2019
Merged

Extended queries optional #899

merged 111 commits into from
Aug 28, 2019

Commits on Sep 11, 2018

  1. Add extended query messages

    Extended query messages are allow peers to exchange short channel id and timestamps, and
    to query either announcement + updates or just updates:
    
    - query_channel_range_ex is used asked to ask for a list of (short channel ids + timestamp)
    - reply_channel_range_ex will return a list of (short channel ids + timestamp)
    - query_short_channel_ids_ex is used to ask for channel updates and optionaly the matching channel announcement
    - query_short_channel_ids_end_ex is sent when an extended query has been completed
    sstone committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    6e2d30f View commit details
    Browse the repository at this point in the history
  2. Add a feature bit for extended channel range queries

    Last feature bit is currently 7, we use bit 15 to not interfere with new
    features being added to the LN spec.
    sstone committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    14e7255 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2018

  1. Configuration menu
    Copy the full SHA
    90a0393 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ada3bbb View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2018

  1. Correctly handle multiple channel_range_replies

    The scheme we use to keep tracks of channel queries with each peer would forget about
    missing data when several channel_range_replies are sent back for a single channel_range_queries.
    sstone committed Sep 16, 2018
    Configuration menu
    Copy the full SHA
    6cedaeb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1f9025f View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2018

  1. RoutingSync: remove peer entry properly

    * Remove peer entry on our sync map only when we've received
    a `reply_short_channel_ids_end` message.
    * Make routing sync test more explicit
    sstone committed Sep 17, 2018
    Configuration menu
    Copy the full SHA
    b5f53ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    03c45bb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5a4b554 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    837dd97 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    338cf7d View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2018

  1. Configuration menu
    Copy the full SHA
    0da9136 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2018

  1. Router: clean our sync state when we (re)connect to a peer

    We must clean up leftovers for the previous session and start the sync process again.
    sstone committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    f7b3409 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e740523 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    19f0c81 View commit details
    Browse the repository at this point in the history
  4. Router: fix indentation

    sstone committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    ebcd58c View commit details
    Browse the repository at this point in the history
  5. Router: reset sync state on reconnection

    When we're reconnected to a peer we will start a new sync process and should reset our sync
    state with that peer.
    sstone committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    c345b2f View commit details
    Browse the repository at this point in the history
  6. Revert "Routing: don't request their channel ids if we don't want a r…

    …outing table dump"
    
    This reverts commit 19f0c81.
    sstone committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    830f963 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    668f172 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3e47d5f View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2018

  1. Configuration menu
    Copy the full SHA
    28383fa View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2018

  1. add extended query flag to our log message

    It will tell us if sender requests channel announcements and updates or just updates
    sstone committed Sep 21, 2018
    Configuration menu
    Copy the full SHA
    da012f9 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2018

  1. Configuration menu
    Copy the full SHA
    2744613 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2018

  1. Configuration menu
    Copy the full SHA
    e70043d View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2018

  1. Configuration menu
    Copy the full SHA
    71a4542 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2018

  1. Configuration menu
    Copy the full SHA
    da25696 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2018

  1. Router: implement new extended queries

    - reply_channel_range include  a list of channel id + both channel update timestamp
    - query_short_channl_ids include a list of channel id + flag, where flag specifies what the receiver
    should send back (a combination of channel annoucement, channel updated #1 and channel update #2)
    sstone committed Oct 26, 2018
    Configuration menu
    Copy the full SHA
    eb44823 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f22728c View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2018

  1. Configuration menu
    Copy the full SHA
    4f513c4 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2018

  1. Configuration menu
    Copy the full SHA
    7e74e14 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2018

  1. Configuration menu
    Copy the full SHA
    7367313 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2018

  1. Extended channel queries: clean up

    Use more descriptive names and specifiy what is specific to our own
    prototypes and what is proposed for BOLT 1.1
    sstone committed Dec 3, 2018
    Configuration menu
    Copy the full SHA
    a263200 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2018

  1. Configuration menu
    Copy the full SHA
    cbb951c View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2019

  1. Configuration menu
    Copy the full SHA
    515461f View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2019

  1. Configuration menu
    Copy the full SHA
    9e9c3c8 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2019

  1. Configuration menu
    Copy the full SHA
    22455c0 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2019

  1. Configuration menu
    Copy the full SHA
    aa6c930 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2019

  1. added checksum prototype

    pm47 committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    e17ef25 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2019

  1. major refactoring

    pm47 committed Jan 21, 2019
    Configuration menu
    Copy the full SHA
    928d165 View commit details
    Browse the repository at this point in the history
  2. enable extended queries in flags

    pm47 committed Jan 21, 2019
    Configuration menu
    Copy the full SHA
    5ffabe9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a16d3d7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6a41ce5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    430823a View commit details
    Browse the repository at this point in the history
  6. fixed QueryChannelRange handler

    pm47 committed Jan 21, 2019
    Configuration menu
    Copy the full SHA
    fdbaf5d View commit details
    Browse the repository at this point in the history
  7. fixed sync progress calculation

    pm47 committed Jan 21, 2019
    Configuration menu
    Copy the full SHA
    21359e2 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2019

  1. Configuration menu
    Copy the full SHA
    919bad7 View commit details
    Browse the repository at this point in the history
  2. better logs + refactoring

    pm47 committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    27c21a9 View commit details
    Browse the repository at this point in the history
  3. removed temporary test

    pm47 committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    3ba1f15 View commit details
    Browse the repository at this point in the history
  4. fixed sync count

    pm47 committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    428fd0a View commit details
    Browse the repository at this point in the history
  5. fixed numBlocks calculation

    pm47 committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    366507e View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2019

  1. Configuration menu
    Copy the full SHA
    7685c7d View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2019

  1. Configuration menu
    Copy the full SHA
    0d9f285 View commit details
    Browse the repository at this point in the history
  2. fixed sync progress calculation

    pm47 committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    de866e2 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2019

  1. Configuration menu
    Copy the full SHA
    c04af36 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2019

  1. Configuration menu
    Copy the full SHA
    304f12d View commit details
    Browse the repository at this point in the history
  2. wip (tests not passing)

    pm47 committed Mar 10, 2019
    Configuration menu
    Copy the full SHA
    c068b93 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2019

  1. fixed tests

    pm47 committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    deb0708 View commit details
    Browse the repository at this point in the history
  2. formatting

    pm47 committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    7d72600 View commit details
    Browse the repository at this point in the history
  3. fixed QueryFlagTypes

    pm47 committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    d3a1d19 View commit details
    Browse the repository at this point in the history
  4. rework feature bits

    pm47 committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    81023a2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    564c1c5 View commit details
    Browse the repository at this point in the history
  6. better logs

    pm47 committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    5bbbebb View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2019

  1. typed EncodingType

    pm47 committed Mar 12, 2019
    Configuration menu
    Copy the full SHA
    7b40799 View commit details
    Browse the repository at this point in the history
  2. removed extended feature bit

    It is not needed since old implementations will just ignore additional
    fields.
    pm47 committed Mar 12, 2019
    Configuration menu
    Copy the full SHA
    4ba355e View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2019

  1. Configuration menu
    Copy the full SHA
    4a2eb07 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2019

  1. Configuration menu
    Copy the full SHA
    7a6acd9 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2019

  1. added test vectors

    pm47 committed Mar 19, 2019
    Configuration menu
    Copy the full SHA
    94711a8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    149deb7 View commit details
    Browse the repository at this point in the history
  3. ignore fake test vector test

    pm47 committed Mar 19, 2019
    Configuration menu
    Copy the full SHA
    a18ec55 View commit details
    Browse the repository at this point in the history
  4. added tests on query flags

    pm47 committed Mar 19, 2019
    Configuration menu
    Copy the full SHA
    f2a18be View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2019

  1. Configuration menu
    Copy the full SHA
    79d9aa0 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2019

  1. Configuration menu
    Copy the full SHA
    9ebfb5f View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2019

  1. fixed and improved tests

    pm47 committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    0ace8da View commit details
    Browse the repository at this point in the history
  2. tweak test

    pm47 committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    faa9a8c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b488701 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2019

  1. Configuration menu
    Copy the full SHA
    ffa6183 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2019

  1. Configuration menu
    Copy the full SHA
    96e1c87 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2019

  1. Configuration menu
    Copy the full SHA
    3cf840e View commit details
    Browse the repository at this point in the history

Commits on May 9, 2019

  1. Configuration menu
    Copy the full SHA
    b282581 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2019

  1. Configuration menu
    Copy the full SHA
    640144b View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2019

  1. Configuration menu
    Copy the full SHA
    c97cfc5 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2019

  1. Configuration menu
    Copy the full SHA
    ddcf2d4 View commit details
    Browse the repository at this point in the history
  2. fixed ddcf2d4

    pm47 committed Jun 14, 2019
    Configuration menu
    Copy the full SHA
    3033696 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2019

  1. Configuration menu
    Copy the full SHA
    5a1a58a View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2019

  1. Configuration menu
    Copy the full SHA
    1240166 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2019

  1. Configuration menu
    Copy the full SHA
    c4eb812 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2019

  1. Configuration menu
    Copy the full SHA
    3db77b4 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2019

  1. Update list of commands in eclair-cli help (#1091)

    * Add missing API endpoints to eclair-cli help
    araspitzu authored and pm47 committed Aug 12, 2019
    Configuration menu
    Copy the full SHA
    a60048d View commit details
    Browse the repository at this point in the history
  2. Documentation update (#1092)

    * Fix README style warnings
    * Add documentation links to the wiki
    * Update build instructions.
    t-bast authored and pm47 committed Aug 12, 2019
    Configuration menu
    Copy the full SHA
    7582402 View commit details
    Browse the repository at this point in the history
  3. Typed amounts (#1088)

    * Type all amounts used in eclair
    
    * Add eclair.MilliSatoshi class
    
    * Use bitcoin-lib 0.14
    
    * Add specialized codecs for Satoshi/MilliSatoshi
    
    * Rename 'toSatoshi' to 'truncateToSatoshi' to highlight it's a precision-losing conversion
    araspitzu authored and pm47 committed Aug 12, 2019
    Configuration menu
    Copy the full SHA
    f53b770 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2019

  1. Configuration menu
    Copy the full SHA
    8be2227 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2019

  1. Configuration menu
    Copy the full SHA
    d321a21 View commit details
    Browse the repository at this point in the history
  2. Extended Queries: use TLV format for optional data (#1072)

    * Extended Queries: use TLV format for optional data
    
    Optional query extensions now use TLV instead of a custom format.
    Flags are encoded as varint instead of bytes as originally proposed. With the current proposal they will all fit on a single byte, but will be
    much easier to extends this way.
    
    * Move query message TLVs to their own namespace
    
    We add one new class for each TLV type, with specific TLV types, and encapsulate codecs.
    
    * Optional TLVs are represented as a list, not an optional list
    
    TLVs that extend regular LN messages can be represented as a TlvStream and not an Option[TlvStream] since we don't need
    to explicitely terminate the stream (either by preprending its length or using a specific terminator) as we do in Onion TLVs.
    
    No TLVs simply means that the TLV stream is empty.
    
    * Update to match  BOLT PR
    
    Checksums in ReplyChannelRange now have the same encoding as short channel ids and timestamps: one byte for
    the encoding type (uncompressed or zlib) followed by encoded data.
    
    * TLV Stream: Implement a generic "get" method for TLV fields
    
    If a have a TLV stream of type MyTLV which is a subtype of TLV, and MyTLV1 and MYTLV2 are both
    subtypes of MyTLV then we can use stream.get[MyTLV1] to get the TLV record of type MYTLV1 (if any)
    in our TLV stream.
    
    * Extended range queries: Implement latest BOLT changes
    
    Checksums are just transmitted as a raw array, with optional compression as it would be useless here.
    
    * Use extended range queries on regtest and testnet
    
    We will use them on mainnet as soon as lightning/bolts#557 has been merged.
    
    * Address review comments
    
    * Router: rework handling of ReplyChannelRange
    
    We remove the ugly and inefficient zipWithIndex we had before
    
    * NodeParams: move fee base check to its proper place
    
    * Router: minor cleanup
    sstone authored and pm47 committed Aug 22, 2019
    Configuration menu
    Copy the full SHA
    0780fc2 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2019

  1. Channel range queries: send back node announcements (#1108)

    * Channel Range Queries: send back node announcements if requested
    
    This PR adds support for sending back node announcements when replying to channel range queries:
    - when explicitly requested (bit is set in the optional query flag)
    - when query flags are not used and a channel announcement is sent (as per the BOLTs)
    
    A new configuration option `request-node-announcements` has been added in the `router` section. If set to true, we
    will request node announcements when we receive a channel id (through channel range queries) that we don't know of.
    This is a setting that we will probably turn off on mobile devices.
    
    * Increase tests timeouts
    
    There is now more work to do.
    
    * Test query sync with and without node announcements
    
    * Router: minor fix
    
    * Router: rework query handling
    sstone authored and pm47 committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    92d9f2a View commit details
    Browse the repository at this point in the history
  2. better naming

    pm47 committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    c8b41c9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d404e5d View commit details
    Browse the repository at this point in the history
  4. Router: better naming

    sstone committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    9947887 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e43d884 View commit details
    Browse the repository at this point in the history
  6. Update comment [skip ci]

    sstone committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    ea11036 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2019

  1. Router: format code

    sstone committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    217a8f7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5d070d3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d3f283d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b937ac7 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2019

  1. minor log update

    pm47 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    57abd93 View commit details
    Browse the repository at this point in the history
  2. made encoding type configurable

    pm47 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    b2b1506 View commit details
    Browse the repository at this point in the history
  3. renamed updateSync -> addToSync

    pm47 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    bd86b06 View commit details
    Browse the repository at this point in the history
  4. added rationale for split size

    pm47 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    361460d View commit details
    Browse the repository at this point in the history
  5. fixed tests

    pm47 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    69f2048 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fd3682d View commit details
    Browse the repository at this point in the history
  7. increased test timeout

    pm47 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    cd90287 View commit details
    Browse the repository at this point in the history
  8. inceased more timeouts

    pm47 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    310b9ba View commit details
    Browse the repository at this point in the history