forked from lthn/blockchain
fix for PoS verification (block hash is used as a message for sig), zarcanum_test_pos_math shoud now pass
This commit is contained in:
parent
fa0f51a7ed
commit
801f244d46
2 changed files with 3 additions and 8 deletions
|
|
@ -3697,12 +3697,7 @@ bool wallet2::prepare_and_sign_pos_block(const mining_context& cxt, currency::bl
|
|||
|
||||
// generate sring signature
|
||||
sig.s.resize(1);
|
||||
crypto::generate_ring_signature(block_hash,
|
||||
stake_input.k_image,
|
||||
keys_ptrs,
|
||||
secret_x,
|
||||
0,
|
||||
&sig.s[0]);
|
||||
crypto::generate_ring_signature(block_hash, stake_input.k_image, keys_ptrs, secret_x, 0, sig.s.data());
|
||||
|
||||
WLT_LOG_L4("GENERATED RING SIGNATURE for PoS block coinbase: block_id " << block_hash
|
||||
<< "txin.k_image" << stake_input.k_image
|
||||
|
|
@ -3800,7 +3795,7 @@ bool wallet2::prepare_and_sign_pos_block(const mining_context& cxt, currency::bl
|
|||
}
|
||||
#endif
|
||||
|
||||
crypto::hash tx_hash_for_sig = get_transaction_hash(b.miner_tx); // TODO @#@# change to block hash after the corresponding test is made
|
||||
crypto::hash tx_hash_for_sig = get_block_hash(b);
|
||||
|
||||
uint8_t err = 0;
|
||||
r = crypto::zarcanum_generate_proof(tx_hash_for_sig, cxt.kernel_hash, ring, cxt.last_pow_block_id_hashed, cxt.sk.kimage,
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ void pos_block_builder::step5_sign(const currency::tx_source_entry& se, const cu
|
|||
ring.emplace_back(el.stealth_address, el.amount_commitment, el.concealing_point);
|
||||
}
|
||||
|
||||
crypto::hash tx_hash_for_sig = get_transaction_hash(m_block.miner_tx); // TODO @#@# change to block hash after the corresponding test is made
|
||||
crypto::hash tx_hash_for_sig = get_block_hash(m_block);
|
||||
|
||||
uint8_t err = 0;
|
||||
r = crypto::zarcanum_generate_proof(tx_hash_for_sig, m_context.kernel_hash, ring, m_context.last_pow_block_id_hashed, m_context.sk.kimage,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue