]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
interfaces: loosen a few max-size constraints which would limit us to a mere 1.09...
authorZooko O'Whielacronx <zooko@zooko.com>
Thu, 9 Oct 2008 19:13:57 +0000 (12:13 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Thu, 9 Oct 2008 19:13:57 +0000 (12:13 -0700)
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.

src/allmydata/interfaces.py

index b508fb219b7acdd25af7cef6e939aea89d1278a0..9d6ddd4821a2ccb63a4582fd69e65f8a41054005 100644 (file)
@@ -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():