Browse Web3 Content Without Centralized Tech

Hans
7 min readApr 28, 2020

--

Most decentralized blockchains required centralized and trusted technology to use in the real world (see my overview of the centralized trust problem of decentralized blockchains). Not so with the Diode Network.

This article is a how-to guide outlining the steps you need to take to browse distributed Web3 content without requiring any centralized trusted technology.

Environment:

MacOS Mojave 10.14.2

NOTE: This is just the environment being used for this write-up — Linux, MacOS, and Windows are all supported and work about the same.

Pre-requisites:

A. Install Firefox (NOTE: any browser with a Web3 wallet will work — Brave, Chrome, etc…, but later guides will use Firefox)

B. Install the Firefox MetaMask plug-in and sign up for a MetaMask account

Steps (1–6):

  1. Download and install the Diode Chain client
  • For MacOS, use the “MacOS Package” to auto-install
  • Click “OK” on the warning that it is from an unidentified developer
  • Go to your System Preferences under Security & Privacy and click “Open Anyway” by the warning that says “diode_darwin.pkg was blocked from opening because it is not from an identified developer”
  • Click “Open” on the warning that pops up
  • Click “Continue” and then “Install” on the installer app, and enter your system password in the authorization box that pops up
  • Click “Close” when the installer is done — your Diode Chain client is setup!

2. Verify the Diode Chain client is installed and working

  • Open a Terminal window and type “diode” at the prompt. You should get a list of diode commands.

3. Setup your fleet contract on the Diode Network

  • Open Firefox and go to https://diode.io/testnet
  • Click on the “Fleets” menu item, and you’ll see a button that says “To manage your Fleets, enable MetaMask on this site.” Click “Enable MetaMask”
  • Click the MetaMask icon in the upper right corner of Firefox and then click the circle in the upper right corner of MetaMask and click “Create Account” — this is a new software wallet you’ll be using to interact with the Diode Network
  • Add the Diode Network to your list of Test Networks by clicking the circle in the upper right corner of MetaMask and clicking “Settings”
  • Scroll down and click on “Networks”
  • And click on “Add Network”
  • When you click “Save”, you should return to your wallet, now with the “Diode” network selected in the upper right network selector
  • When you return to your Firefox window, you’ll now see that the content of https://diode.io/testnet/#/fleets recognizes that you are authenticated on the Diode Network, although no fleet contracts are yet created
  • Click “Create New Fleet” and then “Confirm” when MetaMask pops up to ask you to confirm the transaction
  • After waiting for a while for the blockchain to approve the transaction, MetaMask will popup a notification letting you know the transaction was mined and approved
  • Copy the Ethereum address of your fleet contract for use in the next step (0x105bde3c0899c95e694c866c7140a6ac2bc5c608 in this example)

4. Add your Diode Chain client to your fleet contract

  • Back in your terminal window, type:

diode config -set fleet=<your fleet address>

  • You need to add your client’s address to your fleet as an authorized client. To do this, in your terminal window type diode socksd to run the Diode Chain client (it will fail because this step is not yet complete) and copy the Client address text (in this case it is 0x70114a27f3d1b549012498c69a4120ca4ea11e21).
  • Go back to your Firefox browser and paste the client address into the box to the left of “Add Device” and click “Add Device”
  • The device will be added to a list of devices that are candidates to be added to your Fleet Contract. In order to actually add it, click “Whitelist” next to the Client address
  • MetaMask will pop up, asking you to confirm the addition — click “Confirm”
  • After waiting for a few seconds for the transaction to be mined, MetaMask will notify you that the transaction has been confirmed
  • Your Fleet Contract view will now show the Client address as whitelisted

5. Run your Diode Chain client on the Diode Network!

  • At this point, your computer can directly interact with the public Diode Network without any other centralized or trust-required infrastructure! To test this out, run the socksd proxy by typing diode socksd . You should see output similar to the following:
  • If you leave the proxy running, from time to time, the client will validate the blockchain state and print information to the terminal starting with Added block(s) ...

6. Setup Firefox to browse Web3 content

  • In Firefox, click the hamburger menu item in the upper right and go to “Preferences”
  • Scroll all the way to the bottom and click “Network Settings”
  • Enter any of the names into your Firefox address bar as <name>.diode (for example, “pi-taipei.diode”). The content will be served directly to your Firefox browser from the content provider via the Diode Network!
  • If you view your terminal window, you’ll also see activity on your client as it tunnels the proxy requests through the Diode Network

That’s it!

Now that you have MetaMask setup, a fleet contract created, your Diode Chain client added to the fleet contract, and your Firefox proxy configured, you can visit Web3 content providers, and browse for more content as it becomes available. Also, the hard work to get setup to become a content publisher has also been done! I’ll be creating a guide that demonstrates how to publish content to Web3 in the coming days.

--

--