aptos-core
aptos-core copied to clipboard
[crypto+move] added support for SHA2-512, SHA3-512 and RIPEMD-160 in Move
Description
Added support for SHA2-512, SHA3-512 and RIPEMD-160, to support folks write bridge contracts to other platforms, as per conversations with @JoshLind.
This PR should be good to go:
- it is feature-gated
- it has (reasonable) gas costs for the new hash functions, marked with
optional - it bumps up the gas feature version
Test Plan
This PR merely exports existing hash function crates, which are either already used throughout aptos-core/ or are believed to be trustworthy implementations. Therefore, we only made sure the native implementation give the expected hash values for the empty string "" and for b"testing".
Forge is running suite land_blocking on 3b016bcbd163f3fd4b26069fe2b36e4176df0bb1
- Grafana dashboard (auto-refresh)
- Humio Logs
- (Deprecated) OpenSearch Logs
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite land_blocking success on 3b016bcbd163f3fd4b26069fe2b36e4176df0bb1
performance benchmark with full nodes : 8020 TPS, 4950 ms latency, 7500 ms p99 latency,no expired txns
Test Ok
- Grafana dashboard
- Humio Logs
- (Deprecated) OpenSearch Logs
- Test runner output
- Test run is land-blocking
Forge is running suite compat on testnet ==> 3b016bcbd163f3fd4b26069fe2b36e4176df0bb1
- Grafana dashboard (auto-refresh)
- Humio Logs
- (Deprecated) OpenSearch Logs
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite compat success on testnet ==> 3b016bcbd163f3fd4b26069fe2b36e4176df0bb1
Compatibility test results for testnet ==> 3b016bcbd163f3fd4b26069fe2b36e4176df0bb1 (PR)
1. Check liveness of validators at old version: testnet
compatibility::simple-validator-upgrade::liveness-check : 8564 TPS, 4319 ms latency, 6400 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 3b016bcbd163f3fd4b26069fe2b36e4176df0bb1
compatibility::simple-validator-upgrade::single-validator-upgrade : 5783 TPS, 6307 ms latency, 8000 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 3b016bcbd163f3fd4b26069fe2b36e4176df0bb1
compatibility::simple-validator-upgrade::half-validator-upgrade : 5742 TPS, 6435 ms latency, 7800 ms p99 latency,no expired txns
4. upgrading second batch to new version: 3b016bcbd163f3fd4b26069fe2b36e4176df0bb1
compatibility::simple-validator-upgrade::rest-validator-upgrade : 7799 TPS, 4815 ms latency, 7900 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet ==> 3b016bcbd163f3fd4b26069fe2b36e4176df0bb1 passed
Test Ok
- Grafana dashboard
- Humio Logs
- (Deprecated) OpenSearch Logs
- Test runner output
- Test run is land-blocking
The main blocker for this PR, besides @davidiw's blessing, is a generic way of estimating gas costs for any native function. Will work with @vgao1996 on that and then we can push this through.
But yes, other than that, it's a trivial PR.
@alinush yeah as we discussed offline, I'm currently busy with some urgent hotfixes... Let's try not to land this before launch. We'll get back to it later
@davidiw, this PR is ready to be approved now:
- it is feature-gated
- it has the (reasonable) gas costs, marked with
optional - it bumps up the gas version
...whenever you are ready!
Forge is running suite land_blocking on fa58ea74244849a620d12153f618b9b98f8d6bdb
- Grafana dashboard (auto-refresh)
- Humio Logs
- Test runner output
- Test run is land-blocking
Forge is running suite compat on 2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> fa58ea74244849a620d12153f618b9b98f8d6bdb
- Grafana dashboard (auto-refresh)
- Humio Logs
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite land_blocking success on fa58ea74244849a620d12153f618b9b98f8d6bdb
performance benchmark with full nodes : 6905 TPS, 5748 ms latency, 8100 ms p99 latency,no expired txns
Test Ok
- Grafana dashboard
- Humio Logs
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite compat success on 2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> fa58ea74244849a620d12153f618b9b98f8d6bdb
Compatibility test results for 2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> fa58ea74244849a620d12153f618b9b98f8d6bdb (PR)
1. Check liveness of validators at old version: 2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 7163 TPS, 5413 ms latency, 7200 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: fa58ea74244849a620d12153f618b9b98f8d6bdb
compatibility::simple-validator-upgrade::single-validator-upgrade : 4327 TPS, 9502 ms latency, 13100 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: fa58ea74244849a620d12153f618b9b98f8d6bdb
compatibility::simple-validator-upgrade::half-validator-upgrade : 4710 TPS, 8698 ms latency, 12100 ms p99 latency,no expired txns
4. upgrading second batch to new version: fa58ea74244849a620d12153f618b9b98f8d6bdb
compatibility::simple-validator-upgrade::rest-validator-upgrade : 6541 TPS, 5946 ms latency, 10800 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for 2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> fa58ea74244849a620d12153f618b9b98f8d6bdb passed
Test Ok
- Grafana dashboard
- Humio Logs
- Test runner output
- Test run is land-blocking