interim checkin

This commit is contained in:
Some Random Crypto Guy
2024-12-16 07:48:16 +00:00
parent 2ce22c2508
commit 0448a6bf9a
6 changed files with 49 additions and 38 deletions
+6 -4
View File
@@ -3619,10 +3619,12 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context
}
if (hf_version >= HF_VERSION_FULL_PROOFS) {
if (tx.rct_signatures.type != rct::RCTTypeFullProofs) {
MERROR_VER("FullProofs required after v" + std::to_string(HF_VERSION_FULL_PROOFS));
tvc.m_invalid_output = true;
return false;
if (tx.type == cryptonote::transaction_type::TRANSFER) {
if (tx.rct_signatures.type != rct::RCTTypeFullProofs) {
MERROR_VER("FullProofs required for TRANSFER TXs after v" + std::to_string(HF_VERSION_FULL_PROOFS));
tvc.m_invalid_output = true;
return false;
}
}
}
+9 -1
View File
@@ -858,6 +858,7 @@ namespace cryptonote
//fill outputs
size_t output_index = 0;
crypto::secret_key x_change = crypto::null_skey;
rct::key key_yF;
uint8_t change_index = 0;
for(const tx_destination_entry& dst_entr: destinations)
{
@@ -970,6 +971,12 @@ namespace cryptonote
// Push the F point into the TX vector of F points
tx.return_address_list.push_back(F);
// Calculate the shared secret yF
if (hf_version >= HF_VERSION_FULL_PROOFS) {
rct::key key_aP = rct::scalarmultKey(rct::pk2rct(P_change), rct::sk2rct(sender_account_keys.m_view_secret_key));
key_yF = rct::hash_to_scalar(key_aP);
}
// Calculate the encrypted_change_index data for this output
struct {
char domain_separator[8];
@@ -1209,7 +1216,8 @@ namespace cryptonote
rct_config,
hwdev,
rct::sk2rct(x_change),
change_index
change_index,
key_yF
);
else
tx.rct_signatures = rct::genRct(rct::hash2rct(tx_prefix_hash), inSk, destinations, outamounts, mixRing, amount_keys, sources[0].real_output, outSk, rct_config, hwdev); // same index assumption