Dont you just hate it when people type in caps & bold fonts ? It is like listening to a child shouting to get attention.
Thanks for the reminder to vote by the way tungfa .. all taking care of.
Source code is right there https://github.com/dashpay/dashI AM SHOUTING MY FRIEND. I AM SHOUTING. FOR THE DEAF TO HEAR.
HOW DO I KNOW THAT THE SUM OF VOTES IS CALCULATED CORRECTLY?
Source code is right there https://github.com/dashpay/dash
Go find an error and
- create an issue https://github.com/dashpay/dash/issues describing it
- or fix it yourself and create pull request https://github.com/dashpay/dash/pulls
If the calculation and the sum of votes is done in a centralized way, then a cheat may occur. Additionaly nοt all masternodes run the same version of code. So the problem is not in the source code as you point. The problem is neither in the protocol , as long as the protocol may also change over time.
The problem is whether a database exists thats keeps all votes that have been casted. Is there a database that keeps all votes?
You have to preserve the votes in a "blockchain" type database, and let everyone, even an independant and not related to the dash community, at every moment to recalculate the vote result and check wheither it is ( or weither it was) a fair calculation. The database that allows the recaclulation of result is the only way to assure that the calculation is done, was done, and will be done in a fair way.
So the question is this: where is the database that keeps all votes that have been casted by all mastenodes, in all times?
This is what I am asking. If there is such a database, then everything is ok.
The votes are not counted centrally. They are counted by the network protocol -- what you see on dashvotetracker.com is merely a representation of the current state of the network.
https://github.com/dashpay/dash/blob/master/src/masternode-budget.cpp
My main question is not whether the vote result is calculated in a centralized or in a decentralized way. My main question is whether the votes are kept in a database or not.
I am an independant observer, and I would like all votes to be kept in a decentralized database, along with their timestamps. So I could download all votes and check whether your way of calculating the vote result is a correct one or not.
If someone owns the majority of the masternodes, and decides to cheat in the calculation of the vote result, we may are able to discover the cheat, but how can we PROVE the cheat if the votes are not preserved somewhere?
Thanks for the code reference.
I ll check on it whether this database I am asking for, is provided.
Someone please correct me if I am wrong, but from what I understand from the code and the descriptions I have heard previously, I believe all budget proposals *and* all votes are stored in the budget.dat file which is synced across all nodes in the network (the DB demo is looking for). Not sure if there is an easy way to read/parse/query this file though.
bool CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote, std::string& strError)
{
LOCK(cs);
uint256 hash = vote.vin.prevout.GetHash();
if(mapVotes.count(hash)){
if(mapVotes[hash].nTime > vote.nTime){
strError = strprintf("new vote older than existing vote - %s\n", vote.GetHash().ToString());
LogPrint("mnbudget", "CBudgetProposal::AddOrUpdateVote - %s\n", strError);
return false;
}
if(vote.nTime - mapVotes[hash].nTime < BUDGET_VOTE_UPDATE_MIN){
strError = strprintf("time between votes is too soon - %s - %lli\n", vote.GetHash().ToString(), vote.nTime - mapVotes[hash].nTime);
LogPrint("mnbudget", "CBudgetProposal::AddOrUpdateVote - %s\n", strError);
return false;
}
}
if(vote.nTime > GetTime() + (60*60)){
strError = strprintf("new vote is too far ahead of current time - %s - nTime %lli - Max Time %lli\n", vote.GetHash().ToString(), vote.nTime, GetTime() + (60*60));
LogPrint("mnbudget", "CBudgetProposal::AddOrUpdateVote - %s\n", strError);
return false;
}
mapVotes[hash] = vote;
return true;
}
Nope, visual issue imo, we should be fine https://www.dash.org/forum/threads/to-kill-or-to-keep-the-dash-world.9633/#post-98644Oh dear, did we over book the budget? We seem to be 1 coin over budget! I hope that doesn't mean a large budget will not get paid :/
Someone please correct me if I am wrong, but from what I understand from the code and the descriptions I have heard previously, I believe all budget proposals *and* all votes are stored in the budget.dat file which is synced across all nodes in the network (the DB demo is looking for). Not sure if there is an easy way to read/parse/query this file though.
Demo, you do have a good point. I wonder if evan can answer the question. @eduffleld