2

According to a different StackExchange question, the max transaction weight is half the penalty-free block weight, or was in protocol v8.

Looking into it however, I found check_tx_semantic() which says:

get_transaction_weight(tx) >= m_blockchain_storage.get_current_cumulative_block_weight_limit() - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE

Now, get_current_cumulative_block_weight_limit() gets m_current_block_cumul_weight_limit which is the max block size, so it seems there are conflicting ideas.

What is the correct maximum transaction weight in protocol v12?

Note: after bulletproofs in protocol v8, transaction size gets inflated when there are more than two outputs. The new metric is called 'transaction weight'.

2

What is the correct maximum transaction size in protocol v12?

Quoting the source of get_transaction_weight_limit in tx_pool.cpp:

  // from v8, limit a tx to 50% of the minimum block weight
  if (version >= 8)
    return get_min_block_weight(version) / 2 - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE;

Which is used when adding a tx to the pool in tx_memory_pool::add_tx, core::add_new_tx and various other places eventually call through to it as well.

Looking into it, however, I found check_tx_semantic() ...

If you look a bit more you find that core::check_tx_semantic is only called by core::handle_incoming_tx_accumulated_batch which doesn't look to be called by anything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.