OS | ustas.eth@ustas·Apr 01

📚 Fun fact about posts on #Lens!
They can be hosted on either centralized or decentralized resources.

Decentralized ones cannot be deleted. A better name for the "Delete" button (@lenster.lens) in this case would be "Hide" because, technically, it is more accurate. Such a post can still be viewed even after deletion.

On the other side, centralized ones can be deleted if you or anyone else can access the centralized host. Or better, if a post owner can delete it, he can also change the content. So, when you see a post, you can only be sure that the content will stay the same once you know whether it is centralized or not (better not to believe in bet predictions on Lens, right?).

And since comments are technically still posts (but with a reference), we can edit them as well and make some dirty game. In general, there will be no edit tracks unless the comment's content has been uploaded to some sort of archive.

That was my first thought, but then I dug a little deeper. The trick won't work with the default Lens indexer that everyone uses nowadays because it indexes posts only once after transaction confirmation on #Polygon. So, basically, it copies your post to the indexer's DB, and later, when you use Lenster or some other client, you don't get the data from the actual post's content URL but from this DB.

I wondered why it works like that because this means the indexer's DB won't represent the actual state of the blockchain in some cases. I've written in the Lens Discord, and the answers were as follows:

discord.com/channels/918178320682733648/1080136391989669989/1080230235854864446
@cesare.lens: "To be clear the blockchain data is not changed, on-chain each post|comment has a content URI that cannot be changed. The contentURI has to point to a public location. From an immutability perspective a "purist" would argue to use an immutable data storage (e.g. IPFS) still the Lens Protocol does not stop you to use a URL you control. The indexer is driven primarily by on-chain events to determine what and when to fetch contentURI. Updating the file won't cause a chain event so simply updating the file won't work."
@wagmi.lens: "We will add a refresh endpoint soon it's on the radar"

Previous posts:

  1. Beginning - lenster.xyz/posts/0x8218-0x6c
  2. Lens on the zkEVM testnet - lenster.xyz/posts/0x8218-0x96

#learning #notes #dev

💰 Mirror, like, and follow to get 0.123 WMATIC; limited to the first 100 users.
Thanks to @wav3s.lens

Post by @ustas.lens