Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

And How it goes to wallet ? #4

Open
amaendeepm opened this issue Jan 29, 2021 · 4 comments
Open

And How it goes to wallet ? #4

amaendeepm opened this issue Jan 29, 2021 · 4 comments

Comments

@amaendeepm
Copy link

How this code https://github.com/codebasics/cool_python_apps/blob/main/2_bitcoin_mining/bitcoin_mining.py sends mined qty to wallet ?

@zevaryx
Copy link

zevaryx commented Mar 1, 2021

This isn't a true Bitcoin miner, but more of a proof of concept on how mining works. It only mines a single simulated block

@AdrianViverosL
Copy link

Yeah! as zevaryx mentioned above, this code only has demo purposes to get the idea and concept of mining.

@bener07
Copy link

bener07 commented Jun 7, 2021

And where can I find a TRUE script to mine bitcoins to my wallet, I changed the code, and now is in a loop so is just mining and mining and all of that. so where can I find one that sends the bitcoins to my wallet?

@zevaryx
Copy link

zevaryx commented Jun 8, 2021

For various reasons, that would be a terrible idea.

tl;dr is that you can't directly mine BTC with standard computers anymore, ignoring that this code is just a proof of concept.

Full reasons:

  • Bitcoin mining is astronomically difficult to compute with normal computers, even with GPU acceleration. You typically mine it with something called an ASIC miner, but not with a normal PC
  • Most mining programs are written in much lower languages than Python, like C/C++, and have very well-optimized algorithms that they use, typically taking advantage of SSE and AVX instructions on CPUs, and OpenCL or CUDA processing on GPUs. This type of optimization is not possible with Python (at least, not without writing a good portion of the code in C and importing it)
  • This code doesn't actually mine anything, but merely simulates what mining would be like. Mining requires accessing the blockchain, synchronizing, validation, and mining. This code does none of that, merely simulating something similar to mining.

@zevaryx zevaryx mentioned this issue Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants