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

Add Incubed as network provider option #132

Open
wants to merge 18 commits into
base: master
from
Open

Conversation

@chirag-parmar
Copy link

chirag-parmar commented Mar 17, 2020

Hi Brave Team,

Slock.it just released the first stable version of its blockchain client, IN3. Incubed, unlike Infura connects to the Ethereum Blockchain via an INcentivized Node Network which incentivises and distributes the trust on remote nodes while still keeping the bandwidth and storage requirements low. According to our understanding Brave's CryptoWallet uses Infura as a network provider. While, Infura has its advantages it demands a high amount of trust. We at Slock.it want to change this by providing IN3 as an option into Brave's CryptoWallet through this pull request.

To know how it works, try it, or even run a node, check our documentation.

Functionality

  • Users of CryptoWallet would just have turn the Use In3 switch on under the Advanced tab of Settings (Settings -> Advanced -> Use In3).
  • CryptoWallet will automatically change the provider to the network the user is currently using.
  • In case the network is local, custom or one not supported by incubed, the user will still be connected to it until a supported network is selected on the menu.

UX/UI-IN3

Changes

  • New dependency for IN3's rpc middleware. eth-json-rpc-in3
  • New module Incubed network adapter
  • Added 'enable Incubed network' toggle button under Settings -> Advanced
  • Added a provider display in the network menu
  • Hid unavailable networks on the network menu when incubed is enabled.
  • Added tests for ui and modules.

Questions

  1. This repository's CONTRIBUTING.md files says that all PR's must be submitted against the develop branch. Since you do not have a develop branch we have created a the PR against the master branch. Did we get that right?
  2. The repository's CHANGELOG says Current Develop Branch. Shouldn't that be Current Master Branch? Let us know so that we can append the important changes to the CHANGELOG
  3. Are there any suggestions from your side?
chirag-parmar added 18 commits Jan 30, 2020
@cerealkill
Copy link

cerealkill commented Mar 20, 2020

Incubed is a game changer! It is basically Casper for RPC, with portable code that runs on microcontrollers and a backend that can be attached to any running client. This is proper BUIDLR mindset, remove centralisation from every corner.

@ryanml
Copy link
Member

ryanml commented Apr 7, 2020

Hi @chirag-parmar - thanks for submitting this and all of the hard work you've put in to it. It's certainly a neat idea, but a couple of things:

ethereum-remote-client exists as an up-to-date fork (thought not necessarily a git fork) of MetaMask/metamask-extension as such, you noticed we don't modify any core files, such as in the app/ or ui/ directory. Rather, we contain everything within in brave/ and having a patching system which ensures MetaMask base files are neatly overridden. This is to avoid painful upstream rebases.

I would like to suggest that you take this code, and open it up as a feature request in MetaMask/metamask-extension - then if it is merged in, Brave Crypto Wallets will be able to pull it in the next upstream rebase. This is our work flow for contributing large customizations to ethereum-remote-client, I patch upstream semi-frequently. Let me know if you have any questions. Thanks! :)

@ryanml
Copy link
Member

ryanml commented Apr 7, 2020

Also, per the above, CONTRIBUTING.MD refers to MetaMask’s contributor guidelines.

@chirag-parmar
Copy link
Author

chirag-parmar commented May 4, 2020

Hi @ryanml, apologies for the late reply. Metamask had declined our pull request before we submitted this one. Metamask's team fails to understand the value proposition of the IN3 client. I do not know of any other client that solves the trust problems of a remote client and bandwidth problems of a light client at the same time.

At slock.it we are trying to push the community to use better alternatives to remote clients. This is because we understand the risks that come with it, especially for a wallet application. Is there absolutely no other way we can integrate the IN3 client into brave? Maybe some script wizardry. This is just one of the ideas. If we can collaborate on this I am sure we can come up with a clever solution.

That being said if you still insist that a pull request in metamask-extension is the only way we can integrate this into brave then I'll go ahead and close this pull request.

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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.