almonit / almonit-plugin

ENS+IPFS Firefox plugin by Almonit
http://almonit.club
MIT License
19 stars 7 forks source link

Options for retrieving ENS data from Ethereum blockchain #6

Open eyalron33 opened 5 years ago

eyalron33 commented 5 years ago

Here we list options for retrieving data from the Ethereum blockchain.

All options are a compromise, since it's practically impossible for users to run full Ethereum nodes, and since Ethereum has no "light Ethereum nodes" (equivalent to Bitcoin's SPV).

1. Infura. Infura is centralized service, operated by Consensys, to access the Ethereum blockchain. There is no usage limitation in theory. We can easily create "Almonit-Plugin" project in Infura, and let the release version of the plugin use it by default.

It seems, without checking deeply, that a big part of the industry uses Infura, so it became a centralized point of failure. Infura also keeps record of usage of its services, which is bad for privacy.

That said, Infura is probably the best solution considering our (non-existing) resources. I believe we'll release the plugin using it, with instruction for power users how to use geth (see next option).

2. Geth light sync mode. Geth got a light sync mode that retrieve information from full nodes in the network. It's unclear what are the privacy implications of that.

The problem is that if lunch as is, geth doesn't find appropriate peers, and instead returns an error no suitable peers available when queried for ENS records.

There's a fix for that.

a. Start geth with (all rpc calls are allowed here for simplicity)

geth --syncmode light --verbosity 2 --maxpeers 0 console --rpc --rpccorsdomain "*"

b. Add manually peers from this list

3. Parity light sync mode. You can start Parity with light sync mode that allows RPC calls:

./parity --light --jsonrpc-cors all  

The problem is that this sometimes returns the correct ENS data, but other times doesn't. We need to check if it can be fixed in the same way as geth, i.e., manually adding peers.