astreum 0.2.36__py3-none-any.whl → 0.2.38__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.
Potentially problematic release.
This version of astreum might be problematic. Click here for more details.
- astreum/__init__.py +9 -1
- astreum/_communication/__init__.py +9 -0
- astreum/_communication/peer.py +11 -0
- astreum/_communication/route.py +25 -0
- astreum/_communication/setup.py +113 -0
- astreum/_lispeum/__init__.py +3 -3
- astreum/_lispeum/environment.py +5 -2
- astreum/_lispeum/expression.py +7 -7
- astreum/_lispeum/high_evaluation.py +8 -8
- astreum/_lispeum/low_evaluation.py +10 -8
- astreum/_lispeum/parser.py +25 -9
- astreum/_node.py +24 -113
- astreum/_storage/__init__.py +5 -0
- astreum/_storage/atom.py +100 -0
- astreum/_validation/__init__.py +12 -0
- astreum/_validation/block.py +296 -0
- astreum/_validation/chain.py +63 -0
- astreum/_validation/fork.py +98 -0
- astreum/_validation/genesis.py +0 -0
- astreum/_validation/setup.py +221 -0
- astreum/models/block.py +18 -9
- {astreum-0.2.36.dist-info → astreum-0.2.38.dist-info}/METADATA +4 -2
- {astreum-0.2.36.dist-info → astreum-0.2.38.dist-info}/RECORD +26 -14
- {astreum-0.2.36.dist-info → astreum-0.2.38.dist-info}/WHEEL +0 -0
- {astreum-0.2.36.dist-info → astreum-0.2.38.dist-info}/licenses/LICENSE +0 -0
- {astreum-0.2.36.dist-info → astreum-0.2.38.dist-info}/top_level.txt +0 -0
astreum/models/block.py
CHANGED
|
@@ -53,10 +53,10 @@ class Block:
|
|
|
53
53
|
self.transactions_count = transactions_count
|
|
54
54
|
self.delay_difficulty = delay_difficulty
|
|
55
55
|
self.delay_output = delay_output
|
|
56
|
-
self.delay_proof = delay_proof
|
|
57
|
-
self.validator_pk = validator_pk
|
|
58
|
-
self.body_tree = body_tree
|
|
59
|
-
self.signature = signature
|
|
56
|
+
self.delay_proof = delay_proof
|
|
57
|
+
self.validator_pk = validator_pk
|
|
58
|
+
self.body_tree = body_tree
|
|
59
|
+
self.signature = signature
|
|
60
60
|
|
|
61
61
|
@property
|
|
62
62
|
def hash(self) -> bytes:
|
|
@@ -68,11 +68,20 @@ class Block:
|
|
|
68
68
|
raise ValueError("Body tree not available for this block instance.")
|
|
69
69
|
return self._body_tree.root_hash
|
|
70
70
|
|
|
71
|
-
def get_signature(self) -> bytes:
|
|
72
|
-
"""Return the block's signature leaf."""
|
|
73
|
-
if self._signature is None:
|
|
74
|
-
raise ValueError("Signature not available for this block instance.")
|
|
75
|
-
return self._signature
|
|
71
|
+
def get_signature(self) -> bytes:
|
|
72
|
+
"""Return the block's signature leaf."""
|
|
73
|
+
if self._signature is None:
|
|
74
|
+
raise ValueError("Signature not available for this block instance.")
|
|
75
|
+
return self._signature
|
|
76
|
+
|
|
77
|
+
# Backwards/forwards alias for clarity with external specs
|
|
78
|
+
@property
|
|
79
|
+
def validator_public_key(self) -> Optional[bytes]:
|
|
80
|
+
return self.validator_pk
|
|
81
|
+
|
|
82
|
+
@validator_public_key.setter
|
|
83
|
+
def validator_public_key(self, value: Optional[bytes]) -> None:
|
|
84
|
+
self.validator_pk = value
|
|
76
85
|
|
|
77
86
|
def get_field(self, name: str) -> Union[int, bytes]:
|
|
78
87
|
"""Query a single body field by name, returning an int or bytes."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astreum
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.38
|
|
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
|
|
@@ -79,7 +79,7 @@ The Lispeum virtual machine (VM) is embedded inside `astreum.Node`. You feed it
|
|
|
79
79
|
# Define a named function int.add (stack body) and call it with bytes 1 and 2
|
|
80
80
|
|
|
81
81
|
import uuid
|
|
82
|
-
from astreum
|
|
82
|
+
from astreum import Node, Env, Expr
|
|
83
83
|
|
|
84
84
|
# 1) Spin‑up a stand‑alone VM
|
|
85
85
|
node = Node()
|
|
@@ -139,6 +139,8 @@ except ParseError as e:
|
|
|
139
139
|
## Testing
|
|
140
140
|
|
|
141
141
|
```bash
|
|
142
|
+
python3 -m venv venv
|
|
142
143
|
source venv/bin/activate
|
|
144
|
+
pip install -e .
|
|
143
145
|
python3 -m unittest discover -s tests
|
|
144
146
|
```
|
|
@@ -1,15 +1,27 @@
|
|
|
1
|
-
astreum/__init__.py,sha256=
|
|
2
|
-
astreum/_node.py,sha256=
|
|
1
|
+
astreum/__init__.py,sha256=9tzA27B_eG5wRF1SAWJIV7xTmCcR1QFc123b_cvFOa4,345
|
|
2
|
+
astreum/_node.py,sha256=RCGi99yliygs9aduNItlhfGREn7emLxFr7aAWQ1uafc,2220
|
|
3
3
|
astreum/format.py,sha256=X4tG5GGPweNCE54bHYkLFiuLTbmpy5upO_s1Cef-MGA,2711
|
|
4
4
|
astreum/node.py,sha256=SuVm1b0QWl1FpDUaLRH1fiFYnXCrPs6qYeUQlPDae8w,38358
|
|
5
|
-
astreum/
|
|
6
|
-
astreum/
|
|
7
|
-
astreum/
|
|
8
|
-
astreum/
|
|
9
|
-
astreum/_lispeum/
|
|
5
|
+
astreum/_communication/__init__.py,sha256=I6TVFC1KXtwwdCjKUkGjOhsLWfC7cECubjzqmm-SwRs,161
|
|
6
|
+
astreum/_communication/peer.py,sha256=DT2vJOzeLyyOj7vTDQ1u1lF5Vc7Epj0Hhie-YfDrzfA,425
|
|
7
|
+
astreum/_communication/route.py,sha256=enWT_1260LJq-L-zK-jtacQ8LbZGquNO9yj-9IglSXE,1232
|
|
8
|
+
astreum/_communication/setup.py,sha256=6KH144iaHNec9g4cvC8fcLIBY0dvx5OCjV5WVYKNcZo,3865
|
|
9
|
+
astreum/_lispeum/__init__.py,sha256=LAy2Z-gBBQlByBHRGUKaaQrOB7QzFEEyGRtInmwTpfU,304
|
|
10
|
+
astreum/_lispeum/environment.py,sha256=pJ0rjp9GoQxHhDiPIVei0jP7dZ_Pznso2O_tpp94-Ik,328
|
|
11
|
+
astreum/_lispeum/expression.py,sha256=io8tbCer_1TJee77yRbcNI5q-DPFGa8xZiC80tGvRRQ,1063
|
|
12
|
+
astreum/_lispeum/high_evaluation.py,sha256=7MwIeVZMPumYvKXn6Lkn-GrZhRNB6MjnUUWdiYT7Ei0,7952
|
|
13
|
+
astreum/_lispeum/low_evaluation.py,sha256=HgyCSAmL5K5SKq3Xw_BtbTZZUJbMg4-bVZW-A12glQ0,4373
|
|
10
14
|
astreum/_lispeum/meter.py,sha256=5q2PFW7_jmgKVM1-vwE4RRjMfPEthUA4iu1CwR-Axws,505
|
|
11
|
-
astreum/_lispeum/parser.py,sha256=
|
|
15
|
+
astreum/_lispeum/parser.py,sha256=WOW3sSZWkIzPEy3fYTyl0lrtkMxHL9zRrNSYztPDemQ,2271
|
|
12
16
|
astreum/_lispeum/tokenizer.py,sha256=P68uIj4aPKzjuCJ85jfzRi67QztpuXIOC1vvLQueBI4,552
|
|
17
|
+
astreum/_storage/__init__.py,sha256=EmKZNAZmo3UVE3ekOOuckwFnBVjpa0Sy8Oxg72Lgdxc,53
|
|
18
|
+
astreum/_storage/atom.py,sha256=w0O_jw74nGhO0hgxFHk0RmkCIgHXHweBEOVULi7_dhQ,3652
|
|
19
|
+
astreum/_validation/__init__.py,sha256=E2-CITedO5bIHsYG2zMr3vwmV9asF3aRWh2V3bwJShY,189
|
|
20
|
+
astreum/_validation/block.py,sha256=4ImViawnG0bhN-TiCk3F0byTlPm9U0l6PdSL53u3bsc,11171
|
|
21
|
+
astreum/_validation/chain.py,sha256=lOFbz5z0AOeMLchQ2YPRSbIZIdQlnHqDyMJvgdwJ-Iw,2532
|
|
22
|
+
astreum/_validation/fork.py,sha256=ZGTOVEhSiYJvvLvlC6FV8Zqe62uLTM-cSS3yKrKrLvA,3602
|
|
23
|
+
astreum/_validation/genesis.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
|
+
astreum/_validation/setup.py,sha256=FLutAEpW1Hh0WpGz1_k18tspc4z2RXA6hOHVaF-BmhY,8442
|
|
13
25
|
astreum/crypto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
26
|
astreum/crypto/ed25519.py,sha256=FRnvlN0kZlxn4j-sJKl-C9tqiz_0z4LZyXLj3KIj1TQ,1760
|
|
15
27
|
astreum/crypto/quadratic_form.py,sha256=pJgbORey2NTWbQNhdyvrjy_6yjORudQ67jBz2ScHptg,4037
|
|
@@ -23,7 +35,7 @@ astreum/lispeum/tokenizer.py,sha256=J-I7MEd0r2ZoVqxvRPlu-Afe2ZdM0tKXXhf1R4SxYTo,
|
|
|
23
35
|
astreum/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
36
|
astreum/models/account.py,sha256=sHujGSwtV13rvOGJ5LZXuMrJ4F9XUdvyuWKz-zJ9lkE,2986
|
|
25
37
|
astreum/models/accounts.py,sha256=aFSEWlq6zRf65-KGAdNGqEJyNVY3fpKhx8y1vU6sgSc,1164
|
|
26
|
-
astreum/models/block.py,sha256
|
|
38
|
+
astreum/models/block.py,sha256=Zke4yxZ-OvmjBdGnZsnU6qDQAVFJ2B1Op8ayaz1JPSo,18163
|
|
27
39
|
astreum/models/merkle.py,sha256=lvWJa9nmrBL0n_2h_uNqpB_9a5s5Hn1FceRLx0IZIVQ,6778
|
|
28
40
|
astreum/models/message.py,sha256=vv8yx-ndVYjCmPM4gXRVMToCTlKY_mflPu0uKsb9iiE,2117
|
|
29
41
|
astreum/models/patricia.py,sha256=ohmXrcaz7Ae561tyC4u4iPOkQPkKr8N0IWJek4upFIg,13392
|
|
@@ -35,8 +47,8 @@ astreum/relay/setup.py,sha256=ynvGaJdlDtw_f5LLiow2Wo7IRzUjvgk8eSr1Sv4_zTg,2090
|
|
|
35
47
|
astreum/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
48
|
astreum/storage/object.py,sha256=knFlvw_tpcC4twSu1DGNpHX31wlANN8E5dgEqIfU--Q,2041
|
|
37
49
|
astreum/storage/setup.py,sha256=1-9ztEFI_BvRDvAA0lAn4mFya8iq65THTArlj--M3Hg,626
|
|
38
|
-
astreum-0.2.
|
|
39
|
-
astreum-0.2.
|
|
40
|
-
astreum-0.2.
|
|
41
|
-
astreum-0.2.
|
|
42
|
-
astreum-0.2.
|
|
50
|
+
astreum-0.2.38.dist-info/licenses/LICENSE,sha256=gYBvRDP-cPLmTyJhvZ346QkrYW_eleke4Z2Yyyu43eQ,1089
|
|
51
|
+
astreum-0.2.38.dist-info/METADATA,sha256=c-g2CirbWXU3Le0Fi6f1LJY_cJvTllbyEuTTM3PkeWE,6181
|
|
52
|
+
astreum-0.2.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
53
|
+
astreum-0.2.38.dist-info/top_level.txt,sha256=1EG1GmkOk3NPmUA98FZNdKouhRyget-KiFiMk0i2Uz0,8
|
|
54
|
+
astreum-0.2.38.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|