Can I get a recent Mining command line for ubuntu

I’m new to creditcoin mining. I know that creditcoin2.0 has came out, it’s a big move. I tried to set up my node by following this article

Because I’m not familiar with docker so I messed up everything. Would you mind to share the script you are using? I’m very appreciated for your help guys. Thanks a lot

Here’s my shell script.

Step 1) Make a ‘data’ folder where you want.
Step 2) Make a ‘start_docker.sh’ file where you want.
Step 3) Copy & paste the below script into ‘start_docker.sh’.
Step 4) Replace <path to data folder>, <your node name>, <your SS58 mining key>.
Step 5) Run ‘sudo chmod 755 start_docker.sh’ to give the script execution permission.
Step 6) Run ‘./start_docker.sh’ to start mining.
Step 7) Find your node in telemetry.

Telemetry link: Polkadot Telemetry

Explorer link: Polkadot/Substrate Portal

Shell script:

#!/bin/sh

image_name=gluwa/creditcoin:latest
container_name="creditcoin-node"
public_ipv4_address=`curl -m 60 https://checkip.amazonaws.com 2>/dev/null`
ext_port=30333
local_port=30333
local_data_path=<path to data folder>

nodename=<your node name>

sudo docker run --name $container_name -d -p $local_port:$local_port -v $local_data_path:/data $image_name \
    --validator \
    --name $nodename \
    --prometheus-external \
    --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
    --bootnodes "/dns4/bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWAEgDL126EUFxFfdQKiUhmx3BJPdszQHu9PsYsLCuavhb" "/dns4/bootnode2.creditcoin.network/tcp/30333/p2p/12D3KooWRubm6c4bViYyvTKnSjMicC35F1jZNrzt3MKC9Hev5vbG" "/dns4/bootnode3.creditcoin.network/tcp/30333/p2p/12D3KooWSdzZaqoDAncrQmMUi34Nr29TayCr4xPvqcJQc5J434tZ" \
    --public-addr "/dns4/$public_ipv4_address/tcp/$ext_port" \
    --chain mainnet \
    --mining-key <your SS58 mining key> \
    --base-path /data \
    --port $local_port
2 Likes

Thank you so so much. It’s really helpful tbh.

1 Like

pardon me, sir. I finished the final step then it showed a single line like that
Capture
It seems everything ok but then how can I check my miner are working or not? thank you

If you find your node in the telemetry then it works.

Or,

run ‘sudo docker stats’ and find ‘creditcoin-node’ container.

Or,

run ‘top’ or ‘htop’ and find thread ‘/bin/creditcoin-node’.

thank you a lot I finally see it on telemetry. But how can I know my node win a block or not? is there a way that allows me to monitor my node performance?

There is no performance monitor currently.
You can add your SS58 address to address book and can find your balance in the explorer.

Address book of the explorer link: Polkadot/Substrate Portal

1 Like

thank you, sir.
Do you know what minium spec requires for mining? I just realize I have no idea about it

I don’t know the minimum spec required.
There’s no data. But it’s certain that recent machines can mine though.

yepp, the only thing I know is that it requires a strong CPU. Based on your experience, can you tell me how many blocks I can expect per day/per week with i9-9900k 64gb ram?

I expect one to three blocks per day, maybe?
One block gives you 28 $CTC.

1 Like

FYI, the network IDs for the second and third bootnodes have changed, so:

--bootnodes "/dns4/bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWAEgDL126EUFxFfdQKiUhmx3BJPdszQHu9PsYsLCuavhb" "/dns4/bootnode2.creditcoin.network/tcp/30333/p2p/12D3KooWRubm6c4bViYyvTKnSjMicC35F1jZNrzt3MKC9Hev5vbG" "/dns4/bootnode3.creditcoin.network/tcp/30333/p2p/12D3KooWSdzZaqoDAncrQmMUi34Nr29TayCr4xPvqcJQc5J434tZ" \

Would become:

--bootnodes "/dns4/bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWAEgDL126EUFxFfdQKiUhmx3BJPdszQHu9PsYsLCuavhb" "/dns4/bootnode2.creditcoin.network/tcp/30333/p2p/12D3KooWSQye3uN3bZQRRC4oZbpiAZXkP2o5UZh6S8pqyh24bF3k" "/dns4/bootnode3.creditcoin.network/tcp/30333/p2p/12D3KooWFrsEZ2aSfiigAxs6ir2kU6en4BewotyCXPhrJ7T1AzjN" \

bootnode2.creditcoin.network → 12D3KooWSQye3uN3bZQRRC4oZbpiAZXkP2o5UZh6S8pqyh24bF3k
bootnode3.creditcoin.network → 12D3KooWFrsEZ2aSfiigAxs6ir2kU6en4BewotyCXPhrJ7T1AzjN

2 Likes