DEV Community

Daniel Ioni
Daniel Ioni

Posted on

MyZubster is moving to IPFS: photos, bounties, rewards and crawler data are now content-addressed"

MyZubster is moving to IPFS

Today I started moving the public data layer of MyZubster away from a purely centralized architecture.

The goal is simple:

important public data should not depend on a single database or a single server.

MyZubster now runs its own IPFS infrastructure and publishes content-addressed snapshots of several parts of the ecosystem.

What is already on IPFS

The current public MyZubster state includes:

  • photos and photo metadata
  • active bounties
  • Clowbot invention bounties
  • public MYZ reward records
  • verified crawler observations
  • discovery records

The current snapshot contains:

  • 1 IPFS-backed photo
  • 27 active bounties
  • 53 approved reward records
  • 49 crawler observations
  • 3 discovery records

A real photo stored by CID

One of the first MyZubster photos migrated to IPFS has this CID:

bafkreifiv6yviupgmpfw5bqzl7tnaplgrzhittz5jskx7oqk6imswiv2gm

Its original SHA-256 is:

a8afb15451e663cb6e86195fe6d03d668e4e89cf3d4c957fba0af2192b22ba33

This gives MyZubster two verification layers:

SHA-256 + IPFS CID

The application still keeps a database index for fast queries, but the actual public content can now be addressed independently through IPFS.

The MyZubster IPFS root

Instead of hardcoding one permanent CID, MyZubster publishes a root manifest.

The current V2 root CID is:

bafkreidpxvuzgi6p5fkuf44zpdzokxw6fhp2nmhyxoz5vpjh2lavgn657u

That root contains references to separate immutable indexes for:

photos

bounties

rewards

crawler

discoveries

Conceptually:

MyZubster IPNS
      |
      v
   ROOT CID
   /  |  \
  /   |   \
Enter fullscreen mode Exit fullscreen mode

photos rewards bounties
crawler
discoveries

Every index has its own CID.

Every time the public state changes, a new immutable root can be produced.

IPNS gives the project a stable identity

Immutable CIDs are useful, but applications also need a way to discover the latest state.

For that, MyZubster now has an IPNS identity:

k51qzi5uqu5dm6zhvvzy5tueqo928scf1xxng23t32691084a9uhm2z2ip0vq6

The IPNS name points to the current MyZubster root.

So the architecture becomes:

stable IPNS name
      |
      v
latest root CID
      |
      v
immutable indexes
      |
      v
immutable content
Enter fullscreen mode Exit fullscreen mode

The root can change while the IPNS identity remai

Top comments (0)