Bitcoin Forum
April 24, 2024, 11:50:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core v0.21 missing "anchors.dat" file  (Read 101 times)
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 655


I rather die on my feet than to live on my knees


View Profile
February 10, 2021, 06:19:19 PM
Merited by ABCbits (1)
 #1

Hello.

I recently had one more problem with my database and I had to run bitcoin core with -reindex-chainstate. But for some reason there was a file that just disappeared. anchors.dat just vanished from my blockchain folder and now, bitcoin core finished resync'ing but this file is not there.

What does this file is used for and how do I get it back? What data it stores?

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
1714002620
Hero Member
*
Offline Offline

Posts: 1714002620

View Profile Personal Message (Offline)

Ignore
1714002620
Reply with quote  #2

1714002620
Report to moderator
1714002620
Hero Member
*
Offline Offline

Posts: 1714002620

View Profile Personal Message (Offline)

Ignore
1714002620
Reply with quote  #2

1714002620
Report to moderator
1714002620
Hero Member
*
Offline Offline

Posts: 1714002620

View Profile Personal Message (Offline)

Ignore
1714002620
Reply with quote  #2

1714002620
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, which will follow the rules of the network no matter what miners do. Even if every miner decided to create 1000 bitcoins per block, full nodes would stick to the rules and reject those blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714002620
Hero Member
*
Offline Offline

Posts: 1714002620

View Profile Personal Message (Offline)

Ignore
1714002620
Reply with quote  #2

1714002620
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4163


View Profile
February 10, 2021, 06:22:21 PM
Merited by ABCbits (1)
 #2

It was introduced in 0.21.0. During runtime, Bitcoin Core automatically selects 2 [block relay only] nodes and the client will always attempt to connect to them at start up.

It is not really an issue. Bitcoin Core should generate another anchors.dat after you restart your client.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 655


I rather die on my feet than to live on my knees


View Profile
February 10, 2021, 06:32:57 PM
 #3

It was introduced in 0.21.0. During runtime, Bitcoin Core automatically selects 2 [block relay only] nodes and the client will always attempt to connect to them at start up.

It is not really an issue. Bitcoin Core should generate another anchors.dat after you restart your client.

Ohh ok. It's just that? I hope so.
The last  2 months or so I got 2 errors in my blockchain folder and I had to resync twice and this takes too much time. I think the reason was that my cpu was getting too hot and probably generating random errors and corrupting the database. I already cleaned up the dust and temps are like 30ºC lower so I think I'm ok now! Just hope I can keep my node up and running longer this time!

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4163


View Profile
February 10, 2021, 06:34:37 PM
 #4

Ohh ok. It's just that? I hope so.
The last  2 months or so I got 2 errors in my blockchain folder and I had to resync twice and this takes too much time. I think the reason was that my cpu was getting too hot and probably generating random errors and corrupting the database. I already cleaned up the dust and temps are like 30ºC lower so I think I'm ok now! Just hope I can keep my node up and running longer this time!
Unclean sudden shutdown is the most common cause of corruption. You might want to run some hardware diagnostics to check your RAM and your HDD. Those are the main culprits as well.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 655


I rather die on my feet than to live on my knees


View Profile
February 10, 2021, 06:52:21 PM
 #5

Ohh ok. It's just that? I hope so.
The last  2 months or so I got 2 errors in my blockchain folder and I had to resync twice and this takes too much time. I think the reason was that my cpu was getting too hot and probably generating random errors and corrupting the database. I already cleaned up the dust and temps are like 30ºC lower so I think I'm ok now! Just hope I can keep my node up and running longer this time!
Unclean sudden shutdown is the most common cause of corruption. You might want to run some hardware diagnostics to check your RAM and your HDD. Those are the main culprits as well.

Well, the thing is that last week, I got home from work and I find my bitcoin node shut down due to data corurption. So, I started reindexing the chainstate a shortly after bitcoin core seg faulted! Then, I think it was here in the forum that I opened a thread about this and someone told me it could be the cpu overheating. So, I went to check and yes, it was overheating. It was like 102ºC.

So I cleaned the fans and the dust, etc, and now laptop is way cooler. So I hope that was the only problem. The database is in an external USB drive and I might change things a bit. I'll keep only the blocks folder in that external HDD and will move the rest to my internal SSD. I think it will be able to sync faster if this happens again!

But, this anchor.dat file cannot be found in my blockcahin dir.
However, I can see this in my debug file:
Code:
2021-02-10T18:39:16Z Loaded 2 addresses from "anchors.dat"

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6679


bitcoincleanup.com / bitmixlist.org


View Profile WWW
February 10, 2021, 08:29:56 PM
Merited by ABCbits (2), darkv0rt3x (1)
 #6

Well, the thing is that last week, I got home from work and I find my bitcoin node shut down due to data corurption. So, I started reindexing the chainstate a shortly after bitcoin core seg faulted! Then, I think it was here in the forum that I opened a thread about this and someone told me it could be the cpu overheating. So, I went to check and yes, it was overheating. It was like 102ºC.

Check the data sheet for your processor and look for something called the Tjmax temperature. It's the highest temperature your CPU can operate at without overheating, and if it crosses this value there's going to be a few seconds of grace period where the OS hibernates if that's possible. If not then the system actually runs normally during that grace period and then abruptly powers off. Most processors have it at 100C but some powerful CPUs can go up to 105C. Just some overheating 101 from someone who had to deal with this too  Smiley

If you continue to have problems with the CPU overheating and you're using Linux then you need to underclock it from software using cpupower.

But, this anchor.dat file cannot be found in my blockcahin dir.
However, I can see this in my debug file:
Code:
2021-02-10T18:39:16Z Loaded 2 addresses from "anchors.dat"

Bitcoin Core creates an anchors.dat file with the two peers when it shuts down normally, and when it starts again, it deletes this file after reading the peers from it (addrdb.cpp). Perhaps the log entry you are seeing was made at the time you started Core before it shut down abnormally. In that case no anchors.dat existed because one wasn't created at shutdown, so when Core sees that anchors.dat doesn't exist at startup, it skips reading those addresses, and it will not create this file right after that check fails (but will still write this file next time it shuts down normally).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 655


I rather die on my feet than to live on my knees


View Profile
February 11, 2021, 01:08:58 PM
 #7

Well, the thing is that last week, I got home from work and I find my bitcoin node shut down due to data corurption. So, I started reindexing the chainstate a shortly after bitcoin core seg faulted! Then, I think it was here in the forum that I opened a thread about this and someone told me it could be the cpu overheating. So, I went to check and yes, it was overheating. It was like 102ºC.

Check the data sheet for your processor and look for something called the Tjmax temperature. It's the highest temperature your CPU can operate at without overheating, and if it crosses this value there's going to be a few seconds of grace period where the OS hibernates if that's possible. If not then the system actually runs normally during that grace period and then abruptly powers off. Most processors have it at 100C but some powerful CPUs can go up to 105C. Just some overheating 101 from someone who had to deal with this too  Smiley

If you continue to have problems with the CPU overheating and you're using Linux then you need to underclock it from software using cpupower.

But, this anchor.dat file cannot be found in my blockcahin dir.
However, I can see this in my debug file:
Code:
2021-02-10T18:39:16Z Loaded 2 addresses from "anchors.dat"

Bitcoin Core creates an anchors.dat file with the two peers when it shuts down normally, and when it starts again, it deletes this file after reading the peers from it (addrdb.cpp). Perhaps the log entry you are seeing was made at the time you started Core before it shut down abnormally. In that case no anchors.dat existed because one wasn't created at shutdown, so when Core sees that anchors.dat doesn't exist at startup, it skips reading those addresses, and it will not create this file right after that check fails (but will still write this file next time it shuts down normally).

Cpu us running cool now. It's an i7 3740Qm.

About anchors.dat file, I think even after shutting it down properly with bitcoin-cli stop, the file wasn't created. But I'll double check next time.



If you continue to have problems with the CPU overheating and you're using Linux then you need to underclock it from software using cpupower.

Depending on the option on OP's laptop, configure it from BIOS once is easier option.

I don't have options to downgrade the cpu clock or even multiplier. But it's not needed now. After all, all it needed was a little be of love (dust cleaning and better oiling).

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!