From: Zooko O'Whielacronx Date: Thu, 9 Oct 2008 19:13:57 +0000 (-0700) Subject: interfaces: loosen a few max-size constraints which would limit us to a mere 1.09... X-Git-Url: https://git.rkrishnan.org/pf/content/$sch_link?a=commitdiff_plain;h=86e22b8addf1743864f3362ebb022a295c99d9cd;p=tahoe-lafs%2Ftahoe-lafs.git interfaces: loosen a few max-size constraints which would limit us to a mere 1.09 TB maximum file size These constraints were originally intended to protect against attacks on the storage server protocol layer which exhaust memory in the peer. However, defending against that sort of DoS is hard -- probably it isn't completely achieved -- and it costs development time to think about it, and it sometimes imposes limits on legitimate users which we don't necessarily want to impose. So, for now we forget about limiting the amount of RAM that a foolscap peer can cause you to start using. --- diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py index b508fb21..9d6ddd48 100644 --- a/src/allmydata/interfaces.py +++ b/src/allmydata/interfaces.py @@ -14,7 +14,7 @@ FURL = StringConstraint(1000) StorageIndex = StringConstraint(16) URI = StringConstraint(300) # kind of arbitrary -MAX_BUCKETS = 200 # per peer +MAX_BUCKETS = 256 # per peer -- zfec offers at most 256 shares per file ShareData = StringConstraint(None) URIExtensionData = StringConstraint(1000) @@ -236,23 +236,22 @@ class IStorageBucketWriter(Interface): @return: a Deferred that fires (with None) when the operation completes """ - def put_plaintext_hashes(hashes=ListOf(Hash, maxLength=2**20)): + def put_plaintext_hashes(hashes=ListOf(Hash)): """ @return: a Deferred that fires (with None) when the operation completes """ - def put_crypttext_hashes(hashes=ListOf(Hash, maxLength=2**20)): + def put_crypttext_hashes(hashes=ListOf(Hash)): """ @return: a Deferred that fires (with None) when the operation completes """ - def put_block_hashes(blockhashes=ListOf(Hash, maxLength=2**20)): + def put_block_hashes(blockhashes=ListOf(Hash)): """ @return: a Deferred that fires (with None) when the operation completes """ - def put_share_hashes(sharehashes=ListOf(TupleOf(int, Hash), - maxLength=2**20)): + def put_share_hashes(sharehashes=ListOf(TupleOf(int, Hash))): """ @return: a Deferred that fires (with None) when the operation completes """ @@ -293,22 +292,22 @@ class IStorageBucketReader(Interface): def get_plaintext_hashes(): """ - @return: ListOf(Hash, maxLength=2**20) + @return: ListOf(Hash) """ def get_crypttext_hashes(): """ - @return: ListOf(Hash, maxLength=2**20) + @return: ListOf(Hash) """ def get_block_hashes(): """ - @return: ListOf(Hash, maxLength=2**20) + @return: ListOf(Hash) """ def get_share_hashes(): """ - @return: ListOf(TupleOf(int, Hash), maxLength=2**20) + @return: ListOf(TupleOf(int, Hash)) """ def get_uri_extension():