Need some help getting started on Full Node

Hi,

I’m bit of a newbie and want to learn how to run a blockchain node.
In less than 10 minutes I was able to get it running on spinned up Ubuntu server 18.04.2 LTS on digital ocean.

but I’m not sure if the celo blockchain is getting updated.

a. I ran the docker command with & at the end
messages kept running to the screen but was able log out

b. logged in and saw that geth is running - which I assume is the ether blockchain

Q1 - how do I know the celo blockchain is being updated? what folder should I check or is there there a command I can run

Q2 there was no file called .bash_profile for the env variable CELO_ACCOUNT_ADDRESS so after I googled I put it on /etc/environment and that seemed to work.

Thanks in advance.

David

Welcome to the Celo Forum @q846hy! We are very excited that you are trying to run our full node!

Here are answers to your questions.

Q1) You generally should try to run your celo client in the foregroud (e.g. without the &). The output logs will tell you if your blockchain is being updated. Specifically, you should see logs similar to this:

INFO [08-05|18:43:57.301] Imported new chain segment blocks=543 txs=45 mgas=11.340 elapsed=8.008s mgasps=1.416 number=25903 hash=1c52a5…5d1eb6 age=2w5d19m cache=6.00mB

The “number” field in that message will specify the number of the latest block that your client downloaded.

Why are you trying to run it in the background? If you would like to log out of the machine when it’s running, then one good option is to run your client within a linux screen (https://linuxize.com/post/how-to-use-linux-screen/)

Q2) You can still create a .bash_profile within your home directory, even if it’s not currently there. After you create it, bash will read it (and run its commands) the next time you log in. In general, you probably want to use that file as opposed to /etc/environment. /etc/environment will modify all of the computer’s users to have the CELO_ACCOUNT_ADDRESS, while the .bash_profile will just modify a specific user’s environment.

Let me know if you have any other questions!

Kevin

Kevin,

Thank-you.

Personally this is experimental and a learning process and as such I’m doing this from a cloud server from my desktop. and yes at nite I turn off my computer (maybe I’m old school)

Yes I was reading about screen and I’m going to see if I can get it to work thru that.

Q2) ironically after I entered in the /etc/environment - the OS created the .bash_profile file

Will update you later.

David j.

Hi,
the full node is working nicely.
now I tired to install the npm CLI but it crashed.
I installed version of node using nvm which worked.
The error log shows something about permissions from git.

here are the errors in the log

122 error Error while executing:
122 error /usr/bin/git ls-remote -h -t ssh://git@github.com/celo-org/TypeChain.git
122 error
122 error git@github.com: Permission denied (publickey).
122 error fatal: Could not read from remote repository.
122 error
122 error Please make sure you have the correct access rights
122 error and the repository exists.
122 error
122 error exited with error code: 128

Thanks
David j.

Hey David,

Do you have any SSH keys associated with your GitHub account? You can check here: https://github.com/settings/keys

If not, you probably need to add one: https://help.github.com/en/articles/connecting-to-github-with-ssh

Let me know if this helps!
Trevor

Hi David,

Unfortunately there was a bug in the version of the package you pulled.
This has been fixed in v0.0.8
If you pull the latest version from the npm registry, it should be resolved.

Apologies for any inconvenience and let us know if you encounter any other issues!

Yorke

Hi,
I did create a git account and as set of ssh keys and that helped to get it rolling

I’m installing from /root

I ran: npm install -g @celo/celocli

Here is the log
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated tar.gz@1.0.7: :warning: WARNING :warning: tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN lifecycle scrypt@6.0.3~preinstall: cannot run in wd %s %s (wd=%s) scrypt@6.0.3 node node-scrypt-preinstall.js /usr/local/lib/node_modules/.staging/scrypt-9ec9e469
npm WARN lifecycle scrypt@6.0.3~preinstall: cannot run in wd %s %s (wd=%s) scrypt@6.0.3 node node-scrypt-preinstall.js /usr/local/lib/node_modules/.staging/scrypt-1081049c
/usr/local/lib
└── (empty)

npm WARN optional Skipping failed optional dependency /@celo/celocli/jest-haste-map/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN bitcore-mnemonic@1.7.0 requires a peer of bitcore-lib@^0.16.0 but none was installed.
npm ERR! Linux 4.15.0-52-generic
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install” “-g” “@celo/celocli”
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules/@celo/celocli/node_modules/@celo/contractkit/bin/build-sdk.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod ‘/usr/local/lib/node_modules/@celo/celocli/node_modules/@celo/contractkit/bin/build-sdk.js’
npm ERR! enoent ENOENT: no such file or directory, chmod ‘/usr/local/lib/node_modules/@celo/celocli/node_modules/@celo/contractkit/bin/build-sdk.js’
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
npm ERR! code 1

The OS is 18.04.2 LTS (Bionic Beaver)

Thanks for your help
David j.

if think it worthwhile I can go on discord to help

Hi David,

We are working on a fix for the @celo/contractkit npm error you encountered.

In the meantime, there is a docker image available which should allow you to use the CLI against a full node. This should alleviate the issues with npm dependencies. More information about this setup can be found here.

Thank you for bearing with us in these early stages.

Hi,

Now following those instructions.

Note: a full node is running as when enter the docker command below (its running in a screen)

I ran this docker command
docker pull us.gcr.io/celo-testnet/celocli:master
result:
Digest: sha256:b7415d536477136eea7e214c6de09a69555279dcf368ab3293e3e004cb13531b
Status: Downloaded newer image for us.gcr.io/celo-testnet/celocli:master

I then tried a cli but celocli cannot be found

What would be the next step to get the celocli to run from the command line so lets say I can check the balance.

Thanks
David j.

1 Like