From 7a3df9b030d8c16f3081dcd6207bb4d97462b3fe Mon Sep 17 00:00:00 2001 From: Giacomo Pasini Date: Tue, 11 Jan 2022 21:45:21 +0100 Subject: [PATCH] make cddl schema backwards compatible --- CIP-0015/schema.cddl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CIP-0015/schema.cddl b/CIP-0015/schema.cddl index 6c36eac254..0557a9b5e2 100644 --- a/CIP-0015/schema.cddl +++ b/CIP-0015/schema.cddl @@ -8,18 +8,20 @@ $staking_pub_key /= bytes .size 32 $ed25519_signature /= bytes .size 64 $reward_address /= bytes $nonce /= uint -$prop /= uint +$proportion /= uint $voting_purpose /= uint -delegation = (vote_key: $voting_pub_key, proportion: $prop) +legacy_key_registration = $voting_pub_key +delegation = ($voting_pub_key, $proportion) key_registration = { - 1 : [+delegation], + 1 : [+delegation] / legacy_key_registration, 2 : $staking_pub_key, 3 : $reward_address, 4 : $nonce, - 5 : $voting_purpose + ? 5 : $voting_purpose .default 0 } + registration_signature = { 1 : $ed25519_signature }