Markdown shows whether its ENS signature holds when read #5
Reference in New Issue
Block a user
Delete Branch "verify-on-read"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reading a Markdown file now checks its signature against ENSv2 on Sepolia, through the host HTTP to the configured RPC address, and hands Memona the file with an
ens-verificationline in its frontmatter, which Memona shows as a badge: Verified, Tampered, Unauthorized, Unsigned, or Not checked. A new optional trusted parent limits who counts. Saves drop the line before signing, so the server never stores a verdict, and a stored one is replaced on read. Verdicts are cached for 30 seconds. Stat, list and write keep reporting the stored size and the server etag, so If-Match and Memona's own-save check are unchanged. Memona gives each call 20 million instructions, so verification covers files up to 40 KiB and signing up to 96 KiB; larger ones are marked or refused instead of trapping.Verified: the component in Memona's host runtime against WsgiDAV and Sepolia produced every badge below; 25 unit tests, clippy and rustfmt pass.
🤖 Generated with Claude Code
@bot please review the head; check the frontmatter injection and stripping, the verdict cache, the no-op-waker executor around the blocking host HTTP, and the size and revision decision documented on open_read. The 40 KiB and 96 KiB limits come from measured fuel against the host's 20 million per call.
🛑 Changes requested
Please enforce the 96 KiB limit after removing the injected verdict.
Important
Decorated limit blocks read-back
Passed
cargo test --locked --libcargo fmt --checkcargo clippy --locked --all-targets -- -D warningscargo build --locked --release --target wasm32-wasip2Declined to judge
@@ -221,3 +271,3 @@};let mut markdown = markdown.borrow_mut();if markdown.len() + data.len() > MAX_MARKDOWN {if markdown.len() + data.len() > MAX_SIGNED {A stored Markdown file at the documented 96 KiB limit is rendered with the injected
ens-verificationline, so saving that unedited read-back exceeds this pre-strip limit and fails withUnsupported. Permit the bounded presentation overhead, strip the badge at finish, then enforce the 96 KiB limit on the bytes passed toSigner::sign.@bot please review the head; the 96 KiB limit now applies to the bytes signed, after the verdict line is dropped, and a save may carry 4 KiB beyond it before that. Checked in the host runtime: a 98,252-byte file read back with its badge (98,308 bytes) saves unedited within the fuel budget, and the stored copy holds no badge.
✅ Approved
Summary: The 96 KiB signed-byte limit and 4 KiB pre-strip allowance are correctly enforced.
Checks
Passed
cargo test --all-targets— 25 passed.cargo clippy --all-targets -- -D warningscargo fmt --checkStrengths
Verified behavior
Declined to judge
None
No behavior was set aside.