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

feat: remove everything except staking, add console, upgrade #128

Merged
merged 5 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
console docs
  • Loading branch information
shamsartem committed Feb 18, 2025
commit c381c461d2984c0488a2d2c3c4ff118936d278d5
Binary file added docs/console/balance/assets/amount.webp
Binary file not shown.
Binary file added docs/console/balance/assets/cancel.webp
Binary file not shown.
Binary file added docs/console/balance/assets/cancel_res.webp
Binary file not shown.
Binary file added docs/console/balance/assets/complete_payment.webp
Binary file not shown.
Binary file added docs/console/balance/assets/payment_page.webp
Binary file not shown.
Binary file not shown.
Binary file added docs/console/balance/assets/top_up_button.webp
Binary file not shown.
82 changes: 82 additions & 0 deletions docs/console/balance/balance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Balance top

## Features of Balance Management on the Fluence Platform

After registering through Fluence Console, a new Self-Custodial Wallet is created for each user using Web3Auth. However, in this case, interacting with smart contracts in the Fluence network still requires signing blockchain transactions each time.

To simplify the process of interacting with the Blockchain network through Fluence Console, the Fluence uses [account abstraction](https://web3auth.io/docs/features/account-abstraction) to handle user balances. Hence, topping up your balance is reflected in the [Balance smart contract](https://blockscout.mainnet.fluence.dev/address/0xF0C308C622eeBA94aeEc2E3Fd67F34619f86761B). At the same time, the functionality of the Balance smart contract is extremely limited to ensure maximum security of user funds.

Thus, when replenishing your Balance through Fluence Console, user funds are transferred to a special smart contract, not directly to the address created through Web3Auth.

:::danger
The balance top upped through Fluence Console can only be used to rent resources in the Fluence network. To interact with other protocol mechanics, such as Staking, you need to top up the address created through Web3Auth or any other EOA directly, for example, by using a Bridge from Ethereum to Fluence Mainnet network.
:::

:::info
Fluence Console users cannot top up their Balance by themselves on the Fluence platform (stored in Balance smart contract) from addresses created through Web3Auth or through any other third-party EOA. This restriction is related to AML (Anti-Money Laundering) limitations. Also, Fluence Console users cannot independently withdraw funds from their balance on the Fluence platform. If a refund is needed, please contact the Fluence team.
:::

## Steps to top up Balance on the Fluence Platform

:::info
Participants in the Alpha VM testing program will receive 256 USDC in Free Credits on their balance after registering on the Fluence platform.
:::

Currently, replenishing the Balance through Fluence Console is done using the payment provider CopperX.

:::info
Currently, payment is available in the Ethereum (USDC) and Polygon (USDC.e) networks. Please note that after successful payment through CopperX in one of the available networks, your Balance will be automatically top up in the Balance smart contract in the Fluence Mainnet network.
:::

To top up your balance, follow these steps:

### 1. Click the Top Up button

Go to the **Billing page** and click the **“Top Up”** button.

:::info
Please note that at the moment, a user cannot have multiple pending Balance top-up operations. If a user, for any reason, cannot complete the payment, they must [cancel](#cancel-payment) the Balance top-up operation via CopperX.

You can check for pending payment sessions on the **Billing page**, in the **Payments History** section. Pending payment sessions have the status `Pending`.
:::
![top up button](./assets/top_up_button.webp)

### 2. Enter the amount you want to top up your Balance with

:::info
Currently, the **minimum** top up amount is **10 USDC**. At the same time, your balance on the Fluence platform cannot exceed **5000 USDC**.
:::
![enter amount](./assets/amount.webp)

### 3. Enter your details

You will then be redirected to the CopperX payment page, where you will need to enter your details.

![copperx payment page](./assets/payment_page.webp)

#### Cancel payment
:::info
To cancel a payment, use the corresponding option in the CopperX interface. If the payment is not completed within 15 minutes, the payment session will automatically end.
:::
![cancel payment](./assets/cancel.webp)
![cancel result](./assets/cancel_res.webp)

:::info
If you accidentally close the CopperX payment page, you can always return to the Fluence Console interface and go back to the payment page.
:::
![return to payment page](./assets/return_to_payment.webp)

### 4. Choose one of the payment methods and complete the payment

:::info
If you encounter issues with the “Wallet” payment option, we recommend using the “Scan QR code” option.
:::
![complete payment](./assets/complete_payment.webp)

### 5. Back to Fluence Console

After a successful payment you will be redirected back to the **Fluence Console** page. The payment will be in the Pending status for some time, as the system will need time to top up your Balance in the Fluence Mainnet network.

### 6. Wait for "Completed" payment status

Once the payment status changes to `Completed` your funds will be credited to your Fluence platform Balance.
Binary file not shown.
Binary file added docs/console/manage_vm/assets/vm_info.webp
Binary file not shown.
Binary file added docs/console/manage_vm/assets/vm_manage.webp
Binary file not shown.
32 changes: 32 additions & 0 deletions docs/console/manage_vm/manage_vm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# CPU VM Info and Management

After renting a VM, the user can view all the relevant information about the rented resources on the Running Instances page, as well as manage the rented VM.

## VM Information

After renting a VM, a corresponding card will appear on the **Running Instances** page, which can be expanded to view all the parameters of the rented VM. Please note that the user can now see **more detailed information** about the server hardware in the `Hardware Specs` section, as a specific server has already been allocated at this stage.

:::info
The user will be able to see extended server parameters only if the specific infrastructure provider has provided the necessary information when registering in the Fluence protocol. Since Fluence currently whitelists providers, in most cases, providers provide all the necessary information.
:::

![VM information](./assets/vm_info.webp)

The user can also see the maximum rental period for the VM (`Expires in`) and information about the next billing time (`Next billing time`), which occurs daily at **5:55 PM UTC**.

## VM Management

Currently, the only operation available for a running VM is `Delete`, which terminates the VM and the rental agreement. The ability to Reboot, Reset, and Rebuild will be added soon.

![VM management](./assets/vm_manage.webp)


## Billing History

After renting a VM, the user can view the history of charges on the **Billing page** in the **Billing History** section.

:::info
Please note that if your Balance on the Fluence platform does not have enough funds to pay for the next day of VM rental, the funds reserved when creating the VM will be used for payment. After the reserved funds are exhausted, in the next Billing cycle (the next day), the user's rent will be terminated, and the VM will be automatically deleted.
:::

![Billing history](./assets/billing_history.webp)
13 changes: 11 additions & 2 deletions docs/console/overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Overview

You can find Fluence Console documentation [here](https://fluencenetwork.notion.site/Fluence-Console-documentation-V0-1-1935b9b0bcba80e993cbe411eeeee1c9
)
**Fluence Console** is one of the main ways to rent resources from the decentralized Fluence compute marketplace. It is a web-based application that allows you control the complete lifecycle of your resources and services and mange your payments and billing in one central locations.

## Fluence Console Access

:::info
Currently, Fluence Console is available only as part of the closed Alpha VM testing program.
:::

The Fluence Console web app is available via the following URL:

[https://alpha.fluence.dev/](https://alpha.fluence.dev/)
Binary file not shown.
26 changes: 26 additions & 0 deletions docs/console/registration/registration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Registration

## Self-Custodial Wallet

Since smart contracts are used to manage and rent resources from the Fluence network, any user interacting with the Fluence network needs to use a Web3 Blockchain wallet. However, managing a regular EOA (Externally Owned Account) address comes with certain risks and inconveniences.

To address this, our system uses a unique Self-Custodial Wallet based on a [solution from Web3Auth](https://web3auth.io/docs/how-web3auth-works), which operates on the [MPC](https://web3auth.io/docs/features/mpc) (Multi-Party Computation) protocol, instead of a standard EOA address. Thus, after a user registers through **Fluence Console**, a unique address is generated for them, and only the user has access to the private key. The private key is securely stored in parts within the distributed Web3Auth network and is protected by the MPC protocol. In turn, the Fluence protocol only has access to the user’s public address.

## Registration Process

:::warning
Please note that during registration, you must use the email address you provided in your Alpha VM testing program application.
:::

If you are using the Fluence Console for the first time, you need to register using one of the following methods:
1. Email Passwordless
1. via Google account
1. via GitHub account

:::warning
If you register with the same email through Google and Email Passwordless, two different accounts will be created for you.
:::

![registration page](./assets/registration.webp)

After successful registration, participants in the Alpha VM testing program will gain access to the full functionality of Fluence Console.
Binary file not shown.
Binary file added docs/console/settings/assets/api_keys.webp
Binary file not shown.
Binary file added docs/console/settings/assets/ssh_keys.webp
Binary file not shown.
33 changes: 33 additions & 0 deletions docs/console/settings/settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Fluence Console Settings

On the **Settings** page, users can manage additional features of the Fluence platform.

## SSH Keys

On **SSH keys** page, users have access to the following functionality:
1. Creating a new SSH key. Currently, the following SSH key formats are supported: RSA, ECDSA, and ED25519.
1. Deleting SSH keys.

![SSH keys page](./assets/ssh_keys.webp)

## API Keys

Users of the Fluence platform have the ability to manage their infrastructure without using **Fluence Console** through the **Public API**.

:::info
In the first stage of the **Alpha VM testing**, users will not have access to the **Public API** functionality. The Fluence team will separately notify and provide the relevant documentation when this functionality becomes available.
:::

On the API Keys page, users can:
1. Create a new API key. Currently, it is possible to specify `Permissions` and `Expiration time` separately.
1. Delete an API key.

![API keys page](./assets/api_keys.webp)

## Advanced Settings

For each user, a separate **self-custodial wallet** is created through Web3Auth when registering through Fluence Console. However, the user’s Balances on the Fluence platform are not stored on the created addresses but in a separate **Balance smart contract** in Fluence mainnet network. On the **Advanced Settings** page, users can get information about:
1. The **public address** of the wallet created through Web3Auth.
1. The **address of the Balance smart contract** in the Fluence Mainnet network.

![Advanced settings page](./assets/advanced_settings.webp)
Binary file added docs/console/vm_rent/assets/configuration.webp
Binary file not shown.
Binary file added docs/console/vm_rent/assets/location.webp
Binary file not shown.
Binary file added docs/console/vm_rent/assets/os_image.webp
Binary file not shown.
Binary file added docs/console/vm_rent/assets/ports.webp
Binary file not shown.
Binary file added docs/console/vm_rent/assets/public_ip.webp
Binary file not shown.
Binary file added docs/console/vm_rent/assets/server_type.webp
Binary file not shown.
Binary file added docs/console/vm_rent/assets/ssh.webp
Binary file not shown.
Binary file added docs/console/vm_rent/assets/storage.webp
Binary file not shown.
Binary file added docs/console/vm_rent/assets/summary.webp
Binary file not shown.
Binary file added docs/console/vm_rent/assets/vm_name.webp
Binary file not shown.
108 changes: 108 additions & 0 deletions docs/console/vm_rent/vm_rent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# CPU VM Renting

Currently, on the Fluence platform, it is possible to rent resources in the form of CPU VMs with various configurations. It is important to note that the rental process involves smart contracts in the Fluence network, which regulate the relationship between the user and the compute resource provider for launching and properly functioning the VM.

Currently, due to the specifics of the Fluence protocol, there are several important limitation for rented VMs:

1. **VMs can only be rented for a limited period**. Since the Fluence protocol uses the **Capacity Commitment (CC)** and **Staking** mechanics to verify the provider’s infrastructure, the rental period for a specific server is limited by the duration of the Capacity Commitment created for it. After the Capacity Commitment ends, the Fluence protocol stops verifying the provider’s infrastructure, meaning there is no guarantee of the server’s availability.
:::info
When renting a server through Fluence Console, users can explicitly see the maximum rental duration for a CPU VM.
:::

1. When renting a VM, an additional amount equal to one day’s rent is deducted from the user’s balance. This amount is held as a 'prepayment' for the next day’s rental. It is refunded to your Fluence Balance once the rental period ends — unless your balance runs out and the prepaid amount is used to cover the VM costs.
:::info
Users can always check the amount of Balance reserved as a “prepayment” on the Billing page.
:::

## Steps to Configure a Rented VM

The Fluence protocol provides users of the Fluence platform with access to a variety of commercial-grade server hardware from reliable Tier-1 to Tier-4 data centers around the world. To rent a VM, follow these steps:

### 1. Choose location

Choose one of the available Locations for renting a VM.

![choose location](./assets/location.webp)

### 2. Choose configuration

Choose a Basic configuration. Currently, Fluence provides a fixed set of CPU and RAM configurations for VMs that users can rent.

:::info
Currently, compute resources can only be rented in multiples of a compute unit, which is 2 vCPUs and 4 GB. In the future, this limitation will be removed and compute resources can be added in a fine-grained manner for both vCPUs and RAM.
:::

![choose configuration](./assets/configuration.webp)

### 3. Choose storage

Choose the type of Storage and its amount. Currently, the minimum Storage size for a VM is 25 GB. When renting a VM, DAS Storage is allocated, physically located on the same server as the CPU and RAM resources. This ensures higher Storage performance compared to NAS but limits the ability to expand it.

![choose storage](./assets/storage.webp)

### 4. Choose server type

Specify the Server type for the VM. Since the hardware in the Fluence protocol can vary , the user needs to pay attention to the provided information as the price of resources may vary depending on the quality of the hardware. Users also need to utilized the Data Center information provided. In Fluence Console, users are provided with a Data Center's geo info at the city level, available certifications and more.

![choose server type](./assets/server_type.webp)

:::info
The choice of **Server type** also affects the rental duration of the VM. Pay attention to the `Expires in` parameter in the **Review** block. If the user is not satisfied with the rental period, they can try selecting a different Server type. Currently, the maximum available rental period is set by default for each Server type.
:::

### 5. Rent Public IPv4 address

Currently, users can only access their VMs via SSH over the public IPv4 allocated to the VM. In the future, the requirement for a Public IPv4 to access a VM will be removed.

![rent public IPv4 address](./assets/public_ip.webp)

After selecting all the resource parameters for the VM, the user can proceed to the settings related to the workload that will be launched inside the VM.

### 6. Specify VM name

Specify a **name for the VM**. Currently, the VM name must be unique within a specific user account.

![specify VM name](./assets/vm_name.webp)

### 7. Specify the ports

Specify the **ports that need to be opened** for the VM. By default, all ports except **port 22** are closed. Therefore, before renting a VM, the user needs to select which ports need to be opened. Currently, all open ports support **TCP** and **UDP** protocols. The user can open **up to 50 ports**.

:::danger
Currently, it is not possible to change the set of open ports through **Fluence Console** after renting a VM. After renting a VM, users will be able to configure their own Firewall and **close** the necessary ports. However, users will not be able to **open** ports that were closed during the VM renting process.
:::

![specify ports](./assets/ports.webp)

### 8. Choose the OS image

Choose the **OS image** for launching the VM. Users can either choose a pre-defined OS image or provide a link to their **custom OS image**. It is important to note the following limitations on custom OS images:

- The Custom OS image must be available for download via a publicly accessible link.
- The Custom OS image must be intended for running on the remote instance(s). The Fluence team recommends choosing images with the `Generic Cloud` or `Cloud` tags.

![choose OS image](./assets/os_image.webp)

### 9. Provide the public SSH key

Provide the public SSH key for connecting to the VM, which is currently only possible via SSH using the public IPv4 address allocated to your VM. Thus, you need to specify at least one SSH key in one of the following formats: RSA, ECDSA, or ED25519.

![provide SSH key](./assets/ssh.webp)

### 10. Review the summary

After selecting all the VM parameters, the user can see a quick summary in the Review section, including the final rental price of the VM.

![review summary](./assets/summary.webp)

### 11. Click the Launch button

Click the “Launch” button to rent the VM. After that, you will be redirected to the Running Instances page to manage the launched VM.

:::info
Currently an additional amount equal to the cost of one day’s rent is deducted from the user’s Balance, which is reserved as a “prepayment” until the rental is canceled. Immediately after canceling the VM rental, this amount will be returned to the user’s Balance provided that the "prepayment" amount was not used to pay for the VM after the entire Balance on the Fluence platform was exhausted. The reserved amount is displayed on the **Billing page** under the name `Reserved for running workload`.
:::

:::warning
Please note **payment for rented VMs occurs at the same time every day at** `5:55 PM UTC`. Also, payment is currently only possible for full days, regardless of the rental start time. Thus, if a user rents a VM at `5:45 PM UTC`, they will pay for a **FULL** day of rent and 10 minutes later, at `5:55 PM UTC`, they will pay for another **FULL** day. This limitation is also expected to be remedied in the near future.
:::
14 changes: 4 additions & 10 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,11 @@ const config: Config = {
docId: "stake/overview",
label: "Stake",
},
// {
// type: "doc",
// position: "left",
// docId: "console/overview",
// label: "Console",
// },
{
href: "https://fluencenetwork.notion.site/Fluence-Console-documentation-V0-1-1935b9b0bcba80e993cbe411eeeee1c9",
label: "Console",
type: "doc",
position: "left",
docId: "console/overview",
label: "Console",
},
{
href: "https://github.com/fluencelabs",
Expand All @@ -95,8 +90,7 @@ const config: Config = {
},
{
label: "Console",
// to: "/docs/console/overview",
to: "https://fluencenetwork.notion.site/Fluence-Console-documentation-V0-1-1935b9b0bcba80e993cbe411eeeee1c9",
to: "/docs/console/overview",
},
],
},
Expand Down
9 changes: 8 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ const sidebars = {
"stake/nft_guide/nft_guide",
"stake/staking_app_guide/staking_app_guide",
],
console: ["console/overview"],
console: [
"console/overview",
"console/registration/registration",
"console/balance/balance",
"console/vm_rent/vm_rent",
"console/manage_vm/manage_vm",
"console/settings/settings",
],
};

module.exports = sidebars;