System Chunk panic at staking auction end with Slot Selection
jordanschalm opened this issue · 1 comments
Problem
The system chunk panics when ending the staking auction, when running epoch integration tests using the version of flow-core-contracts
in the node-lists
branch.
Error Log
··· DOCK: 2023-01-20 22:25:08.355884403 +0000 UTC (clogs ) execution_2 (e8534526bb1d4ad01a6b14ce76abcd1f641dac387053781fc13b5d9029cf5a56) - ��!{"level":"error","node_role":"execution","node_id":"160b8cbd65583516f67c60d333194a048123132de0425f872d91274b55029f65","engine":"computation","component":"block_computer","tx_id":"7f12f7bfcd5963019207fb6036284661b8de36f2a43fddd0f3dcdaa5dcdadda3","tx_index":0,"block_id":"3c73a2336bb73fa6029f0878ef8ec63290a331c2018bdbcaee87206cc0c612cd","height":197,"system_chunk":true,"system_transaction":true,"computation_used":541,"memory_used":16070276,"mem_alloc":1041480,"time_spent_in_ms":21,"error_message":"[Error Code: 1101] error caused by: 1 error occurred:\n\t* transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed:\n --> 7f12f7bfcd5963019207fb6036284661b8de36f2a43fddd0f3dcdaa5dcdadda3:7:4\n |\n7 | heartbeat.advanceBlock()\n | ^^^^^^^^^^^^^^^^^^^^^^^^\n\n --> f8d6e0586b0a20c7.FlowEpoch:357:24\n\n --> f8d6e0586b0a20c7.FlowEpoch:387:12\n\n --> f8d6e0586b0a20c7.FlowEpoch:550:18\n\n --> f8d6e0586b0a20c7.FlowIDTableStaking:1674:29\n\nerror: pre-condition failed: Specified node ID does not exist in the record\n --> f8d6e0586b0a20c7.FlowIDTableStaking:1491:36\n\n\n","error_code":1101,"system_chunk_error":true,"system_transaction_error":true,"critical_error":true,"time":"2023-01-20T22:25:08.354001096Z","message":"error executing system chunk transaction"}
- In the test case, one new Collection Node stakes and an existing Collection Node unstakes, at the first epoch boundary.
- The error first appears at height 197, which corresponds to the staking auction end view of 199 -- so this failure occurs at the end of the staking auction.
Steps to Reproduce
Run test TestEpochJoinAndLeaveLN
on branch onflow/flow-go#3837, which uses the modified Staking contract.
Addressed in 9d40ff6