ratio1 3.4.80__py3-none-any.whl → 3.4.82__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ratio1/_ver.py +1 -1
- ratio1/base/generic_session.py +24 -12
- ratio1/const/evm_net.py +8 -0
- {ratio1-3.4.80.dist-info → ratio1-3.4.82.dist-info}/METADATA +1 -1
- {ratio1-3.4.80.dist-info → ratio1-3.4.82.dist-info}/RECORD +8 -8
- {ratio1-3.4.80.dist-info → ratio1-3.4.82.dist-info}/WHEEL +0 -0
- {ratio1-3.4.80.dist-info → ratio1-3.4.82.dist-info}/entry_points.txt +0 -0
- {ratio1-3.4.80.dist-info → ratio1-3.4.82.dist-info}/licenses/LICENSE +0 -0
ratio1/_ver.py
CHANGED
ratio1/base/generic_session.py
CHANGED
|
@@ -117,6 +117,7 @@ class GenericSession(BaseDecentrAIObject):
|
|
|
117
117
|
use_home_folder=True,
|
|
118
118
|
eth_enabled=True,
|
|
119
119
|
auto_configuration=True,
|
|
120
|
+
run_dauth=True,
|
|
120
121
|
debug_env=False,
|
|
121
122
|
evm_network=None,
|
|
122
123
|
**kwargs
|
|
@@ -211,8 +212,11 @@ class GenericSession(BaseDecentrAIObject):
|
|
|
211
212
|
auto_configuration : bool, optional
|
|
212
213
|
If True, the SDK will attempt to complete the dauth process automatically.
|
|
213
214
|
Defaults to True.
|
|
214
|
-
|
|
215
|
-
|
|
215
|
+
|
|
216
|
+
run_dauth : bool, optional
|
|
217
|
+
If True, the SDK will run the dAuth process.
|
|
218
|
+
Defaults to True. Will be set to true if auto_configuration is enabled.
|
|
219
|
+
|
|
216
220
|
use_home_folder : bool, optional
|
|
217
221
|
If True, the SDK will use the home folder as the base folder for the local cache.
|
|
218
222
|
NOTE: if you need to use development style ./_local_cache, set this to False.
|
|
@@ -249,6 +253,7 @@ class GenericSession(BaseDecentrAIObject):
|
|
|
249
253
|
self.comms_root_topic = root_topic
|
|
250
254
|
|
|
251
255
|
self.__auto_configuration = auto_configuration
|
|
256
|
+
self.__run_dauth = run_dauth or auto_configuration
|
|
252
257
|
|
|
253
258
|
self.log = log
|
|
254
259
|
|
|
@@ -355,20 +360,27 @@ class GenericSession(BaseDecentrAIObject):
|
|
|
355
360
|
|
|
356
361
|
# TODO: needs refactoring - suboptimal design
|
|
357
362
|
# start the blockchain engine assuming config is already set
|
|
358
|
-
|
|
363
|
+
self.P("Starting blockchain engine...")
|
|
359
364
|
self.__start_blockchain(
|
|
360
365
|
self.__bc_engine, self.__blockchain_config,
|
|
361
366
|
user_config=self.__user_config_loaded,
|
|
362
367
|
)
|
|
368
|
+
self.P("Blockchain engine started.")
|
|
363
369
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
|
|
371
|
+
if self.__run_dauth:
|
|
372
|
+
self.P("Requesting dAuth data...")
|
|
373
|
+
# this next call will attempt to complete the dauth process
|
|
374
|
+
dct_env = self.bc_engine.dauth_autocomplete(
|
|
375
|
+
dauth_endp=None, # get from consts or env
|
|
376
|
+
add_env=self.__auto_configuration,
|
|
377
|
+
debug=False,
|
|
378
|
+
sender_alias=self.name
|
|
379
|
+
)
|
|
380
|
+
# end bc_engine
|
|
381
|
+
self.P("dAuth process ended.")
|
|
382
|
+
else:
|
|
383
|
+
self.P("Skipping dAuth process.")
|
|
372
384
|
# END TODO
|
|
373
385
|
|
|
374
386
|
|
|
@@ -1060,7 +1072,7 @@ class GenericSession(BaseDecentrAIObject):
|
|
|
1060
1072
|
# been received
|
|
1061
1073
|
REQUIRED_PIPELINE = DEFAULT_PIPELINES.ADMIN_PIPELINE
|
|
1062
1074
|
REQUIRED_SIGNATURE = PLUGIN_SIGNATURES.NET_CONFIG_MONITOR
|
|
1063
|
-
if msg_pipeline.lower() == REQUIRED_PIPELINE.lower() and msg_signature.upper() == REQUIRED_SIGNATURE.upper():
|
|
1075
|
+
if isinstance(msg_pipeline, str) and msg_pipeline.lower() == REQUIRED_PIPELINE.lower() and msg_signature.upper() == REQUIRED_SIGNATURE.upper():
|
|
1064
1076
|
# extract data
|
|
1065
1077
|
sender_addr = dict_msg.get(PAYLOAD_DATA.EE_SENDER, None)
|
|
1066
1078
|
short_sender_addr = sender_addr[:8] + '...' + sender_addr[-4:]
|
ratio1/const/evm_net.py
CHANGED
|
@@ -33,6 +33,8 @@ class EvmNetConstants:
|
|
|
33
33
|
NET_CONFIG_MONITOR_SHOW_EACH_KEY = 'NET_CONFIG_MONITOR_SHOW_EACH'
|
|
34
34
|
SEED_NODES_ADDRESSES_KEY = 'SEED_NODES_ADDRESSES' # This is a list of seed nodes for the network, used for initial connections.
|
|
35
35
|
EE_ORACLE_SYNC_USE_R1FS_KEY = 'EE_ORACLE_SYNC_USE_R1FS' # This is a boolean flag to use R1FS for oracle sync.
|
|
36
|
+
ORACLE_SYNC_BLOCKCHAIN_PRESENCE_MIN_THRESHOLD_KEY = 'ORACLE_SYNC_BLOCKCHAIN_PRESENCE_MIN_THRESHOLD'
|
|
37
|
+
ORACLE_SYNC_ONLINE_PRESENCE_MIN_THRESHOLD_KEY = 'ORACLE_SYNC_ONLINE_PRESENCE_MIN_THRESHOLD'
|
|
36
38
|
# endclass EvmNetConstants
|
|
37
39
|
|
|
38
40
|
|
|
@@ -493,6 +495,8 @@ EVM_NET_CONSTANTS = {
|
|
|
493
495
|
"0xai_AgNhMIJZkkWdrTjnmrqdOa6hzAXkoXPNV4Zbvbm_piYJ", # r1s-04
|
|
494
496
|
],
|
|
495
497
|
EvmNetConstants.EE_ORACLE_SYNC_USE_R1FS_KEY: False, # Do not use R1FS for oracle sync in mainnet.
|
|
498
|
+
EvmNetConstants.ORACLE_SYNC_BLOCKCHAIN_PRESENCE_MIN_THRESHOLD_KEY: 0.3,
|
|
499
|
+
EvmNetConstants.ORACLE_SYNC_ONLINE_PRESENCE_MIN_THRESHOLD_KEY: 0.4,
|
|
496
500
|
},
|
|
497
501
|
EvmNetData.TESTNET: {
|
|
498
502
|
EvmNetConstants.EE_NET_MON_01_SUPERVISOR_LOG_TIME_KEY: 120, # Log every 2 minutes.
|
|
@@ -502,6 +506,8 @@ EVM_NET_CONSTANTS = {
|
|
|
502
506
|
"0xai_A61eKDV1otIH6uWy3zDlbJNJUWayp1jAsirOuYxztf82", # tr1s-02
|
|
503
507
|
],
|
|
504
508
|
EvmNetConstants.EE_ORACLE_SYNC_USE_R1FS_KEY: False, # Do not use R1FS for oracle sync in testnet.
|
|
509
|
+
EvmNetConstants.ORACLE_SYNC_BLOCKCHAIN_PRESENCE_MIN_THRESHOLD_KEY: 0.3,
|
|
510
|
+
EvmNetConstants.ORACLE_SYNC_ONLINE_PRESENCE_MIN_THRESHOLD_KEY: 0.4,
|
|
505
511
|
},
|
|
506
512
|
EvmNetData.DEVNET: {
|
|
507
513
|
EvmNetConstants.EE_NET_MON_01_SUPERVISOR_LOG_TIME_KEY: 60, # Log every minute.
|
|
@@ -511,6 +517,8 @@ EVM_NET_CONSTANTS = {
|
|
|
511
517
|
"0xai_AgnygSlY8BwnmaCj6mItg36JHlG_Lh3UqqFaTPbuNzy0", # dr1s-02
|
|
512
518
|
],
|
|
513
519
|
EvmNetConstants.EE_ORACLE_SYNC_USE_R1FS_KEY: True, # Use R1FS for oracle sync in devnet.
|
|
520
|
+
EvmNetConstants.ORACLE_SYNC_BLOCKCHAIN_PRESENCE_MIN_THRESHOLD_KEY: 0.15,
|
|
521
|
+
EvmNetConstants.ORACLE_SYNC_ONLINE_PRESENCE_MIN_THRESHOLD_KEY: 0.2,
|
|
514
522
|
},
|
|
515
523
|
}
|
|
516
524
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ratio1
|
|
3
|
-
Version: 3.4.
|
|
3
|
+
Version: 3.4.82
|
|
4
4
|
Summary: `ratio1` or Ration1 SDK is the Python SDK required for client app development for the Ratio1 ecosystem
|
|
5
5
|
Project-URL: Homepage, https://github.com/Ratio1/ratio1_sdk
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/Ratio1/ratio1_sdk/issues
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
ratio1/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
|
|
2
|
-
ratio1/_ver.py,sha256=
|
|
2
|
+
ratio1/_ver.py,sha256=PohojJjl3IBbYbTACoP-pqohIaJFzWjWhiQUXacX6fo,331
|
|
3
3
|
ratio1/base_decentra_object.py,sha256=iXvAAf6wPnGWzeeiRfwLojVoan-m1e_VsyPzjUQuENo,4492
|
|
4
4
|
ratio1/plugins_manager_mixin.py,sha256=X1JdGLDz0gN1rPnTN_5mJXR8JmqoBFQISJXmPR9yvCo,11106
|
|
5
5
|
ratio1/base/__init__.py,sha256=hACh83_cIv7-PwYMM3bQm2IBmNqiHw-3PAfDfAEKz9A,259
|
|
6
6
|
ratio1/base/distributed_custom_code_presets.py,sha256=cvz5R88P6Z5V61Ce1vHVVh8bOkgXd6gve_vdESDNAsg,2544
|
|
7
|
-
ratio1/base/generic_session.py,sha256=
|
|
7
|
+
ratio1/base/generic_session.py,sha256=KhSNXUP_jxN1y1e7D_V6okG3uyQ0r2n2FZJwbDq-a5g,187926
|
|
8
8
|
ratio1/base/instance.py,sha256=oQvwzzRvir7851wyhDx_BwN6y_VgsNWwYo53vN33QI4,21914
|
|
9
9
|
ratio1/base/pipeline.py,sha256=szoHrk1qBdY6NKPUk3tUTsJx3XzYp5C2GTOlzRiQi48,62489
|
|
10
10
|
ratio1/base/plugin_template.py,sha256=Gs438cSkhvxPujE4CRH_32pcuZaVwI9kia8E4VDRpSU,138794
|
|
@@ -42,7 +42,7 @@ ratio1/const/apps.py,sha256=0NiuoAPak0HjEULF3fs3xaUH8IRSZ0i4fZw7T2fEd_g,785
|
|
|
42
42
|
ratio1/const/base.py,sha256=QIeRH6X-u8DbezQCGipI3isL1LGComBQC5hLedO1jrQ,6042
|
|
43
43
|
ratio1/const/comms.py,sha256=qEYX4ciYg8SYWSDZZTUYxzpR1--2a7UusrWzAq0hxo8,2259
|
|
44
44
|
ratio1/const/environment.py,sha256=632L5GrcNqF3-JhvrC6kXzXwLMcihRgMlOkLurnOwGY,1031
|
|
45
|
-
ratio1/const/evm_net.py,sha256=
|
|
45
|
+
ratio1/const/evm_net.py,sha256=9is8Gx2_xtKlWRNAZTNAmmaA33c30xvpBT-zL4AtIuM,16774
|
|
46
46
|
ratio1/const/formatter.py,sha256=AW3bWlqf39uaqV4BBUuW95qKYfF2OkkU4f9hy3kSVhM,200
|
|
47
47
|
ratio1/const/heartbeat.py,sha256=Z_n87yI-L4vlBmlHZhkruysEJV5JVbXLQlGI26R42C4,3197
|
|
48
48
|
ratio1/const/misc.py,sha256=VDCwwpf5bl9ltx9rzT2WPVP8B3mZFRufU1tSS5MO240,413
|
|
@@ -103,8 +103,8 @@ ratio1/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,10
|
|
|
103
103
|
ratio1/utils/config.py,sha256=Elfkl7W4aDMvB5WZLiYlPXrecBncgTxb4hcKhQedMzI,10111
|
|
104
104
|
ratio1/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
|
|
105
105
|
ratio1/utils/oracle_sync/oracle_tester.py,sha256=aJOPcZhtbw1XPqsFG4qYpfv2Taj5-qRXbwJzrPyeXDE,27465
|
|
106
|
-
ratio1-3.4.
|
|
107
|
-
ratio1-3.4.
|
|
108
|
-
ratio1-3.4.
|
|
109
|
-
ratio1-3.4.
|
|
110
|
-
ratio1-3.4.
|
|
106
|
+
ratio1-3.4.82.dist-info/METADATA,sha256=Yez_0wqWcW8oBNZMwfAYOdJHQvCR4EBE1K8VBmdB2K8,12255
|
|
107
|
+
ratio1-3.4.82.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
108
|
+
ratio1-3.4.82.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
|
|
109
|
+
ratio1-3.4.82.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
|
|
110
|
+
ratio1-3.4.82.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|