matrix-compute-node 0.1.1__tar.gz → 0.1.3__tar.gz

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.
Files changed (41) hide show
  1. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/PKG-INFO +1 -1
  2. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/matrix_compute_node.egg-info/PKG-INFO +1 -1
  3. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/pyproject.toml +1 -1
  4. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/__init__.py +1 -1
  5. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/config/settings.py +40 -0
  6. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/LICENSE +0 -0
  7. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/README.md +0 -0
  8. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/matrix_compute_node.egg-info/SOURCES.txt +0 -0
  9. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/matrix_compute_node.egg-info/dependency_links.txt +0 -0
  10. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/matrix_compute_node.egg-info/entry_points.txt +0 -0
  11. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/matrix_compute_node.egg-info/requires.txt +0 -0
  12. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/matrix_compute_node.egg-info/top_level.txt +0 -0
  13. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/setup.cfg +0 -0
  14. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/setup.py +0 -0
  15. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/attestation/__init__.py +0 -0
  16. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/attestation/base.py +0 -0
  17. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/attestation/nvml_attest.py +0 -0
  18. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/attestation/sev_snp_attest.py +0 -0
  19. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/attestation/simulated.py +0 -0
  20. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/attestation/tdx_attest.py +0 -0
  21. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/auth/__init__.py +0 -0
  22. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/auth/hashcash.py +0 -0
  23. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/auth/l402_gate.py +0 -0
  24. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/config/__init__.py +0 -0
  25. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/crypto/__init__.py +0 -0
  26. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/crypto/signer.py +0 -0
  27. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/engine/__init__.py +0 -0
  28. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/engine/compute_core.py +0 -0
  29. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/engine/enclave_compute.py +0 -0
  30. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/engine/scheduler.py +0 -0
  31. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/engine/session_manager.py +0 -0
  32. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/main.py +0 -0
  33. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/p2p/__init__.py +0 -0
  34. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/p2p/servicer.py +0 -0
  35. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/p2p/tunnel_client.py +0 -0
  36. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/relay/__init__.py +0 -0
  37. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/relay/nostr_client.py +0 -0
  38. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/settings.py +0 -0
  39. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/test_doubles/__init__.py +0 -0
  40. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/test_doubles/mock_nostr_relay.py +0 -0
  41. {matrix_compute_node-0.1.1 → matrix_compute_node-0.1.3}/src/test_doubles/mock_settlement.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: matrix-compute-node
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Decentralized worker daemon for Distributed Matrix Multiplication network
5
5
  Author: Distributed Matrix Multiply Team
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: matrix-compute-node
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Decentralized worker daemon for Distributed Matrix Multiplication network
5
5
  Author: Distributed Matrix Multiply Team
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "matrix-compute-node"
7
- version = "0.1.1"
7
+ version = "0.1.3"
8
8
  description = "Decentralized worker daemon for Distributed Matrix Multiplication network"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -45,7 +45,7 @@ def _ensure_contracts_linked() -> None:
45
45
  # Link matrix_contracts immediately upon package initialization
46
46
  _ensure_contracts_linked()
47
47
 
48
- __version__ = "0.1.1"
48
+ __version__ = "0.1.3"
49
49
 
50
50
  __all__ = [
51
51
  "__version__",
@@ -723,6 +723,46 @@ class NodeConfig(BaseModel):
723
723
  merged = {**base_config, **cli_dict}
724
724
  if merged.get("enable_outbound_nat") and merged.get("nat_mode") in (None, "direct", ""):
725
725
  merged["nat_mode"] = "reverse_tunnel"
726
+
727
+ # When launched via CLI without explicit NAT/port overrides against a public relay,
728
+ # default to outbound reverse_tunnel so residential/NATed nodes remain reachable.
729
+ environ = os.environ if env is None else env
730
+ explicit_nat_or_port = any(
731
+ k in cli_dict for k in ("nat_mode", "p2p_port", "p2p_multiaddr", "enable_outbound_nat")
732
+ ) or any(
733
+ environ.get(ev) not in (None, "")
734
+ for ev in (
735
+ "MATRIX_NAT_MODE", "MATRIX_WORKER_NAT_MODE", "NAT_MODE",
736
+ "MATRIX_P2P_PORT", "MATRIX_WORKER_P2P_PORT", "P2P_PORT",
737
+ "MATRIX_P2P_MULTIADDR", "MATRIX_WORKER_P2P_MULTIADDR", "P2P_MULTIADDR",
738
+ "MATRIX_ENABLE_OUTBOUND_NAT", "ENABLE_OUTBOUND_NAT",
739
+ )
740
+ )
741
+ if not explicit_nat_or_port:
742
+ relays = merged.get("nostr_relays") or []
743
+ is_public_relay = any(
744
+ urlparse(str(r)).hostname not in (None, "", "127.0.0.1", "localhost", "0.0.0.0", "relay")
745
+ for r in relays
746
+ )
747
+ if is_public_relay:
748
+ merged["nat_mode"] = "reverse_tunnel"
749
+ merged["p2p_port"] = 0
750
+
751
+ # When launched via CLI without explicit pricing overrides, default to competitive mainnet pricing
752
+ explicit_rate = "sats_per_gflop" in cli_dict or any(
753
+ environ.get(ev) not in (None, "")
754
+ for ev in ("MATRIX_SATS_PER_GFLOP", "MATRIX_WORKER_SATS_PER_GFLOP", "SATS_PER_GFLOP")
755
+ )
756
+ if not explicit_rate:
757
+ merged["sats_per_gflop"] = 0.00001
758
+
759
+ explicit_min_sats = "min_task_sats" in cli_dict or any(
760
+ environ.get(ev) not in (None, "")
761
+ for ev in ("MATRIX_MIN_TASK_SATS", "MATRIX_WORKER_MIN_TASK_SATS", "MIN_TASK_SATS")
762
+ )
763
+ if not explicit_min_sats:
764
+ merged["min_task_sats"] = 1
765
+
726
766
  return cls(**merged)
727
767
 
728
768
  # Alias for backwards-compatibility and CLI invocations