-
Notifications
You must be signed in to change notification settings - Fork 725
[BUG][TierTwo] MNB process refactor #2567
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
[BUG][TierTwo] MNB process refactor #2567
Conversation
105b1d6 to
126314d
Compare
random-zebra
left a comment
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.
Good find for the un-checked return value of Add(). 👍
But I think it would be better to move the dmn-collateral-reuse test out of Add(), and place it at the beginning of ProcessMNBroadcast (where it should have been in the first place, as it is much faster than the following tests).
|
Agree on the dmn-collateral reuse check movement out of |
…ast:CheckInputsAndAdd' function.
The location where this function should have been placed in the first place..
if the mnb received is from an active DMN, it needs to not be relayed to the network as it's an invalid mnb that no node will accept.
126314d to
cb6740a
Compare
|
rebased on master so it gets the latest tier two bugs fixes. |
…ckInputs. Accessing to the utxo in the coins cache view only once, when the collateral availability is checked.
cb6740a to
4a67ede
Compare
|
feedback tackled. |
Fuzzbawls
left a comment
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.
Code ACK 4a67ede
random-zebra
left a comment
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.
utACK 4a67ede
Have refactored the mnb validation process, placing the code where it should had been in the first place (masternode manager and not be an internal masternode function that is called from and internally calls to the manager..).
Doing it found a bug over the MN-DMN compatibility code:
if the mnb received is from an active DMN, it needs to not be relayed to the network as it's an invalid mnb that no node will accept. Active DMNs have prevalence over regular MNs.
And improved an un-performant, on disk, tx look up to check the mnb pubkey association with the collateral key. Use the coins cache instead.