get started windows 10 - SkycoinWikis/CXChains GitHub Wiki

CXCHAINS HOME » CX » CXCHAINS » GET STARTED - WINDOWS 10

CX Chains on Windows 10 - Setup

!! Note atm cx chains doesn't work for windows 10, this is just a start of a tutorial up until the first errors.

In this tutorial we will get to run the first cx-chains-tutorial on Windows 10.

Table of Contents

  1. Install cx
  2. Build newcoin
  3. Setup example

1. Install cx

Follow the Chapter Compile From Source to install cx

2. Build newcoin

2.1 open Terminal press WIN + R, type in cmd.exe and hit ENTER.

2.2 Type in or copy & paste the following commands and run them:

go install -gcflags "all=-trimpath=${GOPATH}" -asmflags "all=-trimpath=${GOPATH}" -ldflags "-extldflags $LDFLAGS" -v ./cmd/...

cli addressGen 

2.3 Save the output in the fiber.toml in %CXPATH%

You can open it like this: Press WIN + R, type in %CXPATH%/fiber.toml

Save the following outputs into the given variables of fiber.toml:

address		-> genesis_address_str
public_key	-> blockchain_pubkey_str
secret_key	-> iblockchain_seckey_str

2.4 Save the outputs in Environment Variables\

Press WIN + R, type in C:\Windows\System32\systempropertiesadvanced.exe and hit ENTER

* Make new Environment Variable ```GENESIS_ADDRESS``` with the value of **address**
* Make new Environment Variable ```PUBLIC_KEY```      with the value of **public_key**
* Make new Environment Variable ```SECRET_KEY```      with the value of **secret_key**

close TERMINAL

3. Setup example

3.1 open Terminal press WIN + R, type in cmd.exe and hit ENTER.

3.2 Type in or copy & paste the following commands and run them:

cd %CXPATH%

cx --blockchain --heap-initial 100 --stack-size 100 --secret-key %SECRET_KEY% --public-key %PUBLIC_KEY% ./examples/blockchain/counter-bc.cx

!!!

-> until here it works then it will give an error atm (see Issue #466)

!!!

Saving Output in fiber.toml

because genesis_signature_str wasnt updated in fiber.toml i did it manually -> genesis sig: -> into %CXPATH%\fiber.toml -> genesis_signature_str

Saving Output in Environment Variables

-> genesis sig: -> into %GENESIS_SIGNATURE%

close cmd.exe

TERMINAL 3 - Port testing

open cmd.exe

netstat -aon //shows no port-using of :6000 and :6001

close cmd.exe

TERMINAL 4 - Publisher

open cmd.exe

cd %CXPATH%

cx --publisher --genesis-address %GENESIS_ADDRESS% --genesis-signature %GENESIS_SIGNATURE% --secret-key %SECRET_KEY% --public-key %PUBLIC_KEY%

TERMINAL 5 - Peer

open a 2nd cmd.exe

cd %CXPATH%
cx --peer --genesis-address %GENESIS_ADDRESS% --port 6001 --genesis-signature %GENESIS_SIGNATURE% --public-key %PUBLIC_KEY%

close TERMINAL 4 and TERMINAL 5

⚠️ **GitHub.com Fallback** ⚠️