Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aptos-vm] enable automatic creation of sponsored accounts #10423

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

davidiw
Copy link
Contributor

@davidiw davidiw commented Oct 6, 2023

This is the implementation of AIP-52:
https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-52.md

This AIP proposes to allow sponsored transactions, one in which the gas payer is not the primary signer of the transaction, to create accounts for the primary signer if it does not exist. Currently when submitting a sponsored transaction an account must first exist. This is an unnecessary friction for using gas fee payer accounts for new accounts. As it means that the gas fee payer solution must first submit an independent transaction to the blockchain.

I also cleaned up the tests for fee payer since there were a lot, and they were excessively complex.

Description

Test Plan

@davidiw davidiw added the CICD:run-e2e-tests when this label is present github actions will run all land-blocking e2e tests from the PR label Oct 6, 2023
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@davidiw davidiw force-pushed the davidiw-sponsored branch from 783e2f2 to 77802e4 Compare October 6, 2023 16:52
@davidiw davidiw requested a review from junkil-park as a code owner October 6, 2023 16:52
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@davidiw davidiw force-pushed the davidiw-sponsored branch from 77802e4 to c6be4eb Compare October 6, 2023 21:48
This is the implementation of AIP-52:
https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-52.md

This AIP proposes to allow sponsored transactions, one in which the gas
payer is not the primary signer of the transaction, to create accounts
for the primary signer if it does not exist. Currently when submitting a
sponsored transaction an account must first exist. This is an
unnecessary friction for using gas fee payer accounts for new accounts.
As it means that the gas fee payer solution must first submit an
independent transaction to the blockchain.

I also cleaned up the tests for fee payer since there were a lot, and they
were excessively complex.
@davidiw davidiw force-pushed the davidiw-sponsored branch from c6be4eb to 3b4ccfd Compare October 6, 2023 21:50
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

✅ Forge suite realistic_env_max_load success on 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9

two traffics test: inner traffic : committed: 8298 txn/s, latency: 4734 ms, (p50: 4500 ms, p90: 5600 ms, p99: 10200 ms), latency samples: 3576780
two traffics test : committed: 100 txn/s, latency: 2312 ms, (p50: 2200 ms, p90: 2700 ms, p99: 3600 ms), latency samples: 1840
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.217, avg: 0.200", "QsPosToProposal: max: 0.156, avg: 0.144", "ConsensusProposalToOrdered: max: 0.586, avg: 0.570", "ConsensusOrderedToCommit: max: 0.543, avg: 0.518", "ConsensusProposalToCommit: max: 1.119, avg: 1.088"]
Max round gap was 1 [limit 4] at version 1854819. Max no progress secs was 4.365247 [limit 10] at version 1854819.
Test Ok

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

✅ Forge suite compat success on aptos-node-v1.6.2 ==> 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9

Compatibility test results for aptos-node-v1.6.2 ==> 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9 (PR)
1. Check liveness of validators at old version: aptos-node-v1.6.2
compatibility::simple-validator-upgrade::liveness-check : committed: 4364 txn/s, latency: 6991 ms, (p50: 7100 ms, p90: 9300 ms, p99: 10300 ms), latency samples: 174580
2. Upgrading first Validator to new version: 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 1781 txn/s, latency: 16301 ms, (p50: 18800 ms, p90: 22300 ms, p99: 22400 ms), latency samples: 92640
3. Upgrading rest of first batch to new version: 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 1309 txn/s, submitted: 1352 txn/s, expired: 43 txn/s, latency: 15578 ms, (p50: 17800 ms, p90: 22200 ms, p99: 22800 ms), latency samples: 85127
4. upgrading second batch to new version: 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 3541 txn/s, latency: 8923 ms, (p50: 9700 ms, p90: 12600 ms, p99: 12700 ms), latency samples: 145220
5. check swarm health
Compatibility test for aptos-node-v1.6.2 ==> 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9 passed
Test Ok

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

✅ Forge suite framework_upgrade success on aptos-node-v1.5.1 ==> 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9

Compatibility test results for aptos-node-v1.5.1 ==> 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9 (PR)
Upgrade the nodes to version: 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 6948 txn/s, latency: 4781 ms, (p50: 4800 ms, p90: 7700 ms, p99: 8100 ms), latency samples: 243180
5. check swarm health
Compatibility test for aptos-node-v1.5.1 ==> 3b4ccfdb38e0f688ca7c686fd053cda6a681d3d9 passed
Test Ok

@davidiw davidiw requested a review from gregnazario October 7, 2023 15:35
}

#[test]
fn test_normal_tx_with_signer_with_fee_payer() {
fn test_account_not_exist_with_fee_payer_create_account() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should do this test in api instead to make sure everything works well e2e

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding, this is comprehensive. But I have another AIP coming, so I'll make a new end to end test for another AIP in this space.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi, tested in the next pr

@davidiw davidiw merged commit 507791c into main Oct 9, 2023
44 of 45 checks passed
@davidiw davidiw deleted the davidiw-sponsored branch October 9, 2023 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CICD:run-e2e-tests when this label is present github actions will run all land-blocking e2e tests from the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants