From 3a348d1b3fda496f0d1c1064c326a0a70d521852 Mon Sep 17 00:00:00 2001 From: cryptocode <34946442+cryptocode@users.noreply.github.com> Date: Wed, 12 Sep 2018 20:37:47 +0200 Subject: [PATCH] Initial bootstrap weight for betanet (#1179) --- ci/record_rep_weights.py | 2 ++ rai/secure/CMakeLists.txt | 8 +++++++- rep_weights_beta.bin | Bin 0 -> 1504 bytes rep_weights.bin => rep_weights_live.bin | Bin 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 rep_weights_beta.bin rename rep_weights.bin => rep_weights_live.bin (100%) diff --git a/ci/record_rep_weights.py b/ci/record_rep_weights.py index 996b262b..b465cbb3 100644 --- a/ci/record_rep_weights.py +++ b/ci/record_rep_weights.py @@ -55,9 +55,11 @@ with open(args.output, 'wb') as of: of.write(weight_bytes) total += rep["weight"] count += 1 + print rep["account"] + ": " + str(rep["weight"]) if total >= supplymax: break print "wrote %d rep weights" % count + print "max supply %d" % supplymax of.close() diff --git a/rai/secure/CMakeLists.txt b/rai/secure/CMakeLists.txt index 03daa65c..38f4385c 100644 --- a/rai/secure/CMakeLists.txt +++ b/rai/secure/CMakeLists.txt @@ -11,7 +11,13 @@ else () endif () # Embed bootstrap representative weights in executable -file (READ ${CMAKE_SOURCE_DIR}/rep_weights.bin filedata HEX) +if (${ACTIVE_NETWORK} MATCHES "rai_beta_network") + set (REP_WEIGHTS_BIN_NAME "rep_weights_beta.bin") +else () + set (REP_WEIGHTS_BIN_NAME "rep_weights_live.bin") +endif () + +file (READ ${CMAKE_SOURCE_DIR}/${REP_WEIGHTS_BIN_NAME} filedata HEX) string (REGEX REPLACE "(..)" "0x\\1," filedata ${filedata}) file (WRITE ${CMAKE_BINARY_DIR}/bootstrap_weights.cpp "#include \n" "namespace rai {\n" diff --git a/rep_weights_beta.bin b/rep_weights_beta.bin new file mode 100644 index 0000000000000000000000000000000000000000..19d856bf158cff95160ff760f8ed435b1b796346 GIT binary patch literal 1504 zcmajdc|6k%90%~~v`6kMo=lE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in rename to rep_weights_live.bin