8 Commits

Author SHA1 Message Date
lash
909b85b2b7 Upgrade deps 2022-05-09 19:43:36 +00:00
lash
2f9663a8f8 Fix faulty new fs store path create 2022-05-07 11:28:13 +00:00
lash
637ead1a38 Improve log output for unlocking tool 2022-05-07 11:27:01 +00:00
lash
412018fc64 Upgrade shep to avoid sync in persist set 2022-05-05 17:05:39 +00:00
lash
95663621bc Update changelog 2022-05-05 15:43:54 +00:00
lash
0726f7a730 Upgrade shep, handle exception in filestore list in shep 2022-05-05 15:39:18 +00:00
lash
2c8ad85307 Upgrade chainlib, shep (state lock integrity) 2022-05-05 14:49:34 +00:00
lash
5df6656981 Reinstate next tx index in sync state for filter execution 2022-05-05 05:23:06 +00:00
8 changed files with 38 additions and 15 deletions

View File

@@ -1,3 +1,22 @@
* 0.4.8
- Add unlock action description to info loglevel for unlock tool
* 0.4.7
- Upgrade shep to avoid sync in persist set
* 0.4.6
- Upgrade shep to handle filesystem list exception
* 0.4.5
- Upgrade chainlib
- Upgrade shep to guarantee atomic state locks
* 0.4.4
- Reinstate tx index bump in sync state on filter execution complete
* 0.4.3
- Refactor lock code, move into module from runnable script
* 0.4.2
- Same as 0.4.1
* 0.4.1
- Correct runnable entry in setup
* 0.4.0
- Refactor on shep
* 0.3.7
- Remove hard eth dependency in settings rendering
- Add unlock cli tool

View File

@@ -97,7 +97,6 @@ class FilterState:
if self.scan != None:
ks = self.scan()
for v in ks: #os.listdir(self.scan_path):
logg.debug('ks {}'.format(v))
k = None
try:
k = self.state_store.from_elements(v)

View File

@@ -1 +0,0 @@

View File

@@ -41,5 +41,5 @@ class SyncSession:
if not self.item.release(interrupt=interrupt):
break
self.item.reset()
#self.next()
self.next()
self.session_store.disconnect()

View File

@@ -43,7 +43,6 @@ class SyncItem:
self.filter_state = filter_state
self.state_key = str(offset)
logg.debug('get key {}'.format(self.state_key))
v = self.sync_state.get(self.state_key)
(self.cursor, self.tx_cursor, self.target) = sync_state_deserialize(v)
@@ -101,10 +100,6 @@ class SyncItem:
self.sync_state.replace(self.state_key, b)
def __find_advance(self):
v = self.filter_state.state(self.state_key)
def advance(self, ignore_lock=False):
if self.skip_filter:
raise FilterDone()
@@ -267,7 +262,9 @@ class SyncStore:
self.item_keys.append(k)
logg.info('added existing {}'.format(o))
self.get_target()
v = self.get_target()
if v != None:
target = v
if len(thresholds) == 0:
if self.target != None:
@@ -332,7 +329,8 @@ class SyncStore:
if locked_item_key == None:
return False
locked_item = self.get(locked_item_key)
locked_state = self.filter_state.state(locked_item_key) - self.filter_state.state_store.LOCK
state = self.filter_state.state(locked_item_key)
locked_state = state - self.filter_state.state_store.LOCK
locked_state_name = self.filter_state.name(locked_state)
logg.debug('found locked item {} in state {}'.format(locked_item, locked_state))
@@ -342,10 +340,17 @@ class SyncStore:
if i == -1:
raise FilterInitializationError('locked state {} ({}) found for item {}, but matching filter has not been registered'.format(locked_state_name, locked_state, locked_item))
direction = None
if revert:
self.__unlock_previous(locked_item, fltrs, i)
new_state = self.filter_state.state(locked_item_key)
direction = 'previous'
else:
self.__unlock_next(locked_item, fltrs, i)
new_state = self.filter_state.state(locked_item_key)
direction = 'next'
logg.info('chainstate unlock to {} {} ({}) -> {} ({})'.format(direction, self.filter_state.name(state), state, self.filter_state.name(new_state), new_state))
return True

View File

@@ -24,7 +24,8 @@ class SyncFsStore(SyncStore):
create_path = True
if create_path:
self.__create_path(base_path, self.default_path, session_id=session_id)
#self.__create_path(base_path, self.default_path, session_id=session_id)
os.makedirs(self.session_path)
self.session_id = os.path.basename(self.session_path)
logg.info('session id {} resolved {} path {}'.format(session_id, self.session_id, self.session_path))

View File

@@ -1,5 +1,5 @@
confini~=0.6.0
semver==2.13.0
hexathon~=0.1.5
chainlib~=0.1.1
shep~=0.2.3
hexathon~=0.1.6
chainlib~=0.2.0
shep~=0.2.9

View File

@@ -1,6 +1,6 @@
[metadata]
name = chainsyncer
version = 0.4.3
version = 0.4.9
description = Generic blockchain syncer driver
author = Louis Holbrook
author_email = dev@holbrook.no