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 ...


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 ...


15

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

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

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

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

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

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

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

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

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

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

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

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 ...


5

The hardware you are referring to are called Application Specific Integrated Circuits (ASICs), and they are named that for a reason. It's because they are not general purpose computers like desktops, tablets, and mobile phones. Instead, they are computers designed to do a very specific thing. In the case of an AntMiner, that thing is the SHA256 algorithm. ...


5

It could, yes. Ethereum works on something similar to an account system, at least as far as ethereum balance is concerned. Both models are valid, and have their benefits and drawbacks. The UTXO model allows for great parallelism and privacy. Each transaction can create UTXOs to new addresses, and different UTXOs can be spent independently and parallely. ...


4

This is possible through the use of a multiplier. For example, you could add it to Bitcoin as follows: You add a "currency multiplier" and "next currency multiplier" to the block header. All Bitcoin amounts presented are multiplied by this multiplier. You have a set of rules for how the next currency multiplier changes. For example, miners could be ...


4

Basically, yes. But it doesn't have any dramatic effect and it's almost certainly over by now. When Bitcoin was first released, it was not generally known that it was possible to mine efficiently using GPUs (video cards). It's possible that the Bitcoin creators and early developers knew this and withheld the information, giving them a tremendous mining ...


4

A bitcoin address is a 20-byte hash of a 64-byte public key (plus an ID and checksum to bring it up to 25 bytes). As such, there are two theoretical possibilities with a clash: Two separate people own public keys which hash to the same value Two separate people own the same public key Due to the way that Bitcoin transactions work, either of these ...


4

Currently, for a custom-built high-performance desktop, 16 GB of RAM (or even 32 GB) is typical, while one of the best GPUs, the AMD Radeon HD 7990, has 6 GB of GDDR5. Suppose the memory requirements were raised to 4 GB. That means that each thread will require 4 GB, so a CPU can mine on 4 threads at a time (16 / 4 = 4), while a GPU can only mine on 1 ...


4

No, you can't. The block chain is a linked list of blocks, and each block contains an array of transactions. Block headers commit to a Merkle tree of the transactions in them, but they are sorted chronologically, not by txid, so you need a linear search. If you want to find a transaction in a block quickly, you'll need an external index data structure. ...


4

Is verification of blockchain computationally cheaper than recreating it? Yes, far easier How do you verify the blockchain integrity? Don't you also have to recalculate all the values to see whether they are valid? No. The miner has to find a value for parts of the block they can choose a value for, such that a hash of the block has a certain number of ...


3

Mining performance can be viewed as consisting of two factors. One is the total resources available. The other is what fraction of those resources you can usefully apply to mining. ASICs and FPGAs excel at mining because you can effectively use a very high fraction of their available resources for mining. CPUs are terrible at mining because a huge fraction ...


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