Skip to main content
25 votes
Accepted

How can I manually (on paper) calculate a Bitcoin public key from a private key?

I've spent a fair bit of time thinking about this and can provide a fairly comprehensive answer about the state of the art. But unfortunately the TL;DR is that we don't know how to do this (yet) in ...
Andrew Poelstra's 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 ...
Adam Cox's user avatar
  • 111
9 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-...
Ugam Kamat's user avatar
  • 7,437
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 ...
Raghav Sood's user avatar
  • 17.2k
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 ...
Pieter Wuille's user avatar
6 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 ...
Ava Chow's user avatar
  • 71.6k
6 votes
Accepted

Why does Bitcoin Core’s algorithm uses ancestor score instead of just ancestor fee rate to select transactions?

This is intended to be a performance optimization when generating a block template for mining. The issue is around how many transactions we end up looking at while iterating over the mempool during ...
sdaftuar's user avatar
  • 599
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 ...
Igor Kroitor's user avatar
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 ...
Raghav Sood's user avatar
  • 17.2k
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 ...
RedGrittyBrick's 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 (...
Yaoshiang's user avatar
  • 226
4 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 ...
Murch's user avatar
  • 77k
4 votes
Accepted

What criteria does Bitcoin Core use to create block templates?

As of Bitcoin Core v26.1, the mempool tracks each transaction in the context of its ancestor set and prioritizes their inclusion on basis of their ancestor set feerate. Let’s assume a cluster of five ...
Murch's user avatar
  • 77k
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 ...
Silviu's user avatar
  • 161
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 ...
Igor Kroitor's user avatar
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?
Mike D's user avatar
  • 3,589
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, ...
Murch's user avatar
  • 77k
3 votes

Where is a good source of information for procedural algorithm to program my own Bitcoin QR code generator?

You're mentioning private keys, which are obviously not supposed to be shared while the purpose of QR code is to share information. A QR Code is the transformation of a string into a 2D picture. It ...
Maxime CATY's user avatar
2 votes

How to build a bitcoin trading bot

You have the basic steps down. You can cut out #1 since your wallet will likely be the on the exchange you are trading on. #4 is the hardest part, at least if you are trying to make money! Overall ...
m1xolyd1an's user avatar
  • 5,666
2 votes
Accepted

How bitcoin protocol checks transaction is valid (in particular that inputs are unspent)?

Yes, you've basically got it. Regarding multiple outputs, the solution is quite simple. Your input, instead of just specifying a transaction to spend, instead specifies a particular output of a ...
Nate Eldredge's user avatar
2 votes
Accepted

Does full node store all valid forks and "alternative" blocks from blockchain history?

Do nodes store all the branches from entire blockchain history? They will store all branches that they know of so long as the block headers of each branch are fully valid. The way that Bitcoin Core ...
Ava Chow's user avatar
  • 71.6k
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) { ...
michaelliao's user avatar
2 votes
Accepted

I want to know how I can express a phenomenon found in Merkle Trees mathematically

Ceiling of the binary logarithm?
Nate Eldredge's user avatar
2 votes
Accepted

What is the optimal way to increment extranonce?

The Merkle root of the transactions is calculated by building a binary tree from the transactions as leaves where each parent node is the hash of its two children. As the coinbase transaction is the ...
Murch's user avatar
  • 77k
2 votes

Why is SHA-256 mining secure?

My question is: Say I know that the message b 'added' with the number a gets mapped to my desired output. Why is it not possible for me, given a different block (b2) to find a corresponding number (a2)...
David Schwartz's user avatar
2 votes

Distribution range for sending transactions to inbound and outbound connections

It's an exponential distribution. Transactions are relayed through the inv messages, and there are indeed delays to prevent topological analysis. The timing depends on whether it is an inbound and ...
Thomas's user avatar
  • 41
1 vote

I want to know how I can express a phenomenon found in Merkle Trees mathematically

Whenever you are interested in a mathematical function that you can give a sequence of integer examples for, search OEIS: https://oeis.org/A029837
G. Maxwell's user avatar
  • 7,727
1 vote

What algorithm do bitcoin miners use to choose which tx to include in their block?

No. this is not knapsack problem and no one need to find optimal solution. Sort your transactions in mempool by two rules: subsequent transactions can not be to the left of parent ones most ...
amaclin's user avatar
  • 6,795
1 vote

Crypto exchanges algorithms

you're providing alpha to "high frequency market makers". Since they can tell that you are not a bot, they are assuming its a real bid, so they can bid on top of you and then they are now in a risk ...
jaybny's user avatar
  • 184
1 vote

How can I check what mining algorithm does an altcoin use?

Depending on the coin, you can find the PoW algorithm by perusing the source code of the coin. For the coin you referenced, reviewing the directory Chronon/src/pow.cpp one can see the algorithm is X11....
apt-getschwifty's user avatar

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