3

I am renting a linux server and would like to have access to an ethereum node on the server for a dapp. It seems impractical to host an entire node on the server as it would take up so much space. Is it possible to communicate with the blockchain without running a node? I haven't been able to find much support for light nodes.

How can I read from and write to the blockchain without having a full node?

Joe
  • 1,173
  • 1
  • 11
  • 31

3 Answers3

4

I think what you're looking is that a web3 provider, which you can use it to connect your DAPP.

Exactly, that everyone can't run their own node, there is infura.io

Sign-up on their platform, they shall provide you the end-points for connecting on Ethereum testnet, mainnet & IPFS on your mail-id.

You can use them as if you are having your own server.

Just make sure that you're not overwhelming with the requests.

Hope this helps.

Thanks.

Vixon
  • 557
  • 4
  • 8
3

As @Vixon mentions Infura is a possibility, but it has some limitations on calls that can use a lot of resources like fetching past event logs.

One option short of running the experimental light mode is to run your own node, but sync up with Geth using the --fast flag, which only stores block headers and the current state tree rather than the complete contents of all the blocks. Subsequent blocks get added to the database and stored on disk, but you can delete them every couple of months and resync.

This seems to be workable with under 20 GB of (SSD) storage, and 2 GB of memory, which is still in the realm of affordable linux VPSes, although Geth seems to fall over occasionally, so you need a systemd script or something restarting it when it dies.

Edmund Edgar
  • 16,897
  • 1
  • 29
  • 58
2

geth has an experimental --light flag, which would turn it into a light node. As far as I am aware, it's still experimental.

Write access using a public node should work as long as it either has some way of relaying a transaction, or if you can somehow use sendRawTransaction (and sign with your keys, yourself).

Matthew Schmidt
  • 7,290
  • 1
  • 24
  • 35