Skip to content

Create DAppNode Anchor package#1

Merged
3alpha merged 23 commits into
mainfrom
create-Anchor-package
Mar 4, 2026
Merged

Create DAppNode Anchor package#1
3alpha merged 23 commits into
mainfrom
create-Anchor-package

Conversation

@chong-he
Copy link
Copy Markdown
Collaborator

This is the PR to create a DAppNode package for Anchor. It currently only has anchor node ability to run a SSV node. It supports importing an existing encrypted private key. Tested and the package is able to start Anchor and use the imported key successfully. However I am sure there are still some fine details/bugs that can be tuned/improved.

Comment thread dappnode_package.json Outdated
Comment thread operator/entrypoint.sh Outdated
Comment thread setup-wizard.yml
@chong-he
Copy link
Copy Markdown
Collaborator Author

chong-he commented Feb 4, 2026

I think the current package is in a pretty good form. Tested and it works mostly, except for a bug that: currently for importing existing keys, it requires a manual restart in the first time. Details below:

When importing existing operator key, user will upload the private key encrypted_private_key.json, and provide password in the web UI. It seems that there is some race condition happens where the private key is yet to be detected by Anchor:

2026-02-02T07:02:16.186620Z  INFO Starting the Anchor client                        beacon_nodes=["http://beacon-chain.hoodi.dncore.dappnode:3500/"] execution_nodes=["http://execution.hoodi.dncore.dappnode:8545/"] execution_nodes_websocket="ws://execution.hoodi.dncore.dappnode:8546/" data_dir=/root/.anchor version="Anchor/v1.2.0"
2026-02-02T07:02:16.187094Z  INFO Creating private key
2026-02-02T07:02:16.214625Z  INFO Shutting down...                                  reason=Success("Received SIGTERM")
2026-02-02T07:02:16.317737Z  INFO Saving encrypted private key                      file=/root/.anchor/encrypted_private_key.json
2026-02-02T07:02:16.969752Z ERROR Failed to start Anchor                            reason="Unable to write encrypted private key: File exists (os error 17)"

We see that Anchor is creating a new private key. This only happens when we run anchor node and it does not detect a private key in the data directory. But, soon after, the creation of private key failed with error:

File exists

i.e., the private key exists. This is when it detects that the private key is there. Anchor shuts down, but it does not auto restart although in docker-compose.yml, the restart: unless-stopped is set. When the user manually clicks restart, then Anchor will run as usual (with the uploaded private key, not a new private key). It will be nice to have this bug solved so that users will have a seamless experience if they migrate their keys to Anchor using DAppNode. Currently waiting for reviews and feedback.

Comment thread operator/entrypoint.sh Outdated
@3alpha 3alpha merged commit cc77db8 into main Mar 4, 2026
2 checks passed
@chong-he chong-he deleted the create-Anchor-package branch March 12, 2026 03:54
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