yellowstone-fumarole-client 0.2.1__py3-none-any.whl → 0.2.2__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.
- yellowstone_fumarole_client/runtime/aio.py +10 -0
- yellowstone_fumarole_client/runtime/state_machine.py +3 -1
- {yellowstone_fumarole_client-0.2.1.dist-info → yellowstone_fumarole_client-0.2.2.dist-info}/METADATA +1 -1
- {yellowstone_fumarole_client-0.2.1.dist-info → yellowstone_fumarole_client-0.2.2.dist-info}/RECORD +5 -5
- {yellowstone_fumarole_client-0.2.1.dist-info → yellowstone_fumarole_client-0.2.2.dist-info}/WHEEL +0 -0
@@ -133,6 +133,8 @@ class AsyncioFumeDragonsmouthRuntime:
|
|
133
133
|
self.commit_interval = commit_interval
|
134
134
|
self.gc_interval = gc_interval
|
135
135
|
self.max_concurrent_download = max_concurrent_download
|
136
|
+
self.poll_hist_inflight = False
|
137
|
+
self.commit_offset_inflight = False
|
136
138
|
|
137
139
|
# holds metadata about the download task
|
138
140
|
self.download_tasks = dict()
|
@@ -167,10 +169,12 @@ class AsyncioFumeDragonsmouthRuntime:
|
|
167
169
|
|
168
170
|
match response_field:
|
169
171
|
case "poll_hist":
|
172
|
+
self.poll_hist_inflight = False
|
170
173
|
poll_hist = control_response.poll_hist
|
171
174
|
LOGGER.debug(f"Received poll history {len(poll_hist.events)} events")
|
172
175
|
self.sm.queue_blockchain_event(poll_hist.events)
|
173
176
|
case "commit_offset":
|
177
|
+
self.commit_offset_inflight = False
|
174
178
|
commit_offset = control_response.commit_offset
|
175
179
|
LOGGER.debug(f"Received commit offset: {commit_offset}")
|
176
180
|
self.sm.update_committed_offset(commit_offset.offset)
|
@@ -181,9 +185,12 @@ class AsyncioFumeDragonsmouthRuntime:
|
|
181
185
|
|
182
186
|
async def poll_history_if_needed(self):
|
183
187
|
"""Poll the history if the state machine needs new events."""
|
188
|
+
if self.poll_hist_inflight:
|
189
|
+
return
|
184
190
|
if self.sm.need_new_blockchain_events():
|
185
191
|
cmd = self._build_poll_history_cmd(self.sm.committable_offset)
|
186
192
|
await self.control_plane_tx.put(cmd)
|
193
|
+
self.poll_hist_inflight = True
|
187
194
|
|
188
195
|
def commitment_level(self):
|
189
196
|
"""Gets the commitment level from the subscribe request."""
|
@@ -241,9 +248,12 @@ class AsyncioFumeDragonsmouthRuntime:
|
|
241
248
|
|
242
249
|
async def _commit_offset(self):
|
243
250
|
self.last_commit = time.time()
|
251
|
+
if self.commit_offset_inflight:
|
252
|
+
return
|
244
253
|
if self.sm.last_committed_offset < self.sm.committable_offset:
|
245
254
|
LOGGER.debug(f"Committing offset {self.sm.committable_offset}")
|
246
255
|
await self._force_commit_offset()
|
256
|
+
self.commit_offset_inflight = True
|
247
257
|
|
248
258
|
async def _drain_slot_status(self):
|
249
259
|
"""Drains the slot status from the state machine and sends updates to the Dragonsmouth outlet."""
|
@@ -322,4 +322,6 @@ class FumaroleSM:
|
|
322
322
|
|
323
323
|
def need_new_blockchain_events(self) -> bool:
|
324
324
|
"""Check if new blockchain events are needed."""
|
325
|
-
|
325
|
+
MINIMUM_UNPROCESSED_BLOCKCHAIN_EVENT = 10
|
326
|
+
return len(self.unprocessed_blockchain_event) < MINIMUM_UNPROCESSED_BLOCKCHAIN_EVENT \
|
327
|
+
or (not self.slot_status_update_queue and not self.blocked_slot_status_update)
|
{yellowstone_fumarole_client-0.2.1.dist-info → yellowstone_fumarole_client-0.2.2.dist-info}/RECORD
RENAMED
@@ -2,8 +2,8 @@ yellowstone_fumarole_client/__init__.py,sha256=QIfks8mTmyOywbGLG4ZMXrp4LDBNq5s_S
|
|
2
2
|
yellowstone_fumarole_client/config.py,sha256=aclhCPUy6RO-xtXR9w8otmt1RzFZyFnbF28jk115C2g,1394
|
3
3
|
yellowstone_fumarole_client/grpc_connectivity.py,sha256=Sex_x6_Bha0wGD7rRqr-V_slsohX1tDFeiHdqahLJ4Q,6639
|
4
4
|
yellowstone_fumarole_client/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
-
yellowstone_fumarole_client/runtime/aio.py,sha256=
|
6
|
-
yellowstone_fumarole_client/runtime/state_machine.py,sha256=
|
5
|
+
yellowstone_fumarole_client/runtime/aio.py,sha256=CmZZMvmZ1DmzTQAv-Vbm4DA7N4GXjHJtI_TWTW2FD5k,21758
|
6
|
+
yellowstone_fumarole_client/runtime/state_machine.py,sha256=eH2ARUOBdBJqk1zs9WLXD1WixqtgZX4bIdDkg1cWttA,12781
|
7
7
|
yellowstone_fumarole_client/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
yellowstone_fumarole_client/utils/aio.py,sha256=lm_BNkPiw5CJ6FjDlQUPoCKAqY3eYFAedAJB8mhNbzE,639
|
9
9
|
yellowstone_fumarole_client/utils/collections.py,sha256=NgXpepuRZKsUy0x1XW9pSjztIrlG7LUyMsETagfPgL0,989
|
@@ -17,6 +17,6 @@ yellowstone_fumarole_proto/geyser_pb2_grpc.py,sha256=JCEz0KM_jg_610HyQI_F1K4kJlR
|
|
17
17
|
yellowstone_fumarole_proto/solana_storage_pb2.py,sha256=LS-P5EPyS0n1pO9_U73rA6SPlbGSTEC2qYhuS3skzA8,8443
|
18
18
|
yellowstone_fumarole_proto/solana_storage_pb2.pyi,sha256=HivhoN4VEe_W7kB4lc2Un5AeTAv3xiKR_HLI096qmyA,13040
|
19
19
|
yellowstone_fumarole_proto/solana_storage_pb2_grpc.py,sha256=-rb9Dr0HXohIrHrnxukYrmUYl6OCVbkQYh2-pCO6740,895
|
20
|
-
yellowstone_fumarole_client-0.2.
|
21
|
-
yellowstone_fumarole_client-0.2.
|
22
|
-
yellowstone_fumarole_client-0.2.
|
20
|
+
yellowstone_fumarole_client-0.2.2.dist-info/METADATA,sha256=v8IJrufEwWAEZTAnllvkg3h-DuaitgWVJm9dzZNxvbI,4156
|
21
|
+
yellowstone_fumarole_client-0.2.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
22
|
+
yellowstone_fumarole_client-0.2.2.dist-info/RECORD,,
|
{yellowstone_fumarole_client-0.2.1.dist-info → yellowstone_fumarole_client-0.2.2.dist-info}/WHEEL
RENAMED
File without changes
|