[Freenet-dev] Datastore now takes size into account

2000-08-09 Thread Neil Barsema
Ian wrote : > Done - the exact threshold can be configured in the .freenetrc file. just an idea, What if you up this threshold to say half the datsore size limit for inserts, that way you automaticly have countered the attack where you try to fill up the datastore with targeted inserts to make som

[Freenet-dev] Datastore now takes size into account

2000-08-07 Thread Dev Random
It would seem that the "weight" function should be proportional to the size of the file *multiplied* by the time since last request. This seems intuitive since the resources consumed are proportional to both the size and the time the item is alive. But an efficient datastructure to manage this is

[Freenet-dev] Datastore now takes size into account

2000-08-07 Thread Oskar Sandberg
On Mon, 07 Aug 2000, Ian Clarke wrote: <> > Ok, how is this for a solution to this exploit: Rather than using the > position in the datastore found by the method I describe as the insert > point for the data, it is used as a lower-bound for the insert point, > ie. the data is inserted at a random

[Freenet-dev] Datastore now takes size into account

2000-08-07 Thread Ian Clarke
> > Ok, how is this for a solution to this exploit: Rather than using the > > position in the datastore found by the method I describe as the insert > > point for the data, it is used as a lower-bound for the insert point, > > ie. the data is inserted at a random position above this point. > > T

[Freenet-dev] Datastore now takes size into account

2000-08-07 Thread Ian Clarke
> > c) You'd need to make sure searchData() does the same thing (if you want it > > too). > H, I assumed that searchData() would use the put() method, but I will > check this. Yep, its cool - searchData() uses the put() method, so the mod affects it already. Ian. ___

[Freenet-dev] Datastore now takes size into account

2000-08-07 Thread Ian Clarke
> > a) So if I take a key value and insert exactly one byte of data for it, that > > data will never expire? What if I flood Freenet with thousands of one byte > > inserts? Will they be blocking datastores (which are limited by number of > > entries as well) and never be cleared? > This may be an

[Freenet-dev] Datastore now takes size into account

2000-08-07 Thread Ian Clarke
> a) So if I take a key value and insert exactly one byte of data for it, that > data will never expire? What if I flood Freenet with thousands of one byte > inserts? Will they be blocking datastores (which are limited by number of > entries as well) and never be cleared? This may be an issue, but

[Freenet-dev] Datastore now takes size into account

2000-08-06 Thread Oskar Sandberg
a) So if I take a key value and insert exactly one byte of data for it, that data will never expire? What if I flood Freenet with thousands of one byte inserts? Will they be blocking datastores (which are limited by number of entries as well) and never be cleared? b) Isn't this a little risky do r

[Freenet-dev] Datastore now takes size into account

2000-08-06 Thread Ian Clarke
I have now modified the datastore so that it takes size into account by creating a new insert() method in CyclicArray, and modifying the put() method in StandardDataStore. This piece of javadoc describes the new functionality of put(): """ Inserts a DataStoreItem into the datastore. The new item