Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

precommit vote time is beyond local host time make timestamp in Block wrong #256

Closed
ackratos opened this issue Nov 7, 2018 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@ackratos
Copy link
Contributor

ackratos commented Nov 7, 2018

After upgrade to cosmos25, kaiqiang found that timestamp in block header is much beyond reality time...

after upgrade, block timestamp should be weighted median of vote time, while all our 9 validator have same timestamp (comes from time.Now() go API) that beyond localhost. And the difference between vote timestamp can reality is accumulated. (the longer chain started, the more difference between block timestamp and real timestamp...)

This can be easily reproduced in DEV environment where all validators are in same cluster

I[11-07|07:00:00.081] Block{
  Header{
    ChainID:        chain-bnb
    Height:         81038
    Time:           2018-11-07 12:37:33.333642865 +0000 UTC
    NumTxs:         1
    TotalTxs:       9822
    LastBlockID:    92027ED0EB296D3AFFECCE0BD88C1D17C30BC851:1:067BD7F5FAF6
    LastCommit:     152189253C520DBF7E4E5E85C732F69F0CB17615
    Data:           3601683A1C5E1C03C57273146DB7191E4C9EE1F5
    Validators:     FFCC537CB79D6E0A154A81BBA10372922BB6DDD4
    NextValidators: FFCC537CB79D6E0A154A81BBA10372922BB6DDD4
    App:            DDE2F96313BD13EA187BAA4F127DFFBE5B5AD3A5
    Consensus:       0E520AF30D47BE28F293E040E418D0361BFB5370
    Results:
    Evidence:
    Proposer:       1FBECC9F56796F7D9B3BD3661FF37F39AAD2AB3D
  }#353F19C8D1A93DF4626C0C56B3C2CD2DBBA7F42B
  Data{
    3601683A1C5E1C03C57273146DB7191E4C9EE1F5 (223 bytes)
  }#3601683A1C5E1C03C57273146DB7191E4C9EE1F5
  EvidenceData{

  }#
  Commit{
    BlockID:    92027ED0EB296D3AFFECCE0BD88C1D17C30BC851:1:067BD7F5FAF6
    Precommits:
      Vote{0:0D6D0DCAFC55 81037/00/2(Precommit) 92027ED0EB29 89FFA859D09A @ 2018-11-07T12:37:33.333642865Z}
      Vote{1:1FBECC9F5679 81037/00/2(Precommit) 92027ED0EB29 C94F19FE4476 @ 2018-11-07T12:37:33.333642865Z}
      Vote{2:38ED787735FB 81037/00/2(Precommit) 92027ED0EB29 67E97E60A614 @ 2018-11-07T12:37:33.333642865Z}
      Vote{3:3E509B29B035 81037/00/2(Precommit) 92027ED0EB29 3DFD49EC2E92 @ 2018-11-07T12:37:33.333642865Z}
      Vote{4:45992BDE3AD8 81037/00/2(Precommit) 92027ED0EB29 2EB0D9528BB5 @ 2018-11-07T12:37:33.333642865Z}
      Vote{5:8172B22A4593 81037/00/2(Precommit) 92027ED0EB29 68CD7E6F9693 @ 2018-11-07T12:37:33.333642865Z}
      Vote{6:D454C0A80C1D 81037/00/2(Precommit) 92027ED0EB29 0E64FD170348 @ 2018-11-07T12:37:33.333642865Z}
      Vote{7:D63535D7CA08 81037/00/2(Precommit) 92027ED0EB29 CE54689F7EAA @ 2018-11-07T12:37:33.333642865Z}
      Vote{8:DD79D0CFC7EB 81037/00/2(Precommit) 92027ED0EB29 EDD76A6DC85B @ 2018-11-07T12:37:33.333642865Z}
  }#152189253C520DBF7E4E5E85C732F69F0CB17615
}#353F19C8D1A93DF4626C0C56B3C2CD2DBBA7F42B module=consensus
@ackratos ackratos added the bug Something isn't working label Nov 7, 2018
@ackratos ackratos self-assigned this Nov 7, 2018
@ackratos
Copy link
Contributor Author

ackratos commented Nov 7, 2018

@yutianwu found this magic configuration controlled time increase for each block:
https://github.com/tendermint/tendermint/blob/develop/config/config.go#L547

we are hitting this issue because we skip timeout (within 1 seconds generate many blocks)

@ackratos
Copy link
Contributor Author

bnc-tendermint PR is merged, will close this issue when BinanceChain switched dependency to bnc-tendermint master

@ackratos
Copy link
Contributor Author

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant