Feedback on starting a forging node

Hello there,

I wished to start my own node of uns.network so I followed the documentation and I encountered some obstacles. So, I’m here to share my experience.

Create @unikname

I already have an @unikname so I skipped this part. But for information : my @unikname is an individual one.

Installing uns

My server is a Debian 9.11 (stretch) on OVH servers. There is not much app installed : apache2 and docker. So it’s like a fresh server, perfect to test installation of a node !

I downloaded the uns with the command :

cd /opt/
mkdir uns
cd uns
wget https://unikname-cli-assets.s3.fr-par.scw.cloud/uns-linux-x64.tar.gz
tar xvf uns-linux-x64.tar.gz 
cd uns/bin
./uns

The installation seems to be perfect :

UNS.network CLI

VERSION
  @uns/cli/3.2.0 linux-x64 node-v12.16.1

USAGE
  $ uns [COMMAND]

COMMANDS
  autocomplete   display autocomplete installation instructions
  cryptoaccount  Manage Crypto Account (`uns cryptoaccount` to display Crypto
                 Account commands)
  delegate       Manage UNS delegates (`uns delegate` to display Delegate
                 commands)
  help           display help for uns
  properties     Manage UNIK properties (`uns properties` to display UNIK
                 properties commands)
  resolve        Resolve a decentralized identifier.
  send           Send owned UNS protocol tokens to another wallet.
  status         Display blockchain status
  unik           Manage UNIK (`uns unik` to display UNIK commands)
  update         update the uns CLI
  version        UNS CLI Version

Registering as a delegate

Now, it’s time to register. I use this command :

$> ./uns unik:disclose "@atouk" -e "atouk"
./uns : ligne 45 : 30265 Instruction non permise "$NODE" "$DIR/run" "$@"

It seems that the uns.cli uses NodeJS, so I installed it with

$> apt-get update && apt-get install curl
$> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$> apt-get install -y nodejs

But it was not the problem. Node seems to be embed with uns.cli. So I used the command at the line 45 :

?> /opt/uns/uns/bin/node /opt/uns/uns/bin/run unik:disclose @atouk -e atouk
[1]    3288 illegal hardware instruction  /opt/uns/uns/bin/node /opt/uns/uns/bin/run unik:disclose @atouk -e atouk

I downloaded 64-bits tarball because of of my CPU architecture, but it seems that something goes wrong anyway.

I’ll update this thread if i find the solution.
See you later.

Hi @Atouk

Thank you for this nice issue report, there are many information to try to diagnose.

We will try to understand this error.

Can you try other CLI commands, and write here the results?

  • $ /opt/uns/uns/bin/uns status
  • $ uns unik:read @organization:unikname
  • uname -a (we should strip the VPS name on the left output)

We will see if it’s specify to writing commands (commands above are just reading data).

?> /opt/uns/uns/bin/uns status
/opt/uns/uns/bin/uns : ligne 45 :  4944 Instruction non permise "$NODE" "$DIR/run" "$@"
?> /opt/uns/uns/bin/uns unik:read @organization:unikname
/opt/uns/uns/bin/uns : ligne 45 :  4944 Instruction non permise "$NODE" "$DIR/run" "$@"
?> uname -a
Linux ilirea 4.19-ovh-xxxx-std-ipv6-64 #901949 SMP Thu Sep 19 08:31:48 UTC 2019 x86_64 GNU/Linux

It seems to be an environment issue.

What is your current shell? echo "$SHELL"

My shell is Zsh, but I tried with Bash and Sh, with the same output. Same problem with sudo.

Querying to be a delegate does not have to be on the server ? If so, I can do it on my local (if it works) then boot a node with the docker image.

Few more tests to understand the context:

  • node -e 'console.log("Hello World!")'
  • node -v
  • /opt/uns/uns/bin/node -e 'console.log("Hello World!")'
  • /opt/uns/uns/bin/node -v

No problem with node.

[/opt/uns/uns/bin]$ node -e 'console.log("Hello World!")'                      
Hello World!
[/opt/uns/uns/bin]$ node -v                                                    
v14.4.0
[/opt/uns/uns/bin]$ /opt/uns/uns/bin/node -e 'console.log("Hello World!")'     
Hello World!
[/opt/uns/uns/bin]$ /opt/uns/uns/bin/node -v                                   
v12.16.1

Using

/opt/uns/uns/bin/run unik:disclose @atouk -e atouk 

and not calling with node leads me to

Enter your crypto account passphrase (12 words phrase):

I think there is a problem with node configuration or version.

Yes, let’s try to debug this!

$ DEBUG=* /opt/uns/uns/bin/uns status

:warning: when copying-pasting the output, you should replace your username in echoed paths.

Here is the output

UNS_BINPATH=/opt/uns/uns/bin/uns /opt/uns/uns/bin/node /opt/uns/uns/bin/run status
  @oclif/config reading core plugin /opt/uns/uns +0ms
  @oclif/config loadJSON /opt/uns/uns/package.json +0ms
  @oclif/config loadJSON /opt/uns/uns/oclif.manifest.json +13ms
  @oclif/config:@uns/cli using manifest from /opt/uns/uns/oclif.manifest.json +0ms
  @oclif/config reading user plugins pjson /home/foobar/.local/share/@uns/cli/package.json +0ms
  @oclif/config loadJSON /home/foobar/.local/share/@uns/cli/package.json +13ms
  @oclif/config loading plugins [
  '@oclif/plugin-help',
  '@oclif/plugin-warn-if-update-available',
  '@oclif/plugin-not-found',
  '@oclif/plugin-autocomplete',
  '@oclif/plugin-update'
] +2ms
  @oclif/config reading core plugin /opt/uns/uns/node_modules/@oclif/plugin-help +0ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-help/package.json +17ms
  @oclif/config reading core plugin /opt/uns/uns/node_modules/@oclif/plugin-warn-if-update-available +0ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-warn-if-update-available/package.json +2ms
  @oclif/config reading core plugin /opt/uns/uns/node_modules/@oclif/plugin-not-found +0ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-not-found/package.json +1ms
  @oclif/config reading core plugin /opt/uns/uns/node_modules/@oclif/plugin-autocomplete +0ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-autocomplete/package.json +1ms
  @oclif/config reading core plugin /opt/uns/uns/node_modules/@oclif/plugin-update +0ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-update/package.json +2ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-help/oclif.manifest.json +5ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-warn-if-update-available/oclif.manifest.json +4ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-not-found/oclif.manifest.json +3ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-autocomplete/oclif.manifest.json +3ms
  @oclif/config loadJSON /opt/uns/uns/node_modules/@oclif/plugin-update/oclif.manifest.json +3ms
  @oclif/config:@oclif/plugin-help using manifest from /opt/uns/uns/node_modules/@oclif/plugin-help/oclif.manifest.json +0ms
  @oclif/config:@oclif/plugin-warn-if-update-available using manifest from /opt/uns/uns/node_modules/@oclif/plugin-warn-if-update-available/oclif.manifest.json +0ms
  @oclif/config:@oclif/plugin-not-found using manifest from /opt/uns/uns/node_modules/@oclif/plugin-not-found/oclif.manifest.json +0ms
  @oclif/config:@oclif/plugin-autocomplete using manifest from /opt/uns/uns/node_modules/@oclif/plugin-autocomplete/oclif.manifest.json +0ms
  @oclif/config:@oclif/plugin-update using manifest from /opt/uns/uns/node_modules/@oclif/plugin-update/oclif.manifest.json +0ms
  @oclif/config config done +48ms
  @oclif/config start init hook +4ms
  uns:@oclif/plugin-warn-if-update-available:hooks:init start /opt/uns/uns/node_modules/@oclif/plugin-warn-if-update-available/lib/hooks/init/check-update +0ms
  uns:@oclif/plugin-update:hooks:init start /opt/uns/uns/node_modules/@oclif/plugin-update/lib/hooks/init +0ms
  uns:@oclif/plugin-update:hooks:init done +244ms
  uns:@oclif/plugin-warn-if-update-available:hooks:init done +381ms
  @oclif/config init hook done +398ms
  uns init version: @oclif/command@1.5.19 argv: [ 'status' ] +0ms
  @oclif/config runCommand status [] +19ms
  @oclif/config:@uns/cli require /opt/uns/uns/dist/commands/status.js +481ms
/opt/uns/uns/bin/uns : ligne 45 : 11048 Instruction non permise "$NODE" "$DIR/run" "$@"

So we get exactly what you have tried earlier.

Can you give us more information about cpus?

cat /proc/cpuinfo

$> cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 54
model name	: Intel(R) Atom(TM) CPU N2800   @ 1.86GHz
stepping	: 1
microcode	: 0x10d
cpu MHz		: 1116.391
cache size	: 512 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm arat
bugs		:
bogomips	: 3733.11
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 54
model name	: Intel(R) Atom(TM) CPU N2800   @ 1.86GHz
stepping	: 1
microcode	: 0x10d
cpu MHz		: 1188.950
cache size	: 512 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm arat
bugs		:
bogomips	: 3733.11
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 54
model name	: Intel(R) Atom(TM) CPU N2800   @ 1.86GHz
stepping	: 1
microcode	: 0x10d
cpu MHz		: 1115.120
cache size	: 512 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 2
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm arat
bugs		:
bogomips	: 3733.11
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 54
model name	: Intel(R) Atom(TM) CPU N2800   @ 1.86GHz
stepping	: 1
microcode	: 0x10d
cpu MHz		: 1228.475
cache size	: 512 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 2
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm arat
bugs		:
bogomips	: 3733.11
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
$> lscpu                                                      
Architecture :        x86_64
Mode(s) opératoire(s) des processeurs : 32-bit, 64-bit
Boutisme :            Little Endian
Processeur(s) :       4
Liste de processeur(s) en ligne : 0-3
Thread(s) par cœur : 2
Cœur(s) par socket : 2
Socket(s) :           1
Nœud(s) NUMA :       1
Identifiant constructeur : GenuineIntel
Famille de processeur : 6
Modèle :             54
Nom de modèle :      Intel(R) Atom(TM) CPU N2800   @ 1.86GHz
Révision :           1
Vitesse du processeur en MHz : 995.313
Vitesse maximale du processeur en MHz : 1862,0000
Vitesse minimale du processeur en MHz : 798,0000
BogoMIPS :            3733.11
Cache L1d :           24K
Cache L1i :           32K
Cache L2 :            512K
Nœud NUMA 0 de processeur(s) : 0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm arat

All occurrences of Illegal instruction/Illegal hardware instruction on the web are related to cpu hardware compatibility issues.
Most of the time, wrong architecture, but sometimes also because some CPU flags are missing in the running CPU, compared to the processor which have compiled the program.

Despite being coded in Typescript/Nodejs, UNS CLI and UNS Node depend on native libraries, compiled on a machine with a CPU which have many more “flags” (I don’t know what they are, but there are many, many more).

So, this may be related to this Atom CPUs.

Solutions for the CLI:

  1. install it with NPM or Yarn (so native dependencies will be compiled for your CPUs): https://docs.uns.network/uns-use-the-network/cli/alternate-installation.html#installation-from-npm-yarn
  2. install it on your own laptop, if it’s not shipped with an Atom CPU :grin:

The best would to test 1/, which would confirm the hypothesis.

By the way, you will encounter the same issue with the UNS Node… that you won’t be able to compile by yourself as UNS Core is not open-source yet.

1 Like

Here we go !

Installing through npm worked.

[~] $ uns status                                                                                                                                                                                         
{
  "height": 585739,
  "network": "livenet",
  "totalTokenSupply": 15309178,
  "tokenSymbol": "UNS",
  "NFTs": [
    {
      "nftName": "UNIK",
      "individual": "178",
      "organization": "12",
      "network": "5"
    }
  ],
  "activeDelegates": 23,
  "lastBlockUrl": "https://explorer.uns.network/block/585739"

Disclosure done well.
Delegate done well.
Vote done well.

Time to set up a node. I’ll be back to give my feedback on running the docker image.

3 Likes

Hey ! I just started a forger node, it’s working well ! With docker, it’s so easy !

1 Like

Good news!
So UNS Core container is working perfectly on Intel Atom (but not the UNS CLI), thank you for testing this configuration :grin:

You’re welcome ! :smile: