Skip to content
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

fix: checkpoint file datastore on docker #7525

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 4, 2025

Motivation

Got this error on docker if we configure chain.nHistoricalStatesFileDataStore on docker deployment

Mar-04 00:09:16.845[chain]           debug: Error processing past epoch epoch=116037, slot=3713472, root=0xcc01573089444f764834fcfc0485b023e9d361177deb4e965d6f56c35b9e72b7 - ENOENT: no such file or directory, open 'checkpoint_states/0x45c5010000000000cc01573089444f764834fcfc0485b023e9d361177deb4e965d6f56c35b9e72b7'
Error: ENOENT: no such file or directory, open 'checkpoint_states/0x45c5010000000000cc01573089444f764834fcfc0485b023e9d361177deb4e965d6f56c35b9e72b7'

Description

On Docker, need the cwd is different from data folder, need to pass dataDir option to BeaconChain so that we can use it to store checkpoint files

@twoeths
Copy link
Contributor Author

twoeths commented Mar 4, 2025

this works on feat1

$ cd /data
$ ls
beacon-2025-03-04.log  chain-db  checkpoint_states  peerstore  rcconfig.yml
$ ls checkpoint_states
0x00c50100000000001a97f8c5ae8e48ba53af214e621998bb7fc46c091c820666a0d31902b67ad3ca  0x02c50100000000008ce1c41b23acbfa2748fac0725157785ae53c7200d959b22172ce8ae355a4540
0x01c501000000000028207145f0b0dde818aeeaed7b8b0d1191a4eb2a9cd8bfbee062da1e6d1ad3be  0xffc4010000000000d0285a8ec914f53cf15e9cce336a07c4f11c666e2addec620592d5ff3640ed34
	
Mar-04 07:19:39.369[chain]         verbose: Pruned checkpoint state from memory and persisted to disk stateSlot=3711680, rootHex=0x64c6098e002eb445c1328f720e6fa1e2fc167d5f77c7740c5813c9d9987c5b13, epochBoundaryHex=0x64c6098e002eb445c1328f720e6fa1e2fc167d5f77c7740c5813c9d9987c5b13, persistedKey=0x16c501000000000064c6098e002eb445c1328f720e6fa1e2fc167d5f77c7740c5813c9d9987c5b13

@twoeths twoeths marked this pull request as ready for review March 4, 2025 07:20
@twoeths twoeths requested a review from a team as a code owner March 4, 2025 07:20
@twoeths twoeths merged commit 66dc1fc into holesky-rescue Mar 4, 2025
13 of 16 checks passed
@twoeths twoeths deleted the te/cp_file_datastore_docker branch March 4, 2025 08:40
@@ -13,9 +13,10 @@ const CHECKPOINT_FILE_NAME_LENGTH = 82;
export class FileCPStateDatastore implements CPStateDatastore {
private readonly folderPath: string;

constructor(parentDir = ".") {
// by default use the beacon folder `/beacon/checkpoint_states`
this.folderPath = path.join(parentDir, CHECKPOINT_STATES_FOLDER);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes, this is definitely wrong, can you re-open this branch against unstable please

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this ever merged on unstable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet, we should make sure to merge changes which are definitely bugs and do not do experimental stuff, I will definitely make sure to confirm we got all important changes from holesky-rescue into unstable once the network is more stable. But generally speaking, a lot of the code changes need more review and consideration to be mergable to unstable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

3 participants