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

Consider correcting Bank::slots_per_year drift #10093

Closed
mvines opened this issue May 17, 2020 · 3 comments
Closed

Consider correcting Bank::slots_per_year drift #10093

mvines opened this issue May 17, 2020 · 3 comments
Milestone

Comments

@mvines
Copy link
Member

mvines commented May 17, 2020

Similarly to #9874, inflation and rent calculations are based on a theoretical number of slots per year:

solana/runtime/src/bank.rs

Lines 939 to 943 in 5e89bd8

self.slots_per_year = years_as_slots(
1.0,
&genesis_config.poh_config.target_tick_duration,
self.ticks_per_slot,
);

At the time of this issue, the actual slots_per_year rate appears to be about 1 week ahead of the theoretical, meaning that inflation will taper faster than expected and rent will become due sooner:

$ solana block-time
Block: 11525626
Date: 2020-05-17T17:07:27Z (UnixTimestamp: 1589735247)

$ solana cluster-date 
Block: 11525640
Date: 2020-05-08T23:06:38Z (UnixTimestamp: 1588979198)

Let's decide if this even is a problem first.

@mvines mvines added this to the The Future! milestone May 17, 2020
@mvines
Copy link
Member Author

mvines commented May 27, 2020

Let's decide if this even is a problem first.

Yep it's a problem. At every Epoch we probably should adjust solana cluster-date towards solana block-time, but it must not go backwards.

@garious
Copy link
Contributor

garious commented May 27, 2020

Per conversation with @mvines, we can change Clock::unix_timestamp from PoH time to block time, but only update when block time increases. We can make the transition on Mainnet Beta now because PoH time is currently behind block time.

@CriesofCarrots CriesofCarrots removed their assignment Dec 20, 2020
@CriesofCarrots
Copy link
Contributor

CriesofCarrots commented Dec 20, 2020

Update on this: solana cluster-date is now corrected toward solana block-time, with various caveats (time cannot got backward, changes are bounded to 25% of the poh estimate since the start of the slot).

However, it is not certain how the slots-per-year calculation ought to be corrected. Presumably we want the annualized interest rate to be correct, but we need to consider how much and how often we want the rate to drift (or correct itself). Since inflation is only just about to begin on mainnet-beta, it seems like we will want to observe and collect data for a while to make these determinations.

@mvines mvines added this to the The Future! milestone May 10, 2021
@mvines mvines closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants