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

[Faucet] Add integrator's guide #7293

Merged
merged 4 commits into from
Mar 24, 2023
Merged

Conversation

banool
Copy link
Contributor

@banool banool commented Mar 20, 2023

Description

This PR adds a section to the integrator's guide explaining how to integrate with the faucet as a wallet / SDK dev.

Test Plan

Docs.

@banool banool marked this pull request as ready for review March 20, 2023 15:50
@banool banool force-pushed the banool/faucet_integrators_guide branch from 95fefcd to 52d3edb Compare March 20, 2023 15:50
@banool banool enabled auto-merge (squash) March 20, 2023 19:05
@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.


## Integrating with the faucet

This explains how to integrate with the [Aptos Faucet](https://github.com/aptos-labs/aptos-core/tree/main/crates/aptos-faucet). This is targeted at SDK and wallet creators; if you are a developer using either of these tools, access the faucet through the SDK / wallet instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

I find this reference confusing and am not sure yet how to fix it?
"This is targeted at SDK and wallet creators; if you are a developer using either of these tools, access the faucet through the SDK / wallet instead."

We are saying these instructions are for SDK and wallet folks and then if you are using those tools to do something else instead?

What is the instead for? Sorry if I am being dense.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have the same question, @banool. Please clarify if you meant something like "This tutorial explains how SDK and wallet creators can integrate with the Aptos Faucet. If you are a dapp developer, access the faucet through an existing SDK or wallet instead."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No worries, I agree it is a bit confusing. So this guide is intended for people building developer libraries / tools (SDKs / wallets). For example, in the TS SDK we provide functions to let people call the faucet. In this case, the target audience is SDK devs, like us or whoever out there is making SDKs in other languages. For wallets, they usually want to provide a "use faucet" button, so they need to know how to use the faucet (though in that case, they might just use an SDK). So in this case the relevant people are the wallet creators. So the target audience is SDK / wallet devs. Notably this means this guide is not relevant for dapp devs, because they should just invoke the faucet via the wallet / SDK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feel free to make whatever changes you think make this clearer and I can take a look!

Copy link
Contributor

@davidiw davidiw Mar 22, 2023

Choose a reason for hiding this comment

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

Please let's address this before landing. @clay-aptos , @saharct

Copy link
Contributor

Choose a reason for hiding this comment

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

@banool I rewrote that portion. Please review it and let me know if any changes are needed. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks great, thanks a lot!

Copy link
Contributor

@clay-aptos clay-aptos left a comment

Choose a reason for hiding this comment

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

Thanks, Daniel. This LGTM with some small changes I made directly and one question I have as a comment. I am adding David and Greg as I recall David wanting Eng review on docs changes. Thanks again!

@saharct saharct enabled auto-merge (squash) March 22, 2023 19:34
@saharct saharct disabled auto-merge March 22, 2023 19:35
@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

❌ Forge suite compat failure on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> b56359ca1cead3e2b02b9693cf41f746ccc2882f

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> b56359ca1cead3e2b02b9693cf41f746ccc2882f (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 8155 TPS, 4676 ms latency, 6400 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: b56359ca1cead3e2b02b9693cf41f746ccc2882f
Test Failed: Retry due to pod aptos-node-1-validator-0 status PodStatus { conditions: Some([PodCondition { last_probe_time: None, last_transition_time: Some(Time(2023-03-22T19:45:17Z)), message: Some("0/40 nodes are available: 1 node(s) had volume node affinity conflict, 38 Insufficient memory, 39 Insufficient cpu."), reason: Some("Unschedulable"), status: "False", type_: "PodScheduled" }]), container_statuses: None, host_ip: None, init_container_statuses: None, message: None, nominated_node_name: None, phase: Some("Pending"), pod_ip: None, qos_class: Some("Guaranteed"), reason: None, start_time: None }
Trailing Log Lines:
::error::Retry due to pod aptos-node-1-validator-0 status PodStatus { conditions: Some([PodCondition { last_probe_time: None, last_transition_time: Some(Time(2023-03-22T19:45:17Z)), message: Some("0/40 nodes are available: 1 node(s) had volume node affinity conflict, 38 Insufficient memory, 39 Insufficient cpu."), reason: Some("Unschedulable"), status: "False", type_: "PodScheduled" }]), container_statuses: None, host_ip: None, init_container_statuses: None, message: None, nominated_node_name: None, phase: Some("Pending"), pod_ip: None, qos_class: Some("Guaranteed"), reason: None, start_time: None }
test compatibility::simple-validator-upgrade ... FAILED
Error: Retry due to pod aptos-node-1-validator-0 status PodStatus { conditions: Some([PodCondition { last_probe_time: None, last_transition_time: Some(Time(2023-03-22T19:45:17Z)), message: Some("0/40 nodes are available: 1 node(s) had volume node affinity conflict, 38 Insufficient memory, 39 Insufficient cpu."), reason: Some("Unschedulable"), status: "False", type_: "PodScheduled" }]), container_statuses: None, host_ip: None, init_container_statuses: None, message: None, nominated_node_name: None, phase: Some("Pending"), pod_ip: None, qos_class: Some("Guaranteed"), reason: None, start_time: None }
Test Statistics: 
Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> b56359ca1cead3e2b02b9693cf41f746ccc2882f (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 8155 TPS, 4676 ms latency, 6400 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: b56359ca1cead3e2b02b9693cf41f746ccc2882f
Test Failed: Retry due to pod aptos-node-1-validator-0 status PodStatus { conditions: Some([PodCondition { last_probe_time: None, last_transition_time: Some(Time(2023-03-22T19:45:17Z)), message: Some("0/40 nodes are available: 1 node(s) had volume node affinity conflict, 38 Insufficient memory, 39 Insufficient cpu."), reason: Some("Unschedulable"), status: "False", type_: "PodScheduled" }]), container_statuses: None, host_ip: None, init_container_statuses: None, message: None, nominated_node_name: None, phase: Some("Pending"), pod_ip: None, qos_class: Some("Guaranteed"), reason: None, start_time: None }


Swarm logs can be found here: See fgi output for more information.
{"level":"INFO","source":{"package":"aptos_forge","file":"testsuite/forge/src/backend/k8s/cluster_helper.rs:281"},"thread_name":"main","hostname":"forge-compat-pr-7293-1679513882-testnet-2d8b1b57553d869190f61df","timestamp":"2023-03-22T19:50:17.637660Z","message":"Deleting namespace forge-compat-pr-7293: Some(NamespaceStatus { phase: Some(\"Terminating\") })"}
{"level":"INFO","source":{"package":"aptos_forge","file":"testsuite/forge/src/backend/k8s/cluster_helper.rs:389"},"thread_name":"main","hostname":"forge-compat-pr-7293-1679513882-testnet-2d8b1b57553d869190f61df","timestamp":"2023-03-22T19:50:17.637679Z","message":"aptos-node resources for Forge removed in namespace: forge-compat-pr-7293"}

failures:
    compatibility::simple-validator-upgrade

test result: FAILED. 0 passed; 1 failed; 0 filtered out

Failed to run tests:
Tests Failed
Error: Tests Failed
Debugging output:

@github-actions
Copy link
Contributor

✅ Forge suite land_blocking success on b56359ca1cead3e2b02b9693cf41f746ccc2882f

performance benchmark with full nodes : 5742 TPS, 6900 ms latency, 10500 ms p99 latency,no expired txns
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite framework_upgrade success on cb4ba0a57c998c60cbab65af31a64875d2588ca5 ==> b56359ca1cead3e2b02b9693cf41f746ccc2882f

Compatibility test results for cb4ba0a57c998c60cbab65af31a64875d2588ca5 ==> b56359ca1cead3e2b02b9693cf41f746ccc2882f (PR)
Upgrade the nodes to version: b56359ca1cead3e2b02b9693cf41f746ccc2882f
framework_upgrade::framework-upgrade::full-framework-upgrade : 6799 TPS, 5704 ms latency, 8500 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for cb4ba0a57c998c60cbab65af31a64875d2588ca5 ==> b56359ca1cead3e2b02b9693cf41f746ccc2882f passed
Test Ok

@davidiw davidiw merged commit 005e530 into main Mar 24, 2023
@davidiw davidiw deleted the banool/faucet_integrators_guide branch March 24, 2023 04:59
@clay-aptos
Copy link
Contributor

Just noting I am announcing this section and adding it to the *Interact with the Aptos Blockchain index along with other updates in:
#7415

Thanks, @banool !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

how to integrate my new wallet on https://aptoslabs.com/testnet-faucet like martian,pontem,petra... ?
4 participants