diff --git a/scripts/alphanet_version b/scripts/alphanet_version index 66e7e307b..2c65daa94 100644 --- a/scripts/alphanet_version +++ b/scripts/alphanet_version @@ -1 +1 @@ -2017-08-17 +2017-09-21 diff --git a/scripts/gen_genesis.ml b/scripts/gen_genesis.ml new file mode 100644 index 000000000..e366d8f0a --- /dev/null +++ b/scripts/gen_genesis.ml @@ -0,0 +1,8 @@ + +let prefix = "BLockGenesisGenesisGenesisGenesisGenesis" +let suffix = "BBBBB" +let p = Base58.raw_decode (prefix ^ suffix ^ "crcCRC") +let p = String.sub p 0 (String.length p - 4) +let p = Base58.safe_encode p +let () = print_endline p + diff --git a/src/node/main/node_run_command.ml b/src/node/main/node_run_command.ml index 4600c1678..f1a387955 100644 --- a/src/node/main/node_run_command.ml +++ b/src/node/main/node_run_command.ml @@ -11,10 +11,10 @@ open Logging.Node.Main let genesis : State.Net.genesis = { time = - Time.of_notation_exn "2016-11-01T00:00:00Z" ; + Time.of_notation_exn "2017-09-21T00:00:00Z" ; block = Block_hash.of_b58check_exn - "BLockGenesisGenesisGenesisGenesisGenesisGeneskvg68z" ; + "BLockGenesisGenesisGenesisGenesisGenesisBBBBBbwcZMg" ; protocol = Protocol_hash.of_b58check_exn "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" ; diff --git a/src/node/shell/distributed_db_message.ml b/src/node/shell/distributed_db_message.ml index 91ec4e034..5b148b59d 100644 --- a/src/node/shell/distributed_db_message.ml +++ b/src/node/shell/distributed_db_message.ml @@ -174,7 +174,7 @@ let versions = let open P2p.Version in [ { name = "TEZOS" ; major = 0 ; - minor = 21 ; + minor = 23 ; } ] diff --git a/src/utils/hash.ml b/src/utils/hash.ml index 3c88e93cb..583d4881c 100644 --- a/src/utils/hash.ml +++ b/src/utils/hash.ml @@ -543,11 +543,13 @@ module Net_id = struct let size = 4 - let of_block_hash bh = + let extract bh = MBytes.substring (Block_hash.to_bytes bh) 0 4 - let hash_bytes l = of_block_hash (Block_hash.hash_bytes l) - let hash_string l = of_block_hash (Block_hash.hash_string l) + let hash_bytes l = extract (Block_hash.hash_bytes l) + let hash_string l = extract (Block_hash.hash_string l) + + let of_block_hash bh = hash_bytes [Block_hash.to_bytes bh] type Base58.data += Hash of t