Use actual blocktime when storing TX.#560
Merged
Merged
Conversation
Member
|
@Bushstar: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.
DetailsI am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository. |
ShengguangXiao
approved these changes
Jun 23, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Anchors can end up with time too new error as TX time is mostly set as half the current block time plus half the previous block time. Taking the following error, the block time is 1624342316 however the actual block time is 1624342948.
2021-06-22T06:25:57Z Anchor too new. DeFi: 1624332030 Bitcoin: 1624342316 Anchor: bceb153c5b0e15e931365f936c95167b06ffaf2a3222c152969c8d17466f0a8fHowever if we take half the time of the previous block and half the time of the block the TX is in we get...
(1624342948÷2)+(1624341684÷2) = 16243423161624342316 is the time shown in the log. The update here uses the actual block time, I can only guess that they were trying to set the time of the TX as being somewhere between the current and previous block which is problematic for the time base rules added to the anchoring system.
Resolves #550