Open StephenButtolph opened 3 months ago
Currently NodeIDs are generated based on ripemd160(sha256(TLS_CERT_DER)): https://github.com/ava-labs/avalanchego/blob/ccf785c7c87c0126aed0354d11d91173c283031b/ids/node_id.go#L79-L83
ripemd160(sha256(TLS_CERT_DER))
Only RSA and ECDSA keys are currently allowed to be used. This restriction means that we can use the public key in the TLS certificate to switch on the NodeID format: https://github.com/ava-labs/avalanchego/blob/ccf785c7c87c0126aed0354d11d91173c283031b/staking/parse.go#L124-L167
In the Etna upgrade, Ed25519 keys should be supported: https://github.com/avalanche-foundation/ACPs/tree/main/ACPs/20-ed25519-p2p
The NodeID representation of these Ed25519 keys should be the 32-byte public key representation.
NodeID
Ed25519
The Ed25519 keys will be used for ACP-77 subnet validators: https://github.com/avalanche-foundation/ACPs/tree/main/ACPs/77-reinventing-subnets#step-2-issue-a-registersubnetvalidatortx-on-the-p-chain
We must retain support for prior P-chain transactions which encode the fixed 20-byte ids.NodeID type:
ids.NodeID
The following PRs are related to this issue:
This issue has become stale because it has been open 60 days with no activity. Adding the lifecycle/frozen label will cause this issue to ignore lifecycle events.
lifecycle/frozen
Currently NodeIDs are generated based on
ripemd160(sha256(TLS_CERT_DER))
: https://github.com/ava-labs/avalanchego/blob/ccf785c7c87c0126aed0354d11d91173c283031b/ids/node_id.go#L79-L83Only RSA and ECDSA keys are currently allowed to be used. This restriction means that we can use the public key in the TLS certificate to switch on the NodeID format: https://github.com/ava-labs/avalanchego/blob/ccf785c7c87c0126aed0354d11d91173c283031b/staking/parse.go#L124-L167
In the Etna upgrade, Ed25519 keys should be supported: https://github.com/avalanche-foundation/ACPs/tree/main/ACPs/20-ed25519-p2p
The
NodeID
representation of theseEd25519
keys should be the 32-byte public key representation.The Ed25519 keys will be used for ACP-77 subnet validators: https://github.com/avalanche-foundation/ACPs/tree/main/ACPs/77-reinventing-subnets#step-2-issue-a-registersubnetvalidatortx-on-the-p-chain
We must retain support for prior P-chain transactions which encode the fixed 20-byte
ids.NodeID
type:The following PRs are related to this issue: