From e1c966ddfa60c9f6c4db07e229157db9ab342bb7 Mon Sep 17 00:00:00 2001 From: ZettaScript <contact@zettascript.org> Date: Wed, 30 Aug 2023 21:34:33 +0200 Subject: [PATCH] dirty fixes for gdev 600 --- custom/parameters.py | 8 +++++--- custom/smiths.json | 12 ++++++------ custom/technical_committee.json | 2 +- generate_transactions_history.py | 4 +++- lib/functions.py | 10 +++++++--- main.py | 1 + 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/custom/parameters.py b/custom/parameters.py index 067e7d5..dad8bb1 100644 --- a/custom/parameters.py +++ b/custom/parameters.py @@ -1,7 +1,9 @@ from lib.utility_param import * # Global parameters -FIRST_UD_REEVAL = b_months(6) # 6 months +FIRST_UD_REEVAL = 1695444596 +FIRST_UD = 1692180000 +UD = 1068 # Genesis parameters GENESIS_CERTS_EXPIRE_ON = 15 @@ -21,8 +23,8 @@ IDTY_CONFIRM_PERIOD = b_days(7) IDTY_CREATION_PERIOD = b_days(7) MEMBERSHIP_PERIOD = b_months(12) PENDING_MEMBERSHIP_PERIOD = b_months(1) -UD_CREATION_PERIOD = b_days(1) -UD_REEVAL_PERIOD = b_months(6) +UD_CREATION_PERIOD = 86400000 +UD_REEVAL_PERIOD = 15778800 SMITH_CERT_PERIOD = b_days(1) SMITH_CERT_MAX_BY_ISSUER = 15 SMITH_CERT_MIN_RECEIVED_CERT_TO_ISSUE_CERT = 3 diff --git a/custom/smiths.json b/custom/smiths.json index f183c0f..999a830 100644 --- a/custom/smiths.json +++ b/custom/smiths.json @@ -1,8 +1,8 @@ [ - {"poka": {"certs": ["elois", "HugoTrentesaux", "tuxmain", "ManUtopiK"]}}, - {"elois": {"certs": ["HugoTrentesaux", "tuxmain", "poka", "ManUtopiK"]}}, - {"HugoTrentesaux": {"certs": ["elois", "tuxmain", "poka", "ManUtopiK"]}}, - {"tuxmain": {"certs": ["elois", "HugoTrentesaux", "poka", "ManUtopiK"]}}, - {"1000i100": {"certs": ["elois", "HugoTrentesaux", "poka", "ManUtopiK"]}}, - {"ManUtopiK": {"certs": ["elois", "HugoTrentesaux", "poka", "1000i100"]}} + {"poka": {"certs": ["HugoTrentesaux", "tuxmain", "ManUtopiK", "1000i100", "cgeek"]}}, + {"HugoTrentesaux": {"certs": ["tuxmain", "poka", "ManUtopiK", "1000i100", "cgeek"]}}, + {"tuxmain": {"certs": ["HugoTrentesaux", "poka", "ManUtopiK", "1000i100", "cgeek"]}}, + {"1000i100": {"certs": ["HugoTrentesaux", "poka", "ManUtopiK", "tuxmain", "cgeek"]}}, + {"ManUtopiK": {"certs": ["HugoTrentesaux", "poka", "1000i100", "tuxmain", "cgeek"]}}, + {"cgeek": {"certs": ["HugoTrentesaux", "poka", "1000i100", "tuxmain", "ManUtopiK"]}} ] diff --git a/custom/technical_committee.json b/custom/technical_committee.json index 372b30e..7683c1f 100644 --- a/custom/technical_committee.json +++ b/custom/technical_committee.json @@ -1 +1 @@ -["poka", "elois", "HugoTrentesaux", "tuxmain", "1000i100"] \ No newline at end of file +["poka", "HugoTrentesaux", "tuxmain", "1000i100", "cgeek"] diff --git a/generate_transactions_history.py b/generate_transactions_history.py index 52a92e8..dfe1476 100755 --- a/generate_transactions_history.py +++ b/generate_transactions_history.py @@ -16,11 +16,13 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. from lib.utility import * +import json print("Generate v2s-indexer up-to-date Ğ1 history transactions") history_final = {} -history_brut = load_json_url('inputs/transactions_history.json') +#history_brut = load_json_url('inputs/transactions_history.json') +history_brut = json.load(open("/tmp/dump/transactions_history.json", "r")) addresses_switches = load_json('custom/addresses_switches.json') for transaction in history_brut: diff --git a/lib/functions.py b/lib/functions.py index 96a48d4..3d8d726 100644 --- a/lib/functions.py +++ b/lib/functions.py @@ -1,5 +1,6 @@ from lib.utility import * from time import time +import json def get_wallets_data(): # Get wallets balances data @@ -30,7 +31,8 @@ def get_identities_and_wallets(start_timestamp): wallets = get_wallets_data() # Get Dex idty data - idty_data = load_json_url('inputs/idty.json') + #idty_data = load_json_url('inputs/idty.json') + idty_data = json.load(open("/tmp/dump/idty.json", "r")) # Get identities switches addresses_switches = load_json('custom/addresses_switches.json') @@ -44,10 +46,12 @@ def get_identities_and_wallets(start_timestamp): identity_names.update({pubkey: m['uid']}) # Get Dex certs data - certs_data = load_json_url('inputs/certs.json') + #certs_data = load_json_url('inputs/certs.json') + certs_data = json.load(open("/tmp/dump/certs.json", "r")) # Get blocs number with dates - blocs_data = load_json_url('inputs/blocs.json') + #blocs_data = load_json_url('inputs/blocs.json') + blocs_data = json.load(open("/tmp/dump/blocs.json", "r")) blocs = {} for bloc in blocs_data: blocs.update({bloc['key']: bloc['value']['medianTime']}) diff --git a/main.py b/main.py index e8fbdd3..ee2527b 100755 --- a/main.py +++ b/main.py @@ -43,6 +43,7 @@ ud_data = load_json_url('inputs/ud_value.json') FIRST_UD = ud_data[0]['value']['dividend'] gtest_genesis.update({'first_ud': FIRST_UD}) gtest_genesis.update({'first_ud_reeval': FIRST_UD_REEVAL}) +gtest_genesis.update({'ud': UD}) gtest_genesis.update({'genesis_parameters': genesis_parameters}) gtest_genesis.update({'parameters': parameters}) gtest_genesis.update({'smiths': smiths}) -- GitLab