18 votes
Accepted

How is the target section of a block header calculated?

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 ...
user avatar
12 votes
Accepted

What are the benefits of Invertible Bloom Lookup Tables for Bitcoin?

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 ...
user avatar
10 votes

How to build a bitcoin trading bot

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 ...
user avatar
  • 111
8 votes
Accepted

Looking for nonces of even numbers

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-...
user avatar
8 votes
Accepted

What are the differences between Bitcoin and Libra?

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-...
user avatar
  • 6,898
7 votes

Why can't we design a bitcoin that does useful work?

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 ...
user avatar
7 votes
Accepted

What is the most lightweight proof-of-work algorithm?

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 ...
user avatar
  • 15k
7 votes
Accepted

In Bitcoin, what happens if there is no viable nonce?

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 ...
user avatar
  • 16.4k
6 votes

At which point and how does the miner who successfully solved hash get coins?

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 ...
user avatar
5 votes

Why can't we expire two year old transactions?

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 ...
user avatar
  • 6,169
5 votes

Algorithmic trading python library?

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 ...
user avatar
5 votes
Accepted

Are bitcoin Merkle trees always binary?

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 ...
user avatar
  • 62.3k
5 votes

Why are there different mining hardware for different hashing algorithms?

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, ...
user avatar
  • 8,724
5 votes

Could Bitcoin be based on accounts instead, more like banks?

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 ...
user avatar
  • 16.4k
4 votes
Accepted

Does CPU mining become efficient as memory requirements increase?

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 ...
user avatar
  • 1,104
4 votes
Accepted

Algorithmic efficiency for transaction lookup in blockchain

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 ...
user avatar
4 votes
Accepted

What is the difference between BFT and PBFT

BFT is a class of problems where a group of nodes needs to find consensus, where some of the nodes may be malicious. PBFT is an algorithm that generates consensus in one of those environments (...
user avatar
  • 226
4 votes
Accepted

Is verification of a blockchain computationally cheaper than recreating it?

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 ...
user avatar
3 votes
Accepted

Do transactions happen globally synchronized?

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 ...
user avatar
  • 62.3k
3 votes

Is Quark as secure as SHA 256?

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 ...
user avatar
3 votes

Why can't we expire two year old transactions?

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 ...
user avatar
  • 7,619
3 votes

Bitcoin blockchain search algorithm and consistency policy

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 ...
user avatar
3 votes

Transaction signature algorithm

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 ...
user avatar
3 votes

How to build a bitcoin trading bot

The key steps you outlined for creating a cryptocurrency trading bot are correct. As for the daunting tasks you can also take a look at my ccxt library from GitHub. It allows to skip steps 1-3 and ...
user avatar
3 votes
Accepted

Implementing NiPoPoW algorithm

I. This is almost correct. The only difference is that you still need the χ suffix mentioned in the paper, which includes the most recent |χ| = k blocks of the blockchain. This is because the “last ...
user avatar
  • 161
3 votes

What happens if I use same k twice in DSA algorithm?

If you sign two messages using the same nonce, then it is possible for someone to derive your private key. See How do you derive the private key from two signatures that share the same k value?
user avatar
  • 3,145
3 votes

Is verification of a blockchain computationally cheaper than recreating it?

The reason that is often stated is that you would have to re-calculate all the headers with all the hash values of the whole chain which is practically un-doable. It's not the mere recalculation of ...
user avatar
  • 62.3k
3 votes
Accepted

If there was an easy way to check for double spends, will consensus algorithms be needed?

Yes, if you assume that the central challenge of a distributed system in an antagonistic environment doesn't exist, hypothetically creating such a distributed system is indeed much easier! Currently, ...
user avatar
  • 62.3k
2 votes

The bitcoin mining algorithm from a programmer's viewpoint

Any hash is a valid hash. The question is if you're hash meets our criteria. What you hash is actually a couple of things (we'll come back to this) that lined up together make a string that is a ...
user avatar
2 votes

How to sign a message using Bitcoin private key?

Using bitcoind and bitcoin-cli you can do it as follows: bitcoin-cli signmessage 1DiWX6p3FdHPZqN88vMeGVXSwAQ1h7BeVj 'Hello world!'
user avatar

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