-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Better timestamps on simulated chains #16326
Merged
Merged
Conversation
This file contains 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
…est chains, not just transaction blocks
…ber of VDF iterations per block
arvidn
commented
Sep 13, 2023
fchirica
previously approved these changes
Sep 14, 2023
arvidn
added
Changed
Required label for PR that categorizes merge commit message as "Changed" for changelog
Tests
Changes to tests
labels
Sep 15, 2023
…ous (more complicated) block-time-residual field, tracking fractions of seconds. This also makes high precision (simulated) timestamps mandatory in BlockTools
arvidn
force-pushed
the
better-simulated-chains
branch
from
September 15, 2023 10:11
ffe9d1e
to
d76b206
Compare
fchirica
approved these changes
Sep 15, 2023
emlowe
approved these changes
Sep 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need new plots checked into the plot cache repo?
Yes, see: Chia-Network/test-cache#7 |
arvidn
added a commit
that referenced
this pull request
Sep 29, 2023
arvidn
added a commit
that referenced
this pull request
Oct 10, 2023
arvidn
added a commit
that referenced
this pull request
Oct 11, 2023
cmmarslender
pushed a commit
that referenced
this pull request
Oct 11, 2023
This was referenced Oct 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Changed
Required label for PR that categorizes merge commit message as "Changed" for changelog
ready_to_merge
Submitter and reviewers think this is ready
Tests
Changes to tests
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.
This PR is best reviewed one commit at a time.
Purpose:
This updates the
BlockTools
logic to generate more authentic simulated chains, and also lets us generate the long chains faster.The highlights are:
float
, instead of integer seconds + residualCurrent Behavior:
The timestamp between two transaction blocks is always 18 seconds, regardless of there being non-tx blocks in between
The timestamp between blocks is irrespective of the number of actual VDF iterations between the blocks. This effectively simulates a timelord that speeds up over time, making it increasingly expensive to generate the chain.
New Behavior:
The timestamp between two transaction blocks is (by default) 18.75 seconds for each block (including non-TX blocks). This time delta is scaled by the number of iterations.
The simulated chain does not simulate a timelord that speeds up over time. The cost of generating the chain is linear to the number of blocks.
Testing Notes:
I generated the chains, including the 10000 block one with the debug output to verify.