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 ...
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 ...
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-...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 (...
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 ...
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 ...
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 ...
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 ...
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
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, ...
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 ...
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 ...
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 ...
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 ...
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) {
...
2
votes
Accepted
I want to know how I can express a phenomenon found in Merkle Trees mathematically
Ceiling of the binary logarithm?
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 ...
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)...
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 ...
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
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 ...
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 ...
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....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
algorithms × 108mining-theory × 14
blockchain × 13
hash × 13
proof-of-work × 11
bitcoin-core × 10
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
cryptography × 4
nonce × 4
wallet × 3
bitcoind × 3
address × 3
exchanges × 3