From eb88b300a7c60168b7c81aa6ab272fe16c5eda5d Mon Sep 17 00:00:00 2001 From: Aere Network Date: Wed, 28 Oct 2026 00:07:40 +0200 Subject: [PATCH] Dated correction (2026-10-27): notarizare/verifica-certificat.mjs names the certificate slot as element 5 of extraData, counting from 0 as aere-node SPEC.md 2.3 does; its messages and comment said element 6. --- notarizare/verifica-certificat.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/notarizare/verifica-certificat.mjs b/notarizare/verifica-certificat.mjs index deb1931..a9acc0a 100644 --- a/notarizare/verifica-certificat.mjs +++ b/notarizare/verifica-certificat.mjs @@ -111,7 +111,8 @@ const areTextASCII = (u8, s) => { // (measured 2026-09-11 on chain 2800, at the admission of the tenth validator), so "32 bytes, no 'besu'" alone called every one of // its blocks an anchor. The anchor digest is a keccak256 output; zero is refused here as it is in every gate of the house. const esteZero = (u8) => Array.from(u8).every((b) => b === 0); -// Minimal RLP reader (lists and strings), enough to name the FORM of the certificate in element 6 of extraData. +// Minimal RLP reader (lists and strings), enough to name the FORM of the certificate in element 5 of extraData +// (counting from 0, as aere-node SPEC.md 2.3; corrected 2026-10-27: this said element 6). function citesteRLP(u8, pos) { const p = u8[pos]; if (p < 0x80) return { list: false, bytes: u8.slice(pos, pos + 1), next: pos + 1 }; @@ -134,8 +135,8 @@ export function formaCertificatului(extra) { if (!top.list) return { forma: 'unreadable', text: 'extraData is not an RLP list' }; if (top.items.length < 6) return { forma: 'none', text: 'no certificate element (extraData has ' + top.items.length + ' elements)' }; const el = top.items[5]; - if (!el.list) return { forma: 'unknown', text: 'element 6 is not a list' }; - if (el.items.length === 0) return { forma: 'none', text: 'element 6 is the empty list (no certificate)' }; + if (!el.list) return { forma: 'unknown', text: 'element 5 of extraData (counting from 0, the certificate slot) is not a list' }; + if (el.items.length === 0) return { forma: 'none', text: 'element 5 of extraData (counting from 0, the certificate slot) is the empty list (no certificate)' }; const first = el.items[0]; if (first.list) return { forma: 'v1', text: 'certificate v1, ' + el.items.length + ' Falcon-512 rows (no scheme tags, no round)' }; const scalar = (it) => (it.list ? null : Array.from(it.bytes).reduce((a, b) => a * 256 + b, 0));