How to check mining progress?

I have completed the mining setup according to the manual in my windows 10 machine.

What I did additionally was setting validator keys(priv, pub) with my ECDSA Keys.
I’ve also set signer of clientConfig.json with my ECDSA private key.

I applied the latest snapshot and started docker images.

I took some time but tip(./ccclient tip) show higher number than ‘Block Height’ in https://explorer.creditcoin.org/.

Since CPU fans are making loud noise, it seems that mining is working, so how can I check the mining status?

Sawtooth validator show log below.

[2021-09-22 12:41:32.342 WARNING cli] Network key pair is not configured, Network communications between validators will not be authenticated or encrypted.

I also tried to see my status in coin explorer with my sighash but it show nothing.

Is there any way to see my machine is working ?

I don’t know why the creditcoin team didn’t remove that warning message.
However, that warning does not cause any problems with mining.


docker exec -it sawtooth-validator-default bash -c "cat /etc/sawtooth/keys/validator.pub"

You can view the public key using the above command.


docker exec -it sawtooth-validator-default bash -c "cat /etc/sawtooth/keys/validator.priv"

You can view the private key using the above command.


docker exec -it sawtooth-validator-default bash -c "sawtooth block list --url http://rest-api:8008 | more"

You can check the block list using the command above.


docker exec -it sawtooth-validator-default bash -c "sawtooth block list --url http://rest-api:8008 | grep 'Public Key!!!'"

Check if there is a BLOCK_ID mined with your publicKey(SIGNER).


after…

Check if BLOCK_ID is synchronized with Creditcoin Explorer.
It may take time, and when BLOCK_ID is classified as forked, it may be rejected.

@dlwlalsggg Thank you for your attention to this matter.

I still cannot find what I have to do for mining.

The screenshot below is my current status.

Usually, the tip number which comes from ./ccclient tip is higher than ‘Block Height’ in explorer web page. However, grep commend you mentioned shows nothing.

Could you give me a little more hint to figure out the problem?

Thanks in advance.

Did you type publicKey in the grep command?

Yes. I tried grep with first some characters of public key.

When I setup mining , I generated an ECDSA key pair and set them into sawtooth-validator-default container according to the post below.

“sawtooth block list …” command shows SIGNER public keys. That key is just 66 characters long but public key I used in config file is 130 characters long.

I’ve set signer field in “Client/clientConfig.json” with generated ECDSA private key. It’s same with the content of /etc/sawtooth/keys/validator.priv in sawtooth-validator-default container.
I’m not sure setting like this is correct or not…

When entering a grep command, you should not use a 130 character key.

You have to use the 66 character publicKey of “/etc/sawtooth/keys/validator.pub”

If the key of the “validator.pub” file is not 66 characters, I think the setting is wrong.


bash -c 'if [[ ! -f /etc/sawtooth/keys/validator.pub ]]
    then
        echo "First run"
        sawadm keygen
    fi

There is a script for generating a public key and a private key in the “Server/docker-compose.yaml” file. (“sawadm keygen” command)

In general, the above script is used.

In the case of the ECDSA method, I don’t know because I’m unfamiliar with it.

The “Client/clientConfig.json” file is a client setting file.
As a setting file related to the creditcoin mainnet wallet,
It doesn’t directly affect mining.

The client is the mainnet wallet, so of course, you have to enter a private key in the setting file.
It has the ability to check the balance of the CTC mainnet coin and cause various transactions.

If mining is a problem, focus on server setting, not on client setting.

Thank you. I’ll try to generate a new key using “sawadm keygen” and get back to you.

In fact, the command is automatically executed once.
You don’t have to run it manually.

I think there is a content related to the ECDSA key in the official mining manual.

It is used when you want to manually create a CTC mainnet wallet (Key pair).

In general, there is no need to generate ECDSA keys.

Please read the manual again.

Thanks for the valuable information.

I looked for related documents to understand the role of client and server, but I couldn’t find anything.

Do you have any materials explaining mining software architecture or the role of Server/Client?

Currently, I generated new key pair as you explained and catching up to the latest block.

To generate new key pair, I deleted keys and restarted server and checked new key pair.

===

docker exec -it sawtooth-validator-default bash
root@0907da537f73:/# cd /etc/sawtooth/keys
root@0907da537f73:/etc/sawtooth/keys# ls
validator.priv validator.pub
root@0907da537f73:/etc/sawtooth/keys# mv validator.priv validator.priv.old
root@0907da537f73:/etc/sawtooth/keys# mv validator.pub validator.pub.old
root@0907da537f73:/etc/sawtooth/keys# ls
validator.priv.old validator.pub.old
===

  1. Creditcoin White Paper
  2. Gluwa YouTube (Session 6 - Creditcoin System Architecture (Demonstration) - YouTube)
  3. Credit Coin Official Mining Manual

I don’t think there’s anything else other than this.
Other than that, I found out through trial and error.

Creditcoin was developed using “Hyperledger Sawtooth”
Understanding this first may be the order

1 Like

i got you fam - get rid of pointless warning by 4phex7win · Pull Request #45 · gluwa/Creditcoin · GitHub

1 Like

@dlwlalsggg Thank you for your support.

Finally, I could see a block I mined. :slight_smile:

I threw away the windows 10 PC I tried for the first time and bought a new Linux PC with a powerful CPU.

I used ESPINS/CreditcoinDockerCompose-Mainnet from github.

I succeeded mining by building hashServer and basic(default) configurations.

There is still a problem with the port configuration, I’ll ask it in another thread.