Author: toad
Date: 2007-09-26 19:19:03 +0000 (Wed, 26 Sep 2007)
New Revision: 15352
Modified:
trunk/freenet/src/freenet/node/Version.java
Log:
1065: (MANDATORY 30 SEPTEMBER 0:00 UTC, makes 1064 mandatory immediately)
Opennet:
- Keep the last 50 dropped opennet peers. Accept connections from them if we
are desperate. This should improve opennet connectivity post-downtime, which
right now is nil unless you have darknet peers too or it was a very short
downtime. Note that we are fairly careful here - we won't drop a working
connection for an old-opennet-peer, and we double check once link setup is
complete.
-- Send connection attempts to randomly chosen old-opennet-peers every 60
seconds (10 seconds if we have no conns at all) if we have less than 5
connected peers, starting 2min after startup (we can't dump an old connection
until that point anyway).
-- Store opennet old-peers to disk in a separate file.
- Increase max opennet peers to 20 (connectivity, speed).
- Add peers to opennet LRU immediately when added from web interface / FCP, and
drop excess peers to get back under the limit (note that this means that it's
possible for the user to add 15 peers which don't connect and therefore kill
his opennet... not our problem if he does something dumb!). Previously, the
nodes would only be added to the LRU once they'd had a successful CHK fetch, or
a node restart, so the bot-added connections couldn't be removed until that
point.
- Various related bugfixes/refactorings. Mostly the below are a result of the
above, but several are existing bugs in the previous version mostly causing too
much connection churn:
-- Don't allow adding an opennet peer if opennet is disabled in PM.addPeer().
Related to above.
-- Don't add a peer if it's already in the LRU in wantPeer(), but allow adding
it to the LRU if it's already in the main peers list because it may have
already been added to the PeerManager (due to opennet peer addition logic
above).
-- Remove peer from opennet even if it is not in the main peers list in
PeerManager.removePeer.
-- Always add the peer to the main routing table in wantPeer() if we add it to
the LRU. Some places only call wantPeer().
-- Add at beginning or end of LRU according to policy, even if we haven't
filled it yet.
-- Fix some wierd logic relating to not adding nodes when we already have them.
-- Don't allow dropping connected peers unless enough successes since last and
we have a node to add. The previous logic was wrong and was causing us to drop
connected peers too often.
-- Fix the don't-drop-till-disconnected-for-5-minutes limit: only update
timeLastDisconnect when we actually go from connected to disconnected (make
PeerNode.disconnected() return boolean).
-- Eliminate nested locking in wantPeer().
-- Drop peers which are over the limit earlier in wantPeer().
-- Check the LRU not the main peers list when deciding whether an opennet peer
is already there.
-- Don't remove a peer after timeout if it's no longer being disconnected
because it's been promoted back into the LRU.
-- Implement PURGE option on explicit disconnect. It removes the peer from the
old-opennet-peers list.
- Wait 2 minutes after startup to drop peers, not 5.
- Show on strangers page time when the peer last served a request successfully.
Can sort by this.
Translations:
- Updated italian translation by _ph00.
- Updated french translation by batosai.
Web interface:
- TimeUtil: return "0" not "" for times of <1000ms if we don't include ms and
update unit test for this.
Low level:
- Check domain names against a regex. If they are invalid, don't look them up
and don't accept them for IP overrides.
- Support DISCONNECTING peernode status in a couple more places.
- Don't report status as listen only, burst only or bursting when it is
actually DISCONNECTING for a darknet node.
- Better error handling, handling of IPv6 addresses and minor optimisation in
FreenetInetAddress(String).
Misc:
- Fix NPE when adding a node if it has no physical.udp.
- Remove old back compat cruft from FreenetInetAddress (from compat with builds
< 1008).
Debugging etc:
- Comments, javadocs.
- Indenting, imports.
- Only log on stdout once about any given UOM offer.
- Un-public some methods.
- Use constants in SHA256.
- Rename the freenet.node.fcp.Peer class to PeerMessage to avoid confusion with
io.comm.Peer
- Minor refactoring in Peer.
- assert(pn != null) in PM.addPeer().
- PacketSender logging: update logDEBUG/logMINOR just before wait()ing.
Auto-updater:
- Update the edition numbers on the auto-update keys to the currently running
value on startup.
JFK
- More fixes, more implementation, more refactoring (mostly unverified).
- Merge changes from trunk. (Patch unverified, we will check when JFK is merged
back to trunk).
Librarian:
- Version 7: Add a default index site from a contributor on Frost.
Installer:
- Various shell script fixes, in some shells these may have caused a failure to
download the plugins, also remove unnecessary output redirections.
Credits:
- toad
- nextgens
- zothar
- _ph00
- batosai
- kryptos
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2007-09-26 19:03:53 UTC (rev
15351)
+++ trunk/freenet/src/freenet/node/Version.java 2007-09-26 19:19:03 UTC (rev
15352)
@@ -24,17 +24,17 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 1064;
+ private static final int buildNumber = 1065;
/** Oldest build of Fred we will talk to */
- private static final int oldLastGoodBuild = 1058;
- private static final int newLastGoodBuild = 1064;
+ private static final int oldLastGoodBuild = 1064;
+ private static final int newLastGoodBuild = 1065;
static final long transitionTime;
static {
final Calendar _cal =
Calendar.getInstance(TimeZone.getTimeZone("GMT"));
// year, month - 1 (or constant), day, hour, minute, second
- _cal.set( 2007, Calendar.SEPTEMBER, 28, 0, 0, 0 );
+ _cal.set( 2007, Calendar.SEPTEMBER, 30, 0, 0, 0 );
transitionTime = _cal.getTimeInMillis();
}