DEV Community

Discussion on: dApps / Web3 - Help me finally understand / ELI5!

Collapse
 
grahamthedev profile image
GrahamTheDev

Thanks I will bookmark it for future reading, especially as it is powered by an amazing piece of software 😉!

Do you have any articles in your bookmarks list that might answer some of my dApps questions above though, as the information on stuff like that seems hard to find and there isn't anythink on metapunks yet that covers this as far as I can see from a quick look through the articles?

Collapse
 
ben profile image
Ben Halpern • Edited

Paging @nickytonline @coffeecraftcode @leewynne , I think they could be a good ELI5 crowd, if any of y'all want to take a stab at the top questions.

Thread Thread
 
grahamthedev profile image
GrahamTheDev

Thanks Ben 👍

Thread Thread
 
nickytonline profile image
Nick Taylor • Edited

There's some things I can answer, but I've dropped the blog post in the DAO I'm a part of to have someone more knowledgeable in the space chime in.

I liked the point in energy consumption, though I don't know if it will be that much more (I haven't researched that at all). Another interesting point is that the development process for dApps is quite crap (at least the last time I tried it), they are more complex than regular apps, they're slow and kinda complex to maintain.

As far as I know, everything is going the more energy efficient route opting for proof of stake instead of proof of work

Crypto currencies make sense, NFTs kind of make sense (although the current "NFT points at a URL to prove ownership" model is flimsy at best) but dApps...they make no sense to me!

Pointing to a URL is not the way to do it. You use something like IPFS or store it directly in the block e.g. an SVG in base64 data. I'm not positive if the base64 route is considered best practice though.

I do this in my sample project So Minty

So Minty

A Buildspace project where you learn to mint your own collection.

so-minty.mp4

Contributing

If you are interested in contributing to the project, first read our contributing guidelines. Take a look at our existing issues, or if you come across an issue, create an issue. For feature requests, start a discussion first.

Getting Started (Local Development)

  1. Install the dependencies

    npm install
    # or
    yarn
    Enter fullscreen mode Exit fullscreen mode
  2. Start the project

    npm run dev
    # or
    yarn dev
    Enter fullscreen mode Exit fullscreen mode

Open localhost:3000 with your browser to see the result.

Getting Started (Gitpod)

The project can be run in Gitpod. Navigate to gitpod.io/#https://github.com/nick.... If you wish to load it in Gitpod as an external contributor, you will need to fork the project first, then open the fork in Gitpod, e.g. gitpod.io/#https://github.com/some....

  1. Gitpod will take a minute or two to load.
  2. If this is the first time loading the project in Gitpod…

How do you roll back a major mistake that exposes user data (for example) fast enough to avoid problems? And on the same track, if a node gets compromised in some way, who is responsible for the breach (my understanding is limited so this might be unlikely, I don't know!)

If the transaction succeeds on the blockchain, it's permanent. Think of it like event sourcing where another event would need to correct the previous event if something were to occur, i.e. write to the blockchain again to correct the mistake.

For a Smart contract, they can never be changed, so a lot of thought has to go into writing them. As far as I know, the only way again to fix something like this is create a new contract and then I believe you would need to migrate the data, i.e. write to the blockchain again, i.e. $$$.

In regards to gas prices, they're just super high on ETH right now.

That's what I can best explain and please anyone correct me if I got something wrong.

Thread Thread
 
grahamthedev profile image
GrahamTheDev • Edited

Thanks Nick!

As far as I know, everything is going the more energy efficient route opting for proof of stake instead of proof of work

Yes I am aware of the Proof of Stake part coming soon, but the energy bit (I did not explain it well) was more the "duplication issue" for dApps data storage and the issues surrounding that.

Imagine DEV - at least 15GB of article text - in one maybe 2 databases (I assume). On a dApp (assuming it catches on and scales) would you not have to store data in 100+ places and update it in 100+ places? That is 100+ lots of 15GB transferred at least once, to 100+ server locations that all require cooling and power.

Plus dApps promote the idea of more but smaller data hubs, that cannot be as energy efficient (individually, each one is less efficient that a massive data centre)?

If the transaction succeeds on the blockchain, it's permanent. Think of it like event sourcing where another event would need to correct the previous event if something were to occur, i.e. write to the blockchain again to correct the mistake.

Yeah sorry yet again, I needed to be more clear, Is there not always going to be a "cascade effect" of updates. Work is done, the blockchain is updated, but does that not need to proliferate around the world to hundreds of nodes before it is the same everywhere? Maybe this is a super technical part that requires me to understand more about the detail of blockchain before I can ask a good question on it!

The sort of scenario I thought of was accidentally uploading a local file of user data you were inspecting. You spot the mistake and immediately remove the file with an update, but could it not take time for that update to roll out everywhere making you vulnerable for hours rather than seconds?

In regards to gas prices, they're just super high on ETH right now.

Ah got it, plus I suppose with the Proof of stake the costs may drop into commerically viable realms so probably not an issue soon 👍

Thread Thread
 
nombrekeff profile image
Keff

Pointing to a URL is not the way to do it. You use something like IPFS or store it directly in the block e.g. an SVG in base64 data. I'm not positive if the base64 route is considered best practice though.

Now that you mention that, we initially did it by storing data as compressed base64, and that's the reason why 1kb data was not enough for us (as mentioned in the other comment I posted). We also used IPFS at some point but it had it's drawbacks as well, but I can't recall exactly what the problems where.

Thread Thread
 
nickytonline profile image
Nick Taylor

In regards to the storage of an NFT, @dabit3 Just dropped a really helpful thread on Twitter.

Thread Thread
 
grahamthedev profile image
GrahamTheDev

Thanks Nick, useful thread and much appreciated!

FYI I just learned that you can't click Twitter cards on mobile (iOS), thought I would let you know!

Thread Thread
 
nickytonline profile image
Nick Taylor

Glad you enjoyed the thread! For the iOS issue, mind opening an issue on GitHub? https://github.com/forem/forem/issues/new?assignees=&labels=&template=bug_report.md

Thread Thread
 
grahamthedev profile image
GrahamTheDev • Edited