ccf 7.0.0.dev5__py3-none-any.whl → 7.0.0.dev7__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.
- ccf/ledger.py +14 -0
- ccf/ledger_viz.py +0 -1
- {ccf-7.0.0.dev5.data → ccf-7.0.0.dev7.data}/scripts/submit_recovery_share.sh +1 -0
- {ccf-7.0.0.dev5.dist-info → ccf-7.0.0.dev7.dist-info}/METADATA +1 -1
- {ccf-7.0.0.dev5.dist-info → ccf-7.0.0.dev7.dist-info}/RECORD +10 -10
- {ccf-7.0.0.dev5.data → ccf-7.0.0.dev7.data}/scripts/keygenerator.sh +0 -0
- {ccf-7.0.0.dev5.dist-info → ccf-7.0.0.dev7.dist-info}/WHEEL +0 -0
- {ccf-7.0.0.dev5.dist-info → ccf-7.0.0.dev7.dist-info}/entry_points.txt +0 -0
- {ccf-7.0.0.dev5.dist-info → ccf-7.0.0.dev7.dist-info}/licenses/LICENSE +0 -0
- {ccf-7.0.0.dev5.dist-info → ccf-7.0.0.dev7.dist-info}/top_level.txt +0 -0
ccf/ledger.py
CHANGED
|
@@ -956,7 +956,13 @@ class LedgerChunk:
|
|
|
956
956
|
|
|
957
957
|
# If the ledger chunk is not yet committed, the ledger header will be empty.
|
|
958
958
|
# Default to reading the file size instead.
|
|
959
|
+
full_file_size = os.path.getsize(name)
|
|
959
960
|
if self._pos_offset > 0:
|
|
961
|
+
if self._pos_offset > full_file_size:
|
|
962
|
+
raise ValueError(
|
|
963
|
+
f"Invalid ledger chunk {name}: File header claims offset table is at {self._pos_offset}, yet file is only {full_file_size} bytes"
|
|
964
|
+
)
|
|
965
|
+
|
|
960
966
|
self._file_size = self._pos_offset
|
|
961
967
|
|
|
962
968
|
positions_buffer = _peek_all(self._file, self._pos_offset)
|
|
@@ -978,6 +984,14 @@ class LedgerChunk:
|
|
|
978
984
|
|
|
979
985
|
self.start_seqno, self.end_seqno = range_from_filename(name)
|
|
980
986
|
|
|
987
|
+
if self.end_seqno is not None:
|
|
988
|
+
tx_count_from_filename = self.end_seqno - self.start_seqno + 1
|
|
989
|
+
tx_count_from_positions = len(self._positions)
|
|
990
|
+
if tx_count_from_filename != tx_count_from_positions:
|
|
991
|
+
raise ValueError(
|
|
992
|
+
f"Invalid ledger chunk {name}: Expected to contain {tx_count_from_filename} transactions due to filename, but found {tx_count_from_positions} by reading file"
|
|
993
|
+
)
|
|
994
|
+
|
|
981
995
|
def __getitem__(self, key):
|
|
982
996
|
if isinstance(key, int):
|
|
983
997
|
position = self._positions[key]
|
ccf/ledger_viz.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ccf
|
|
3
|
-
Version: 7.0.0.
|
|
3
|
+
Version: 7.0.0.dev7
|
|
4
4
|
Summary: Set of tools and utilities for the Confidential Consortium Framework (CCF)
|
|
5
5
|
Author-email: CCF Team <CCF-Sec@microsoft.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/microsoft/ccf
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
ccf/__init__.py,sha256=7h-KCpYSfH_Z8x5CFAoDlHfY0wqRNqOn8vTsaGW8dGA,101
|
|
2
2
|
ccf/_versionifier.py,sha256=17vUCXFp_VixNCuhBmMS9SCM74JnHR1OIZnMQSspSs4,2951
|
|
3
3
|
ccf/cose.py,sha256=hueXb_gvswxRkDAcUacmSIdkfqAFegZIWkA66M4yKVk,14950
|
|
4
|
-
ccf/ledger.py,sha256=
|
|
4
|
+
ccf/ledger.py,sha256=B0AmyrEU5JPkc0YJqnyhzV2Cipr_ckHPxFe64jXE_0k,43011
|
|
5
5
|
ccf/ledger_code.py,sha256=_malocCXly7TdBwBt8ldY6_yNfFwvyCb5Zkp8T4t9fg,3859
|
|
6
|
-
ccf/ledger_viz.py,sha256
|
|
6
|
+
ccf/ledger_viz.py,sha256=-Qb5FW-wBRmrhQuin9kUlOjd_44meD75eT_cHkw6CbU,6524
|
|
7
7
|
ccf/merkletree.py,sha256=JHUnGYYHJfi18YUNGiHmNCa1AwmCAwLAN3ias5j61ws,2931
|
|
8
8
|
ccf/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
ccf/read_ledger.py,sha256=ih_wk6_71SS37a4inLTYLdkZZ6-rDrqgB864t780nME,9147
|
|
@@ -11,11 +11,11 @@ ccf/receipt.py,sha256=dySVvy-IqvsB8pj5uooIokbQR853vpT7uC0TQ-IWIQk,2765
|
|
|
11
11
|
ccf/split_ledger.py,sha256=kUxGMUx6taBm6os_r1eay4Q0JXpgw8nJs7gcc1ZoJd0,5753
|
|
12
12
|
ccf/tx_id.py,sha256=E7XJyUoJ-a8h7Fp36zNQdhSYdyuNdFV-r_aXhoWl1ks,736
|
|
13
13
|
ccf/verify_ledger_secrets_chain.py,sha256=FC0Vil6IcHdZbFhh6c2tVjbFLMTHf8D59bF4sxLqgWQ,3459
|
|
14
|
-
ccf-7.0.0.
|
|
15
|
-
ccf-7.0.0.
|
|
16
|
-
ccf-7.0.0.
|
|
17
|
-
ccf-7.0.0.
|
|
18
|
-
ccf-7.0.0.
|
|
19
|
-
ccf-7.0.0.
|
|
20
|
-
ccf-7.0.0.
|
|
21
|
-
ccf-7.0.0.
|
|
14
|
+
ccf-7.0.0.dev7.data/scripts/keygenerator.sh,sha256=r9i8rURcDUPU8c9NKkxrjweU1qU09Hv3SWc3IFQ648A,2391
|
|
15
|
+
ccf-7.0.0.dev7.data/scripts/submit_recovery_share.sh,sha256=Jhb5HQ1-ckRmJjQslUCdi1hDXMOC-EBe4fBVQ3djUcY,3305
|
|
16
|
+
ccf-7.0.0.dev7.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
17
|
+
ccf-7.0.0.dev7.dist-info/METADATA,sha256=SuPaUPDa8UVEkTfR7D9FwB8UNBns2tqVuMBy0eISseQ,915
|
|
18
|
+
ccf-7.0.0.dev7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
ccf-7.0.0.dev7.dist-info/entry_points.txt,sha256=3hbXI2LSOY06QitxM8GQqT9NwY7rCp1RtSU9gGG20A4,365
|
|
20
|
+
ccf-7.0.0.dev7.dist-info/top_level.txt,sha256=I0tWtkKe6KRqXt0nIp8W-ln8j431-vDBb39bQGKkL9Q,4
|
|
21
|
+
ccf-7.0.0.dev7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|