aptos-core
aptos-core copied to clipboard
Python SDK Async Client Update
Description
Doc Strings
Updated doc strings to match the documentation in the Aptos API Spec.
New Methods for API Endpoints:
Added new methods for the following endpoints:
- Account:
account_module()account_modules()
- Blocks:
blocks_by_height()blocks_by_version()
- Events:
events_by_creation_number()events_by_event_handle()
- Transactions:
transactions()transactions_by_account()
- View:
view()
Removed Code Duplication
- Added
_getand_postutility methods. - Removed
simulate_bcs_transaction()duplication withinsimulate_transaction().
Gitignore
Added a couple things to the Python SDK .gitignore, namely .idea/ (for IntelliJ developers) and playground.py (a testing script).
Test Plan
There is currently no testing for the AsyncClient in the Python SDK. I would like to implement tests using Pytest in a later PR.
⏱️ 12h 36m total CI duration on this PR
🚨 2 jobs on the last run were significantly faster/slower than expected
| Job | Duration | vs 7d avg | Delta |
|---|---|---|---|
| cli-e2e-tests / run-cli-tests | 7m | 9m | |
| forge-e2e-test / forge | 13m | 19m |
@johnstonematt , lemme know when I should review again. Thanks for your efforts!
@davidiw I ran all the commands you mentioned, all of them passed except make lint which failed with 1 missing-import error in aptos_sdk/secp256k1_ecdsa.py.
I ran the test commands in the main branch as well (un-edited by my PR) and saw the same results - all passed except the missing-import error in the same file.
Let me know if you would like me to copy and paste the results of the commands.
Forge is running suite realistic_env_max_load on 87440061de19f8a651931e4ce1dbecaa9933dfd2
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite realistic_env_max_load success on 87440061de19f8a651931e4ce1dbecaa9933dfd2
two traffics test: inner traffic : committed: 7032 txn/s, latency: 5527 ms, (p50: 5100 ms, p90: 7100 ms, p99: 12300 ms), latency samples: 3038180
two traffics test : committed: 100 txn/s, latency: 2425 ms, (p50: 2200 ms, p90: 2800 ms, p99: 8000 ms), latency samples: 1740
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.210, avg: 0.198", "QsPosToProposal: max: 0.177, avg: 0.161", "ConsensusProposalToOrdered: max: 0.585, avg: 0.562", "ConsensusOrderedToCommit: max: 0.579, avg: 0.531", "ConsensusProposalToCommit: max: 1.136, avg: 1.094"]
Max round gap was 1 [limit 4] at version 1444127. Max no progress secs was 6.789915 [limit 10] at version 1444127.
Test Ok
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Test runner output
- Test run is land-blocking
Forge is running suite framework_upgrade on aptos-node-v1.8.3 ==> 37929de64233558896658d5412221607eb27a944
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Test runner output
- Test run is land-blocking
Forge is running suite realistic_env_max_load on 37929de64233558896658d5412221607eb27a944
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Test runner output
- Test run is land-blocking
Forge is running suite compat on aptos-node-v1.8.3 ==> 37929de64233558896658d5412221607eb27a944
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite realistic_env_max_load success on 37929de64233558896658d5412221607eb27a944
two traffics test: inner traffic : committed: 7355 txn/s, latency: 5281 ms, (p50: 5100 ms, p90: 6500 ms, p99: 11100 ms), latency samples: 3170180
two traffics test : committed: 100 txn/s, latency: 2454 ms, (p50: 2300 ms, p90: 2700 ms, p99: 8600 ms), latency samples: 1840
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.206, avg: 0.197", "QsPosToProposal: max: 0.157, avg: 0.152", "ConsensusProposalToOrdered: max: 0.604, avg: 0.575", "ConsensusOrderedToCommit: max: 0.532, avg: 0.504", "ConsensusProposalToCommit: max: 1.106, avg: 1.079"]
Max round gap was 1 [limit 4] at version 1569483. Max no progress secs was 4.330751 [limit 10] at version 1569483.
Test Ok
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite compat success on aptos-node-v1.8.3 ==> 37929de64233558896658d5412221607eb27a944
Compatibility test results for aptos-node-v1.8.3 ==> 37929de64233558896658d5412221607eb27a944 (PR)
1. Check liveness of validators at old version: aptos-node-v1.8.3
compatibility::simple-validator-upgrade::liveness-check : committed: 3312 txn/s, latency: 6688 ms, (p50: 6000 ms, p90: 9700 ms, p99: 20700 ms), latency samples: 178900
2. Upgrading first Validator to new version: 37929de64233558896658d5412221607eb27a944
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 1829 txn/s, latency: 15782 ms, (p50: 18600 ms, p90: 22300 ms, p99: 22600 ms), latency samples: 93280
3. Upgrading rest of first batch to new version: 37929de64233558896658d5412221607eb27a944
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 1850 txn/s, latency: 15613 ms, (p50: 18400 ms, p90: 21900 ms, p99: 22300 ms), latency samples: 92540
4. upgrading second batch to new version: 37929de64233558896658d5412221607eb27a944
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 3247 txn/s, latency: 9778 ms, (p50: 9900 ms, p90: 18400 ms, p99: 20100 ms), latency samples: 126640
5. check swarm health
Compatibility test for aptos-node-v1.8.3 ==> 37929de64233558896658d5412221607eb27a944 passed
Test Ok
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Test runner output
- Test run is land-blocking
:x: Forge suite framework_upgrade failure on aptos-node-v1.8.3 ==> 37929de64233558896658d5412221607eb27a944
Compatibility test results for aptos-node-v1.8.3 ==> 37929de64233558896658d5412221607eb27a944 (PR)
Upgrade the nodes to version: 37929de64233558896658d5412221607eb27a944
Test Failed: API error: Unknown error error sending request for url (http://aptos-node-3-validator.forge-framework-upgrade-pr-11321.svc:8080/v1/estimate_gas_price): error trying to connect: dns error: failed to lookup address information: Name or service not known
Stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: __libc_start_main
14: <unknown>
Trailing Log Lines:
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: __libc_start_main
14: <unknown>
Swarm logs can be found here: See fgi output for more information.
thread 'main' panicked at testsuite/forge/src/backend/k8s/swarm.rs:676:18:
called `Result::unwrap()` on an `Err` value: ApiError: namespaces "forge-framework-upgrade-pr-11321" not found: NotFound (ErrorResponse { status: "Failure", message: "namespaces \"forge-framework-upgrade-pr-11321\" not found", reason: "NotFound", code: 404 })
Caused by:
namespaces "forge-framework-upgrade-pr-11321" not found: NotFound
Stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: <unknown>
14: <unknown>
15: __libc_start_main
16: <unknown>
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Debugging output:
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Test runner output
- Test run is land-blocking