feat(cluster): add load_cluster_lock (backport Charon #4130)#523
Open
emlautarom1-agent[bot] wants to merge 5 commits into
Open
feat(cluster): add load_cluster_lock (backport Charon #4130)#523emlautarom1-agent[bot] wants to merge 5 commits into
emlautarom1-agent[bot] wants to merge 5 commits into
Conversation
Introduces cluster::load::load_cluster_lock, mirroring Charon's cluster.LoadClusterLock which replaced the manifest-DAG loading path when the manifest was removed (#4130). Reads and JSON-decodes the cluster lock file, then verifies hashes and signatures; with no_verify both checks still run but failures are downgraded to warnings.
Mirrors Charon's cluster.LoadClusterLockAndVerify: reads and verifies a lock with a default no-op execution-layer client, for standalone tools that have no execution-layer endpoint to inject.
emlautarom1
approved these changes
Jul 4, 2026
emlautarom1
left a comment
Collaborator
There was a problem hiding this comment.
Manually checked, mostly boilerplate code to make the wiring easier.
iamquang95
reviewed
Jul 6, 2026
| pub async fn load_cluster_lock_and_verify( | ||
| lock_file_path: impl AsRef<Path>, | ||
| ) -> Result<Lock, LoadError> { | ||
| let eth1 = EthClient::new("").await.map_err(LoadError::Eth1)?; |
Collaborator
There was a problem hiding this comment.
new("") is a no-op eth client, so it can not verify EIP-1271 smart-contract operator
Collaborator
There was a problem hiding this comment.
This is intentional, it follows what Charon does:
In practice, this does not matter at the moment since this function is only used by commands that are out of scope in our roadmap.
varex83
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
pluto_cluster::load::load_cluster_lock, a direct cluster-lock loader and verifier that mirrors Charon'scluster.LoadClusterLock(cluster/load.go). It reads the lock file, JSON-decodes it into aLock, and verifies its hashes and signatures — the loading path theruncommand needs to obtain a cluster. Aload_cluster_lock_and_verifyconvenience wrapper (mirroringcluster.LoadClusterLockAndVerify) is also provided for standalone tools that have no execution-layer endpoint to inject.This is required as a consequence of Charon #4130, which removed the cluster manifest and replaced the manifest-DAG loading path with direct lock loading.
cluster.LoadClusterLockdid not exist in Charon v1.7.1 (there, the cluster was materialised from a manifest DAG), so this function is the backported piece Pluto needs.Pluto is dropping support for manifest files. That decision was taken some time ago, which is why the manifest-related modules (
cluster/manifest,cluster/manifestpb) were never ported to production use and remain as un-ported legacy. Because Pluto has no manifest-based loader, this direct lock loader is the only loading path — there is intentionally no manifest-file fallback like the one v1.7.1 carried.Out of scope
Cluster-UuidP2P header that #4130 also introduced (relay load-balancing) is not ported here — a separate concern, not needed until relay support lands.