Closed brenzi closed 4 years ago
could reproduce this starting all over from scratch
Thanks to new debug messages there's some more info:
If we create claims during ASSIGNING phase, the meetup timestamp will be different than if we create the same claim during ATTESTING
generate during assigning
[2020-08-30T13:53:25Z DEBUG substratee_stf::cli] claim: ClaimOfAttendance { claimant_public: 50503350955afe8a107d6f115dc253eb5d75a3fe37a90b373db26cc12e3c6661 (5Dt1Wg85...), ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598955374460, number_of_participants_confirmed: 3 }
50503350955afe8a107d6f115dc253eb5d75a3fe37a90b373db26cc12e3c66612500000062b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f0100000000000000e26ebce423000000008093f0190000007cc72a497401000003000000
(GMT Tuesday, September 1, 2020 10:16:14.460 AM)
generate during attesting
[2020-08-30T13:58:45Z DEBUG substratee_stf::cli] claim: ClaimOfAttendance { claimant_public: 50503350955afe8a107d6f115dc253eb5d75a3fe37a90b373db26cc12e3c6661 (5Dt1Wg85...), ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }
50503350955afe8a107d6f115dc253eb5d75a3fe37a90b373db26cc12e3c66612500000062b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f0100000000000000e26ebce423000000008093f0190000007cb3b7397401000003000000
(GMT Saturday, August 29, 2020 10:16:14.460 AM)
this may be caused by fast-forwarding to next_phase()
which affects meetup time.
when testing bot-community-sea-of-crete.sh, the runtime complains
[2020-08-30T14:16:07Z DEBUG sp_io::misc] ignoring claim beyond time tolerance (too early)
some test logs
on chain queries
phase=ATTESTING
next_phase_timestamp=1598832000000 (GMT Monday, August 31, 2020 12:00:00 AM)
phase_durations(ATTESTING)= 172800000 (48h)
cid = 37
---------------
AliceIncognito
[2020-08-30T14:21:22Z DEBUG substratee_stf::cli] claim: ClaimOfAttendance { claimant_public: 50503350955afe8a107d6f115dc253eb5d75a3fe37a90b373db26cc12e3c6661 (5Dt1Wg85...), ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }
claim1=50503350955afe8a107d6f115dc253eb5d75a3fe37a90b373db26cc12e3c66612500000062b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f0100000000000000e26ebce423000000008093f0190000007cb3b7397401000003000000
timestamp is 1598696174460 (GMT Saturday, August 29, 2020 10:16:14.460 AM)
onchain formula: 1598696160000 (14s earlier)
(rounding lon)
BobIncognito
[2020-08-30T14:22:11Z DEBUG substratee_stf::cli] claim: ClaimOfAttendance { claimant_public: c24c5b3969d8ec4ca8a655a98dcc136d5d4c29d1206ffe7721e80ebdfa1d0b77 (5GTTq4En...), ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }
claim2=c24c5b3969d8ec4ca8a655a98dcc136d5d4c29d1206ffe7721e80ebdfa1d0b772500000062b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f0100000000000000e26ebce423000000008093f0190000007cb3b7397401000003000000
CharlieIncognito
[2020-08-30T14:23:02Z DEBUG substratee_stf::cli] claim: ClaimOfAttendance { claimant_public: a0f90738cda701bb8c8506bb278488e6efe8549489ef4cc77ca4024efb42311b (5FhmVhGB...), ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }
claim3=a0f90738cda701bb8c8506bb278488e6efe8549489ef4cc77ca4024efb42311b2500000062b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f0100000000000000e26ebce423000000008093f0190000007cb3b7397401000003000000
then do all the signing
> export RUST_LOG=debug,ws=warn,substrate_api_client=warn
> nctr trusted register-attestations $account1 $witness2_1 $witness3_1 --mrenclave $MRENCLAVE --shard $cid
client log
[2020-08-30T14:30:54Z INFO substratee_stf::cli] getting pair for //AliceIncognito
[2020-08-30T14:30:54Z DEBUG substratee_stf::cli] attestations: [Attestation { claim: ClaimOfAttendance { claimant_public: 50503350955afe8a107d6f115dc253eb5d75a3fe37a90b373db26cc12e3c6661 (5Dt1Wg85...), ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }, signature: MultiSignature::Sr25519(ae939588504a73303007c6c05e380dd0127049e25292480103860df36899de0b222018174f099a4e531e6cd1a83964090d5fc631f162affd757b93b398a1428a), public: c24c5b3969d8ec4ca8a655a98dcc136d5d4c29d1206ffe7721e80ebdfa1d0b77 (5GTTq4En...) }, Attestation { claim: ClaimOfAttendance { claimant_public: 50503350955afe8a107d6f115dc253eb5d75a3fe37a90b373db26cc12e3c6661 (5Dt1Wg85...), ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }, signature: MultiSignature::Sr25519(c04957b36788363255074d6c38a7cee624e5d2fcb4e192731655c1c4d8784f2b55835adfb88de96d1a7f91a1b2c56fd8e1eede5d7054371b1a32f25a4a6ce987), public: a0f90738cda701bb8c8506bb278488e6efe8549489ef4cc77ca4024efb42311b (5FhmVhGB...) }]
send TrustedCall::register_attestations for 5Dt1Wg85pXGLstt36t6TDdvXXoCtG6zkUL17KkyVaPYSrzGH
[2020-08-30T14:30:54Z INFO encointer_client_teeproxy] connecting to wss://cantillon.encointer.org:443
[2020-08-30T14:30:54Z INFO encointer_client_teeproxy] Connecting to substraTEE-worker on 'wss://substratee03.scs.ch:443'
[2020-08-30T14:30:54Z INFO substratee_worker_api] [Worker Api]: Sending request: PubKeyWorker
[2020-08-30T14:30:54Z DEBUG substratee_worker_api::client] sending request: PubKeyWorker
[2020-08-30T14:31:01Z INFO substratee_worker_api::client] got message
[2020-08-30T14:31:01Z DEBUG substratee_worker_api::client] {"n":[67,31,237,44,246,132,149,105,205,31,148,202,175,33,75,60,58,92,166,37,249,236,153,80,56,5,128,1,104,115,185,58,87,35,4,183,111,29,38,18,57,125,104,139,199,241,30,132,115,98,56,52,177,216,54,228,206,111,48,205,192,163,39,114,119,154,214,203,48,185,171,211,224,25,27,212,50,106,210,101,225,182,169,128,64,199,11,171,131,117,46,131,149,101,104,26,173,138,68,202,77,99,22,167,192,23,141,171,250,201,122,36,111,1,72,154,67,164,183,66,63,170,42,215,104,81,193,65,195,180,121,22,199,191,77,210,47,219,186,207,175,82,248,112,2,96,162,203,77,224,201,87,80,188,147,191,74,143,175,147,18,123,158,60,152,76,202,247,103,88,16,121,81,115,192,244,121,129,28,97,132,136,142,186,180,8,9,4,240,2,140,83,60,129,124,102,26,200,21,19,199,215,251,96,109,109,198,102,32,26,18,45,57,108,240,114,186,193,158,137,125,23,156,212,235,192,107,133,104,247,161,43,132,224,180,135,52,12,109,68,199,39,201,185,252,103,212,103,193,131,194,70,50,103,54,109,6,8,97,235,241,167,247,252,142,151,83,17,123,1,234,17,205,201,153,159,113,145,224,145,63,227,19,35,252,249,177,2,34,48,126,76,4,237,175,97,176,32,250,212,8,27,110,246,71,172,15,250,151,195,145,165,98,84,6,130,222,85,194,6,148,152,110,203,215,236,137,86,132,129,157,62,98,9,118,129,122,71,101,144,66,72,4,91,226,114,161,56,208,182,1,12,196,194,68,187,73,111,34,240,15,190,133,178,175,63,9,41,194,10,167,1,84,153,128,183,145,119,147,240,196,96,102,144],"e":[1,0,0,1]}
[2020-08-30T14:31:01Z INFO substratee_worker_api] [+] Got RSA public key of enclave
[2020-08-30T14:31:01Z DEBUG substratee_worker_api] enclave RSA pubkey = Rsa3072KeyPair: { n:431FED2CF6849569CD1F94CAAF214B3C3A5CA625F9EC9950380580016873B93A572304B76F1D2612397D688BC7F11E8473623834B1D836E4CE6F30CDC0A32772779AD6CB30B9ABD3E0191BD4326AD265E1B6A98040C70BAB83752E839565681AAD8A44CA4D6316A7C0178DABFAC97A246F01489A43A4B7423FAA2AD76851C141C3B47916C7BF4DD22FDBBACFAF52F8700260A2CB4DE0C95750BC93BF4A8FAF93127B9E3C984CCAF7675810795173C0F479811C6184888EBAB4080904F0028C533C817C661AC81513C7D7FB606D6DC666201A122D396CF072BAC19E897D179CD4EBC06B8568F7A12B84E0B487340C6D44C727C9B9FC67D467C183C2463267366D060861EBF1A7F7FC8E9753117B01EA11CDC9999F7191E0913FE31323FCF9B10222307E4C04EDAF61B020FAD4081B6EF647AC0FFA97C391A562540682DE55C20694986ECBD7EC895684819D3E620976817A4765904248045BE272A138D0B6010CC4C244BB496F22F00FBE85B2AF3F0929C20AA701549980B7917793F0C4606690, e:01000001 }
[2020-08-30T14:31:01Z INFO encointer_client_teeproxy] getting pair for //Alice
[2020-08-30T14:31:01Z INFO encointer_client_teeproxy] Composing generic extrinsic for module "SubstrateeRegistry" and call "call_worker"
[2020-08-30T14:31:01Z INFO encointer_client_teeproxy] stf call extrinsic sent. Hash: None
[2020-08-30T14:31:01Z INFO encointer_client_teeproxy] waiting for confirmation of stf call
[2020-08-30T14:31:06Z ERROR substrate_api_client] couldn't decode event record list
worker log
2020-08-30T14:31:26Z DEBUG substratee_stf::sgx] CurrentPhase Some(Ok(ATTESTING))
[2020-08-30T14:31:26Z DEBUG substratee_stf::sgx] CurrentCeremonyIndex Some(Ok(37))
[2020-08-30T14:31:26Z DEBUG substratee_stf::sgx] Attestations [Attestation { claim: ClaimOfAttendance { claimant_public: , ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }, signature: <wasm:stripped>, public: }, Attestation { claim: ClaimOfAttendance { claimant_public: , ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }, signature: <wasm:stripped>, public: }]
[2020-08-30T14:31:26Z DEBUG sp_io::misc] ignoring claim beyond time tolerance (too early)
[2020-08-30T14:31:26Z DEBUG sp_io::misc] ignoring claim beyond time tolerance (too early)
[2020-08-30T14:31:26Z ERROR substratee_worker_enclave] Error performing Stf::execute. Error: Dispatch("ceremonies_register_attestations")
tested again with v0.6.11 (upgraded pallets, fixing meetup time math)
[2020-08-30T17:44:20Z DEBUG substratee_stf::sgx] CurrentPhase Some(Ok(ATTESTING))
[2020-08-30T17:44:20Z DEBUG substratee_stf::sgx] CurrentCeremonyIndex Some(Ok(37))
[2020-08-30T17:44:20Z DEBUG substratee_stf::sgx] Attestations [Attestation { claim: ClaimOfAttendance { claimant_public: , ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }, signature: <wasm:stripped>, public: }, Attestation { claim: ClaimOfAttendance { claimant_public: , ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }, signature: <wasm:stripped>, public: }]
[2020-08-30T17:44:20Z DEBUG substratee_stf::sgx] NextPhaseTimestamp Some(Ok(1598832000000))
[2020-08-30T17:44:20Z DEBUG substratee_stf::sgx] PhaseDurations for ATTESTING None
[2020-08-30T17:44:20Z DEBUG sp_io::misc] ignoring claim beyond time tolerance (too early)
[2020-08-30T17:44:20Z DEBUG sp_io::misc] ignoring claim beyond time tolerance (too early)
[2020-08-30T17:44:20Z ERROR substratee_worker_enclave] Error performing Stf::execute. Error: Dispatch("ceremonies_register_attestations")
so the next_phase_timestamp is correct, however, the state for PhaseDurations hasn't been synched (its a map!)
that was it!
[2020-08-30T17:52:23Z DEBUG substratee_stf::sgx] CurrentPhase Some(Ok(ATTESTING))
[2020-08-30T17:52:23Z DEBUG substratee_stf::sgx] CurrentCeremonyIndex Some(Ok(37))
[2020-08-30T17:52:23Z DEBUG substratee_stf::sgx] Attestations [Attestation { claim: ClaimOfAttendance { claimant_public: , ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }, signature: <wasm:stripped>, public: }, Attestation { claim: ClaimOfAttendance { claimant_public: , ceremony_index: 37, currency_identifier: 0x62b697d59a41ecd5edfa0a9f8a26913ebe84d4f80edc1c934be7b6f9f633b05f, meetup_index: 1, location: Location { lat: 35.8935002615, lon: 25.9397506714 }, timestamp: 1598696174460, number_of_participants_confirmed: 3 }, signature: <wasm:stripped>, public: }]
[2020-08-30T17:52:23Z DEBUG substratee_stf::sgx] NextPhaseTimestamp Some(Ok(1598832000000))
[2020-08-30T17:52:23Z DEBUG substratee_stf::sgx] PhaseDurations for ATTESTING Some(Ok(172800000))
[2020-08-30T17:52:23Z DEBUG sp_io::misc] registered attestations for:
[2020-08-30T17:52:23Z DEBUG sp_io::misc] [80, 80, 51, 80, 149, 90, 254, 138, 16, 125, 111, 17, 93, 194, 83, 235, 93, 117, 163, 254, 55, 169, 11, 55, 61, 178, 108, 193, 46, 60, 102, 97]
CLI hangs at
and also get-attestations query confirms that the attestations were not registered
Here the worker log for
register-attestations
followed byget-attestation
So the enclave tells us: