cryptiumlabs / backerei

Automated reward payment & account management for Tezos bakers.
https://cryptium.ch/networks/tezos
GNU General Public License v3.0
49 stars 11 forks source link

Irrefutable pattern failed for pattern [thisCycle] #30

Closed sjmackenzie closed 5 years ago

sjmackenzie commented 5 years ago

Steps to reproduce:

Expected behaviour

Actual behaviour

Feb 15 18:07:00 fractalpool systemd[1]: Starting Tezos mainnet baker stats export...
Feb 15 18:07:01 fractalpool gl4w95d81xw6a1g1sdkgxpqb1p52ld45-monitor-bootstrapped.sh[11787]: { "block": "BL2hG9x5mMMq3SQzytWYpY6so2BkryM9Egzo5DrTSY2UbokBeJH",
Feb 15 18:07:01 fractalpool systemd[1]: Started Tezos mainnet baker stats export.
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Enter source account password:
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 61...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 62...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 63...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 64...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 65...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 66...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 67...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 68...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 69...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 70...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 71...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 72...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 73...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 74...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 75...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 76...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 77...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 78...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 79...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 80...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with estimates for cycle 81...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: Updating DB with actual earnings for cycle 56...
Feb 15 18:15:37 fractalpool kxncibjbi2w8ajp0d0442lm6mrkmxsw4-unit-script-tezos-mainnet-baker-stats-0-start[11791]: backerei: app/Payout.hs:56:19-92: backerei: app/Payout.hs:56:19-92: Irrefutable pattern failed for pattern [thisCycle]
Feb 15 18:15:37 fractalpool systemd[1]: tezos-mainnet-baker-stats-0.service: Main process exited, code=exited, status=1/FAILURE
Feb 15 18:15:37 fractalpool systemd[1]: tezos-mainnet-baker-stats-0.service: Failed with result 'exit-code'.
sjmackenzie commented 5 years ago

Ah, I'm actually running 042f97ec9e9f542421134416f8ee0301c9bb749e, let me update and see what transpires.

sjmackenzie commented 5 years ago

The problem holds even with the latest backerei commit.

cwgoes commented 5 years ago

That's unusual; it means that the Tezos client is reporting either no entry for this cycle's frozen balances, or more than one entry, neither of which should be possible.

Can you run tezos-admin-client get /chains/main/blocks/{hash}/context/delegates/{delegate}/frozen_balance_by_cycle, where {hash} is the hash of a block after the cycle in question had finished, and {delegate} is your delegate's address?

If this means your delegate has no frozen balances, it's safe to change app/Payout.hs:55 to default to an empty frozen balance (glad to help if that's indeed the problem).

cwgoes commented 5 years ago

Closing since this is stale, but feel free to reopen if you still need help debugging.