Skip to content

fix: anchor EVM roots by multihash digest#760

Open
eloramirez1356 wants to merge 4 commits intoceramicnetwork:mainfrom
eloramirez1356:fix/evm-anchor-root-digest
Open

fix: anchor EVM roots by multihash digest#760
eloramirez1356 wants to merge 4 commits intoceramicnetwork:mainfrom
eloramirez1356:fix/evm-anchor-root-digest

Conversation

@eloramirez1356
Copy link
Copy Markdown

@eloramirez1356 eloramirez1356 commented Apr 14, 2026

Summary

Fix the EVM anchor root digest handling and expose persisted chain proof metadata through Flight SQL.

This PR now covers two related pieces:

  1. correct anchor proof/root digest behavior for EVM anchoring
  2. make anchor verification metadata queryable through ceramic.v0.chain_proofs

Together, these changes make anchoring both correct and externally verifiable.

Changes

EVM anchor root digest fix

  • fixes root digest handling in the EVM anchoring flow
  • preserves correct anchor proof generation and storage
  • keeps the existing anchoring pipeline behavior intact while correcting the proof/root linkage

Flight SQL chain proof exposure

  • adds a new public Flight SQL table:
    • ceramic.v0.chain_proofs
  • exposes persisted chain proof metadata already stored by the node:
    • chain_id
    • transaction_hash
    • transaction_input
    • block_hash
    • timestamp
  • wires event-svc proof storage into the public query surface
  • adds tests for:
    • table listing
    • querying proof rows

Why

Ceramic already stores and uses chain proof metadata internally when validating anchors, but that metadata was not previously exposed through the public Flight SQL surface.

That made user-facing verification harder, because downstream consumers could confirm that anchoring happened, but could not easily retrieve the corresponding blockchain transaction metadata from the node itself.

With this PR:

  • anchoring remains correct
  • proof metadata becomes queryable
  • downstream APIs can expose user-verifiable anchor information without relying on logs or direct internal database access

Validation

Ran targeted tests for the new proof-exposure path:

  • cargo test -p ceramic-pipeline chain_proof -- --nocapture
  • cargo test -p ceramic-flight chain_proofs -- --nocapture

Also verified repository-wide checks:

  • make check-fmt
  • make build

And confirmed locally that the new table is exposed and queryable:

  • ceramic-one query tables ceramic --db-schema-filter v0
  • ceramic-one query statement-query "SELECT chain_id, transaction_hash, transaction_input, block_hash, timestamp FROM ceramic.v0.chain_proofs ORDER BY timestamp DESC LIMIT 10"

Notes

This PR exposes proof metadata that is already derived from public blockchain anchoring activity. It does not introduce new private application data, but it does make anchor verification materially easier for downstream consumers.

@eloramirez1356 eloramirez1356 requested a review from a team as a code owner April 14, 2026 16:15
@eloramirez1356 eloramirez1356 requested review from stbrody and removed request for a team April 14, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant