We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [algorithms]

Regarding the underlying algorithms related to Bitcoin protocol.

Filter by
Sorted by
Tagged with
25
votes
4answers
72k views

The bitcoin mining algorithm from a programmer's viewpoint

This page: Blocks said mining is actually to solve a mathematical problem, but reading Block hashing algorithm doesn't give much help. I also tried reading bitcoind source code, but reading code takes ...
23
votes
1answer
13k views

How does the Kimoto Gravity Well regulate difficulty?

Maxcoin will use the Kimoto Gravity Well (KGW) to regulate the difficulty. From what I could find about the KGW, it retargets after every block and adjusts very quickly, e.g. when multipools add and ...
20
votes
5answers
41k 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, ...
18
votes
3answers
1k views

Looking for nonces of even numbers

Each one of bitcoin and its derived crypto-currencies has a nonce value in the block, no matter what the algorithm is. Every miner tries to search for a luck nonce which can make the hash value ...
15
votes
8answers
3k views

Are there algorithms that could be used for mining that resist acceleration with ASICs?

In my related question about mining algorithms that balance CPU and GPU it came up that such an algorithm would tremendously increase the incentive for people to create mining botnets. The prospect of ...
13
votes
4answers
7k views

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

The bitcoin network, including every miner, is the biggest computing project that humanity has created. Thus I ask: why, instead of using it to generate useless data, don't we use it to generate ...
13
votes
2answers
39k views

Simple bitcoin mining algorithm

I'm trying to figure out how does simple Bitcoin mining algorithm works in plain simple c or c# or some pseudo language. I've found an example at http://pastebin.com/EXDsRbYH, but unfortunately It ...
10
votes
1answer
1k views

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

Gavin Andresen announced a few days ago, that he started working on Invertible Bloom Lookup Tables. His repository's README refers to two papers, What's the difference?: efficient set reconciliation ...
9
votes
3answers
419 views

Is there any consensus over specific improvements Bitcoin needs?

There has been some criticism from cryptography experts about the current Bitcoin algorithm(s). Now that Bitcoin has been released to the wild and everyone has had time to study it, is there any ...
9
votes
1answer
2k views

What complexity class is Bitcoin's proof-of-work (hashcash) in?

To formulate this question precisely, I will define an idealized hypothetical "perfect" hash function H(n) which has nice scalability properties, and will formulate a problem PERFECT HASHCASH in terms ...
8
votes
3answers
591 views

Defense from Government Intervention

What's to stop a government, say the U.S. government, from saying "Hey, it's okay if you want to use Bitcoins, but you have to use at least version 0.6.3". And then a year later changing the law to "...
8
votes
3answers
8k views

How to calculate a hash of a Tx?

How does one calculate the hash of a Tx? Which fields need to be double SHA hashed and in what order?
7
votes
3answers
977 views

Bitcoin protocol / algorithm scalability

I have been looking into the Bitcoin protocol / algorithm a bit. I have the basics down, I think, but there are a lot of questions about how the whole thing is supposed to scale. For example, Each ...
7
votes
1answer
1k views

Are bitcoin Merkle trees always binary?

I've been doing a lot of research about bitcoin, trying to understand it at the bit & byte level. I was wondering about the lookup efficiency of the Merkle tree. I haven't found any evidence ...
7
votes
1answer
521 views

Is Quark as secure as SHA 256?

I'm trying to make certain I'm understanding the purpose behind the Quark algorithm. There are lots of devices that need secure algorithms but have severe power and processing constraints such as ...
6
votes
1answer
5k views

How is the target section of a block header calculated?

I've been poking around https://en.bitcoin.it/wiki/Target and I've found the current target, but I can't seem to find how it's generated. It's supposedly generated when the difficulty is adjusted, as ...
6
votes
1answer
340 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 ...
6
votes
2answers
4k views

How to sign a message using Bitcoin private key?

How does one create a proper signature for a given message using Bitcoin private keys? I have an input address of 5JeWZ1z6sRcLTJXdQEDdB986E6XfLAkj9CgNE4EHzr5GmjrVFpf or ...
5
votes
1answer
639 views

Does CPU mining become efficient as memory requirements increase?

I am focusing on an anti scrypt coin called Vertcoin which increases it's N-factor at a set interval. On their main page on bitcointalk it states that CPU computation will make gains as N-factor (...
5
votes
1answer
379 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 ...
5
votes
1answer
471 views

bitcoins can use different algorithm, how and implications

I read that if sha-256 was compromised at some point in the future, or for any other reason, bitcoin could switch to a different algorithm can someone detail how exactly that would work, and what the ...
5
votes
1answer
1k views

GPU mining strategies (algorithm)

I am currently in the process of creating a fairly simple bitcoin miner for CPU and GPU (for demonstration purposes not for money earning). However I am having a little troubling understanding how ...
4
votes
4answers
5k views

Algorithmic trading python library?

I am starting to do Algorithmic trading in cryptocurrencies using Python libraries. Most exchanges have RESTful APIs that make it easy to write you own code and get started. However, I would like to ...
4
votes
4answers
674 views

What if I create a new address and I'm given one which clashes (already exists, it is being used by other user)

Addresses are like GUIDs, no? They are created randomly whenever you request the creation of a new address. But what if when creating one, it clashes with one already created? I know that the ...
4
votes
1answer
2k views

Algorithmic efficiency for transaction lookup in blockchain

Since bitcoin uses binary Merkle trees (just learned that), I want to know what would be the algorithmic efficiency for transaction lookup in the blockchain. I don't know exactly how the data ...
4
votes
1answer
1k views

Bitcoin blockchain search algorithm and consistency policy

The blockchain looks like a double linked list, and all the transactions are stored into each block. What kind of algorithm does bitcoin use to find a specific transaction efficiently, since the ...
4
votes
2answers
2k views

What determines SHA256 performance on different types of hardware?

I know the answers to many questions on here briefly touch on this point, but I'd like to get a consolidated answer that really touches on the key differences between different types of hardware which ...
4
votes
1answer
978 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 ...
4
votes
1answer
975 views

Ripple Distributed Consensus Algorithm

What kind of a Consensus Algorithms does ripple use? Is that a leader or leaderless distributed consensus algorithm? Then what?
4
votes
2answers
617 views

Could an algorithm be made ASIC-resistant by simply adding deterministic permutations depending on the hash of the previous block and the nonce?

I was thinking of permuting bits in a block before it is hashed, in order to require some adaptability from the mining hardware while retaining the security of SHA-256. Permutations would depend on ...
4
votes
1answer
3k views

Can Artificial Intelligence be used to mine BitCoins faster?

Can Artificial Intelligence be used to find more efficient mining algorithms? Is there only one algorithm that can be used to mine? EDIT: Asking about running the SHA(SHA(block header)) more ...
3
votes
2answers
205 views

Why can't we expire two year old transactions?

I understand any output in blockchain can be left un-redeemed forever. But If we expire all transactions that are more than two years old (specifically after some number of blocks), there are some ...
3
votes
1answer
956 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. ...
3
votes
1answer
955 views

Why are there different mining hardware for different hashing algorithms?

I have a question about mining hardware and hashing algorithms. Why are there different types of mining hardware for different hashing algorithms? Why can't we use an Antminer ASIC for Ethereum or ...
3
votes
1answer
1k views

What values are hashed in the SHA-256 algorithm, and what would be the next iteration until a possible header is found?

I've been doing a lot of reading on mining and software related to mining but I can't quite get my head wrapped around the specific nature of what is being hashed together. So far I feel like the ...
3
votes
1answer
477 views

Is there a guaranteed hash for every block? [duplicate]

Possible Duplicate: Nonce size - Will it always be big enough? My question may be misphrased, if so, I'll correct it if you let me know in the comments. My understanding of mining is that the ...
3
votes
1answer
843 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 ...
3
votes
1answer
407 views

FirstBits address shortening algorithm

Is the algorithm used by FirstBits to create their shortened addresses described anywhere, so that anyone wanting to automatically generate them could generate the same result as asking the website ...
3
votes
1answer
425 views

ASIC resistant PoW mechanism that generates new hash functions. How does that work?

From Vitalik Buterin's post regarding "On Mining", he mentions: The second approach is somewhat different: create a mechanism for generating new hash functions, and make the space of functions ...
3
votes
2answers
378 views

Blockchain for internet-of-things or is there any mining algorithm that can be utilized in low-computational power devices preserving security?

Recently IBM and Microsoft showed their interest (IBM post, Microsoft post) in utilization of blockchain for internet of things development. Let's assume that in close future the blockchain technique ...
3
votes
1answer
85 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 ...
3
votes
1answer
307 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. ...
3
votes
1answer
97 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: ...
3
votes
0answers
315 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, ...
2
votes
1answer
91 views

Do transactions happen globally synchronized?

Since Bitcoin validates transactions by the majority of peers, and stacks ALL transaction history chain to some kind of hash, is then the following statement true? Only one transaction can happen ...
2
votes
1answer
387 views

What is the algorithm behind multisignature address?

I know you can create a multisignature address with the command: bitcoind createmultisig 2 ["pubkey1", "pubkey2", "pubkey3"] As described here: https://gist.github.com/gavinandresen/3966071 This ...
2
votes
1answer
364 views

Why can addresses be shorter than 34 bytes?

The wiki entry on Address says: Some Bitcoin addresses can be shorter than 34 characters (as few as 27 in theory) and still be valid. [...] These shorter addresses are valid simply because they ...
2
votes
1answer
734 views

Hash rate for litecoind is way below the one I get for bitcoind, is this normal?

I'm running bitcoind on an Ubuntu EC2 image in the Amazon cloud; on another identical image I'm running litecoind. I compiled both of these on the bitcoind instance. According to the getmininginfo ...
2
votes
2answers
199 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 ...
2
votes
1answer
124 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 ...