Set caps based on job lag and share bandwidth
Add 20 minute rate to tunnel.participatingMessageCountAvgPerTunnel to
be used for congestion caps
Don't set congestion cap if hidden
Remove old non-required client.timeoutCongestion* stats in OCMOSJ.
Remove RouterThrottle.getInboundRateDelta(), used only for those stats.
Remove transport.sendMessageSize rates longer than 60s, used only for getInboundRateDelta().
Remove transport.receiveMessageSize rates longer than 60s, unused anywhere.
Remove transport.sendProcessingTime rates longer than 60s, unused anywhere.
getInboundRateDelta() was broken anyway as it was looking at send, not receive size.
All of this was untouched since 2004.
9 total rates for required stats removed.
to save a large amount of space.
30m rates were almost always within 10% of the 60m rates,
so we clearly don't need both.
Keep 60m because that's what we publish in the netdb.
Adjust rate weighting in CapacityCalculator accordingly.
Previously did not count probabalistic or transient codes
Reduce 10 minute acceptance rate for these codes
(previously adjusted the averaged rate)
Make rates final in TunnelHistory
Static rates array to reduce object churn
Prep for removing 30m rates
Reduce now() calls, pull out of loops
by not using high cap tier. Congestion starts from the top.
Right now, the fastest routers have the worst expl. build success.
This will help correct that.
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.
Publish based on max tunnels setting only, other limits todo.
Tested on a single router.
Publishing disabled until the next release.
No handling of the caps yet in peer selection or profiling, todo.
Do not rebind internal port if only SSU external port changed
so "full cone" NAT will work
Log warning if NTCP configured with fixed port different from SSU
Eliminate Symmetric NAT errors for "full cone" NATs with different external port
Separate isPortFixed() states for IPv4 and IPv6
Allow port changes when state is unknown
Require two tests to transition from unknown IPv4 state
Save external port config on change
Don't reset external port config at startup
Add port change event to event log
Don't show zero send/receive BPS after 15 sec idle; show smoothed value,
so display isn't mostly zeros.
BPS sorters will now work correctly and totals are more accurate.
Pass now to send/receive BPS methods and BW estimator
Comment out UDPTransport.noteSend()
Fix alignment issue in NTCP peers table
Show 0 instead of 0.00 for zero BPS
Change rounding mode of formatters
to be only what stats.i2p needs
Disabled until next release, to preserve dev build anonymity,
tested while enabled
Commented out unsed code
ref: http://zzz.i2p/topics/3515