Skip to content

How to connect to DoubleZero - for testnet Users

By connecting to the DoubleZero testnet I agree to the terms of the Evaluation Agreement set forth here (click to expand)

DoubleZero Testnet Evaluation Agreement

By accessing or using the Solution (defined below), you agree as of the first date of such access (the "Effective Date") that this Evaluation Agreement (the "Agreement") sets forth the terms and conditions under which DoubleZero Foundation ("DZF") will provide you ("User" or "you") access to the Solution on an evaluation basis. In consideration of the mutual promises herein, you agree as follows:

1. DEFINITIONS.

1.1 "Confidential Information" means any and all information disclosed by either party to the other which is designated as confidential, or which should otherwise be understood to be confidential, including but not limited to, the Solution, product plans, business plans, trade secrets, technology, or any other proprietary information.

1.2 "Solution" means the testnet version of the DoubleZero high-performance network infrastructure for web3 projects ("Testnet") and related edge filtering service with integrated bandwidth ("Information Service") the DZ Software (defined below), any and all materials provided by DZF relating to the DZ Software ("Documentation"), and other materials that DZF provides to User hereunder.

2. ACCESS.

2.1 Access to Solution. Subject to the terms and conditions of this Agreement, DZF will provide User access to the Solution through the Internet. User's access is a non-exclusive, non-transferable, limited use of the Solution to enable User to evaluate the Information Service only. With respect to any software comprising the Solution ("DZ Software"), DZF hereby grants User a limited, revocable license, during the Evaluation Period, to copy, download, make a reasonable number of copies of, run, and deploy (as applicable) such DZ Software solely as contemplated by the Documentation.

2.2 Restrictions. User may use the Solution in accordance with this Agreement from the Effective Date until terminated by DZF (the "Evaluation Period"). User understands that any rights to use the Solution beyond the Evaluation Period will be subject to a separate commercial agreement between the parties with respect thereto, including the payment of fees. User shall not, and shall not permit any third party to: (i) modify or create any derivative works based on the Solution or any portion thereof; (ii) reproduce the Solution except as expressly permitted by this Agreement; (iii) sublicense, distribute, sell, lend, rent, lease, transfer, or grant any rights in or to all or any portion of the Solution or provide access to the Solution to third parties, on a service bureau basis or otherwise, except as an offering of the Information Services through or in connection with User's platform or product and not on a standalone basis; or (iv) use the Solution other than as provided herein.

2.3 Ownership. DZF retains all right, title and interest, including intellectual property rights, in and to the Solution.

3 FEEDBACK. DZF may periodically request that User provide, and User agrees to provide to DZF, feedback regarding the use, operation, and functionality of the Solution ("Feedback"). User hereby grants DZF a non-exclusive, worldwide, perpetual, irrevocable, royalty-free, fully paid-up, fully sublicensable and transferable right and license to use and incorporate Feedback into any products and services, to make, use, sell, offer for sale, import, and otherwise exploit such products and services, and to otherwise use, copy, distribute, and otherwise exploit the Feedback without restriction.

4. TERM AND TERMINATION.

4.1 Term. This Agreement will commence as of the Effective Date and will remain in full force and effect for the Evaluation Period. Either party may terminate this Agreement immediately for convenience, for any reason or no reason, upon written notice to the other party (email to suffice).

4.1 Effects of Termination. Upon termination of this Agreement for any reason: (i) the rights granted to User hereunder will immediately terminate; (ii) User shall immediately discontinue any use of the Solution and shall return or destroy all Documentation and any DZ Software under its control; (iii) each party shall promptly return or destroy all Confidential Information and property of the other party; and (iv) Sections 2.2, 2.3, 3, 4.2, and 5 through 8 will survive.

5. CONFIDENTIALITY. Each party agrees that it will use the Confidential Information of the other party solely to perform its obligations and exercise its rights under this Agreement and it will not disclose, or permit to be disclosed, the same, except as otherwise permitted hereunder. However, either party may disclose Confidential Information to its personnel, attorneys, and other representatives who have a need to know and are bound by confidentiality obligations no less protective than those set forth in this Agreement; and as required by law (in which case the receiving party will provide the disclosing party with prior notice thereof and opportunity to contest such disclosure, and will minimize such disclosure to the extent permitted by applicable law). The obligations of confidentiality in this Section 5 shall not apply to information that: (a) is or becomes generally known or publicly available through no fault of the receiving party; (b) was properly known to the receiving party, without restriction, prior to disclosure by the disclosing party; (c) was properly disclosed to the receiving party, without restriction, by another person with the legal authority to do so; or (d) is independently developed by the receiving party without use of or reference to the disclosing party's Confidential Information. Each party agrees to exercise due care in protecting the Confidential Information of the other party from unauthorized use and disclosure. In the event of actual or threatened breach of the provisions of this Section or the licenses contained herein, the non-breaching party will be entitled to seek immediate injunctive and other equitable relief, without waiving any other rights or remedies available to it. User is responsible for maintaining the Solution and the secrecy of any passwords, seed phrases, or codes that provide access to the Solution as the Confidential Information of DZF. Nothing herein limits or restricts DZF's right or ability to use data regarding the performance, availability, usage, integrity and security of the Solution. If either party breaches, or threatens to breach the provisions of this Section 5, each party agrees that the non-breaching party will have no adequate remedy at law and is therefore entitled to immediate injunctive and other equitable relief, without bond and without the necessity of showing actual money damages.

6. WARRANTY DISCLAIMER; LIMITATION OF LIABILITY.

6.1 WARRANTY DISCLAIMER. THE SOLUTION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. DZF MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY OR OTHERWISE WITH RESPECT TO THE SOLUTION AND DOCUMENTATION INCLUDING THEIR CONDITION, CONFORMITY TO ANY REPRESENTATION OR DESCRIPTION, AND DZF SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT.

6.2 LIMITATION OF LIABILITY. EXCEPT FOR A BREACH OF SECTIONS 2.1, 2.2, AND 5, IN NO EVENT SHALL EITHER PARTY BE LIABLE TO THE OTHER FOR INDIRECT, INCIDENTAL, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF PROFITS OR USE OR LOSS OF DATA, INCURRED BY YOU OR ANY THIRD PARTY, ARISING OUT OF OR RELATED TO THIS AGREEMENT WHETHER IN AN ACTION IN CONTRACT, TORT, OR OTHERWISE, EVEN IF THE OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL DZF'S AGGREGATE LIABILITY ARISING OUT OF OR RELATED TO THIS AGREEMENT EXCEED ONE HUNDRED DOLLARS (\$100), WHETHER AN ACTION IN CONTRACT, TORT, OR OTHERWISE. THE FOREGOING LIMITATIONS WILL APPLY NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY HEREIN. THE PARTIES AGREE THAT THE FOREGOING LIMITATIONS REPRESENT A REASONABLE ALLOCATION OF RISK UNDER THIS AGREEMENT.

7. GOVERNING LAW. This Agreement and all matters arising out of or relating to this Agreement shall be governed, interpreted and constructed in accordance with the laws of the Cayman Islands. Should a controversy, dispute or claim arise out of or in relation to this Agreement ("Dispute"), the relevant party as appropriate, must give 30 days' notice of such Dispute to the other parties (the "Notice of Dispute"). Should the Dispute not be resolved at the expiration of 30 days after service of the Notice of Dispute, the relevant party may commence arbitration proceedings as provided herein. Should the Dispute remain at the expiration of 30 days after service of the Notice of Dispute, the Dispute shall be settled by arbitration administered by the Cayman International Mediation & Arbitration Centre (CI-MAC) in accordance with the CI-MAC Arbitration Rules (the "Arbitration Rules") in force as at the date of this Agreement, which Arbitration Rules are deemed to be incorporated by reference to this clause, and governed by the Arbitration Act (as amended). The arbitration shall be seated in George Town, Grand Cayman, Cayman Islands and governed by Cayman Islands law. The language of the arbitration shall be English. The arbitration shall be determined by a sole arbitrator to be appointed in accordance with the Arbitration Rules. Any award or decision made by the arbitrator shall be in writing and shall be final and binding on the parties without any right of appeal, and judgment upon any award thus obtained may be entered in or enforced by any court having jurisdiction thereof. No action at law or in equity based upon any claim arising out of or related to this Agreement shall be instituted in any court of any jurisdiction. If any litigation or arbitration is necessary to enforce the terms of this Agreement, the prevailing party will be entitled to have their attorney fees paid by the other party. Each party waives any right it may have to assert the doctrine of forum non conveniens, to assert that it is not subject to the jurisdiction of such arbitration or courts or to object to venue to the extent any proceeding is brought in accordance herewith.

8. GENERAL PROVISIONS. This Agreement may not be transferred or assigned by User without the prior written consent of DZF. DZF may freely assign this Agreement. All notices required to be sent hereunder shall be sent by email (to DZF: legal@doublezero.xyz) and deemed received the day after sending (with transmission confirmed). If any provision of this Agreement is held to be invalid or unenforceable, the remaining provisions of this Agreement will remain in full force and effect. The waiver by either party of any default or breach of this Agreement shall not constitute a waiver of any other or subsequent default or breach. Neither party shall be liable for any delay or failure in performance due to acts of God, earthquakes, shortages of supplies, transportation difficulties, labor disputes, riots, war, fire, epidemics, and similar occurrences beyond its control, whether or not foreseeable. This Agreement together with any attachments constitutes the complete agreement between the parties and supersedes all prior or contemporaneous agreements or representations, written or oral, concerning the subject matter herein. This Agreement may not be modified or amended except in writing signed by a duly authorized representative of each party.

Prerequisites

Warning

DoubleZero needs to be installed directly on your validator host, not in a container.

  • x86_64 server running Ubuntu or Rocky (doublezero uses minimal system resources and should run with no issue on any modern bare metal machine)
  • Internet connectivity with a public IP address (no NAT)
  • Your host firewall must allow inbound GRE (IP protocol 47) and BGP (TCP port 179).
  • Solana CLI (optional)
  • If you are running Firedancer, you will need to add the following to your config.toml file on version v0.502.20212 or higher. (No additional configuration is required for Agave and Jito.)
    [net]
        provider = "socket"
    

Validator configuration

Steps

1. Set up package repo

DoubleZero is an open source project hosted on GitHub. Releases are built into binaries that are pushed to Cloudsmith.io, which distributes the binaries for both Debian-flavor and RedHat-flavor Linux systems. Add the repository to your system using the appropriate commands below for your operating system:

Ubuntu / Debian:

curl -1sLf \
  https://dl.cloudsmith.io/public/malbeclabs/doublezero/setup.deb.sh \
  | sudo -E bash
Rocky / Redhat:
curl -1sLf \
  https://dl.cloudsmith.io/public/malbeclabs/doublezero/setup.rpm.sh \
  | sudo -E bash

2. Install or upgrade doublezero

Tip

After this step you can perform doublezero read operations, such as doublezero user list.

Now that we have the repo set up, we can install DoubleZero and start the DoubleZero daemon process (doublezerod) using the appropriate commands below for your operating system:

2.1 Ubuntu / Debian

First time install:

sudo apt-get install doublezero=0.1.0-1

Upgrade:

sudo apt upgrade doublezero=0.1.0-1

2.2 Rocky / RHEL

First time install:

sudo yum install doublezero-0.1.0

Upgrade:

sudo yum update doublezero-0.1.0

3. Check the status of doublezerod

After the package is installed, a new systemd unit is installed, activated and started. To see the status:

sudo systemctl status doublezerod

To see the doublezerod logs, look in the journal:

sudo journalctl -u doublezerod

4. Create doublezero config directory

mkdir -p ~/.config/doublezero

5. Verify that doublezero is talking to the correct Solana cluster

doublezero config get

Expected result:

Config File: /home/ubuntu/.config/doublezero/cli/config.yml
RPC URL: https://doublezerolocalnet.rpcpool.com/f50e62d0-06e7-410e-867e-6873e358ed30
WebSocket URL: wss://doublezerolocalnet.rpcpool.com/f50e62d0-06e7-410e-867e-6873e358ed30/whirligig (computed)
Keypair Path: /home/ubuntu/.config/doublezero/id.json
Program ID: DZtnuQ839pSaDMFG5q1ad2V95G82S5EC4RrB3Ndw2Heb

6. Add your Solana id.json to the doublezero config directory and check balance

Copy or link the id.json you want to use with DoubleZero to the doublezero config directory.

sudo cp </path/to/id.json> ~/.config/doublezero/

Check that you've copied or linked the expected pubkey.

doublezero address

For DoubleZero testnet, DoubleZero's smartcontract is deployed in a Solana Permissioned Environment (SPE) hosted on rpcpool.com. In order to interact with the DoubleZero ledger, you need SOL for transaction fees. If you find a zero balance, please see the next step.

doublezero balance

Sample output:

$ doublezero balance
1.9981754 SOL

7. Contact DZF to have your pubkey added to the allowlist

Note

To check if your pubkey is already in the allowlist, use doublezero user allowlist list | grep <your_pubkey>

DoubleZero testnet is currently in a permissioned mode. In order to connect, your pubkey must be present in the allowlist which is managed by the DoubleZero Foundation.

If your pubkey is not in the allowlist, please reach out to the DoubleZero Foundation. Once allowlisted, you will also notice that the doublezero balance is non-zero. If you still see a zero balance please reach out to the DoubleZero Foundation.

8. Check that doublezerod has discovered DZ devices

Before connecting, be sure doublezerod has discovered and pinged each of the available DZ testnet switches:

doublezero latency
Sample output:
$ doublezero latency
 pubkey                                       | name      | ip             | min      | max      | avg      | reachable 
 96AfeBT6UqUmREmPeFZxw6PbLrbfET51NxBFCCsVAnek | la2-dz01  | 207.45.216.134 |   0.38ms |   0.45ms |   0.42ms | true 
 CCTSmqMkxJh3Zpa9gQ8rCzhY7GiTqK7KnSLBYrRriuan | ny5-dz01  | 64.86.249.22   |  68.81ms |  68.87ms |  68.85ms | true 
 BX6DYCzJt3XKRc1Z3N8AMSSqctV6aDdJryFMGThNSxDn | ty2-dz01  | 180.87.154.78  | 112.16ms | 112.25ms | 112.22ms | true 
 55tfaZ1kRGxugv7MAuinXP4rHATcGTbNyEKrNsbuVLx2 | ld4-dz01  | 195.219.120.66 | 138.15ms | 138.21ms | 138.17ms | true 
 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k | ams-dz001 | 195.219.138.50 | 141.84ms | 141.97ms | 141.91ms | true 
 65DqsEiFucoFWPLHnwbVHY1mp3d7MNM2gNjDTgtYZtFQ | frk-dz01  | 195.219.220.58 | 143.52ms | 143.62ms | 143.58ms | true 
 9uhh2D5c14WJjbwgM7BudztdoPZYCjbvqcTPgEKtTMZE | sg1-dz01  | 180.87.102.98  | 176.66ms | 176.76ms | 176.72ms | true
If no devices are returned in the output, wait 10-20 seconds and retry.

9. Connect

This step signs a doublezero smart contract and connects the system to the lowest-latency doublezero node available.

doublezero connect ibrl
You should see output similar to the following:
$ doublezero connect ibrl
DoubleZero Service Provisioning
🔗  Start Provisioning User...
    Get your Public IP: <Your public IP> (If you want to specify a particular address, use the argument --client-ip x.x.x.x)
🔍  Provisioning User for IP: <Your public IP>
    Creating an account for the IP: <Your public IP>
    The Device has been selected: <selected DoubleZero device IP> 
    User activated with dz_ip: <Your public IP>
Provisioning: status: ok
/  Connected                                                                                                           
Congratulations, your DoubleZero connection is up and running! We hope. Let's run a few more commands to make sure everything is working.

10. Verify doublezero tunnel

doublezero status
Expected result:
Tunnel status: up
Name: doublezero0
Tunnel src: <Your public IP>
Tunnel dst: <Doublezero IP>
Doublezero IP: <Your public IP>
Last Session Update: <Timestamp>

ip route show dev doublezero0
You should see a variable number routes marked with "proto bgp", and a single 169.254/31 route.
$ ip route show dev doublezero0
<DZ User X's IP> via 169.254.0.2 proto bgp src <DZ User X's IP>
<DZ User Y's IP> via 169.254.0.2 proto bgp src <DZ User Y's IP>
169.254.0.2/31 proto kernel scope link src 169.254.0.3

For the 169.254/31 route, your actual IP assignments will differ, but all addresses will be assigned from the link local range as defined in RFC3927.