ratio1 3.4.108__py3-none-any.whl → 3.4.110__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 CHANGED
@@ -1,4 +1,4 @@
1
- __VER__ = "3.4.108"
1
+ __VER__ = "3.4.110"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
@@ -149,7 +149,7 @@ CLI_COMMANDS = {
149
149
  "--skip-seeds": "Skip the seed nodes in the rollout (flag)",
150
150
  "--skip-oracles": "Skip the oracle nodes in the rollout (flag)",
151
151
  "--skip-workers": "Skip the remaining edge worker nodes in the rollout (flag)",
152
- "--no-timeout": "Do not wait between nodes restarts (flag)",
152
+ "--timeout": "Wait between worker nodes restarts (flag)",
153
153
  }
154
154
  },
155
155
  "inspect": {
ratio1/cli/oracles.py CHANGED
@@ -222,13 +222,13 @@ if True:
222
222
  skip_seeds = args.skip_seeds
223
223
  skip_oracles = args.skip_oracles
224
224
  skip_workers = getattr(args, "skip_workers", False)
225
- no_timeout = args.no_timeout
225
+ no_timeout = not args.timeout
226
226
  run_seed_nodes = not skip_seeds
227
227
  run_oracle_nodes = not skip_oracles
228
228
  run_edge_nodes = not skip_workers
229
229
 
230
230
  # Adjust these values to tweak pauses and restart pacing across node groups.
231
- pause_after_seed_seconds = 60
231
+ pause_after_seed_seconds = 120
232
232
  pause_after_oracle_seconds = 60
233
233
  worker_timeout_min_seconds = 5
234
234
  worker_timeout_max_seconds = 25
@@ -255,11 +255,11 @@ if True:
255
255
  log_with_color("======================================================", color='b')
256
256
  log_with_color("Starting Oracle Rollout...", color='g')
257
257
  log_with_color("======================================================", color='b')
258
+
258
259
  session = Session(
259
260
  silent=True
260
261
  )
261
262
  current_network = session.bc_engine.current_evm_network
262
- session.close()
263
263
 
264
264
  restart_plan_display = " -> ".join(restart_groups)
265
265
  confirmation_keyword = "RESTART ALL" if len(restart_groups) == 3 else f"RESTART {', '.join(restart_groups)}"
@@ -282,11 +282,11 @@ if True:
282
282
  log_with_color("Aborted by user...", color='y')
283
283
  return
284
284
 
285
- session = Session(
286
- silent=silent
287
- )
285
+ session.log.silent = silent
286
+ session.silent = silent
288
287
 
289
288
  seed_nodes_addresses = _get_seed_nodes(current_network)
289
+ seed_nodes_aliases = [session.get_node_alias(addr) for addr in seed_nodes_addresses]
290
290
 
291
291
  all_online_nodes = _get_all_online_nodes()
292
292
  remaining_nodes = [
@@ -301,25 +301,36 @@ if True:
301
301
 
302
302
  if run_seed_nodes:
303
303
  # 1. Send restart command to Seed Nodes.
304
- log_with_color(f"Sending restart commands to {len(seed_nodes_addresses)} seed nodes: {seed_nodes_addresses}",
305
- color='b')
304
+ log_with_color(
305
+ f"Sending restart commands to {len(seed_nodes_addresses)} seed nodes: {seed_nodes_aliases}",
306
+ color='b'
307
+ )
306
308
  _send_restart_command(session=session, nodes=seed_nodes_addresses)
309
+
310
+ # now check heartbeats for SHUTDOWN confirmation individually
311
+ # ... we display one by one the status with timeout `pause_after_seed_seconds`
312
+ # here all seeds restarted so we check recent heartbeats for each of them
313
+ # ... we display one by one the status with timeout `pause_after_seed_seconds`
314
+ # now finally we confirm all seeds are back online
307
315
  restarted_seed_nodes_count = len(seed_nodes_addresses)
308
316
 
309
317
  # Remove seed node addresses from all_nodes_addresses
310
318
  if run_oracle_nodes or run_edge_nodes:
311
319
  if pause_after_seed_seconds > 0:
312
320
  log_with_color(
313
- f"Seed nodes restarted. Waiting {pause_after_seed_seconds} seconds before sending restart commands to the next group of nodes.",
314
- color='g')
315
- sleep(pause_after_seed_seconds)
321
+ f"Seed nodes restarting. Waiting {pause_after_seed_seconds} seconds before sending restart commands to the next group of nodes.",
322
+ color='g'
323
+ )
324
+ sleep(pause_after_seed_seconds) # maybe obsolete due to per-node wait above
316
325
  else:
317
326
  log_with_color(
318
- "Seed nodes restarted. Continuing without wait before the next group of nodes.",
319
- color='g')
327
+ "Seed nodes restarting. Continuing without wait before the next group of nodes.",
328
+ color='g'
329
+ )
320
330
  else:
321
331
  log_with_color("Skipping Seed Nodes restart as per user request.", color='y')
322
-
332
+
333
+
323
334
  # 2. Send restart commands to all Oracle nodes, except seed nodes.
324
335
  oracle_nodes_addresses = [
325
336
  node['address']
@@ -330,8 +341,8 @@ if True:
330
341
  if run_oracle_nodes:
331
342
  log_with_color(
332
343
  f"Sending restart commands to {len(oracle_nodes_addresses)} Non-Seed Oracle nodes, except seed nodes: {remaining_nodes}",
333
- color='b')
334
-
344
+ color='b'
345
+ )
335
346
  _send_restart_command(session=session, nodes=oracle_nodes_addresses)
336
347
  restarted_oracle_nodes_count = len(oracle_nodes_addresses)
337
348
  if run_edge_nodes:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ratio1
3
- Version: 3.4.108
3
+ Version: 3.4.110
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,5 +1,5 @@
1
1
  ratio1/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
2
- ratio1/_ver.py,sha256=YJx_K3Ip0zUTFUO7IUjkpOocn06c2DRKRq01UCnWpVQ,332
2
+ ratio1/_ver.py,sha256=S7CKp2ojSiBJgOipS7qC5Y18zj9tSoCgynysKNRBTWs,332
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
@@ -31,9 +31,9 @@ ratio1/certs/r9092118.ala.eu-central-1.emqxsl.com.crt,sha256=y-6io0tseyx9-a4Pmde
31
31
  ratio1/certs/s624dbd4.ala.us-east-1.emqxsl.com.crt,sha256=y-6io0tseyx9-a4Pmde1z1gPULtJNSYUpG_YFkYaMKU,1337
32
32
  ratio1/cli/README.md,sha256=YsT23YcZBRyTKReNZPxD762YqstSWKWz4iZe_UJELPc,73
33
33
  ratio1/cli/cli.py,sha256=D8UCtdTQKi1IqB_PAi3k2FfaM-rnfxmlrOzM4OJBOsA,4352
34
- ratio1/cli/cli_commands.py,sha256=p2VQOdl2V0NuYPOfUZv6cRkH6falqMMBCG0nYJooZ0o,6706
34
+ ratio1/cli/cli_commands.py,sha256=NlcBNAiSQBGPk54Y5BS7Je0XPdnGPA1bYpcgX6d2Pxg,6703
35
35
  ratio1/cli/nodes.py,sha256=VkqjKef8ByWNyO7zr3nBEWUZrAlaDQ_9yMgChQPschE,13942
36
- ratio1/cli/oracles.py,sha256=yWzyQl0j1wa6Ob2anII9yanjKmAWlsNYI9mTJN9sejM,14519
36
+ ratio1/cli/oracles.py,sha256=9SsIYa2Go37CKecJ_poFLdIcMVZlEkc4eV0QCevWNb4,15076
37
37
  ratio1/cli/package_update.py,sha256=uRMPW5XV3fBdB_eZfoQDA1SKnJzTJvyfpRJA6T3ZZlQ,4000
38
38
  ratio1/code_cheker/__init__.py,sha256=pwkdeZGVL16ZA4Qf2mRahEhoOvKhL7FyuQbMFLr1E5M,33
39
39
  ratio1/code_cheker/base.py,sha256=GrvKyb8uVKChtnXp2drQ62kdqIj3jZZZ7jaOCfsEOLc,19068
@@ -109,8 +109,8 @@ ratio1/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,10
109
109
  ratio1/utils/config.py,sha256=Elfkl7W4aDMvB5WZLiYlPXrecBncgTxb4hcKhQedMzI,10111
110
110
  ratio1/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
111
111
  ratio1/utils/oracle_sync/oracle_tester.py,sha256=aJOPcZhtbw1XPqsFG4qYpfv2Taj5-qRXbwJzrPyeXDE,27465
112
- ratio1-3.4.108.dist-info/METADATA,sha256=FlaSIO2R4AmwRw-fCo1raAu94pHaAg4UJLKAYM5Cd0s,12256
113
- ratio1-3.4.108.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
114
- ratio1-3.4.108.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
115
- ratio1-3.4.108.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
116
- ratio1-3.4.108.dist-info/RECORD,,
112
+ ratio1-3.4.110.dist-info/METADATA,sha256=1koxOPnHZobopHEUhx_ihWUXOtBZrRoWw8IMXYXRn-E,12256
113
+ ratio1-3.4.110.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
114
+ ratio1-3.4.110.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
115
+ ratio1-3.4.110.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
116
+ ratio1-3.4.110.dist-info/RECORD,,