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

create-gossipstore.c can read scid -> satoshis csv file. The csv is i… #5

Commits on Apr 5, 2019

  1. pytest: backtrace on internal errors in subdaemons.

    A backtrace which makes it much easier to figure out what's happening.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    7509cd9 View commit details
    Browse the repository at this point in the history
  2. devtools/create-gossipstore: tool to create a gossip_store file from …

    …stream of gossip.
    
    The gossip is expected to be in format:
    
        16-bit-big-endian-length
        [gossip message]
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    de21089 View commit details
    Browse the repository at this point in the history
  3. gossipd: use htable instead of simple array for node's channels.

    For giant nodes, it seems we spend a lot of time memmoving this array.
    Normally we'd go for a linked list, but that's actually hard: each
    channel has two nodes, so needs two embedded list pointers, and when
    iterating there's no good way to figure out which embedded pointer
    we'd be using.
    
    So we (ab)use htable; we don't really need an index, but it's good for
    cache-friendly iteration (our main operation).  We can actually change
    to a hybrid later to avoid the extra allocation for small nodes.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    d06daf9 View commit details
    Browse the repository at this point in the history
  4. dev: --dev-gossip-time so gossipd doesn't prune old data.

    This is useful for canned data, such as the million channels project.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    c3cd344 View commit details
    Browse the repository at this point in the history
  5. gossipd: temporarily allow giant messages

    We push a huge msg for listchannels with the million-channels project.
    We need to fix that, but this works around it so we can benchmark.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    4835e25 View commit details
    Browse the repository at this point in the history
  6. gossipd: dev option to allow unknown channels.

    This lets us benchmark without a valid blockchain.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    b2b3126 View commit details
    Browse the repository at this point in the history
  7. fixup! gossipd: dev option to allow unknown channels.

    Suggested-by: @cdecker
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    9533126 View commit details
    Browse the repository at this point in the history
  8. dev-compact-store-gossip: specific RPC so we can test gossip_store re…

    …write.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    f8d9425 View commit details
    Browse the repository at this point in the history
  9. pytest: test that gossipd remembers unannounced local channels across…

    … restarts
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    ad1e530 View commit details
    Browse the repository at this point in the history
  10. lightningd: log IO only on actual output.

    This causes natural batching, rather than on every little addition of
    JSON formatting.
    
    Before, to listchannels 100,000 channels took 82.48 seconds, after
    6.82 seconds.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    cb1018a View commit details
    Browse the repository at this point in the history
  11. log: truncate giant IO logging.

    Adding a giant IO message simply causes it to be pruned immediately,
    so truncate it if it's more than 1/64 the max size.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    835834d View commit details
    Browse the repository at this point in the history
  12. gossipd: store local channel updates across restart, even if unannoun…

    …ced.
    
    Either private or simply not enough confirms.  They would have been added
    on reconnect, but that's not ideal.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    5c4f8c4 View commit details
    Browse the repository at this point in the history
  13. gossipd: preserve unannounced channels across store compaction.

    Otherwise we'd forget them on restart, again.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    abc6487 View commit details
    Browse the repository at this point in the history
  14. devtools/gossipwith: add option to stream from stdin.

    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    4f00cae View commit details
    Browse the repository at this point in the history
  15. tools/bench-gossipd.sh: rough benchmark for gossipd and the million c…

    …hannels project
    
    Outputs CSV.  We add some stats for load times in developer mode, so we can
    easily read them out.
    
    peer_read_all_sec doesn't work, since we seem to reject about half the
    updates for having bad signatures.  It's also very slow...
    
    routing fails, for unknown reasons, so that failure is ignored in routing_sec.
    
    Results from 5 runs, min-max(mean +/- stddev):
    	store_load_msec,vsz_kb,store_rewrite_sec,listnodes_sec,listchannels_sec,routing_sec,peer_write_all_sec
    	39275-44779(40466.8+/-2.2e+03),2899248,41.010000-44.970000(41.972+/-1.5),2.280000-2.350000(2.304+/-0.025),49.770000-63.390000(59.178+/-5),33.310000-34.260000(33.62+/-0.35),42.100000-44.080000(43.082+/-0.67)
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    b563009 View commit details
    Browse the repository at this point in the history
  16. fixup! tools/bench-gossipd.sh: rough benchmark for gossipd and the mi…

    …llion channels project
    
    Suggested-by: @niftynei
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    0eeb94a View commit details
    Browse the repository at this point in the history
  17. fixup! tools/bench-gossipd.sh: rough benchmark for gossipd and the mi…

    …llion channels project
    
    MCP filename change.
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    2009e62 View commit details
    Browse the repository at this point in the history
  18. tools/bench-gossipd.sh: don't print CSV by default.

    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    4ebe5ce View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    ec31727 View commit details
    Browse the repository at this point in the history
  20. create-gossipstore.c can read scid -> satoshis csv file. The csv is …

    …in the format scid ,satoshis where there is a black space after scid. Made a header file that contains a struct. Modified makefile. Added cmdline arg --scidfile /path/to/csv and made the constant capacity command optional. create-gossipstore prints stats at the end.
    nettijoe96 authored and rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    0f683c7 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    603dbc6 View commit details
    Browse the repository at this point in the history
  22. devtools/create-gossipstore: add --max option to create reduced tests…

    …ets.
    
    eg. for running under valgrind.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    d332153 View commit details
    Browse the repository at this point in the history
  23. patch cleanups.patch

    rustyrussell committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    c2736f0 View commit details
    Browse the repository at this point in the history
  24. added sanity check to make sure scid of csv is the same as scid in go…

    …ssip. Revised style, mem allocation, and error checks
    nettijoe96 committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    30fc20b View commit details
    Browse the repository at this point in the history