WTF is Ganache?

in blockchain •  6 months ago

#WTFis presents...

WTF is Ganache?

🍩 Ganache (aka TestRPC) is a Node.js based Ethereum client for testing and development.

WTF is an Ethereum client?

So we know that we have a client (e.g. a web browser) and a server (code running on a computer, either our own computer or someone else's, that is "serving" information to the client when the client makes a request).

A client is simply an application. We install and run them on our computer. The client has an interface that may be a command line interface (e.g. the npm CLI in your command shell--Terminal for MacOS) or a graphical user interface (e.g. web browser GUI). is a good example of an application that has both.

There are many Ethereum clients--these are some that I pulled from

go-ethereumproductionGoEthereum Foundation
cpp-ethereumproductionC++Ethereum Foundation

AToP shows Parity as the most used by the nodes in the Ethereum network.
Screen Shot 2018-06-14 at 9.21.19 AM.png

🍩 So an Ethereum client is an application that allows us to download the Ethereum blockchain and participate in the Ethereum network as a node.
However, Ganache is for testing/development (not live production), so it is just a simulation of a real client, and it doesn't actually affect the real Ethereum blockchain.

WTF are nodes?

🍩 Nodes (in this case) are just computers running Ethereum clients.
We can think of nodes as people because people will run the client on their computer (but one person can have multiple clients running from multiple computers too).

Uhh.. ok

We interact with the client using one of the following libraries:

LibraryLanguageProject Page
NethereumC# .NET

web3.js is probably one of the more popular libraries because JavaScript is a widely used language.

WTF is web3.js?

🍩 web3.js is a JavaScript library for an application programming interface (API) that gives us access to RPC methods using the JSON-RPC protocol. With web3.js we can write a JS application that communicates with a node in the Ethereum network, including our own node.


🍩 JSON-RPC is a RPC protocol that uses JSON.


🍩 RPC (remote procedure call) is when we execute a procedure (aka subroutine aka callable unit aka function) that is on a remote computer with a different address space.

WTF is an address space?

🍩 An address space is an isolated environment for a computer to run procedures and store data. You can think of each computer as having its own, personal, isolated address space.

Mmkay mmkay

So we use Ganache to run an Ethereum node, and we use web3.js to communicate with that node and other nodes in the network, and using RPC we can have that node call functions that execute some code on the blockchain.

🍩🍩🍩🍩🍩🍩🍩 Don't take my word for it! Jump down the rabbit hole!


Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!