livepeer/go-livepeer

Stale unbonding locks displayed in livepeer_cli

Open

#1,715 opened on Dec 21, 2020

 (0 comments) (0 reactions) (0 assignees)Go (223 forks)auto 404
area: blockchainarea: cligood first issuestatus: iceboxtype: bug

Repository metrics

Stars
 (583 stars)
PR merge metrics
 (PR metrics pending)

Description

Describe the bug A clear and concise description of what the bug is.

A user observed stale unbonding locks (i.e. withdrawals have already been executed for them) displayed in livepeer_cli.

livepeer_cli showed the following unbonding lock IDs: 16, 18, 21.

scout.cool shows the following withdrawals for the node's address. You can see that withdrawals have been executed for unbonding lock IDs 16, 18 and 21 already.

The /unbondingLocks endpoint should be returning a list of all currently valid unbonding locks. I suspect that there may be a bug either somewhere in the handler or in the UnbondingWatcher, which watches for unbonding lock related events and updates the node's DB. The handler contains logic to fill in missing unbonding lock IDs, but in this case its possible that the unbonding lock ID was not missing, but the unbonding watcher just never properly updated the entry in the DB after a withdrawal was executed.

A solution for this issue should ensure that livepeer_cli never shows invalid unbonding locks to the user.

Desktop (please complete the following information):

  • Version [e.g. 22]: 0.5.13-ce102b8b

Contributor guide