mirror of
https://github.com/monero-project/monero.git
synced 2025-12-10 07:22:34 +01:00
Merge pull request #10147
292c053 Cleaner validation (faster and saner) (j-berman)
This commit is contained in:
@@ -3018,21 +3018,6 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// from v4, forbid invalid pubkeys
|
|
||||||
if (hf_version >= 4) {
|
|
||||||
for (const auto &o: tx.vout) {
|
|
||||||
crypto::public_key output_public_key;
|
|
||||||
if (!get_output_public_key(o, output_public_key)) {
|
|
||||||
tvc.m_invalid_output = true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!crypto::check_key(output_public_key)) {
|
|
||||||
tvc.m_invalid_output = true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// from v8, allow bulletproofs
|
// from v8, allow bulletproofs
|
||||||
if (hf_version < 8) {
|
if (hf_version < 8) {
|
||||||
if (tx.version >= 2) {
|
if (tx.version >= 2) {
|
||||||
|
|||||||
@@ -1050,6 +1050,8 @@ namespace cryptonote
|
|||||||
for(const auto& in: tx.vin)
|
for(const auto& in: tx.vin)
|
||||||
{
|
{
|
||||||
CHECKED_GET_SPECIFIC_VARIANT(in, const txin_to_key, tokey_in, false);
|
CHECKED_GET_SPECIFIC_VARIANT(in, const txin_to_key, tokey_in, false);
|
||||||
|
if (rct::ki2rct(tokey_in.k_image) == rct::identity())
|
||||||
|
return false;
|
||||||
if (!(rct::scalarmultKey(rct::ki2rct(tokey_in.k_image), rct::curveOrder()) == rct::identity()))
|
if (!(rct::scalarmultKey(rct::ki2rct(tokey_in.k_image), rct::curveOrder()) == rct::identity()))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user