Block timestamp

From JaxNetwork Wiki
Revision as of 03:28, 27 August 2022 by ForgetfulFunctor (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In Jax.Network each block contains a Unix time timestamp. In addition to serving as a source of variation for the block hash, they also make it more difficult for an adversary to manipulate the blockchain. Within the block, timestamp is located in the Bitcoin aux-header.

A timestamp is accepted as valid if it satisfies timestamp control rules of JaxNet protocol.

Timestamp control rules

Timestamp control rules are designed to stop nefarious miners from manipulating the block timestamps and achieving unfairly high mining rewards.[1] Sometimes they are called "block timestamp protection rules". This mechanism was designed by Satoshi Nakamoto in Bitcoin. With minor modifications these rules are adopted almost all PoW blockchain networks. Jax.Network has the same set of rules with a difference only in parameters.

Median Past Time (MPT) Rule

[1]

if !header.Timestamp().After(medianTime) && b.chain.Params().Net != wire.FastTestNet {
  str := "block timestamp of %v is not after expected %v"
  str = fmt.Sprintf(str, header.Timestamp(), medianTime)
  return chaindata.NewRuleError(chaindata.ErrTimeTooOld, str)
}

Future Block Time Rule

Timestamp cheating

See also

External links

References

This page is a stub. Help by expanding it.