From 25d7d82131701372eb143a94bbb3b155e0833636 Mon Sep 17 00:00:00 2001 From: Sergio Sotnikov Date: Thu, 18 Nov 2021 21:05:37 +0300 Subject: [PATCH] rename v1.4.0 to v0.1.4 --- HowTo.md | 4 ++-- HowToReinit.md | 10 +++++----- cmd/dkg_reinitializer/main.go | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/HowTo.md b/HowTo.md index 3ca57a36..788712f9 100644 --- a/HowTo.md +++ b/HowTo.md @@ -416,11 +416,11 @@ shasum keys.json If the checksum is correct for all participants, run: ``` -./dc4bc_dkg_reinitializer reinit -i dc4bc_async_ceremony_13_12_2020_dump.csv -o reinit.json -k keys.json --adapt_1_4_0 --skip-header +./dc4bc_dkg_reinitializer reinit -i dc4bc_async_ceremony_13_12_2020_dump.csv -o reinit.json -k keys.json --adapt_0_1_4 --skip-header ``` In this example the message will be saved to ```reinit.json``` file. -* `--adapt_1_4_0`: this flag patches the old append log so that it is compatible with the latest version. You can see the utility source code [here](https://github.com/lidofinance/dc4bc/blob/eb72f74e25d910fc70c4a77158fed07435d48d7c/client/client.go#L679); +* `--adapt_0_1_4`: this flag patches the old append log so that it is compatible with the latest version. You can see the utility source code [here](https://github.com/lidofinance/dc4bc/blob/eb72f74e25d910fc70c4a77158fed07435d48d7c/client/client.go#L679); * `-k keys.json`: new communication public keys from this file will be added to `reinit.json`. **Note: all participants can run this command and check the `reinit.json` file checksum:** diff --git a/HowToReinit.md b/HowToReinit.md index 938eaafe..89a89b22 100644 --- a/HowToReinit.md +++ b/HowToReinit.md @@ -1,8 +1,8 @@ - # How to Reinit from version 1.4.0 + # How to Reinit from version 0.1.4 This document describes how to make a signature using: -1. Version 2.0.0, -2. Append log from version 1.4.0; +1. Version 2.0.0 or above, +2. Append log from version 0.1.4; 3. The Airgapped private key mnemonic that was saved during the master ceremony setup. ### Initial setup @@ -81,10 +81,10 @@ shasum keys.json ``` If the checksums are correct for all participants, everyone should run: ```shell -./dc4bc_dkg_reinitializer reinit -i dc4bc_async_ceremony_13_12_2020_dump.csv -o reinit.json -k keys.json --adapt_1_4_0 --skip-header +./dc4bc_dkg_reinitializer reinit -i dc4bc_async_ceremony_13_12_2020_dump.csv -o reinit.json -k keys.json --adapt_0_1_4 --skip-header ``` In this example the message will be saved to ```reinit.json``` file. -* `--adapt_1_4_0`: this flag patches the old append log so that it is compatible with the latest version. You can see the utility source code [here](https://github.com/lidofinance/dc4bc/blob/eb72f74e25d910fc70c4a77158fed07435d48d7c/client/client.go#L679); +* `--adapt_0_1_4`: this flag patches the old append log so that it is compatible with the latest version. You can see the utility source code [here](https://github.com/lidofinance/dc4bc/blob/eb72f74e25d910fc70c4a77158fed07435d48d7c/client/client.go#L679); * `-k keys.json`: new communication public keys from this file will be added to `reinit.json`. **All participants should run this command and check the `reinit.json` file checksum:** diff --git a/cmd/dkg_reinitializer/main.go b/cmd/dkg_reinitializer/main.go index 232522d0..b047f740 100644 --- a/cmd/dkg_reinitializer/main.go +++ b/cmd/dkg_reinitializer/main.go @@ -23,7 +23,7 @@ const ( flagSeparator = "separator" flagColumnIndex = "column" flagSkipHeader = "skip-header" - flagAdapt140 = "adapt_1_4_0" + flagAdapt014 = "adapt_0_1_4" ) var rootCmd = &cobra.Command{ @@ -38,7 +38,7 @@ func init() { rootCmd.PersistentFlags().StringP(flagSeparator, "s", ";", "Separator") rootCmd.PersistentFlags().IntP(flagColumnIndex, "p", 4, "Column index (with message JSON)") rootCmd.PersistentFlags().Bool(flagSkipHeader, false, "Skip header (if present)") - rootCmd.PersistentFlags().Bool(flagAdapt140, true, "Adapt 1.4.0 dump") + rootCmd.PersistentFlags().Bool(flagAdapt014, true, "Adapt 0.1.4 dump") } func reinit() *cobra.Command { @@ -71,11 +71,11 @@ func reinit() *cobra.Command { return fmt.Errorf("failed to generate reDKG message: %v", err) } - // Adapt from 1.4.0 if required. - if adapt140, _ := cmd.Flags().GetBool(flagAdapt140); adapt140 { + // Adapt from 0.1.4 if required. + if adapt014, _ := cmd.Flags().GetBool(flagAdapt014); adapt014 { reDKG, err = node.GetAdaptedReDKG(reDKG) if err != nil { - return fmt.Errorf("failed to adapt reinit DKG message from 1.4.0: %v", err) + return fmt.Errorf("failed to adapt reinit DKG message from 0.1.4: %v", err) } }