mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 14:52:26 +00:00
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.
This commit is contained in:
parent
93725a6935
commit
86e22b8add
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user