Any computer connected to a cryptocurrency network can be said to be a node. For example, a Bitcoin node is a computer connected to the Bitcoin Network. Nodes that fully validate every block and transaction given to them are known as full nodes. These nodes check the transactions against the consensus rules. The following are some of Bitcoin’s consensus rules:
- No double-spending on any transaction output.
- Transactions and blocks must be in the correct format.
- Blocks may only release a certain number of bitcoins as a block reward.
Consensus rules cannot be broken. Any block or transaction that does not follow the consensus rules are rejected by the full node and won’t be included in the Blockchain. Networks are supported by the Full nodes accepting blocks and transactions from other full nodes. These are then validated and relayed back to other full nodes to be validated by them. Since nodes are trustless, they will reject ANY block or transaction that doesn’t follow the consensus rules no matter if every other node on the network says they are valid.
Running a full node means you must have a copy of every transaction and block that has ever taken place on the blockchain. So, to run a full node, a person must download that entire file to his/her computer. Since there is not one single point of failure in the network, the blockchain cannot be controlled by one single entity, nor easily compromised. Therefore, increasing the number of nodes in the system would result in a more decentralized and trustless network.
Full Nodes are also known as “Lightweight Nodes,” and sometimes called “Lightweight Clients.” SPV (Simplified Payment Verification) methods allow Lightweight nodes to verify transactions without downloading the entire blockchain. Full nodes assist lightweight nodes by allowing them to connect and transmit their transactions to the network and will notify them when a transaction affects them. The only information a lightweight node needs to download to their computer is the headings of all blocks on the blockchain, which dramatically reduces storage requirements and is far less than that of a full node.
Lightweight nodes would not be able to connect to the cryptocurrency network, which could lead them to use centralized services instead, so this relationship is a needed service. Important to mention, SPV nodes put all their trust in full nodes to ensure that blocks and transactions are validated right and follow consensus rules.
What are the advantages of running a full node in comparison with a lightweight node/client?
This scenario is from bitcoinstackexchange.com and has to do with the security of the SPV nodes. Something to think about!
“A lightweight client cannot even check for itself that a confirmed transaction is valid. It has to trust that miners will not spend time confirming invalid transactions.“
“If you have an SPV client and I am an evil miner with a substantial amount of mining power, I can make a transaction with a nonexistent input (essentially creating coins out of thin air), and include it in a block I mine. This block won’t be accepted by any full node, because they will have a complete transaction register and will know that the input is nonexistent, but your SPV client would accept it. If I then mine some more blocks on top of my bogus block, your SPV client will think that transaction has several confirmations. This will work particularly well if I can mess with your network connection so that you can’t connect to any full nodes except for evil nodes controlled by me.“
“Of course, this attack is relatively costly for me, since I have to spend mining power that could otherwise generate legitimate coins, but maybe it is worth it if I can buy something valuable from you and pay with fake coins. So if you are in the business of selling high-value goods, you might very well consider it worthwhile to have a full node.“