Skip to content

Testnet Quickstart

auxten edited this page Mar 16, 2019 · 27 revisions

CovenantSQL Testnet Quickstart

CovenantSQL is a decentralized, crowdsourcing SQL database on blockchain with features:

  1. SQL: most SQL-92 support.
  2. Decentralize: decentralize with our consensus algorithm DH-RPC & Kayak.
  3. Privacy: access with granted permission and Encryption Pass.
  4. Immutable: query history in CovenantSQL is immutable and trackable.

We believe On the next Internet, everyone should have a complete Data Rights

0. Download CovenantSQL Tools

Download latest release on github.

1. Generate config file with cql-utils to connect TestNet

$ cql-utils -tool confgen
Generating key pair...
Enter master key(press Enter for default: ""):
Private key file: ~/.cql/private.key
Public key's hex: 02296ea73240dcd69d2b3f1fb754c8debdf68c62147488abb10165428667ec8cbd
Generated key pair.
Generating nonce...
nonce: {{731613648 0 0 0} 11 001ea9c8381c4e8bb875372df9e02cd74326cbec33ef6f5d4c6829fcbf5012e9}
node id: 001ea9c8381c4e8bb875372df9e02cd74326cbec33ef6f5d4c6829fcbf5012e9
Generated nonce.
Generating config file...
Generated nonce.

After running cql-utils, it will generate a configured file in ~/.cql/ where is the default config path.

2. Generate wallet address from private key

The private key can be found in ~/.cql/.

$ cql-utils -tool addrgen -private ~/.cql/private.key
Enter master key(default: ""):
wallet address: 4jXvNvPHKNPU8Sncz5u5F5WSGcgXmzC1g8RuAXTCJzLsbF9Dsf9

3. Get your PTC on Faucet

Reply to the GitHub Issue with your wallet address, we will distribute PTC for you.

Use cql to check your wallet balance:

$ cql -get-balance
INFO[0000] stable coin balance is: 100                   caller="main.go:246 main.main"
INFO[0000] covenant coin balance is: 0                   caller="main.go:247 main.main"

Here, I got "stable coin balance is: 100".

If you want more PTC for a longer time testing or using, please contact

For business cooperators, we distribute PTC for you.

4. Create a database using CLI

$ cql -create 2
INFO[0000] the newly created database is: "covenantsql://0a10b74439f2376d828c9a70fd538dac4b69e0f4065424feebc0f5dbc8b34872"

Here, covenantsql://... is a database address which is used by SDK and CLI to locate the database on the blockchain.

5. Documents of CLI and SDK

After creating a database, there are some documents and examples to help you build an application with our database.

6. SQLChain Explorer

Currently, the database on TestNet is permissionless. Which means that if you know the DSN (address) of a database, you can retrieve all modification history of the database and blocks information on blockchain through SQLChain Explorer.

For more technique details of testnet, please visit:

TestNet Release Notes

You can’t perform that action at this time.