Miners, Validators, different Node types

8 replies 107 views
HumbleApeFull Member
Posts: 40 · Reputation: 330
#1Aug 8, 2019, 04:10 AM
Hey folks. I've recently started digging into how the Bitcoin blockchain works and I've got some questions that I can't quite figure out on my own. I could use your input. So, I get that miners and validators play different parts in the process. I also know that if you want to mine solo or set up your own pool, you need to run a Full node. Regular miners in a pool, though, don’t need to do that they just use standard mining rigs. But I’ve got a few questions about this: 1. Is every Full node a Validator? 2. What about Pruned nodes? Can they be Validators too? If not, what’s their purpose? 3. Are all miners in a pool essentially Pruned nodes? 4. If a pool owner or a solo miner is running a Full node, what’s the reason? Is it just to keep up with the latest blockchain data, mempool, etc., and help the miners in the pool save some hard drive space? Or is it that being a solo miner or pool operator inherently means you also take on a Validator role? 5. Just to clarify, can a solo miner or pool operator run a Full node but turn off the Validator feature and focus only on mining? Or is that not a thing? 6. Is it possible that the miners in a pool think they’re only mining (earning tokens through rewards and block ordering), but in reality, they’re also part of the Validation process just because their pool operator is linked to a Full node?
6 Reply Quote Share
im_apeHero Member
Posts: 629 · Reputation: 3824
#2Aug 8, 2019, 12:29 PM
The term "full" in a Full Node refers to the verification process. If the client is "fully" verifying everything, then it can be categorized as a Full Node. Since they download and verify everything, they too are Full Nodes. Being pruned only means they discard what they downloaded and verified already to save disk space. They provide the user (who runs the pruned node) with the same level of privacy and security as a non-pruned node. They also can relay mempool transactions and newest blocks as well as all block headers. They just don't have historical blocks to give to other peers. Miner is not a node, not any types of it. A miner is just a hardware that computes hashes! Miner has to connect to a full node. You'd solo mine to get the entire block's reward when you find it. So you have to run your own node to be able to prepare a new block to mine and sync with the rest of the network. But since the difficulty is so high so that the chances of finding a block solo is so low, you'd "pool" your hashrate with others so you can share in the reward for whatever work you do regardless of whether you find the correct hash or not. As an icing on the cake, when you connect to a mining pool, you no longer have to run your own node. So it becomes easier (saving disk space, etc). But the main reason to use a pool is what I said in previous paragraph. That would no longer be a Full Node. Node that doesn't "validate" is a paradox. I like to categorize different "client types" like this: https://bitcointalk.org/index.php?topic=5229765.0
2 Reply Quote Share
hash_bossLegendary
Posts: 1166 · Reputation: 5261
#3Aug 8, 2019, 12:39 PM
FYI solo mining pool also exist, where you don't need to run your own full node. For example, https://solo.ckpool.org/ and https://web.public-pool.io/. If miner/pool don't verify any transaction or block they receive, they may risk creating block with invalid TX or creating block on top of invalid block.
4 Reply Quote Share
HumbleApeFull Member
Posts: 40 · Reputation: 330
#4Aug 8, 2019, 03:09 PM
Thanks for the answer! But this means that miners are also passively doing the some work as validators (when their mining pool program connects to the full node), is it right? ___ I have read some information that validators verify all transactions before putting them into the memory pool (from which miners receive transactions to mine into blocks, etc.), and after mining they verify the results (for example, they verify emission transactions, which are added by miners, because otherwise miners might try to create an emission transaction of 100 BTC into their wallets, etc.).  ___  So, does this mean that miners actually perform the necessary their own checks between validator checks? Because of the popular belief that miners do NOT do the work of validators.
0 Reply Quote Share
HumbleApeFull Member
Posts: 40 · Reputation: 330
#5Aug 8, 2019, 04:11 PM
Or these mining checks isn't ever necessary for Bitcoin Blockchain working, but still useful for Miners, because it just helpls to avoid their own mistakes and get more guaranteed earnings, etc.? And could Miners DON'T do this "self-validation"?
1 Reply Quote Share
RogueDegenFull Member
Posts: 74 · Reputation: 309
#6Aug 8, 2019, 09:21 PM
RESPONSE TO pooya87 I don't think this is correct.  ALL NODES verify everything. Otherwise, they are not nodes at all (since all other nodes on the network will refuse to connect to anything pretending to be a node and sharing INVALID information). As I understand it, the term "Full" in "Full Node" refers to the amount of blockchain history they store and make available to other nodes.  If a node is capable of sharing the ENTIRE history of the blockchain, then it is a "Full" node.  If it is only capable of sharing a portion of that history, then it is a "Pruned Node" Again I don't think this is true.  Prior to the creation of Pruned Nodes, we just had "Nodes". There was no "Full" designation because either a process performed the functions of being a node, or it didn't.  Then when Pruned Nodes were created, the term "Full Node" was used to specify that the node was NOT pruned. Am I recalling this incorrectly? Can you give an example of a Node that is neither a Full node nor a Pruned node? That part seems correct to me. Correct Well, as I understand it, the miner needs to connect to a pool, or to some other process that handles building blocks.  That block building process will need to be connected to one or more nodes, but the hashing process doesn't generally connect directly to the node itself. This seems to be a confusing answer.  The question was "Why does a pool or solo miner run a node". You seem to have tried to answer some completely different questions: (Why do people mine Bitcoin, and why do they use pools?) Correct. You might call it a "relay, but it wouldn't even be able to be that since it would relay bad blocks and bad transactions which would get it disconnected from the network. You seem to have taken 2 different processes (wallets and nodes) and tried to call them all nodes, while giving each a different descriptor (Full, SPV, Server-Dependant, etc) as a way to distinguish which are actually nodes and which are just wallets?  Why not just use the two terms (node, and wallet) the way they've always been used? RESPONSE TO haveagoodday You haven't defined any of the terms you are using, and as you can see from my response to pooya87 some of these words (Miner, Validator, Node) mean different things to different people.  Without a very specific definition, there's likely to be some confusion in communication.  However, I'll answer as best I can using the meanings that I typically assign to these words. Yes. The functions of a Node (Pruned, Full, or otherwise) are to receive, validate, and share information about the transactions and the blockchain. Therefore, per MY definition, ALL "nodes" are always validators.  If they are not validating, then they risk the possibility of receiving and sharing INVALID information. If they share invalid information, then the other nodes that ARE validating, and that are connected to them, will disconnect and blacklist them to avoid receiving invalid information in the future.  Eventually, the node that is not validating ceases to be a node at all since NO other nodes will connect to them and/or share anything with them. No. If you are "mining" in a pool, you typically aren't running a node at all of any kind as part of that mining process. You could still run a node separately from your mining effort if you wanted to, nothing is stopping you from doing that, but it isn't something that is in any way associated with your mining efforts. Here's where definitions become important for understanding and communication. The mining process really consists of a few significant functions that can all be done together by a single person, or can be separated so that each part of the process can be done by a different person. 1. Collecting transactions and blocks from the Bitcoin network. 2. Verifying that the received transactions and blocks are valid 3. Building new blocks to be hashed 4. Hashing the headers of the built blocks 5. Determining if the resulting hash is within the difficulty requirements 6. Broadcasting transactions and blocks (including the newly solved blocks) to the Bitcoin network Processes that handle all of parts 1, 2, and 6 together are typically called "nodes"Processes that handle all of parts 1, 2, 3, 5, and 6 together are typically called mining pools, although within their own internal process some pools may separate the "node" pieces (1, 2, & 6) from the block creation processes (3 & 5)I, personally, prefer to use the terms "hasher" or "mining pool participant" for processes that handle part 4, but some people use the term "miner". As you can see, the pool participants (hashers) aren't performing ANY of the responsibilities of a "node" at all. Since ALL of these pieces are needed to mine successfully, a "Solo Miner" needs to handle them all themselves. Some of the important parts of the process of mining are making sure that you are always bbuilding on top of the most recent valid block, and building new blocks of transactions that can be hashed. Running a node is how you receive and validate the most recent blocks, as well as the transactions that you will choose from for your block. It is also how you share your solved blocks with the network. As I explained, that is part of the reason. Sort of. Each node builds and maintains their own mempool from the transactions and blocks that they have received. They don't typically share "their mempool". They just share the transactions and blocks and let the other nodes build their own mempools. No.  The mining pool does not typically share the mempool, blocks, or transactions with the "miners in the pool" (hashers).  Instead, the pool generates new unhashed blocks from the data they get from their nodes, and then pass only the block headers they've build to the "miners in the pool" so that they can hash them. The "miners in the pool" then pass back hashes that are below a threshold assigned by the pool and the pool determins if the resulting hash meets the difficulty requirements. It feels like you're asking the same question over and over. But, to answer it again, yes, one of the functions of mining that is typically handled by the pool operator is validating the transactions and blocks. What would they be mining? To mine, you need to know what the current blockchain looks like, and you need to be certain that the copy of the blockchain you are using is exactly correct. If there is ANYTHING wrong with your blockchain, then ALL of the blocks you try to create will be invalid and will be rejected by the entire network. Since the definition of a node is a process that handles receiving, validating, and sharing/broadcasting blocks and transactions, any process that doesn't do the validating is no longer a node. I suppose you could call it a "relay" instead of a "node" since it apparently would still be receiving and sharing/broadcasting. However, you run a VERY EXPENSIVE risk of spending all your money to operate your mining operation and only ever creating invalid blocks (and therefore NEVER receiving any revenue at all).  Can you do that? Sure, nobody is going to stop you.  Should you do that? Only if you want to lose all of your money. I suppose you could create a separate process to handle the validation, but then you are just running a node that has been split into two pieces. What's the benefit? The miners in the pool are not doing ANY of that.  All they are doing is blindly hashing the headers they are given and returning to the pool hashes that meet the pool's requirements.  They are trusting that the pool is handling all of the other pieces for them.  If the pool fails to handle some of those pieces properly, the pool will not get any Bitcoin and therefore will be unable to pay the participants. A node is any process that handles the 3 functions I described above. How the node goes about that is up to the node creator. A "full node" is one that can supply any part of the ENTIRE history of the blockchain to
4 Reply Quote Share
im_apeHero Member
Posts: 629 · Reputation: 3824
#7Aug 8, 2019, 10:32 PM
Well, in every source I've seen defining these things there is no mention of what is stored, only what is verified. Pruning which is not storing the history (and not being capable of sharing it) is just a mode for Full Nodes. I remember the definition being the same even before pruned mode was introduced we had "Full" versus "Light" nodes (node being defined as a communication endpoint). For example the wiki history on Full Node has this definition from 2014: Which is probably a better explanation of what Satoshi said in the whitepaper about SPV when he said "It is possible to verify payments without running a full network node." Which is probably where the term "Full Node" comes from as well. Because technically in networking, a node is any digital device that can open a communication channel and connect to the network to send/receive data. That means an Electrum wallet is also a node. A simple tx push application (like what Ken Shirriff did in his blog in the Sending my transaction into the peer-to-peer network section, or this project here) that can only connect to Full Nodes and broadcast a tx is also a node. https://en.wikipedia.org/wiki/Node_(networking)
4 Reply Quote Share
hash_bossLegendary
Posts: 1166 · Reputation: 5261
#8Aug 9, 2019, 02:42 AM
Unless you count hashing block header as act of validation, the answer is no. After all, 1. miner only modify various nonce in order to generate various unique block header, then hashing it. 2. mining pool doesn't send list of TX to miner, but rather merkle branch. P.S. My answer assuming mining pool use Stratum mining protocol version 1 where it's specification can be seen on https://web.archive.org/web/20150307191254/http://mining.bitcoin.cz/stratum-mining.
3 Reply Quote Share
ape_2018Senior Member
Posts: 412 · Reputation: 1728
#9Aug 9, 2019, 03:21 AM
Bitcoin network, nodes and node types. What is a Bitcoin node, for beginners. Bitcoin node, in technical explanation. A Bitcoin node is a computer is running Bitcoin program, as explained in learn me a Bitcoin website. This explains clearly that if you run a Bitcoin wallet as a node, not SPV wallet, you have a Bitcoin node, that can be full node or pruned node, depends on your settings to store all data of Bitcoin blockchain your computer or part of a blockchain only.
5 Reply Quote Share

Related topics