<?xml version="1.0"?><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"><head><title>EER - Canons of ERIS</title><style type="text/css">body {
    max-width: 900px;
    margin-top: 3em;
    margin-bottom: 5em;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    line-height: 1.6;
    font-family: &quot;courier new&quot;, courier, monospace;
    font-size: 12pt;
}

#logo {
    margin: auto;
    width: 70px;
    display: block;
}

nav ul {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
}
nav ul li {
    margin: auto; padding: 2.0rem;
}
nav ul li a::before {
    content: &quot;[&quot;
}
nav ul li a::after {
    content: &quot;]&quot;
}

.banner {width: 25%; display: block; margin: auto; padding: 2.0rem;}
.banners {display: flex;}

h1 {text-align: center;}

h2 {margin-top: 4em; text-align: center;}

h3 {margin-top: 2em;}

table {border-collapse: collapse; width: 100%; margin: 1.5rem 0;}

td, th {border: 1px solid black; text-align: left; padding: 0.5rem;}

th {background: goldenrod; font-weight: bold;}

pre {
    max-width: 100%;
    overflow: auto;
}

code {
    font-size: 90%;
    background-color: whitesmoke;
}


figure {width: 80%; display: block; margin: auto; padding: 2.0rem;}
img { margin: auto; max-width: 70%; }
footer { text-align: right; font-weight: 200; padding-top: 5em; }
footer span { padding: 0 0.5em 0 0.5em; }
</style></head><body><svg id="logo" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><defs><clipPath id="inside"><circle cx="16" cy="16" r="12" /></clipPath></defs><circle cx="16" cy="16" r="14" fill="goldenrod" stroke="black" stroke-width="2" /><path id="symbol" d="M 6,6 A 8,8 0 0,1 6,26 M 16,1 V 31 M 26,6 A 8,8 0 0,0 26,26" fill="none" stroke="black" stroke-width="2" clip-path="url(#inside)" /></svg><nav><a href="index.html">back to index</a></nav><article><h1>Canons of ERIS</h1><p>Canons are logs of CBOR encoded data with an efficient append operation.</p><p>Canons are largely inspired by the <a href="https://ssbc.github.io/scuttlebutt-protocol-guide/#feeds">Secure Scuttlebutt feed protocol</a> and are designed for similar use cases. Unlike Secure Scuttlebutt this specification does not include features for enforcing that logs are append only, but it does not exclude the use of signed back-references to this effect.</p><p>A canon exposes a traversable and appendable sequence of CBOR items to an application. Internally the canon is a sequence of binary encoded CBOR items that are aligned to fit within ERIS block boundaries (1KiB or 32KiB) using zero-length CBOR arrays as padding. This is to minimize the number of ERIS meta-blocks created over the lifetime of the canon and allows for efficient lookup or selective sharing of Canon items. An item within a canon can be referenced by an ERIS URNs combined with an offset index.</p><p>Items that are too large to fit within a single block are replaced by an <a href="https://eris.codeberg.page/spec/#_binary_encoding_of_read_capability">ERIS read-capability</a> to an off-canon encoding.</p><p>The recommended ERIS encoding of a Canon is unique rather than <a href="https://eris.codeberg.page/spec/#_convergence_secret">convergent</a> to mitigate confirmation attacks against Canon data at-rest.</p><p>Some of the invariant properties of canons:</p><ul><li><p>All items within the raw canon are less than the block size minus one. Off-canon items may be of arbitrary length.</p></li><li><p>Each block of the canon is terminated by one or more zero-length arrays. If a single block or the final block of a canon is retrieved from ERIS storage then one or more of the terminating zero-length arrays will be missing. This is because the normalized encoding of a zero-length array is a single byte with a value of 0x80, and ERIS padding is defined as the byte 0x80 followed by zero or more null bytes.</p></li><li><p>Zero-length arrays may be appended to a canon but are discarded during traversal.</p></li><li><p>ERIS read-capabilities in <a href="https://eris.codeberg.page/spec/#_binary_encoding_of_read_capability">CBOR encoding</a> may be appended but are dereferenced during traversal. Appending a capability that does not deference to CBOR data will invalidate a canon.</p></li><li><p>The former two rules do not apply to items nested within CBOR arrays, maps, or tags.</p></li></ul></article><footer><span><a href="https://codeberg.org/eris/eer/" title="Git repository from which this site is generated">Git</a></span><span><a href="https://creativecommons.org/licenses/by-sa/4.0/" title="Content licensed as CC-BY-SA-4.0">CC-BY-SA-4.0</a></span></footer></body></html>