Skip to main content

Filecoin Calibnet Faucet

Background

A Filecoin faucet is a service that allows users to request tFil tokens or Datacap (usually small amounts) to cover transaction fees or test Filecoin storage functionalities. the first link is managed by the infra-team.

🔗 Faucet Service URL: https://faucet.calibnet.chainsafe-fil.io/

the forest team is managing a stateless faucet that is available in the following link :

🔗 forest Faucet Service URL: https://forest-explorer.chainsafe.dev/faucet/


Architecture Diagram

Coming soon!


Service Configuration

🛠️ Initial Setup

Once the Faucet service is deployed, follow these steps to set up Rootkeys, the tFil wallet, and Notary.

Note: The faucet tFil wallet is also Notary.

  1. SSH into the Faucet Machine

    ssh <find the IP in the filecoin-execution hosts.ini> 
  2. Access the Lotus Full Node Container

    docker exec -it lotus-calibnet-fullnode bash
  3. Retrieve & Import Wallets
    Get the 3 private keys (2 rootkeys and 1 tFil wallet) from 1Password's Filecoin Infra vault and import them:

    echo "private-key" | lotus wallet import 
  4. Verify Wallet Imports

    lotus wallet list -i
  5. Confirm Notary Wallet by ID

    lotus filplus list-notaries
  6. Set Faucet Default Wallet

    lotus wallet set-default <wallet public address>
  7. Test the Faucet
    Test sending tFil and granting Datacap using:
    https://faucet.calibnet.chainsafe-fil.io/


Basic Tasks

💸 Send tFil Manually

Note: For requests around 100 tFil, use the faucet website. For larger requests, follow the steps below.

  1. SSH into the Faucet Machine

    ssh <find the IP in the filecoin-execution hosts.ini> 
  2. Access the Lotus Full Node Container

    docker exec -it lotus-calibnet-fullnode bash
  3. Verify the Address Type

    • If the address starts with t or f, skip this step.
    • If it starts with 0x..., convert to Filecoin address:
    lotus evm stat 0x...
  4. Send tFil

    lotus send <tfil address> <amount>
  5. Verify Transaction
    Check the transaction on https://calibration.filscan.io/en/


📦 Allocate Datacap Manually

Note: For requests around 1MB (1048576 bytes), use the faucet website. For larger requests, follow these steps.

  1. SSH into the Faucet Machine

    ssh <find the IP in the filecoin-execution hosts.ini> 
  2. Access the Lotus Full Node Container

    docker exec -it lotus-calibnet-fullnode bash
  3. Verify the Address Type

    • If the address starts with t or f, skip this step.
    • If it starts with 0x..., convert to Filecoin address:
    lotus evm stat 0x...
  4. Grant Datacap

    Tip: Use Google to convert the requested amount (e.g., 500MB, 1GB) to bytes.

    lotus filplus grant-datacap --from=t1lo4ajjyeygqn3lkrw6izwz6aft5chshngs6gjxa <client-address> <bytes>
  5. Verify Transaction
    Check the transaction on https://calibration.filscan.io/en/


Set a Wallet as a Notary (Verifier)

  1. SSH into the Faucet Machine

    ssh <find the IP in the filecoin-execution hosts.ini> 
  2. Access the Lotus Full Node Container

    docker exec -it lotus-calibnet-fullnode bash
  3. Verify the Address Type

    • If the requestor's address starts with t or f, skip this step.
    • If it starts with 0x..., convert to Filecoin address:
    lotus evm stat 0x...
  4. Inspect Rootkeys
    To set a wallet as a Notary, you should have access to the rootkeys of the network to sign the tx, thus, list the ootkeys first

    lotus msig inspect f080

    Example Output of Calibnet with three rootkey addresses:

        Balance: 0 FIL
    Spendable: 0 FIL
    Threshold: 2 / 3
    Signers:
    ID Address
    t0103 t1zo7ub42i3s5cutljzjuqwnltt4xxm4y4f7l5s2i
    t018895 t1kjtsktbyx7ibja7vdhpvhdqcxafypw5rysunvei
    t018896 t1mtifw6hommgpjtyout7jfpl4m76w2yann7efk5a
    Transactions: 1
    ID State Approvals To Value Method Params
  5. Verify Lotus Node Access to Rootkeys
    list the wallets of the node with ID to confirm Lotus node have access to at least two rootkeys

    lotus wallet list -i

    Expected Output:

    Address                                    ID       Balance                        Nonce   Default
    t1kjtsktbyx7ibja7vdhpvhdqcxafypw5rysunvei t018895 119.999991861219966095 FIL 6
    t1zo7ub42i3s5cutljzjuqwnltt4xxm4y4f7l5s2i t0103 199.999973992003142871 FIL 20

    It is confirmed Lotus node has access to two rootkey wallets of for t0103 and t018895for Calibnet

  6. Sign a tx with on rootkey to propose user's wallet as rootkey

    lotus-shed verifreg add-verifier <rootkey1> <user's wallet> <allocated datacap in bytes>

    E.g: Proposing a Notray with 5TB Datacap:

    lotus-shed verifreg add-verifier t1zo7ub42i3s5cutljzjuqwnltt4xxm4y4f7l5s2i t2s4w6ls2x4uqivh7pdcd3hgzl4dv5ux7oqxjd74i 5000000000000
  7. Approve the Transaction with the Second Rootkey

    lotus msig inspect f080

    E.g.

    Transactions:  1
    ID State Approvals To Value Method Params
    12 pending 1 t06 0 2 825502972de5cb57e5208a9fef1887b39b2be0ebda5fee4700048c27395000

  8. Sign the tx

    lotus msig approve --from=<rootkey 2> <multisigAddress> <messageId> [rootkey 1 ID] [t06] [value] [methodId] [methodParams]

    E.g.

    lotus msig approve --from=t1kjtsktbyx7ibja7vdhpvhdqcxafypw5rysunvei f080 12 t0103 t06 0 2 825502972de5cb57e5208a9fef1887b39b2be0ebda5fee4700048c27395000

    You should see a success

  9. Confirm the New Notary

    lotus filplus list-notaries

🔗 References