Skip to content

Too long stake duration causes node crash #998

@tuxxy

Description

@tuxxy

Isogeny has been running for a few days. I restarted the process and it resulted in a bug that prevents my node from restarting:

May 21 10:57:41 isogeny valgrind[17823]: Reading from registrar: filepath /home/nucypher/.local/share/nucypher/contract_registry.json
May 21 10:57:41 isogeny valgrind[17823]: Initialized new NucypherTokenAgent for 0x7025A7749e9f768DB080f40ef5C884baB59EA84B with file:///home/nucypher/geth.ipc and /home/nucypher/.local/share/nucypher/contract_registry.json
May 21 10:57:41 isogeny valgrind[17823]: Reading from registrar: filepath /home/nucypher/.local/share/nucypher/contract_registry.json
May 21 10:57:41 isogeny valgrind[17823]: Initialized new NucypherTokenAgent for 0x7025A7749e9f768DB080f40ef5C884baB59EA84B with file:///home/nucypher/geth.ipc and /home/nucypher/.local/share/nucypher/contract_registry.json
May 21 10:57:41 isogeny valgrind[17823]: Reading from registrar: filepath /home/nucypher/.local/share/nucypher/contract_registry.json
May 21 10:57:41 isogeny valgrind[17823]: Initialized new MinerAgent for 0x8434FDfD9f55451b3bd9c65e57A8C85DfaCFDc09 with file:///home/nucypher/geth.ipc and /home/nucypher/.local/share/nucypher/contract_registry.json
May 21 10:57:42 isogeny valgrind[17823]: Traceback (most recent call last):
May 21 10:57:42 isogeny valgrind[17823]:   File "./usr/local/bin/nucypher", line 11, in <module>
May 21 10:57:42 isogeny valgrind[17823]:     load_entry_point('nucypher', 'console_scripts', 'nucypher')()
May 21 10:57:42 isogeny valgrind[17823]:   File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__
May 21 10:57:42 isogeny valgrind[17823]:     return self.main(*args, **kwargs)
May 21 10:57:42 isogeny valgrind[17823]:   File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main
May 21 10:57:42 isogeny valgrind[17823]:     rv = self.invoke(ctx)
May 21 10:57:42 isogeny valgrind[17823]:   File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
May 21 10:57:42 isogeny valgrind[17823]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
May 21 10:57:42 isogeny valgrind[17823]:   File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke
May 21 10:57:42 isogeny valgrind[17823]:     return ctx.invoke(self.callback, **ctx.params)
May 21 10:57:42 isogeny valgrind[17823]:   File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke
May 21 10:57:42 isogeny valgrind[17823]:     return callback(*args, **kwargs)
May 21 10:57:42 isogeny valgrind[17823]:   File "/usr/local/lib/python3.7/dist-packages/click/decorators.py", line 64, in new_func
May 21 10:57:42 isogeny valgrind[17823]:     return ctx.invoke(f, obj, *args, **kwargs)
May 21 10:57:42 isogeny valgrind[17823]:   File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke
May 21 10:57:42 isogeny valgrind[17823]:     return callback(*args, **kwargs)
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/cli/characters/ursula.py", line 313, in ursula
May 21 10:57:42 isogeny valgrind[17823]:     URSULA = ursula_config(password=password, known_nodes=teacher_nodes, lonely=lonely)
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/config/node.py", line 279, in __call__
May 21 10:57:42 isogeny valgrind[17823]:     return self.produce(*args, **kwargs)
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/config/characters.py", line 77, in produce
May 21 10:57:42 isogeny valgrind[17823]:     ursula = self._CHARACTER_CLASS(**merged_parameters)
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/characters/lawful.py", line 763, in __init__
May 21 10:57:42 isogeny valgrind[17823]:     Miner.__init__(self, is_me=is_me, checksum_address=checksum_public_address)
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/blockchain/eth/actors.py", line 398, in __init__
May 21 10:57:42 isogeny valgrind[17823]:     self.__read_stakes()  # "load-in":  Read on-chain stakes
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/blockchain/eth/actors.py", line 618, in __read_stakes
May 21 10:57:42 isogeny valgrind[17823]:     index=onchain_index)
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/blockchain/eth/token.py", line 213, in from_stake_info
May 21 10:57:42 isogeny valgrind[17823]:     value=NU(value, 'NuNit'))
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/blockchain/eth/token.py", line 174, in __init__
May 21 10:57:42 isogeny valgrind[17823]:     self.validate_duration()
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/blockchain/eth/token.py", line 295, in validate_duration
May 21 10:57:42 isogeny valgrind[17823]:     self.__handle_validation_failure(rulebook=rulebook)
May 21 10:57:42 isogeny valgrind[17823]:   File "/home/tux/nucypher/nucypher/blockchain/eth/token.py", line 256, in __handle_validation_failure
May 21 10:57:42 isogeny valgrind[17823]:     raise ValueError(failure_message)
May 21 10:57:42 isogeny valgrind[17823]: ValueError: Stake duration of (367) is too long; must be no more than 365 periods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions