diff options
| author | j-berman <justinberman@protonmail.com> | 2025-10-05 17:56:57 -0700 |
|---|---|---|
| committer | j-berman <justinberman@protonmail.com> | 2025-10-05 17:56:57 -0700 |
| commit | 7b5319757107675ad54f38dcd916d74d6aa87772 (patch) | |
| tree | 8ca9c6c6d5ace6cd2c2e636d41214a05a1b5af99 | |
| parent | a440e917906b92b74daa107e49fcb963266242fa (diff) | |
| download | monzero-core-7b5319757107675ad54f38dcd916d74d6aa87772.tar.gz monzero-core-7b5319757107675ad54f38dcd916d74d6aa87772.tar.xz monzero-core-7b5319757107675ad54f38dcd916d74d6aa87772.zip | |
Cleaner validation (faster and saner)
| -rw-r--r-- | src/cryptonote_core/blockchain.cpp | 15 | ||||
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 2 |
2 files changed, 2 insertions, 15 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 74c87b921..d38586cd4 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -3009,21 +3009,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 if (hf_version < 8) { if (tx.version >= 2) { diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index ee7e643a6..2df72a419 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1041,6 +1041,8 @@ namespace cryptonote for(const auto& in: tx.vin) { 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())) return false; } |
