- Testnet
- Contents
- Differences
- Genesis Block
- External links
- Wallets
- Faucets
- Testnet
- Contents
- Testnet Review [ edit ]
- Testnet vs Testnet2 [ edit ]
- Genesis Block [ edit ]
- Block Size [ edit ]
- Testnet Mining [ edit ]
- Testnet Wallet [ edit ]
- Faucets [ edit ]
- Testnet Block explorers [ edit ]
- Attack on Testnet [ edit ]
- Learning How to Use Bitcoin: A Beginner’s Guide to Using the Bitcoin Testnet
- Intro
- Testnet Coins
- How to Set Up Bitcoin Core for Testnet
- Electrum: What is it, Pros & Cons
- How Bitcoin Trading Works
- The Wallet
- Viewing Transactions
- Summary
Testnet
The testnet is an alternative Bitcoin block chain, to be used for testing. Testnet coins are separate and distinct from actual bitcoins, and are never supposed to have any value. This allows application developers or bitcoin testers to experiment, without having to use real bitcoins or worrying about breaking the main bitcoin chain.
Run bitcoin-qt or bitcoind with the -testnet flag to use the testnet (or put testnet=1 in the bitcoin.conf file).
There have been three generations of testnet. Testnet2 was just the first testnet reset with a different genesis block, because people were starting to trade testnet coins for real money. Testnet3 is the current test network. It was introduced with the 0.7 release, introduced a third genesis block, a new rule to avoid the «difficulty was too high, is now too low, and transactions take too long to verify» problem, and contains blocks with edge-case transactions designed to test implementation compatibility. On the December 21 of 2015 SegNet was deployed, to test the Wuille’s Segregated Witness proposal.
Contents
Differences
- Default Bitcoin network protocol listen port is 18333 (instead of 8333)
- Default RPC connection port is 18332 (instead of 8332)
- Bootstrapping uses different DNS seeds.
- A different value of ADDRESSVERSION field ensures no testnet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)
- The protocol message header bytes are 0x0B110907 (instead of 0xF9BEB4D9)
- Minimum difficulty of 1.0 on testnet is equal to difficulty of 0.5 on mainnet. This means that the mainnet-equivalent of any testnet difficulty is half the testnet difficulty. In addition, if no block has been found in 20 minutes, the difficulty automatically resets back to the minimum for a single block, after which it returns to its previous value.
- A new genesis block
- The IsStandard() check is disabled so that non-standard transactions can be experimented with.
Genesis Block
Testnet uses a different genesis block to the main network. You can find it here. The testnet was reset with a new genesis block for the 0.7 bitcoin release.
Testnet receives less transactions than the main block chain and is typically much smaller in size. As of January 2018 the size of the data on disk was 14GB, containing data for about 6 years worth of testnet activity. Downloading this data required about 12GB of network activity peaking at 2MB/s rate of transfer.
External links
Wallets
Online testnet wallets to help you test your application.
Faucets
Once you’re done with your test coins, it is a nice gesture to send them back to the faucets, so they become available to other developers.
Источник
Testnet
Enjoyed the article? Share:
Testnet is an alternative Bitcoin blockchain, to be used for testing. Testnet coins are separate and distinct from actual bitcoins, and are never supposed to have any value. This allows application developers or bitcoin testers to experiment, without having to use real bitcoins or worrying about breaking the main bitcoin chain.
Run bitcoin or bitcoind with the -testnet flag to use the testnet (or put testnet=1 in the bitcoin.conf file).
Contents
Testnet Review [ edit ]
Test net is a special test chain of transaction blocks. It is used by developers of cryptocurrencies to check the work of the future digital currency. All problems and errors are detected and corrected during the tests.
Testnet allows developers to test the operation of the created digital currency. Moreover, it is suitable for testing any information in the blockchain network system. But in the case of cryptocurrency, this is especially important. Creating any record when testing a currency in a real network can be very expensive, which would have a negative impact on the development and improvement of the blockchain cryptocurrency at the initial stages of development. The advantages of using test chains are as follows:
- The low complexity that allows to use for these tests is relatively weak computers that can not cope with mining in real conditions even forgotten digital currencies;
- No real value, which eliminates the huge financial cost of testing the process of creating chains of blocks of transactions and minimizes the risk of a hacker attack;
- The ability to create any number of coins and records, which will have a positive impact on the speed and quality of testing;
- Test digital currency using scripts, API, CLI, or RPC.
During the tests, the developer will have enough time to identify all possible problems and vulnerabilities. This is very important when creating any cryptocurrency. If the available coins are not enough, then there is always the opportunity to get them through mining through the Central processor of the computer.
There have been three generations of testnet. Testnet2 was just the first testnet reset with a different genesis block, because people were starting to trade testnet coins for real money. Testnet3 is the current test network. It was introduced with the 0.7 release, introduced a third genesis block, a new rule to avoid the «difficulty was too high, is now too low, and transactions take too long to verify» problem, and contains blocks with edge-case transactions designed to test implementation compatibility. On the December 21 of 2015 SegNet was deployed, to test the Wuille’s Segregated Witness proposal [1] .
Testnet vs Testnet2 [ edit ]
- Default Bitcoin network protocol listen port is 18333 (instead of 8333)
- Default RPC connection port is 18332 (instead of 8332)
- Bootstrapping uses different DNS seeds.
- A different value of ADDRESSVERSION field ensures no testnet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)
- The protocol message header bytes are 0x0B110907 (instead of 0xF9BEB4D9)
- Minimum difficulty of 1.0 on testnet is equal to difficulty of 0.5 on mainnet. This means that the mainnet-equivalent of any testnet difficulty is half the testnet difficulty. In addition, if no block has been found in 20 minutes, the difficulty automatically resets back to the minimum for a single block, after which it returns to its previous value [2] .
- A new genesis block
- The IsStandard() check is disabled so that non-standard transactions can be experimented with.
Genesis Block [ edit ]
Testnet uses a different genesis block to the main network. You can find it here or here. The testnet was reset with a new genesis block for the 0.7 bitcoin release.
Block Size [ edit ]
Testnet receives less transactions than the main block chain and is typically much smaller in size. As of June 2016 the size of the data on disk was 7GB, containing data for about 4 years worth of testnet activity. Downloading this data required about 6GB of network activity peaking at 2MB/s rate of transfer [3] .
Testnet Mining [ edit ]
solo.ckpool has a testnet bitcoin solo mining implementation available, without the need to set up bitcoind locally.
Testnet Wallet [ edit ]
Online testnet wallets to help you test your application.
Faucets [ edit ]
Once you’re done with your test coins, it is a nice gesture to send them back to the faucets, so they become available to other developers.
Testnet Block explorers [ edit ]
Attack on Testnet [ edit ]
There is no point in attacking the test network, as it does not contain coins that could be valuable in monetary terms. However, there are cases when such networks fell under spam attacks. This causes difficulties and temporarily deprives developers of the opportunity to test the cryptocurrency. To attack Testnet does not require large capacity, as the entire network is based on weak processors for simple coin mining. As the transaction costs increase, attacks weaken and eventually cease completely.
To arrange attacks on Testnet almost meaningless. The only benefit an attacker can derive is the complication of the tests. This may be relevant for direct competitors who want to gain an advantage and move their currency forward. However, the real benefit of such actions will be small, as it will affect the tested network slightly [4] . The reason for the attack on Testnet can be a banal desire to test their strength on such networks, learn something new or prepare for a more complex hacker attack.
Источник
Learning How to Use Bitcoin: A Beginner’s Guide to Using the Bitcoin Testnet
Intro
Beginners to Bitcoin may find the concepts and the scope of the network overwhelming. The idea of trading real currency for digital currency can sound scary, especially when the beginner is not familiar with how blockchain works or even how to send and receive coins. An ideal situation for learning how to use Bitcoin would not involve trading real money in the process. In this post, I’d like to cover the Bitcoin Testnet: a zero-risk testing network that allows the beginner to trading Bitcoins as if they were on the main network.
The Bitcoin network is divided, so to speak, into three networks:
- The main network (where coins are traded as real currency),
- A test network called the Testnet (where coins with no associated value are traded for testing purposes), and
- A regression testing network (where coins are created instantly and are never traded to others outside the user’s network).
Coins mined in one network stay in that network, thus coins cannot be transferred between networks. It is because of this separation that we are able to use the Testnet as an environment for learning.
Testnet Coins
Both the main Bitcoin network and the Testnet network contain live blockchains and real users trading real, mined coins. Bitcoins on the main network have real value associated with them whereas the Testnet bitcoins do not.
The main difference (as far as the beginner are concerned) between the coins on both networks is whether or not everyone agrees they have value. Testnet coins are given away for free to anyone that wants them. Coins on the main network are traded for goods and services in the same way United States currency is.
Coins for the Testnet are given out for free from what are called “Faucet Websites.” These websites are set up by miners or other users with a surplus of Testnet coins. They send coins to anyone who requests them and kindly asks for their return when the user is finished with them.
Trading coins on the Testnet is exactly the same process as trading them on the main network. The process goes like this: Blocks are mined, coins are generated by the mining, users are sent Bitcoins by other users, the transaction is recorded in the blockchain, blocks of transactions are mined, and the process repeats. Testnet coins are used to generate transactions in the Testnet blockchain and are used both by beginners and developers who are testing new Bitcoin-based programs.
The Bitcoin Testnet implementation does not require a separate installation. Bitcoin wallets that have the ability to connect to the Testnet can be started with a special flag that will direct the software to connect to the Testnet blockchain instead of the main network blockchain.
As with the main network, though, the software will need to download the current blockchain to properly synchronize. Luckily, however, the size of the Testnet blockchain is far less than the main blockchain. As of February 2018 the size of the main blockchain is about 156 Gigabytes whereas the size of the Testnet blockchain is only about 14 Gigabytes.
How to Set Up Bitcoin Core for Testnet
A Bitcoin Core instance can be started with the ‘-testnet’ flag to connect to the Testnet blockchain instead of the main blockchain.
From an Ubuntu machine: download Bitcoin Core and start with the following commands (check bitcoin.org for the latest version):
The bitcoin-qt binary is the GUI version of Bitcoin Core. The last command will open a new window and start syncing with the Testnet blockchain.
Electrum: What is it, Pros & Cons
Unlike Bitcoin Core, Electrum does not need to download and sync to the entire blockchain. The upside to this is it only takes a few minutes to get up and running. The downside is you cannot explicitly trust the blockchain. Although not trusting the blockchain is acceptable in a zero-risk learning environment, the rest of this blog will refer to Bitcoin Core.
Start Electrum with the ‘–testnet’ command to connect to the Testnet blockchain. Below are commands that will install and start Electrum on Ubuntu.
How Bitcoin Trading Works
After the blockchain has been synchronized you can begin trading Bitcoins (BTC).
On the main Bitcoin network, coins can be obtained from either mining, receiving them from another user, or buying them from a BTC exchange.
On the Testnet network, coins can be requested from Faucet websites such as https://testnet.manu.backend.hamburg/faucet.
Faucets require an address to which they send coins. To obtain a receiving address, click on the ‘Receive’ button from the top of the Bitcoin Core screen followed by the ‘Request Payment’ button as seen below.
The Faucet will then send a certain amount of coin (usually around 1 BTC) to the address you provided. When you receive BTC from the Faucet you will see a notification popup and a positive balance on the main Bitcoin Core screen. You will also be able to see the transaction date, time, amount, and ID from the ‘Transactions’ screen.
BTC received will not be available to spend until the transaction has been confirmed in the Blockchain. Depending on the software and the level of trust it has of the blockchain, the funds will be available after one or many successfully mined blocks. From the ‘Overview’ menu you will see ‘Available’ and ‘Pending’ balances. BTC in a pending status is not available to spend.
Sending Bitcoins is the same process but in reverse. A user will provide you with a receiving address when they are expecting to be paid. In Bitcoin Core (or any other Bitcoin Wallet) you type or scan this address into the ‘Pay To’ field.
Receiving addresses are essentially the public key in a Public/Private key pair. The receiver allows you to encrypt the Bitcoins you are sending with their public key. After encryption, the only way to access the coins, and thus spend them, is to decrypt them with the private key.
Since a public key in a Public/Private key pair is, theoretically, open to cracking, and since the Bitcoin implementation is focused on anonymity, Public/Private key pairs are rotated regularly. It is common for a user to provide a new public key each time they expect payment. This behavior is not mandatory, however. Users that request donations and organizations that don’t require anonymity can give out the same public key for multiple transactions.
Since a user is encouraged to give out many public keys for their transactions they are left with many private keys that access the coins. These private keys are stored in what is called the wallet.
The Wallet
The value inside your wallet (your wealth) is locked away inside a complex mathematical formula using your public key. The only key to this lock is essentially the answer to that formula: the private key. Anyone with access to the private key owns the right to spend the Bitcoins associated with it.
By default, the file that contains the private key is not encrypted. This leaves the private key open to attack and theft. Keeping your private key(s) encrypted is a security imperative. Before you receive or spend Bitcoin, encrypt your wallet in Bitcoin Core by clicking on ‘Settings’ and then ‘Encrypt Wallet…’.
Similarly, if you lose your wallet, you lose your private key(s). The wallet, when used with Bitcoin Core, is stored in your home directory under a hidden folder called ‘.bitcoin’ as a file name ‘wallet.dat’. This file should remain protected with encryption and regularly backed up.
Viewing Transactions
Once the transaction has been mined inside a block in the blockchain it will be available to view from a website that tracks the Blockchain. From the ‘Transaction’ screen in Bitcoin Core, you will find the transaction ID. This ID can be copied and pasted into a website such as https://testnet.blockexplorer.com/. See below for an example.
Notice that all information about the transaction is publically available except for the private keys. This information is available for every transaction that has ever occurred in the blockchain to anyone who wants it. Also notice, however, that we did not associate our accounts with names, email address, etc. No identifying information is ever needed to take part in a Bitcoin transaction. The only thing tying a user to their Bitcoins is the private key associated with the public key to which Bitcoins were sent.
Summary
Learning how to use Bitcoin using the Testnet is quick and simple. It is possible, in just a few steps, to learn how to install and encrypt a wallet, receive coins, spend coins, and track transactions all without spending real money.
All of the steps described above also apply to Bitcoin Core when it connects to the main blockchain.
Источник