Skip to main content

Chia proof of space plotting, proving, and verifying (wraps C++)

Project description

# chia-blockchain Please check out the [wiki](https://github.com/Chia-Network/chia-blockchain/wiki) and [FAQ](https://github.com/Chia-Network/chia-blockchain/wiki/FAQ) for information on this project.

Python 3.7 is required. Make sure your default python version is >=3.7 by typing python3.

You will need to enable [UPnP](https://www.homenethowto.com/ports-and-nat/upnp-automatic-port-forward/) on your router or add a NAT (for IPv4 but not IPv6) and firewall rules to allow TCP port 8444 access to your peer. These methods tend to be router make/model specific.

For alpha testnet most should only install harvesters, farmers, plotter and full nodes. Building timelords and VDFs is for sophisticated users in most environments. Chia Network and additional volunteers are running sufficient time lords for testnet consensus.

All data is now stored in $CHIA_ROOT or ~/.chia/VERSION-DIR/ if unset. You can find databases, keys, plots, logs here.

## Step 1: Install the code To install the chia-blockchain node, follow [these install](INSTALL.md) instructions according to your operating system.

Remember that once you complete your install you must be in the Python virtual environment which you access from the chia-blockchain directory with the command . ./activate. Both dots are critical and once executed correctly your cli prompt will look something like (venv) username@machine:~$ with the (venv) prepended. Use deactivate to exit the venv.

## Step 2: Generate keys First, create some keys by running the following script: `bash chia-generate-keys `

## Step 3a: Run a full node + wallet To run a full node on port 8444, and connect to the testnet, run the following command. If you want to see std::out log output, modify the logging.std_out variable in ./config/config.yaml.

`bash chia-start-node & chia-start-wallet-gui & `

## Step 3b: Run a farmer + full node + wallet Instead of running only a full node (as in 4a), you can also run a farmer. Farmers are entities in the network who use their hard drive space to try to create blocks (like Bitcoin’s miners), and earn block rewards. First, you must generate some hard drive plots, which can take a long time depending on the [size of the plots](https://github.com/Chia-Network/chia-blockchain/wiki/k-sizes) (the k variable). Then, run the farmer + full node with the following script. A full node is also started. You can also change the working directory and final directory for plotting, with the “-t” and “-d” arguments to the create_plots script. `bash chia-create-plots -k 20 -n 10 chia-start-farmer & chia-start-wallet-gui & `

## Step 3c: Run a timelord + full node + wallet

Note If you want to run a timelord on Linux, see LINUX_TIMELORD.md.

Timelords execute sequential verifiable delay functions (proofs of time), that get added to blocks to make them valid. This requires fast CPUs and a lot of memory as well as completing both install steps above. `bash chia-start-timelord & chia-start-wallet-gui & `

## Tips When running the servers on Mac OS, allow the application to accept incoming connections.

Ubuntu 19.xx, Amazon Linux 2, and CentOS 7.7 or newer are the easiest linux install environments currently.

UPnP is enabled by default, to open port 8444 for incoming connections. If this causes issues, you can disable it in the configuration. Some routers may require port forwarding, or enabling UPnP in the router configuration.

Due to the nature of proof of space lookups by the harvester in the current alpha you should limit the number of plots on a physical drive to 50 or less. This limit should significantly increase before beta.

You can also run the simulation, which runs all servers and multiple full nodes, locally, at once.

Note the the simulation is local only and requires installation of timelords and VDFs.

The introducer will only know the local ips of the full nodes, so it cannot broadcast the correct ips to external peers.

`bash chia-start-sim `

For increased networking performance, install uvloop: `bash pip install -e ".[uvloop]" `

You can also use the [HTTP RPC](https://github.com/Chia-Network/chia-blockchain/wiki/Networking-and-Serialization#rpc) api to access information and control the full node:

`bash curl -X POST http://localhost:8555/get_blockchain_state curl -d '{"header_hash":"afe223d75d40dd7bd19bf35846d0c9dce608bfc77ee5baa9f9cd6b98436e428b"}' -H "Content-Type: application/json" -X POST http://localhost:8555/get_header `

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chia-blockchain-0.1.tar.gz (759.7 kB view details)

Uploaded Source

File details

Details for the file chia-blockchain-0.1.tar.gz.

File metadata

  • Download URL: chia-blockchain-0.1.tar.gz
  • Upload date:
  • Size: 759.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.5

File hashes

Hashes for chia-blockchain-0.1.tar.gz
Algorithm Hash digest
SHA256 330744a616e22657daa89356ba9bc2edf551beed27cd63c8f949e20b3ae86276
MD5 a19ffee8b0ba9f5691f83e90852ca6b2
BLAKE2b-256 162a8eb51f77bdc8bd1e6348284783118bf1a3466da07c751411b468d2be7e98

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page