astreum 0.2.48__tar.gz → 0.2.49__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.
Potentially problematic release.
This version of astreum might be problematic. Click here for more details.
- {astreum-0.2.48/src/astreum.egg-info → astreum-0.2.49}/PKG-INFO +14 -1
- {astreum-0.2.48 → astreum-0.2.49}/README.md +13 -0
- {astreum-0.2.48 → astreum-0.2.49}/pyproject.toml +1 -1
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/utils/logging.py +1 -9
- {astreum-0.2.48 → astreum-0.2.49/src/astreum.egg-info}/PKG-INFO +14 -1
- {astreum-0.2.48 → astreum-0.2.49}/LICENSE +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/setup.cfg +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/__init__.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_communication/__init__.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_communication/message.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_communication/peer.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_communication/ping.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_communication/route.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_communication/setup.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_communication/util.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/__init__.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/account.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/accounts.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/block.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/chain.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/fork.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/genesis.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/receipt.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/setup.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/transaction.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/workers/__init__.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/workers/discovery.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/workers/validation.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_consensus/workers/verify.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_lispeum/__init__.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_lispeum/environment.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_lispeum/expression.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_lispeum/high_evaluation.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_lispeum/low_evaluation.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_lispeum/meter.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_lispeum/parser.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_lispeum/tokenizer.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_node.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_storage/__init__.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_storage/atom.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/_storage/patricia.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/crypto/__init__.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/crypto/ed25519.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/crypto/quadratic_form.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/crypto/wesolowski.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/crypto/x25519.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/format.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/models/__init__.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/models/block.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/models/merkle.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/models/patricia.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/node.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/storage/__init__.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/storage/object.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/storage/setup.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/utils/bytes.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum/utils/integer.py +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum.egg-info/SOURCES.txt +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum.egg-info/dependency_links.txt +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum.egg-info/requires.txt +0 -0
- {astreum-0.2.48 → astreum-0.2.49}/src/astreum.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astreum
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.49
|
|
4
4
|
Summary: Python library to interact with the Astreum blockchain and its Lispeum virtual machine.
|
|
5
5
|
Author-email: "Roy R. O. Okello" <roy@stelar.xyz>
|
|
6
6
|
Project-URL: Homepage, https://github.com/astreum/lib
|
|
@@ -35,6 +35,8 @@ When initializing an `astreum.Node`, pass a dictionary with any of the options b
|
|
|
35
35
|
| `validation_secret_key` | hex string | `None` | X25519 private key that lets the node participate in the validation route. Leave unset for a non‑validator node. |
|
|
36
36
|
| `storage_path` | string | `None` | Directory where objects are persisted. If *None*, the node uses an in‑memory store. |
|
|
37
37
|
| `storage_get_relay_timeout` | float | `5` | Seconds to wait for an object requested from peers before timing‑out. |
|
|
38
|
+
| `logging_retention` | int | `90` | Number of days to keep rotated log files (daily gzip). |
|
|
39
|
+
| `verbose` | bool | `False` | When **True**, also mirror JSON logs to stdout with a human-readable format. |
|
|
38
40
|
|
|
39
41
|
### Networking
|
|
40
42
|
|
|
@@ -136,6 +138,17 @@ except ParseError as e:
|
|
|
136
138
|
|
|
137
139
|
---
|
|
138
140
|
|
|
141
|
+
|
|
142
|
+
## Logging
|
|
143
|
+
|
|
144
|
+
Every `Node` instance wires up structured logging automatically:
|
|
145
|
+
|
|
146
|
+
- Logs land in per-instance files named `node.log` under `%LOCALAPPDATA%\Astreum\lib-py\logs/<instance_id>` on Windows and `$XDG_STATE_HOME` (or `~/.local/state`)/`Astreum/lib-py/logs/<instance_id>` on other platforms. The `<instance_id>` is the first 16 hex characters of a BLAKE3 hash of the caller's file path, so running the node from different entry points keeps their logs isolated.
|
|
147
|
+
- Files rotate at midnight UTC with gzip compression (`node-YYYY-MM-DD.log.gz`) and retain 90 days by default. Override via `config["logging_retention"]`.
|
|
148
|
+
- Each event is a single JSON line containing timestamp, level, logger, message, process/thread info, module/function, and the derived `instance_id`.
|
|
149
|
+
- Set `config["verbose"] = True` to mirror logs to stdout in a human-friendly format like `[2025-04-13-42-59] [info] Starting Astreum Node`.
|
|
150
|
+
- The very first entry emitted is the banner `Starting Astreum Node`, signalling that the logging pipeline is live before other subsystems spin up.
|
|
151
|
+
|
|
139
152
|
## Testing
|
|
140
153
|
|
|
141
154
|
```bash
|
|
@@ -17,6 +17,8 @@ When initializing an `astreum.Node`, pass a dictionary with any of the options b
|
|
|
17
17
|
| `validation_secret_key` | hex string | `None` | X25519 private key that lets the node participate in the validation route. Leave unset for a non‑validator node. |
|
|
18
18
|
| `storage_path` | string | `None` | Directory where objects are persisted. If *None*, the node uses an in‑memory store. |
|
|
19
19
|
| `storage_get_relay_timeout` | float | `5` | Seconds to wait for an object requested from peers before timing‑out. |
|
|
20
|
+
| `logging_retention` | int | `90` | Number of days to keep rotated log files (daily gzip). |
|
|
21
|
+
| `verbose` | bool | `False` | When **True**, also mirror JSON logs to stdout with a human-readable format. |
|
|
20
22
|
|
|
21
23
|
### Networking
|
|
22
24
|
|
|
@@ -118,6 +120,17 @@ except ParseError as e:
|
|
|
118
120
|
|
|
119
121
|
---
|
|
120
122
|
|
|
123
|
+
|
|
124
|
+
## Logging
|
|
125
|
+
|
|
126
|
+
Every `Node` instance wires up structured logging automatically:
|
|
127
|
+
|
|
128
|
+
- Logs land in per-instance files named `node.log` under `%LOCALAPPDATA%\Astreum\lib-py\logs/<instance_id>` on Windows and `$XDG_STATE_HOME` (or `~/.local/state`)/`Astreum/lib-py/logs/<instance_id>` on other platforms. The `<instance_id>` is the first 16 hex characters of a BLAKE3 hash of the caller's file path, so running the node from different entry points keeps their logs isolated.
|
|
129
|
+
- Files rotate at midnight UTC with gzip compression (`node-YYYY-MM-DD.log.gz`) and retain 90 days by default. Override via `config["logging_retention"]`.
|
|
130
|
+
- Each event is a single JSON line containing timestamp, level, logger, message, process/thread info, module/function, and the derived `instance_id`.
|
|
131
|
+
- Set `config["verbose"] = True` to mirror logs to stdout in a human-friendly format like `[2025-04-13-42-59] [info] Starting Astreum Node`.
|
|
132
|
+
- The very first entry emitted is the banner `Starting Astreum Node`, signalling that the logging pipeline is live before other subsystems spin up.
|
|
133
|
+
|
|
121
134
|
## Testing
|
|
122
135
|
|
|
123
136
|
```bash
|
|
@@ -16,8 +16,6 @@ from typing import Any, Dict, Optional
|
|
|
16
16
|
|
|
17
17
|
from blake3 import blake3
|
|
18
18
|
|
|
19
|
-
LOG_ENV_VARS = ("ASTREUM_LOG_DIR", "YOUR_LIB_LOG_DIR")
|
|
20
|
-
|
|
21
19
|
# Fixed identity for all loggers in this library
|
|
22
20
|
_ORG_NAME = "Astreum"
|
|
23
21
|
_PRODUCT_NAME = "lib-py"
|
|
@@ -65,12 +63,7 @@ def _derive_instance_id() -> str:
|
|
|
65
63
|
|
|
66
64
|
|
|
67
65
|
def _log_root(org: str, product: str, instance_id: str) -> pathlib.Path:
|
|
68
|
-
"""Resolve the base directory for logs
|
|
69
|
-
for env_var in LOG_ENV_VARS:
|
|
70
|
-
override = os.getenv(env_var)
|
|
71
|
-
if override:
|
|
72
|
-
return pathlib.Path(override) / org / product / "logs" / instance_id
|
|
73
|
-
|
|
66
|
+
"""Resolve the base directory for logs using platform defaults."""
|
|
74
67
|
if platform.system() == "Windows":
|
|
75
68
|
base = os.getenv("LOCALAPPDATA") or str(pathlib.Path.home())
|
|
76
69
|
return pathlib.Path(base) / org / product / "logs" / instance_id
|
|
@@ -222,6 +215,5 @@ def logging_setup(config: dict) -> logging.LoggerAdapter:
|
|
|
222
215
|
__all__ = [
|
|
223
216
|
"HumanFormatter",
|
|
224
217
|
"JSONFormatter",
|
|
225
|
-
"LOG_ENV_VARS",
|
|
226
218
|
"logging_setup",
|
|
227
219
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astreum
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.49
|
|
4
4
|
Summary: Python library to interact with the Astreum blockchain and its Lispeum virtual machine.
|
|
5
5
|
Author-email: "Roy R. O. Okello" <roy@stelar.xyz>
|
|
6
6
|
Project-URL: Homepage, https://github.com/astreum/lib
|
|
@@ -35,6 +35,8 @@ When initializing an `astreum.Node`, pass a dictionary with any of the options b
|
|
|
35
35
|
| `validation_secret_key` | hex string | `None` | X25519 private key that lets the node participate in the validation route. Leave unset for a non‑validator node. |
|
|
36
36
|
| `storage_path` | string | `None` | Directory where objects are persisted. If *None*, the node uses an in‑memory store. |
|
|
37
37
|
| `storage_get_relay_timeout` | float | `5` | Seconds to wait for an object requested from peers before timing‑out. |
|
|
38
|
+
| `logging_retention` | int | `90` | Number of days to keep rotated log files (daily gzip). |
|
|
39
|
+
| `verbose` | bool | `False` | When **True**, also mirror JSON logs to stdout with a human-readable format. |
|
|
38
40
|
|
|
39
41
|
### Networking
|
|
40
42
|
|
|
@@ -136,6 +138,17 @@ except ParseError as e:
|
|
|
136
138
|
|
|
137
139
|
---
|
|
138
140
|
|
|
141
|
+
|
|
142
|
+
## Logging
|
|
143
|
+
|
|
144
|
+
Every `Node` instance wires up structured logging automatically:
|
|
145
|
+
|
|
146
|
+
- Logs land in per-instance files named `node.log` under `%LOCALAPPDATA%\Astreum\lib-py\logs/<instance_id>` on Windows and `$XDG_STATE_HOME` (or `~/.local/state`)/`Astreum/lib-py/logs/<instance_id>` on other platforms. The `<instance_id>` is the first 16 hex characters of a BLAKE3 hash of the caller's file path, so running the node from different entry points keeps their logs isolated.
|
|
147
|
+
- Files rotate at midnight UTC with gzip compression (`node-YYYY-MM-DD.log.gz`) and retain 90 days by default. Override via `config["logging_retention"]`.
|
|
148
|
+
- Each event is a single JSON line containing timestamp, level, logger, message, process/thread info, module/function, and the derived `instance_id`.
|
|
149
|
+
- Set `config["verbose"] = True` to mirror logs to stdout in a human-friendly format like `[2025-04-13-42-59] [info] Starting Astreum Node`.
|
|
150
|
+
- The very first entry emitted is the banner `Starting Astreum Node`, signalling that the logging pipeline is live before other subsystems spin up.
|
|
151
|
+
|
|
139
152
|
## Testing
|
|
140
153
|
|
|
141
154
|
```bash
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|