Skip to content

Tokens Did not Transfer from BlockDAG Node to Wallet #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DigiAdm01 opened this issue Jan 16, 2025 · 28 comments
Open

Tokens Did not Transfer from BlockDAG Node to Wallet #22

DigiAdm01 opened this issue Jan 16, 2025 · 28 comments
Assignees

Comments

@DigiAdm01
Copy link

HI @dev001101,

I followed your advice provided on November 5th using the PK address generated by the BlockDAG script.

I did the following:

  1. Update wallet ./blockdag-wallet qc updateblock (looks like it worked)
  2. Check your balance ./blockdag-wallet qc getbalance Added Public Wallet (PK)

The node ran for about a week on the Testnet before i followed the above guidance, it said my balance is zero.

I also used my PK on the BlockDAG Explorer and it popped the famous 404 error (not found)

Any suggestions on checking my balance?

@AlanJHancock
Copy link

AlanJHancock commented Jan 24, 2025

I think I have the same problem, however, there was a reported problem with this here:
https://blockdag.network/dev-releases/dev-release-162
I do not think that this problem has been reported as fixed in Dev notices as promised.
I ran 1. Update wallet ./blockdag-wallet qc updateblock (takes a long time to run, well over a day as 50000K blocks are visited)

@ralphklos
Copy link

ralphklos commented Jan 27, 2025

Goodday, on top of this chain this commands are mentioned.

Update wallet ./blockdag-wallet qc updateblock (looks like it worked)
Check your balance ./blockdag-wallet qc getbalance Added Public Wallet (PK)

when i run the first command i do ge the message please create a wallet first, [blockdag-wallet qc create].

during the setup process i did run the ./wallet.sh script and a wallet got created.

any guidance on this?

@AlanJHancock
Copy link

AlanJHancock commented Jan 27, 2025

The node needs to be running for the server to accept the Remote Procedure Call (RPC) used to access bdag database and your wallet.
I created a bash script ./wallet-balance.sh as below that changes directory to ./bin/wallet where the blockdag-wallet binary is.
The updateblock takes a very long time to run could be over 1 day as there are over 86Million blocks.

I may well be entirely wrong about the possible reward for running a node which will depend what BlockDAG decides to do,
however it could be some calculation like below and could be different once on Mainnet.
The minimum transaction fee in bdag/kB default 20000 (aka. 0.0002 BDAG/KB) (default 20000) x 86M (highest block reached)= 17,000BDAG.

#!/bin/bash
set -x
cd ~/blockdag-scripts/linux/bin/wallet
./blockdag-wallet qc updateblock
./blockdag-wallet qc getbalance (PKaddress from the last line of wallet.txt)
cd ~/blockdag-scripts/linux

The update block output will scroll and should look like this:
2025-01-27|16:33:10.812 [INFO ] notify tx count txs=30
2025-01-27|16:33:11.815 [INFO ] notify tx count txs=30
2025-01-27|16:33:12.812 [INFO ] notify tx count txs=30
2025-01-27|16:33:13.814 [INFO ] notify tx count txs=30
2025-01-27|16:33:14.821 [INFO ] notify tx count txs=30
update history block: 30/30

@ralphklos
Copy link

Thank you Alan,
For the moment i did try to re-install my system, and right now i am not even able to create the wallet anymore.

sudo ./wallet.sh
qx not found. Downloading...
--2025-01-27 14:55:45-- https://github.com/BlockdagNetworkLabs/blockdag-scripts/releases/latest/download/qx
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/BlockdagNetworkLabs/blockdag-scripts/releases/download/v0.1.0/qx [following]
--2025-01-27 14:55:46-- https://github.com/BlockdagNetworkLabs/blockdag-scripts/releases/download/v0.1.0/qx
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 404 Not Found
2025-01-27 14:55:46 ERROR 404: Not Found.

qx has been downloaded and installed at bin/qx.
blockdag-wallet not found. Downloading...
--2025-01-27 14:55:46-- https://github.com/BlockdagNetworkLabs/blockdag-scripts/releases/latest/download/blockdag-wallet
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/BlockdagNetworkLabs/blockdag-scripts/releases/download/v0.1.0/blockdag-wallet [following]
--2025-01-27 14:55:46-- https://github.com/BlockdagNetworkLabs/blockdag-scripts/releases/download/v0.1.0/blockdag-wallet
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 404 Not Found
2025-01-27 14:55:46 ERROR 404: Not Found.

blockdag-wallet has been downloaded and installed at bin/wallet.
send: spawn id exp4 not open
while executing
"send -- "test\r""
private Key is :
PK Address is :

result is that i do not get a private key and PK Address.

@DigiAdm01
Copy link
Author

Thank you everyone! I'll give the solution a try.

@DigiAdm01
Copy link
Author

@AlanJHancock, this is what I get. Not very encouraging for weeks of work.

2025-01-27|21:14:10.018 [INFO ] notify tx count txs=0
2025-01-27|21:14:11.019 [INFO ] notify tx count txs=0
2025-01-27|21:14:12.018 [INFO ] notify tx count txs=0
2025-01-27|21:14:13.018 [INFO ] notify tx count txs=0
2025-01-27|21:14:14.018 [INFO ] notify tx count txs=0
2025-01-27|21:14:15.018 [INFO ] notify tx count txs=0
2025-01-27|21:14:16.018 [INFO ] notify tx count txs=0

@DigiAdm01
Copy link
Author

@AlanJHancock , I updated my servers and now all I get is the following when I run my Node.

2025-01-28|04:20:20.105 [WARN ] Side chain depth too large module=miner
2025-01-28|04:20:21.106 [WARN ] Side chain depth too large module=miner

@msp-9009
Copy link
Contributor

@DigiAdm01 Please make sure to pull the latest code from the main branch and try again. The issue might have already been resolved in the latest changes.

@AlliTobba
Copy link

I ran the following sequences:
sudo docker stop blockdag-testnet-network
sudo docker run blockdagnetwork/bdag:latest ./bdag --cleanup
sudo docker rm -f $(sudo docker ps -a -q)
sudo docker image remove -f $(sudo docker images -a -q)
sudo ./restartWithCleanup.sh

It did download something, not sure which version. When I checked the logs, I was getting:
[WARN ] Side chain depth too large module=miner

@ralphklos
Copy link

eated a bash script ./wallet-balance.sh as below that changes directory to ./bin/wallet where the blockdag-wallet binary is.
The updateblock takes a very long time to run could be over 1 day as there are over 86Million blocks.

The node needs to be running for the server to accept the Remote Procedure Call (RPC) used to access bdag database and your wallet. I created a bash script ./wallet-balance.sh as below that changes directory to ./bin/wallet where the blockdag-wallet binary is. The updateblock takes a very long time to run could be over 1 day as there are over 86Million blocks.

I may well be entirely wrong about the possible reward for running a node which will depend what BlockDAG decides to do, however it could be some calculation like below and could be different once on Mainnet. The minimum transaction fee in bdag/kB default 20000 (aka. 0.0002 BDAG/KB) (default 20000) x 86M (highest block reached)= 17,000BDAG.

#!/bin/bash set -x cd ~/blockdag-scripts/linux/bin/wallet ./blockdag-wallet qc updateblock ./blockdag-wallet qc getbalance (PKaddress from the last line of wallet.txt) cd ~/blockdag-scripts/linux

The update block output will scroll and should look like this: 2025-01-27|16:33:10.812 [INFO ] notify tx count txs=30 2025-01-27|16:33:11.815 [INFO ] notify tx count txs=30 2025-01-27|16:33:12.812 [INFO ] notify tx count txs=30 2025-01-27|16:33:13.814 [INFO ] notify tx count txs=30 2025-01-27|16:33:14.821 [INFO ] notify tx count txs=30 update history block: 30/30

Asking for your expertise again.
Now i got the docker compose up and running, i was able to create the wallet, and got the pri and pk. I did start the node.sh command with my PK

i can see blockdag is downloading blocks and imports new chain segment.

Now still when i run the command i get the error Please create a wallet first,[blockdag-wallet qc create ] which is somewhat confusing to me.

any suggestions?

@AlanJHancock
Copy link

AlanJHancock commented Jan 28, 2025

Now still when i run the command i get the error Please create a wallet first,[blockdag-wallet qc create ]
which is somewhat confusing to me.

What command are you running exactly?
Many of the programs require $MINING_ADDRESS to be set in the environment.
As an example, I modified my ./wallet-balance script to get the $pk_addr from wallet.txt made when the wallet was created
You can use the same technique in any of the .sh scripts that need the $MINING_ADDRESS set in the environment or passed as parameter $1 instead of plugging in the fully generated key into a script requiring it.
File ./wallet-balance.sh now contains:
#!/bin/bash
set -x
#The node server needs to be running to allow RPC calls
docker ps
pk_addr=$(tail -n 1 "wallet.txt") # Last line of wallet.txt is pk_addr = Public Key
export MINING_ADDRESS=$pk_addr # Export the mining address to the environment
cd ~/blockdag-scripts/linux/bin/wallet
./blockdag-wallet qc updateblock
./blockdag-wallet qc getbalance $MINING_ADDRESS
cd ~/blockdag-scripts/linux

@DigiAdm01
Copy link
Author

Everything seems to be running smooth with the Node BUT here is what I get

  • pk_addr=Tk2beVJfUTVwYgPwZj3aHQsNLwoiWsckzqpWDcGW656a1s8utUPRz
  • export MINING_ADDRESS=Tk2beVJfUTVwYgPwZj3aHQsNLwoiWsckzqpWDcGW656a1s8utUPRz
  • MINING_ADDRESS=Tk2beVJfUTVwYgPwZj3aHQsNLwoiWsckzqpWDcGW656a1s8utUPRz
  • cd /home/digiadmin01/blockdag-scripts/linux/bin/wallet
  • ./blockdag-wallet qc updateblock
    2025-01-31|19:34:31.860 [INFO ] Established connection to RPC server 127.0.0.1:38131 module=RPCCLI

I verified my PK address and it matches the above.
The node is running.

I am still receiving the same output

2025-01-31|19:34:32.872 [INFO ] notify tx count txs=0
2025-01-31|19:34:33.870 [INFO ] notify tx count txs=0
2025-01-31|19:34:34.871 [INFO ] notify tx count txs=0

Yes I did verify all the updates. Even the text changes from MINNING...... ADRESS to ensure they say MINING_ADDRESS

Any suggestions I might of missed?

@alex158888
Copy link

How doing now, guys?

I installed BDAG node just today and am interested too...

@ralphklos
Copy link

My results so far.

Installation after a few hick ups went fine. Not 100% the documentation, also my knowledge and experience on this.
What i did notice is that the docker container runs fine. crashed, and i was not able to restart it without cleaning. This happened to me a few times , in which i did increase diskspace, memory and cpu to be sure these are not the issue. Though after that it still happened that during the nights it crashed and could not get started anymore without cleaning. So with cleaning the whole database sync does restart again, and the syncing of the database does take some time in my case. while syncing you do not earn any.

That being said, i think i will make more profit with the mining app on my phone as through the node due to the crashes.

@alex158888
Copy link

alex158888 commented Feb 10, 2025

Thanks for your feedback!

Here's a typical example of what my node shows (through your script wallet-balance,sh)... does this mean i have earned something?

2025-02-10|17:12:15.633 [INFO ] notification rescan block start=16028582 end=16028834
2025-02-10|17:12:16.331 [INFO ] notify tx count txs=0
2025-02-10|17:12:16.764 [INFO ] notification rescan block start=16028834 end=16029139
2025-02-10|17:12:17.344 [INFO ] notify tx count txs=0
2025-02-10|17:12:17.862 [INFO ] notification rescan block start=16029139 end=16029424
2025-02-10|17:12:18.325 [INFO ] notify tx count txs=0
2025-02-10|17:12:18.951 [INFO ] notification rescan block start=16029424 end=16029891
2025-02-10|17:12:19.347 [INFO ] notify tx count txs=0
2025-02-10|17:12:20.239 [INFO ] notification rescan block start=16029891 end=16030215
2025-02-10|17:12:20.337 [INFO ] notify tx count txs=0
2025-02-10|17:12:21.324 [INFO ] notify tx count txs=0
2025-02-10|17:12:21.498 [INFO ] notification rescan block start=16030215 end=16030443
2025-02-10|17:12:22.325 [INFO ] notify tx count txs=0
2025-02-10|17:12:23.332 [INFO ] notify tx count txs=0
2025-02-10|17:12:23.548 [INFO ] notification rescan block start=16030443 end=16030599
2025-02-10|17:12:24.329 [INFO ] notify tx count txs=0
2025-02-10|17:12:24.673 [INFO ] notification rescan block start=16030599 end=16031062
2025-02-10|17:12:25.324 [INFO ] notify tx count txs=0
2025-02-10|17:12:25.821 [INFO ] notification rescan block start=16031062 end=16031522
2025-02-10|17:12:26.329 [INFO ] notify tx count txs=0
2025-02-10|17:12:27.133 [INFO ] notification rescan block start=16031522 end=16031874

Thanks once again!

@ralphklos
Copy link

run the command: docker logs -f blockdag-testnet-network

when you see f.e.

2025-02-10|14:53:19.023 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-10|14:53:20.071 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-10|14:53:21.077 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-10|14:53:22.193 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-10|14:53:23.247 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-10|14:53:24.472 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-10|14:53:25.504 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-10|14:53:26.684 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-10|14:53:27.687 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-10|14:53:27.866 [INFO ] Processed 176 blocks in the last 10s module=CHAIN transactions=176 order=uncertainty time=2024-10-02T18:17:55+0000
2025-02-10|14:53:28.581 [INFO ] Imported new chain segment number=51482 hash=8297bc..0e79fa blocks=1 txs=1 mgas=0.021 elapsed=664.620ms mgasps=0.032 age=4mo1w3d snapdiffs=3.18MiB triediffs=520.29KiB triedirty=913.31KiB

It does mean it is still syncing. on the last line you can see the age 4m 1w 3d

As far as i know as soon a that sync is completely done you will start mining and earning, not earlier, but perhaps someone can confirm that.

@alex158888
Copy link

Well, all my logs consist of following:

2025-02-09|22:18:56.581 [INFO ] Imported new chain segment number=28482 hash=875cd2..1e9472 blocks=1 txs=1 mgas=0.021 elapsed=13.092ms mgasps=1.604 age=4mo2w3d snapdiffs=3.84MiB triediffs=531.72KiB triedirty=653.22KiB
2025-02-09|22:18:56.619 [INFO ] Imported new chain segment number=28483 hash=d380b8..715a30 blocks=1 txs=1 mgas=0.021 elapsed=16.644ms mgasps=1.262 age=4mo2w3d snapdiffs=3.84MiB triediffs=532.42KiB triedirty=653.22KiB
2025-02-09|22:18:56.643 [INFO ] Imported new chain segment number=28484 hash=6151fb..5bf264 blocks=1 txs=1 mgas=0.021 elapsed=19.011ms mgasps=1.105 age=4mo2w3d snapdiffs=3.84MiB triediffs=532.29KiB triedirty=653.23KiB
2025-02-09|22:18:56.649 [INFO ] The sync of graph state has ended module=SYNC spend=6s processID=565
2025-02-09|22:18:56.649 [INFO ] Syncing graph state module=SYNC cur=(867825,608318,608454,867828,1) target=(93636306,17474034,19558029,96171594,1) peer=16Uiu2HAm54LtVi2uAdgjP1LqqmdeNM5fHv94acrkHZuafbndvmVW processID=566
2025-02-09|22:18:56.779 [WARN ] Blockdag is downloading blocks... : Client in initial download module=miner
2025-02-09|22:18:56.967 [INFO ] Start flatten diff layer module=CDB memory="3.65 MiB"
2025-02-09|22:18:57.030 [INFO ] End flatten diff layer module=CDB cost=63.597206ms

I am not yet qualified enough to understand what that means... would be grateful for your considerations.

@ralphklos
Copy link

i think you are still syncing, as the logs do mention it's importing chain segments that are 4 months , 2 weeks, 3 days old.

@alex158888
Copy link

alex158888 commented Feb 10, 2025

It was just random lines I have cut from my logs...

You can also check balance on https://bdagscan.com/address/address-of-your-node-wallet
Mine shows 0... but I run my node only less than 1 day yet. How much is yours?

@AlanJHancock
Copy link

Thanks for your feedback!

Here's a typical example of what my node shows (through your script wallet-balance,sh)... does this mean i have earned something?

2025-02-10|17:12:15.633 [INFO ] notification rescan block start=16028582 end=16028834 2025-02-10|17:12:16.331 [INFO ] notify tx count txs=0 2025-02-10|17:12:16.764 [INFO ] notification rescan block start=16028834 end=16029139 2025-02-10|17:12:17.344 [INFO ] notify tx count txs=0 2025-02-10|17:12:17.862 [INFO ] notification rescan block start=16029139 end=16029424 2025-02-10|17:12:18.325 [INFO ] notify tx count txs=0 2025-02-10|17:12:18.951 [INFO ] notification rescan block start=16029424 end=16029891 2025-02-10|17:12:19.347 [INFO ] notify tx count txs=0 2025-02-10|17:12:20.239 [INFO ] notification rescan block start=16029891 end=16030215 2025-02-10|17:12:20.337 [INFO ] notify tx count txs=0 2025-02-10|17:12:21.324 [INFO ] notify tx count txs=0 2025-02-10|17:12:21.498 [INFO ] notification rescan block start=16030215 end=16030443 2025-02-10|17:12:22.325 [INFO ] notify tx count txs=0 2025-02-10|17:12:23.332 [INFO ] notify tx count txs=0 2025-02-10|17:12:23.548 [INFO ] notification rescan block start=16030443 end=16030599 2025-02-10|17:12:24.329 [INFO ] notify tx count txs=0 2025-02-10|17:12:24.673 [INFO ] notification rescan block start=16030599 end=16031062 2025-02-10|17:12:25.324 [INFO ] notify tx count txs=0 2025-02-10|17:12:25.821 [INFO ] notification rescan block start=16031062 end=16031522 2025-02-10|17:12:26.329 [INFO ] notify tx count txs=0 2025-02-10|17:12:27.133 [INFO ] notification rescan block start=16031522 end=16031874

Thanks once again!

You are getting the rescan block messages because the node is still pulling blocks that are within the same block range as your node is pulling block start=16031062 end=16031522.
You were not processing any blocks back when these early blocks were created so you would not expect any Tx fee until later when you participate in the more recent blocks.
Probably best to either stop the wallet-balance script before it gets to the current blocks being pulled by the node OR wait for the node to catch up loading blocks to more recent ones. Currently at 94,180,800+ blocks on Testnet chain.

@AlliTobba
Copy link

@AlanJHancock are you running the node in Swindon ?

@AlanJHancock
Copy link

@AlanJHancock are you running the node in Swindon ?

No am not in Swindon that address is someone on Tiscali ISP
I just restarted one node with the latest Primordial software and my node address is similar to others that are being displayed on the Node Visualizer my node is 16Uiu2HAm9dXUjXcrEjRfXGC37DtdYo3zZnQ8uAggH4BmUHPXFjAN

@AlliTobba
Copy link

@AlanJHancock
Are you getting the same errors as us in the logs ?
#36

@AlanJHancock
Copy link

AlanJHancock commented Mar 29, 2025

My node is producing a lot of errors like this:
8635d7a89976fa2d491b6c98cbc586e78 module=SYNC processID=214
2025-03-29|22:53:31.760 [ERROR] Failed to process block:hash=48a7a235881793d71c0778049996220172592e31d6e51d1c6b520e114904f872 err=already have block (orphan) 48a7a235881793d71c0778049996220172592e31d6e51d1c6b520e114904f872 module=SYNC processID=214
2025-03-29|22:53:31.760 [ERROR] Failed to process block:hash=b3f305a546383dac8595d72b713ed2447c1d95a0e96c39b6a240cdd6dc1e105b err=already have block (orphan) b3f305a546383dac8595d72b713ed2447c1d95a0e96c39b6a240cdd6dc1e105b module=SYNC processID=214
2025-03-29|22:53:31.760 [ERROR] Failed to process block:hash=ce00bef7953fb396730c743445964bf90387fe389e14df7a5efb3792d5dbb6f0 err=already have block (orphan) ce00bef7953fb396730c743445964bf90387fe389e14df7a5efb3792d5dbb6f0 module=SYNC processID=214

My freshly configured Primordial node at 6Uiu2HAm9dXUjXcrEjRfXGC37DtdYo3zZnQ8uAggH4BmUHPXFjAN is being reported as Buckingham UK which is near Leighton Buzzard which is an old location for Gigaclear.
That is not correct according to RIPE, my node is in Abingdon, and my ISP is Gigaclear also in Abingdon as below:
role: Gigaclear Administration
address: Gigaclear Ltd
address: Building One
address: Wyndyke Furlong
address: Abingdon
address: Oxfordshire
address: OX14 1UQ
e-mail: [email protected]
phone: +441865591100
nic-hdl: GA10497-RIPE
mnt-by: gigaclear
created: 2018-08-03T09:46:15Z
last-modified: 2022-08-04T10:00:38Z
source: RIPEit must be wrong

I do not know what geo-location databse is being used by the BDAG Node Visualizer but is must be old data that Gigaclear probably need to update.

@AlliTobba
Copy link

@AlanJHancock join us on Discord :-)

@LordFlash-com
Copy link

Just a note for others the command line has changed to see your testnet BDAG wallet balance and no longer uses the "qc" option.

The new command lines are as follows:

Update wallet: ./blockdag-wallet bdagc updateblock
Check your balance: ./blockdag-wallet bdagc getbalance $YOUR_PK_MINING_ADDRESS

LF

@AlanJHancock
Copy link

Just a note for others the command line has changed to see your testnet BDAG wallet balance and no longer uses the "qc" option.

The new command lines are as follows:

Update wallet: ./blockdag-wallet bdagc updateblock Check your balance: ./blockdag-wallet bdagc getbalance $YOUR_PK_MINING_ADDRESS

LF

I think you will find that the above method is not for the primordial testnet that started with a new genesis block. The bash script below is used on the primordial testnet
#!/bin/bash

set -x

rpc_url="http://127.0.0.1:18545"
pk_addr=$(tail -n 1 "wallet.txt")
MINING_ADDRESS=$pk_addr

echo Your Public Key : $pk_addr
cd bin/bdagex/
fetch=$(./bdagex pkaddr-to-ethaddr $pk_addr)
echo Your ETH Address : $fetch
wallet="$fetch"
response=$(curl -s -u test:test -H 'Content-Type: application/json'
-H 'Accept: application/json' --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["'"$wallet"'","latest"],"id":1}'
$rpc_url)

balance_hex=$(echo $response | jq -r '.result')

balance_bdag=$(python3 -c "print(int('$balance_hex', 16) / 10**18)")

Return balance

echo Your BDAG balance: $balance_bdag

@LordFlash-com
Copy link

Ah yes thank you and super helpful 😊👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants
@LordFlash-com @alex158888 @ralphklos @AlanJHancock @AlliTobba @msp-9009 @DigiAdm01 and others