Nxt Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Nxt Client 1.11.10 - NEW RELEASE: Ardor 2.0.5e TestNet - The Ignis ICO is over!! Ardor genesis snapshots will happen at Nxt block 1,630,000 (expected for 25th December)

Pages: [1]

Author Topic: Blockchain timestamps  (Read 212 times)

Vasilisa

  • Newbie
  • *
  • Offline Offline
  • Posts: 4
    • View Profile
  • Karma: +0/-0
Blockchain timestamps
November 13, 2017, 09:15:13 pm

Hi, have there been any changes recently to how chain timestamps transactions and blocks? Here we can see transaction Created Time 19:12:26 and here we see this transaction appears in the block Created Time 19:12:13. Which is a bit earlier than transaction was created. How it's possible? If i am missing anything please guide me to where to read about what block/transaction timestamps actually mean now. thx



VanBreuk

  • Administrator
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2586
    • View Profile
  • Karma: +346/-18
Re: Blockchain timestamps
November 13, 2017, 10:44:03 pm

I suspect that the apparent discrepancy may have to do with the fact that these two transactions are asset exchange order placements. So things would happen in this sequence:

1) The place order transaction is broadcasted
2) The block including the transaction is generated, confirming the order placement
3) The order is matched and executed

Then the timestamp in the database would be the moment where the order was executed, later than the time when the block including the place order transaction was generated.
GPG Fingerprint: B020 D1C1 F289 3B2C 3577  9EAD 455D D175 5913 C7F1

Vasilisa

  • Newbie
  • *
  • Offline Offline
  • Posts: 4
    • View Profile
  • Karma: +0/-0
Re: Blockchain timestamps
November 14, 2017, 06:09:20 am

So which timestamp do we see in the chain as 19:12:26? Is it Order Broadcast time or Order Execute time? And if its e.g. order execute time where can i check order broadcast timestamp if its recorded?

petko

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 86
    • View Profile
    • My blog
  • Karma: +23/-0
Re: Blockchain timestamps
November 14, 2017, 04:37:20 pm

Transaction timestamps are allowed to drift up to 15 seconds after the block timestamp. To accommodate differences in clocks I guess.

No changes about that recently - it's coming from the initial version by BCNext - see https://bitbucket.org/JeanLucPicard/nxt-public/src/4af2d32ada1b62e0a348809612ee0ed35b49c353/Nxt.java?at=master&fileviewer=file-view-default#Nxt.java-1012 (he checks that transaction is not 15 seconds after curTime, later, in Feb 2014, was added a check that it is not 15 seconds after the block timestamp)

Vasilisa

  • Newbie
  • *
  • Offline Offline
  • Posts: 4
    • View Profile
  • Karma: +0/-0
Re: Blockchain timestamps
November 15, 2017, 05:27:35 am

Ok the last question then - Is broadcasted transaction immediatly available in Expected Orders or is there also any allowed drift?

Vasilisa

  • Newbie
  • *
  • Offline Offline
  • Posts: 4
    • View Profile
  • Karma: +0/-0
Re: Blockchain timestamps
November 18, 2017, 07:42:16 am

Could you please help me figure out, on these screenshots we see that 2 accounts broadcasted transactions: 1st trans at 17:26:04 from account NXT-GWL5-AWWX-YNRH-859XF and 2nd trans at 17:26:05 from account NXT-5ERP-RQNA-J84F-34LTY. Transaction which was executed is the second one which was broadcasted later. So the questions are 1. how could this happen? 2. what are the actual execution rules? 3. what actually dates mean? Thats not the only example i noticed so far, it happens regulary (with bigger gap, like ~3seconds) so there must be some rule and/or explanation.







Pages: [1]