From d00724ea136587fb866aebc9fd62b2f13964cc39 Mon Sep 17 00:00:00 2001 From: Benjamin Canou Date: Fri, 9 Mar 2018 14:03:07 +0100 Subject: [PATCH] Fix alphanet_constant.patch and reset the chain --- scripts/alphanet_constants.patch | 50 ++++++------------------- scripts/alphanet_version | 2 +- src/bin_node/node_run_command.ml | 4 +- src/lib_shell/distributed_db_message.ml | 2 +- 4 files changed, 15 insertions(+), 43 deletions(-) diff --git a/scripts/alphanet_constants.patch b/scripts/alphanet_constants.patch index 2dfba8983..89cdb7214 100644 --- a/scripts/alphanet_constants.patch +++ b/scripts/alphanet_constants.patch @@ -1,53 +1,25 @@ -diff --git a/scripts/alphanet_constants.patch b/scripts/alphanet_constants.patch -index 358d402b..e69de29b 100644 ---- a/scripts/alphanet_constants.patch -+++ b/scripts/alphanet_constants.patch -@@ -1,25 +0,0 @@ --diff --git a/src/proto_alpha/lib_protocol/src/constants_repr.ml b/src/proto_alpha/lib_protocol/src/constants_repr.ml --index 61e79c8a..f91ce282 100644 ----- a/src/proto_alpha/lib_protocol/src/constants_repr.ml --+++ b/src/proto_alpha/lib_protocol/src/constants_repr.ml --@@ -49,15 +49,14 @@ let read_public_key s = -- Ed25519.Public_key.of_bytes (Bytes.of_string (Hex_encode.hex_decode s)) -- -- let default = { --- cycle_length = 2048l ; --- voting_period_length = 32768l ; --+ cycle_length = 64l ; --+ voting_period_length = 1024l ; -- time_before_reward = -- Period_repr.of_seconds_exn --- (* One year in seconds *) --- Int64.(mul 365L (mul 24L 3600L)) ; --+ Int64.(mul 6L 3600L) ; (* 6 hours *) -- slot_durations = --- List.map Period_repr.of_seconds_exn [ 60L ] ; --- first_free_baking_slot = 16 ; --+ List.map Period_repr.of_seconds_exn [ 60L ; 30L ; 30L ; 30L ; 10L ] ; --+ first_free_baking_slot = 4 ; -- max_signing_slot = 15 ; -- instructions_per_transaction = 16 * 1024 ; -- proof_of_work_threshold = diff --git a/src/proto_alpha/lib_protocol/src/constants_repr.ml b/src/proto_alpha/lib_protocol/src/constants_repr.ml -index b1e8af1d..0ff3337e 100644 +index 7aedfb62..c9e3881d 100644 --- a/src/proto_alpha/lib_protocol/src/constants_repr.ml +++ b/src/proto_alpha/lib_protocol/src/constants_repr.ml -@@ -67,15 +67,15 @@ let read_public_key s = Ed25519.Public_key.of_hex_exn (`Hex s) +@@ -64,15 +64,14 @@ type constants = { + let read_public_key s = Ed25519.Public_key.of_hex_exn (`Hex s) let default = { - preserved_cycles = 5 ; - cycle_length = 2048l ; -- blocks_per_commitment = 32l ; +- voting_period_length = 32768l ; + cycle_length = 128l ; -+ blocks_per_commitment = 4l ; - voting_period_length = 32768l ; ++ voting_period_length = 1024l ; time_before_reward = Period_repr.of_seconds_exn - (* One year in seconds *) - Int64.(mul 365L (mul 24L 3600L)) ; +- (* One year in seconds *) +- Int64.(mul 365L (mul 24L 3600L)) ; ++ Int64.(mul 6L 3600L) ; (* 6 hours *) slot_durations = - List.map Period_repr.of_seconds_exn [ 60L ] ; +- first_free_baking_slot = 16 ; + List.map Period_repr.of_seconds_exn [ 60L ; 30L ; 20L ; 10L ] ; - first_free_baking_slot = 16 ; ++ first_free_baking_slot = 16 ; max_signing_slot = 15 ; max_gas = 40_000 ; + proof_of_work_threshold = diff --git a/scripts/alphanet_version b/scripts/alphanet_version index 3e3bba659..895f33ea0 100644 --- a/scripts/alphanet_version +++ b/scripts/alphanet_version @@ -1 +1 @@ -2018-03-08T06:08:24Z +2018-03-09T13:05:42Z diff --git a/src/bin_node/node_run_command.ml b/src/bin_node/node_run_command.ml index 493feb840..4dfd005a7 100644 --- a/src/bin_node/node_run_command.ml +++ b/src/bin_node/node_run_command.ml @@ -11,10 +11,10 @@ open Logging.Node.Main let genesis : State.Chain.genesis = { time = - Time.of_notation_exn "2018-03-08T06:08:24Z" ; + Time.of_notation_exn "2018-03-09T13:05:42Z" ; block = Block_hash.of_b58check_exn - "BLockGenesisGenesisGenesisGenesisGenesisd5f1edmn4BF" ; + "BLockGenesisGenesisGenesisGenesisGenesis1962feAyDRw" ; protocol = Protocol_hash.of_b58check_exn "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" ; diff --git a/src/lib_shell/distributed_db_message.ml b/src/lib_shell/distributed_db_message.ml index d83a3fa15..20eed6f08 100644 --- a/src/lib_shell/distributed_db_message.ml +++ b/src/lib_shell/distributed_db_message.ml @@ -170,7 +170,7 @@ let encoding = let versions = let open P2p_version in - [ { name = "TEZOS_2018-03-08T06:08:24Z" ; + [ { name = "TEZOS_2018-03-09T13:05:42Z" ; major = 0 ; minor = 0 ; }