Sia wallet error when unlock or show addresses

Run commands:

./siac wallet unlock

./siac wallet addresses

Error: Could not unlock wallet: error when calling /wallet/unlock: wallet has not been encrypted yet

Cause: Wallet was unlocked before all blockchain had been downloaded. The wallet is in “incomplete” status.

Solution:

  • Let all blockchain downloaded (by running ./siad)
  • Encrypt wallet with your current recovery seed:
    • Run ./siac wallet init-seed
    • Input your current recovery seed
    • Wait for a while (few minutes)
  • Now your Sia Wallet is completed.
  • Decrypt wallet with your current password:
    • Run ./siac wallet unlock
    • Input your current 29-word long password
    • Wait few minutes for scanning clock height, then done.
  • Now you can use ./siac wallet [flag/command] again.

Run ./siad (Sia Daemon) with specific modules

You can tell siad to do less stuff:

$ siad -M [module-name]

Use the -M or –modules flag to only run specific modules. Modules are
independent components of Sia. This flag should only be used by developers or
people who want to reduce overhead from unused modules. Modules are specified by
their first letter. If the -M or –modules flag is not specified the default
modules are run.

Continue reading

Comparison between 3528 LEDs and 5050 LEDs: What are SMD 3528 and SMD 5050 LEDs?

Comparison between 3528 LEDs and 5050 LEDs: What are SMD 3528 and SMD 5050 LEDs?

Here’s an easy-to-understand comparison between LED chip numbers and sizes.

(Hint: the numbers are only the size of the chip!)

New to LEDs? What are LED strip lights and what can they do?

smd-led-comparison-of-5050-2835-3528-3014

Continue reading

Install and run SIA (for SiaCoin – SC) in Ubuntu 16.04

  • Run SIA:
    • $ ./siad
    • While ./siad running, it will take several hours to download all blockchain.
    • You can confirm siad is running by querying its API:
    • You should see something like this:  {“synced”:false,“height”:29731,”currentblock”:”0000045c26825f0d”,”target”:[0,0,0,0,0,1,137,1]}
    • Compare downloaded block height with the real total block height to calculate blockchain downloading progress. Total block height of SiaCoin available at: https://explore.sia.tech/
    • Keep ./siad running until it downloads all blockchain. When the consensus endpoints returns {“synced”: true} the blockchain download is completed.
  • Run SIA in background:
    • $ ./siad & (note: the app will also be closed if ssh terminal is closed)
    • see this to run siad as a service.
  • Configure the host for now do not take any contracts (can do this only while ./siad is running):
    • $ ./siac host config acceptingcontracts false
  • Create SiaCoin Wallet and Wallet Address:
    • While siad is running,
    • Create new wallet:
      • $ ./siac wallet init
      • (Save your recovery seed and wallet encrypted password for later use)
    • Or use an existing wallet:
      • $ ./siac wallet load
    • Unlock wallet:
      • $ ./siac wallet unlock
    • Create a new wallet address
      • $ ./siac wallet address
      • (Save wallet address for later use)
  • Show current Sia Wallet address/balance (need to unlock first):
    • $ ./siac wallet addresses
    • $ ./siac wallet balance

* Note: SIA Client has versions for both Windows and Linux.

Install and run nheqminer-0.5c on Ubuntu Server 16.04

 

  • Declare 4 lines of Path in .profile
    • $ sudo nano .profile
    • Add these:
      • LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/lib64/stubs”
      • PATH=”$PATH:/usr/local/cuda-8.0/”
      • PATH=”$PATH:/usr/local/cuda-8.0/bin”
      • CUDA_CUDART_LIBRARY=”/usr/local/cuda-8.0/lib64/libcudart.so”

 

  • Install nheqminer:
    • $ git clone https://github.com/nicehash/nheqminer.git
    • $ cd nheqminer/cpu_xenoncat/asm_linux/
    • $ sh assemble.sh
    • (if permission denied: $ sudo chmod +x * to set permission)
    • $ mkdir build
    • $ cd build
    • $ cmake -DCUDA_CUDART_LIBRARY=CUDA_CUDART_LIBRARY ../nheqminer
    • $ make -j $(nproc)

 

  • Test nheqminer in benmark mode with CPU:
    • $ cd build (go to app folder if needed)
    • $ ./nheqminer -b

 

  • Run with CPU (example with 8 cores: from 0-7)
    • $ ~/build$ ./nheqminer -l us.zec.slushpool.com:4444 -u user.worker -t 8

 

  • Run with GPU (example with 1 core: from 0):
    • ~/build$ ./nheqminer -l us.zec.slushpool.com:4444 -u user.worker -cd 0

 

Notes:

  • $ before above commands denote start of line, do not keep it ($) when copying commands to terminal windows)
  • Error while running nheqminer: CUDA error ‘an illegal memory access was encountered’ in func ‘solve’ at line xxxx. Possible reason: Old graphic cards don’t support CUDA 8.0
  • Error in installing nheqminer: Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY). Solution: add CUDA_CUDART_LIBRARY in environment as shown above.

 

Install Boost 1.64 in Ubuntu 16.04

– Uninstall the current Boost if exist:

$ sudo apt-get –purge remove libboost-dev

$ sudo apt-get –purge remove libboost-all-dev

$ sudo apt-get –purge autoremove libboost-all-dev

– Install Boost in Ubuntu 16.04 from PPA (only up to Boost version 1.55):

$ sudo add-apt-repository ppa:boost-latest/ppa

$ sudo apt-get update

Now you can install the version you desire, the latest at the time of writing is 1.55 (version from 2014, as seen in 2017/07, no newer version available; see more):

$ sudo apt-get install libboost1.55-all-dev

– Install Boost 1.58 from package in Ubuntu 16.04 (latest version inside emmbeded package is only 1.58, while actual latest version is 1.64 – as of 2017/07):

$ sudo apt-get install libboost-dev

$ sudo apt-get install libboost-all-dev

– Install Boost 1.64 from Boost.org (latest version as of 2017/07):

– Download source file from: http://www.boost.org/users/history/version_1_64_0.html

– Put it in a folder (if) you want to, then run the below commands:

$ tar -xzvf boost_1_64_0.tar.gz
$ cd boost_1_64_0
$ ./bootstrap.sh
$ ./b2

– Verify installed Boost version:

$ dpkg -s libboost-dev | grep Version

or

$ cat /usr/include/boost/version.hpp | grep “BOOST_LIB_VERSION”

If error or not found: Boost is not installed.

 

Install nVidia GPU driver in Ubuntu 16.04

– Install nVidia GPU driver in Ubuntu 16.04:

$ sudo apt-get purge nvidia-*

$ sudo add-apt-repository ppa:graphics-drivers/ppa

(install nVidia drivers from PPA source)

$ sudo apt-get update

$ sudo apt-get install nvidia-375

(version 375 is current long-lived branch release as of 2017/07, check latest version here. If want to use newer versions, change version number, e.g. nvidia-375 –> nvidia-384)

$ sudo reboot

(reboot to activate GPU drive)

– Check nVidia driver version:

$ nvidia-smi

If the driver is correctly installed, the result is as image below:

thanh_nvidia_msi_result_ubuntu_16