aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[gas] consider memory leaked for values entering the event natives

Open vgao1996 opened this issue 3 years ago • 9 comments

By default, the memory usage tracker considers the memory released when values enter a native function. This is however not the desired behavior for the event natives as the values stay in the event buffer until the end of the transaction. This gets it fixed by considering the memory leaked conceptually.

The change is gated by a new gas feature version (4).


This change is Reviewable

vgao1996 avatar Oct 31 '22 22:10 vgao1996

@wrwg done. See https://github.com/aptos-labs/aptos-core/issues/5485

vgao1996 avatar Nov 07 '22 21:11 vgao1996

Forge is running suite land_blocking on c5ec573b57f1c79c6de6204d41def81bbd8cb506

github-actions[bot] avatar Nov 07 '22 23:11 github-actions[bot]

Forge is running suite compat on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> c5ec573b57f1c79c6de6204d41def81bbd8cb506

github-actions[bot] avatar Nov 07 '22 23:11 github-actions[bot]

:white_check_mark: Forge suite land_blocking success on c5ec573b57f1c79c6de6204d41def81bbd8cb506

performance benchmark with full nodes : 6541 TPS, 6074 ms latency, 7500 ms p99 latency,no expired txns
Test Ok

github-actions[bot] avatar Nov 07 '22 23:11 github-actions[bot]

:white_check_mark: Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> c5ec573b57f1c79c6de6204d41def81bbd8cb506

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> c5ec573b57f1c79c6de6204d41def81bbd8cb506 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 7317 TPS, 5640 ms latency, 8500 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: c5ec573b57f1c79c6de6204d41def81bbd8cb506
compatibility::simple-validator-upgrade::single-validator-upgrade : 4536 TPS, 8927 ms latency, 11800 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: c5ec573b57f1c79c6de6204d41def81bbd8cb506
compatibility::simple-validator-upgrade::half-validator-upgrade : 4622 TPS, 9106 ms latency, 11600 ms p99 latency,no expired txns
4. upgrading second batch to new version: c5ec573b57f1c79c6de6204d41def81bbd8cb506
compatibility::simple-validator-upgrade::rest-validator-upgrade : 6476 TPS, 6045 ms latency, 10600 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> c5ec573b57f1c79c6de6204d41def81bbd8cb506 passed
Test Ok

github-actions[bot] avatar Nov 07 '22 23:11 github-actions[bot]

Forge is running suite land_blocking on 3844f037cee217aa302233414353454803ee1d22

github-actions[bot] avatar Nov 10 '22 21:11 github-actions[bot]

Forge is running suite compat on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 3844f037cee217aa302233414353454803ee1d22

github-actions[bot] avatar Nov 10 '22 21:11 github-actions[bot]

:white_check_mark: Forge suite land_blocking success on 3844f037cee217aa302233414353454803ee1d22

performance benchmark with full nodes : 6853 TPS, 5771 ms latency, 17900 ms p99 latency,(!) expired 2066 out of 2928420 txns
Test Ok

github-actions[bot] avatar Nov 10 '22 22:11 github-actions[bot]

:white_check_mark: Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 3844f037cee217aa302233414353454803ee1d22

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 3844f037cee217aa302233414353454803ee1d22 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 7565 TPS, 5145 ms latency, 7000 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 3844f037cee217aa302233414353454803ee1d22
compatibility::simple-validator-upgrade::single-validator-upgrade : 4786 TPS, 8453 ms latency, 11400 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 3844f037cee217aa302233414353454803ee1d22
compatibility::simple-validator-upgrade::half-validator-upgrade : 4772 TPS, 8830 ms latency, 11500 ms p99 latency,no expired txns
4. upgrading second batch to new version: 3844f037cee217aa302233414353454803ee1d22
compatibility::simple-validator-upgrade::rest-validator-upgrade : 6604 TPS, 5867 ms latency, 9700 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 3844f037cee217aa302233414353454803ee1d22 passed
Test Ok

github-actions[bot] avatar Nov 10 '22 22:11 github-actions[bot]