Title: A couple of noob questions about bitcoin core and miners Post by: darkv0rt3x on July 30, 2020, 10:04:18 PM Hello.
I have a few questions I have been wondering around. I tried to search about them on DDG but any of the results answered them. 1 - Does ASIC machines get some sort of copy of Bitcoin Core to generate blocks, verify them, et, cetc? 2 - If 1 is a "No", why bitcoin core software has commands to generate blocks, templates, etc, etc? Is that for testing purposes only? 3 - If 1 is a "Yes", can I generate a block just for the fun of playing with it and learn about bitcoin core commands some more? Can I try to create a raw transcation put it in that block and try to add that block to the network, even knowing that obviously it will be rejected and probably I'm even thinking baout it the wrong way???? 4 - IF I can't do that on mainnet, can it be done in testnet or regtest for learning purposes? Thanks Title: Re: A couple of noob questions about bitcoin core and miners Post by: ranochigo on July 30, 2020, 10:47:52 PM 1 - Does ASIC machines get some sort of copy of Bitcoin Core to generate blocks, verify them, et, cetc? The normal Bitcoin Core allows the user to solomine using their ASIC through getblocktemplate. It's not widely used by ASICs and mining pools as most of them utilise SPV mining, ASICBoost etc which means their backend is heavily customised and modified. 3 - If 1 is a "Yes", can I generate a block just for the fun of playing with it and learn about bitcoin core commands some more? Can I try to create a raw transcation put it in that block and try to add that block to the network, even knowing that obviously it will be rejected and probably I'm even thinking baout it the wrong way???? You can manually generate your own block (probably won't meet the target) and submit it. But the initial filtering by your client likely would see that your block doesn't meet the requirements and reject it in the first place. 4 - IF I can't do that on mainnet, can it be done in testnet or regtest for learning purposes? Testnet has significantly lower difficulty so you can probably get away with a 1TH machine.Title: Re: A couple of noob questions about bitcoin core and miners Post by: HCP on July 31, 2020, 04:53:38 AM ...or regtest for learning purposes? While not necessarily the original intention of the regtest (regression testing) system... it's certainly useful for learning without worrying about losing any coins etc ;)There is nothing stopping you setting up a regtest environment and then creating/signing/broadcasting transactions and then generating blocks etc. Title: Re: A couple of noob questions about bitcoin core and miners Post by: Heisenberg_Hunter on July 31, 2020, 07:15:10 AM 4 - IF I can't do that on mainnet, can it be done in testnet or regtest for learning purposes? As ranochigo said, you can try that out in mainnet but it doesn't pass through the requirements and would get rejected in the first place. You can probably go with regtest instead of testnet as you would be having the freedom of generating your own blocks in a matter of few minutes and you would be the sole controller of what gets mined and what gets added to the blocks. You don't need to depend on the difficulty/peers which is common in the testnet and mainnet. On top of that, at times testnet miners use ASICs to mine testnet coins thereby increasing the difficulty and hence at regular intervals difficulty get reversed back. If you need to learn about the exact generation of coins and adding transactions to the block and mining them as how it gets done in the mainnet, you should try out testnet where you will be having the role of either the normal user of bitcoin or the miner. But if you need to sound like satoshi and early miners ;D (doing whatever with blocks, mining in a few seconds and never relying on third party peers) you should definitely go with regression testing. If you are not sure how to run the regtest mode, go to Settings -> Options -> Open Configuration File. Enter regtest=1 close and reopen core software and you will get the regtest mode. Go to console and enter generate 101 and you will mine 101 blocks to spend the first 50BTC I am also having a quite closer look on the proposed new test network signet #18267 (https://github.com/bitcoin/bitcoin/pull/18267) in which we will have a more practical approach towards testnet where we will be mining at more regular intervals. More on signet : Signet (https://en.bitcoin.it/wiki/Signet) and How to get started (https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a) Title: Re: A couple of noob questions about bitcoin core and miners Post by: darkv0rt3x on August 03, 2020, 08:25:33 PM Ok, thanks peeps.
I'll keep asking questions here whenever they come up! |