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

natspec(TabLib): add complete contract natspec #157

Merged
merged 2 commits into from
Oct 6, 2021

Conversation

kamescg
Copy link
Contributor

@kamescg kamescg commented Oct 5, 2021

docs. docs..... docs!

@kamescg kamescg added the documentation Improvements or additions to documentation label Oct 5, 2021
@kamescg kamescg self-assigned this Oct 5, 2021
ring buffer parameters. Every token.transfer() creates a new TWAB checkpoint. The new TWAB
checkpoint is stored in the circular ring buffer, as either a new checkpoint or rewriting
a previous checkpoint with new parameters. The TwabLib (using existing blocktimes 1block/15sec)
guarantees on average 6 months of search history.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MAX_CARDINALITY in fact guarantees at least 7.4 years of records:

If 14 = block time in seconds

(2**24) * 14 = 234881024 seconds of history

234881024 / (365 * 24 * 60 * 60) ~= 7.44 years

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did the "6 months" come from yesterday? I obviously didn't do the math and was just running with that figure.

Was that calculated differently?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was the minimum target I had in my head. Nothing too concrete.

@asselstine asselstine force-pushed the pool-1673-twablib-natspec-doc-should-be-more branch from 24a65b6 to 7422feb Compare October 6, 2021 02:27
@asselstine asselstine merged commit 7d42437 into master Oct 6, 2021
@asselstine asselstine deleted the pool-1673-twablib-natspec-doc-should-be-more branch October 6, 2021 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants