Questions tagged [hash]

This tag should be used for questions related to hashes. A hash is the output of a hash function, a function which .is a mathematically reproducible but irreversible process that takes in an arbitrary length input and produces a fixed length output. The same input will always result in the same output. Hashing is central to Bitcoin mining as well as the generation of Bitcoin addresses.

Filter by
Sorted by
Tagged with
3
votes
2answers
839 views

Are Bitcoin Block Hashes Predictable

to create the block chain, the Bitcoin network runs hashing algorithms for each block, is it mathematically possible to predict the hash value of say, the 100th block from the last block currently in ...
3
votes
1answer
2k 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
482 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
3answers
248 views

What can be changed in signed bitcoin transaction?

What can be changed in signed bitcoin transaction? I mean how is possible to modify transaction to change its hash, but keep transaction valid, without need to have sign private keys?
3
votes
2answers
85 views

Is it computationally feasible to find two transaction IDs with the same first 20 bytes?

Transaction hashes uses sha256, so they are 32 bytes long. If I have to store a very large database of transaction hashes, only for the purpose of checking existence later on, is it really necessary ...
3
votes
2answers
8k views

Shares accepted vs hash rates?

I recently started mining LTCs, and because Im using a Nvidia card (GTX 650Ti) I have been trying out different settings in order to maximize efficiency with the hash rates. I have noticed though ...
3
votes
2answers
768 views

What is wrong with using hmac_sha512(block_hash, trans_id) as the resulting hash for a provably fair game?

Let's assume someone wants to make their own version of Satoshi Dice. Satoshi Dice states that the winning output of the game is determined in the following manner. The lucky number used to ...
3
votes
1answer
140 views

Get invoice amount from payment request - LND REST API

I'm using the REST API of my LN node to generate and pay invoices. I would like to know how to get the invoice amount/value in sats from the payment request I receive. I found this : https://api....
3
votes
2answers
553 views

Bitcoin Difficulty granularity

Difficulty adjusts by very granular percentages to target for 10 minutes blocks. But adding another zero at the end of the chain of zeroes from the header hash requirement for a valid block would ...
3
votes
3answers
662 views

Why you need to rehash each block after a changed block when changing data in a blockchain?

Maybe my question is stupid, but, why you need to rehash each block after a changed block when changing data in a blockchain? Each block contains a hash of its data and hash of previous block. If I ...
3
votes
1answer
407 views

Why max target is not (2^256 - 1)?

I'm reading https://en.bitcoin.it/wiki/Difficulty And I don't get why max target is not (2^256 - 1) which is 0xFFFFFFFFFFFF... but 0x00000000FFFF...?
3
votes
2answers
568 views

Verifying that a transaction is in the blockchain

Let me first start off by saying im just learning about blockchain and the technical aspects. From my understanding, each transaction is cryptographically hashed, the hashes are paired and hashed ...
3
votes
1answer
535 views

What if is there is no solution to a block?

Please let me know if I understand something wrong. Let's say I want to create a new block and verify previous transactions. To do this, I need to: Choose which transactions I want to include in my ...
3
votes
1answer
926 views

Verifying a P2SH transaction script by hand. How should I concatenate OP CODES in order to hash the script?

I'm reading this: Transaction 40eee3ae1760e3a8532263678cdf64569e6ad06abc133af64f735e52562bccc8 paid to P2SH address 3P14159f73E4gFr7JterCCQh9QjiTjiZrG. You can see the redeem script in ...
3
votes
1answer
236 views

In Proof-of-Stake, can a block creator fudge the block hash?

In Proof-of-Work, a block hash is costly to manipulate (say, wanting the hash to be even, or have the hash of the hash smaller than some number) since there is a lot of computing power put into ...
3
votes
1answer
3k views

Compute TxID of Bitcoin Transaction

Originally posted to StackOverflow but with no response. Thought I might have better luck here. I've successfully created a Bitcoin transaction in C# according to the protocol specifications. Here's ...
3
votes
1answer
902 views

Given a block, is there a list of all hashes for all possible 2^32 nonce values?

I am working in a computational research lab, and we're taking a look at Bitcoin. I'm trying to develop a simulation of Bitcoin mining for a nonexistent computer architecture. I want to simulate the ...
3
votes
1answer
693 views

How does the rate of getwork requests correlate with the hashrate of a miner?

In a setup where a standard bitcoind serves full difficulty targets to some mining nodes, how can I calculate the hashrate of a mining node from looking at the rate of getwork requests? Does this ...
3
votes
1answer
31 views

How does the daemon get a transaction via a hash

I am wondering how the daemon gets the transaction data from just a hash. I'm NOT asking how i can get it, i know i can get it via the rpc, i am asking how the daemon does it behind the scenes. Does ...
3
votes
1answer
301 views

When mining, does one also include Merkle root data into block header when testing for hashes?

I am just a beginner trying to understand technical details of bitcoin. As far as I know, the Merkle root of a block works to provide summarizing hash of list of transactions. And according to my ...
3
votes
1answer
1k views

Verifying a bitcoin trx on the Unix cmd line with OpenSSL?

I want to use openssl on unixoide systems to verify a transaction. I step on errors, when trying to verify a bitcoin trx’s hash. Here I am working on Mac OSX and OpenSSL (1.0.2a 19 Mar 2015). I know ...
3
votes
1answer
68 views

Proof of work - does the equipment matter?

It technically doesn’t matter whether I am using a super computer or a laptop to do the proof of work, it’s simply that with a super computer I can go through the attempts much faster, which means I ...
3
votes
1answer
396 views

Namecoin - How to Find Block Height via Block Hash? [closed]

Is it possible to use namecoind to determine the block number from a block hash? Going from height to hash is easy: namecoind getblockhash But going from hash to height appears to be impossible... ...
3
votes
1answer
1k views

given a json of a block, how do I calculate its hash?

Here is the genesis block with its hash. How the hash was calculated? { "hash":"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", "ver":1, "prev_block":"...
3
votes
1answer
215 views

Probability of block rewards

Assume that there are only three mining pools, all with the same hashing power, mining for bitcoins in the bitcoin network. Which mining pool is most likely to get the block reward? Do you all think ...
3
votes
2answers
1k views

Checking the Merkle Root for Block #100000

The below text is copied from the Bitcoin Developer Reference at bitcoin.org: If a block has three or more transactions, intermediate merkle tree rows are formed. The TXIDs are placed in order and ...
3
votes
2answers
313 views

SHA256 * 2 on header - what am I doing wrong?

I've been experimenting with the php code here: https://en.bitcoin.it/wiki/Block_hashing_algorithm (after correcting the small bug of $x=; to $x=""; ) With these blocks 0 and 125552 (for example) it ...
3
votes
2answers
524 views

How large can the bitcoin salt value be?

To mine bitcoin I believe that you take the input and add a salt number to that then run the hashing algorithm to find a suitable output, but how large can the salt be, couldn't I just take the ...
3
votes
1answer
110 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
175 views

Double Hashing Merkle Trees [duplicate]

I under that merkle tree use double hashing (HA = SHA256(SHA256(Transaction A)). Curious for answers to the following: Why is there a need to hash it twice? What is the difference between hashing it ...
3
votes
2answers
485 views

Hashrate falls by factor of 1000x when now block is found?

Very often my mining hashrate falls from the usual ~550 Mhash/s to about 400-500 khash/s, and I have noticed direct correlation in time with messages like these: btcguild.com:8332 25/04/2013 10:07:14,...
3
votes
0answers
40 views

Could the target become unreachable? [duplicate]

As far as I understand it, the target T is a floating point number that is adjusted based on the moving average of the difficulty of some previous transactions. Mining a block happens when somebody is ...
2
votes
2answers
281 views

What makes difficulty more difficult?

Miners attempt to hash block data such that it is below a certain target value? By Cantor's diagonal proof aren't there infinitely many successful values below any given target?
2
votes
2answers
144 views

Why are hashes base16 (hex) encoded rather than base58 encoded?

BTC sha256 hashes are hex encoded (as sha256 spits out bytes not a string), why is this? Surely using base58 would be more efficient as would use less space (would output a shorter string)
2
votes
2answers
372 views

Breaking down a raw transaction:

Complete example: ...
2
votes
2answers
384 views

What is Bitcoin's “genesis hash”?

From Lightning Network documentation: Used in several of the BOLT documents to denote the genesis hash of a target blockchain. This allows nodes to create and reference channels on several ...
2
votes
1answer
785 views

Why was finding a hash beginning with a certain number of zeroes chosen as the proof of work?

It seems to me that the reason the proof-of-work involves finding a hash beginning with a (temporarily) fixed number of zeroes is because one can easily check whether they have solved the problem by ...
2
votes
2answers
459 views

What are the hashes in Unspent outputs?

I am a newbie to Bitcoin. Looking at curl https://blockchain.info/unspent?active=1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK I guess that the script is the owner's address.I am not sure about this. "...
2
votes
3answers
2k views

Is it possible to convert Bitcoin Miner to Litecoin Miner?

I have 90Gh/s Bitcoin Miner and its almost useless for Bitcoin Mining with current difficulty. By changing the Linux software installed in it can I convert this Bitcoin Miner to Litecoin Miner? I am ...
2
votes
2answers
1k views

How can I check the hash of a bitcoin block?

Let's pick an example bitcoin block: #499583 This is the block: https://insight.bitpay.com/api/rawblock/000000000000000000677c4077da7c9f01dde5f332ba2fbff962ee699714d5da It starts with ...
2
votes
1answer
1k views

Why check for multiple nonces despite finding a golden nonce?

I'm still new at trying to understand the entire idea surrounding the mining process. I read the following: When mining, you are given a set of data to perform hashes on. As you noted, this is done ...
2
votes
1answer
340 views

The bitcoin address space seems to be closer to 2^40, not 2^160

The Base58 Encoding of a public key hash outputs: "A set of 58 alphanumeric symbols consisting of easily distinguished uppercase and lowercase letters (0OIl are not used)" This set is a fixed string ...
2
votes
1answer
372 views

Cheating ASICs and Mining Software

I've noticed the recently solved block hashes have started with a number of zeros (8 last time I checked). Couldn't we just tell our mining hardware/software to assume the first few digits are in fact ...
2
votes
1answer
603 views

Is the hash of the coinbase transaction needed for the merkle root?

first time posting here. I was interested on how mining software works down to the bytes. I came across this well written article right here: http://www.righto.com/2014/02/bitcoin-mining-hard-way-...
2
votes
1answer
393 views

How can I find a hash with leading zeros

I came across a similar question that was asked but the answer didn't seem quite complete. Coding is completely foreign to me and I have spent some time trying to solve with no success. I am trying ...
2
votes
1answer
155 views

Is this a collision attack or a 2nd-preimage attack?

This question revolves around Bitcoin Optech newsletter #51 (1) and an email thread from the bitcoin-dev mailing list (2). I asked the same question in a reply-email of the newsletter and the response ...
2
votes
1answer
271 views

How come Merkle tree is more efficient when tree branches are not stored in blockchain?

Suppose we have 8 transactions in a block X as follows and we know every node's hash value of the whole Merkle tree (that is, including intermediary nodes such as 45). Then if someone claims ...
2
votes
3answers
552 views

When a node receives a transaction, what steps does it do to verify that transaction?

I know that it verifies the block hash by calculating each hash of the contiguous blocks in order, but does it verify the balance of each wallet sending the transactions as well? And does it do the ...
2
votes
1answer
644 views

How do you verify a block manually?

From my understanding, you simply need to use a SHA256 function to hash the block's header (Block hash and merkle root) then add the nonce at the end like this article explains. However, I can't ...
2
votes
1answer
220 views

Who decides what the next, correct Nonce is?

As I understand finding the correct Nonce is the basis when hashing transactions for Proof of Work. How and where is this decided in the ecosystem what the next Nonce is? In my limited understanding ...

1 2
3
4 5
9