beakerbrowser / beaker

An experimental peer-to-peer Web browser
https://beakerbrowser.com/
MIT License
6.75k stars 547 forks source link

Ethereum Intergration #33

Closed wanderer closed 4 years ago

wanderer commented 7 years ago

It would be nice to have ethereum integration.

Ethereum "Dapps" use web3 which just talk to the JSON RPC.

When talking to certain RPC endpoint the user should be notified with a pop approve or disapprove the communication

And that's pretty much it. After wallets and dapps should be able to run in beaker.

pfrazee commented 7 years ago

Hey @wanderer

Instead of trying to integrate, personally, all the different techs, what I'm suggesting right now is that communities fork Beaker and try out their integration, and then PR. That way, I don't have to spend time interpretting what other tech teams have in mind.

This one sounds relatively simple, and I'm happy to give pointers while you (or whoever) integrates it. The only issue I have is that web3 object. I'm sorry for the inconvenience it'll cause, but I'm not going to add that as a global.

Some security-related practices I should mention:

wanderer commented 7 years ago

Instead of trying to integrate, personally, all the different techs, what I'm suggesting right now is that communities fork Beaker and try out their integration, and then PR. That way, I don't have to spend time interpretting what other tech teams have in mind.

Yep that makes sense. That said we need #1 to first. We have the options of unix sockets or http for the rpc.

pfrazee commented 7 years ago

Is there an equivalent to unix sockets in windows?

I also dislike running HTTP servers on localhost. CORS should stop an unpermissioned website from sending Ajax requests to it, but that's not strong enough. It doesn't protect against any code that escapes a sandbox.

If the Ethereum host is password-authenticated, then we could have the user save the password in Beaker, and tunnel all RPC to the wallet through Beaker's main thread.

5chdn commented 7 years ago

Some notes in case someone is going to take on this:

So maybe a lot of work maybe can be migrated from the mist browser. Swarm protocol, however is in very early stages of development.

wanderer commented 7 years ago

@5chdn yep, mist does two main things 1) injects an instance of web3.js which talks to an RPC endpoint. 2) display messages asking the user if it is ok to sign tx's

once #1 is done we are 80% there

3esmit commented 4 years ago

I was looking into Beaker and found strange that it is ignoring the ethereum movement. I searched for forks with ethereum enabled tech, but wasnt able to. Perhaps BeakerBrowser could support extensions, and then MetaMask could do the integration by extension?

I suggest taking more seriously Ethereum and you will drag a lot of dapp developers and users to your community.

I really like the idea of having multiple decentralized storage systems, such as dat, ipfs, swarm and others, each of them have their own caveats, as a Dapp developer this only gives me more options and I like it.

glowkeeper commented 4 years ago

I was looking into Beaker and found strange that it is ignoring the ethereum movement. I searched for forks with ethereum enabled tech, but wasnt able to. Perhaps BeakerBrowser could support extensions, and then MetaMask could do the integration by extension?

+1 for MetaMask integration!

I have four sites running on dat:

dat://4b1bdf7b0f6beeadab5dadaf019cddbc94f618792ea30b8a2f5d957267d5bd92
dat://bcd1e0c422401c3591fb3a347aaa0d73b7faff797a21b15edabf0ca214157ccb
dat://795f83fa1356cd7d00e5cfe8f1a93f32c55127684c6fc4cb8ff89a32e000016b
dat://31ce36ba92b26fa274537c5a63a6b895bdaddb6621a675ec616dbc17c01e5ee9

....but they are Ethereum blockchain dApps, requiring an Ethereum wallet to work. Currently, I am instructing people to install Firefox with the Dat P2P Protocol and MetaMask extensions, but I'd much rather point them at Beaker!

MetaMask integration, please!

3esmit commented 4 years ago

Aswell we should propose a dat protocol "content type" for https://eips.ethereum.org/EIPS/eip-1577 Therefore we can use .eth domain to render .dat content.

glowkeeper commented 4 years ago

Aswell we should propose a dat protocol "content type" for https://eips.ethereum.org/EIPS/eip-1577 Therefore we can use .eth domain to render .dat content.

That's a great point - I'm not sure on the official way of requesting that, but I've just emailed the guys at ens.domains to ask if EIP 1577 can support the dat protocol.

pfrazee commented 4 years ago

At this point, I'm going to close and say we have no current plans to integrate other tech. We'll keep discussing this over time.

3esmit commented 4 years ago

It makes sense for Beaker Browser integrate with Ethereum, as it would bring Ethereum ecossystem developers to DAT ecossystem. I think it would be wise for Beaker Browser to adopt Ethereum support.

See this https://medium.com/fluence-network/decentralized-web-developer-report-2020-5b41a8d86789web-as-eth-2-0-launch-nears/

image

Some of the leading projects are among the more well-known open-source projects, including IPFS (36%), Ethereum (25%), Dat (14%), and Libp2p (12%).

steenblikrs commented 4 years ago

Your medium reference isn't there.. but I found it here:

https://medium.com/fluence-network/decentralized-web-developer-report-2020-5b41a8d86789

pfrazee commented 4 years ago

Let me just comment on my current thinking about this...

Many of the goals of Ethereum and Beaker are shared: to create a global, open, decentralized computing platform. Our approaches differ in one specific detail: Ethereum uses decentralized consensus for shared state while Beaker splits the datasets among users for ad-hoc merging. It's similar to the difference between "Highly Consistent" and "Eventually Consistent" databases, but in a decentralized setting.

The advantage of Ethereum's decentralized consensus is that it allows datasets to be updated without an "owning service," but it comes at a huge performance and complexity cost. Beaker is capable of smart contracts with owning services and we intend to implement them into the stack in the near future, so the defining difference is really this idea of ownerless datasets.

Don't get me wrong, I love the idea of ownerless datasets, but given the cost of decentralized consensus (Proof-of-Work; we'll see if Proof-of-Stake works) and the risks that it won't end up working (as is the risk for any of our tech) I'm not yet convinced the benefits are strong enough to make it a good bet. In fact, there are so many things we can do in the Beaker stack without it (see the roadmap) that I'm inclined to think that ownerless datasets might always be a niche use-case. Perhaps an important one, but still a niche compared to the majority of tasks.

Given the risk that Ethereum won't play out and the development costs of integrating it, I feel like it's a smarter play for us to continue focusing on making Beaker a really excellent computing platform via the Hypercore Protocol tech. If we do integrate Ethereum, I think it should be because we're sure it fills an important hole in the Beaker platform which couldn't be filled otherwise.