38

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


18

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

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


8

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


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


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


6

It's important to note that the block hash is over the entire block header, which contains: Block Version Nonce Previous block hash Timestamp Merkle Root nBits Of these, only the nBits and previous block hash are fixed - all of the others can be manipulated to alter the hashed data at will. Once all 32 bits of the nonce value have been exhausted (which ...


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

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

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

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

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

The blockchain is either a tree structure (with each block just referencing its parent), or a single path through this tree (a singly linked list). Internally in software (at least in the reference implementation), indexes exist of course to find blocks (by height, and by hash). Technically however, there is no indexing of transactions at all. They're not ...


3

Recycle lost/destroyed bitcoins by giving them back to miners Miners will continue to get more transactions and thus more fees If you already own bitcoin, this isn't a good thing as it increases the supply. That said, there is an altcoin called Freicoin that uses demurrage rather than an abrupt 2-year expiration that's got some of the property you're ...


3

The biggest problem with Quark (or any other "memory hard" algorithm) as a hashing algorithm is that verification is synchronous. So in order to verify things you have to do a lot of work, compared to the very small amount of work required to verify SHA256. This could lead to a DoS attack where an attacker sends you a whole lot of bad blocks and makes you ...


3

No, that is not correct. Transactions can happen in parallel, asynchronously, and do not need to wait their turn. When someone creates a transaction, they send the transaction statement to their peers. Those peers verify the validity of the transaction, i.e. they check whether it adheres to the rules of the protocol, then in turn will inform their peers ...


3

The ECDSA digital signature scheme returns two values. To be specific, the X and Y values computed on the elliptic curve are returned. In Bitcoin the signture is DER encoded, which is represented as a string containing the X and Y values and also some header data. But both X and Y can easily be extracted from it when reading the string from left to right. ...


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