Changeset 42fa230 for router


Ignore:
Timestamp:
Feb 1, 2018 2:51:49 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
38da5cd
Parents:
a021e0d
Message:

NetDB: Increase min floodfill version

Location:
router/java/src/net/i2p/router/networkdb/kademlia
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillVerifyStoreJob.java

    ra021e0d r42fa230  
    195195                Hash peer = peers.get(0);
    196196                RouterInfo ri = _facade.lookupRouterInfoLocally(peer);
    197                 if (ri != null && StoreJob.supportsCert(ri, keyCert)) {
     197                //if (ri != null && StoreJob.supportsCert(ri, keyCert)) {
     198                if (ri != null && StoreJob.shouldStoreTo(ri)) {
    198199                    Set<String> peerIPs = new MaskedIPSet(getContext(), ri, IP_CLOSE_BYTES);
    199200                    if (!_ipSet.containsAny(peerIPs)) {
     
    206207                } else {
    207208                    if (_log.shouldLog(Log.INFO))
    208                         _log.info(getJobId() + ": Skipping verify w/ router that doesn't support key certs " + peer);
     209                        _log.info(getJobId() + ": Skipping verify w/ router that is too old " + peer);
    209210                }
    210211                _ignore.add(peer);
  • router/java/src/net/i2p/router/networkdb/kademlia/IterativeSearchJob.java

    ra021e0d r42fa230  
    121121            NativeBigInteger.isNative();
    122122
     123    //private static final String MIN_QUERY_VERSION = SigType.EdDSA_SHA512_Ed25519.getSupportedSince();
     124    private static final String MIN_QUERY_VERSION = StoreJob.MIN_STORE_VERSION;
     125
    123126    /**
    124127     *  Lookup using exploratory tunnels
     
    320323                // so we won't request unencrypted replies anymore either.
    321324                String v = ri.getVersion();
    322                 String since = SigType.EdDSA_SHA512_Ed25519.getSupportedSince();
     325                String since = MIN_QUERY_VERSION;
    323326                if (VersionComparator.comp(v, since) < 0) {
    324327                    failed(peer, false);
  • router/java/src/net/i2p/router/networkdb/kademlia/StoreJob.java

    ra021e0d r42fa230  
    174174                    _state.addSkipped(peer);
    175175                    skipped++;
     176                } else if (!shouldStoreTo((RouterInfo)ds)) {
     177                    if (_log.shouldLog(Log.INFO))
     178                        _log.info(getJobId() + ": Skipping old router " + peer);
     179                    _state.addSkipped(peer);
     180                    skipped++;
     181/****
     182   above shouldStoreTo() check is newer than these two checks, so we're covered
     183
    176184                } else if (_state.getData().getType() == DatabaseEntry.KEY_TYPE_LEASESET &&
    177185                           !supportsCert((RouterInfo)ds,
     
    188196                    _state.addSkipped(peer);
    189197                    skipped++;
     198****/
    190199                } else {
    191200                    int peerTimeout = _facade.getPeerTimeout(peer);
     
    526535     * @since 0.9.12
    527536     */
     537/****
    528538    public static boolean supportsCert(RouterInfo ri, Certificate cert) {
    529539        if (cert.getCertificateType() != Certificate.CERTIFICATE_TYPE_KEY)
     
    543553
    544554    private static final String MIN_BIGLEASESET_VERSION = "0.9";
     555****/
    545556
    546557    /**
     
    548559     * @since 0.9.12
    549560     */
    550     public static boolean supportsBigLeaseSets(RouterInfo ri) {
     561/****
     562    private static boolean supportsBigLeaseSets(RouterInfo ri) {
    551563        String v = ri.getVersion();
    552564        return VersionComparator.comp(v, MIN_BIGLEASESET_VERSION) >= 0;
     565    }
     566****/
     567
     568    public static final String MIN_STORE_VERSION = "0.9.28";
     569
     570    /**
     571     * Is it too old?
     572     * @since 0.9.33
     573     */
     574    static boolean shouldStoreTo(RouterInfo ri) {
     575        String v = ri.getVersion();
     576        return VersionComparator.comp(v, MIN_STORE_VERSION) >= 0;
    553577    }
    554578
Note: See TracChangeset for help on using the changeset viewer.