pocketnetteam / pocketnet.core

Decentralized social network based on the blockchain
https://pocketnet.app
Apache License 2.0
115 stars 28 forks source link

[BLOCKER] Fails to download latest main.sqlite3 .... 404 Not Found #691

Open camcodingit opened 6 months ago

camcodingit commented 6 months ago

Describe the bug Following the Full Node setup guide from the https://bastyon.com/docs/en/users/0.1/node/install.html i.e. $ mkdir ~/.pocketcoin $ mkdir ~/.pocketcoin/checkpoints $ cd ~/.pocketcoin/checkpoints $ wget https://github.com/pocketnetteam/pocketnet.core/releases/latest/download/main.sqlite3 --no-check-certificate

So the last step above does fail i.e.: ~/.pocketcoin/checkpoints$ wget https://github.com/pocketnetteam/pocketnet.core/releases/latest/download/main.sqlite3 --2024-04-05 07:20:38-- https://github.com/pocketnetteam/pocketnet.core/releases/latest/download/main.sqlite3 Resolving github.com (github.com)... 140.82.112.4 Connecting to github.com (github.com)|140.82.112.4|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://github.com/pocketnetteam/pocketnet.core/releases/download/0.22.4/main.sqlite3 [following] --2024-04-05 07:20:38-- https://github.com/pocketnetteam/pocketnet.core/releases/download/0.22.4/main.sqlite3 Reusing existing connection to github.com:443. HTTP request sent, awaiting response... 404 Not Found 2024-04-05 07:20:38 ERROR 404: Not Found. Re-tried multiple times, bu still fails

Desktop (please complete the following information):

Additional context This issue blocks the full node setup totally - without main.sqlite3 the UI client stuck forever.

the-real-vortex-v commented 5 months ago

Yeah the setup guide/sections need some love. Download the compressed archive from: https://snapshot.pocketnet.app/

I suggest getting the https://snapshot.pocketnet.app/latest.tgz Then extracting it to your data directory. You can set your datadirectory with a command line option or in your config file. In my config file I have "datadir=d:\Coins\PocketNet\Data" (no double quotes) as my first line. I suggest putting the data dir on an NVME or similar fast random access array.

It will always be "uptodate" (It's currently 2 months behind but much better than resyncing from scratch).

andyoknen commented 5 months ago

Thanks for the feedback. I will take care of the documentation and close this issue when I correct the inaccuracies

spflanze commented 5 months ago

You can set your datadirectory with a command line option or in your config file.

Where will I find this config file?

I too have this error and so if I am to get this working before this issue is debugged I will have to extract that download into my data directory.

the-real-vortex-v commented 5 months ago

You can set your datadirectory with a command line option or in your config file.

Where will I find this config file?

I too have this error and so if I am to get this working before this issue is debugged I will have to extract that download into my data directory.

Check the below link. The datadir and some example powershell/cmd code for windows is below. For linux it's in the homedir of whatever user you have running the node software (~/.pocketnet).

The default config file is pocketcoin.conf

https://github.com/pocketnetteam/pocketnet.core/issues/567

spflanze commented 5 months ago

The default config file is pocketcoin.conf

Thank you for your reply. My OS is Ubuntu 22.04. The only thing in my ~/.pocketcoin directory is an empty folder named "checkpoints". I believe this is because the command sequence:

cd ~/.pocketcoin/checkpoints wget https://github.com/pocketnetteam/pocketnet.core/releases/latest/download/main.sqlite3 --no-check-certificate

failed due to the sqlite3 error. I search for the configuration file using the command "sudo find / -iname pocketcoin.conf" and got no hits. The file "pocketcoin.conf" does not appear to exist on my computer.

Prior to the wget command I did download and install the pocketnetcore app with the command: sudo dpkg -i pocketnetcore_0.22.4_linux_x64_setup.deb This command appeared to be successful.

Should pocketcoin.conf already exist, or is this a file I must create?

andyoknen commented 5 months ago

The default config file is pocketcoin.conf

Thank you for your reply. My OS is Ubuntu 22.04. The only thing in my ~/.pocketcoin directory is an empty folder named "checkpoints". I believe this is because the command sequence:

cd ~/.pocketcoin/checkpoints wget https://github.com/pocketnetteam/pocketnet.core/releases/latest/download/main.sqlite3 --no-check-certificate

failed due to the sqlite3 error. I search for the configuration file using the command "sudo find / -iname pocketcoin.conf" and got no hits. The file "pocketcoin.conf" does not appear to exist on my computer.

Prior to the wget command I did download and install the pocketnetcore app with the command: sudo dpkg -i pocketnetcore_0.22.4_linux_x64_setup.deb This command appeared to be successful.

Should pocketcoin.conf already exist, or is this a file I must create?

The configuration file is not created automatically, but it is present in the snapshot archive. I have corrected the documentation here so that it links to up-to-date information.

spflanze commented 5 months ago

Thank you for your reply. I now have pocketcoin-qt running in my computer, and it is syncing. I have more questions:

I do not want my computer I have pocketcoin-qt running in powered up 100% of the time. If I do its normal Ubuntu 22.04 power down procedure alone will pocketcoin-qt gracefully shut down? Or will the command "pocketcoin-cli stop" be necessary prior to shutdown?

On page: https://docs.bastyon.com/en/users/0.1/node/install.html there is reference to a section named "Network Setup". I am unable to find this section on that page. I did a text search within that page for that section name, and got only results only for the two places that section is referenced. Where is this section? I desire to run a full node.

Does running a full node mean my computer will contain a copy of all content at https://bastyon.com/ ?

andyoknen commented 5 months ago

In most cases, an abnormal node shutdown (for example, power outage) does not harm the node. But in any case, I would try to avoid such scenarios and use the "pocketcoin-cli stop" or Exit button in the pocketcoin-qt menu. But it is worth noting that in rare situations, it is still possible to crash somewhere at a low level in leveldb or sqlite databases, although I have not encountered such problems for a long time.

Maybe you mean this page? https://docs.bastyon.com/en/users/0.1/node/network.html

Yes, if you synchronize a full node with the "api=1" (enabled by default) parameter, then you have a complete copy of the network data - bastyon.com uses the data in the nodes to work.