Cyphrme / Cyphrme/Cyphr

A push of non-transaction content is verified, then dropped

Open
#180 0 comments 0 reactions 0 assignees View on GitHub
bug correctness
Dominant language
Rust
Stars
3
Forks
0
Avg merge
1d 42m
Merged PRs (30d)
11

Description

Pushing a bundle whose entries are not chain transactions returns `201` with a signed commit receipt, and the receipt describes the state the principal already had. Nothing about the pushed content is retrievable afterwards.

## What happens

The commit identifier, sequence number and all four roots in the receipt are byte-identical to the principal's existing tip. `GET /tip` does not move. `GET /patch` returns the same entries as before. Looking the pushed content up by its own digest returns `404`, while a digest from the same principal's stored commits resolves normally.

The content is not silently discarded: each entry is signature-verified against a key active in the principal, and a non-active signer is rejected. It is verified and then dropped.

## Cause

`submit_commit` classifies a bundle by scanning for a transaction-typed entry (`rs/cyphr-storage/src/engine/mod.rs:850-863`). With none present it takes the action-only branch, which verifies every entry through `verify_and_record_action` and then calls only `blob_store.put` (`:1078-1088`). `ingest_commit` — the sole writer of the manifest and the index — is in the other branch. The receipt's roots are read back from the indexer's unchanged tip.

## Why it matters

A `201` accompanied by a signed receipt is the strongest success signal this API gives. Here it means the blob was stored, not that the content was accepted into anything a reader can find. There is no route that retrieves a blob by hash, so a publisher who pushes an article and keeps the receipt has a signature over a chain position that has nothing to do with their article.

This is the path the project's own description of publishing depends on — signing content so a reader can verify it later. Either the action-only branch should index what it stores, or the response should tell a publisher that nothing durable happened.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in rs/cyphr-storage/src/engine/mod.rs at submit_commit lines 850-863 and 1078-1088, then compare the action-only path with ingest_commit. Reproduce a non-transaction push and inspect the signed receipt, /tip, /patch, and lookup by the pushed digest. Done means the accepted content is discoverable with receipt roots that describe it, or the response clearly reports that it was not durably accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.