mirror of
https://github.com/monero-project/monero.git
synced 2025-12-06 04:41:29 -08:00
cryptonote_core: rm confusing/redundant BP consensus rule
This rule is confusing/redundant because before v8, no
bulletproofs whatsoever were allowed. And during and after
v8, ONLY multi-output bulletproofs were allowed, i.e.
exactly 1 bulletproof is allowed which proves the range of
all amount commitments in the transaction.
Sources:
* No BP before v8:
- d32b5bfe18/src/cryptonote_core/blockchain.cpp (L3021-L3032)
* Only 1 BP allowed:
- d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L174)
- d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L150)
* BP must cover all outputs:
- d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L190-L194)
- d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L166-L170)
This commit is contained in:
@@ -3606,22 +3606,6 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
|
||||
MERROR_VER("Unsupported rct type: " << rv.type);
|
||||
return false;
|
||||
}
|
||||
|
||||
// for bulletproofs, check they're only multi-output after v8
|
||||
if (rct::is_rct_bulletproof(rv.type))
|
||||
{
|
||||
if (hf_version < 8)
|
||||
{
|
||||
for (const rct::Bulletproof &proof: rv.p.bulletproofs)
|
||||
{
|
||||
if (proof.V.size() > 1)
|
||||
{
|
||||
MERROR_VER("Multi output bulletproofs are invalid before v8");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user