From 40b397f53f3643b7ae9ad26859b0e9286127a269 Mon Sep 17 00:00:00 2001 From: ericsson Date: Sat, 20 Jun 2020 00:09:59 +0300 Subject: [PATCH 1/2] use [[]] * num instead of just [] * num --- specs/phase1/phase1-fork.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/phase1/phase1-fork.md b/specs/phase1/phase1-fork.md index 496191e07..6e466b16d 100644 --- a/specs/phase1/phase1-fork.md +++ b/specs/phase1/phase1-fork.md @@ -111,7 +111,7 @@ def upgrade_to_phase1(pre: phase0.BeaconState) -> BeaconState: current_light_committee=CompactCommittee(), # computed after state creation next_light_committee=CompactCommittee(), # Custody game - exposed_derived_secrets=[] * EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS, + exposed_derived_secrets=[[]] * EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS, # exposed_derived_secrets will fully default to zeroes ) next_epoch = Epoch(epoch + 1) From 723784b40813aa5478e23cffc8925eaa7a1c06e4 Mon Sep 17 00:00:00 2001 From: ericsson Date: Sat, 20 Jun 2020 01:02:19 +0300 Subject: [PATCH 2/2] replace `[[]]*num` with `[()]*num` to avoild problems with mutability, as [] or () is copied --- specs/phase1/phase1-fork.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/phase1/phase1-fork.md b/specs/phase1/phase1-fork.md index 6e466b16d..e83e9ef4a 100644 --- a/specs/phase1/phase1-fork.md +++ b/specs/phase1/phase1-fork.md @@ -111,7 +111,7 @@ def upgrade_to_phase1(pre: phase0.BeaconState) -> BeaconState: current_light_committee=CompactCommittee(), # computed after state creation next_light_committee=CompactCommittee(), # Custody game - exposed_derived_secrets=[[]] * EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS, + exposed_derived_secrets=[()] * EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS, # exposed_derived_secrets will fully default to zeroes ) next_epoch = Epoch(epoch + 1)