Bitcoin Forum
April 26, 2024, 07:44:16 PM *
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
1714160656
Hero Member
*
Offline Offline

Posts: 1714160656

View Profile Personal Message (Offline)

Ignore
1714160656
Reply with quote  #2

1714160656
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714160656
Hero Member
*
Offline Offline

Posts: 1714160656

View Profile Personal Message (Offline)

Ignore
1714160656
Reply with quote  #2

1714160656
Report to moderator
tromp
Legendary
*
Offline Offline

Activity: 977
Merit: 1077


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!