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

Display the correct tspend next TVI block the first time #1995

Open
ukane-philemon opened this issue Jun 6, 2024 · 0 comments
Open

Display the correct tspend next TVI block the first time #1995

ukane-philemon opened this issue Jun 6, 2024 · 0 comments

Comments

@ukane-philemon
Copy link
Collaborator

@itswisdomagain on matrix: It seems the last tspend has stayed in mempool longer than it should have. Maybe the dcrdata code needs some correction?
I've seen the dcrdata page show Voting complete – Mineable at Next TVI: 857664 with 3 different TVI blocks now.
I saw mineable at 857088 2 days ago, then 857376 yesterday and now 857664.
When the proposed inclusion block gets mined and it's not included, the display shows the next TVI block as the proposed inclusion block.

To implement this according to DCP0007, we'd need to fetch block data from the db and calculate the treasury spend amount for the current policy window which is TVI * TVIM * TEW (288 * 12 * 2 = 6912) blocks per window

Fetching information for 6912 blocks to calculate the treasury expenditure and determine if the current live tspend would get mined at the next TVI is not scalable for dcrdata.

I propose we save the required data(total expenditure) to the db for each policy window/expenditure policy window for easy retrieval.

OR

We leave the existing code as it is, the NextTVI will keep changing until we pass the expenditure policy window check(i.e. if the next tspend exceeds the allowable spend for the current expenditure policy window).

cc: @chappjc, @itswisdomagain

@ukane-philemon ukane-philemon changed the title Display the correct TVI the first time Display the correct tspend next TVI block the first time Jun 6, 2024
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

1 participant