Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP19 Social Registry #154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samuel-videau
Copy link
Contributor

@AntonioPMCS and myself are finally proposing the LIP we used in our Hackathon project LOOKSO.
It will probably need edits, but we decided to PR it, in order to progress on the subject.

Happy New Year! 🎉

"hash": "Bytes32" // The hash of the post object
}
], // The identifier (hash) of all the posts this account has liked,
"dislikes": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Facebook consciously decided against dislikes. It would be good to look into that reasoning before adding this here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also did not use it in our Lookso project, as we don't find it relevant. However, we thought it might be important proposing a really complete and flexible standard, in order for people to be able to build any kind of social app they want on top of that. For instance, it might be relevant for people doing a Youtube or Reddit like DApp

@frozeman
Copy link
Member

frozeman commented Jan 2, 2023

Amazing. Thanks for that. I’ll comment on the structure once I had the time to have a proper look at it.

@frozeman
Copy link
Member

I think messages should contain a signature, even with the issue, that the signing key might not be present anymore at the UP in some point in the future, but there are use cases where signing a message is the only way (maybe no validator was used, for example)

@samuel-videau
Copy link
Contributor Author

I think messages should contain a signature, even with the issue, that the signing key might not be present anymore at the UP in some point in the future, but there are use cases where signing a message is the only way (maybe no validator was used, for example)

Yes indeed, we took it out of our flow as we think it's not useful in our case. But it would be indeed good adding it to the standard. I'll commit it

@samuel-videau
Copy link
Contributor Author

samuel-videau commented Apr 13, 2023

@frozeman the LSP19ProfilePostSignature has been added back, as well as a couple of small improvements

Copy link
Member

@CJ42 CJ42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuel-videau very great proposals! I remember it from the Hackathon indeed!

I have added some review comments :)


## Abstract

This standard defines a set of data formats and a key-value pair to create a Social Media Feed, combining [ERC725Account](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md) and an open distributed storage network such as [IPFS](https://ipfs.tech/) or [ARWEAVE](https://arweave.org).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe?

Suggested change
This standard defines a set of data formats and a key-value pair to create a Social Media Feed, combining [ERC725Account](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md) and an open distributed storage network such as [IPFS](https://ipfs.tech/) or [ARWEAVE](https://arweave.org).
This standard defines a set of data formats and a key-value pair to create a decentralised Social Media Feed, combining [LSP0-ERC725Account](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md) and an open distributed storage network such as [IPFS](https://ipfs.tech/) or [ARWEAVE](https://arweave.org).

## Abstract

This standard defines a set of data formats and a key-value pair to create a Social Media Feed, combining [ERC725Account](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md) and an open distributed storage network such as [IPFS](https://ipfs.tech/) or [ARWEAVE](https://arweave.org).
It also defines a smart contract used to guaranty authenticity and timestamp of a post.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It also defines a smart contract used to guaranty authenticity and timestamp of a post.
It also defines a smart contract that can be used to guaranty authenticity and timestamp of a post.

This standard defines a set of data formats and a key-value pair to create a Social Media Feed, combining [ERC725Account](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md) and an open distributed storage network such as [IPFS](https://ipfs.tech/) or [ARWEAVE](https://arweave.org).
It also defines a smart contract used to guaranty authenticity and timestamp of a post.

## Motivation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super the motivation section 👌 Very on point!


### LSP19SocialRegistry

A Universal Profile's Social Media State will live under a record referenced by the "LSP19SocialRegistry" data key of their ERC725Y store.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can keep it generic here? As Universal Profile could be one of the type of contracts that use it, but we don't know yet which other type of contracts could use it.

Suggested change
A Universal Profile's Social Media State will live under a record referenced by the "LSP19SocialRegistry" data key of their ERC725Y store.
A Social Media State (for instance the one of a Universal Profile) will live under a record referenced by the "LSP19SocialRegistry" data key of their ERC725Y store.

}
```

This registry should be updated everytime a new post is added by the user.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's ensure the standard verbs are in uppercase.

Suggested change
This registry should be updated everytime a new post is added by the user.
This registry SHOULD be updated everytime a new post is added by the user.

A Profile Post can be an original message, a comment on another post or a repost. The JSON file should have the following format:

Not all fields are required. For example, a `repost` doesn't need a message, but it should have the `url` and `hash` to the original post.
The `LSP19ProfilePostSignature` property is optional and depends on the use case. It is used to authenticate a post through a controller EOA (Externally Owned Account)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it has to be an EOA? Can't it be another 🆙 ? 😉

Suggested change
The `LSP19ProfilePostSignature` property is optional and depends on the use case. It is used to authenticate a post through a controller EOA (Externally Owned Account)
The `LSP19ProfilePostSignature` property is OPTIONAL and depends on the use case. It is used to authenticate a post through a controller EOA (Externally Owned Account)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm what do you mean ?

"LSP19ProfilePost": {
"version": "0.0.1", // The Metadata version of this post
"author": "Address", // The Universal Profile who authored the post
"locale": "string", // language code - Country Code (de_DE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to be consistent. Above, strings are mentioned as String (uppercase S).

image

}
],
"assets": [
"interface": "string" // Contract interface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe here you could provide the option to be either:

  • a contract interface name (e.g: ILSPN...)
  • or a bytes4 interface identifier (e.g: 0x3e89ad98 for LSP0 interface).
Suggested change
"interface": "string" // Contract interface
"interface": "string | bytes4" // Contract interface

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it might maybe be good having both

```js
{
"LSP19ProfilePost": {
"version": "0.0.1", // The Metadata version of this post
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to add a sentence in the standard to describe this field.

* @notice A validator tailored for Universal Profiles and content publishing
* @dev Writes to the Universal Profile key/value store
*/
contract LSP19PostValidator is Context {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a standard interface for the contract (some standard functions), or it could be implemented in any way.

I am asking as the title says:

image

And from my understanding, I thought it would also include an interface (set of functions).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm ideally, there would be only one of this contract deployed, that everybody would use, it actually doesn t really make sense having multiple instances of this contract deployed, apart making the verification process a bit harder.

@frozeman
Copy link
Member

We will revisit that later. This will be relevant for droops and universalprofile.cloud.
Its a good start for a conversation.

@samuel-videau
Copy link
Contributor Author

We will revisit that later. This will be relevant for droops and universalprofile.cloud. Its a good start for a conversation.

Sounds good! We also need to dive back in, can be a good topic discussion in Istanbul :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants