-
Notifications
You must be signed in to change notification settings - Fork 128
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
51% attack cost page #1664
51% attack cost page #1664
Conversation
UI is looking good. At a quick glance, the way the total attack cost is displayed makes it seem like there are two attack vectors (you need PoW + PoS for block production). Imo, dropping the word 'attack' in 'PoS attack cost' and 'PoW attack cost' wherever displayed would be better. In addition, would it be possible to expose your local server so that we could check out the UI? it would allow for some quick feedback (I have used https://ngrok.com/ and it works really well). |
This looks like nice work. I can give you a full review this afternoon or tomorrow, but there are some issues that snuck in when you rebased. |
We have the test code running at https://explorer.planetdecred.org/attack-cost |
e17cdc4
to
a388041
Compare
Projected ticket price on external attack looks wrong. Some values show a ticket price lower than the current price. An external attack is always adding additional funds so all cases should show a rise in ticket price. I can also suggest that 'additional costs' estimate be set to something other then 0 by default. 5% would be conservative. The amount being calculated should also be shown here instead of just put into the total. |
A couple of things to consider.
(little So it follows that the minimum average time to mine a single block is |
|
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.
A couple of changes to request, but really great work. People have been asking about this forever.
7058130
to
2eead93
Compare
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.
extras.tmpl is still reverting recent changes, probably a mistake in one of your rebases. After that is resolved, I'm good with this PR if @buck54321 is too.
3b4ae8e
to
a0097bf
Compare
Thanks for undoing those extras.tmpl changes, but prefer not to introduce all those whitespace changes. I suggest to checkout master's version of the file and go from there. |
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.
Encountered two issues. Was unable to reproduce the first. It was on a fresh build, fresh start, re-bundled web assets, cleared cache, etc. Keep an eye out for it. The chart was working fine initially, but then after refreshing it wasn't.
Seems that the ticket pools size is not being set in the controller element.
After waiting a bit, it eventually started working again, but something else is off.
We get some boost from hybrid consensus, but 3 trillion dollars is a bit high.
I am unable to reproduce this issues on a fresh build even after clearing my cache and trying from another web browser |
value of other cost to 5%
I think this PR can be merged and for the issue pointed out, a follow up PR can be created for the bug when it is isolated. |
b6517f7
to
9544f82
Compare
Im seeing errors in the calc that are causing external attack to show with negative numbers which should not occur. |
52be9ec
to
91ecf62
Compare
I have two pending issues on this PR
|
Regarding the target PoW attack input being editable, the slider already solves this issue and that is why I thought a slider would be a good idea. However, if we want the hashpower to be an input we would solve for equation |
91ecf62
to
b45c55c
Compare
Ive tested the latest version of this and it looks good to go. What is here works, and it would be good to have it merged to see it get some use and feedback. There are several areas for enhancements that can come in later PRs. |
Fix #1022
This is a replacement for #1617
It is a continuation of work done by other developers on the 51% attack cost.
This PR adds a page for majority attack cost calculation for both internal and external attack type using network hashrate, ticket price and ticket pool size.
The user has the ability to adjust parameters like attack time, electricity cost, exchange rate and mining device, and see the attack cost in US dollar for every selected set of options.