Bitcoin Forum
May 21, 2024, 07:43:01 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How is the correct time been submitted in mining?  (Read 585 times)
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1526
Merit: 7400


Farewell, Leo


View Profile
June 15, 2020, 05:47:45 PM
 #1

When miners find the perfect target they start sharing their success in the network and the network confirms it. But how is the time been correct? I mean, when you hash the block header, you hash the up-to-date time too. If the UTC is right now 17:45, what will stop me from writing 17:50 onto the block header?

I'm asking because block explorers have written the exact time when the block was hashed, this is how I got that query in my mind.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18565


View Profile
June 15, 2020, 07:09:25 PM
Merited by pooya87 (1), Quickseller (1), ABCbits (1), hosseinimr93 (1)
 #2

If the UTC is right now 17:45, what will stop me from writing 17:50 onto the block header?
Nothing.

The timestamp for a block can range from anywhere between the median time of the last 11 blocks (plus 1 second) up to 2 hours in the future based on current network time, with the current network time being based on the median time of all nodes.

This means that blocks can have timestamps from before previous blocks. For example, look at the timestamps on the following 5 consecutive blocks:

145045 - 16:05
145046 - 16:00
145047 - 15:53
145048 - 16:04
145049 - 16:08
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1526
Merit: 7400


Farewell, Leo


View Profile
June 15, 2020, 07:24:23 PM
 #3

Yes, but isn't this responsible for the analogous target value? Why not for example adding that your block was mined 1 hour after the up-to-date one. Wouldn't this decrease the target? I think this could be good reason to perform such action.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18565


View Profile
June 15, 2020, 07:41:25 PM
Merited by gmaxwell (1), ABCbits (1), hugeblack (1)
 #4

The difficulty is retargeted every 2016 blocks, which works out to every 2 weeks with an average block time of 10 minutes. If one miner stated that their block was mined 1 hour in the future, then all that would happen is that individual block had a timestamp 1 hour in the future. Given that all other blocks would still have a correct timestamp, it would make no difference to the average over a 2 week period.

It is theoretically possible that all miners could conspire to timestamp all blocks 2 hours later than they were actually mined, but since that is the limit of what nodes will accept, they can't make blocks appear any further in the future than 2 hours. Extending a difficulty period from 14 weeks to 14 weeks and 2 hours would make a tiny difference to the difficult adjustment, and to maintain it, all miners would consistently have to mine all blocks 2 hours in the future. As soon as they reverted back to current network time, then the next difficulty adjustment would compensate for it.
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1526
Merit: 7400


Farewell, Leo


View Profile
June 15, 2020, 08:24:59 PM
 #5

Okay thank you, I just don't get why difficulty exists since target already exists. Aren't they similar? Very similar?

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
June 16, 2020, 02:40:28 AM
 #6

Okay thank you, I just don't get why difficulty exists since target already exists. Aren't they similar? Very similar?
They aren't similar. Difficulty is a representation of target. They have an inversely proportionate relationship.

A higher target results in a lower difficulty and vice versa. It's less confusing to relate the difficulty of mining a block to the current difficulty instead of the target and that's why its used.

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
odolvlobo
Legendary
*
Online Online

Activity: 4326
Merit: 3231



View Profile
June 16, 2020, 04:47:31 AM
 #7

Okay thank you, I just don't get why difficulty exists since target already exists. Aren't they similar? Very similar?

difficulty = 0x00000000FFFF0000000000000000000000000000000000000000000000000000 / target

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1526
Merit: 7400


Farewell, Leo


View Profile
June 16, 2020, 07:46:29 AM
 #8

Isn't target changing on every block but difficulty on every 2016?

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
pooya87
Legendary
*
Offline Offline

Activity: 3458
Merit: 10572



View Profile
June 16, 2020, 07:58:19 AM
 #9

Isn't target changing on every block but difficulty on every 2016?

target and difficulty are both changing every 2016 block and one is calculated from the other.
https://en.bitcoin.it/wiki/Target
https://en.bitcoin.it/wiki/Difficulty

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1526
Merit: 7400


Farewell, Leo


View Profile
June 16, 2020, 08:10:35 AM
 #10

Isn't target changing on every block but difficulty on every 2016?

target and difficulty are both changing every 2016 block and one is calculated from the other.
https://en.bitcoin.it/wiki/Target
https://en.bitcoin.it/wiki/Difficulty

Oh, that's why in most block explorers it shows you only the difficulty. Because, it considers that you can do the simple math equation to know the target.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4186
Merit: 8421



View Profile WWW
June 22, 2020, 03:27:41 AM
Merited by ABCbits (1), hugeblack (1)
 #11

It's much safer to go from target to difficult than from difficulty to target. There have been some hilarious broken ass miners that withholding attacked themselves by computing the target from difficulty.
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!