Questions tagged [algorithms]

Regarding the underlying algorithms related to Bitcoin protocol.

Filter by
Sorted by
Tagged with
10 votes
3 answers
3k views

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

I am interested in generating a Bitcoin address by hand for security's sake. After I choose/generate a private key, how do I generate the public key? From there, how would I double check my work? ...
Peter Bergman's user avatar
5 votes
1 answer
156 views

Why does bitcoin.core's algorithm uses ancestor score instead of just ancestor fee rate to select transactions?

In bitcoin.core's implementation of the greedy knapsack algorithm to select transactions to go into a block for mining, the heuristic used to order transactions is based on an "ancestor score&...
algo2043's user avatar
1 vote
2 answers
39 views

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

Not trusting those already available QR code generators available, I would want to program my own. The idea is to input a Bitcoin key ( private or public ) and the program would simply generate the ...
Fred Cailloux's user avatar
2 votes
1 answer
237 views

SegWit signing algorithm and its improvement

I was reading about Segregated Witness upgrade from the book Mastering Bitcoin by Andreas and there were some questions I have not figured out. I am appreciated to get some of your help! A) There was ...
John Pham's user avatar
0 votes
2 answers
67 views

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

Currently, checking for double spends is very computationally expensive, so consensus algorithms, like POW, were put in place to more easily prevent double spends among other things. Ignoring the fact ...
CCS's user avatar
  • 115
0 votes
0 answers
25 views

What exactly determines how long it takes a given miner to mine 1 btc block? (not talking about hashrate) [duplicate]

So given the number of miners out there working on doing the same thing and that 1 block is mined every 10 minutes, it would appear at face value that only those with the highest hashrates would ever ...
seyah's user avatar
  • 1
0 votes
1 answer
69 views

Why is SHA-256 mining secure?

My understanding is the when you are mining bitcoin you are looking for a string, or maybe a binary number (a) such that if you 'add' a to the block (b) you get a number (c) whose hash begins with a ...
Michał Kuczyński's user avatar
4 votes
1 answer
766 views

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

I'm assuming SHA is perfectly uniform. In bitcoin, there are $2^{32}$ possible inputs per block, which are mapped to $2^{256}$ possible outputs. So there is a $1/2^{224}$ chance that any randomly ...
Croolsby's user avatar
  • 143
2 votes
1 answer
78 views

Why do we need 2F prepare certificates instead of just F+1 in PBFT?

I started reading PBFT and I could not understand: why do we need 2F prepare certificates? The client needs only F + 1 replies, not 2F, so why can't the same rule be applicable in the prepare phase of ...
ezio's user avatar
  • 183
1 vote
2 answers
317 views

What is the optimal way to increment extranonce?

I'm trying to learn how to block headers are created and an efficient way of doing so. Given a list .of transactions, can I change the extranonce without having to rehash the entire list? EDIT: To ...
Wil's user avatar
  • 13
2 votes
2 answers
483 views

Is verification of a blockchain computationally cheaper than recreating it?

One of the advantages of cryptocurrencies like Bitcoin that is often repeated is how hard it should be to manipulate past transactions. The reason that is often stated is that you would have to re-...
vonjd's user avatar
  • 123
6 votes
1 answer
410 views

What are the differences between Bitcoin and Libra?

Recently, Facebook announced to launch a crypto currency called "Libra". Libra is managed by associations under the name "Libra Association", see https://libra.org/en-US/association/. What are the ...
The Pheromone Kid's user avatar
3 votes
1 answer
2k views

What is the difference between BFT and PBFT

What are the differences between BFT and PBFT? I want to know the difference between these two concepts. If there is any improvement in the BFT's limitations, let me know. Please answer. Thank you.
helloo's user avatar
  • 33
0 votes
0 answers
10 views

what happens when their is a bicoin algorithm half? [duplicate]

I saw in an article something about a bitcoin algorithm half in 2020, what exactly is this, I have tried looking this up but I couldn't find anything that told me what it was only this.
Das Shield's user avatar
3 votes
1 answer
140 views

Why haven't a large number of cryptocurrencies copied Primecoin's mining algorithm? [closed]

According to my understanding, generating an ever-growing list of prime numbers benefits mathematics and society in some mysterious way. Given this, why have more recently created proof-of-work ...
user87948's user avatar
1 vote
1 answer
601 views

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

To sign a message , we choose nonce k but what happens if we use same k twice to sign a message using DSA algorithm?
Maulik Chaudhary's user avatar
3 votes
1 answer
970 views

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

In banking, a user's account will have a balance, and when they spend an amount is credited from their balance. For example, the account #310 could have $100, and spending $10 would reduce it to $90. ...
Some Guy's user avatar
  • 131
0 votes
2 answers
84 views

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

I want to know how I can express a phenomenon found in Merkle Trees mathematically. If I want to figure out which leaf node in a Merkle Tree has changed I can look at the authentication path to figure ...
Ben Stolman's user avatar
2 votes
2 answers
268 views

Crypto exchanges algorithms

I have noticed that if I put a buy order up - for instance - on any not so heavily traded coin, if close to the highest bid, often within 20 secs the highest bid will try to beat me. Or when I put it ...
Corey Hart's user avatar
0 votes
1 answer
217 views

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

Where in the sourcecode files can this be checked? For example, lets get a specific coin: Chronon https://github.com/ChrononGroup/Chronon In what file can one check the mining algorithm?
Alex Brest's user avatar
0 votes
1 answer
113 views

How many transactions per second can blake2s algorithm can handle?

i saw the hash functions speed (miBps) are 947 according to this website: https://blake2.net/ but how many transactions blake2s algorithm can handle? Verge uses the same algorithm right? more about ...
chico lima's user avatar
0 votes
1 answer
117 views

Is the whole idea of proof of work or proof of stake quite unnecessary and superfluous for cyptocurrencies?

I only have a vague idea of proof of stake, but I think I reasonably understand proof of work. In the case of bitcoin, the whole hash thing business has to be combined with a mechanism to increase the ...
user2277550's user avatar
1 vote
2 answers
303 views

How to return tx to mempool from stale block?

This question is centered around the implementation of how transactions from a reorganized block return to the mempool. In my understanding, once a block becomes organized out of the best chain all ...
Some_user_qwerty's user avatar
0 votes
1 answer
2k views

Why do I keep getting a connection lost error in Nicehash Bitcoin mining

The algorithm I'm using is daggerhashimoto. At first I thought this was because of my country blocking Bitcoin mining or something, but it doesn't work even if I'm using a VPN (vpnbook.com/freevpn). ...
MythicalCode_'s user avatar
-3 votes
2 answers
64 views

Any attack vector for Proof of Witness?

When Alice wants to send Bob some coins all she has to do is sign a transfer of ownership with her private keys and publicize that announcement until Bob is happy with the number of witnesses. For ...
EternalPropagation's user avatar
1 vote
1 answer
512 views

How is Ethash a 'memory hard' algorithm if it utilizes peak GPU memory bandwidth?

According to the Ethash algorithm described here, the computation for each nonce requires a loop of 64 iterations, where each iteration reads a chunk of 128 bytes from a pseudo-random location in ...
vLx's user avatar
  • 13
0 votes
1 answer
296 views

Can the Antminer S3 mine Bitcoin using Blake2s algorithm?

If so, how? Nicehash can also do this, so what I'm trying to do is point my Antminer S3 to Nicehash's Blake2s stratum. But will changing the stratum URL be enough? Do I have to set up Blake2s first?
MythicalCode_'s user avatar
0 votes
1 answer
726 views

Difference between scrypt and sha-256 mining?

So in detail my question is: are both these two algorithms different from each other?. I read somewhere that this two algorithm is used for the different cryptocurrency. if that's true. then why? ...
muneeb_ahmed's user avatar
0 votes
1 answer
174 views

which cryptocurrency using Slasher algorithm for Proof of Stake mining process?

Ethash algorithm for PoW mining process on my own cryptocurrency. I need to use Slasher algorithm instead of Ethash algorithm for Proof of Stake process. My question is Which cryptocurrency using ...
Ragu's user avatar
  • 1
3 votes
1 answer
960 views

Implementing NiPoPoW algorithm

Hello, We, a small team, have implemented about 95% of a breakthrough scientific proposal that is describing the NiPoPoW Non-Interactive Proofs of Proof-of-Work. You can find our source code ...
Silviu's user avatar
  • 161
0 votes
1 answer
647 views

How an order fulfillment works

I'm trying to understand how order fulfillment algorithm works from technical point of view. Let's say I created an order to sell 0.8 BTC and buy 5400 XRP along with other orders to sell 0.35 BTC, 2....
eugene's user avatar
  • 3
3 votes
1 answer
148 views

Understanding what is being run through Sha256

When I am running through an example for Sha256 I am not understanding how to arrive at the right answer. If I use the following Hex string: ...
ghawes's user avatar
  • 133
3 votes
1 answer
359 views

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

I understand it's in the miner's best interest to receive as many fees as possible for his hopefully-accepted block, hence it should include the most rewarding (fee / size) txs - up to the 1MB limit. ...
Itay's user avatar
  • 31
6 votes
1 answer
496 views

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

Forks are possible when mining the blockchain and happen "all the time" during mining. This means the nodes monitoring the blockchain have recorded many forks during blockchain's lifetime, with some ...
croraf's user avatar
  • 1,228
0 votes
2 answers
302 views

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

When miner creates a valid block he broadcasts that to the network. It can happen that someone else did the same. So we have half nodes think that chain+A is correct, and other half that it is chain+...
croraf's user avatar
  • 1,228
1 vote
1 answer
264 views

Why are transactions grouped into blocks? (how are new blocks-to-solve formed)

Why are transactions grouped into blocks when put onto blockchain (PART 1)? Lets say we have just put a block on a chain and there are no blocks at the moment that users mine. At that moment how many ...
croraf's user avatar
  • 1,228
0 votes
1 answer
247 views

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

I'm learning bitcoin protocol theory. To pay to someone you use a transaction. In the transaction you specify some of old transactions that gave you money (so called inputs). These inputs should have ...
croraf's user avatar
  • 1,228
0 votes
1 answer
119 views

Does the 100+ GB blockchain database contain every transaction?

Does the 100+ GB blockchain database contain every transaction since the beginning, or only a digest of them? I've read Nakamoto's paper and I see: the spent transactions before it can be ...
Basj's user avatar
  • 354
0 votes
1 answer
3k views

Nicehash autoselected algorithm with very high difficulty

I'm new at this so please bare with me I have a couple gtx 750 lying around so I decided to give mining a try. I used nicehash, according to the site "NiceHash Miner autoselects the most profitable ...
Encio Peter's user avatar
2 votes
1 answer
1k views

if a Bitcoin mining nounce is just 32 bits long how come is it increasingly difficult to find the winning hash? [duplicate]

I'm learning about mining and the first thing that surprised me is that the nounce part of the algorithm which is supposed to be randomly looped until you get a number smaller than the target hash .. ...
Pol's user avatar
  • 23
1 vote
0 answers
91 views

Why do different currencies use different units of difficulty? [closed]

I'm trying to understand the relationship between difficulty and network hash rate. I feel like I understand it for Etherium, where the difficulty is the same as the total number of hashes the network ...
CamJohnson26's user avatar
1 vote
1 answer
499 views

How do miners decode the input transaction?

When a transaction is broadcasted to the network, the transaction string contains the little-endian of SHA256(SHA256(X)) where X is the transaction string of input transaction. Now, since SHA is ...
anurag srivastava's user avatar
3 votes
0 answers
424 views

Probability of Orphaned Blocks

This is a question regarding the probability of orphaned blocks depending on the block interval. I am using Bitcoin vs Litecoin as an example. Assuming equal hash rate and number of transactions, ...
Phibert's user avatar
  • 131
2 votes
1 answer
658 views

How do Bitcoin and Litecoin compare in scalability?

Bitcoin and Litecoin are very similar, however they differ in the hash algorithm, the block interval and reward schedule. How do these characteristics impact the scalability in terms of e.g. ...
Murch's user avatar
  • 72.8k
1 vote
0 answers
2k views

What is the difference between X11 and X11 Ghost (Gost) [closed]

I'm looking at SIBCOIN. Its algo is X11 Gost. I've been trying to see what differentiates that algo from "plain, vanilla" X11.
Mayo's user avatar
  • 221
2 votes
1 answer
159 views

Mining and pending events

I am trying to fully understand the block chain algorithm and in particular, the consensus. My understanding is each miner has a pool of pending events -- events that have not yet been included in a ...
mprivat's user avatar
  • 155
20 votes
5 answers
45k views

How to build a bitcoin trading bot

I'd like to experiment with bitcoin technology, crypto currency, and encryption. I thought the best way to accomplish that is building my very own bitcoin trading bot. It seems like a daunting task, ...
Wei's user avatar
  • 201
1 vote
1 answer
715 views

Bitcoin mining algorithm - target - Java

Default share difficulty is 1 (big-endian target for difficulty 1 is 0x00000000ffff0000000000000000000000000000000000000000000000000000) How to calculate this? How it look like on Java code? What ...
Oleg D's user avatar
  • 35
4 votes
1 answer
1k views

Transaction signature algorithm

As I know, standard ECDSA digital signature algorithm returns two values (according to this article or Wikipedia), but transaction push services or APIs, like this one, require one string as a ...
Guest_User's user avatar
0 votes
2 answers
959 views

Own bitcoin pool miner algorithm

I receive these variables from the mining pool: job_id, prevhash, coinb1, coinb2, merkle_branch version, nbits, ntime, clean_jobs. What must I do with them? Can you write step by step formulas how ...
Oleg D's user avatar
  • 35