-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
multisig: mitigate fund-burning attack #8432
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -632,10 +632,12 @@ namespace tools | |
std::vector<crypto::secret_key> additional_tx_keys; | ||
std::vector<cryptonote::tx_destination_entry> dests; | ||
std::vector<multisig_sig> multisig_sigs; | ||
crypto::secret_key multisig_tx_key_entropy; | ||
|
||
tx_construction_data construction_data; | ||
|
||
BEGIN_SERIALIZE_OBJECT() | ||
VERSION_FIELD(1) | ||
FIELD(tx) | ||
FIELD(dust) | ||
FIELD(fee) | ||
|
@@ -648,6 +650,12 @@ namespace tools | |
FIELD(dests) | ||
FIELD(construction_data) | ||
FIELD(multisig_sigs) | ||
if (version < 1) | ||
{ | ||
multisig_tx_key_entropy = crypto::null_skey; | ||
return true; | ||
} | ||
FIELD(multisig_tx_key_entropy) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't 8149 simply ban old objects when deserializing? Why not do the same here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It banned old There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the clarification. And then the multisig builder itself will ban old versions where this is null. Makes sense. |
||
END_SERIALIZE() | ||
}; | ||
|
||
|
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.
Fine as a sanity check, yet could be removed and decrease bandwidth + a source of potential manipulation.
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.
They can only be removed by introducing a new
pending_tx_multisig
struct, which is too much for this PR.