Skip to content

fix fCheckSigTimeOnly in CMasternodePing::CheckAndUpdate - #1093

Merged
UdjinM6 merged 1 commit into
dashpay:v0.12.1.xfrom
UdjinM6:fixFCheckSigTimeOnly
Oct 25, 2016
Merged

UdjinM6 merged 1 commit into
dashpay:v0.12.1.xfrom
UdjinM6:fixFCheckSigTimeOnly

Conversation

@UdjinM6

@UdjinM6 UdjinM6 commented Oct 24, 2016

Copy link
Copy Markdown

Not sure why we have this code here at all but it's preventing mns from updating their info from new mnb when masternodeprivkey changes. As a result nodes start banning each other (keys from sig and stored one do not match). Removed excessive logic and renamed fCheckSigTimeOnly to fSimpleCheck to better match actual check mode it's used in.

@tgflynn

tgflynn commented Oct 24, 2016

Copy link
Copy Markdown

I wonder if this is the real problem or if it is the state checking for broadcasts that prevents the MN info from being updated.

I had prepared this PR:
tgflynn@e93a52e

but haven't submitted it yet because I haven't been able to fully test it yet.

@UdjinM6

UdjinM6 commented Oct 24, 2016 •

Copy link
Copy Markdown
Author

I found many "keys don't match" errors in debug log which disappeared once I deleted mncache.dat on one node and resynced which led me to thinking that smth is not right and that was actually the place it failed as far as I can tell - it uses stored pmn->pubKeyMasternode to verify new sig signed by new keyMasternode. Obviously this should fail and it did :)
That are other reasons why nodes ban each other (I believe the root is the way we store/relay seen objects) but they are out of the scope of this PR ;)

@tgflynn

tgflynn commented Oct 24, 2016

Copy link
Copy Markdown

Was this caused by changing the masternode private key associated with a vin in masternode.conf and running start-alias ?

@UdjinM6

UdjinM6 commented Oct 24, 2016

Copy link
Copy Markdown
Author

Yep, I guess so. Basically there is no reason to check new ping signature with old mn keys. MN keys are updated later in Update->UpdateFromNewBroadcast (and ping is checked there again but now in full mode, if it's ok there then it becomes lastPing).

@tgflynn tgflynn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

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

Successfully merging this pull request may close these issues.

2 participants