[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Encoding for Robust Immutable Storage (ERIS)
Re: Encoding for Robust Immutable Storage (ERIS)
Mon, 07 Dec 2020 18:12:59 +0100
mu4e 1.4.13; emacs 27.1
Thanks again for the extremely valuable feedback on the initial
I'd like to request feedback on a second version of the encoding:
The major change compared to the initial version from June: It is
I have become convinced that the functionality offered by the
"verification capability" - verify the integrity of all blocks
being able to decode content - can be implemented with a
algorithm for blocks. Removing the verification capability from
encoding itself simplifies the encoding and increases performance
The differences to ECRS are (see also
- Use Blake2b/ChaCha20 and allow a "convergence secret"
- Block size: ERIS allows block size of either 1 KiB or 32 KiB.
variety of use-cases (file sharing vs. robust storage of tiny
of data) seem to make this necessary. For both use cases this
better than the 4 KiB compromise.
- URN: A URN is defined independent of applications using the
- No namespace mechanism: This can be implemented with things such
Other reasons for not just referring to the ECRS paper:
- Concise specification of the encoding. E.g. the ECRS paper does
define cryptographic primitives used or URN.
- Include test vectors
The hope is that a wide variety of applications can use ERIS
content over a variety of transport and storage layers. Some
implementations (not by me) are already starting to pop up
I'd be very happy for your insight, feedback and opinions on
ERIS might find a place in the GNUNet filesharing application.
Christian Grothoff <email@example.com> writes:
On 7/26/20 7:28 PM, pukkamustard wrote:
Thank you for your comments!
For my taste, the block size is much too small. I understand
4k can make
sense for page tables and SATA, but looking at benchmarks 4k
too small to maximize SATA throughput. I would also worry
about 4k for a
request size in any database or network protocol. The
request are still too big for modern hardware. You could
easily go to
8k, which could be justified with 9k jumbo frames for Ethernet
at least also utilitze all of the bits in your paths. The 32k
are close to the 64k which are reportedly the optimum for
media. IIRC Torrents even use 256k.
I agree that increasing block size makes sense for improving
in storage and transport.
The overhead from padding may be
large for very small files if you go beyond 4k, but you should
think in terms of absolute overhead: even a 3100% overhead
change the fact that the absolute overhead is tiny for a 1k
The use-case I have in mind for ERIS is very small pieces of
even small files). Examples include ActivityStreams objects or
Ah, that's a different use case then file-sharing, so different
trade-offs certainly apply here.
Apparently the average size of individual ActivityStreams
less than 1kB (unfortunately I don't have the data to back this
I agree that the overhead of 3100% for a single 1kB object is
acceptable. But I would argue that an overhead of 3100% for
1kB objects is not. The difference might be a 32 GB database
a 1 GB database.
Sure, the only question is if it might not in this case make
combine the tiny objects into larger ones, like merging all OSM
a region into one larger download. But of course, it again
the use case you are shooting for.
Furthermore, you should consider a trick we use in GNUnet-FS,
that we share *directories*, and for small files, we simply
full file data in the meta data of the file that is stored
directory or search result. So you can basically avoid having
download tiny files as separate entities, so for files <32k we
overhead this way.
That makes a lot of sense.
But packing multiple objects into a single transport packet or
for storage on disk/in database works for small block sizes as
optimization just happens at a "different layer".
The key value I see in having small block sizes is that tiny
data can be individually referenced and used (securely).
Sure, if that's your only use case, 4k could make sense.
I'd be curious to see how much the two pass encoding costs in
-- it might be less expensive than ECRS if you are lucky
big block being cheaper than many small hash operations), or
expensive if you are unlucky (have to actually read the data
disk). I am not sure that it is worth it merely to reduce the
hashes/keys in the non-data blocks. Would be good to have some
this, for various file sizes and platforms (to judge IO/RAM
effects). As I said, I can't tell for sure if the 2nd pass is
free or quite expensive -- and that is an important detail.
with a larger block size, the overhead of an extra key in the
blocks could be quite acceptable.
I think the cost of the two-pass encoding in ERIS is quite
Considering that the hash of the individual blocks also needs
computed (as reference in parent nodes), I think ECRS will
Maybe the answer is not ECRS or ERIS but ECRS and ERIS. ECRS
pieces of data, where it makes more sense to have large block
single-pass encoding. And ERIS for (very many) small pieces of
where a 3100% overhead is too much but the performance penalty
acceptable and size of data is much smaller than memory.
There might be some heuristic that says: If data is larger than
ECRS, else use ERIS and you get the verification capability.
If using ECRS, you can add the verification capability by
list of all the hash references to the ECRS block with ERIS.
read capability of this list of ECRS block is enough to verify
integrity of the original ECRS encoded content (without
What do you think?
I don't know how important the verification capability is in
or how much the block size trade-offs are relevant (vs. grouping
objects into larger ones). If we can avoid proliferating
find one that fits all important use cases, that would be ideal.
not be _opposed_ to adopting ERIS in GNUnet (even considering
possible increase in encoding cost), _except_ for the tiny block
(which I know would be terrible for our use-case).
For 3.4 Namespaces, I would urge you to look at the GNU Name
(GNS). My plan is to (eventually, when I have way too much
could actually re-do FS...) replace SBLOCKS and KBLOCKS of
basically only GNS.
I have been looking into it. It does seem to be a perfect
The crypto is way above my head and using readily available and
implemented primitives would make implementation much easier
for me. But
I understand the need for "non-standard" crypto and am
Great. Feel free to chime in or ask questions. Right now, we're
to find the time to update the draft based on the feedback
received, but of course constructive feedback is always welcome.
- Re: Encoding for Robust Immutable Storage (ERIS),