Created
October 26, 2018 09:34
-
-
Save ulope/4d76ed252f4765371d9d6bc25dbc974a to your computer and use it in GitHub Desktop.
Nonce transitions for 0xf1e and 0xf2f. Script courtesy auf Paul.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replaying state changes 22578 | |
>>> 153 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce None -> 1 | |
>>> 157 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 1 -> 2 | |
>>> 162 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 2 -> 3 | |
>>> 167 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 3 -> 4 | |
>>> 181 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce None -> 1 | |
>>> 186 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 1 -> 2 | |
>>> 193 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 2 -> 3 | |
>>> 199 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 3 -> 4 | |
>>> 200 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 4 -> 5 | |
>>> 207 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 5 -> 6 | |
>>> 210 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 6 -> 7 | |
>>> 216 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 7 -> 8 | |
>>> 247 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 4 -> 5 | |
>>> 253 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 5 -> 6 | |
>>> 259 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 6 -> 7 | |
>>> 265 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 7 -> 8 | |
>>> 285 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 8 -> 9 | |
>>> 290 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 9 -> 10 | |
>>> 293 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 10 -> 11 | |
>>> 298 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 11 -> 12 | |
>>> 301 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 12 -> 13 | |
>>> 306 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 13 -> 14 | |
>>> 310 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 14 -> 15 | |
>>> 315 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 15 -> 16 | |
>>> 320 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 16 -> 17 | |
>>> 324 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 17 -> 18 | |
>>> 328 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 18 -> 19 | |
>>> 333 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 19 -> 20 | |
>>> 336 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 20 -> 21 | |
>>> 340 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 21 -> 22 | |
>>> 344 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 22 -> 23 | |
>>> 349 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 23 -> 24 | |
>>> 355 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 24 -> 25 | |
>>> 360 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 25 -> 26 | |
>>> 607 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 26 -> 27 | |
>>> 612 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 27 -> 28 | |
>>> 769 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated partner nonce 8 -> 9 | |
>>> 787 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated partner nonce 9 -> 10 | |
>>> 829 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated partner nonce 10 -> 11 | |
>>> 837 ReceiveUnlock | |
Events: ['SendProcessed', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 11 -> 12 | |
>>> 844 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated partner nonce 12 -> 13 | |
>>> 862 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 13 -> 14 | |
>>> 866 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 14 -> 15 | |
>>> 873 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 15 -> 16 | |
>>> 879 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 16 -> 17 | |
>>> 12314 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 28 -> 29 | |
>>> 12318 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 29 -> 30 | |
>>> 12474 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 30 -> 31 | |
>>> 12484 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 31 -> 32 | |
>>> 12555 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 32 -> 33 | |
>>> 12561 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 33 -> 34 | |
>>> 14739 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 34 -> 35 | |
>>> 14743 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 35 -> 36 | |
>>> 15274 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 36 -> 37 | |
>>> 15946 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 37 -> 38 | |
>>> 18611 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 38 -> 39 | |
>>> 18690 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 39 -> 40 | |
>>> 19437 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 40 -> 41 | |
>>> 19462 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 41 -> 42 | |
>>> 19488 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 42 -> 43 | |
>>> 19529 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 43 -> 44 | |
>>> 20803 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 44 -> 45 | |
>>> 20806 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 45 -> 46 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replaying state changes 17422 | |
>>> 160 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce None -> 1 | |
>>> 165 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 1 -> 2 | |
>>> 171 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 2 -> 3 | |
>>> 175 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 3 -> 4 | |
>>> 192 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce None -> 1 | |
>>> 196 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 1 -> 2 | |
>>> 205 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 2 -> 3 | |
>>> 209 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 4 -> 5 | |
>>> 210 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 3 -> 4 | |
>>> 219 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 5 -> 6 | |
>>> 220 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 6 -> 7 | |
>>> 226 ReceiveSecretReveal | |
Events: ['SendSecretReveal', 'SendBalanceProof', 'EventUnlockSuccess'] | |
Updated our nonce 7 -> 8 | |
>>> 260 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 4 -> 5 | |
>>> 265 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 5 -> 6 | |
>>> 270 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated partner nonce 6 -> 7 | |
>>> 277 ReceiveUnlock | |
Events: ['SendProcessed', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 7 -> 8 | |
>>> 298 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 8 -> 9 | |
>>> 302 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 9 -> 10 | |
>>> 305 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 10 -> 11 | |
>>> 310 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 11 -> 12 | |
>>> 312 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 12 -> 13 | |
>>> 316 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 13 -> 14 | |
>>> 320 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 14 -> 15 | |
>>> 325 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 15 -> 16 | |
>>> 329 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 16 -> 17 | |
>>> 334 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 17 -> 18 | |
>>> 336 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 18 -> 19 | |
>>> 341 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 19 -> 20 | |
>>> 343 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 20 -> 21 | |
>>> 348 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 21 -> 22 | |
>>> 350 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 22 -> 23 | |
>>> 354 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 23 -> 24 | |
>>> 360 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 24 -> 25 | |
>>> 364 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 25 -> 26 | |
>>> 632 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated partner nonce 26 -> 27 | |
>>> 640 ReceiveUnlock | |
Events: ['SendProcessed', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 27 -> 28 | |
>>> 845 ReceiveTransferRefundCancelRoute | |
Events: ['SendProcessed', 'EventUnlockFailed', 'SendLockedTransfer'] | |
Updated our nonce 8 -> 9 | |
>>> 869 ReceiveTransferRefundCancelRoute | |
Events: ['SendProcessed', 'EventUnlockFailed', 'SendLockedTransfer'] | |
Updated our nonce 9 -> 10 | |
>>> 920 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 10 -> 11 | |
>>> 925 ReceiveSecretReveal | |
Events: ['SendSecretReveal', 'SendBalanceProof', 'EventUnlockSuccess'] | |
Updated our nonce 11 -> 12 | |
>>> 938 ReceiveTransferRefundCancelRoute | |
Events: ['SendProcessed', 'EventUnlockFailed', 'SendLockedTransfer'] | |
Updated our nonce 12 -> 13 | |
>>> 971 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 13 -> 14 | |
>>> 976 ReceiveSecretReveal | |
Events: ['SendBalanceProof', 'EventPaymentSentSuccess', 'EventUnlockSuccess'] | |
Updated our nonce 14 -> 15 | |
>>> 982 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 15 -> 16 | |
>>> 987 ReceiveSecretReveal | |
Events: ['SendSecretReveal', 'SendBalanceProof', 'EventUnlockSuccess'] | |
Updated our nonce 16 -> 17 | |
>>> 1029 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 17 -> 18 | |
>>> 1057 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 18 -> 19 | |
>>> 1109 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 19 -> 20 | |
>>> 3250 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 20 -> 21 | |
>>> 3267 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 21 -> 22 | |
>>> 3348 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 22 -> 23 | |
>>> 3868 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 23 -> 24 | |
>>> 3956 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 28 -> 29 | |
>>> 3961 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 29 -> 30 | |
>>> 3971 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 24 -> 25 | |
>>> 4092 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 25 -> 26 | |
>>> 4124 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 30 -> 31 | |
>>> 4133 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 31 -> 32 | |
>>> 4268 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated partner nonce 32 -> 33 | |
>>> 4276 ReceiveUnlock | |
Events: ['SendProcessed', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 33 -> 34 | |
>>> 4500 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 26 -> 27 | |
>>> 4594 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 27 -> 28 | |
>>> 4732 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 28 -> 29 | |
>>> 4972 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 29 -> 30 | |
>>> 5783 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 30 -> 31 | |
>>> 6546 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 31 -> 32 | |
>>> 7046 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 32 -> 33 | |
>>> 7616 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 33 -> 34 | |
>>> 8246 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 34 -> 35 | |
>>> 8386 ActionInitTarget | |
Events: ['SendProcessed', 'SendSecretRequest'] | |
Updated partner nonce 34 -> 35 | |
>>> 8391 ReceiveUnlock | |
Events: ['SendProcessed', 'EventPaymentReceivedSuccess', 'EventUnlockClaimSuccess', 'SendProcessed'] | |
Updated partner nonce 35 -> 36 | |
>>> 8921 ActionInitMediator | |
Events: ['SendProcessed', 'SendRefundTransfer'] | |
Updated our nonce 35 -> 36 | |
Updated partner nonce 36 -> 37 | |
>>> 12859 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 36 -> 37 | |
>>> 13081 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 37 -> 38 | |
>>> 13139 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 38 -> 39 | |
>>> 13176 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 39 -> 40 | |
>>> 13471 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 40 -> 41 | |
>>> 13888 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 41 -> 42 | |
>>> 13961 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 42 -> 43 | |
>>> 13989 ActionInitMediator | |
Events: ['SendProcessed', 'SendLockedTransfer'] | |
Updated our nonce 43 -> 44 | |
>>> 14829 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 44 -> 45 | |
>>> 15138 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 45 -> 46 | |
>>> 15482 ActionInitInitiator | |
Events: ['SendLockedTransfer'] | |
Updated our nonce 46 -> 47 | |
>>> 17175 Block | |
Events: ['SendLockExpired'] | |
Updated our nonce 47 -> 48 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import structlog | |
from raiden.transfer.architecture import StateManager | |
from raiden.storage import serialize, sqlite, wal | |
from raiden.transfer import node, views | |
from raiden.storage.wal import WriteAheadLog | |
CHANNEL_ID = 1 | |
def main(): | |
path = <INSERT DB PATH HERE> | |
storage = sqlite.SQLiteStorage(path, serialize.JSONSerializer()) | |
print('here') | |
restore_to_state_change( | |
transition_function=node.state_transition, | |
storage=storage, | |
state_change_identifier='latest', | |
) | |
def check(state_change, state): | |
if not state: | |
return None, None | |
if len(state.identifiers_to_paymentnetworks) != 1: | |
return None, None | |
key = list(state.identifiers_to_paymentnetworks.keys())[0] | |
payment_network = state.identifiers_to_paymentnetworks[key] | |
token_address = b"\xc0*\xaa9\xb2#\xfe\x8d\n\x0e\\O'\xea\xd9\x08<ul\xc2" | |
if not token_address in payment_network.tokenaddresses_to_tokennetworks: | |
return None, None | |
token_network = payment_network.tokenaddresses_to_tokennetworks[token_address] | |
channel_id = CHANNEL_ID | |
if not channel_id in token_network.channelidentifiers_to_channels.keys(): | |
return None, None | |
channel = token_network.channelidentifiers_to_channels[channel_id] | |
our = None | |
if channel.our_state.balance_proof: | |
# print('ours :', channel.our_state.balance_proof.nonce) | |
our = channel.our_state.balance_proof.nonce | |
their = None | |
if channel.partner_state.balance_proof: | |
their = channel.partner_state.balance_proof.nonce | |
return (our, their) | |
def restore_to_state_change(transition_function, storage, state_change_identifier): | |
snapshot = storage.get_snapshot_closest_to_state_change(state_change_identifier) | |
from_state_change_id = 0 | |
chain_state = None | |
# if snapshot: | |
# log.debug('Restoring from snapshot') | |
# from_state_change_id, chain_state = snapshot | |
# else: | |
# log.debug('No snapshot found, replaying all state changes') | |
unapplied_state_changes = storage.get_statechanges_by_identifier( | |
from_identifier=from_state_change_id, | |
to_identifier=state_change_identifier, | |
) | |
state_manager = StateManager(transition_function, chain_state) | |
wal = WriteAheadLog(state_manager, storage) | |
print('Replaying state changes', len(unapplied_state_changes)) | |
for id, state_change in enumerate(unapplied_state_changes): | |
b_our, b_their = check(state_change, state_manager.current_state) | |
events = wal.state_manager.dispatch(state_change) | |
a_our, a_their = check(state_change, state_manager.current_state) | |
if b_our != a_our or b_their != a_their: | |
print('>>>', id, state_change.__class__.__name__) | |
print('Events:', [e.__class__.__name__ for e in events]) | |
if b_our != a_our: | |
print(f'Updated our nonce {b_our} -> {a_our}') | |
if b_their != a_their: | |
print(f'Updated partner nonce {b_their} -> {a_their}') | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment