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

Add A "likely forked" Metric to Diagnostics #2071

Closed
RoboticMind opened this issue Mar 22, 2021 · 2 comments · Fixed by #2095
Closed

Add A "likely forked" Metric to Diagnostics #2071

RoboticMind opened this issue Mar 22, 2021 · 2 comments · Fixed by #2095
Assignees
Milestone

Comments

@RoboticMind
Copy link
Contributor

Seeing that there's still some wallets forked from 5.1 with forks long to recover from, it may be helpful to add something that indicates that a user is forked when they look at the diagnostics. Simplest way to do this would probably be to go by difficulty/netweight.

It may also be a good idea to show a warning in the wallet if someone is almost certainly on a fork such as having a diff of 0.1 or something like that

@RoboticMind RoboticMind changed the title Add A "likely forked" Metric to Diagnositcs Add A "likely forked" Metric to Diagnostics Mar 22, 2021
@jamescowens
Copy link
Member

The first idea is a good one. The second is already implemented as a low difficulty warning in the error messages area, although the trigger is WAY too low for mainnet (currently 0.1). The trigger should probably be based on a moving average of difficulty over the past x blocks. I will have to think about that.

@jamescowens jamescowens self-assigned this Mar 22, 2021
@jamescowens jamescowens added this to the Ingrid milestone Mar 22, 2021
@RoboticMind
Copy link
Contributor Author

RoboticMind commented Mar 22, 2021

The second is already implemented as a low difficulty warning in the error messages area...

Ah I'm not sure I knew that. Maybe worth adding "fork likely" to that message too if it's not there in case someone doesn't fully get that low diff means that you are likely on a fork

The trigger should probably be based on a moving average of difficulty over the past x blocks

One potential downside for that approach would be if the blocks for the average was set too low, it might not warn on a long fork. Maybe something closer to max(lowest_threshold, average*multiplier) would be a better way to determine a trigger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants