integritee-network / worker

Integritee off-chain worker and sidechain validateer
Apache License 2.0
89 stars 46 forks source link

CI errors with M6 and M8 #439

Closed brenzi closed 3 years ago

brenzi commented 3 years ago

I might have been be able to reproduce the trouble we see with CI, like https://github.com/integritee-network/worker/actions/runs/1307871853

on tee01, /home/ubuntu/brenzi/ I built

demo_direct_call.sh

worker crashes with (even if not running demo-direct-call it crashes after a while):

Enclave wants to send 1 extrinsics
Enclave wants to send 1 extrinsics
Enclave produced sidechain blocks: [SignedBlock { block: Block { block_number: 986, parent_hash: 0xdda004c26554fe9b43fc9531d778ad535962ccff4b55a7168ab2a6f6f8b93c90, timestamp: 1633462297534, layer_one_head: 0x545acf2f9ff252b3a2f4f1d8b3043445741558ba098dea96c3c3d5342367009e, shard_id: 0x2fa1b43ace32502c5e6fbac67f6ab9f29e6aa056d2b605618b4d353d0cf761cb, block_author: 7bf00367c863dbaebc0d2b5ee798b872135d3bd4b68f0e4ec4dee34a488ea3ed (5EsD3cQC...), signed_top_hashes: [], state_payload: [156, 36, 165, 217, 109, 156, 8, 33, 105, 21, 0, 160, 66, 236, 25, 0, 21, 178, 201, 187, 204, 248, 97, 94, 232, 14, 0, 161, 202, 164, 45, 65, 135, 73, 24, 104, 180, 231, 223, 86, 60, 242, 97, 131, 191, 98, 46, 13, 244, 59, 242, 249, 8, 30, 228, 232, 82, 13, 3, 102, 192, 48, 5, 199, 196] }, signature: MultiSignature::Ed25519(cf370d2e48ab444925b39bfa1f49c7d27efb1eef67b04b1a439230bb8e97ef3caccc954fb5227815770e12230a5b1fbaa4adb881fefbdeb3348e3859194d5e06) }]
[2021-10-05T19:31:37Z ERROR integritee_service::sidechain_storage::storage] [Sidechain DB] Sidechainblock (nr: 986) is not a succession of the previous block (nr: 3) in shard: 0x2fa1b43ace32502c5e6fbac67f6ab9f29e6aa056d2b605618b4d353d0cf761cb
Synced 78 blocks out of 78 finalized blocks
thread '<unnamed>' panicked at 'attempt to divide by zero', /home/ubuntu/brenzi/worker/sidechain/consensus/slots/src/slots.rs:45:21
note: Call backtrace::enable_backtrace with 'PrintFormat::Short/Full' for a backtrace.
fatal runtime error: failed to initiate panic, error 5
Illegal instruction (core dumped)

from the start I see tons of Sidechainblock (nr: 986) is not a succession of the previous block (nr: 3) in shard:

clangenb commented 3 years ago

This is probably a separate case from the #407 unfortunately because I would have seen this in the logs and M6 started to fail before slots were introduced.