-
Notifications
You must be signed in to change notification settings - Fork 101
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
SIMD-0201: Create a Cluster Sysvar #201
base: main
Are you sure you want to change the base?
SIMD-0201: Create a Cluster Sysvar #201
Conversation
#[repr(C)] | ||
pub struct ClusterDetails { | ||
/// The genesis hash for the cluster, guaranteed for mainnet but | ||
/// possibly variable for other cluster types. | ||
pub genesis_hash: Hash, | ||
/// A named tag for the SVM chain on which the program is executing. | ||
pub blockchain: String, | ||
/// Cluster Type | ||
pub cluster_type: ClusterType, | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I would advocate for a static layout here. Can we accomplish the stated goal with IDs? Something like:
genesis_hash: [u8; 32] // (Hash)
blockchain: [u8; 8]
cluster: [u8; 8]
I guess that introduces the problem of where to "register" chain IDs, but I think we were going to have that problem anyway, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be nice to have the cluster identifier be typed but that could easily be accomplished with helpers in the SDK.
I think the static type makes sense. The chain ID is really for continuity for Devnet resets and debugging so relying on an external registry also works!
This would definitely be nice to have |
No description provided.