Nodes, also known as validators, make blocks. When a validator makes block #1, it takes the blockchain’s state at block 0 and applies all pending changes on top of it, and emits the events that are the result of these changes. Later, the state of the chain at block #1 is used in the same way to build the state of the chain at block #2, and so on. Once two thirds of the validators agree on a specific block being valid, it is finalized.

Archive Nodes

An archive node keeps ALL the past blocks. An archive node makes it convenient to query the past state of the chain at any point in time. Finding out what an account’s balance at a certain block was, or which extrinsics resulted in a certain state change are fast operations when using an archive node. Archive nodes are used by utilities that need past information – like block explorers, council scanners, discussion platforms, and others. They need to be able to look at past on-chain data. However, an archive node takes up a lot of disk space. 12 million blocks in, Geode might take up 600GB or more and it only gets larger over time.

VALIDATOR NODES ARE AUTOMATICALLY ARCHIVE NODES UNLESS YOU SPECIFY OTHERWISE AT STARTUP. 

Full Nodes

full node is pruned: it discards all finalized blocks older than a configurable number except the genesis block. A node that is pruned this way requires much less space than an archive node. If you need to query historical blocks past what you pruned, you need to purge your database and re-sync your node starting in archive mode. Alternatively you can use a backup or snapshot of a trusted source to avoid needing to sync from genesis with the network, and only need the blocks past that snapshot. Full nodes allow you to read the current state of the chain and to submit and validate extrinsics directly on the network without relying on a centralized infrastructure provider. To start your node as a full, pruned node, you will use the –unsafe-pruning and –pruning NUMBER flags in your startup code where NUMBER is the number of blocks you want to keep. Depending on your hard drive, you might keep 256, or 15,000 or even 100,000.

Light Nodes (In Development)

⚠️ NOTE: FOR LIGHT NODES, GEODE REQUIRES SOME DEVELOPMENT TIME. PUT IN A BOUTY PROPOSAL IF YOU WOULD LIKE TO MAKE LIGHT CLIENTS WORK FOR GEODE AS SEEN BELOW. 

Another type of node is a light node. A light node has only the runtime and the one current state (block), but does not store past blocks and so cannot read historical data without requesting it from a node that has it. Light nodes are useful for resource restricted devices like smart phones. An interesting use-case of light nodes is a browser extension, which is a node in its own right, running the runtime in WASM format as well as a full or light node that is completely encapsulated in WASM and can be integrated into webapps: 

https://github.com/paritytech/smoldot#wasm-light-node. Parity’s smoldot light node should be able to connect with Geode, as Geode is written in Substrate. We will be experimenting with making this easier in the future. 

Substrate Connect provides a way to interact with substrate based blockchains like Geode, in the browser without using an RPC server. It is a light node that runs entirely in Javascript. Substrate Connect uses a smoldot WASM light client to securely connect to the blockchain network without relying on specific 3rd parties. Substrate Connect is available as a browser extension on both Chrome and Firefox. We will be experimenting with this as well.