Bitcoin Forum
May 14, 2024, 10:43:06 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What will happen if a block hash= trans hash?  (Read 366 times)
girlbtc.com (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250

girlbtc.com


View Profile WWW
December 08, 2016, 08:35:06 AM
 #1

When you search the hash in blockchain.info

It will give you Error?  or Both?

And same question , what if two trans has same hash? will it be confused by the bitcoin-core or the miners.


For example:
The hash of Trans A and Trans B is the same.
You have valid output in trans A,
But the bitcoin-core find the Trans B and judge you as invalid Smiley

1715683386
Hero Member
*
Offline Offline

Posts: 1715683386

View Profile Personal Message (Offline)

Ignore
1715683386
Reply with quote  #2

1715683386
Report to moderator
1715683386
Hero Member
*
Offline Offline

Posts: 1715683386

View Profile Personal Message (Offline)

Ignore
1715683386
Reply with quote  #2

1715683386
Report to moderator
1715683386
Hero Member
*
Offline Offline

Posts: 1715683386

View Profile Personal Message (Offline)

Ignore
1715683386
Reply with quote  #2

1715683386
Report to moderator
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715683386
Hero Member
*
Offline Offline

Posts: 1715683386

View Profile Personal Message (Offline)

Ignore
1715683386
Reply with quote  #2

1715683386
Report to moderator
1715683386
Hero Member
*
Offline Offline

Posts: 1715683386

View Profile Personal Message (Offline)

Ignore
1715683386
Reply with quote  #2

1715683386
Report to moderator
1715683386
Hero Member
*
Offline Offline

Posts: 1715683386

View Profile Personal Message (Offline)

Ignore
1715683386
Reply with quote  #2

1715683386
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4186



View Profile
December 08, 2016, 09:07:29 AM
Last edit: December 08, 2016, 09:33:26 AM by ranochigo
 #2

When you search the hash in blockchain.info

It will give you Error?  or Both?
To my knowledge, this is very very rare and I believe its close to impossible. I need clarifications on this however, can someone else help to answer this question?
And same question , what if two trans has same hash? will it be confused by the bitcoin-core or the miners.
This has happened before. We need to understand how transaction hash works to know how it is impossible now.

A transaction hash consist of a double SHA256 hash of the following (in order):
1. A 32-bit version number.
2. inputs used in the transaction
3. outputs and the criteria for spending it
4. 32-bit nlocktime

So, for the transaction IDs to be identical, they must have the exact of the above.

This is only possible if a collision is found or in coinbase transactions(used to be easy).

BIP30 solved the coinbase TXID conflict implications by preventing miners from including any TX that has the same TXID from a previous block and has outputs unspent.[1] BIP34 makes the duplicate coinbase transactions even harder to create by adding block number into coinbase.

[1] https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki


█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
btc_enigma
Hero Member
*****
Offline Offline

Activity: 688
Merit: 567


View Profile
December 09, 2016, 05:53:27 AM
 #3

Its very rare for two random strings to have same hash

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!