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

external/libbacktrace: Update to latest upstream master #2

Closed
wants to merge 46 commits into from
Closed

external/libbacktrace: Update to latest upstream master #2

wants to merge 46 commits into from

Commits on Jun 6, 2018

  1. gossipd: don't publish private updates after channel_announce.

    We generate new ones anyway; removing this code changes fixes coming
    up which now only need to change one place.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    2431742 View commit details
    Browse the repository at this point in the history
  2. tests: new helper to get pid of a particular subdaemon.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    498ad91 View commit details
    Browse the repository at this point in the history
  3. tests/test_lightningd.py: test new delayed gossip channel_announce be…

    …haviour.
    
    The gossip-query spec enhancements say not to forward an channel_announcement until
    you have receive a channel_update.  This test fails for now.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    601a855 View commit details
    Browse the repository at this point in the history
  4. gossipd: only broadcast channel_announcement once we have a channel_u…

    …pdate.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    c218922 View commit details
    Browse the repository at this point in the history
  5. gossipd: announce own node only after channel announcement actually b…

    …roadcast.
    
    handle_pending_cannouncement might not actually add the announcment,
    as it could be waiting for a channel_update.  We need to wait for
    the actual announcement before considering announcing our node.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    c2cc382 View commit details
    Browse the repository at this point in the history
  6. gossipd: announce nodes after channel announcement.

    In general, we need to only publish node announcements after
    publishing channel announcements, though we can accept node
    announcements as soon as we see channel announcements.  So we keep a
    flag for those node_announcement which haven't been broadcast yet.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    803e4f8 View commit details
    Browse the repository at this point in the history
  7. features: define LOCAL_GOSSIP_QUERIES feature.

    From BOLT #9 proposed update.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    3e07971 View commit details
    Browse the repository at this point in the history
  8. wire: Update to lastest BOLT draft.

    This includes the gossip query messages.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    6c6da45 View commit details
    Browse the repository at this point in the history
  9. gossipd: infrastructure to handle short_channel_id replies.

    We use the same system as for gossip: we trickle out replies when we're
    otherwise idle.
    
    This is minimal infrastructure: we don't actually process the
    query_short_channel_ids message yet, nor do we append node
    announcements.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    5864415 View commit details
    Browse the repository at this point in the history
  10. gossipd: send node announcements after short_channel_id replies.

    We use the same system as for gossip: we trickle out replies when we're
    otherwise idle.
    
    As we trickle out replies to query_short_channel_ids, we remember the
    pubkeys of nodes we mention.  At the end, we sort and uniquify, and
    then send any node_announcements we have for those.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    32c39c2 View commit details
    Browse the repository at this point in the history
  11. gossipd: handle query_short_channel_ids message.

    This doesn't handle zlib yet.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    7ee5da8 View commit details
    Browse the repository at this point in the history
  12. gossipd: wire up infrastructure to generate query_short_channel_ids msg.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    4d8b290 View commit details
    Browse the repository at this point in the history
  13. tests: add dev-query-scids

    And write the test for it.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    c633cbe View commit details
    Browse the repository at this point in the history
  14. gossipd: add timestamp to each broadcast message.

    This lets us filter by timestamp.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    7a32637 View commit details
    Browse the repository at this point in the history
  15. gossipd: ensure incoming timestamps are reasonable.

    This is kind of orthogonal to the other changes, but makes sense: if we
    would instantly or never prune the message, don't accept it.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    97bb6c5 View commit details
    Browse the repository at this point in the history
  16. gossipd: handle gossip_timestamp_filter message.

    And initialize filter (to "never") when we negotiated LOCAL_GOSSIP_QUERIES,
    and send initial filter message.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    531c82b View commit details
    Browse the repository at this point in the history
  17. gossipd: single-thread the gossip timer.

    We have a function called 'wake_pkt_out' which is really 'start
    gossiping', so rename it to 'wake_gossip_out'.
    
    In addition, it's fired both on a timer, and in response to our first
    gossip_timestamp_filter, which leads to very confusing (though,
    technically, not incorrect) behavior.
    
    Keep a single timer at all times, which now doubles as the flag to
    indicating we're syncing right now.  Set it once we're done syncing
    gossip.
    
    Technically this means we got from once-every-60-seconds to
    quiet-for-60-seconds-between-gossip, but that's OK.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    db6a644 View commit details
    Browse the repository at this point in the history
  18. gossipd: add dev-send-timestamp-filter command for testing timestamp …

    …filtering.
    
    Since we currently only (ab)use it to send everything, we need a way to
    generate boutique queries for testing.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    c34b49c View commit details
    Browse the repository at this point in the history
  19. gossipd: handle query_channel_range

    We send them all the short_channel_ids we have in a given range.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    0dda5d4 View commit details
    Browse the repository at this point in the history
  20. gossip: dev-query-channel-range to test query_channel_range.

    We keep a crappy bitmap, and finish when their replies cover
    everything we asked.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    118f099 View commit details
    Browse the repository at this point in the history
  21. gossipd: dev-set-max-scids-encode-size to artificially force "full" r…

    …eplies.
    
    We cap each reply at a single one, which forces the code into our
    recursion logic.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    9e51e19 View commit details
    Browse the repository at this point in the history
  22. zlib: add as a requirement.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    083a2ce View commit details
    Browse the repository at this point in the history
  23. gossipd: support and use zlib encoding in short_channel_id encoding.

    We still use uncompressed if zlib turns out to be larger.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    f52245d View commit details
    Browse the repository at this point in the history
  24. test_lightningd.py: actually make sure we do zlib encoding.

    Previous replies weren't large enough; add another channel and then
    use IO tracing to make sure the reply is zlib encoded.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    e9483f1 View commit details
    Browse the repository at this point in the history
  25. gossipd: don't queue node_announce unless we've queued channel_announce.

    We *accept* a node_announce if we have a channel_announce, but we
    can't queue it until we queue the channel_announce, which we only do
    once we have recieved a channel_update.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    5ec454c View commit details
    Browse the repository at this point in the history
  26. utils: make subd_pid return the *last* pid, in case we restarted daemon.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    383b309 View commit details
    Browse the repository at this point in the history
  27. Rename consider_own_node_announce to maybe_send_own_node_announce.

    Suggested-by: @cdecker
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    035d606 View commit details
    Browse the repository at this point in the history
  28. pytest: test_gossip_jsonrpc can always test aliases.

    The whole test is under DEVELOPER anyway, but even if it weren't it
    would work fine.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    e4457e5 View commit details
    Browse the repository at this point in the history
  29. gossipd: minor cleanups.

    Suggested-by: @cdecker
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    1bb7713 View commit details
    Browse the repository at this point in the history
  30. topo: Have chain_topology track both min and max block heights

    Signed-off-by: Christian Decker <decker.christian@gmail.com>
    cdecker authored and rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    0d4b7ea View commit details
    Browse the repository at this point in the history
  31. wallet: Return both min and max block heights

    Signed-off-by: Christian Decker <decker.christian@gmail.com>
    cdecker authored and rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    024dca0 View commit details
    Browse the repository at this point in the history
  32. topo: Tell chain_topology about the min and max block height

    Signed-off-by: Christian Decker <decker.christian@gmail.com>
    cdecker authored and rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    2415f48 View commit details
    Browse the repository at this point in the history
  33. gossip: Don't ask bitcoind for outpoints we should know

    Compares the `blocknum` in the `short_channel_id` with the range of blocks we
    store in the database and abort if we should have known about it. Avoids
    bombarding `bitcoind` with requests for channels that have already been spent or
    were invalid in the first place.
    
    Signed-off-by: Christian Decker <decker.christian@gmail.com>
    cdecker authored and rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    6298ce3 View commit details
    Browse the repository at this point in the history
  34. wallet: Cleanup db files if the tests succeed

    Signed-off-by: Christian Decker <decker.christian@gmail.com>
    cdecker authored and rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    d434032 View commit details
    Browse the repository at this point in the history
  35. pytest: Remove directories of successful tests

    Signed-off-by: Christian Decker <decker.christian@gmail.com>
    cdecker authored and rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    38b7a0e View commit details
    Browse the repository at this point in the history
  36. pytest: Use pytest fixtures for the test directory and clean it up

    The modern, pytest based, tests now clean up after themselves by removing
    directories of successful tests and the base directory if there was no failure.
    
    Signed-off-by: Christian Decker <decker.christian@gmail.com>
    cdecker authored and rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    de3b359 View commit details
    Browse the repository at this point in the history
  37. gitignore: Ignore .pytest_cache

    Signed-off-by: Christian Decker <decker.christian@gmail.com>
    cdecker authored and rustyrussell committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    294c76e View commit details
    Browse the repository at this point in the history
  38. ccan: update to have new configurator.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and Jan Sarenik committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    437fc5f View commit details
    Browse the repository at this point in the history
  39. configure: new script.

    You can use environment variables or the commandline to set defaults.
    
    It looks very autoconf, but you don't need to learn m4.
    
    Doesn't cover all the obscure flags, but it's easy to extend.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and Jan Sarenik committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    2f55e64 View commit details
    Browse the repository at this point in the history
  40. configure: add --enable-valgrind/disable-valgrind.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and Jan Sarenik committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    3bdbaa0 View commit details
    Browse the repository at this point in the history
  41. Makefile: import config.vars.

    We leave VALGRIND env var as an override for testing.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and Jan Sarenik committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    a3dc980 View commit details
    Browse the repository at this point in the history
  42. Makefile: not running configure first is so yesterday:

    Make should only run configure if config.var already exists:
    
        $ make
        ./configure --reconfigure
        ./configure: 65: .: config.vars: not found
        ./configure --reconfigure
        ./configure: 65: .: config.vars: not found
        Makefile:179: recipe for target 'ccan/config.h' failed
        make: *** [ccan/config.h] Error 2
    rustyrussell authored and Jan Sarenik committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    2e80aae View commit details
    Browse the repository at this point in the history
  43. travis: use VALGRIND rather than NO_VALGRIND.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and Jan Sarenik committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    502840b View commit details
    Browse the repository at this point in the history
  44. devtools/Makefile: add devtools/onion.c to DEVTOOLS_TOOL_SRC

    This way the object file correctly depends on external headers.  Currently
    a parallel build on a clean tree can give:
    
    ```
    In file included from ./common/sphinx.h:6:0,
                     from devtools/onion.c:5:
    ./bitcoin/pubkey.h:8:10: fatal error: secp256k1.h: No such file or directory
     #include <secp256k1.h>
              ^~~~~~~~~~~~~
    compilation terminated.
    <builtin>: recipe for target 'devtools/onion.o' failed
    ```
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and Jan Sarenik committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    f1727f3 View commit details
    Browse the repository at this point in the history
  45. external/Makefile: call git submodule sync and update with --remote.

    This is required when the remote URL changes.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and Jan Sarenik committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    fed3292 View commit details
    Browse the repository at this point in the history
  46. external/libbacktrace: Update to latest master

    This contains recent updates to config.sub and config.guess files.
    Jan Sarenik committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    c6dcedb View commit details
    Browse the repository at this point in the history