Posts

RE Taskmaster: Using Hive's Built-in Messaging System...

avatar of @edicted
25
@edicted
·
·
0 views
·
10 min read

@taskmaster4450 probably cringes when I tag him in my titles.

Usually when I tag people: I'm writing some contrarian dickish retort to something that I read or some opinion I have. Written here in my notes: one of these days I'm going to write about how writing open letters is basically a punk bitch thing to do where the writer is just publicly complaining to an audience about a specific person, and 99% of the time it is not necessary to frame analysis in this way. In any case, after I wrote that linked post above I did not apologize, but it was still very cringe in retrospect, and I 100% upvoted like 10 Taskmaster posts in a row as penance (it's all right there on-chain). Because that's what you do on Hive right? Give yourself a free pass by throwing money around. Indeed, I see no problems here.

Wow look at the top comment of that post...

Hey @oldtimer, remember Koinos?

Yeah that comment is dated November 2020, and guess what?
Koinos is still just a token on Ethereum that does nothing.
In fact when I was talking to @yabapmatt recently... He asked the lead dev Andrarchy for the most basic demo possible, to figure out how the network operates and all that.
Still crickets. Nothing. Not even the most basic-bitch program.
Isn't crypto grand?
A chip and a chair; a hope and a dream!
How would you like to buy our coin? It's called Koin. Very innovative.

So why bring up Koinos?

Because the hot topic of every crypto network is scaling up a decentralized system. A decentralized system is inefficient by design (hundreds of nodes all storing the same info) so scaling up a system like that is perhaps the hardest thing to do and also the most valuable in terms of adoption and being able to actually service users without inconvenience while still maintaining security and censorship resistance.

Trying to get to the point...

So @taskmaster poses this question about building a messaging dapp on Hive. It's a great question. In fact, I'm floored there isn't a modular solution that anyone can just plop into their web page.

We already see these messages popping up all the time in the transaction history. Why then wouldn't we build a dapp around it so that anyone can just say anything they want in a chatroom or where-ever, directly on chain?

First thing's first

  • There is no reason to pay 0.001 Hive for messages.
    (0.001 HBD when Hive > $1).
  • The only costs of posting data to chain are resource credits.

The technical difficultly of creating such a thing is extremely low... which again is why I'm shocked it hasn't been done yet. It would also be a great use for the memo key (password encrypted messaging). You know, the memo key? That thing that we legit never use because no one has programmed a use for it yet?

I think the real reason this functionality doesn't exist is that devs on Hive understand that it's not nearly as scalable as the marketing implies. Max blocksize is 65kb. That's 22KB/sec shared for everyone on the entire network. If people are chatting on chain in addition to everything else, how long before the blocks full up to the maximum?

No, increasing blocksize is not really an option.

10,000 users chatting at an average speed of six characters per second (60 words a minute) would fill up the entire chain, leaving pretty much no bandwidth left to write blog posts or even transfer money around or upvote or whatever else (play Spinterlands).

Why do we see this message?

We need to think about why we even see these 0.001 HBD messages in our wallet history to begin with. We see them because a centralized frontend (like peakd or hive.blog or leofinance) shows it to us. That is the only reason why we see the information that we see: because we trust a singular centralized node to play nice and show us the information we want to see.

Sometimes it will show us 0.001 HBD spam that we didn't want to see. Nothing's perfect. But honestly the frontends of Hive should be getting massive upgrades like all the time, but they just aren't because we lack the devs and the funding and the innovation to make these upgrades viable.

On a very real level the only reason anyone is even paying for these 0.001 message is because the centralized frontends of Hive opt to display the information to the user in this way. If the frontends changed to display information in other ways, users would change their patterns of behavior to reflect those changes. This is a very legitimate example of how the choices of individual centralized nodes actually affect the on-chain data and how users pivot to interact with it.

So it's very valid to see these 0.001 HBD messages and wonder why we don't build a microcharge chatroom or direct messages or whatever else, but at the same time the only reason we aren't thinking about this in terms of free custom JSON operations is simply because the current frontend implementations just don't show us that information (yet). They could easily show us that information just as easily as they show us 0.001 spam messages.

No, it doesn't need to be on-chain

In my recent meetup with Yabapmatt he explained how custom-jsons from splinterlands were taken off chain in a very elegant manner. Rather than building a new system, a modular solution was created, where the old data that was being stored on chain was simply ported to the centralized Splinterlands servers without being forwarded to the chain. Thus the information exists in the exact same form as it did on chain, and if Splinterlands wanted to start forwarding that information back to the chain, they could easily do it. They don't need permission. This is a powerful distinction vs WEB2 and also highly relevant to the topic at hand.

We can do the same thing with messaging. Any dev can build a chatroom on Hive, and if people actually start using it and bloat the chain... that dev can simply port the code to their own centralized server where it will no longer bloat the chain because hundreds of nodes are no longer tracking the information in an extremely redundant manner. Problem solved

But that's centralized!

But yet many of the people who cry about centralization have no idea what they are talking about. Decentralization is grossly inefficient and wholly unnecessary (and even foolish) unless there is an attack vector that involving a trust issue that crypto happens to solve. In regards to a chatroom, what's the worst thing that could happen? Someone doesn't get a message because the centralized server censored them, got hacked, or just outright failed? That's... probably not a big deal. As far as threat risks go, that's an extremely low priority threat, and the advantage of centralization is going to trump the decentralized option 999 times out of 1000.

But wait! There's more!

Okay so what happens if you set up a chatroom on Hive using custom JSON. The chain bloats and it gets ported to a centralized server. Has any privacy or power or security been lost by centralizing this service? If the dapp is programmed correctly nothing at all is lost at all. That's the magic of layer two.

https://www.youtube.com/watch?v=S1c75vaqMJo&ab_channel=TheOffice

Copy that!

So imagine we're using this Hive messaging service for very important private messages. Memo key encryption has been employed and the only way to read the messages is by having access to the private memo keys. Which solution is better? Storing the info on-chain or storing them on a specialized second-layer node?

Many people in crypto would wrongfully assume that storing the messages on chain is the way to go because then it's "decentralized". If you store the info on a centralized chain it could get "censored" or there's a lack of "transparency" or a lack of "privacy". None of these things are true. In fact, posting the data on-chain is actually the real liability. You absolutely would not want to post data on-chain in this case.

Remember that the data is encrypted and basically unhackable without access to the private memo key. If we store the data on-chain, it will exist there... forever. That's bad. If these messages are really important and we don't want others to read them... having the data exist forever on-chain is a really stupid fucking idea... right? That's exactly the opposite of what you want. You want the intended party to get the message, and then you want the data to disappear (or for the only copy to be stored by the intended recipient). A centralized server can do that. Hive was literally designed for the opposite (permanent storage).

But what if the centralized server censors the message?

Well, that's the beauty of it right? The centralized server can't read the encrypted messages we're sending through it because they don't have access to the memo keys. They have no idea what the message is. If the accounts on Hive that are talking to each other are anonymous then they don't even have any idea who's talking to who.

If the node can't even read any of the message, how are they going to know what to censor or what information to share with overreaching governments? That's simply an impossibility.

copy that

If the messages are very important, each time one side sends the other side a message, the other side will automatically send back confirmation that they received the message. It is in this way that the clients remain in complete control and not the server. In WEB2 the server/client relationship is master/slave, but in WEB3 the client is not a slave to the server and has way way way more power.

Even in the event that an off-chain node censors two parties from communicating to one another, both parties will know immediately because they aren't getting that built-in confirmation message (that would simply be a background option and not even necessarily viewable by the user... IE "message sent" "message read" like we see on smart phone text messaging).

In the event that one node stops playing nice, then we simply pay the RCs to put them on-chain... or even better yet just find another node that offers the exact same service (because again all the code is open source and modular). Or even better yet create a peer-to-peer solution that eliminates the need for a node entirely.

Justin Sun had some good ideas.

And of course I say this with the same sarcasm of "Hitler had some good ideas." Before Justin Sun proved himself to be a dumbass douchebag who was only interested in aggrandizing himself, I was VERY EXCITED about the work he was doing. The fact that Tron bought Bittorrent for $140M in 2018 was absolutely massive. Seriously, in some alternate dimension @justinsuntron is like some revolutionary hero out there cracking skulls and making everyone in crypto rich... but instead we got this version. Too bad. Truly. It could have really been something.

It's very obvious that crypto is not interfacing with other open source code like it should be. We should have crypto-Linux by now. We should have crypto-Github and crypto-Bittorrent... but sadly we just don't. Nobody knows what they're fucking doing and this is taking forever and it sucks ass! Everyone is too greedy and no one wants to build the infrastructure, they just want to race ahead and get rich without doing the work. Very sad.

It's so obvious that we should be employing p2p tech like Bittorrent to transfer information around and reduce the burden on centralized nodes, but alas the tech simply does not exist. I thought for sure @justinsuntron was going to build it, but it's been four goddamn years and again, CRICKETS! WTF!?!

On a very real level a lot of this feels like the whole crabs in a bucket theory. No one wants to be the one that builds something that makes everyone a little bit more wealthy. Everyone wants to capture as much value as they can for themselves rather than provide x1000 value to the cryptoverse as a whole. These toxic tribes have popped up and everyone is dragging everyone else down. We gotta get out of this damn bucket, fam, but how? Stop dragging me down, ass! GAH! This is why we can't have nice things!

So why has no one created a cool chatroom for the Hive ecosystem that is modular and plug & play for any dapp that wants a chatroom? Again, the answer is three prong:

  • We don't have enough devs and that's not an exciting project.
  • It's not profitable for the dev who builds it.
    • The Dev Fund is pretty elitist and probably wouldn't fund it.
  • If it actually gains adoption like we want it would melt the chain.
    • It would then have to be ported to a modular layer-two.

Hive as a testnet

But honestly though... we should just make it because... WE CAN! That's the beauty of permissionless architecture. Anyone can build anything, and if we break stuff along the way then it's a good learning experience and helps the network patch those bugs and continue to scale up. If a Hive chatroom dapp skyrockets the price of custom json 100x... so be it. Let it happen. We'll learn something.

This honestly is a project that I wanted to build myself and I've talked about it a couple times. Every time it gets brought back up I'm continually floored that it just... doesn't exist. Pretty crazy honestly. Again it all comes down to needing to train more devs and pay them 'fairly'. Fairly in this case is probably not much considering the resources at our disposal, but that's fine for now. But this topic spins off into a completely other topic of resource distribution that is worthy of its own post so... I'll leave that for another day.

Conclusion

Kudos to @taskmaster4450 for bringing up this important topic. Hive absolutely should be using all of it's bandwidth all the time. 22 kilobytes per second is nothing. This is not a difficult task. We need to be pushing the limits and failing to scale gracefully over time (to quote Andreas Antonopoulos). A messaging dapp and a couple more games ought to do the trick. Honestly I think this will be a much more viable strategy once we can finally delegate resource credits to other accounts rather than having to delegate actual Hive Power to them to accomplish the same goal. All in good time.

Posted Using LeoFinance Beta