Skip to content

Conversation

@blockiosaurus
Copy link
Contributor

No description provided.

@blockiosaurus blockiosaurus changed the title SIMD-XXXX: Create a Cluster Sysvar SIMD-0201: Create a Cluster Sysvar Nov 22, 2024
Comment on lines +44 to +54
#[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,
}
```
Copy link
Contributor

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?

Copy link
Contributor Author

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!

@Jac0xb
Copy link

Jac0xb commented Dec 28, 2024

This would definitely be nice to have

@Benhawkins18
Copy link
Collaborator

stale

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.

4 participants