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
- 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)
- A Solana account for use with DoubleZero, with a balance of at least 1 SOL - refer to Solana docs
Steps
1. Set up apt 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
curl -1sLf \
https://dl.cloudsmith.io/public/malbeclabs/doublezero/setup.rpm.sh \
| sudo -E bash
2. Install or upgrade doublezero
After this step you can perform doublezero read operations, such as doublezero device 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.0.22-1
Upgrade:
sudo apt upgrade doublezero=0.0.22-1
2.2 Rocky / RHEL
First time install:
sudo yum install doublezero-0.0.22
Upgrade:
sudo yum update doublezero-0.0.22
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. Copy your Solana id.json to the doublezero config directory.
The smart contract program for DoubleZero testnet is installed on Solana devnet. In order to interact with the DoubleZero smart contract your Solana devnet will need >= 0 SOL. In the steps below please ensure you're using a devnet wallet with SOL.
Copy the id.json
associated with your Solana devnet keypair to the doublezero config directory.
sudo cp </path/to/id.json> ~/.config/doublezero/
6. Verify that doublezero is talking to the correct Solana cluster and verify your balance
doublezero config get
Expected result:
Config File: /home/ubuntu/.config/doublezero/cli/config.yml
RPC URL: https://api.devnet.solana.com
WebSocket URL: wss://api.devnet.solana.com
Keypair Path: "/home/ubuntu/.config/doublezero/id.json"
Verify your balance:
doublezero balance
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 get
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.
Check your pubkey:
doublezero address
If your pubkey is not in the allowlist, please reach out to the DoubleZero Foundation.
8. Connect
Note
Replace [MY_CLIENT_IP] with your server's publicly routable IP address which you can obtain using ip address show
This step signs a doublezero smart contract and connects the system to the lowest-latency doublezero node available.
doublezero connect --client-ip [MY_CLIENT_IP]
Congratulations, your DoubleZero connection is up and running! We hope. Let's run a few more commands to make sure everything is working.
9. Verify tunnel interface
Note
In the future, verification will be provided by the doublezero status
CLI command.
ip link show doublezero0
Error result: Device "doublezero0" does not exist
10. Verify routing link address in routing table
ip route show dev doublezero0
169.254.0.12/31 proto kernel scope link src 169.254.0.13
Note that the actual IP assignments will differ, but all addresses should be assigned from the link local range as originally proposed in RFC3927.