mirror of
https://github.com/status-im/EIPs.git
synced 2025-02-21 19:28:08 +00:00
EIP-2848: Added more resources to better understand the proposal (#3739)
This commit is contained in:
parent
e6e99d8ee5
commit
b7d7eaa999
@ -17,9 +17,9 @@ My Own Messages (MOM) is a standard to create your very own public, always updat
|
||||
|
||||
My Own Messages (MOM) use Ethereum as a certification layer for commands and multihash of your messages. It don't use smart contracts but simple self-send transactions with specific payload attached.
|
||||
|
||||
## Motivation
|
||||
To ge more insights, you can test a [live client](http://internetofpeers.org/mom-client/), watch a [full video overview and demo](https://www.youtube.com/watch?v=z1SnoQkQYkU) and read a [brief presentation](../assets/eip-2848/presentation.pdf).
|
||||
|
||||
_Note: contents are all here but I'm trying to improve this section to be clearer_
|
||||
## Motivation
|
||||
|
||||
As a _developer_ or _pool's owner_, I'd like to send messages to my users in a decentralized way. They must be able to easily verify my role in the smart contract context (owner, user, and so on) and they must be able to do it without relying on external, insecure and hackable social media sites (Facebook, Twitter, you name it). Also, I'd like to read messages from my userbase, in the same secure and verifiable manner.
|
||||
|
||||
@ -30,6 +30,7 @@ As an _explorer service_, I want to give my users an effective way to read infor
|
||||
And in _any role_, I want a method that does not allow scams - transactions without values, no smart contract's address to remember or to fake - and it does not allow spam - it's cheap but not free, and even if you can link/refer other accounts, you cannot send them messages directly, and others must explicitly follow and listen to your transactions if they want to read your messages.
|
||||
|
||||
Main advantages:
|
||||
|
||||
- You can send messages to users of your ÐApp or Smart Contract, and they always know it is a voice reliable as the smart contract is.
|
||||
- Create your Ethereum account dedicated to your personal messages, say something only once and it can be seen on every social platform (no more reply of the same post/opinion on dozens of sites like Reddit, Twitter, Facebook, Medium, Disqus, and so on...)
|
||||
- Small fee to be free: pay just few cents of dollar to notarize your messages, and distribute them with IPFS, Swarm or any other storage you prefer. Because the multihash of the content is notarized, you can always check the integrity of the message you download even from centralized storage services.
|
||||
@ -56,6 +57,7 @@ Clients **MAY** let users choose to parse messages considering other content typ
|
||||
It's **RECOMMENDED** that clients inform users about the actual setting of the default content type.
|
||||
|
||||
### MOM transactions
|
||||
|
||||
Clients **MUST** assume that **invalid MOM transactions don't exist**. If a transaction does not strictly follow the MOM standard, clients **MUST** ignore it and they **MUST NOT** consider it a MOM transaction at all.
|
||||
|
||||
Because there can be security implications parsing data sent by users, clients **SHOULD NOT** try to keep track or interpret transactions as _invalid_ MOM transactions.
|
||||
@ -124,9 +126,10 @@ The objective is also to avoid in the first place any kind of scam and malicious
|
||||
### Why not using a smart contract?
|
||||
|
||||
MOM wants to be useful, easy to implement and read, error proof, fast and cheap, but:
|
||||
|
||||
- using a smart contract for messages can leads more easily to errors and misunderstandings:
|
||||
- address of the contract can be wrong
|
||||
- smart contract must be deployed on that specific network to send messages
|
||||
- address of the contract can be wrong
|
||||
- smart contract must be deployed on that specific network to send messages
|
||||
- executing a smart contract costs much more than sending transactions
|
||||
- executing a smart contract just to store static data is the best example of an anti-pattern (expensive and almost useless)
|
||||
|
||||
@ -167,7 +170,8 @@ You can use the latest version of MOM client directly via [GitHub Pages](https:/
|
||||
## Implementation
|
||||
|
||||
You can use an already working MOM JavaScript package on [GitHub Packages](https://github.com/InternetOfPeers/mom-js/packages/323930) or [npmjs](https://www.npmjs.com/package/@internetofpeers/mom-js). The package is already used by the MOM client above, and you can use it in your ÐApps too with:
|
||||
```
|
||||
|
||||
```bash
|
||||
npm install @internetofpeers/mom-js
|
||||
```
|
||||
|
||||
@ -180,6 +184,7 @@ MOM is very simple and it has no real security concerns by itself. The standard
|
||||
The only concerns can come from the payload, but it is more related to the client and not to the standard itself, so here you can find some security suggestions related to clients implementing the standard.
|
||||
|
||||
### Parsing commands
|
||||
|
||||
MOM standard involves parsing payloads generated by potentially malicious clients, so attention must be made to avoid unwanted code execution.
|
||||
|
||||
- Strictly follow only the standard codes
|
||||
@ -187,9 +192,11 @@ MOM standard involves parsing payloads generated by potentially malicious client
|
||||
- Ignore malformed transactions (transactions that don't strictly follow the rules)
|
||||
|
||||
### Messages
|
||||
|
||||
Default content-type of a message following the MOM standard is Markdown text in UTF8 without BOM. It is highly recommended to disallow the reading of any not-text content-type, unless expressly acknowledged by the user.
|
||||
|
||||
Because content multihash is always stored into the chain, clients can download that content from Content Addressable Network (like IPFS or Swarm) or from central servers. In the latter case, a client should always check the integrity of the received messages, or it must warn the user if it cannot do that (feature not implemented or in error).
|
||||
|
||||
## Copyright
|
||||
|
||||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|
||||
|
BIN
assets/eip-2848/presentation.pdf
Normal file
BIN
assets/eip-2848/presentation.pdf
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user