You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the audit report(and based on our observation and block_target_gas.rs benchmark) it is clear that many of our benchmarks are wildly inaccurate and undercharge user. It creates situations where the bad actor may send transactions consuming all available node resources and paying almost nothing.
Some of the benchmark doesn't use the worst possible scenario. Some of them don't take into account the arbitrary data. Some of them have been miswritten.
We must go through each opcode and think about the worst possible scenario. We added a new benchmark block_target_gas.rs, that runs the same opcode in the infinite loop. The idea is to write a benchmark with the worst case for each opcode. If our benchmarks are accurate enough, the average execution time per benchmark should be almost the same for the same block gas limit.
Setting the worst scenario requires knowing how some opcodes work inside. For example, the TR opcode updates the balance of the contract, but if the contract has 1M of asset entries, the insertion into the database causes modification of the Sparse Merkle tree that may be slow for 1M entries.
After the audit report(and based on our observation and block_target_gas.rs benchmark) it is clear that many of our benchmarks are wildly inaccurate and undercharge user. It creates situations where the bad actor may send transactions consuming all available node resources and paying almost nothing.
Some of the benchmark doesn't use the worst possible scenario. Some of them don't take into account the arbitrary data. Some of them have been miswritten.
We must go through each opcode and think about the worst possible scenario. We added a new benchmark block_target_gas.rs, that runs the same opcode in the infinite loop. The idea is to write a benchmark with the worst case for each opcode. If our benchmarks are accurate enough, the average execution time per benchmark should be almost the same for the same block gas limit.
Setting the worst scenario requires knowing how some opcodes work inside. For example, the
TR
opcode updates the balance of the contract, but if the contract has 1M of asset entries, the insertion into the database causes modification of the Sparse Merkle tree that may be slow for 1M entries.DependentCost
fork256
,s256
,mcpi
opcodes #1325LDC
opcode #1271burn
opcode #1255The text was updated successfully, but these errors were encountered: