Skip to content

full_transaction_type size optimization and extension - RC cost is passed to tx broadcast API calls

Andrzej Lisak requested to merge abw_tx_size_opt into develop

Needs schemas!36 (merged)

Members of full_transaction_type were reordered to fix alignment problems.

It is recommended to remove fields related to required authorities as they take 1/3 of the size for a mere 1us gain (and only assuming reaching to memory costs nothing). For now the fields remain. Also there should be only one field to carry exception.

New field was added to carry RC cost of transaction (last observed cost, meaning it is overwritten every time transaction is reapplied, up to the point when it becomes part of block). The field is now used by APIs related to broadcasting transaction as well as tx status. Due to use of unordered boost signals we are currently unable to make sure cost was written by RC before it is read by tx status, therefore for the time being APIs only show cost when transaction is already part of block.

Also contains fix for potential leak - in extremely unlikely scenario when transaction was removed from cache while it was being read, new version of it was not properly marked as added to cache.

Edited by Andrzej Lisak

Merge request reports