Commit Graph

6060 Commits

Author SHA1 Message Date
zzz
c1f83d6ec9 Router: Stat cleanup
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.
2023-02-04 08:49:40 -05:00
zzz
37beb53245 Profiles: Remove 30m tunnel history rates
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.
2023-02-01 17:10:04 -05:00
zzz
019a8b6655 Profiles: Count all build rejections in tunnel history
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
2023-02-01 16:23:45 -05:00
zzz
99703d53ba Ratchet: Don't bundle LS with ratchet ACK
Not necessary, and will be the wrong LS for EdDSA subsession
2023-02-01 08:47:58 -05:00
zzz
1e28557ce2 cleanup buf.append(s.substring(a, b)) -> buf.append(s, a, b)
all over, for object churn
2023-01-31 07:31:02 -05:00
zzz
07a796bcf6 typo 2023-01-30 14:50:40 -05:00
zzz
ac50eefe07 Tunnels: Improve expl. build success in well-connected routers during congestion
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.
2023-01-30 12:40:39 -05:00
zzz
bd4415ad5c Blocklist: Don't maintain IPv6 blocklist unless we have an IPv6 address
Don't read in same-country blocklist unless configured or in strict country,
so we don't continue to block when no longer hidden
2023-01-30 11:51:44 -05:00
zzz
86c6800fbd NTCP2: Ensure we publish a "6" address on transition to firewalled
Do not call restartListening() on transition to firewalled
2023-01-30 11:11:48 -05:00
zzz
124ebe9fdf Tunnels: Refactor peer selection
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.
2023-01-30 08:05:39 -05:00
zzz
1e35f940da Util: Comment out main() test 2023-01-29 12:50:54 -05:00
zzz
9fd31d014f Reseed test message fix 2023-01-28 07:52:52 -05:00
zzz
bfd7b1a5f5 Tools: Check RI dates and counts in reseed test 2023-01-28 07:43:53 -05:00
zzz
56e00fbe3a Tools: Delete reseed test files before retest 2023-01-28 06:26:08 -05:00
zzz
a27e1393f1 Router: Force the stragglers to rekey 2023-01-27 19:01:11 -05:00
zzz
3831348301 Tunnels: Reduce grace period from 120 to 90 sec. 2023-01-27 11:15:07 -05:00
zzz
9cbd7643db Tools: Add CLI reseed test 2023-01-27 10:51:17 -05:00
zzz
6117d8822e Router: One more conversion to ObjectCounterUnsafe 2023-01-27 07:10:01 -05:00
zzz
886adb12fc Tunnels: Pull now() calls out of loops 2023-01-26 17:04:55 -05:00
zzz
ad64e9c21e SSU2: Zero out intermediate handshake KDF results in-memory when done
Minor cleanup in est. mgr
2023-01-26 07:13:54 -05:00
zzz
87618700b3 Util: New thread-unsafe version of ObjectCounter
for efficiency where thread safety not required
2023-01-25 09:09:02 -05:00
zzz
bec1978861 Router: Preliminary support for congestion caps (proposal 162)
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.
2023-01-24 10:47:56 -05:00
zzz
ee167b6b74 Tunnels: Remove 0 event duration from addRateData() calls 2023-01-22 18:00:28 -05:00
zzz
0af5ea883a bump -4 2023-01-22 10:31:38 -05:00
zzz
be5a10194a Build: Fix list of changed files in manifests
Broken in move from mtn to git
Fix some places that were broken even with mtn
2023-01-22 10:08:53 -05:00
zzz
3da4369c96 bump -3 2023-01-21 12:47:05 -05:00
zzz
8bbddfc336 NTCP: NAT fixes part 4
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
2023-01-21 11:51:25 -05:00
zzz
38c839c389 SSU: NAT fixes part 3
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
2023-01-21 11:47:31 -05:00
zzz
537d6ef0d5 SSU2: Fix initial MTU when SSU1 disabled 2023-01-21 09:36:48 -05:00
zzz
a86ab694a5 SSU2: NAT fixes part 2
Fix rare peer test NPE if we did not set charlie's hash
2023-01-21 08:09:28 -05:00
zzz
d45df857d6 bump -2 2023-01-17 14:59:22 -05:00
zzz
a4220f7bc6 Transport: Add 8080 to ports list
as suggested by drzed
2023-01-15 09:02:35 -05:00
zzz
d6891d4b7a Console: Show smoothed receive BPS for SSU peers
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
2023-01-15 08:17:09 -05:00
zzz
cf82d3a156 Transport: isValidPort() micro-optimization
add i2pd console to list
2023-01-14 07:03:16 -05:00
zzz
c4fd1b610b Router: Simplify published stats values
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
2023-01-12 15:25:52 -05:00
zzz
841e277180 SAM: Abort tunnel build if control socket closes
Command error handling and message improvements
Implement simple HELP command
bump -1
2023-01-12 13:35:05 -05:00
zzz
34be58962a SSU2: Removed cached bitmasks
Waste of space and probably slower
2023-01-11 13:01:02 -05:00
zzz
a5d649ba2d 2.1.0 2023-01-10 09:32:31 -05:00
zzz
1e34738fca SSU: Rewrite/fix previous Java 7 (Android) fix
Update checklist to specify bootclasspath, so these are caught in the future
bump -16-rc
2023-01-08 14:45:17 -05:00
zzz
433340c11b SSU: Fix NPE handling SSU1 peer test msg 7
Reported by drzed
2023-01-08 13:04:23 -05:00
idk
43090cbc32 put must be followed by get in order to contain the current key, UDPTransport 2023-01-08 00:42:32 +00:00
idk
e70229140b use a containsKey()+put instead of putIfAbsent because putIfAbsent is not present in Java 8, thereby breaking Maven builds 2023-01-08 00:28:26 +00:00
zzz
b4fb8ba2c9 bump for review -15-rc 2023-01-06 14:45:01 -05:00
zzz
09a97c31fc Reseed: Exclude SSU2 with introducers from local reseed file 2023-01-04 08:52:57 -05:00
zzz
513a33abe6 Profiles: Capacity calculator minor cleanup 2023-01-02 16:44:31 -05:00
zzz
b313817399 Update annotation of tunnel reject codes 2023-01-02 16:21:47 -05:00
zzz
edfc9b1454 I2CP: Reduce session limit to 50
Set limit to 0 if vmCommSystem
i2ptunnel: Do not retry if session limit exceeded
2023-01-01 13:08:25 -05:00
zzz
5818f8e26d bump -14-rc 2022-12-31 14:10:58 -05:00
zzz
0d97dbf534 Tunnels: Add another tier for client tunnel build limiter
only if configured for 6 or more tunnels
2022-12-30 05:50:09 -05:00
zzz
f7d134066d UPnP: Catch AssertionError when closing SSDP multicast socket
Reported on Windows 10
ref: http://zzz.i2p/topics/3500
2022-12-30 05:33:10 -05:00