From 15531d591f46933bcc188daf17d85a4042824afd Mon Sep 17 00:00:00 2001 From: Adam Stone <97986246+ACStoneCL@users.noreply.github.com> Date: Wed, 30 Aug 2023 12:55:05 -0400 Subject: [PATCH 1/2] PublicKey Updates --- source/docs/casper/concepts/hash-types.md | 2 +- source/docs/casper/concepts/serialization-standard.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/docs/casper/concepts/hash-types.md b/source/docs/casper/concepts/hash-types.md index 4613716c11..c1b24529b8 100644 --- a/source/docs/casper/concepts/hash-types.md +++ b/source/docs/casper/concepts/hash-types.md @@ -34,7 +34,7 @@ For the sake of user convenience and compatibility, we expect the delivery of ha ## Hash and Key Explanations {#hash-and-key-explanations} -`PublicKey` is a 32 byte asymmetric public key, preceded by a one-byte prefix that tells whether the key is `ed25519` or `secp256k1`. +`PublicKey` is a 32 byte asymmetric public key, preceded by a one-byte prefix that tells whether the key is `ed25519` or `secp256k1`. There is a third type of `PublicKey` that refers to system contracts and it is a single `00`. `AccountHash` is a 32 byte hash of the `PublicKey` serving to identify user accounts. diff --git a/source/docs/casper/concepts/serialization-standard.md b/source/docs/casper/concepts/serialization-standard.md index e44c404ce1..a526046238 100644 --- a/source/docs/casper/concepts/serialization-standard.md +++ b/source/docs/casper/concepts/serialization-standard.md @@ -745,6 +745,7 @@ A `Map` serializes as a list of key-value tuples. There must be a well-defined o `PublicKey` serializes as a single byte tag representing the algorithm followed by 32 bytes of the `PublicKey` itself: +- If the `PublicKey` is a `System` key, the single tag byte is `0`. With this variant, the single byte of `0` is the entire key. - If the `PublicKey` is an `Ed25519` key, the single tag byte is `1` followed by the individual bytes of the serialized key. - If the `PublicKey` is a `Secp256k1` key, the single tag byte is a `2` followed by the individual bytes of the serialized key. From c9d822c3b8b6bbd01148bc3eef47c0f6bb159b60 Mon Sep 17 00:00:00 2001 From: Adam Stone <97986246+ACStoneCL@users.noreply.github.com> Date: Fri, 8 Sep 2023 08:12:23 -0400 Subject: [PATCH 2/2] Update source/docs/casper/concepts/hash-types.md Co-authored-by: Karan Dhareshwar <42871449+darthsiroftardis@users.noreply.github.com> --- source/docs/casper/concepts/hash-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/docs/casper/concepts/hash-types.md b/source/docs/casper/concepts/hash-types.md index c1b24529b8..79ee6257bf 100644 --- a/source/docs/casper/concepts/hash-types.md +++ b/source/docs/casper/concepts/hash-types.md @@ -34,7 +34,7 @@ For the sake of user convenience and compatibility, we expect the delivery of ha ## Hash and Key Explanations {#hash-and-key-explanations} -`PublicKey` is a 32 byte asymmetric public key, preceded by a one-byte prefix that tells whether the key is `ed25519` or `secp256k1`. There is a third type of `PublicKey` that refers to system contracts and it is a single `00`. +`PublicKey` is a 32 byte asymmetric public key, preceded by a one-byte prefix that tells whether the key is `ed25519` or `secp256k1`. There is a third type of `PublicKey` that refers to the system and it is a single `00`. `AccountHash` is a 32 byte hash of the `PublicKey` serving to identify user accounts.