From 7c585480af877be865718b8b7272a2f8bd7a80cf Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 10 Nov 2022 13:43:14 +0000 Subject: [PATCH 01/11] Stressed payment address for reward payments --- CIP-0036/README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CIP-0036/README.md b/CIP-0036/README.md index 831aaddd8d..8065583a8e 100644 --- a/CIP-0036/README.md +++ b/CIP-0036/README.md @@ -26,7 +26,7 @@ We therefore need a registration transaction that serves three purposes: 1. Registers a "voting key" to be included in the sidechain and/or delegates to existing "voting key"s 2. Associates mainnet ADA to this voting key(s) -3. Declares an address to receive Catalyst rewards +3. Declares an payment address to receive Catalyst rewards Note: This schema does not attempt to differentiate delegations from direct registrations, as the two options have exactly the same format. It also does not distinguish between delegations that are made as "private" arrangements (proxy votes) @@ -43,10 +43,12 @@ A registration transaction is a regular Cardano transaction with a specific tran Notably, there should be five entries inside the metadata map: - A non-empty array of delegations, as described below; - A stake address for the network that this transaction is submitted to (to point to the Ada that is being delegated); - - A Shelley address discriminated for the same network this transaction is submitted to to receive rewards. + - A Shelley payment address discriminated for the same network this transaction is submitted to to receive rewards. - A nonce that identifies that most recent delegation - A non-negative integer that indicates the purpose of the vote. This is an optional field to allow for compatibility with CIP-15. For now, we define 0 as the value to use for Catalyst, and leave others for future use. A new registration should not invalidate a previous one with a different voting purpose value. +**Note:** The rewards address supplied must be a valid Shelley payment address (see [CIP-0019](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019)), this should not be confused with Stake address which can also be known as reward addresses. Suppling the incorrect type of reward address could result in reward payments being lost. + ### Delegation format A delegation assigns (a portion of) the ADA controlled by one or more UTxOs on mainnet to the voting key in the sidechain as voting power. The UTxOs can be identified via the stake address at some designated point in time. @@ -110,7 +112,7 @@ considered valid if the following conditions hold: The advised way to construct a nonce is to use the current slot number. This is a simple way to keep the nonce increasing without having to access the previous transaction data. -- The reward address is a Shelley address discriminated for the same network +- The reward address is a Shelley payment address discriminated for the same network this transaction is submitted to. - The delegation array is not empty - The weights in the delegation array are not all zero @@ -230,6 +232,9 @@ Fund 8: - added the `voting_purpose` field to limit the scope of the delegations. - rename the `staking_pub_key` field to `stake_credential` and `registration_signature` to `registration_witness` to allow for future credentials additions. +Fund 10: +- stipulated that `reward_address` must be a Shelley payment address, otherwise voting reward payments will not be recieved. + Fund 11: - added the `deregistration` metadata format. From 0e1d00387081494f74a9b448b201f6d013cfb526 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Fri, 11 Nov 2022 15:48:39 +0000 Subject: [PATCH 02/11] Adjusted wording and started with test vectors --- CIP-0036/README.md | 7 +-- CIP-0036/test-vector.md | 122 +++++++++++++++++++++------------------- 2 files changed, 67 insertions(+), 62 deletions(-) diff --git a/CIP-0036/README.md b/CIP-0036/README.md index 8065583a8e..91d0b71b25 100644 --- a/CIP-0036/README.md +++ b/CIP-0036/README.md @@ -43,12 +43,10 @@ A registration transaction is a regular Cardano transaction with a specific tran Notably, there should be five entries inside the metadata map: - A non-empty array of delegations, as described below; - A stake address for the network that this transaction is submitted to (to point to the Ada that is being delegated); - - A Shelley payment address discriminated for the same network this transaction is submitted to to receive rewards. + - A Shelley payment address (see [CIP-0019](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019)) discriminated for the same network this transaction is submitted to to receive rewards. - A nonce that identifies that most recent delegation - A non-negative integer that indicates the purpose of the vote. This is an optional field to allow for compatibility with CIP-15. For now, we define 0 as the value to use for Catalyst, and leave others for future use. A new registration should not invalidate a previous one with a different voting purpose value. -**Note:** The rewards address supplied must be a valid Shelley payment address (see [CIP-0019](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019)), this should not be confused with Stake address which can also be known as reward addresses. Suppling the incorrect type of reward address could result in reward payments being lost. - ### Delegation format A delegation assigns (a portion of) the ADA controlled by one or more UTxOs on mainnet to the voting key in the sidechain as voting power. The UTxOs can be identified via the stake address at some designated point in time. @@ -233,7 +231,8 @@ Fund 8: - rename the `staking_pub_key` field to `stake_credential` and `registration_signature` to `registration_witness` to allow for future credentials additions. Fund 10: -- stipulated that `reward_address` must be a Shelley payment address, otherwise voting reward payments will not be recieved. +- stipulated that `reward_address` must be a Shelley payment address, otherwise voting reward payments will not be recieved. + - **Note:** up to Fund 9 `reward_address` was a Shelley rewards address; from Fund 10 onwards, it will be a normal payment address. This will allow rewards to be paid directly from the designated Catalyst pot rather than requiring MIR transfers. Fund 11: - added the `deregistration` metadata format. diff --git a/CIP-0036/test-vector.md b/CIP-0036/test-vector.md index 66b5eaf9f1..596e5fd9cf 100644 --- a/CIP-0036/test-vector.md +++ b/CIP-0036/test-vector.md @@ -1,81 +1,87 @@ -# Test vector for CIP15 +# Test vector for CIP-0036 -### Inputs +## Keys -Payment **public** key hex -``` -3273a5316e4de228863bd7cf8dac90d57149e1a595f3dd131073b84e35546676 +Payment **public** verfication key: +```javascript +{ + "type": "PaymentVerificationKeyShelley_ed25519", + "description": "Payment Verification Key", + "cborHex": "58203bc3383b1b88a628e6fa55dbca446972d5b0cd71bcd8c133b2fa9cd3afbd1d48" +} ``` +Payment **public** address: +```javascript +bench32: "addr_test1qp7n0mudgm6gkyaf6q883nqw7ls73a89mt8exk4gkk44gaeez0pen8lxnyz4nejgal24e7zegkk53p3h6twnafy5ra2qpy52u6" -Staking **private** key hex -``` -f5beaeff7932a4164d270afde7716067582412e8977e67986cd9b456fc082e3a +HEX: "007d37ef8d46f48b13a9d00e78cc0ef7e1e8f4e5dacf935aa8b5ab54773913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54" ``` -Catalyst **private** key hex +Payment **private** signing key: +```javascript +{ + "type": "PaymentSigningKeyShelley_ed25519", + "description": "Payment Signing Key", + "cborHex": "5820b5c85fa8fb2d8cd4e4f624c206946652b6764e1af83034a79b32320ce3940dd9" +} ``` -4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89 + +Staking **public** verfication key: +```javascript +{ + "type": "StakeVerificationKeyShelley_ed25519", + "description": "Stake Verification Key", + "cborHex": "5820b5462be6a8a8ec0c4d6ee6edb83794a03df1bca43edc72b380df2ad3a982a555" +} ``` -### Intermediate steps +Staking **public** "rewards" address: +```javascript +bench32: "stake_test1uqu38suenlnfjp2eueywl42ulpv5tt2gscma9hf75j2p74qhtfeq7" -Reward address generated from staking key +HEX: "3913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54" ``` -bech32 -stake_test1uzhr5zn6akj2affzua8ylcm8t872spuf5cf6tzjrvnmwemcehgcjm -hex-encoded -e0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef +Staking **private** signing key: +```javascript +{ + "type": "StakeSigningKeyShelley_ed25519", + "description": "Stake Signing Key", + "cborHex": "58202f669f45365099666940922d47b29563d2c9f885c88a077bfea17631a7579d65" +} +``` + +Catalyst **private** key: +```javascript +4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89 ``` -Data to sign (human readable format) +## Delegation Certificate Example -Legacy version (full delegation to one key only): +### Data to sign (human readable format) + +Legacy CIP-15 version (full delegation to one key only): ```javascript 61284: { 1: '0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', - 2: '0x86870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e', - 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', + 2: '0x93bf1450ec2a3b18eebc7acfd311e695e12232efdf9ce4ac21e8b536dfacc70f', + 3: '0x3913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54', 4: 1234, }, ``` -New version: +CIP-36 version: ```javascript 61284: { - 1: [['0xa6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d1663', 1], ['0x00588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee', 3]], - 2: '0x86870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e', - 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', + 1: [['0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', 1]], + 2: '0x93bf1450ec2a3b18eebc7acfd311e695e12232efdf9ce4ac21e8b536dfacc70f', + 3: '0x007d37ef8d46f48b13a9d00e78cc0ef7e1e8f4e5dacf935aa8b5ab54773913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54', 4: 1234, 5: 0 }, ``` -Metadata (CBOR encoding) - -Legacy: -``` -a119ef64a4015820a6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d166302582086870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e03581de0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef041904d2 -``` - -New: -``` -a119ef64a50182825820a6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d16630182582000588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee0302582086870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e03581de0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef041904d20500 -``` - -Blake2b-256 hash of metadata - -Legacy: -``` -872bcb4a9e2b110a06fd5de04be5924b6c659c28a1665ecc75def13ebca6dfd8 -``` - -New: -``` -5bc0681f173efd76e1989037a3694b8a7abea22053f5940cbb5cfcdf721007d7 -``` - ### Output Legacy: @@ -83,12 +89,12 @@ Legacy: { 61284: { 1: '0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', - 2: '0x1c5d88aa573da97e5a4667e0f7c4a9c6a3d848934c3b0a5b9296b401540f2aef', - 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', + 2: '0x93bf1450ec2a3b18eebc7acfd311e695e12232efdf9ce4ac21e8b536dfacc70f', + 3: '0x3913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54', 4: 1234, - }, +}, 61285: { - 1: '0xcf8e34db193edc930faf64626a0a759dd9ce654874d4b6f255dc2aa8f52313b6dbb9aa1b162b43ed8946668edca920dd34f5a51a14130814fdc86adb6218b501' + 1: '' } } ``` @@ -97,14 +103,14 @@ New: ```javascript { 61284: { - 1: [['0xa6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d1663', 1], ['0x00588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee', 3]], - 2: '0x1c5d88aa573da97e5a4667e0f7c4a9c6a3d848934c3b0a5b9296b401540f2aef', - 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', + 1: [['0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', 1]], + 2: '0x93bf1450ec2a3b18eebc7acfd311e695e12232efdf9ce4ac21e8b536dfacc70f', + 3: '0x007d37ef8d46f48b13a9d00e78cc0ef7e1e8f4e5dacf935aa8b5ab54773913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54', 4: 1234, 5: 0 - }, +}, 61285: { - 1: '0x3aaa2e6b43c0a96e880a7d70df84dffb2a1a17b19d7a99a6ed27b91d499b32027c43acfbf6dff097af7634b2ee38c8039af259b0b6a64316f02b4ffee28a0608' + 1: '' } } -``` +``` \ No newline at end of file From 7e78c1ebb21884823af8791b65efec5f489d543a Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Fri, 11 Nov 2022 15:57:52 +0000 Subject: [PATCH 03/11] Reset changes to test vectors --- CIP-0036/test-vector.md | 120 +++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 63 deletions(-) diff --git a/CIP-0036/test-vector.md b/CIP-0036/test-vector.md index 596e5fd9cf..22371ae50b 100644 --- a/CIP-0036/test-vector.md +++ b/CIP-0036/test-vector.md @@ -1,87 +1,81 @@ -# Test vector for CIP-0036 +# Test vector for CIP15 -## Keys +### Inputs -Payment **public** verfication key: -```javascript -{ - "type": "PaymentVerificationKeyShelley_ed25519", - "description": "Payment Verification Key", - "cborHex": "58203bc3383b1b88a628e6fa55dbca446972d5b0cd71bcd8c133b2fa9cd3afbd1d48" -} +Payment **public** key hex ``` -Payment **public** address: -```javascript -bench32: "addr_test1qp7n0mudgm6gkyaf6q883nqw7ls73a89mt8exk4gkk44gaeez0pen8lxnyz4nejgal24e7zegkk53p3h6twnafy5ra2qpy52u6" - -HEX: "007d37ef8d46f48b13a9d00e78cc0ef7e1e8f4e5dacf935aa8b5ab54773913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54" +3273a5316e4de228863bd7cf8dac90d57149e1a595f3dd131073b84e35546676 ``` -Payment **private** signing key: -```javascript -{ - "type": "PaymentSigningKeyShelley_ed25519", - "description": "Payment Signing Key", - "cborHex": "5820b5c85fa8fb2d8cd4e4f624c206946652b6764e1af83034a79b32320ce3940dd9" -} +Staking **private** key hex ``` - -Staking **public** verfication key: -```javascript -{ - "type": "StakeVerificationKeyShelley_ed25519", - "description": "Stake Verification Key", - "cborHex": "5820b5462be6a8a8ec0c4d6ee6edb83794a03df1bca43edc72b380df2ad3a982a555" -} +f5beaeff7932a4164d270afde7716067582412e8977e67986cd9b456fc082e3a ``` -Staking **public** "rewards" address: -```javascript -bench32: "stake_test1uqu38suenlnfjp2eueywl42ulpv5tt2gscma9hf75j2p74qhtfeq7" - -HEX: "3913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54" +Catalyst **private** key hex ``` - -Staking **private** signing key: -```javascript -{ - "type": "StakeSigningKeyShelley_ed25519", - "description": "Stake Signing Key", - "cborHex": "58202f669f45365099666940922d47b29563d2c9f885c88a077bfea17631a7579d65" -} +4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89 ``` -Catalyst **private** key: -```javascript -4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89 +### Intermediate steps + +Reward address generated from staking key ``` +bech32 +stake_test1uzhr5zn6akj2affzua8ylcm8t872spuf5cf6tzjrvnmwemcehgcjm -## Delegation Certificate Example +hex-encoded +e0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef +``` -### Data to sign (human readable format) +Data to sign (human readable format) -Legacy CIP-15 version (full delegation to one key only): +Legacy version (full delegation to one key only): ```javascript 61284: { 1: '0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', - 2: '0x93bf1450ec2a3b18eebc7acfd311e695e12232efdf9ce4ac21e8b536dfacc70f', - 3: '0x3913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54', + 2: '0x86870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e', + 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', 4: 1234, }, ``` -CIP-36 version: +New version: ```javascript 61284: { - 1: [['0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', 1]], - 2: '0x93bf1450ec2a3b18eebc7acfd311e695e12232efdf9ce4ac21e8b536dfacc70f', - 3: '0x007d37ef8d46f48b13a9d00e78cc0ef7e1e8f4e5dacf935aa8b5ab54773913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54', + 1: [['0xa6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d1663', 1], ['0x00588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee', 3]], + 2: '0x86870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e', + 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', 4: 1234, 5: 0 }, ``` +Metadata (CBOR encoding) + +Legacy: +``` +a119ef64a4015820a6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d166302582086870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e03581de0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef041904d2 +``` + +New: +``` +a119ef64a50182825820a6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d16630182582000588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee0302582086870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e03581de0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef041904d20500 +``` + +Blake2b-256 hash of metadata + +Legacy: +``` +872bcb4a9e2b110a06fd5de04be5924b6c659c28a1665ecc75def13ebca6dfd8 +``` + +New: +``` +5bc0681f173efd76e1989037a3694b8a7abea22053f5940cbb5cfcdf721007d7 +``` + ### Output Legacy: @@ -89,12 +83,12 @@ Legacy: { 61284: { 1: '0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', - 2: '0x93bf1450ec2a3b18eebc7acfd311e695e12232efdf9ce4ac21e8b536dfacc70f', - 3: '0x3913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54', + 2: '0x1c5d88aa573da97e5a4667e0f7c4a9c6a3d848934c3b0a5b9296b401540f2aef', + 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', 4: 1234, -}, + }, 61285: { - 1: '' + 1: '0xcf8e34db193edc930faf64626a0a759dd9ce654874d4b6f255dc2aa8f52313b6dbb9aa1b162b43ed8946668edca920dd34f5a51a14130814fdc86adb6218b501' } } ``` @@ -103,14 +97,14 @@ New: ```javascript { 61284: { - 1: [['0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', 1]], - 2: '0x93bf1450ec2a3b18eebc7acfd311e695e12232efdf9ce4ac21e8b536dfacc70f', - 3: '0x007d37ef8d46f48b13a9d00e78cc0ef7e1e8f4e5dacf935aa8b5ab54773913c3999fe6990559e648efd55cf85945ad488637d2dd3ea4941f54', + 1: [['0xa6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d1663', 1], ['0x00588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee', 3]], + 2: '0x1c5d88aa573da97e5a4667e0f7c4a9c6a3d848934c3b0a5b9296b401540f2aef', + 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', 4: 1234, 5: 0 -}, + }, 61285: { - 1: '' + 1: '0x3aaa2e6b43c0a96e880a7d70df84dffb2a1a17b19d7a99a6ed27b91d499b32027c43acfbf6dff097af7634b2ee38c8039af259b0b6a64316f02b4ffee28a0608' } } ``` \ No newline at end of file From d42ca734ddb3144728f6a49b36d832e026bf750c Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 16 Nov 2022 14:40:02 +0000 Subject: [PATCH 04/11] Added test vectors --- CIP-0036/test-vector.md | 153 ++++++++++++++++++++++++---------------- 1 file changed, 94 insertions(+), 59 deletions(-) diff --git a/CIP-0036/test-vector.md b/CIP-0036/test-vector.md index 22371ae50b..5f28ad00b8 100644 --- a/CIP-0036/test-vector.md +++ b/CIP-0036/test-vector.md @@ -1,110 +1,145 @@ -# Test vector for CIP15 +# Test Vector for CIP-0036 -### Inputs +## Keys -Payment **public** key hex +Payment **private** signing key: ``` -3273a5316e4de228863bd7cf8dac90d57149e1a595f3dd131073b84e35546676 +{ + "type": "PaymentSigningKeyShelley_ed25519", + "description": "Payment Signing Key", + "cborHex": "5820614fdfe13d403bee2014570b190d81851f17d8daca0b6dd1ce33014403191003" +} +``` + +Payment **public** verification key: +``` +{ + "type": "PaymentVerificationKeyShelley_ed25519", + "description": "Payment Verification Key", + "cborHex": "58207a24dd8e692cec94b612c2ec81f508aada96557c2052a447b9d197b006fa7d2a" +} +``` + +Staking **private** signing key: +``` +{ + "type": "StakeSigningKeyShelley_ed25519", + "description": "Stake Signing Key", + "cborHex": "5820852fa5d17df3efdfdcd6dac53ec9fe5593f3c0bd7cadb3c2af76c7e15dfa8a5c" +} ``` -Staking **private** key hex +Staking **public** verification key: ``` -f5beaeff7932a4164d270afde7716067582412e8977e67986cd9b456fc082e3a +{ + "type": "StakeVerificationKeyShelley_ed25519", + "description": "Stake Verification Key", + "cborHex": "5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369" +} ``` -Catalyst **private** key hex +Catalyst **private** signing key hex: ``` 4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89 ``` -### Intermediate steps +## Addresses +- This example uses Pre-Production testnet (testnet-magic 1). + +Payment Address: +``` +bench32: "addr_test1qprhw4s70k0vzyhvxp6h97hvrtlkrlcvlmtgmaxdtjz87xrjkctk27ypuv9dzlzxusqse89naweygpjn5dxnygvus05sdq9h07" + +hex-encoded: "004777561e7d9ec112ec307572faec1aff61ff0cfed68df4cd5c847f1872b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9" +```` -Reward address generated from staking key +Staking Address: ``` -bech32 -stake_test1uzhr5zn6akj2affzua8ylcm8t872spuf5cf6tzjrvnmwemcehgcjm +bench32: "stake_test1upetv9m90zq7xzk303rwgqgvnje7hvjyqef6xnfjyxwg86gzpmj80" -hex-encoded -e0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef +hex-encoded: "e072b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9" ``` -Data to sign (human readable format) +## Certificate Example + +- Assigning all voting power to a single voting key. -Legacy version (full delegation to one key only): +### Human Readable Format + +Legacy CIP-15 version: ```javascript -61284: { - 1: '0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', - 2: '0x86870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e', - 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', - 4: 1234, -}, +"61284": { + "1": "0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0", + "2": "0x5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", + "3": "0xe072b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9", + "4": 1234 +} ``` -New version: +CIP-36 version: ```javascript -61284: { - 1: [['0xa6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d1663', 1], ['0x00588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee', 3]], - 2: '0x86870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e', - 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', - 4: 1234, - 5: 0 -}, +"61284": { + "1": [["0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0", 1]], + "2": "0x5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", + "3": "0x004777561e7d9ec112ec307572faec1aff61ff0cfed68df4cd5c847f1872b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9", + "4": 1234, + "5": 0 +} ``` +### CBOR Encoding -Metadata (CBOR encoding) - -Legacy: +Legacy CIP-15 version: ``` -a119ef64a4015820a6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d166302582086870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e03581de0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef041904d2 +a119ef64a40158200036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0025820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e43236903581de072b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9041904d2 ``` -New: +CIP-36 version: ``` -a119ef64a50182825820a6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d16630182582000588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee0302582086870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e03581de0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef041904d20500 +a119ef64a501818258200036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a001025820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369035839004777561e7d9ec112ec307572faec1aff61ff0cfed68df4cd5c847f1872b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9041904d20500 ``` -Blake2b-256 hash of metadata +### Blake2b-256 Hash -Legacy: +Legacy CIP-15 version: ``` -872bcb4a9e2b110a06fd5de04be5924b6c659c28a1665ecc75def13ebca6dfd8 +9946e71b5f6c16150cf431910a0f7dbb8084a992577847802e60d32becb3d6be ``` -New: +CIP-36 version: ``` -5bc0681f173efd76e1989037a3694b8a7abea22053f5940cbb5cfcdf721007d7 +3110fbad72589a80de7fc174310e92dac35bbfece1690c2dce53c2235a9776fa ``` -### Output +## Metadata Example with Witness -Legacy: +Legacy CIP-15 version: ```javascript { - 61284: { - 1: '0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0', - 2: '0x1c5d88aa573da97e5a4667e0f7c4a9c6a3d848934c3b0a5b9296b401540f2aef', - 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', - 4: 1234, - }, - 61285: { - 1: '0xcf8e34db193edc930faf64626a0a759dd9ce654874d4b6f255dc2aa8f52313b6dbb9aa1b162b43ed8946668edca920dd34f5a51a14130814fdc86adb6218b501' + "61284": { + "1": "0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0", + "2": "0x5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", + "3": "0xe072b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9", + "4": 1234 + } + "61285": { + "1": "0xa9ec8735804c6c4c5c4a02e9589c65508ec7060063b2d7dbeba82d1cbfa1b8be6b457f95d4ead5e8b454b989624fa44e0b89a64d089fdc0a6a1268fef4876d0f" } } ``` -New: +CIP-36 version: ```javascript { - 61284: { - 1: [['0xa6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d1663', 1], ['0x00588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee', 3]], - 2: '0x1c5d88aa573da97e5a4667e0f7c4a9c6a3d848934c3b0a5b9296b401540f2aef', - 3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef', - 4: 1234, - 5: 0 + "61284": { + "1": [["0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0", 1]], + "2": "0x5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", + "3": "0x004777561e7d9ec112ec307572faec1aff61ff0cfed68df4cd5c847f1872b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9", + "4": 1234, + "5": 0 }, - 61285: { - 1: '0x3aaa2e6b43c0a96e880a7d70df84dffb2a1a17b19d7a99a6ed27b91d499b32027c43acfbf6dff097af7634b2ee38c8039af259b0b6a64316f02b4ffee28a0608' + "61285": { + "1": "0xcbb96ba1596fafc18eec84e306feea3067ba1c6ace95b11af820bcbd53837ef32bdcf28176749061e1f2a1300d4df98c80582722786e40cf330072d0b78a7408" } } ``` \ No newline at end of file From e74a3dbf98f83ef10a90743cab77049b7e2596a7 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 17 Nov 2022 13:39:42 +0000 Subject: [PATCH 05/11] Typos + added public gov key to test vectors --- CIP-0036/test-vector.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/CIP-0036/test-vector.md b/CIP-0036/test-vector.md index 5f28ad00b8..2581960d62 100644 --- a/CIP-0036/test-vector.md +++ b/CIP-0036/test-vector.md @@ -2,6 +2,8 @@ ## Keys +**Note:** Not all keys are required for certificate recreation. + Payment **private** signing key: ``` { @@ -37,10 +39,22 @@ Staking **public** verification key: "cborHex": "5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369" } ``` +Governance (Catalyst) **public** verification key: +``` +{ + "type": "PaymentVerificationKeyShelley_ed25519", + "description": "Governance Verification Key", + "cborHex": "58200036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0" +} +``` -Catalyst **private** signing key hex: +Governance (Catalyst) **private** signing key: ``` -4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89 +{ + "type": "PaymentSigningKeyShelley_ed25519", + "description": "Governance Signing Key", + "cborHex": "4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89" +} ``` ## Addresses @@ -48,14 +62,14 @@ Catalyst **private** signing key hex: Payment Address: ``` -bench32: "addr_test1qprhw4s70k0vzyhvxp6h97hvrtlkrlcvlmtgmaxdtjz87xrjkctk27ypuv9dzlzxusqse89naweygpjn5dxnygvus05sdq9h07" +bech32: "addr_test1qprhw4s70k0vzyhvxp6h97hvrtlkrlcvlmtgmaxdtjz87xrjkctk27ypuv9dzlzxusqse89naweygpjn5dxnygvus05sdq9h07" hex-encoded: "004777561e7d9ec112ec307572faec1aff61ff0cfed68df4cd5c847f1872b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9" ```` Staking Address: ``` -bench32: "stake_test1upetv9m90zq7xzk303rwgqgvnje7hvjyqef6xnfjyxwg86gzpmj80" +bech32: "stake_test1upetv9m90zq7xzk303rwgqgvnje7hvjyqef6xnfjyxwg86gzpmj80" hex-encoded: "e072b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9" ``` @@ -70,7 +84,7 @@ Legacy CIP-15 version: ```javascript "61284": { "1": "0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0", - "2": "0x5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", + "2": "0xe3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", "3": "0xe072b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9", "4": 1234 } @@ -80,7 +94,7 @@ CIP-36 version: ```javascript "61284": { "1": [["0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0", 1]], - "2": "0x5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", + "2": "0xe3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", "3": "0x004777561e7d9ec112ec307572faec1aff61ff0cfed68df4cd5c847f1872b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9", "4": 1234, "5": 0 @@ -118,7 +132,7 @@ Legacy CIP-15 version: { "61284": { "1": "0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0", - "2": "0x5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", + "2": "0xe3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", "3": "0xe072b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9", "4": 1234 } @@ -133,7 +147,7 @@ CIP-36 version: { "61284": { "1": [["0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0", 1]], - "2": "0x5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", + "2": "0xe3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", "3": "0x004777561e7d9ec112ec307572faec1aff61ff0cfed68df4cd5c847f1872b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9", "4": 1234, "5": 0 From 3209feb7ca66b80d08f621369f8568733a4a4fff Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Tue, 22 Nov 2022 15:05:59 +0000 Subject: [PATCH 06/11] Missed comma --- CIP-0036/test-vector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CIP-0036/test-vector.md b/CIP-0036/test-vector.md index 2581960d62..385d00735c 100644 --- a/CIP-0036/test-vector.md +++ b/CIP-0036/test-vector.md @@ -135,7 +135,7 @@ Legacy CIP-15 version: "2": "0xe3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369", "3": "0xe072b617657881e30ad17c46e4010c9cb3ebb2440653a34d32219c83e9", "4": 1234 - } + }, "61285": { "1": "0xa9ec8735804c6c4c5c4a02e9589c65508ec7060063b2d7dbeba82d1cbfa1b8be6b457f95d4ead5e8b454b989624fa44e0b89a64d089fdc0a6a1268fef4876d0f" } From 93b5e3a51c87cb90cc06156663685f05758bc4f8 Mon Sep 17 00:00:00 2001 From: Matthias Benkort <5680256+KtorZ@users.noreply.github.com> Date: Wed, 30 Nov 2022 09:57:59 +0100 Subject: [PATCH 07/11] Update CIP-0036/README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ján Mazák <42575685+janmazak@users.noreply.github.com> --- CIP-0036/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CIP-0036/README.md b/CIP-0036/README.md index 91d0b71b25..f9fcfb1b67 100644 --- a/CIP-0036/README.md +++ b/CIP-0036/README.md @@ -26,7 +26,7 @@ We therefore need a registration transaction that serves three purposes: 1. Registers a "voting key" to be included in the sidechain and/or delegates to existing "voting key"s 2. Associates mainnet ADA to this voting key(s) -3. Declares an payment address to receive Catalyst rewards +3. Declares a payment address to receive Catalyst rewards Note: This schema does not attempt to differentiate delegations from direct registrations, as the two options have exactly the same format. It also does not distinguish between delegations that are made as "private" arrangements (proxy votes) From c64f527852bb09878fe935bbd9a1fed54f62c251 Mon Sep 17 00:00:00 2001 From: Ryan Williams <44342099+Ryun1@users.noreply.github.com> Date: Mon, 5 Dec 2022 21:00:36 +0000 Subject: [PATCH 08/11] Update CIP-0036/README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ján Mazák <42575685+janmazak@users.noreply.github.com> --- CIP-0036/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CIP-0036/README.md b/CIP-0036/README.md index f9fcfb1b67..95e466f37d 100644 --- a/CIP-0036/README.md +++ b/CIP-0036/README.md @@ -232,7 +232,7 @@ Fund 8: Fund 10: - stipulated that `reward_address` must be a Shelley payment address, otherwise voting reward payments will not be recieved. - - **Note:** up to Fund 9 `reward_address` was a Shelley rewards address; from Fund 10 onwards, it will be a normal payment address. This will allow rewards to be paid directly from the designated Catalyst pot rather than requiring MIR transfers. + - **Note:** up to Fund 9 `reward_address` was a Shelley reward address (a.k.a. stake address); from Fund 10 onwards, it will be a normal payment address. This will allow rewards to be paid directly from the designated Catalyst pot rather than requiring MIR transfers. Fund 11: - added the `deregistration` metadata format. From 0ea46524510424138fb40c8e977786f8842f6c4c Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 28 Dec 2022 16:53:02 +0000 Subject: [PATCH 09/11] Removed cardano-cli specific notation from test vectors, just leaving CBOR hex --- CIP-0036/test-vector.md | 48 +++++++++++------------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/CIP-0036/test-vector.md b/CIP-0036/test-vector.md index 385d00735c..b298ca8c40 100644 --- a/CIP-0036/test-vector.md +++ b/CIP-0036/test-vector.md @@ -4,57 +4,33 @@ **Note:** Not all keys are required for certificate recreation. -Payment **private** signing key: +Payment **private** signing key cborHex: ``` -{ - "type": "PaymentSigningKeyShelley_ed25519", - "description": "Payment Signing Key", - "cborHex": "5820614fdfe13d403bee2014570b190d81851f17d8daca0b6dd1ce33014403191003" -} +5820614fdfe13d403bee2014570b190d81851f17d8daca0b6dd1ce33014403191003 ``` -Payment **public** verification key: +Payment **public** verification cborHex: ``` -{ - "type": "PaymentVerificationKeyShelley_ed25519", - "description": "Payment Verification Key", - "cborHex": "58207a24dd8e692cec94b612c2ec81f508aada96557c2052a447b9d197b006fa7d2a" -} +58207a24dd8e692cec94b612c2ec81f508aada96557c2052a447b9d197b006fa7d2a ``` -Staking **private** signing key: +Staking **private** signing key cborHex: ``` -{ - "type": "StakeSigningKeyShelley_ed25519", - "description": "Stake Signing Key", - "cborHex": "5820852fa5d17df3efdfdcd6dac53ec9fe5593f3c0bd7cadb3c2af76c7e15dfa8a5c" -} +5820852fa5d17df3efdfdcd6dac53ec9fe5593f3c0bd7cadb3c2af76c7e15dfa8a5c ``` -Staking **public** verification key: +Staking **public** verification key cborHex: ``` -{ - "type": "StakeVerificationKeyShelley_ed25519", - "description": "Stake Verification Key", - "cborHex": "5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369" -} +5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369 ``` -Governance (Catalyst) **public** verification key: +Governance (Catalyst) **public** verification key cborHex: ``` -{ - "type": "PaymentVerificationKeyShelley_ed25519", - "description": "Governance Verification Key", - "cborHex": "58200036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0" -} +58200036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0 ``` -Governance (Catalyst) **private** signing key: +Governance (Catalyst) **private** signing key cborHex: ``` -{ - "type": "PaymentSigningKeyShelley_ed25519", - "description": "Governance Signing Key", - "cborHex": "4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89" -} +4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89 ``` ## Addresses From 3eb58be7b4cae8c1bc1c05a439f8139f5ec5f2c4 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Mon, 9 Jan 2023 11:06:09 +0000 Subject: [PATCH 10/11] Renamed rewards_address field to payment_address --- CIP-0036/README.md | 12 ++++++------ CIP-0036/schema.cddl | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CIP-0036/README.md b/CIP-0036/README.md index 95e466f37d..d9658354a6 100644 --- a/CIP-0036/README.md +++ b/CIP-0036/README.md @@ -43,7 +43,7 @@ A registration transaction is a regular Cardano transaction with a specific tran Notably, there should be five entries inside the metadata map: - A non-empty array of delegations, as described below; - A stake address for the network that this transaction is submitted to (to point to the Ada that is being delegated); - - A Shelley payment address (see [CIP-0019](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019)) discriminated for the same network this transaction is submitted to to receive rewards. + - A Shelley payment address (see [CIP-0019](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019)) discriminated for the same network this transaction is submitted to, to receive rewards. - A nonce that identifies that most recent delegation - A non-negative integer that indicates the purpose of the vote. This is an optional field to allow for compatibility with CIP-15. For now, we define 0 as the value to use for Catalyst, and leave others for future use. A new registration should not invalidate a previous one with a different voting purpose value. @@ -92,7 +92,7 @@ Voting registration example: 1: [["0xa6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d1663", 1], ["0x00588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee", 3]], // stake_pub - CBOR byte array 2: "0xad4b948699193634a39dd56f779a2951a24779ad52aa7916f6912b8ec4702cee", - // reward_address - CBOR byte array + // payment_address - CBOR byte array 3: "0x00588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee47b60edc7772855324c85033c638364214cbfc6627889f81c4", // nonce 4: 5479467 @@ -101,7 +101,7 @@ Voting registration example: } ``` The entries under keys 1, 2, 3, 4 and 5 represent the Catalyst delegation array, -the staking credential on the Cardano network, the address to receive rewards, +the staking credential on the Cardano network, the payment address to receive rewards, a nonce, and a voting purpose, respectively. A registration with these metadata will be considered valid if the following conditions hold: @@ -110,7 +110,7 @@ considered valid if the following conditions hold: The advised way to construct a nonce is to use the current slot number. This is a simple way to keep the nonce increasing without having to access the previous transaction data. -- The reward address is a Shelley payment address discriminated for the same network +- The payment address is a Shelley payment address discriminated for the same network this transaction is submitted to. - The delegation array is not empty - The weights in the delegation array are not all zero @@ -231,8 +231,8 @@ Fund 8: - rename the `staking_pub_key` field to `stake_credential` and `registration_signature` to `registration_witness` to allow for future credentials additions. Fund 10: -- stipulated that `reward_address` must be a Shelley payment address, otherwise voting reward payments will not be recieved. - - **Note:** up to Fund 9 `reward_address` was a Shelley reward address (a.k.a. stake address); from Fund 10 onwards, it will be a normal payment address. This will allow rewards to be paid directly from the designated Catalyst pot rather than requiring MIR transfers. +- Replaced the `reward_address` field with `payment_address` field, keeping it at index 3. Stipulating that `payment_address` must be a Shelley payment address, otherwise voting reward payments will not be received. + - **Note:** up to Catalyst's Fund 9, voting rewards were paid via MIR transfer to a stake address provided within the `reward_address` field. From Fund 10 onwards, a regular payment address must be provided in the `payment_address` field to receive voting rewards. This allows Catalyst to avoid MIR transfers and instead pay voting rewards via regular transactions. Fund 11: - added the `deregistration` metadata format. diff --git a/CIP-0036/schema.cddl b/CIP-0036/schema.cddl index 6f18b0e6a2..fcc6ed7af7 100644 --- a/CIP-0036/schema.cddl +++ b/CIP-0036/schema.cddl @@ -4,7 +4,7 @@ registration_cbor = { } $voting_pub_key /= bytes .size 32 -$reward_address /= bytes +$payment_address /= bytes $nonce /= uint $weight /= uint .size 4 $voting_purpose /= uint @@ -27,7 +27,7 @@ $ed25519_signature /= bytes .size 64 key_registration = { 1 : [+delegation] / legacy_key_registration, 2 : $stake_credential, - 3 : $reward_address, + 3 : $payment_address, 4 : $nonce, ? 5 : $voting_purpose .default 0 } From 1397389d6c4eff412dcaaf8b014898ac06a497b3 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Fri, 20 Jan 2023 13:32:56 +0000 Subject: [PATCH 11/11] Addressed @KtorZ comments --- CIP-0036/test-vector.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/CIP-0036/test-vector.md b/CIP-0036/test-vector.md index b298ca8c40..e9b8ebbb29 100644 --- a/CIP-0036/test-vector.md +++ b/CIP-0036/test-vector.md @@ -4,31 +4,32 @@ **Note:** Not all keys are required for certificate recreation. -Payment **private** signing key cborHex: +Payment **private** signing key Hex: ``` -5820614fdfe13d403bee2014570b190d81851f17d8daca0b6dd1ce33014403191003 +614fdfe13d403bee2014570b190d81851f17d8daca0b6dd1ce33014403191003 ``` -Payment **public** verification cborHex: +Payment **public** verification Hex: ``` -58207a24dd8e692cec94b612c2ec81f508aada96557c2052a447b9d197b006fa7d2a +7a24dd8e692cec94b612c2ec81f508aada96557c2052a447b9d197b006fa7d2a ``` -Staking **private** signing key cborHex: +Staking **private** signing key Hex: ``` -5820852fa5d17df3efdfdcd6dac53ec9fe5593f3c0bd7cadb3c2af76c7e15dfa8a5c +852fa5d17df3efdfdcd6dac53ec9fe5593f3c0bd7cadb3c2af76c7e15dfa8a5c ``` -Staking **public** verification key cborHex: +Staking **public** verification key Hex: ``` -5820e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369 +e3cd2404c84de65f96918f18d5b445bcb933a7cda18eeded7945dd191e432369 ``` -Governance (Catalyst) **public** verification key cborHex: + +CIP-36 Vote **public** verification key Hex: ``` -58200036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0 +0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0 ``` -Governance (Catalyst) **private** signing key cborHex: +CIP-36 Vote **extended private** signing key Hex: ``` 4820f7ce221e177c8eae2b2ee5c1f1581a0d88ca5c14329d8f2389e77a465655c27662621bfb99cb9445bf8114cc2a630afd2dd53bc88c08c5f2aed8e9c7cb89 ```