Bitcoin Forum
May 11, 2024, 05:37:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: In mining are the rest of target bytes 0 or 255?  (Read 152 times)
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
July 22, 2019, 07:08:18 AM
Merited by ABCbits (1)
 #1

If nBits is 0x1b0404cb the target according to wiki is calculated as
Code:
0x00000000000404CB000000000000000000000000000000000000000000000000

so does this mean if the block hash was the following it would be rejected?
Code:
0x00000000000404CB000000000000000000000000000000000000000000000001

or do we set the remaining bytes in target to 0xff and then compare it with hash result? (Which means the above block hash could be accepted)
Code:
0x00000000000404CBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
1715405872
Hero Member
*
Offline Offline

Posts: 1715405872

View Profile Personal Message (Offline)

Ignore
1715405872
Reply with quote  #2

1715405872
Report to moderator
1715405872
Hero Member
*
Offline Offline

Posts: 1715405872

View Profile Personal Message (Offline)

Ignore
1715405872
Reply with quote  #2

1715405872
Report to moderator
1715405872
Hero Member
*
Offline Offline

Posts: 1715405872

View Profile Personal Message (Offline)

Ignore
1715405872
Reply with quote  #2

1715405872
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
tromp
Legendary
*
Offline Offline

Activity: 978
Merit: 1087


View Profile
July 22, 2019, 07:18:56 AM
Merited by achow101 (2), vapourminer (1), ABCbits (1), Coding Enthusiast (1)
 #2

As shown in

https://github.com/bitcoin/bitcoin/blob/d0f81a96d9c158a9226dc946bdd61d48c4d42959/src/arith_uint256.cpp#L213-L214

the rest of the bits remain 0. So that one is indeed rejected.
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!