Skip to content

p2p: supplying and using asmap to improve IP bucketing in addrman#366

Merged
ca333 merged 11 commits intoGLEECBTC:devfrom
DeckerSU:patch-asmap
Jun 10, 2020
Merged

p2p: supplying and using asmap to improve IP bucketing in addrman#366
ca333 merged 11 commits intoGLEECBTC:devfrom
DeckerSU:patch-asmap

Conversation

@DeckerSU
Copy link
Copy Markdown

@DeckerSU DeckerSU commented Jun 7, 2020

This is my try to port of bitcoin/bitcoin#16702 PR in Komodo source base.

Key points:

Tool for generation ip_asn.map file:

Small instruction of how to use:

  1. Generate ip_asn.map with tool above, or use the attached one:
    ip_asn.tar.gz
  2. Place it in .komodo folder.
  3. Start the daemon with -asmap option:
  -asmap=<file>
       Specify asn mapping used for bucketing of the peers (default:
       ip_asn.map). Relative paths will be prefixed by the net-specific datadir
       location.

Unit tests results (./komodo-test - addrman tests rewritten to use with Google Test Framework):

[----------] 16 tests from TestAddrmanTests
[ RUN      ] TestAddrmanTests.display_constants
[          ] ADDRMAN_NEW_BUCKET_COUNT = 1024
[          ] ADDRMAN_TRIED_BUCKET_COUNT = 256
[          ] ADDRMAN_BUCKET_SIZE = 64
[       OK ] TestAddrmanTests.display_constants (0 ms)
[ RUN      ] TestAddrmanTests.addrman_simple
[       OK ] TestAddrmanTests.addrman_simple (0 ms)
[ RUN      ] TestAddrmanTests.addrman_ports
[       OK ] TestAddrmanTests.addrman_ports (1 ms)
[ RUN      ] TestAddrmanTests.addrman_select
[       OK ] TestAddrmanTests.addrman_select (7 ms)
[ RUN      ] TestAddrmanTests.addrman_new_collisions
[       OK ] TestAddrmanTests.addrman_new_collisions (1 ms)
[ RUN      ] TestAddrmanTests.addrman_tried_collisions
[       OK ] TestAddrmanTests.addrman_tried_collisions (125 ms)
[ RUN      ] TestAddrmanTests.addrman_find
[       OK ] TestAddrmanTests.addrman_find (0 ms)
[ RUN      ] TestAddrmanTests.addrman_create
[       OK ] TestAddrmanTests.addrman_create (0 ms)
[ RUN      ] TestAddrmanTests.addrman_delete
[       OK ] TestAddrmanTests.addrman_delete (0 ms)
[ RUN      ] TestAddrmanTests.addrman_getaddr
[       OK ] TestAddrmanTests.addrman_getaddr (378 ms)
[ RUN      ] TestAddrmanTests.caddrinfo_get_tried_bucket_legacy
[       OK ] TestAddrmanTests.caddrinfo_get_tried_bucket_legacy (2 ms)
[ RUN      ] TestAddrmanTests.caddrinfo_get_new_bucket_legacy
[       OK ] TestAddrmanTests.caddrinfo_get_new_bucket_legacy (6 ms)
[ RUN      ] TestAddrmanTests.caddrinfo_get_tried_bucket
[       OK ] TestAddrmanTests.caddrinfo_get_tried_bucket (3 ms)
[ RUN      ] TestAddrmanTests.caddrinfo_get_new_bucket
[       OK ] TestAddrmanTests.caddrinfo_get_new_bucket (13 ms)
[ RUN      ] TestAddrmanTests.addrman_serialization
[       OK ] TestAddrmanTests.addrman_serialization (1 ms)
[ RUN      ] TestAddrmanTests.netbase_getgroup
[          ] failed to resolve: 257.0.0.1
[       OK ] TestAddrmanTests.netbase_getgroup (5 ms)
[----------] 16 tests from TestAddrmanTests (542 ms total)

@ca333 ca333 self-requested a review June 7, 2020 22:14
@ca333 ca333 merged commit d9749eb into GLEECBTC:dev Jun 10, 2020
Alrighttt pushed a commit to Alrighttt/komodo that referenced this pull request Oct 7, 2025
Update UniValue representation in Credential class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants