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 ...
- 11.5k
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 ...
- 111
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-...
- 7,163
8
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 ...
- 16.7k
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 ...
- 15.3k
6
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 ...
- 6,286
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 ...
- 94k
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 ...
- 68.5k
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 ...
- 428
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, ...
- 8,772
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 ...
- 16.7k
5
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 whether ...
- 22.1k
5
votes
SegWit signing algorithm and its improvement
To be clear, this is talking about the way the message that is signed is computed. It is unrelated to transaction or block hashes and the signature algorithm itself, just how Bitcoin determines what ...
- 65.6k
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 ...
- 94k
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 (...
- 226
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 ...
- 68.5k
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 ...
- 346
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 ...
- 7,699
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 ...
- 917
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 ...
- 428
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 ...
- 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?
- 3,404
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 ...
- 68.5k
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, ...
- 68.5k
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 ...
- 39
2
votes
ASIC resistant PoW mechanism that generates new hash functions. How does that work?
Even though i'm a beginner in everything that concerns cryptocurrencies, please let me propose a guess, that others more prepared will correct. The idea is that an ASIC is a very specialized piece of ...
- 11
2
votes
Blockchain for internet-of-things or is there any mining algorithm that can be utilized in low-computational power devices preserving security?
No, not in a fully decentralized way. Hash-based methods (like what Bitcoin uses) will always be more efficient on more efficient hardware. Proof-of-stake methods can't be fully decentralized.
No, ...
- 11.5k
2
votes
What is the algorithm behind multisignature address?
OK, I found the answer I needed: https://bitcointalk.org/index.php?topic=317569
- 183
2
votes
What is the most lightweight proof-of-work algorithm?
Hashcash with SHA256 is about the best possible compute bound proof-of-work.
In a memory bound proof-of-work (which Litecoin's is not), like my Cuckoo Cycle, memory latency, rather than computation, ...
- 171
2
votes
Get uncompressed public key from compressed form
You can use bouncycastle ECPoint to do this conversion:
static ECParameterSpec SPEC = ECNamedCurveTable.getParameterSpec("secp256k1");
static byte[] compressedToUncompressed(byte[] compKey) {
...
- 21
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
algorithms × 105blockchain × 14
mining-theory × 13
hash × 13
proof-of-work × 11
bitcoin-core × 9
altcoin × 9
sha256 × 9
protocol × 8
transactions × 6
client × 6
development × 6
consensus × 5
alternatives × 5
scrypt × 5
block × 4
litecoin × 4
mining-reward × 4
signature × 4
nonce × 4
wallet × 3
bitcoind × 3
address × 3
exchanges × 3
mining-profitability × 3