Commit Graph

5532 Commits

Author SHA1 Message Date
zzz
bf29132898 Tunnels: Downgrade log error to warn 2021-01-12 09:49:09 -05:00
zzz
75734448c5 I2NP: Stub out new tunnel build messages (proposal 157)
WIP - not hooked in yet
2021-01-09 12:00:18 -05:00
zzz
aed1de84b8 SSU: Fix bandwidth estimator deadlock (ticket #2798)
Fix logging in SBE (bytes not packets)
2021-01-08 12:07:41 -05:00
zzz
ec89a80e80 Router: Disable reseeding and NTP in vmCommSystem 2021-01-07 11:04:56 -05:00
zzz
41c7b7382a SSU: Implement fast retransmit (ticket #2427)
This partially fixes the issue of packets not being retransmitted
before they expire in 10 seconds, introduced in 0.9.48 as reported by
jogger at http://zzz.i2p/topics/3003
Fast retransmit was also suggested by jogger as a solution and discussed in that thread.
This code is based on the requirements for TCP fast retransmit
as specified in RFC 5681 but cannot precisely follow the RFC
as UDP messages can be dropped without affecting later messages:
- nack counter is per-message, not per-connection
- some interactions with the retransmit timer when in fast retx mode
- msg expiration is currently 10s but max RTO is 60s
- interactions with individual fragment transmission implemented in 0.9.48-5
- this is a sender-side fix but it depends on far-end ack resend strategy

Maintain a local message sequence number and store
it in OMF, previously unused as codel is disabled
Removed acked messages from _outboundMessages as usual,
but stores message and seq. numbers in a LinkedHashMap,
so we may interpret additional acks as nacks.
Calculate the highest-acked seq. number for every incoming packet.
Marks messages older than highest acked as nacked
Fast-retransmits after 3 nacks
Window and SST adjustments per RFC 5681 sec. 2.4
Reduce resend ack quantity and timeout to improve odds of receiving "nacks"
Disable wakeup of OMF from IMF; should not be needed now that PS calls nudge()
PS.acked(partial) now returns true if any fragment was acked, not if complete
Log tweaks

Still todo: possible additional changes to ack resend strategy;
possible parameter adjustments including msg expiration;
confirm that OMF wakeup in IMF is not required;
further testing and cleanups;
take additional ideas from alternative proposal in MR !8;
stat tweaks;
find related tickets to close

Reviewed by and contains code from zlatinb in MR !8
This builds on several previous SSU improvements; see #2427 for a list.
ref: gitlab MRs !8 !9 !10 !11
2021-01-07 09:33:09 -05:00
zzz
888311e34f Build: Add translations to gradle build (part 1 - jars) 2021-01-03 09:08:21 -05:00
zzz
a481255adb Tunnels: Improve error handling of zero tunnel ID at OBEP
Reduce max time to defragment
Make logging of errors consistent
cleanups, stat tweaks
2021-01-02 09:57:27 -05:00
zzz
13bd5e4938 SSU: Remove router version check for random intro key, now that the release is out 2021-01-01 07:13:26 -05:00
zzz
2569123055 NetDB: Drop lookups with replies going to us
Extend lookup expire time
Cleanups
2020-12-31 08:37:04 -05:00
zzz
de43de17f6 Crypto: Only skip N mixHash for router messages
Still required for ECIES build replies; previous checkin broke it
Make a new pattern id for N without responses
Fixes ECIES build replies
2020-12-30 07:08:47 -05:00
zzz
62fce859b9 Ratchet: mixHash() not required after message for N pattern 2020-12-29 14:15:00 -05:00
zzz
9fc97764c5 NetDB: Verify RI stores for a while after starting 2020-12-29 14:06:28 -05:00
zzz
a2734ffa72 SSU: Fix restoration of window after failed message
Reported by and adapted from patch by zlatinb
2020-12-27 08:50:11 -05:00
zzz
9e18ff1cd1 Router: Move countries.txt file into i2p.jar 2020-12-26 09:33:13 -05:00
zzz
665239fd37 Router: Move continents.txt file into jar
Move core resources directory to be consistent with the other subsystems
2020-12-26 08:11:00 -05:00
zzz
8835351b99 I2CP: Fix requesting leasesets for subsessions (ticket #2458)
Always request new LS for subsessions also
Don't reuse LS object for subsessions
Cancel rerequest timer as necessary
Fixes watchdog warnings
Fixes console status for subsessions in different states
javadocs
2020-12-24 13:56:32 -05:00
zzz
7b785ea454 I2CP: Fix encrypted leaseset for ECIES and dual-key encryption, and for offline keys 2020-12-23 10:05:58 -05:00
zzz
8f5fc44755 Crypto: Increase ratchet tag window
Set trimbehind = lookahead
Ramp up tag window faster
Check for ratchet ES encrypt fails
Log tweaks
2020-12-23 06:47:39 -05:00
e88f40cd95 Whitespace 2020-12-21 23:00:12 +00:00
zzz
82e93a53a3 bump -7 2020-12-21 15:51:14 -05:00
zzz
abb8cbe75d SSU: Fix partial acks not being sent when there are no 'gaps'.
Workaround the bug on the sending side for pre-0.9.49 routers by sending fragments in reverse order.

Bug introduced in commit 9c4558d891 Sep 20 2014.
This partially reverts that commit.
Reported by and adapted from a patch by zlatinb
2020-12-21 10:02:20 -05:00
zzz
30ffdd03c7 SSU log tweaks 2020-12-20 08:35:07 -05:00
zzz
5e8de68746 SSU: Increase sendWindowBytesRemaining when increasing the window
Fix BWE log formatting
2020-12-19 08:23:13 -05:00
zzz
8ae29c8c00 SSU: Westwood+ bandwidth estimator classes (ticket #2427) 2020-12-19 07:26:53 -05:00
zzz
542efa0d9a SSU: Westwood+ congestion control (ticket #2427)
Reduce initial window to match RFC
Add back to window on message failure
Remove two bps stats
log tweaks
2020-12-18 14:46:26 -05:00
zzz
23c80accfa SSU: More PeerState cleanup 2020-12-18 11:58:55 -05:00
zzz
b909430725 SSU: Account for packet overhead in window calculations 2020-12-18 11:52:18 -05:00
zzz
20b413bc67 Crypto: Fix use after free (ticket #2797) 2020-12-18 11:05:36 -05:00
66b724759d lock locked_shouldSend on this 2020-12-18 09:03:52 +00:00
zzz
56059448c5 SSU: Send subset of fragments (ticket #2427)
if all fragments will not fit in the window.
Track per-fragment send count.
Reset send window when retransmitting.
Update send window when partial acks received.
Make OMS.getMaxSends() and getPushCount() track different things.
Change OMS.push() to be called by OMF and return the pushed fragments.
Use size of smallest fragment rather than total size to determine if we can send a message now.
This is an improved fix for ticket #2505.
Eliminate repeated calls to OMS.getLifetime()
Log tweaks and reduce log levels
Improves throughput on lossy connections.
Reduces latency for large messages.
This is prep for reducing DEFAULT_SEND_WINDOW_BYTES and W+, which
would have exacerbated these issues.
Additional changes to follow, implementing Westwood+, see #2427
2020-12-17 12:54:24 -05:00
zzz
1c52eeb910 NetDB: Prevent reported NPE 2020-12-16 11:01:45 -05:00
zzz
4aefe4bf7a SSU: Fix OMF looping when timer isn't cancelled after last message acked
Push out timer when no more bandwidth available
Workarounds for now, more changes to follow
2020-12-16 09:40:39 -05:00
idk
b9444cdc51 Merge branch 'fix-ides' into 'master'
Fix ides

See merge request i2p-hackers/i2p.i2p!2
2020-12-14 23:22:16 +00:00
zzz
aa181ee43f SSU: Restore sync dropped in cleanup 2020-12-12 11:00:03 -05:00
zzz
ab04f92072 SSU: PeerState cleanup 2020-12-12 10:15:02 -05:00
067ee80ba0 remove IntelliJ and Eclipse project descriptors 2020-12-11 19:45:25 +00:00
zzz
0ad7e52b71 Router (proposal 156):
- Change router ECIES SKM to use N pattern, remove Elligator2, to match proposal changes
- Allow encrypted messages to ECIES routers
- Allow ECIES routers to become floodfill
- Add XDH factory to VM comm system for tests
2020-12-11 10:08:41 -05:00
zzz
5a3e26453f Transport: Block SIP ports 2020-12-06 13:11:46 +00:00
zzz
d683f0d9eb Util: Change DoH to the RFC 8484 protocol 2020-12-06 12:54:20 +00:00
zzz
58020b4b58 Console: Swap some columns on ssu /peers for consistency
Format send window and slow start threshold values
2020-12-05 12:56:58 +00:00
zzz
36fdfd529f 0.9.48 2020-12-01 15:54:41 +00:00
zzz
c60e51514c Add old cert to deletelist.txt
Javadoc fix
2020-12-01 14:39:44 +00:00
zzz
6e8fd42efd pull translations 2020-11-27 18:40:53 +00:00
zzz
6c2c6abfb9 NTCP: Enable nodelay by default
SSU: Don't wakeup OMF after ack if no more messages are pending
2020-11-26 18:58:22 +00:00
zzz
d8924119b5 NTCP: Add nodelay option for testing 2020-11-24 14:48:59 +00:00
zzz
875fcdfb94 NetDB: Increase min FF version for LS lookups since most are LS2 now 2020-11-22 19:46:18 +00:00
zzz
ccb4210f8b NetDB: Limit max explore at startup when hidden 2020-11-20 14:37:22 +00:00
zzz
7e5dc6ad64 Tomcat 9.0.40 2020-11-20 14:11:59 +00:00
zzz
31622d0458 NetDB: Increase exploration rate when hidden 2020-11-20 12:59:22 +00:00
zzz
f9b18545f9 Reseed update 2020-11-20 12:30:52 +00:00