diff --git a/apps/streaming/java/src/net/i2p/client/streaming/Connection.java b/apps/streaming/java/src/net/i2p/client/streaming/Connection.java index 9afa425813..b904c3742a 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/Connection.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/Connection.java @@ -892,13 +892,15 @@ public class Connection { _context.sessionKeyManager().failTags(_remotePeer.getPublicKey()); } - if (_log.shouldLog(Log.WARN)) - _log.warn("Resend packet " + _packet + " time " + numSends + - " activeResends: " + _activeResends + - " (wsize " - + newWindowSize + " lifetime " - + (_context.clock().now() - _packet.getCreatedOn()) + "ms)"); - _outboundQueue.enqueue(_packet); + if (numSends - 1 <= _options.getMaxResends()) { + if (_log.shouldLog(Log.WARN)) + _log.warn("Resend packet " + _packet + " time " + numSends + + " activeResends: " + _activeResends + + " (wsize " + + newWindowSize + " lifetime " + + (_context.clock().now() - _packet.getCreatedOn()) + "ms)"); + _outboundQueue.enqueue(_packet); + } _lastSendTime = _context.clock().now(); @@ -911,7 +913,7 @@ public class Connection { return; } - if (numSends > _options.getMaxResends()) { + if (numSends - 1 > _options.getMaxResends()) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Too many resends"); _packet.cancelled(); diff --git a/core/java/src/net/i2p/CoreVersion.java b/core/java/src/net/i2p/CoreVersion.java index e5ee1813df..ec41aa0d80 100644 --- a/core/java/src/net/i2p/CoreVersion.java +++ b/core/java/src/net/i2p/CoreVersion.java @@ -14,8 +14,8 @@ package net.i2p; * */ public class CoreVersion { - public final static String ID = "$Revision: 1.29 $ $Date: 2005/02/23 00:00:52 $"; - public final static String VERSION = "0.5.0.2"; + public final static String ID = "$Revision: 1.30 $ $Date: 2005/03/06 19:07:28 $"; + public final static String VERSION = "0.5.0.3"; public static void main(String args[]) { System.out.println("I2P Core version: " + VERSION); diff --git a/core/java/src/net/i2p/client/I2CPMessageProducer.java b/core/java/src/net/i2p/client/I2CPMessageProducer.java index 2cbaa2e6ed..acb02a9404 100644 --- a/core/java/src/net/i2p/client/I2CPMessageProducer.java +++ b/core/java/src/net/i2p/client/I2CPMessageProducer.java @@ -52,13 +52,17 @@ class I2CPMessageProducer { CreateSessionMessage msg = new CreateSessionMessage(); SessionConfig cfg = new SessionConfig(session.getMyDestination()); cfg.setOptions(session.getOptions()); + if (_log.shouldLog(Log.DEBUG)) _log.debug("config created"); try { cfg.signSessionConfig(session.getPrivateKey()); } catch (DataFormatException dfe) { throw new I2PSessionException("Unable to sign the session config", dfe); } + if (_log.shouldLog(Log.DEBUG)) _log.debug("config signed"); msg.setSessionConfig(cfg); + if (_log.shouldLog(Log.DEBUG)) _log.debug("config loaded into message"); session.sendMessage(msg); + if (_log.shouldLog(Log.DEBUG)) _log.debug("config message sent"); } /** diff --git a/core/java/src/net/i2p/client/I2PSessionImpl.java b/core/java/src/net/i2p/client/I2PSessionImpl.java index cd25bdd4c0..4bd107d31a 100644 --- a/core/java/src/net/i2p/client/I2PSessionImpl.java +++ b/core/java/src/net/i2p/client/I2PSessionImpl.java @@ -504,12 +504,15 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa long beforeSync = _context.clock().now(); long inSync = 0; - + if (_log.shouldLog(Log.DEBUG)) _log.debug("before sync to write"); try { synchronized (_out) { inSync = _context.clock().now(); + if (_log.shouldLog(Log.DEBUG)) _log.debug("before writeMessage"); message.writeMessage(_out); + if (_log.shouldLog(Log.DEBUG)) _log.debug("after writeMessage"); _out.flush(); + if (_log.shouldLog(Log.DEBUG)) _log.debug("after flush"); } } catch (I2CPMessageException ime) { throw new I2PSessionException(getPrefix() + "Error writing out the message", ime); diff --git a/core/java/src/net/i2p/client/I2PSessionImpl2.java b/core/java/src/net/i2p/client/I2PSessionImpl2.java index 44389e2f1e..116dbab884 100644 --- a/core/java/src/net/i2p/client/I2PSessionImpl2.java +++ b/core/java/src/net/i2p/client/I2PSessionImpl2.java @@ -73,10 +73,11 @@ class I2PSessionImpl2 extends I2PSessionImpl { } public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent) throws I2PSessionException { + if (_log.shouldLog(Log.DEBUG)) _log.debug("sending message"); if (isClosed()) throw new I2PSessionException("Already closed"); if (SHOULD_COMPRESS) payload = DataHelper.compress(payload, offset, size); else throw new IllegalStateException("we need to update sendGuaranteed to support partial send"); - + if (_log.shouldLog(Log.DEBUG)) _log.debug("message compressed"); // we always send as guaranteed (so we get the session keys/tags acked), // but only block until the appropriate event has been reached (guaranteed // success or accepted). we may want to break this out into a seperate @@ -111,10 +112,12 @@ class I2PSessionImpl2 extends I2PSessionImpl { private boolean sendBestEffort(Destination dest, byte payload[], SessionKey keyUsed, Set tagsSent) throws I2PSessionException { long begin = _context.clock().now(); - + if (_log.shouldLog(Log.DEBUG)) _log.debug("begin sendBestEffort"); SessionKey key = _context.sessionKeyManager().getCurrentKey(dest.getPublicKey()); + if (_log.shouldLog(Log.DEBUG)) _log.debug("key fetched"); if (key == null) key = _context.sessionKeyManager().createSession(dest.getPublicKey()); SessionTag tag = _context.sessionKeyManager().consumeNextAvailableTag(dest.getPublicKey(), key); + if (_log.shouldLog(Log.DEBUG)) _log.debug("tag consumed"); Set sentTags = null; int oldTags = _context.sessionKeyManager().getAvailableTags(dest.getPublicKey(), key); long availTimeLeft = _context.sessionKeyManager().getAvailableTimeLeft(dest.getPublicKey(), key); @@ -151,7 +154,10 @@ class I2PSessionImpl2 extends I2PSessionImpl { sentTags.addAll(tagsSent); } + if (_log.shouldLog(Log.DEBUG)) _log.debug("before creating nonce"); + long nonce = _context.random().nextInt(Integer.MAX_VALUE); + if (_log.shouldLog(Log.DEBUG)) _log.debug("before sync state"); MessageState state = new MessageState(nonce, getPrefix()); state.setKey(key); state.setTags(sentTags); @@ -171,6 +177,7 @@ class I2PSessionImpl2 extends I2PSessionImpl { } } + if (_log.shouldLog(Log.DEBUG)) _log.debug("before sync state"); long beforeSendingSync = _context.clock().now(); long inSendingSync = 0; synchronized (_sendingStates) { diff --git a/core/java/src/net/i2p/time/Timestamper.java b/core/java/src/net/i2p/time/Timestamper.java index be0ee7b515..5a23e90e6f 100644 --- a/core/java/src/net/i2p/time/Timestamper.java +++ b/core/java/src/net/i2p/time/Timestamper.java @@ -158,15 +158,12 @@ public class Timestamper implements Runnable { */ private boolean queryTime(String serverList[]) throws IllegalArgumentException { long found[] = new long[_concurringServers]; - long localTime = -1; long now = -1; long expectedDelta = 0; for (int i = 0; i < _concurringServers; i++) { try { Thread.sleep(10*1000); } catch (InterruptedException ie) {} - localTime = _context.clock().now(); now = NtpClient.currentTime(serverList); - - long delta = now - localTime; + long delta = now - _context.clock().now(); found[i] = delta; if (i == 0) { if (Math.abs(delta) < MAX_VARIANCE) { diff --git a/history.txt b/history.txt index 94a385ec46..8bfa0c3d53 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,16 @@ -$Id: history.txt,v 1.171 2005/03/17 17:14:31 jrandom Exp $ +$Id: history.txt,v 1.172 2005/03/18 03:48:00 jrandom Exp $ + +* 2005-03-18 0.5.0.3 released + +2005-03-18 jrandom + * Minor tweak to the timestamper to help reduce small skews + * Adjust the stats published to include only the relevent ones + * Only show the currently used speed calculation on the profile page + * Allow the full max # resends to be sent, rather than piggybacking the + RESET packet along side the final resend (duh) + * Add irc.postman.i2p to the default list of IRC servers for new installs + * Drop support for routers running 0.5 or 0.5.0.1 while maintaining + backwards compatability for users running 0.5.0.2. 2005-03-18 jrandom * Eepproxy Fix for corrupted HTTP headers (thanks nickster!) diff --git a/installer/install.xml b/installer/install.xml index 3d5a56686a..b11d11b732 100644 --- a/installer/install.xml +++ b/installer/install.xml @@ -4,7 +4,7 @@ i2p - 0.5 + 0.5.0.3 diff --git a/installer/resources/i2ptunnel.config b/installer/resources/i2ptunnel.config index e3b76fbd83..2a075455ad 100644 --- a/installer/resources/i2ptunnel.config +++ b/installer/resources/i2ptunnel.config @@ -18,7 +18,7 @@ tunnel.1.description=IRC proxy to access the anonymous irc net tunnel.1.type=client tunnel.1.interface=127.0.0.1 tunnel.1.listenPort=6668 -tunnel.1.targetDestination=irc.duck.i2p,irc.baffled.i2p +tunnel.1.targetDestination=irc.duck.i2p,irc.baffled.i2p,irc.postman.i2p tunnel.1.i2cpHost=127.0.0.1 tunnel.1.i2cpPort=7654 tunnel.1.option.inbound.nickname=ircProxy diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 785810ec30..bef5cc0a80 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -15,9 +15,9 @@ import net.i2p.CoreVersion; * */ public class RouterVersion { - public final static String ID = "$Revision: 1.165 $ $Date: 2005/03/17 17:12:53 $"; - public final static String VERSION = "0.5.0.2"; - public final static long BUILD = 6; + public final static String ID = "$Revision: 1.166 $ $Date: 2005/03/18 03:48:01 $"; + public final static String VERSION = "0.5.0.3"; + public final static long BUILD = 0; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION); System.out.println("Router ID: " + RouterVersion.ID); diff --git a/router/java/src/net/i2p/router/StatisticsManager.java b/router/java/src/net/i2p/router/StatisticsManager.java index d3e8bb73ba..4de9eb22e9 100644 --- a/router/java/src/net/i2p/router/StatisticsManager.java +++ b/router/java/src/net/i2p/router/StatisticsManager.java @@ -102,24 +102,23 @@ public class StatisticsManager implements Service { stats.putAll(_context.profileManager().summarizePeers(_publishedStats)); includeThroughput(stats); - includeRate("router.invalidMessageTime", stats, new long[] { 10*60*1000, 3*60*60*1000 }); + includeRate("router.invalidMessageTime", stats, new long[] { 10*60*1000 }); includeRate("router.duplicateMessageId", stats, new long[] { 24*60*60*1000 }); includeRate("tunnel.duplicateIV", stats, new long[] { 24*60*60*1000 }); - includeRate("tunnel.fragmentedComplete", stats, new long[] { 10*60*1000, 3*60*60*1000 }); includeRate("tunnel.fragmentedDropped", stats, new long[] { 10*60*1000, 3*60*60*1000 }); includeRate("tunnel.fullFragments", stats, new long[] { 10*60*1000, 3*60*60*1000 }); includeRate("tunnel.smallFragments", stats, new long[] { 10*60*1000, 3*60*60*1000 }); - includeRate("tunnel.testFailedTime", stats, new long[] { 60*60*1000, 3*60*60*1000 }); - includeRate("tunnel.dispatchOutboundTime", stats, new long[] { 60*60*1000 }); - includeRate("tunnel.dispatchGatewayTime", stats, new long[] { 60*60*1000 }); - includeRate("tunnel.dispatchDataTime", stats, new long[] { 60*60*1000 }); - includeRate("tunnel.buildFailure", stats, new long[] { 10*60*1000, 60*60*1000 }); - includeRate("tunnel.buildSuccess", stats, new long[] { 10*60*1000, 60*60*1000 }); + includeRate("tunnel.testFailedTime", stats, new long[] { 60*60*1000 }); + + includeRate("tunnel.buildFailure", stats, new long[] { 60*60*1000 }); + includeRate("tunnel.buildSuccess", stats, new long[] { 60*60*1000 }); includeRate("router.throttleTunnelProbTestSlow", stats, new long[] { 60*60*1000 }); includeRate("router.throttleTunnelProbTooFast", stats, new long[] { 60*60*1000 }); includeRate("router.throttleTunnelProcessingTime1m", stats, new long[] { 60*60*1000 }); - + + includeRate("router.fastPeers", stats, new long[] { 60*60*1000 }); + includeRate("clock.skew", stats, new long[] { 10*60*1000, 3*60*60*1000, 24*60*60*1000 }); includeRate("transport.sendProcessingTime", stats, new long[] { 60*60*1000 }); diff --git a/router/java/src/net/i2p/router/peermanager/ProfileOrganizerRenderer.java b/router/java/src/net/i2p/router/peermanager/ProfileOrganizerRenderer.java index 588aef96d2..614eaf7980 100644 --- a/router/java/src/net/i2p/router/peermanager/ProfileOrganizerRenderer.java +++ b/router/java/src/net/i2p/router/peermanager/ProfileOrganizerRenderer.java @@ -111,7 +111,8 @@ class ProfileOrganizerRenderer { if (isIntegrated) buf.append(", Integrated"); buf.append("").append(num(prof.getSpeedValue())); - buf.append('/').append(num(prof.getOldSpeedValue())).append(""); + //buf.append('/').append(num(prof.getOldSpeedValue())); + buf.append(""); buf.append("").append(num(prof.getCapacityValue())).append(""); buf.append("").append(num(prof.getIntegrationValue())).append(""); buf.append("").append(prof.getIsFailing()).append(""); diff --git a/router/java/src/net/i2p/router/transport/tcp/TCPTransport.java b/router/java/src/net/i2p/router/transport/tcp/TCPTransport.java index 9f5217b216..744339a121 100644 --- a/router/java/src/net/i2p/router/transport/tcp/TCPTransport.java +++ b/router/java/src/net/i2p/router/transport/tcp/TCPTransport.java @@ -87,8 +87,7 @@ public class TCPTransport extends TransportImpl { public static final int DEFAULT_ESTABLISHERS = 3; /** Ordered list of supported I2NP protocols */ - public static final int[] SUPPORTED_PROTOCOLS = new int[] { 2 - , 3 // forward compat, so we can drop 0.5 builds after 0.5.0.2 + public static final int[] SUPPORTED_PROTOCOLS = new int[] { 3 }; /** blah, people shouldnt use defaults... */ public static final int DEFAULT_LISTEN_PORT = 8887;