On Sun, 30 Nov 2003 [EMAIL PROTECTED] wrote:
> The idea is this: We eliminate the notion of HTL. Instead we replace
> it with a trust based system with TTL.
...
> void processRequest(Node node,Key key, TTL ttl)
> {
> float load=getCurrentLoad(); //Check our current load.
>
> //Tenitively subtract the maximum amount of credit that the node could owe
> us.
> //Subtract returns the amount it took away. (never more than there was there)
> float credit = node.credit.subtract(ttl * 1.414214);
This is a penalty imposed on the requestor, refunded only if the request
is eventually successful.
> void requestComplete( Node requester, Node provider, TTL requesterTTL, TTL
> providerTTL, float requesterTime, float providerTime, bool successful)
> {
> if (successful)
> {
> if ( requester != me )
> { //add back the amount we took away minus the amount they owe
> us.
> requester.trust.add( requesterTTL * 1.414214 - Max( 0 ,
> squareRoot( 2 * requesterTTL^2 - requesterTime^2 ) ) );
> requester.trustInMe.add( Max( 0 , squareRoot( 2 *
> requesterTTL^2 - requesterTime^2 ) ) );
> }
> //Pay out. Pay up.
> if ( provider != me )
> {
> provider.trust.add( Max( 0 , squareRoot( 2 * providerTTL^2 -
> providerTime^2 ) ) );
> //add back the amount they took away minus the amount we owe
> them.
> provider.trustInMe.add( providerTTL * 1.414214 - Max( 0 ,
> squareRoot( 2 * providerTTL^2 - providerTime^2 ) ) );
> }
> }
> else
> {
> //everything already subtracted. Nothing to add.
> }
> }
While the details are not all that clear and the code doesn't quite make
sense, a network adopting this approach would suffer from grave defects.
A. THE NETWORK WOULD NEVER LEAVE THE ttl==0 PHASE.
In the early stages of network development, all nodes would be at zero
credit, and so all processRequest calls would be rejected. End of story,
really ;-)
However, there is a vague proposal for ttl==0 requests giving some small
amount of credit. These would be treated as requests with large HTL are
now; the proposal is for HTL==25. Let's say that a node acquires some
credit in this way and then makes a request using the proposed ttl>0
protocol. Freenet experience so far is that that request is unlikely to
succeed. The penalty is ttl*1.4. End of story, really; any credit gained
using the ttl==0 protocol is very likely to disappear immediately. The
network is stable in a state where all nodes have no credit with one
another.
B. ONE-SHOT INJECTION OF CREDIT
Let's say that there is a one-time injection of credit into a brand-new
network. There are two likely outcomes. In the first, the more likely
case, because of lack of specialization, everyone simply slides back to
zero credit. This occurs because the penalty for failure is high and the
chance of success is low, as no one is specialized.
C. METASTABLE: A FEW STARS, MOST NODES BROKE
In the second state (far less likely, in my opinion), a few nodes
specialize narrowly and hold to their specializations. The rest slide
back to no credit. This state is at least metastable: everyone learns
who is reliable, and so requests from them succeed and gain them credit.
The request chains to these stars rapidly become very short -- in fact,
most requests should be direct.
Most requests to other nodes fail, and they remain broke. They trade only
at ttl==0.
The stars can trade among themselves successfully. They know each other
well, and all requests between them are direct.
In this state, there is minimal replication, because request chains are
short. There is also minimal anonymity for the same reason. In other
words, this protocol might work for some nodes, but it ain't Freenet.
D. ATTACK ON A STAR
A cluster of nodes can easily attack a star by agreeing among themselves
to subdivide its specialization, cooperating among themselves as described
in E. They will become more attractive in each subdivision, so traffic
will shift to them. The natural result is for the star to fall back to
zero credit status.
Alternatively, all nodes in the cluster could just adopt the same
specialization as the star. If there are N nodes in the cluster, the star
should lose N/(N+1) of its traffic. The natural result is that the star
slides back towards zero credit.
One would have to experiment to see which tactic is more successful. ;-)
E. COOPERATE TO CONQUER
A cluster of nodes can agree to divide all of keyspace among them. Each
will give unlimited credit to any node. Each either handles requests
directly if the key lies in its range or forwards the request to the
cluster node responsible for the key. Requests are never rejected. If
the key is not held by the appropriate node, it gets it, if necessary
using the ttl==0 protocol. It always names itself as the source.
The proposed protocol has no penalty for this kind of behaviour. The
cluster nodes become stars and accumulate credit. They use this credit to
attack non-cluster stars. They can do this in a variety of ways, for
example by asking random nodes in the network for data in the range of
specialization of a star but not held by it; the appropriate cluster node
has it, but won't give it to the star under attack. The cluster can also
use the method described in D.
F. SYBIL ATTACK
A single node with suffient capacity can pretend to be N nodes, and then
the N nodes can divide key space between them and conquer the network as
described in E.
> Problems this solves.
> 1. No single user can abuse the network.
There are a number of abuses possible. See F, for example.
> 2. Users that donate more in their data store or bandwidth get
> rewarded by better network performance.
> 3. NGrouting can have accurate estimates because it does not need to
> know pDNF which previously was calculated without taking into account
> the HTL.
> 4. All data will ether be found or fail in a fixed time frame.
There are no timeouts in the proposed protocol. A rogue node can just use
a different processRequest, one that ignores the TTL. There is no penalty
for this.
-------------------------------------- 8< -------------------------------
// pseudocode
RogueNode.processRequest (Node requestor, Key key, TTL ttl) {
// set the load to something that looks good; no need to be honest
float load = goodNumber;
// we accept all requests
queryAccept (requestor, key, load);
int ndx = getBucket(key); // map key into cluster index
if (ndx == myIndex) {
if (myNode.contains(key)) {
// return the key
} else {
// get the key using ttl==0 protocol
}
} else {
// forward the request to another node in the cluster
clusterRoute (ndx, requestor, key);
}
}
-------------------------------------- 8< -------------------------------
> 5. Requesting Non existant keys cannot DOS the network
Not true. In a metastable network with a few stars and most nodes broke,
the effect of requesting non-existent keys is to discredit the stars,
driving the network from C towards A (no one specializes, everyone is
broke).
> 6. We learn about a nodes specialization even if the request does not work.
Ah, but nodes are free to lie ;-)
> 7. EVERYTHING can now we done non-alchemisticly. (Data store contents, Caching,
> Rejecting, etc.) Nodes maximize for profit.
Yes, nodes maximize for profit, but this doesn't prevent attacks and this
certainly doesn't provide anonymity of any sort.
This is the crux of the problem with this approach: it is an attempt to
change the basic purpose of Freenet. Nodes maximize for benefit in terms
of rapid and reliable replies to requests. The fundamental goals of
anonymity to the publisher and reader are ignored. If the network works
at all, everyone knows where a given document is to be found.
> 8. Current overload and routing problems go away.
Along with the network?
--
Jim Dixon [EMAIL PROTECTED] tel +44 117 982 0786 mobile +44 797 373 7881
_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl