I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
  • zzz's avatar
    124ebe9f
    Tunnels: Refactor peer selection · 124ebe9f
    zzz authored
    by checking if a peer qualifies when adding, rather than
    iterating through the whole netdb to generate an exclusion list at the start.
    This was very inefficient and generated needless lookup storms via lookupBeforeDropping()
    Same idea for getClosetHopExclude()
    Goal is to never iterate through all the known routers, profiles, or connected peers
    to select peers for a single tunnel.
    Add ExcluderBase and 4 classes for various cases:
    Excluder, ClosestHopExcluder, IBGWExcluder, and OBEPExcluder.
    
    Change CSFI.getEstablished() from a Set to a List for efficiency
    Improve efficiency of selectActivePeersNotFailingPeers()
    by iterating through connected list rather than profiles.
    Do not add not-connected peers to exclude set,
    which would become huge for hidden routers.
    
    Change getExclude() to shouldExclude()
    The exclude set calls shouldExclude() in contains().
    Pass the exclude set to ProfileOrganizer.
    
    For client tunnels, do OBEP and IBGW checks at peer selection time,
    not afterwards in ConnectChecker, so it doesn't fail at the end in checkTunnel().
    
    Check closest hop when hidden.
    Fail-fast for inbound when no connected peers and hidden, do not fall back to non-connected peers.
    Should improve startup time for hidden routers.
    
    Use ArraySet for matches to save space
    Remove unused selectPeersLocallyUnreachable() and selectPeersRecentlyRejecting()
    
    No peer selection policy changes here.
    Tunnels: Refactor peer selection
    zzz authored
    by checking if a peer qualifies when adding, rather than
    iterating through the whole netdb to generate an exclusion list at the start.
    This was very inefficient and generated needless lookup storms via lookupBeforeDropping()
    Same idea for getClosetHopExclude()
    Goal is to never iterate through all the known routers, profiles, or connected peers
    to select peers for a single tunnel.
    Add ExcluderBase and 4 classes for various cases:
    Excluder, ClosestHopExcluder, IBGWExcluder, and OBEPExcluder.
    
    Change CSFI.getEstablished() from a Set to a List for efficiency
    Improve efficiency of selectActivePeersNotFailingPeers()
    by iterating through connected list rather than profiles.
    Do not add not-connected peers to exclude set,
    which would become huge for hidden routers.
    
    Change getExclude() to shouldExclude()
    The exclude set calls shouldExclude() in contains().
    Pass the exclude set to ProfileOrganizer.
    
    For client tunnels, do OBEP and IBGW checks at peer selection time,
    not afterwards in ConnectChecker, so it doesn't fail at the end in checkTunnel().
    
    Check closest hop when hidden.
    Fail-fast for inbound when no connected peers and hidden, do not fall back to non-connected peers.
    Should improve startup time for hidden routers.
    
    Use ArraySet for matches to save space
    Remove unused selectPeersLocallyUnreachable() and selectPeersRecentlyRejecting()
    
    No peer selection policy changes here.
To find the state of this project's repository at the time of any of these versions, check out the tags.
history.txt 756.09 KiB