惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
博客园 - 叶小钗
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
美团技术团队
aimingoo的专栏
aimingoo的专栏
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
小众软件
小众软件
T
Tailwind CSS Blog
Martin Fowler
Martin Fowler
B
Blog RSS Feed
月光博客
月光博客
量子位
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
Y
Y Combinator Blog
B
Blog
MyScale Blog
MyScale Blog

ashishb.net

A day in Luxembourg - the richest country in the world I was asked to install malware during a fake interview Book summary: Breakneck - China's quest to engineer the future by Dan Wang Book summary: How to Teach Your Baby to Read Book Summary: The Discontented Little Baby Book by Pamela Douglas Introducing Amazing Sandbox - run third-party tools and AI agents securely on your machine Why software outsourcing gets a bad reputation? Book summary: The Natural Baby Sleep Solution by Polly Moore A day in Antwerp, Belgium Journey of online influencers Two days in Brussels, Belgium Shortcuts - when we love them and when we don't A visit to Rakhigarhi Three days in overhyped Paris Empty Japan, crowded Tokyo The real lock-in in GitHub is not the code, but the stars 11-day Norwegian Breakaway East Caribbean cruise Sanskrit and Sri Lankan Air Force Use REST with Open API The Achilles heel of American capitalism Costa Rica in 4 days At a juice stall in Sri Lanka A short stay at Warsaw, Poland Best practices for using Python & uv inside Docker Two days in Vilnius, Lithuania How IntelliJ IDEs waste disk space Pregnancy Why there aren't many digital nomads from India Two days in Riga, Latvia To keep your machine secure, run third-party tools inside Docker
Stanford CS251: Lecture 5
Ashish Bhatia · 2019-04-01 · via ashishb.net

Lecture 5: Bitcoin mining

How to mine Bitcoin

  1. Download and run Bitcoin-core to run full Bitcoin node
  2. Listen for a new transaction, assemble a pre-block
  3. Solve the puzzle (~270 attempts)
  4. Broadcast the block
  5. Profit

The network runs on port 8333. Non-responding nodes are forgotten after 3 hours (5000-10000 nodes as of Sep 2016). Some seed nodes are hard-coded into the software. Zero transaction fee transactions were accepted until April 2012 before Satoshi Dice came around. Blocks are just an artifact of the mining process. Otherwise, it is just a stream of transactions. Changing the network layer is easy. Changing the protocol layer to add new opcodes is hard.

Types of mining

  1. CPU mining - 220 - 224 hash/sec => 246 seconds (4 million years) to mine a block
  2. GPU mining(2010-2011) - 227 hash/sec with a single card
  3. FPGA mining(2011-2012) - 230 hash/sec. FPGAs are not designed for continuous use though.
  4. ASIC mining (late 2012-present) - 240 hash/sec for 100 USD (100 watt) for 16 nm feature size. 50% overclocking leads to 25% error => 12.5% more revenue!!!

70% of mining is in China due to the lower price. Even with ASIC miner like Ant miner S9 which has 12 TH/sec (243 hash/sec), one has 66% chance of 0 blocks, 27% chance of 1 block, and 7% chance of 2 blocks in a year. Mining pool reduces this variance. The miners will show smaller work (240) regularly to prove that they are working.