Open WGB5445 opened 1 month ago
Currently the multi-signature relies on the sequence number and can only have a maximum of 20 queued transactions. Using a vector is the most suitable option, but it requires more coding work. Therefore, we believe that directly replacing it with a smart table is the best choice.
Multisig account was also created prior to SmartTable/SmartVector existing. It might not be easy to change to those data structures due to backward compat problem. We'd need to add a new struct for the SmartTable and then switch between the 2 for existing multisigs
🐛 Bug > High gas consumption observed when creating transactions with Multi-signature Account V2.
When executing
create_transaction_with_hash
, I observed that the majority of gas consumption during this transaction process is concentrated in the table's add item operation.After reviewing the source code, I believe there is significant room for improvement, such as utilizing
smart_table
orvector
(with a limit on the number of pending transactions less than 20) to address this issue.source code
Therefore, I attempted to deploy similar code on the testnet and profiled different consumption patterns.