37

The Mining Algorithm is as follows: Step 0 - Retrieve the hash of the previous block from the network. Step 1 - Gather a list of potential transactions known as a "block". This list of transactions comes from the peer-to-peer bitcoin network. Step 2 - Calculate a hash for a block of potential transactions along with a random number. Step 3 - If the hash is ...


22

The explanations on the web are all very vague and mystical, on purpose maybe. Here is my take in simple words, just reading the megacoin source code from the above comment. The goal is to have a more adaptive way of adjusting the difficulty instead of just averaging the last 2016 blocks like bitcoin. This is needed because of multipools which might switch ...


20

The simplest miner would work like this: Request a new Getwork from a given pool/bitcoind with specified credentials For nonce=0;nonce<0xFFFFFFFF;nonce++ Set Getwork Data nonce SHA-256 hash the Getwork Data (block header) Check if hash result is smaller than Getwork Target, if so, submit a share If more than 1 second passed since you received Getwork, ...


18

Solving SHA256 hash problems on Bitcoin is useful in the sense that secures the Bitcoin blockchain, but if your question is: "why can't it do something computationally useful as a side-effect?", then I think the answer is "we don't know how". For Bitcoin to work, the proof-of-work that miners do must have the following properties: Easy to verify solutions ...


12

The target section of the block header is called nBits in the code. nBits is a 32-bit compact encoding of a 256-bit target threshold. It works like scientific notation, except that it uses base-256 instead of base-10. For example, if nBits is equal to 0x181b8330, you would calculate it like this: Or, more simply, you'd use the same shorthand you use with ...


11

Invertible Bloom lookup tables can be used in many different ways, but the first paper you linked to explicitly proposes to use them to find differences between two data sets stored on different hosts without transferring the entire data set from one of the hosts to the other. In context of Bitcoin, suppose that two nodes have just established a connection. ...


10

Your question is equivalent to asking, "Does SHA256d have a trapdoor?" SHA256d is a well studied algorithm. It's believed not to have a trapdoor. If the creator of bitcoin has a way to break SHA256d, stealing all our bitcoins would be the least of our worries.


10

There is no consensus. I think part of the reason for that is that many people involved in the Bitcoin project have a vested interest in maintaining that there is nothing wrong with Bitcoin. In fact, there really is nothing wrong with Bitcoin, but there is lots of room for improvement. However, most improvements suggested have corresponding costs, and there ...


10

Building trading bots that interact with the exchanges is very similar to interacting with other RESTful APIs. Basically, you make query objects to whichever exchange you like to use. Here is a simple example: https://github.com/AdamCox9/nickelbot/blob/master/adapters/poloniex/poloniex_lib.php Nickelbot is development platform written in PHP that has all ...


9

Well, I know of one altcoin that does useful work: Primecoin. As Wikipedia describes it: Primecoin (sign: Ψ; code: XPM) is a peer-to-peer open source cryptocurrency that implements a scientific computing proof-of-work system. Primecoin's proof-of-work system searches for chains of prime numbers. Primecoin already has quite some world-record prime chains ...


8

It will not scale (to mass-market adoption) if you want to put all transactions directly into the blockchain. There needs to be a hierarchy of services built on top of the core protocol. In addition to improving scalability, they can also offer all kinds of features that some people need, such as reversible transaction, instant (no-confirmation) transfers, ...


8

1) It's not clear why you think every client having to download the entire block chain is a scalability problem. Pruning currently doesn't take place but it should eventually be possible in theory. Storage space is growing at a much faster rate than Bitcoin is. 2) To validate a new transaction, the only transactions you have to look at are the inputs to ...


8

I think that Tim S. may have the answer with his comment about endian-ness. Your observations about the nonce having its lowest byte zero (being a multiple of 256), are with respect to the little-endian byte order of the block itself. From the perspective of a big-endian machine, these are statements about the high byte of the nonce. So consider a miner ...


7

The scenario you name would be great for cryptocurrencies as it would make them mainstream. As soon as people got sick of govt intervention with Bitcoin in such a scenario, it would probably be relatively easy to get enormous numbers of people to switch over to a very similar (but independent) Altcoin. The nature of the cryptocurrency technology is such ...


7

There is practically no fixed algorithm that is bounded in computational complexity and storage requirements which does not benefit significantly from an optimized, fixed gate or transistor implementation in the form of an ASIC. The only question is: do the power and computational density benefits versus a CPU/GPU outweigh the significant NRE costs ...


7

You are missing botnets of GPUs. Honestly, I do not think botnets are such a big problem. Botnets succeed because they are invisible to the victims (some trojans even include an anti-virus to clean the system). If an infected computer has 100% CPU usage, it will not stay infected for long. Stealing credit card data is still a lot more profitable than ...


7

MBound would work well, since the fastest way to solve it uses lots and lots of memory - making it fastest on a CPU, not a GPU or ASIC. On Memory-Bound Functions for Fighting Spam: http://research.microsoft.com/pubs/65154/crypto03.pdf


7

Bitcoin mining is useful work, it secures the Bitcoin block chain. If you want to pay people to do other kinds of work, you can certainly do that, but that has nothing to do with Bitcoin mining. The work Bitcoin miners do is precisely the work needed to secure the Bitcoin block chain. There is no known way to make something be both protein folding and also ...


7

In addition to PrimeCoin, there was also PermaCoin proposed as a solution to archival of public knowledge: Excerpt from the abstract: We propose a modification to Bitcoin that repurposes its mining resources to achieve a more broadly useful goal: distributed storage of archival data. We call our new scheme Permacoin. Unlike Bitcoin and its proposed ...


7

Contrary to the name the proof of work used in Litecoin is significantly more difficult than SHA256 to verify (it slows sync times noticeably), while simultaneously not achieving it's goals of being only able to be mined on a CPU, or a GPU depending when you read the pitch on their website. It offers very little resistance to being mined on a GPU or ASIC, in ...


7

This question might be considered too broad and too opinion based according to the rules of this forum. However, tackling it from a technical standpoint based on facts rather than opinions might be on-topic and I will try my best to deep dive on that. Let's try to hit the five most important aspects that people might be interested in: security, ...


6

As explained by Gavin Andersen on the forum - in order to calculate the ID hash of the Tx that is used in the Merkle Tree, one needs to SHA hash the whole Tx message as defined in the Protocol Specification wiki page twice. For example, for the only Tx from the Genesis Block one would double hash the following array of bytes: ...


6

The block subsidy isn't awarded by anyone. It is taken by the miner, by virtue of creating a block that gives himself money. The system's role in this is restricted to permitting blocks to indeed contain such an (otherwise unbalanced) payment. If you have a fork with two branches, then within each branch there will be a payment to some miner. Which one is ...


5

There's no guarantee that you can solve a block just by adjusting the nonce. But there are other things you can change in a block that also change the hash. This question is pretty much an exact duplicate of your question.


5

Colin Percival, the author of scrypt, estimates and compares the costs of implementing various password hashing algorithms in hardware. From his paper: When used for interactive logins, [scrypt] is 35 times more expensive than bcrypt and 260 times more expensive than PBKDF2; and when used for file encryption — where, unlike bcrypt and PBKDF2, ...


5

There's a reason cryptographic hash functions, like the double SHA256 used for proof-of-work in Bitcoin, are not usually described using these complexity classes that classify asymptotic behavior. In fact, there are several. A technical reason is that hash functions often do not scale. For example, it is not defined how one would extend the proof-of-work to ...


5

When the nonce range is exhausted, miners change the extraNonce field of the generation transaction. This changes the Merkle root in the header and allows a new range of nonces to be attempted. Since the Merkle root is 256 bits, this can be repeated indefinitely.


5

One big reason against this sort of thing is that it creates a huge incentive for bad people to try to prevent you to do transactions (censor you). If miners get the "lost" bitcoins they might simply refuse transactions with coins that are almost expired hoping to get a bigger reward later. If miners don't get them but they are truly lost forever, then ...


5

Check out my ccxt library on GitHub: https://github.com/kroitor/ccxt With it you can access market data and trade bitcoin, ether and altcoins with many crypto currency exchanges. It is used to connect and trade with crypto markets and payment processing services worldwide. It provides quick access to market data for storage, analysis, visualization, ...


5

Merkle trees in general can have more child nodes, but the Merkle tree for transactional data in Bitcoin is a binary tree. "Merkle trees are binary trees of hashes." –Bitcoin-Wiki Protocol Documentation "From these txids, the merkle tree is constructed by pairing each txid with one other txid and then hashing them together." –Developer Guide: ...


Only top voted, non community-wiki answers of a minimum length are eligible