Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
342 commits
Select commit Hold shift + click to select a range
3745e52
Apply suggestions from code review
fchirica Nov 13, 2024
c308207
Address comments.
fchirica Nov 14, 2024
094e5cf
Lint.
fchirica Nov 14, 2024
404f1c5
Add merkle blob cache.
fchirica Nov 15, 2024
9aad2f7
Mypy.
fchirica Nov 15, 2024
6b543dc
Try with deepcopy.
fchirica Nov 15, 2024
166a734
Use deepcopy everywhere.
fchirica Nov 15, 2024
b768f4c
Fix test.
fchirica Nov 15, 2024
dc20922
Integrate Merkle Blob into Data Layer (#18711)
altendky Nov 18, 2024
67533ed
Merge commit '748c8cec8e24c0feabc10e8db22284dc3712180f' into catchup/…
altendky Nov 18, 2024
75dfd81
Optimize DL benchmark.
fchirica Nov 19, 2024
450297b
Apply suggestions from code review
fchirica Nov 20, 2024
55cae83
Use custom exception.
fchirica Nov 20, 2024
eda617b
Lint.
fchirica Nov 20, 2024
5ed56c0
Disable foreign keys while migrating.
fchirica Nov 20, 2024
d006635
catchup: into long_lived/datalayer_merkle_blob from main @ 748c8cec8…
altendky Nov 21, 2024
a1b908e
Merge branch 'main' into add_rs_merkle_blob
altendky Nov 25, 2024
50b4bf4
Fix DL index.
fchirica Nov 25, 2024
825cd4c
Optimize DL benchmark. (#18906)
altendky Nov 26, 2024
8f5c6bf
Fix DL index (#18933)
altendky Nov 26, 2024
aeea85f
Fix DL migration (#18915)
altendky Nov 26, 2024
d061c4c
Optimize DL query.
fchirica Nov 28, 2024
8b659b6
Lint.
fchirica Nov 28, 2024
c8a9574
Optimize deepcopy use
fchirica Nov 28, 2024
9e6f75d
Optimize DL query. (#18949)
altendky Nov 29, 2024
9d790ab
Merge commit 'e5bf80e29f60dc507875b4742c50aa3d19364313' into catchup/…
altendky Dec 2, 2024
91f6be5
catchup: into long_lived/datalayer_merkle_blob from main @ e5bf80e29…
altendky Dec 3, 2024
21aee68
Optimize add node hashes.
fchirica Dec 4, 2024
4a3ba52
Lint.
fchirica Dec 4, 2024
7572044
Lint.
fchirica Dec 4, 2024
e52d27e
Apply suggestions from code review
fchirica Dec 4, 2024
fa3b2f3
Update data_store.py
fchirica Dec 4, 2024
6c3285f
Indent properly.
fchirica Dec 5, 2024
e704b35
Optimize add node hashes. (#18980)
altendky Dec 10, 2024
1fae5b0
Merge branch 'main' into add_rs_merkle_blob
altendky Dec 11, 2024
c85cadd
Merge commit '214ecf79dbaac1e983f854e8c85880f8ccb65a21' into catchup/…
altendky Dec 11, 2024
186d83a
catchup: into long_lived/datalayer_merkle_blob from main @ 214ecf79d…
altendky Dec 11, 2024
823f186
Merge commit 'ccd6f13e6cc2f4c7a0a150a1e26117c50fcfbe82' into catchup/…
altendky Dec 18, 2024
6aa74ca
Merge branch 'long_lived/datalayer_merkle_blob' into add_rs_merkle_blob
altendky Dec 18, 2024
7ee3da7
use long lived from chia_rs
altendky Dec 18, 2024
a29fd8e
install rust in install action
altendky Dec 18, 2024
1ebf518
catchup: into long_lived/datalayer_merkle_blob from main @ ccd6f13e6…
altendky Dec 18, 2024
4e6546c
Merge commit '49354dc8f7bf80ff43618954f4d78651f1b85ded' into catchup/…
altendky Dec 20, 2024
3d4ce9d
catchup: into long_lived/datalayer_merkle_blob from main @ 49354dc8f…
altendky Dec 20, 2024
0437c9f
Merge branch 'long_lived/datalayer_merkle_blob' into add_rs_merkle_blob
altendky Dec 20, 2024
d5af10e
maybe quieter
altendky Dec 31, 2024
7ff2db4
oh well
altendky Dec 31, 2024
82c2fa9
hmmph
altendky Dec 31, 2024
1d0df78
case insensitivy on the key already present errors
altendky Jan 2, 2025
190222e
re-enable
altendky Jan 2, 2025
67c56e4
more
altendky Jan 2, 2025
f07950f
poetry 1.8.5
altendky Jan 2, 2025
4e17000
add use of rust datalayer merkle blob (#18716)
altendky Jan 3, 2025
1cad89f
Merge commit '2b1aef889b4412d9637d77ae238ed5f64f44f674' into catchup/…
altendky Jan 3, 2025
1c9e210
catchup: into long_lived/datalayer_merkle_blob from main @ 2b1aef889…
altendky Jan 3, 2025
a8fc678
Optimize insert from delta file.
fchirica Jan 10, 2025
0988c0a
Move code into merkle blob.
fchirica Jan 10, 2025
8958049
Ruff.
fchirica Jan 10, 2025
1882ac0
ruff
fchirica Jan 10, 2025
128308e
Optimize insert from delta file. (#19118)
altendky Jan 10, 2025
9fdf651
Optimize missing hashes lookup.
fchirica Jan 13, 2025
200cd1d
Ruff.
fchirica Jan 13, 2025
f1d33e5
Apply review comments.
fchirica Jan 13, 2025
ca2ae58
Fix import order.
fchirica Jan 13, 2025
e554efd
Optimize missing hashes lookup. (#19126)
altendky Jan 14, 2025
5ec12ce
Disable foreign key in hashes table.
fchirica Jan 14, 2025
f201873
streamable for merkle blob serialization
altendky Jan 15, 2025
7756bef
wip
altendky Jan 15, 2025
42c5020
wip
altendky Jan 16, 2025
c995cc0
correct test to avoid shared blob bytes
altendky Jan 16, 2025
b168a94
Update test_merkle_blob.py
altendky Jan 16, 2025
1811171
Merge commit '27c34ec92c25b724827b6b1030d0a96e947a57e2' into catchup/…
altendky Jan 17, 2025
e7a7a67
catchup: into long_lived/datalayer_merkle_blob from main @ 27c34ec92…
altendky Jan 17, 2025
26ae863
correct test to avoid shared blob bytes (#19156)
altendky Jan 21, 2025
1050b96
update chia_rs ref for datalayer
altendky Jan 22, 2025
dcf43f4
Merge commit '115cba194f8860767c5a0b31742517577966bf8e' into catchup/…
altendky Jan 22, 2025
9ce78d7
catchup: into long_lived/datalayer_merkle_blob from main @ 115cba194…
altendky Jan 22, 2025
38694fe
update chia_rs ref for datalayer (#19168)
altendky Jan 22, 2025
2277f50
Merge branch 'long_lived/datalayer_merkle_blob' into streamable_for_m…
altendky Jan 22, 2025
913769e
Relax delta files format.
fchirica Jan 23, 2025
2fdb0a3
Ruff.
fchirica Jan 23, 2025
4cf02a8
Add test.
fchirica Jan 23, 2025
083ca7e
Lint.
fchirica Jan 23, 2025
b95f216
stuff
altendky Jan 23, 2025
4d5f168
make `ProofOfInclusion.root_hash` a method, from a property
altendky Jan 24, 2025
7ba3a99
narrow to `bytes32` hinting in `DataStore.insert_batch()`
altendky Jan 24, 2025
96fd8ec
more
altendky Jan 24, 2025
70f70bd
create `MerkleTypes` testing compatibility interface
altendky Jan 24, 2025
e403fb0
separate `KvID` to `KeyId` and `ValueId`
altendky Jan 24, 2025
ca8ce10
more
altendky Jan 24, 2025
b484368
narrow to `bytes32` hinting in `DataStore.insert_batch()` (#19178)
altendky Jan 24, 2025
c40b977
focus
altendky Jan 24, 2025
cfd08e2
Merge branch 'long_lived/datalayer_merkle_blob' into separate_key_and…
altendky Jan 24, 2025
bb408a8
make `ProofOfInclusion.root_hash` a method, from a property (#19177)
altendky Jan 24, 2025
137bd80
separate `KvID` to `KeyId` and `ValueId` (#19180)
altendky Jan 25, 2025
db7a658
touchup
altendky Jan 27, 2025
0a68277
Merge branch 'long_lived/datalayer_merkle_blob' into streamable_for_m…
altendky Jan 27, 2025
6226a8b
Improve coverage.
fchirica Jan 27, 2025
4363032
streamable for merkle blob serialization (#19154)
altendky Jan 28, 2025
7e76691
Merge branch 'long_lived/datalayer_merkle_blob' into merkle_types
altendky Jan 28, 2025
aac1b34
Apply suggestions from code review
fchirica Jan 29, 2025
2b08935
Address review comments.
fchirica Jan 29, 2025
942ad22
Try to fix mypy
fchirica Jan 29, 2025
d07eefc
Add comments.
fchirica Jan 30, 2025
5547cee
around*
fchirica Jan 30, 2025
adf6e0d
use chia_rs provided `KeyId`, `ValueId`, `TreeIndex`
altendky Jan 30, 2025
63d35aa
Change delta format (#19175)
altendky Jan 31, 2025
aff0760
fixup
altendky Jan 31, 2025
a8cbd24
straight `int` to `TreeIndex`
altendky Feb 3, 2025
b000714
Merge commit '084599bf2b51dbc7beef983d88e44724c24b7698' into catchup/…
altendky Feb 3, 2025
617aca8
back to chia_rs long lived
altendky Feb 3, 2025
377f201
catchup: into long_lived/datalayer_merkle_blob from main @ 084599bf2…
altendky Feb 4, 2025
4cd5608
Merge commit '1d9ab3cf0a1231d318a8d971c8296f4f82555553' into catchup/…
altendky Feb 4, 2025
a37eaa7
Remove DL hashes table
fchirica Feb 4, 2025
8b1f88e
Merge branch 'long_lived/datalayer_merkle_blob' into fc.remove_hashes…
fchirica Feb 4, 2025
f83410e
catchup: into long_lived/datalayer_merkle_blob from main @ 1d9ab3cf0…
altendky Feb 4, 2025
6d9616c
Lint.
fchirica Feb 4, 2025
9d25431
Lint.
fchirica Feb 4, 2025
1761979
Merge branch 'long_lived/datalayer_merkle_blob' into use_chia_rs_keyi…
altendky Feb 4, 2025
66d2542
Fix test.
fchirica Feb 4, 2025
648a02f
Fix test.
fchirica Feb 4, 2025
7a235ed
Use resolved root hash.
fchirica Feb 4, 2025
8d32169
Lint.
fchirica Feb 4, 2025
186f1ad
Lint.
fchirica Feb 5, 2025
b75547e
update chia_rs datalayer again
altendky Feb 5, 2025
7d9005d
back to `long_lived/initial_datalayer` for chia_rs
altendky Feb 6, 2025
6a86a3d
use chia_rs provided `KeyId`, `ValueId`, `TreeIndex` (#19214)
altendky Feb 7, 2025
aff2611
drop `MerkleBlob.get_lineage_by_key_id()`
altendky Feb 7, 2025
0068102
drop `MerkleBlob.get_lineage_by_key_id()` (#19238)
altendky Feb 8, 2025
72893f7
Merge branch 'long_lived/datalayer_merkle_blob' into merkle_types
altendky Feb 10, 2025
7bd773e
create `MerkleTypes` testing compatibility interface (#19179)
altendky Feb 10, 2025
8219d4f
Merge branch 'long_lived/datalayer_merkle_blob' into fc.remove_hashes…
fchirica Feb 12, 2025
6b6da26
Don't work on data structures.
fchirica Feb 13, 2025
d1b9b2b
Update chia/data_layer/util/merkle_blob.py
fchirica Feb 14, 2025
3336417
Remove DL method for get_node_by_hash.
fchirica Feb 14, 2025
125a234
Remove DL hashes table (#19228)
altendky Feb 14, 2025
06a1e25
more datalayer python/rust parametrization (#19269)
altendky Feb 14, 2025
a8724f0
parametrize datalayer proof of inclusion for rust as well (#19281)
altendky Feb 18, 2025
849eef1
remove `ProofOfInclusion.as_program()` (#19305)
altendky Feb 22, 2025
c6d78c3
use rust datalayer errors for consistency (#19307)
altendky Feb 25, 2025
b54c22f
Merge commit 'e446d6b726a03f6d917083b4d039abfec503e54e' into catchup/…
altendky Feb 25, 2025
419c6cf
fixup
altendky Feb 25, 2025
b88f1ce
catchup: into long_lived/datalayer_merkle_blob from main @ e446d6b72…
altendky Feb 25, 2025
5c68281
more datalayer rust transition prep (#19306)
altendky Feb 26, 2025
c09d63c
extract sibling hash and side methods as functions (#19324)
altendky Feb 26, 2025
8611f3c
tweak datalayer test consistency (#19325)
altendky Feb 26, 2025
1567fa3
use chia_rs proof of inclusion for datalayer (#19327)
altendky Feb 27, 2025
b0700f3
pin rust install version (#19341)
altendky Mar 4, 2025
7a6e9b3
Merge commit '329ce24c89e29f8c7f0d4a8bb4d04fc2b0438d95' into catchup/…
altendky Mar 4, 2025
74c1e6d
fix
altendky Mar 4, 2025
0eb2c76
fixup
altendky Mar 4, 2025
5cf5d57
fix `MerkleBlob.get_min_height_leaf()` (#19340)
altendky Mar 5, 2025
2a53889
correct datalayer side value types (#19330)
altendky Mar 5, 2025
85c47c6
catchup: into long_lived/datalayer_merkle_blob from main @ 329ce24c8…
altendky Mar 5, 2025
99fbfcf
datalayer: use rust
altendky Mar 5, 2025
f1796cc
remove python merkle blob code
altendky Mar 6, 2025
5c83bf9
cleanup python/rust compatibility hints
altendky Mar 6, 2025
4d42006
datalayer: use rust (#19354)
altendky Mar 7, 2025
baf7efd
just use latest chia_rs for datalayer
altendky Mar 11, 2025
4841cf1
just use latest chia_rs for datalayer (#19368)
altendky Mar 11, 2025
4e0db61
use `.execute_insert()` in `DataStore.add_kvid()`
altendky Mar 12, 2025
c399e1f
use `.execute_insert()` in `DataStore.add_kvid()` (#19376)
altendky Mar 12, 2025
757cf40
drop the unneeded autoincrement on the datalayer ids table
altendky Mar 12, 2025
9905a93
drop the unneeded autoincrement on the datalayer ids table (#19381)
altendky Mar 12, 2025
bd387f4
set then get on failure in `DataStore.add_kvid()` (#19380)
altendky Mar 12, 2025
1be3c08
Add benchmark test. (#19379)
fchirica Mar 12, 2025
338a295
use `.writer_maybe_transaction()` in `DataStore.add_kvid()` (#19382)
altendky Mar 13, 2025
8a9bfaf
Add DL migration test. (#19384)
fchirica Mar 14, 2025
4ab8cee
Merge commit '885107b78761b38beef94427eca51d062c289645' into catchup/…
altendky Mar 19, 2025
5582261
breakdown `DataStore.insert_into_data_store_from_file()` (#19409)
altendky Mar 19, 2025
8a8636b
catchup: into long_lived/datalayer_merkle_blob from main @ 885107b78…
altendky Mar 19, 2025
9b54593
combine adding node hashes into single `.executemany()` call (#19408)
altendky Mar 19, 2025
b59607d
less unneeded `bytes32`ing (#19410)
altendky Mar 19, 2025
a2880ea
correct sql limit to match batch length (#19407)
altendky Mar 20, 2025
f19db97
log exceptions while inserting from delta file (#19416)
altendky Mar 21, 2025
0c40219
add `CHIA_DATA_LAYER_STOP_AFTER_GENERATION` env var for timing tests …
altendky Mar 21, 2025
43f0539
pass around some connections (#19415)
altendky Mar 21, 2025
e8ed86d
datalayer compress for db (#19421)
altendky Mar 22, 2025
e647f5e
avoid unneeded conversion to bytearray (#19422)
altendky Mar 23, 2025
ed20dd6
Merge commit '99448387ada5dd492d06261ab823c59c2a55b231' into catchup/…
altendky Mar 24, 2025
02f0a51
catchup: into long_lived/datalayer_merkle_blob from main @ 99448387a…
altendky Mar 25, 2025
db8fe40
Merge commit '07ccc77676ad2f3b7dcd19e8a6fd269dea235bba' into catchup/…
altendky Apr 7, 2025
08496cb
DL Config cache size.
fchirica Apr 7, 2025
ac7b881
catchup: into long_lived/datalayer_merkle_blob from main @ 07ccc7767…
altendky Apr 7, 2025
65992db
Avoid deepcopy.
fchirica Apr 8, 2025
cea5130
Lint.
fchirica Apr 8, 2025
711d9b1
Address review comment.
fchirica Apr 15, 2025
9d05308
Merge commit '485d8889032600937571a47b2d41bf01670023d4' into catchup/…
altendky Apr 16, 2025
cb04f04
catchup: into long_lived/datalayer_merkle_blob from main @ 485d88890…
altendky Apr 16, 2025
8c8768f
Merge commit '2449e0c06d7b6d32dbbe1515a76f853d907ae69e' into catchup/…
altendky Apr 17, 2025
c4a6484
update chia_rs
altendky Apr 17, 2025
7c699f3
catchup: into long_lived/datalayer_merkle_blob from main @ 2449e0c06…
altendky Apr 17, 2025
779dd43
Merge commit 'c97f0a1777d455d9a1d26a028362425e634ee066' into catchup/…
altendky Apr 17, 2025
a5334b0
catchup: into long_lived/datalayer_merkle_blob from main @ c97f0a177…
altendky Apr 18, 2025
48a07f9
update chia_rs datalayer again
altendky Apr 21, 2025
d33a97d
again
altendky Apr 22, 2025
b426dbd
update chia_rs datalayer again (#19525)
altendky Apr 22, 2025
96d5c9f
DL Config cache size. (#19476)
altendky Apr 24, 2025
ed4c5bf
store merkle, key, and value blobs in files (#19528)
altendky Apr 25, 2025
161dc43
force use of index for `MAX(generation)` (#19491)
altendky Apr 25, 2025
7969c6d
delta reader (#19540)
altendky Apr 28, 2025
75758c9
remove `DataStore.process_merkle_blob_queries()` (#19544)
altendky Apr 29, 2025
76374b0
parallel missing hash collection (#19552)
altendky May 7, 2025
6936950
Merge commit 'a8a30e3541a9074e2e5ca85e7869c90f61448b8b' into catchup/…
altendky May 7, 2025
b03e7f6
Optimize add_missing_files (#19588)
fchirica May 13, 2025
cb3485b
reuse delta reader to avoid reloading data from disk (#19583)
altendky May 14, 2025
213dc58
catchup: into long_lived/datalayer_merkle_blob from main @ a8a30e354…
altendky May 15, 2025
476ab8c
Optimize DL functions for get keys/values. (#19609)
fchirica May 16, 2025
4e0f904
Merge commit 'e81b213b9a7bb2a46539d2ef5ed1ed1cd9271345' into catchup/…
altendky May 16, 2025
7bd9668
Fix delta file to use new format in duplicate hash. (#19582)
fchirica May 19, 2025
1a66185
unchange chia_rs
altendky May 20, 2025
5d3fd3f
catchup: into long_lived/datalayer_merkle_blob from main @ e81b213b9…
altendky May 21, 2025
10d9576
Merge commit 'a803d18c3b6a84d1d36adb0c5f1786dfe36aa3dd' into catchup/…
altendky May 29, 2025
6dcc8cf
catchup: into long_lived/datalayer_merkle_blob from main @ a803d18c3…
altendky May 29, 2025
f05b76c
Merge commit 'ae706ad83f32bdb999c829b28e8645fbbae0514b' into catchup/…
altendky Jun 2, 2025
94db228
undo chia_rs update
altendky Jun 2, 2025
14593f4
Improve migration logging.
fchirica Jun 3, 2025
1444d22
Lint.
fchirica Jun 3, 2025
f88a211
catchup: into long_lived/datalayer_merkle_blob from main @ ae706ad83…
altendky Jun 4, 2025
e8ec51a
Improve migration logging. (#19667)
altendky Jun 5, 2025
f44d748
Merge commit '082f0592d879ff6e784e4ad9d4f7a9f0442206ca' into catchup/…
altendky Jun 5, 2025
9944c39
catchup: into long_lived/datalayer_merkle_blob from main @ 082f0592d…
altendky Jun 5, 2025
8c96c1a
changeable key/value in-db blob size limit (#19669)
altendky Jun 6, 2025
d9098d6
Optimize add missing files (#19630)
fchirica Jun 9, 2025
53b2f90
rename to `DataStore.prefer_db_kv_blob_length` (#19692)
altendky Jun 9, 2025
36d8e2f
properly seed intra-sync persistent delta reader cache on new sync (#…
altendky Jun 11, 2025
8e2545f
add `chia dev data sync-time --prefer-db-kv-blob-length` (#19693)
altendky Jun 11, 2025
668548c
Merge commit 'da20e4145fb6279d6880fd998b62456237e2f700' into catchup/…
altendky Jun 24, 2025
e862431
catchup: into long_lived/datalayer_merkle_blob from main @ da20e4145…
altendky Jun 24, 2025
fb8de7a
Merge commit 'dac837e79961fa5ce9611d5531d789211031c465' into catchup/…
altendky Jul 12, 2025
4d188e0
catchup: into long_lived/datalayer_merkle_blob from main @ dac837e79…
altendky Jul 14, 2025
7d077cd
DL Code Cleanup (#19782)
fchirica Jul 15, 2025
ee589a6
DL Check root hash in missing hashes. (#19797)
fchirica Jul 15, 2025
d352be1
use logical core count for batch size when lazy building dl cache (#1…
altendky Jul 16, 2025
322aba7
unskip and fix to order agnostic check (#19836)
altendky Jul 17, 2025
a320d4a
tidy (#19833)
altendky Jul 17, 2025
35c03a5
Cleanup keys/values db. (#19829)
fchirica Jul 25, 2025
70c3bdb
Merge commit 'cac84b5e057a074da6a72e2a8bbcc70ec0a09668' into catchup/…
altendky Aug 1, 2025
6b5ee60
catchup: into long_lived/datalayer_merkle_blob from main @ cac84b5e0…
altendky Aug 2, 2025
7e98baa
Merge commit 'ebf8105fc12c351888069ba399be6cf998f680e0' into catchup/…
altendky Sep 5, 2025
0d7a723
catchup: into long_lived/datalayer_merkle_blob from main @ ebf8105fc…
altendky Sep 5, 2025
5f5ab60
Merge commit '73cb54789be134e0e373960f73e1a6ba70d3a90f' into catchup/…
altendky Sep 16, 2025
9abbcb6
catchup: into long_lived/datalayer_merkle_blob from main @ 73cb54789…
altendky Sep 16, 2025
a412809
back to full binary wheel checks etc
altendky Sep 17, 2025
77498f1
Merge commit '3652e609bdcdb199ece68bcfd60665d19594e5f0' into catchup/…
altendky Sep 19, 2025
baf62a4
catchup: into long_lived/datalayer_merkle_blob from main @ 3652e609b…
altendky Sep 19, 2025
8db5038
back to full binary wheel checks etc (#20079)
altendky Sep 22, 2025
586bfea
Merge commit 'eca97fa4c43f98e21613b20197b9e938a4676c98' into catchup/…
altendky Sep 22, 2025
eadce79
catchup: into long_lived/datalayer_merkle_blob from main @ eca97fa4c…
altendky Sep 22, 2025
1c977d7
Merge commit 'eadce7954e10a649e402bb6a11d4987c938de796' into catchup/…
altendky Sep 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions chia/_tests/core/data_layer/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ def store_id_fixture() -> bytes32:


@pytest.fixture(name="raw_data_store", scope="function")
async def raw_data_store_fixture(database_uri: str) -> AsyncIterable[DataStore]:
async with DataStore.managed(database=database_uri, uri=True) as store:
async def raw_data_store_fixture(database_uri: str, tmp_path: pathlib.Path) -> AsyncIterable[DataStore]:
async with DataStore.managed(
database=database_uri,
uri=True,
merkle_blobs_path=tmp_path.joinpath("merkle-blobs"),
key_value_blobs_path=tmp_path.joinpath("key-value-blobs"),
) as store:
yield store


Expand Down
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
26 changes: 15 additions & 11 deletions chia/_tests/core/data_layer/test_data_layer_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@

# TODO: update after resolution in https://github.com/pytest-dev/pytest/issues/7469
from _pytest.fixtures import SubRequest
from chia_rs.datalayer import ProofOfInclusion, ProofOfInclusionLayer
from chia_rs.sized_bytes import bytes32

from chia._tests.util.misc import Marks, datacases, measure_runtime
from chia.data_layer.data_layer_rpc_util import MarshallableProtocol
from chia.data_layer.data_layer_util import (
ClearPendingRootsRequest,
ClearPendingRootsResponse,
ProofOfInclusion,
ProofOfInclusionLayer,
Root,
Side,
Status,
Expand All @@ -38,10 +37,15 @@ def create_valid_proof_of_inclusion(layer_count: int, other_hash_side: Side) ->
other_hashes = [bytes32([i] * 32) for i in range(layer_count)]

for other_hash in other_hashes:
new_layer = ProofOfInclusionLayer.from_hashes(
primary_hash=existing_hash,
if other_hash_side == Side.LEFT:
combined_hash = internal_hash(other_hash, existing_hash)
else:
combined_hash = internal_hash(existing_hash, other_hash)

new_layer = ProofOfInclusionLayer(
other_hash_side=other_hash_side,
other_hash=other_hash,
combined_hash=combined_hash,
)

layers.append(new_layer)
Expand Down Expand Up @@ -72,16 +76,16 @@ def invalid_proof_of_inclusion_fixture(request: SubRequest, side: Side) -> Proof
a_hash = bytes32(b"f" * 32)

if request.param == "bad root hash":
layers[-1] = dataclasses.replace(layers[-1], combined_hash=a_hash)
return dataclasses.replace(valid_proof_of_inclusion, layers=layers)
layers[-1] = layers[-1].replace(combined_hash=a_hash)
return valid_proof_of_inclusion.replace(layers=layers)
elif request.param == "bad other hash":
layers[1] = dataclasses.replace(layers[1], other_hash=a_hash)
return dataclasses.replace(valid_proof_of_inclusion, layers=layers)
layers[1] = layers[1].replace(other_hash=a_hash)
return valid_proof_of_inclusion.replace(layers=layers)
elif request.param == "bad other side":
layers[1] = dataclasses.replace(layers[1], other_hash_side=layers[1].other_hash_side.other())
return dataclasses.replace(valid_proof_of_inclusion, layers=layers)
layers[1] = layers[1].replace(other_hash_side=Side(layers[1].other_hash_side).other())
return valid_proof_of_inclusion.replace(layers=layers)
elif request.param == "bad node hash":
return dataclasses.replace(valid_proof_of_inclusion, node_hash=a_hash)
return valid_proof_of_inclusion.replace(node_hash=a_hash)

raise Exception(f"Unhandled parametrization: {request.param!r}") # pragma: no cover

Expand Down
Loading
Loading