Fix alphanet_constants.patch and reset the chain

This commit is contained in:
Benjamin Canou 2018-03-18 18:30:25 +01:00
parent 19d9ce1f64
commit dabf4c1578
4 changed files with 18 additions and 21 deletions

View File

@ -1,25 +1,22 @@
diff --git a/src/proto_alpha/lib_protocol/src/constants_repr.ml b/src/proto_alpha/lib_protocol/src/constants_repr.ml diff --git a/src/proto_alpha/lib_protocol/src/constants_repr.ml b/src/proto_alpha/lib_protocol/src/constants_repr.ml
index 7aedfb62..c9e3881d 100644 index 8ccaaee8..b88c1ae7 100644
--- a/src/proto_alpha/lib_protocol/src/constants_repr.ml --- a/src/proto_alpha/lib_protocol/src/constants_repr.ml
+++ b/src/proto_alpha/lib_protocol/src/constants_repr.ml +++ b/src/proto_alpha/lib_protocol/src/constants_repr.ml
@@ -64,15 +64,14 @@ type constants = { @@ -68,12 +68,12 @@ let read_public_key s = Ed25519.Public_key.of_hex_exn (`Hex s)
let read_public_key s = Ed25519.Public_key.of_hex_exn (`Hex s)
let default = { let default = {
- cycle_length = 2048l ; preserved_cycles = 5 ;
- voting_period_length = 32768l ; - blocks_per_cycle = 4096l ;
+ cycle_length = 128l ; - blocks_per_commitment = 32l ;
+ voting_period_length = 1024l ; - blocks_per_roll_snapshot = 256l ;
time_before_reward = - blocks_per_voting_period = 32768l ;
Period_repr.of_seconds_exn + blocks_per_cycle = 128l ;
- (* One year in seconds *) + blocks_per_commitment = 8l ;
- Int64.(mul 365L (mul 24L 3600L)) ; + blocks_per_roll_snapshot = 32l ;
+ Int64.(mul 6L 3600L) ; (* 6 hours *) + blocks_per_voting_period = 1024l ;
slot_durations = time_between_blocks =
- List.map Period_repr.of_seconds_exn [ 60L ] ; - List.map Period_repr.of_seconds_exn [ 60L ] ;
- first_free_baking_slot = 16 ;
+ List.map Period_repr.of_seconds_exn [ 60L ; 30L ; 20L ; 10L ] ; + 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 ; endorsers_per_block = 32 ;
max_gas = 40_000 ; max_gas = 40_000 ;
proof_of_work_threshold =

View File

@ -1 +1 @@
2018-03-09T13:05:42Z 2018-03-18T17:36:14Z

View File

@ -11,10 +11,10 @@ open Logging.Node.Main
let genesis : State.Chain.genesis = { let genesis : State.Chain.genesis = {
time = time =
Time.of_notation_exn "2018-03-09T13:05:42Z" ; Time.of_notation_exn "2018-03-18T17:36:14Z" ;
block = block =
Block_hash.of_b58check_exn Block_hash.of_b58check_exn
"BLockGenesisGenesisGenesisGenesisGenesis1962feAyDRw" ; "BLockGenesisGenesisGenesisGenesisGenesisd83c5erKDpS" ;
protocol = protocol =
Protocol_hash.of_b58check_exn Protocol_hash.of_b58check_exn
"ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" ; "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" ;

View File

@ -170,7 +170,7 @@ let encoding =
let versions = let versions =
let open P2p_version in let open P2p_version in
[ { name = "TEZOS_2018-03-09T13:05:42Z" ; [ { name = "TEZOS_2018-03-18T17:36:14Z" ;
major = 0 ; major = 0 ;
minor = 0 ; minor = 0 ;
} }