verify-layer: verify-consistency names the signer of each head (or unsigned); identity: Travel Rule requires a replay store
- verify-consistency without --signer now says whether each head is signed and by which key, and that no expected signer was checked (verify-inclusion already did; the README said the output does) - openMessage opens nothing without a replay store (seen: an object with has/add that keeps the ids for at least maxAgeS); before, the same signed and sealed message could be opened any number of times when no store was given Tests: verify-layer tree 20/20, negative control 14/14; sidecar 44/44, 9/9; travel rule 19/19, negative control 19/19.
This commit is contained in:
1 parent
082b862d78
commit
8f5f0bd00d
9 files changed
+57
-14
No files matched your search
@@ -402,7 +402,11 @@ async function main() {
|
||||
return r.ok ? 0 : 1;
|
||||
}
|
||||
const r = A.verificaConsistenta(citeste(get('--proof'), '--proof'), { vechi: citeste(get('--old'), '--old'), nou: citeste(get('--new'), '--new'), semnatar });
|
||||
console.log(r.ok ? 'the new head EXTENDS the old one (the history up to the old head was not rewritten)' : `NOT consistent: ${r.motiv}`);
|
||||
// B-25 (2026-09-30): ca la verify-inclusion, iesirea spune cine a semnat capetele si daca s-a cerut semnatarul
|
||||
const cine = (k) => (k ? `signed by key ${k.slice(0, 18)}` : 'unsigned');
|
||||
const semn = !r.ok ? '' : semnatar ? `; both heads signed by the expected signer (${r.semnatNou.slice(0, 18)})`
|
||||
: `; old head ${cine(r.semnatVechi)}, new head ${cine(r.semnatNou)}${r.semnatVechi && r.semnatNou && r.semnatVechi !== r.semnatNou ? ' (DIFFERENT keys)' : ''}; no expected signer was checked (--signer): this proves only that the second head you hold extends the first one you hold`;
|
||||
console.log(r.ok ? `the new head EXTENDS the old one (the history up to the old head was not rewritten)${semn}` : `NOT consistent: ${r.motiv}`);
|
||||
return r.ok ? 0 : 1;
|
||||
} catch (e) { console.log(`${cmd}: ${String(e.message).replace(/[0-9a-fA-F]{32,}/g, '<hex>').slice(0, 200)}`); return 2; }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user