chia-blockchain 2.5.5rc5__py3-none-any.whl → 2.5.5rc7__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.
@@ -663,4 +663,4 @@ async def test_double_spend_ff_spend_no_latest_unspent() -> None:
663
663
  status, error = await make_and_send_spend_bundle(sim, sim_client, [singleton_coin_spend], aggsig=sig)
664
664
  # It fails validation because it doesn't currently have a latest unspent
665
665
  assert status == MempoolInclusionStatus.FAILED
666
- assert error == Err.DOUBLE_SPEND
666
+ assert error == Err.UNKNOWN_UNSPENT
@@ -30,6 +30,9 @@ class CoinStore:
30
30
  """
31
31
 
32
32
  db_wrapper: DBWrapper2
33
+ # Fall back to the `coin_puzzle_hash` index if the ff unspent index
34
+ # does not exist.
35
+ _unspent_lineage_for_ph_idx: str = "coin_puzzle_hash"
33
36
 
34
37
  @classmethod
35
38
  async def create(cls, db_wrapper: DBWrapper2) -> CoinStore:
@@ -82,6 +85,12 @@ class CoinStore:
82
85
  WHERE spent_index = -1
83
86
  """
84
87
  )
88
+ async with conn.execute(
89
+ "SELECT 1 FROM sqlite_master WHERE type = 'index' AND name = 'coin_record_ph_ff_unspent_idx'"
90
+ ) as cursor:
91
+ has_ff_unspent_idx = await cursor.fetchone() is not None
92
+ if has_ff_unspent_idx:
93
+ self._unspent_lineage_for_ph_idx = "coin_record_ph_ff_unspent_idx"
85
94
 
86
95
  return self
87
96
 
@@ -639,6 +648,7 @@ class CoinStore:
639
648
  "unspent.coin_parent, "
640
649
  "parent.coin_parent "
641
650
  "FROM coin_record AS unspent "
651
+ f"INDEXED BY {self._unspent_lineage_for_ph_idx} "
642
652
  "LEFT JOIN coin_record AS parent ON unspent.coin_parent = parent.coin_name "
643
653
  "WHERE unspent.spent_index = -1 "
644
654
  "AND parent.spent_index > 0 "
@@ -640,7 +640,7 @@ class MempoolManager:
640
640
  assert eligibility_info.ff_puzzle_hash is not None
641
641
  lineage_info = await get_unspent_lineage_info_for_puzzle_hash(eligibility_info.ff_puzzle_hash)
642
642
  if lineage_info is None:
643
- return Err.DOUBLE_SPEND, None, []
643
+ mark_as_fast_forward = False
644
644
  bundle_coin_spends[coin_id] = BundleCoinSpend(
645
645
  coin_spend=coin_spend,
646
646
  eligible_for_dedup=supports_dedup,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chia-blockchain
3
- Version: 2.5.5rc5
3
+ Version: 2.5.5rc7
4
4
  Summary: Chia blockchain full node, farmer, timelord, and wallet.
5
5
  License: Apache-2.0
6
6
  Keywords: chia,blockchain,node
@@ -127,7 +127,7 @@ chia/_tests/core/mempool/test_mempool_fee_protocol.py,sha256=XUTKqs82IOiiZMGPTPS
127
127
  chia/_tests/core/mempool/test_mempool_item_queries.py,sha256=k8tM3axB-fdZwN2NqCAcir-4yslSM8AJIQ0QvEJK9V8,6959
128
128
  chia/_tests/core/mempool/test_mempool_manager.py,sha256=p1tT8FOszY6DXi-Z7S2SxPvsNxCgCxaCRHY7c2qv2WM,147336
129
129
  chia/_tests/core/mempool/test_mempool_performance.py,sha256=a5bLSJ_Q_EVYnUHn96I5RC7VZl7niizBK47yVnzvWn4,2935
130
- chia/_tests/core/mempool/test_singleton_fast_forward.py,sha256=Fk85FJRgEHwrc_n2k8jTzsunlWdNdLCYh8MqpG-egt8,35060
130
+ chia/_tests/core/mempool/test_singleton_fast_forward.py,sha256=MoGpd09IlqQ0UWK6gSDAqTUiXypDTc9LOFajPOI5UDw,35063
131
131
  chia/_tests/core/node_height.py,sha256=yfkEmmYCsAb3cIe1ZhtE9J2SFB9lG_49SgjxsITdrZk,917
132
132
  chia/_tests/core/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
133
  chia/_tests/core/server/config.py,sha256=fTDhByaME5cEDbtyTKCWUf69F4kajs75aTQewZMjxak,69
@@ -525,7 +525,7 @@ chia/full_node/block_height_map.py,sha256=EOB6egK8jLWuFGmYW54uo6YmLFipcx0GoAbzV-
525
525
  chia/full_node/block_store.py,sha256=Kd5gWjotNC_ffEqUUXFfoJjF0e5xx0o-D1fBm-0ilAY,24535
526
526
  chia/full_node/bundle_tools.py,sha256=M-YSytA29mAIoteQ1FzfMrQYbbrzGXsXT0HSDjHaw3Y,854
527
527
  chia/full_node/check_fork_next_block.py,sha256=l2N-iW8GYdA9CkHLUDXuntuiLtG4jPcALFm00IflajQ,1434
528
- chia/full_node/coin_store.py,sha256=Fm-2NJtQvjK5psv_WrkX4ZQI1ek3YDcKo7VAnwMaG1k,29158
528
+ chia/full_node/coin_store.py,sha256=w8gOjHpGegf4QLH4k2oMe7KO3uTlGLaajWVhGh1EHTc,29739
529
529
  chia/full_node/eligible_coin_spends.py,sha256=FLwwOUaFJSnWCekdYwmCaRFizx-0vgc0u9-v1AeXLTA,16844
530
530
  chia/full_node/fee_estimate_store.py,sha256=Llp44WEeJmvafq2BDO_n4a6UeCY2wB6g52ImoLGxAOo,526
531
531
  chia/full_node/fee_estimation.py,sha256=ZpXoVHa8IS5ZeE0GLk7Fm1AYED2NVC2c7-N7WARr4lo,2903
@@ -544,7 +544,7 @@ chia/full_node/hint_management.py,sha256=8dVKguFPm-h32GEnMWxX2qyITo4WVO1YBKaPFKC
544
544
  chia/full_node/hint_store.py,sha256=0m6y0_f0rhGIKqfAmhFSGEeyM3LCN-dv-bR1OfIr4Uo,3666
545
545
  chia/full_node/mempool.py,sha256=x8Uo5xy1jcxXQgYaPUU2JkRsu9edndYs0hye3fFoZbk,33795
546
546
  chia/full_node/mempool_check_conditions.py,sha256=19_uUO8SCVrkJHEUDw0i0NVWwJyXc7BaAQQdVJSVqIE,3583
547
- chia/full_node/mempool_manager.py,sha256=KUNu7tdeadhGgBCJWgby4hNM90D5hz4OlMMUVY0SCeM,50881
547
+ chia/full_node/mempool_manager.py,sha256=Qi3gbSevZRzBaMGjeOAXitAwG8zo7g_J2o068Kxts6M,50876
548
548
  chia/full_node/pending_tx_cache.py,sha256=jEL004L7r1n7ppeSdLVe6nsVNfYw0jU86DHmRYe1rH4,3657
549
549
  chia/full_node/subscriptions.py,sha256=-3Mjv08_Z1iBUoXgGoHZvYPyTfkVHyWXhHJH2DWwx9A,8659
550
550
  chia/full_node/sync_store.py,sha256=pyjhiUVe_5CXJd8r-lk0-VpFbkX2RtO5N-370W47Rko,5206
@@ -891,8 +891,8 @@ chia/wallet/wallet_user_store.py,sha256=rXiQpk5g8t1X0Chx0bValcQsHonjB1oQ_F_K16bp
891
891
  chia/wallet/wallet_weight_proof_handler.py,sha256=IcQg_w8EPjpS9xwmEE8GvPcneLePOtu74wWUu1l5uuM,4875
892
892
  chia/wallet/wsm_apis.py,sha256=6LmxbHXC-tqNbRyoiGgz-f19PF1nEfMbfm3BTnsNQ6s,3914
893
893
  mozilla-ca/cacert.pem,sha256=qz7jZRl3pBeKcCsLgopO57K7uRJyNbCrdA4uFZdL9ds,222971
894
- chia_blockchain-2.5.5rc5.dist-info/LICENSE,sha256=0tuU-jTzeRDJJaxF2YCEpBwbywgpbrVSXq1i6fJq63U,11347
895
- chia_blockchain-2.5.5rc5.dist-info/METADATA,sha256=NFOEYqEMGkFISbjbKhBcfoNigKLJ1tLG52emb9ivbEQ,10687
896
- chia_blockchain-2.5.5rc5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
897
- chia_blockchain-2.5.5rc5.dist-info/entry_points.txt,sha256=GL2-UvicPVdKz72IP4shnmV3XImfoD5pMzoURfoAYk4,742
898
- chia_blockchain-2.5.5rc5.dist-info/RECORD,,
894
+ chia_blockchain-2.5.5rc7.dist-info/LICENSE,sha256=0tuU-jTzeRDJJaxF2YCEpBwbywgpbrVSXq1i6fJq63U,11347
895
+ chia_blockchain-2.5.5rc7.dist-info/METADATA,sha256=zsp7-Z7j067pBbewUX5mnDnte--rz4lTIWXfimuYKKE,10687
896
+ chia_blockchain-2.5.5rc7.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
897
+ chia_blockchain-2.5.5rc7.dist-info/entry_points.txt,sha256=GL2-UvicPVdKz72IP4shnmV3XImfoD5pMzoURfoAYk4,742
898
+ chia_blockchain-2.5.5rc7.dist-info/RECORD,,