URIExtensionData = StringConstraint(1000)
Number = IntegerConstraint(8) # 2**(8*8) == 16EiB ~= 18e18 ~= 18 exabytes
Offset = Number
-ReadSize = int # the 'int' constraint is 2**31 == 2Gib
+ReadSize = int # the 'int' constraint is 2**31 == 2Gib -- large files are processed in not-so-large increments
LeaseRenewSecret = Hash # used to protect bucket lease renewal requests
LeaseCancelSecret = Hash # used to protect bucket lease cancellation requests
class RIBucketReader(RemoteInterface):
def read(offset=Offset, length=ReadSize):
- # ShareData is limited to 1MiB, so we don't need length= to be any
- # larger than that. Large files must be read in pieces.
return ShareData
TestVector = ListOf(TupleOf(Offset, ReadSize, str, str))
# storage/shares/$START/$STORAGEINDEX
# storage/shares/$START/$STORAGEINDEX/$SHARENUM
-# Where "$START" denotes the first 14 bits worth of $STORAGEINDEX (that's 3
-# base-32 chars, but the last one has only 4 bits in it -- i.e. only 16 possible
-# chars in the last position).
+# Where "$START" denotes the first 10 bits worth of $STORAGEINDEX (that's 2
+# base-32 chars).
# $SHARENUM matches this regex:
NUM_RE=re.compile("^[0-9]+$")