paritytech / paritytech/dotns

[Feat]: Expose when a node contenthash last changed

Open
#193 7 comments 0 reactions 1 assignee View on GitHub

@charlesHetterich is already working on this.

Since Sep 9, 2026.

P1 scope: resolver smartcontracts triage type: feature
Dominant language
Solidity
Stars
4
Forks
2
Avg merge
1d 18h
Merged PRs (30d)
24

Description

Context

Browse ranks published apps and wants a freshness signal: how recently an app content was updated. The natural source is the dotNS content resolver, since a redeploy updates the label contenthash.

Current behavior

  • contenthash(bytes32 node) returns only the current blob, with no timestamp and no history.
  • DotnsContentResolver emits ContentHashUpdated(bytes32 indexed node, bytes hash) on every write (contracts/resolvers/IDotnsContentResolver.sol), but the event carries no timestamp either.
  • So the only way to answer "when did this node's contenthash last change" is to scan ContentHashUpdated logs for the node, take the latest, and read that block's timestamp: an event/log scan plus a block-to-timestamp lookup.

Ask

Make the last-updated time cheaply readable from a view. Store an updatedAt (uint64 block timestamp) per node and expose a view such as contentHashUpdatedAt(bytes32 node) returns (uint64). One extra SSTORE per write, O(1) read, no log infrastructure needed. Could also be returned alongside the hash.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.