So, bitcoin mining relies on the SHA-256 algorithm.
Is it possible to just guess a random number, run it through SHA-256, and then plug the result into some bitcoin site (I have no clue what the URL is or anything about it, but I bet there's something out there)? If the number matches, would I get a reward?
Or is there a way to just tackle math problems on paper to mine bitcoin?
Well... Yes, *theoretically* it *should* be possible to do this...
HOWEVER....
You'll need to take the header of the most recent valid block, manually create a new header (https://en.bitcoin.it/wiki/Block_hashing_algorithm), then you'll manually have to pick a nonce within this header and calculate the header's sha256d hash on paper... The odds of picking a nonce that leads to a sha256d hash under the current target is astronomically small. But let's say you find one: to finish it off, you'll have to find a way to broadcast your block to the other nodes (nope, afaik, there is no "website" where you can submit blocks, you'll have to find a way to broadcast it to other nodes manually).
To top this all off, you'll have to do this BEFORE the rest of the network finds a new block and broadcasts it... As soon as they do, the rest of the network will be using the new block's header to build their blocks on, and your block will be stale. So, you'll have to finish all these steps in an average time of 10 minutes... Maybe you're lucky and the rest of the network needs 15 minutes this time, but it might also be 2 or 3 minutes...
Now, i don't know how fast you are, but here's an article you could read: http://www.righto.com/2014/09/mining-bitcoin-with-pencil-and-paper.html
This guy hashes 0.67 hashes/day, so if he managed to pick the right nonce, there'd be no way he was on time for broadcasting his block...
Well, you'll probably have to run at least some kind of daemon... You'll need to connect to other node(s) and then send them your block. More info can be found here: https://en.bitcoin.it/wiki/Network
If you'd run the reference client node, you could use the submitblock json-rpc call... it seems chainquery does not support this call: https://chainquery.com/bitcoin-cli/submitblock
I don't know any online tool or service that offers this feature. If you read all protocols, you'll probably be able to build a much lighter client, one that only connects to other nodes and relays your block, but i don't think this is something you can do using binary's available on your OS, nor do i think there are sites out there that'll help you with this either.
Now, just to be 100% sure, this is all for learning purposes, right? Cause, there's no way you can actually pull all of this off IRL... You have allmost no chance of solving a block using a latest gen ASIC, let alone an older ASIC, let alone a FPGA, let alone a GPU, let alone a CPU... So your odds of solving a block, even if you'd find a good nonce by pure miracle, are 0 (since there's no way on earth you'll be fast enough generating a block, a block header, a sha256d hash and broadcast it in the ~10 min window)
I'm paining to make a custom miner from scratch
(have experience with micro controlers and fpgas)
BTW thank you for your info
if anyone reading has atempted to do so, have you succeeded?
Then read the to post that is pinned to this section Mainly point-3. FPGA's are useless for mining BTC. Even today's 100THs ASIC-based miners have a very very small chance of ever finding a block in the lifetime of any single machine.
As for folks making ASIC-based miners that use existing chips, just check the Hardware section. There are 2 folks doing it there.
Um, just look in the Hardware section of the forum...
https://bitcointalk.org/index.php?topic=1764803.0 is Sidehacks original small USB sticks
https://bitcointalk.org/index.php?topic=5053833.0 is his newer USB sticks and his Terminus pod miner
Those are all in production and available through several resellers including several on Amazon and eBay
https://bitcointalk.org/index.php?topic=5355470.0 is his latest one now in final testing
Also there is https://bitcointalk.org/index.php?topic=5340015.0 which is jstefanop's Apollo combined BTC Node & miner
You mean "assembling" a custom miner I suppose.
Mining isn't solving math problems, people who use that term to explain how mining works either have no clue or are just trying to come out with the simplest explanation for the average joe to digest which is fine for those who don't care much about how mining actually works, but the reality is mining is all about guessing a random number, the faster you can make and submit your guess the higher chances of winning a block.
So if you want to mine using a piece of paper and then type that hash on your PC and broadcast it to the network, nobody will stop you, a hash is a hash and it will always have a chance of hitting a block, but then I am afraid by that by the time you put the pen down and start typing it on your keyboard, someone else will hit a block and then the hash of the previous block changes which will make your paper hash completely useless with 0% chances to hit a block.
I got more confused by "guessing a random number"
anyway tink about a website that you could go on there and guess a random number, and if the number is correct you will get 100k? (no gamble the random number will be used to mine bitcoin)
thats another idea BTW
not asmbling but desining one
No offence, but you should really start by reading (and understanding) the whitepaper before you start thinking about building a custom miner or a website where your users enter a nonce... Really, you're more than welcome to ask us info, but if you don't start by really understanding how the blockchain works, and how POW fits in the picture, you'll probably never 100% understand how this stuff works... And, well, building a custom miner or a site like you're brainstorming about without 100% understanding what you're actually doing won't result in much...
You need more than just a nonce, you need a unique coinbase transactions also.
A single guess currently has a 1 in 66812913771043723254169.6 chance ...