Improve seed generation script for clarity #7398

pull jgeewax wants to merge 1 commits into bitcoin:master from jgeewax:contrib-seeds changing 3 files +252 −151
  1. jgeewax commented at 8:29 pm on January 22, 2016: none

    The overall goal here is to make it a bit more clear what criteria go into selecting seeds, but is really just “general clean-up”.

    Stuff in this (somewhat large) change

    • Added some objects for the main concepts (Entry = a line in the file, Address = that first field)
    • Much more use of generators (main, get_entries_limited_by_asn) which shaves off some time (40s -> 20s for me)
    • Sorting by 30-day uptime and last success rather than address (no grouping by IP type, assuming slowly more people will be able to consume IPv6, and this mixes the more highly available IPv6 address into the list rather than putting them after all IPv4 addresses)
    • Using Python libraries for address validation (socket library).
    • Split apart a few things that had logic buried away (get_address_type, get_asn).
    • Use a schema to load a single line to remove any overhead with changes in seeds.txt.
    • Consolidated “what makes a seed OK” (in Entry.is_valid()).
    • Use Python’s set for uniquely selecting addresses (where port is ignored).
    • Added error logging and warnings when values are invalid.
    • Clarified the steps happening in the main method.
    • Moved suspicious hosts into a separate file.

    Stuff that might be worth doing

    • Making sure there are at least N addresses of each type (v4, v6, tor)
    • ASN checks on IPv6 addresses
    • Add lots of tests

    I assume this script is run only once in a blue moon, so I get it if you want to punt on taking a look. In the meantime I can always add tests to make everyone more confident that I didn’t just bork the deployment process for bitcoin-core :p

  2. Improvements to seed generation 99ec7ff60c
  3. jonasschnelli added the label Dev Scripts on Jan 22, 2016
  4. laanwj commented at 10:40 am on January 23, 2016: member
    Thanks, This does remind me that we need to do a hardcoded seed update for 0.12.
  5. laanwj commented at 11:40 am on April 25, 2016: member

    Sorry, I’ve forgotten about this a bit.

    Some conflicts have accumulated in these files, needs a rebase.

  6. arowser commented at 8:45 am on May 25, 2016: contributor
    Can one of the admins verify this patch?
  7. sipa commented at 8:38 am on June 5, 2016: member
    Rebase, pretty please?
  8. laanwj commented at 6:35 am on June 9, 2016: member
    Closing this for now. Let me know if you start work on this again.
  9. laanwj closed this on Jun 9, 2016

  10. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me