Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
21 views

How to determine right address from address hash

I'm using private libbitcoin server and libbitcoin explorer. When I use bx fetxh-transaction, it returns something like: I'm trying to figure out, how to get right address from address_hash. When I ...
1
vote
1answer
33 views

Electrum's “script hash” form with NBitcoin?

I've come across how scripts are hashed in the electrum (stratum) protocol implementation by looking at the docs. I'm using NBitcoin, and I've tried to generate this hash from a segwit address, first ...
0
votes
2answers
30 views

SHA256 vs RIPEMD160 in SegWit

In Pay-To-Witness-Public-Key-Hash (P2WPKH), the RIPEMD160 hash function is used to hash the public key of the recipient in the locking script. On the contrary, Pay-To-Witness-Script-Hash (P2WSH) uses ...
0
votes
0answers
12 views

Merkle hash tree

Does the Merkle hash tree always have to be a binary tree? If not then what will be the advantages if it is ternary, tertiary…or anything else?
-1
votes
0answers
17 views

Why use HMAC-SHA512 in BIP32? [duplicate]

Why do we use this specifically over anything else (say just SHA512)? Curious as to why this was. Thanks.
1
vote
0answers
30 views

Does hashing of bitcoin addresses cause collisions? [duplicate]

There are 2^256 possible public keys. We generate bitcoin addresses by hashing these public keys using SHA256 and then RIPEMD160. Now, since 160 < 256 won't there necessarily be collisions - ...
0
votes
0answers
39 views

How to convert a bitcoin address to the respective hash160 using bash?

I want to convert a list of bitcoin addresses to their respective hash160 values as illustrated using bash :
1
vote
1answer
28 views

Why is Target < Blockhash?

I am currently trying to validate a blocks hash against its target in python3: This is a block in the Blockcypher testnet, and I am using this formula from the Bitcoin Wiki. block_hash = '...
-1
votes
0answers
23 views

When was segwit released? I need to know the year that transactions hashes started switching over to segwit from legacy [duplicate]

I am just wondering when transaction hashes were able to be segwit rather than legacy. Thanks I need to know the year preferably.
1
vote
1answer
36 views

Sorry newbie, I dont get the PoS block creation, to much contradiction

I am sorry for the repeat question but I cant find a clear answer. Most of the time PoS isnt explained in detail (only explaining the advantage) and a lot of sources contradict each other and now I am ...
0
votes
2answers
34 views

I am just wondering what are the methods which can hide all the transactions and also able to validate transactions in an block chain?

I am new to block chain and was looking at how block chain work mainly proof of stake based . They check validity by going through all the transactions which is something concerning as everyone can ...
1
vote
2answers
52 views

Why is the nonce bruteforced from 0 to n while mining?

bitcoin noob here. I was wondering why is the nonce increased from 0 to n while searching for a blockhash? Why not start at some other integer > 0 for example? My background is in ethereum-dev, so ...
0
votes
1answer
24 views

Can't we change the block data instead of a nonce?

In the process of solving a hash puzzle, isn't it possible to change the transaction data instead of changing a nonce?
0
votes
0answers
38 views

Natural Language Processing and Blockchain?

This question is about one of the applications of the Blockchain in Artificial Intelligence. I am not very familiar with Natural Language Processing and I see that there is a Blockchain platform ...
0
votes
1answer
46 views

Getting transaction id from raw transaction of a multisig address

I am able to get the tx id (or transaction hash) of almost any transaction but the one where the script starts with an "OP_O" (which is, I think, the null dummy introduced here https://github.com/...
1
vote
0answers
71 views

Estimated number of hashes

This is not a duplicate of previous, similar questions I've read on StackExchange, since none of those questions, nor the answers, go into the difficulty theory, as espoused on the Bitcoin Wiki. ...
3
votes
2answers
137 views

Checksum vs. Hash: Differences and Similarities ?

What are similarities and differences between a "checksum" algorithm and a "hash" function? Can they be used instead of each other? Or their usage are different? For example, for verifying the ...
0
votes
1answer
16 views

retrieving an original data from a hash: is it reliable?

Normally, one of the purposes of hashing a string (such as a transaction) is summarizing the data to save the size because of the space limitation. If this proposition is true, now assume we need to ...
0
votes
1answer
27 views

How to protect the latest block in block chain be tampered?

We know for each block in block chain, it has the previous block header hash which make the block be tampered become difficult. If the block is tampered, then all blocks after this tampered block need ...
1
vote
1answer
39 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 ...
1
vote
1answer
88 views

General private/public key generation

Not sure if this is the correct forum to ask, but I couldn't find a general one for all cryptocurrencies I wanted to get an idea on how the whole cold-storage private/public key generation works for ...
0
votes
1answer
38 views

Can Bitcoin Tech be Used to Protect Journalists [closed]

Over eight Nigerian journalists are currently in police detention because they published investigative news stories that didn't sit well with the government of the day. How can the bitcoin ...
0
votes
1answer
29 views

Have all hashes of unlocked difficulty levels of cryptocurrencies been mined?

I'm wondering if all the hashes of a previously unlocked difficulty level of a cryptocurrency, such as 0000000000000000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx BTC , have been completely ...
0
votes
1answer
26 views

“tx” array inside blocks contains transactions hashes?

When I use the "getblock " command on my bitcoin core client, it returns, beside other things, an array called "tx" with hundreds of hashes. Are these the individual transactions hashes or something ...
1
vote
2answers
81 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
110 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 ...
0
votes
1answer
97 views

Mining Theory: What would happen if a block hash collision occured? [duplicate]

To my knowledge, neither SHA256 or scrypt have ever had provable instances of hash collisions occur.. However, if this highly unlikely event was to happen, what would that mean for the state of the ...
0
votes
1answer
302 views

Why A Block have a Merkle root hash? [duplicate]

That is the question, why a block needs to have a Merkle root hash, as Iundestand, once a block is mined the hash value of this block is stored at the header of the next one so, it generates the chain....
0
votes
2answers
38 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 ...
1
vote
1answer
83 views

What does this comment in Chainparams.cpp mean?

There is a comment in the Bitcoin source code under src/chainparams.cpp /** * Build the genesis block. Note that the output of its generation * transaction cannot be spent since it did not ...
0
votes
1answer
129 views

Unable to validate a signed message from Ledger

Using Ledger Nano S you can sign a message, either through the UI (which is a Google Chrome app) or through Javascript by calling Ledger.signMessage as specified here. Using this, I get the following ...
0
votes
2answers
74 views

How would you find the Merkle Root with a Block that contains 6 transactions?

Let's use block #100205 https://www.blockchain.com/en/btc/block/0000000000033d0de6f4ebe93b3b142424cdbecf4bd98b948e856c4a55f09f76 This block contains 6 transactions. After the second level of hashing ...
0
votes
0answers
34 views

Why Does an Online SHA Generator not work for Double Hashing data? [duplicate]

Let's say you use: https://passwordsgenerator.net/sha256-hash-generator/ You plug in data and it produces the first hashed value. If you plug that output in for the second SHA256 it outputs the wrong ...
1
vote
2answers
53 views

How nodes verify if the hash on a P2SH output is from a valid script?

I understand how the validation works if someone wants to spend coins from a multisig address. But what if the receiver makes a mistake and provides an invalid script hash to the sender? Is there ...
0
votes
1answer
30 views

What is the exact input for the hash function?

I've read that it's some variation of: version, previous block hash, merkle root, time, bits, and nonce, but I'm not certain on where to get this data and how it should be formatted. I'd like to know ...
2
votes
1answer
264 views

How do I concatenate two hashes in Python?

Concatenating and double SHA-256 hashing "a751efbeabe73bdf9d08df5760104feff915d9d807d4c62178cdeb98d8c25f43" with itself "a751efbeabe73bdf9d08df5760104feff915d9d807d4c62178cdeb98d8c25f43" should ...
0
votes
2answers
152 views

I'm trying to hash transactions together to find the Merkle Root!

Transaction #59500 has 045c670f1c02c919 as its coinbase. Transaction 1 is 6653ad77d695752cff9fe63bbb5702a53807be534c537251d53de06aac5ca093. Transaction 2 is ...
0
votes
1answer
94 views

Why use Merkle Root (and not just concatonation of all hashes?) [duplicate]

I am studying the bitcoin protocol and do not exactly understand why a Merkle root is used to register all the transactions. What is the point of using a tree-wise structure when you can also just ...
0
votes
1answer
53 views

Why is the target truncated?

Reading the docs on target: The maximum target used by SHA256 mining devices is: 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Because Bitcoin stores the target as a ...
0
votes
1answer
135 views

HASH160 to address - What am I doing wrong?

I am running this code and nothing happens. I am trying to hash160 a script with OP_HASH160 {scriptHash} OP_EQUAL and get a P2SH address as output but not sure this is the right script to achieve ...
1
vote
1answer
82 views

Why is it important that the hash algorithm is puzzle friendly?

I don't understand "PUZZLE FRIENDLY". Here the definition I read: A hash function h is puzzle friendly if for every possible N-bit output value y, if K is chosen from a distribution with high ...
0
votes
1answer
55 views

What does a bitcoin transaction contain?

I'm learning about basic transactions and know that a transaction should contain: i) Signature of the sender using some operator: sign(private key,message) ii) Receivers Public key (wallet address) ...
0
votes
1answer
98 views

How do I double SHA-256 the header of block #59,500?

I'm not sure how to combine all of this information. https://blockchain.info/block/00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7 Version 1 Time Bits 470771548 (is this the right ...
0
votes
2answers
46 views

Can I get the same stats as are on blockchain.info and btc.com by running a full node?

There seem to be some discrepancies between blockchain.info and btc.com, specifically I am looking to extract the following info: "Relayed By", there was a block that was listed as unknown on ...
0
votes
1answer
120 views

Confused About Hash In Satoshi Nakamoto Diagram

In Satoshi Nakamoto's diagram: Consider the Hash block in the first transaction block above: How is that Hash value calculated? I see arrows from an Owner's Public Key and another arrow, so it's ...
1
vote
2answers
62 views

Where is the Coin in the Transaction Hash Chain?

In Satoshi Nakamoto's diagram: I see a Hash in each transaction block. It would be interesting to see the first block in the chain--it isn't shown. I say that because I do not see anything that ...
0
votes
1answer
75 views

Is the bitcoin blockchain really non-corruptible? [duplicate]

Some people say that proof of work is better than proof of stake, because it's not possible to rewrite the whole blockchain on-spot. One would need to "re-mine" everything. But I think this is not ...
1
vote
2answers
213 views
0
votes
3answers
198 views

Bitcoin API(s) - how to pair (or obtain) BOTH sender and receiver addresses with a transaction ID (hash)

Various block explorers exist, which offer REST APIs. So far been using blockchain.info and btc.com Here is what we have: - List of bitcoin addresses Here is what can easily be got with that info: -...
2
votes
2answers
69 views

API for multiple blockchains

Is there an API to get data for multiple blockchains? Most blockchain explorers already offer an API but I'd like to be able to get information for different blockchains through the same API.