Giter Club home page Giter Club logo

encointer-wallet-flutter's People

Contributors

0xthreebody avatar anizeani avatar azackmatoff avatar brenzi avatar clangenb avatar dependabot[bot] avatar eldar2021 avatar gr8mu1 avatar haerdib avatar licaon-kter avatar ltfschoen avatar mosonyi avatar pifragile avatar poussinou avatar romeroyang avatar sourbaevajanaraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

encointer-wallet-flutter's Issues

attestations get rejected with bad signature

Sep 19 16:54:12 gesell encointer-node[1830]: 2020-09-19 16:54:12.549 import-queue-worker-0 DEBUG runtime  ignoring attestation with bad signature
Sep 19 16:54:12 gesell encointer-node[1830]: 2020-09-19 16:54:12.550 import-queue-worker-0 DEBUG runtime  ignoring attestation with bad signature
Sep 19 16:54:12 gesell encointer-node[1830]: 2020-09-19 16:54:12.550 import-queue-worker-0 DEBUG runtime  DispatchError
Sep 19 16:54:12 gesell encointer-node[1830]: 2020-09-19 16:54:12.550 import-queue-worker-0 DEBUG runtime  9
Sep 19 16:54:12 gesell encointer-node[1830]: 2020-09-19 16:54:12.550 import-queue-worker-0 DEBUG runtime  6
Sep 19 16:54:12 gesell encointer-node[1830]: 2020-09-19 16:54:12.550 import-queue-worker-0 DEBUG runtime  NoValidAttestations
...
Sep 19 16:56:18 gesell encointer-node[1830]: 2020-09-19 16:56:18.558 import-queue-worker-0 DEBUG runtime  ignoring attestation with bad signature
Sep 19 16:56:18 gesell encointer-node[1830]: 2020-09-19 16:56:18.560 import-queue-worker-0 DEBUG runtime  registered attestations for:
Sep 19 16:56:18 gesell encointer-node[1830]: 2020-09-19 16:56:18.560 import-queue-worker-0 DEBUG runtime  868c0476c538fa7e5fa60d206bb5d573286a8b0f84fb976905cacc2efb6c1352
nctr --cid $cid list-attestations-registry
listing attestations for cid Evwh6Usv8GLdov7KX47hNqDPMgFgFEL1CShFpmRbndh4 and ceremony nr 7858
number of attestations:  2
AttestationRegistry[7858, 1 (5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7)] = Some([cebe13cadd0372d354b606070cb624123779e4509741eba780b6e1f1c4456e63 (5GjnBkWt...), 868c0476c538fa7e5fa60d206bb5d573286a8b0f84fb976905cacc2efb6c1352 (5F77sGnU...)])
AttestationRegistry[7858, 2 (5F77sGnUhpjdFnzruhurGZgqPFtvdECXTGgX4Bgy2zGavbEw)] = Some([cebe13cadd0372d354b606070cb624123779e4509741eba780b6e1f1c4456e63 (5GjnBkWt...)])

gamma had both attestations rejected
beta got an invalid attestation from alpha

and the app log for alpha 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7
(which got 2 valid attestations, but gave a bad attestation to gamma)

alpha's claim

I/flutter ( 4980): received msg: {"path":"js-getClaimOfAttendance","data":"claim: {\"claimant_public\":\"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7\",\"ceremony_index\":7858,\"currency_identifier\":\"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb\",\"meetup_index\":1,\"location\":{\"lat\":\"0x0000002f63b73d36\",\"lon\":\"0x00000008845b0900\"},\"timestamp\":1600619040000,\"number_of_participants_confirmed\":3}"}
I/flutter ( 4980): received msg: {"path":"uid=23;encointer.getClaimOfAttendance","data":"0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac7401000003000000"}
I/flutter ( 4980): performing attestation
I/flutter ( 4980): I'm party A. showing my claim now

... QR stuff ...

I/flutter ( 4980): Attestation received by QR code: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac74010000030000000168dde61042fd2b35fa119f078eb291c684e20154572ec6eac0accc9faba61e4576e8a7b6d05c4feffc9b184cb1464f73e942c6d6e06d51e339b59055760c638dcebe13cadd0372d354b606070cb624123779e4509741eba780b6e1f1c4456e63
I/flutter ( 4980): Claim received by qrCode:0xcebe13cadd0372d354b606070cb624123779e4509741eba780b6e1f1c4456e63b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac7401000003000000
I/flutter ( 4980): attestation done for 5GjnBkWthQqmfxL35A2sY9QeTky33bENo5zbLxh7KsY5wo5L

E/flutter ( 4980): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: Invalid argument(s): Illegal argument in isolate message : (function types are not supported yet)
E/flutter ( 4980): #0      spawnFunction (dart:_internal-patch/internal_patch.dart:184:54)
E/flutter ( 4980): #1      Isolate.spawn (dart:isolate-patch/isolate_patch.dart:380:7)
E/flutter ( 4980): #2      compute (package:flutter/src/foundation/_isolates_io.dart:24:41)
E/flutter ( 4980): #3      LocalStorage.setObject (package:polka_wallet/utils/localStorage.dart:74:31)
E/flutter ( 4980): #4      _EncointerStore.addAttestation (package:polka_wallet/store/encointer/encointer.dart:120:10)
E/flutter ( 4980): #5      _$EncointerStore.addAttestation (package:polka_wallet/store/encointer/encointer.g.dart:348:20)
E/flutter ( 4980): #6      _AttestationCardState._performAttestation (package:polka_wallet/page-encointer/attesting/attestationCard.dart:70:23)
E/flutter ( 4980): <asynchronous suspension>
E/flutter ( 4980): #7      _AttestationCardState.build.<anonymous closure>.<anonymous closure> (package:polka_wallet/page-encointer/attesting/attestationCard.dart:178:41)
E/flutter ( 4980): #8      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19)
E/flutter ( 4980): #9      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1098:38)
E/flutter ( 4980): #10     GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24)
E/flutter ( 4980): #11     TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11)
E/flutter ( 4980): #12     BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5)
E/flutter ( 4980): #13     BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:256:7)
E/flutter ( 4980): #14     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:158:27)
E/flutter ( 4980): #15     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:224:20)
E/flutter ( 4980): #16     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22)
E/flutter ( 4980): #17     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:158:7)
E/flutter ( 4980): #18     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:104:7)
E/flutter ( 4980): #19     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:88:7)
E/flutter ( 4980): #20     _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter ( 4980): #21     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter ( 4980): #22     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter ( 4980): #23     _invoke1 (dart:ui/hooks.dart:267:10)
E/flutter ( 4980): #24     _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)
E/flutter ( 4980): 
I/flutter ( 4980): received msg: {"path":"js-attestClaimOfAttendance","data":"attestingClaimOfAttendance with claim: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac74010000030000000168dde61042fd2b35fa119f078eb291c684e20154572ec6eac0accc9faba61e4576e8a7b6d05c4feffc9b184cb1464f73e942c6d6e06d51e339b59055760c638dcebe13cadd0372d354b606070cb624123779e4509741eba780b6e1f1c4456e63 pubKey: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235, pwd: 123qwe"}

...

I/flutter ( 4980): received msg: {"path":"uid=27;account.attestClaimOfAttendance","data":{"attestation":{"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lat":"0x0000002f63b73d36","lon":"0x00000008845b0900"},"timestamp":1600619040000,"number_of_participants_confirmed":3},"signature":{"Sr25519":"0x985e249b62c615878306b8475b11d22b20c4fceb92586e34fb5bde347a4a6a40a035f0410d24a63905d87ac03ff5c3f24a51074237fa3fbcf4bf8a440614b383"},"public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7"},"attestationHex":"0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac740100000300000001985e249b62c615878306b8475b11d22b20c4fceb92586e34fb5bde347a4a6a40a035f0410d24a63905d87ac03ff5c3f24a51074237fa3fbcf4bf8a440614b383acfacdd8d053c4263094ad
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534278000}
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534284000}
I/flutter ( 4980): aat: {claim: {claimant_public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7, ceremony_index: 7858, currency_identifier: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb, meetup_index: 1, location: {lat: 0x0000002f63b73d36, lon: 0x00000008845b0900}, timestamp: 1600619040000, number_of_participants_confirmed: 3}, signature: {Sr25519: 0x985e249b62c615878306b8475b11d22b20c4fceb92586e34fb5bde347a4a6a40a035f0410d24a63905d87ac03ff5c3f24a51074237fa3fbcf4bf8a440614b383}, public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7}
I/flutter ( 4980): Attestation: {attestation: {claim: {claimant_public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7, ceremony_index: 7858, currency_identifier: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb, meetup_index: 1, location: {lat: 0x0000002f63b73d36, lon: 0x00000008845b0900}, timestamp: 1600619040000, number_of_participants_confirmed: 3}, signature: {Sr25519: 0x985e249b62c615878306b8475b11d22b20c4fceb92586e34fb5bde347a4a6a40a035f0410d24a63905d87ac03ff5c3f24a51074237fa3fbcf4bf8a440614b383}, public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7}, attestationHex: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac740100000300000001985e249b62c615878306b8475b11d22b20c4fceb92586e34fb5bde347a4a6a40a035f0410d24a63905d87ac03ff5c3f24a51074237fa3fbcf4bf8a440614b383acfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235}

now with beta

I/flutter ( 4980): performing attestation
I/flutter ( 4980): I'm party A. showing my claim now
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534332000}
D/ViewRootImpl( 4980): ViewPostImeInputStage processPointer 0
D/ViewRootImpl( 4980): ViewPostImeInputStage processPointer 1
D/SecWifiDisplayUtil( 4980): Metadata value : none
D/ViewRootImpl( 4980): #1 mView = com.android.internal.policy.PhoneWindow$DecorView{cade5c3 V.E...... R.....I. 0,0-0,0}
D/libEGL  ( 4980): eglInitialize EGLDisplay = 0x577049ac
I/Choreographer( 4980): Skipped 58 frames!  The application may be doing too much work on its main thread.
D/ViewRootImpl( 4980): MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
D/libEGL  ( 4980): eglInitialize EGLDisplay = 0x577049ac
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534338000}
D/libEGL  ( 4980): eglInitialize EGLDisplay = 0x57704b2c
W/art     ( 4980): Suspending all threads took: 6.383ms
I/art     ( 4980): Background sticky concurrent mark sweep GC freed 149(7KB) AllocSpace objects, 11(14MB) LOS objects, 50% free, 12MB/26MB, paused 7.483ms total 54.327ms
I/art     ( 4980): Background partial concurrent mark sweep GC freed 325(186KB) AllocSpace objects, 15(17MB) LOS objects, 58% free, 11MB/27MB, paused 1.505ms total 101.452ms
I/art     ( 4980): Background sticky concurrent mark sweep GC freed 68(3KB) AllocSpace objects, 12(15MB) LOS objects, 53% free, 12MB/27MB, paused 5.052ms total 73.126ms
W/libc    ( 4980): It seems that pthread_join() is not invoked or PTHREAD_ATTR_FLAG_DETACHED is not set.
W/libc    ( 4980):     pthread tid          : 6337
W/libc    ( 4980):     pthread start_routine: 0x5700f6b9
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534344000}
I/flutter ( 4980): Attestation received by QR code: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac74010000030000000142bc6cc94090ebc1f43f2ef4919977b690c728be8b15ef339918b439c0b1906c465629b30ab6a0e454fcd05aa40bfe1caef1f9f2506b523c5b3fb424f73b298d868c0476c538fa7e5fa60d206bb5d573286a8b0f84fb976905cacc2efb6c1352
I/flutter ( 4980): Claim received by qrCode:0x868c0476c538fa7e5fa60d206bb5d573286a8b0f84fb976905cacc2efb6c1352b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac7401000003000000
I/flutter ( 4980): attestation done for 5F77sGnUhpjdFnzruhurGZgqPFtvdECXTGgX4Bgy2zGavbEw
E/flutter ( 4980): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: Invalid argument(s): Illegal argument in isolate message : (function types are not supported yet)
E/flutter ( 4980): #0      spawnFunction (dart:_internal-patch/internal_patch.dart:184:54)
E/flutter ( 4980): #1      Isolate.spawn (dart:isolate-patch/isolate_patch.dart:380:7)
E/flutter ( 4980): #2      compute (package:flutter/src/foundation/_isolates_io.dart:24:41)
E/flutter ( 4980): #3      LocalStorage.setObject (package:polka_wallet/utils/localStorage.dart:74:31)
E/flutter ( 4980): #4      _EncointerStore.addAttestation (package:polka_wallet/store/encointer/encointer.dart:120:10)
E/flutter ( 4980): #5      _$EncointerStore.addAttestation (package:polka_wallet/store/encointer/encointer.g.dart:348:20)
E/flutter ( 4980): #6      _AttestationCardState._performAttestation (package:polka_wallet/page-encointer/attesting/attestationCard.dart:70:23)
E/flutter ( 4980): <asynchronous suspension>
E/flutter ( 4980): #7      _AttestationCardState.build.<anonymous closure>.<anonymous closure> (package:polka_wallet/page-encointer/attesting/attestationCard.dart:178:41)
E/flutter ( 4980): #8      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19)
E/flutter ( 4980): #9      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1098:38)
E/flutter ( 4980): #10     GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24)
E/flutter ( 4980): #11     TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11)
E/flutter ( 4980): #12     BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5)
E/flutter ( 4980): #13     BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:256:7)
E/flutter ( 4980): #14     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:158:27)
E/flutter ( 4980): #15     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:224:20)
E/flutter ( 4980): #16     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22)
E/flutter ( 4980): #17     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:158:7)
E/flutter ( 4980): #18     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:104:7)
E/flutter ( 4980): #19     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:88:7)
E/flutter ( 4980): #20     _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter ( 4980): #21     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter ( 4980): #22     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter ( 4980): #23     _invoke1 (dart:ui/hooks.dart:267:10)
E/flutter ( 4980): #24     _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)
E/flutter ( 4980): 
I/flutter ( 4980): received msg: {"path":"js-attestClaimOfAttendance","data":"attestingClaimOfAttendance with claim: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac74010000030000000142bc6cc94090ebc1f43f2ef4919977b690c728be8b15ef339918b439c0b1906c465629b30ab6a0e454fcd05aa40bfe1caef1f9f2506b523c5b3fb424f73b298d868c0476c538fa7e5fa60d206bb5d573286a8b0f84fb976905cacc2efb6c1352 pubKey: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235, pwd: 123qwe"}

... 

I/flutter ( 4980): received msg: {"path":"uid=28;account.attestClaimOfAttendance","data":{"attestation":{"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lat":"0x0000002f63b73d36","lon":"0x00000008845b0900"},"timestamp":1600619040000,"number_of_participants_confirmed":3},"signature":{"Sr25519":"0x5ec81d02e28d6d0b646112c969b4e71faa6dbe1062cad33af5e8ddf7253ed429af32466e2457e9d495c00907dc220f7fdf562da98d59cca94ce9ae261cf0a38a"},"public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7"},"attestationHex":"0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac7401000003000000015ec81d02e28d6d0b646112c969b4e71faa6dbe1062cad33af5e8ddf7253ed429af32466e2457e9d495c00907dc220f7fdf562da98d59cca94ce9ae261cf0a38aacfacdd8d053c4263094ad
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534350000}
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534356000}
I/flutter ( 4980): aat: {claim: {claimant_public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7, ceremony_index: 7858, currency_identifier: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb, meetup_index: 1, location: {lat: 0x0000002f63b73d36, lon: 0x00000008845b0900}, timestamp: 1600619040000, number_of_participants_confirmed: 3}, signature: {Sr25519: 0x5ec81d02e28d6d0b646112c969b4e71faa6dbe1062cad33af5e8ddf7253ed429af32466e2457e9d495c00907dc220f7fdf562da98d59cca94ce9ae261cf0a38a}, public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7}
I/flutter ( 4980): Attestation: {attestation: {claim: {claimant_public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7, ceremony_index: 7858, currency_identifier: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb, meetup_index: 1, location: {lat: 0x0000002f63b73d36, lon: 0x00000008845b0900}, timestamp: 1600619040000, number_of_participants_confirmed: 3}, signature: {Sr25519: 0x5ec81d02e28d6d0b646112c969b4e71faa6dbe1062cad33af5e8ddf7253ed429af32466e2457e9d495c00907dc220f7fdf562da98d59cca94ce9ae261cf0a38a}, public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7}, attestationHex: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235b21e0000cef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb0100000000000000363db7632f00000000095b8408000000004d54ac7401000003000000015ec81d02e28d6d0b646112c969b4e71faa6dbe1062cad33af5e8ddf7253ed429af32466e2457e9d495c00907dc220f7fdf562da98d59cca94ce9ae261cf0a38aacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235}


I/flutter ( 4980): Attestationcard for 5F77sGnUhpjdFnzruhurGZgqPFtvdECXTGgX4Bgy2zGavbEw
I/flutter ( 4980): Attestationcard for 5GjnBkWthQqmfxL35A2sY9QeTky33bENo5zbLxh7KsY5wo5L
I/flutter ( 4980): Attestationcard for 5DCr4Xh5pFCRHZQhvteNbdzH5bD68b5VFhAkunF7gW9umwkf
I/flutter ( 4980): Attestationcard for 5DPgv6nn4R1Gi1MUiAnzFDPaKF56SYKD9Zq4Q6REUGLhUZk1
I/flutter ( 4980): Attestationcard for 5FEkyAfUWXwA4jdsm88kMzhF7VAenxuwZtwNs9RzeFRjXGcS
I/flutter ( 4980): Attestationcard for 5E6x8Z6R7fYeTETj8Em5pDazcodq6Krjig5gxkSuQEvj6evv
I/flutter ( 4980): Attestationcard for 5CMVLJCC4Jn7QmLsFRkLWkm2w4LJswpZo1V2nd1tp64iVnCR
I/flutter ( 4980): Attestationcard for 5GNdoaiCrGU9G9zz694d1S3XPov6Ji3zo6NR7nN2tH7jtK7Z
D/ViewRootImpl( 4980): ViewPostImeInputStage processPointer 0
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534440000}
D/ViewRootImpl( 4980): ViewPostImeInputStage processPointer 1
I/flutter ( 4980): received msg: {"path":"uid=29;encointer.parseAttestation","data":{"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lat":"0x0000002f63b73d36","lon":"0x00000008845b0900"},"timestamp":1600619040000,"number_of_participants_confirmed":3},"signature":{"Sr25519":"0x42bc6cc94090ebc1f43f2ef4919977b690c728be8b15ef339918b439c0b1906c465629b30ab6a0e454fcd05aa40bfe1caef1f9f2506b523c5b3fb424f73b298d"},"public":"5F77sGnUhpjdFnzruhurGZgqPFtvdECXTGgX4Bgy2zGavbEw"}}
I/flutter ( 4980): received msg: {"path":"uid=30;encointer.parseAttestation","data":{"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lat":"0x0000002f63b73d36","lon":"0x00000008845b0900"},"timestamp":1600619040000,"number_of_participants_confirmed":3},"signature":{"Sr25519":"0x68dde61042fd2b35fa119f078eb291c684e20154572ec6eac0accc9faba61e4576e8a7b6d05c4feffc9b184cb1464f73e942c6d6e06d51e339b59055760c638d"},"public":"5GjnBkWthQqmfxL35A2sY9QeTky33bENo5zbLxh7KsY5wo5L"}}
I/flutter ( 4980): Attestations to be submitted: 
I/flutter ( 4980): {claim: {claimant_public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7, ceremony_index: 7858, currency_identifier: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb, meetup_index: 1, location: {lon: 36580296960, lat: 203536416054}, timestamp: 1600619040000, number_of_participants_confirmed: 3}, signature: {Sr25519: 0x42bc6cc94090ebc1f43f2ef4919977b690c728be8b15ef339918b439c0b1906c465629b30ab6a0e454fcd05aa40bfe1caef1f9f2506b523c5b3fb424f73b298d}, public: 5F77sGnUhpjdFnzruhurGZgqPFtvdECXTGgX4Bgy2zGavbEw}
I/flutter ( 4980): {claim: {claimant_public: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7, ceremony_index: 7858, currency_identifier: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb, meetup_index: 1, location: {lon: 36580296960, lat: 203536416054}, timestamp: 1600619040000, number_of_participants_confirmed: 3}, signature: {Sr25519: 0x68dde61042fd2b35fa119f078eb291c684e20154572ec6eac0accc9faba61e4576e8a7b6d05c4feffc9b184cb1464f73e942c6d6e06d51e339b59055760c638d}, public: 5GjnBkWthQqmfxL35A2sY9QeTky33bENo5zbLxh7KsY5wo5L}
I/flutter ( 4980): received msg: {"path":"uid=31;account.txFeeEstimate","data":{"weight":10000,"class":"Normal","partialFee":10510}}

I/flutter ( 4980): checkpass: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235, 123qwe
I/flutter ( 4980): received msg: {"path":"uid=32;account.checkPassword","data":{"success":true}}
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534470000}
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534476000}
I/flutter ( 4980): {module: encointerCeremonies, call: registerAttestations, address: 5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7, pubKey: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235, password: 123qwe}
I/flutter ( 4980): [[{"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lon":"36580296960","lat":"203536416054"},"timestamp":1600619040000,"number_of_participants_confirmed":3},"signature":{"Sr25519":"0x42bc6cc94090ebc1f43f2ef4919977b690c728be8b15ef339918b439c0b1906c465629b30ab6a0e454fcd05aa40bfe1caef1f9f2506b523c5b3fb424f73b298d"},"public":"5F77sGnUhpjdFnzruhurGZgqPFtvdECXTGgX4Bgy2zGavbEw"}, {"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lon":"36580296960","lat":"203536416054"},"timestamp":1600619040000,"number_of_participants_confirmed":3},"signature":{"Sr25519":"0x68dde61042fd2b35fa119f078eb291c684e20154572ec6eac0accc9faba61e4576e8a7b6d05c4feffc9b184cb1464f73e942c6d6e06d51e339b5905576
I/flutter ( 4980): account.sendTx({"module":"encointerCeremonies","call":"registerAttestations","address":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","pubKey":"0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235","password":"123qwe"}, [[{"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lon":"36580296960","lat":"203536416054"},"timestamp":1600619040000,"number_of_participants_confirmed":3},"signature":{"Sr25519":"0x42bc6cc94090ebc1f43f2ef4919977b690c728be8b15ef339918b439c0b1906c465629b30ab6a0e454fcd05aa40bfe1caef1f9f2506b523c5b3fb424f73b298d"},"public":"5F77sGnUhpjdFnzruhurGZgqPFtvdECXTGgX4Bgy2zGavbEw"},{"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lon":"3658029696

I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534482000}
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534488000}
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534494000}
I/flutter ( 4980): received msg: {"path":"txStatusChange","data":"Ready"}
I/flutter ( 4980): received msg: {"path":"txStatusChange","data":"Broadcast"}
W/libc    ( 4980): It seems that pthread_join() is not invoked or PTHREAD_ATTR_FLAG_DETACHED is not set.
W/libc    ( 4980):     pthread tid          : 6932
W/libc    ( 4980):     pthread start_routine: 0x5700f6b9
I/flutter ( 4980): received msg: {"path":"timestamp","data":1600534500000}
I/flutter ( 4980): received msg: {"path":"uid=33;account.sendTx","data":{"hash":"0xc44439224bd31acb698abd5fafcc61eab683efd8dc48e49676d3300c5e091ee6","time":1600534501683,"params":[[{"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lon":"36580296960","lat":"203536416054"},"timestamp":1600619040000,"number_of_participants_confirmed":3},"signature":{"Sr25519":"0x42bc6cc94090ebc1f43f2ef4919977b690c728be8b15ef339918b439c0b1906c465629b30ab6a0e454fcd05aa40bfe1caef1f9f2506b523c5b3fb424f73b298d"},"public":"5F77sGnUhpjdFnzruhurGZgqPFtvdECXTGgX4Bgy2zGavbEw"},{"claim":{"claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","ceremony_index":7858,"currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","meetup_index":1,"location":{"lon":"36580296960","lat":"203536416054"},"timestamp":1600619040000,"number_of_participants_con

observations:

  • alpha was party A for both others (and failed both)
  • beta was party A for gamma (and failed gamma)

Is something wrong with party A attestation?

improve user guidance during meetup procedure

currently, a QR code is shown with a button "done". This is misleading.

Every QR code should be clearly titled, like "claimA", "attestationA + claimB"
The button should name the next QR code to be scanned on the other device. More intuitive because we can assume that each user sees both screens

there should be a proper back-and-forth movement possible and it should always be clearly stated what the current step is.

The QR code scanner is now full of chinese symbols. Clean that up and replace with the title that should be scanned!

some refactoring of meetup function will be needed for this

reduce size of webpack build

yarn build warns:

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  main.js (2.45 MiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (2.45 MiB)
      main.js


WARNING in webpack performance recommendations: 
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

could this be a reason for our bad js performance?

finish Cantillon support

  • review worker api PR #16
  • throughout code use isEncointer, isEncointerCantillon isEncointerGesell flags to change behaviour and use worker api

replace account password with PIN code

good enough for banking apps, good enough for us I guess. Encointer is for everyday amounts anyway

  • change keyboard to digits only. require 4 digits minimum
  • remove password quality check

enable offline meetups

Currently, we need to be online to start a meetup. The app should cache all Information when it goes online during assigning or attesting and should allow to start the meetup even without any connection to the chain

scenario:

  1. (online) user registers for next ceremony
  2. (online) during ASSIGNING phase, user starts the app to fetch meetup details
  3. user closes the app (and may turn off the phone)
  4. (offline) user starts app shortly before the meetup time
  5. (offline) app shows a countdown until the start of the meetup
  6. (offline) 1min before meetup time, the app shows the button "start meetup"
  7. (offline) user performs meetup
  8. (online) user starts app. app detects online conncetion and submits attestations automatically.
  9. app shows a sticky confirmation that the attestations have been successfully registered onchain

setup iOS CI build and publish pipeline

check options to build on GH or on Azure DevOps (pricing?) or travis (our favorite candidate for CI for other repos too) on Digitalocean (which we already use for testnet droplets)
payments only possible with paypal!

register Apple AppStore Account and register our app.
set up alpha tester release

attestations get rejected because of wrong timestamp "too early"

node says

Sep 18 18:58:30 gesell encointer-node[12944]: 2020-09-18 18:58:30.584 import-queue-worker-0 DEBUG runtime  ignoring claim beyond time tolerance (too early)
Sep 18 18:58:30 gesell encointer-node[12944]: 2020-09-18 18:58:30.588 import-queue-worker-0 DEBUG runtime  DispatchError
Sep 18 18:58:30 gesell encointer-node[12944]: 2020-09-18 18:58:30.588 import-queue-worker-0 DEBUG runtime  9
Sep 18 18:58:30 gesell encointer-node[12944]: 2020-09-18 18:58:30.588 import-queue-worker-0 DEBUG runtime  6
Sep 18 18:58:30 gesell encointer-node[12944]: 2020-09-18 18:58:30.588 import-queue-worker-0 DEBUG runtime  NoValidAttestations
Sep 18 18:58:30 gesell encointer-node[12944]: 2020-09-18 18:58:30.619 main-tokio- INFO substrate  Imported #2253481 (0x7fbfโ€ฆ4d53)
...
Sep 18 18:58:48 gesell encointer-node[12944]: 2020-09-18 18:58:48.018 main-tokio- INFO substrate  Idle (2 peers), best: #2253483 (0xea77โ€ฆ30dc), finalized #2253481 (0x7fbfโ€ฆ4d53), โฌ‡ 2.7kiB/
Sep 18 18:58:48 gesell encointer-node[12944]: 2020-09-18 18:58:48.578 import-queue-worker-0 DEBUG runtime  ignoring claim beyond time tolerance (too early)
Sep 18 18:58:48 gesell encointer-node[12944]: 2020-09-18 18:58:48.580 import-queue-worker-0 DEBUG runtime  DispatchError
Sep 18 18:58:48 gesell encointer-node[12944]: 2020-09-18 18:58:48.580 import-queue-worker-0 DEBUG runtime  9
Sep 18 18:58:48 gesell encointer-node[12944]: 2020-09-18 18:58:48.580 import-queue-worker-0 DEBUG runtime  6
Sep 18 18:58:48 gesell encointer-node[12944]: 2020-09-18 18:58:48.580 import-queue-worker-0 DEBUG runtime  NoValidAttestations

one of the corresponding attestations is

{

    "path":"uid=38;account.sendTx",
    "data":{
        "hash":"0xf1ad62c65a1a2ff42efda8b0ce2db7387d3479dd32a89542a62d2c31cf45259e",
        "time":1600455533703,
        "params":[
            [
                {
                    "claim":{
                        "claimant_public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7",
                        "ceremony_index":7814,
                        "currency_identifier":"0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb",
                        "meetup_index":1,
                        "location":{
                            "lon":"36580296960",
                            "lat":"203536416054"
                        },
                        "timestamp":1600455384000,
                        "number_of_participants_confirmed":3
                    },
                    "signature":{
                        "Sr25519":"0xce09b009370e93368979bc0d7e3262be0c14d892f57105c0fee424f397ff741392a26b16045be12c451e85dab04a5ea17eaf102eb81ad5efac452e35cacad987"
                    },
                    "public":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7"
                }
            ]
        ]
    }

}

which is at timestamp 1600455384000,
Friday, September 18, 2020 18:56:24 UTC

and location should be Turbinenplatz:
lon: 8.51701408624649
lat: 47.38951475674761

the log where meetup time is calculated:

I/flutter (14754): received msg: {"path":"log","data":"Getting participant index for Cid: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb, cIndex: 7813 and address: 0xcebe13cadd0372d354b606070cb624123779e4509741eba780b6e1f1c4456e63"}
I/flutter (14754): received msg: {"path":"log","data":"Meetup Index: 0"}
I/flutter (14754): received msg: {"path":"log","data":"Participant index: 0"}
I/flutter (14754): received msg: {"path":"uid=25;encointer.getParticipantIndex","data":0}
I/flutter (14754): received msg: {"path":"log","data":"Locations: [{\"lat\":\"0x0000002f63b73d36\",\"lon\":\"0x00000008845b0900\"}]"}
I/flutter (14754): received msg: {"path":"log","data":"Latitude: 203536416054"}
I/flutter (14754): received msg: {"path":"uid=26;encointer.getNextMeetupLocation","data":{"lat":"0x0000002f63b73d36","lon":"0x00000008845b0900"}}
I/flutter (14754): Participant Index: 0
I/flutter (14754): Participant Index: 0
I/flutter (14754): received msg: {"path":"timestamp","data":1600452012000}
I/flutter (14754): Next Meetup Location: {lat: 0x0000002f63b73d36, lon: 0x00000008845b0900}
I/flutter (14754): received msg: {"path":"log","data":"Getting next meetup time for Cid 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb and location: 203536416054, 203536416054"}
I/flutter (14754): received msg: {"path":"log","data":"CurrentPhase: Registering"}
I/flutter (14754): received msg: {"path":"log","data":"Duration: 600000"}
I/flutter (14754): received msg: {"path":"uid=27;encointer.getNextMeetupTime","data":1600452000000}
I/flutter (14754): Next Meetup Time: 1600452000000

timestamp is 1600452000000
Friday, September 18, 2020 18:00:00

so there is a difference in time indeed

show tx history with correct fixpoint values and human readable cid&accountid

This will be done with the subscan api. Subscan does already support U64F64 so we will most-likely be able to use their service

Reference from assetsApi code that was used to get history of the native token. (Was removed in a cleanup: #520).

 Future<Map> updateTxs(int page) async {
    store.assets.setTxsLoading(true);

    String address = store.account.currentAddress;
    Map res = await apiRoot.subScanApi.fetchTransfersAsync(
      address,
      page,
      network: store.settings.endpoint.info,
    );

    if (page == 0) {
      store.assets.clearTxs();
    }
    // cache first page of txs
    await store.assets.addTxs(res, address, shouldCache: page == 0);

    store.assets.setTxsLoading(false);
    return res;
  }

missing details

Registering
[ ] cid selector: display cid as base58, not hex

notify extrinsic result

currently, the app only confirms Broadcast but we get no feedback on DispatchResult. We should get that!

We may want to do #58 first as it might be done upstream?

nctr currency balances don't update correctly

In order for updated values to appear in the assets page. One needs to manually reload the listview or switch back and forth from the assets page.

This might be a bug with the caching.

Meetup Ceremony hangs

After scanning it fails to show 'AttestationA | claimB'. Then the screen returns to the initial meetup page and restarting the attestation procedure returns in the same result.

Probably the JS side either hangs on 'webApi.encointer.parseClaimOfAttendance(claimAhex)' or 'webApi.encointer.attestClaimOfAttendance(claimAhex, "pwd");'

create Attestation in js_service_encointer

a meetup participant will scan another one's clam as QR code, decode it and then

  1. verify contents of claim: are the following fields correct (equal to own claim)? currency_identifier, ceremony_index, meetup_index, location, timestamp (this check does not necessarily need to be done in js, could be in dart too. )
  2. sign claim and generate Attestation

This will in turn be encoded into a QR code for the claimant to be scanned

We therefore need a js function attestClaim consuming a SCALE encoded ClaimOfAttendance returning a SCALE encoded Attestaion in service/encointer.js

open questions:

  • where do we verify? in js or in dart? Probably dart is easier for decent error handling than a hidden webview with js.

attestations feature unknown cid, leading to DispatchError when registering attestations

After performing a meetup with three phones running the GH release apk 0.7.6
I get

Sep 18 11:21:54 gesell encointer-node[11064]: 2020-09-18 11:21:54.760 import-queue-worker-0 DEBUG runtime  CurrencyIdentifier not found
Sep 18 11:22:18 gesell encointer-node[11064]: 2020-09-18 11:22:18.532 import-queue-worker-0 DEBUG runtime  CurrencyIdentifier not found
Sep 18 11:22:36 gesell encointer-node[11064]: 2020-09-18 11:22:36.626 import-queue-worker-0 DEBUG runtime  CurrencyIdentifier not found

However, the same happens with the current PR #50 phones are successfully registering to
3SMpCYtGZMjcMgyNvLfBvhermDZBrAnfap89SchUGTz4

explorer shows this also as hex: 0x656e636f696e7465722064756d6d79 but the app shows it as 0x24366d....1eba6fdd which is odd

js apps shows the registry as:

encointerCurrencies.currencyIdentifiers: Vec<CurrencyIdentifier>

[
  0xf26bfaa0feee0968ec0637e1933e64cd1947294d3b667d43b76b3915fc330b53,
  0x2ebf164a5bb618ec6caad31488161b237e24d75efa3040286767b620d9183989,
  0xc792bf36f892404a27603ffd14cd5a12e794ed3c740bab0929ba55b8c747c615,
  0x7c6be63172ccf4665b618538c9abb5a79349ca6c584aff52648802e919dfe1f4,
  0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb,
  0x410351342f6680535043f362a73662d3e0a0335f61f8a1d6be9d32d207de0edf,
  0x5438f68e99a3952db7363f28d71df8020266a56d99935a2be7d6b6aca517d30c,
  0xa73f38f0f4587880d51a1358265e2eae8f44e773578417ebb36ae234aa53ed67,
  0x6839c5e3acf52b5e649659f8665ec1efb431abcaa1035d02df6c97c8fc6205f3,
  0x24366da4a5c58748e6f46167e8ee1e780b33e9d07a666bc7f4628bf11eba6fdd
]

change pubkey for every ceremony by default for enhanced privacy

for Gesell, this is of minor impact because of the linkability risk due to ERT fee payments. At least, changing pubkeys may provide plausible deniability.

for Cantillon, incognito accounts are confidential anyway. Still, this countermeasure provides some forward secrecy in the event of STF state leakage due to SGX vulnerability

Theory to be elaborated further.....

erroneous meetup time

The displayed ceremony time in the assigning phase is wrong.

Setup: Gesell, currency: 39GtBdLnLPERXKJWCXaDBpjiiLv3Hbhthck1iNqArn9m:

Meetup 1:
The actual meeting time was 12:20 UTC.

The apps on the phones displayed: 2020-09-23T13:54
An app in the emulator displayed: 2020-09-23T14:10

Meetup 2:
The actual meeting time was 12:50 UTC.

Both, the phones and the emulator displayed: 2020-09-23T14:24

register_participant with ProofOfAttendance in js_service

Implement js_service_encointer functions to register a participant with a proof of attendance.

define a getProofOfAttendance function that returns a SCALE encoded Option<ProofOfAttendance> in js_service_encointer, probably in service/encointer.js. This function will be called from dart side in order to fill in this field

the js type definition is here

here's how encointer-client generates a proof of attendance

https://github.com/encointer/encointer-node/blob/182316b0cdf5566ea841ae126642f1562ee85ccb/client/src/main.rs#L797

for our app, prover_public is equal to attendee_public because we don't change accounts between ceremonies yet.

to be tested against tesntet Gesell (or a --dev chain v0.2.1):

  1. register currency with well-known bootstrappers Alice, Bob, Charlie
  2. register as a non-bootstrapper (without proofOfAttnedance) with app and perform ceremony
  3. for the next ceremony, register with proof
  4. check reputation registry. If proof was accepted, querying EncointerCeremonies ParticipantReputation for the current cindex and cid should return UnverifiedReputable

check bot script for how to automate this test.

Not sure yet how to test js_service_encointer standalone without dart app. There is a first standalone test script however

implement the correct meetup time formula

currently, we're using a dummy timestamp in the app, causing #56.

This is no surprise when looking at the code:

export async function getNextMeetupTime (cid, location) {
send('js-getNextMeetupTime', `Getting next meetup time for Cid ${cid} and location: ${location.lat}, ${location.lon}`);
const phase = await api.query.encointerScheduler.currentPhase();
send('js-getNextMeetupTime', `CurrentPhase: ${phase}`);
const duration = await api.query.encointerScheduler.phaseDurations(phase);
send('js-getNextMeetupTime', `Duration: ${duration}`);
const nextPhase = await api.query.encointerScheduler.nextPhaseTimestamp();
// const momentsPerDay = await api.query.encointerCeremonies.momentsPerDay();
// const per_degree = moments_per_day / 360;
// send('log', `moments per day: ${momentsPerDay}`);
return nextPhase - duration;
}

This should actually match the formula stated here:
https://github.com/encointer/encointer-worker/blob/2e77df9a7a5643720238314ecade392aaefa440c/stf/src/cli.rs#L617-L648

Gesell Wallet functionality. Send community currency like ERT

  • "asset" view should list (only) currencies where the balance is > 0
  • these currencies can be sent to other accounts i.e. by scanning their QR code (as polkawallet asset view does it for our ERT token now)
  • (optional) keep tx history like polkawallet does

basic app rebranding and skeleton

started on https://github.com/encointer/polkawallet-flutter/tree/encointer

[x ] integrate encointer artwork and naming
[x] keep "assets" and "profile", add a tab for "Ceremonies"
[x] subscribe to CurrentPhase and display phase on "Ceremonies" tab
[x] dummy button to send register_participant extrinsic without proof of attendance
[x ] endpoint selection: Gesell and Cantillon

Quickstart

  • install android studio & flutter
  • set up AVD device (hit Ctrl-Shift-A and type AVD Manager)
  • in WSL, run
    cd lib/js_service_kusama/
    yarn install
    yarn run build
    cd ../js_service_encointer
    yarn install
    yarn run build
    
  • set up AVD device
  • "run"

Query Cantillon worker's TrustedGetter from js_servcie_encointer (Balance, registrations, meetup info)

For the app to work with Cantillon, we'll need to implement the worker-api for the following Getters:

Assumptions:

  • we use the same on-chain account also as our incognito account for offchain workers for simplicity (rust client can use different keypairs for on-chain and off-chain state)

Rust definitions for TrustedGetter:
https://github.com/encointer/encointer-worker/blob/35ae50a27b293971f2289d71ef3f81b604ae8d33/stf/src/lib.rs#L112-L117

rust client commands:

  1. encointer-client-teeproxy trusted balance .... Rust
  2. encointer-client-teeproxy trusted get_registration .... Rust
  3. encointer-client-teeproxy trusted get_attestations .... Rust
  4. get meetup assignment for claim generation: Rust

The TrustedGetter has to be wrapped multiple times:

  1. into a TrustedGetterSigned (by signing it with our incognito account = polkawallet account)
  2. into a ClientRequest Definition

then send request over websocket to : wss://substratee03.scs.ch
return value will be a hex::encode(SCALE::encode(value)). Can only be decoded if type is known:

  1. Balance is a BalanceType
  2. registration is ParticipantIndexType
  3. attestations is Vec<Attestation>
  4. meetup assignment is (MeetupIndexType, Option<Location>, Option<Moment>)

We may want to query public stats too once they are available. See:
worker #7

app crashes with exhausted heap space

this happens frequently a few seconds after after app start when selecting "ceremonies" page

mostly happens on SM G800F, not on SM J320F or SM A405FN

Launching lib\main.dart on SM G800F in debug mode...
Running Gradle task 'assembleDebug'...
I/flutter (27799): js file loaded
I/flutter (27799): received msg: {"path":"log","data":"main js loaded"}
I/flutter (27799): received msg: {"path":"log","data":"wss://gesell.encointer.org wss connected success"}
I/flutter (27799): received msg: {"path":"uid=1;settings.connectAll","data":"wss://gesell.encointer.org"}
I/flutter (27799): received msg: {"path":"log","data":"s(...) is not a function"}
I/flutter (27799): received msg: {"path":"log","data":"Fetching participant index for Cid: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb, cIndex: 0 and address: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235"}
I/flutter (27799): received msg: {"path":"log","data":"Fetching participant count for Cid: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb and cIndex: 0"}
I/flutter (27799): received msg: {"path":"log","data":"Fetching next meetup time for Cid 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb and location: 0x, 0x"}
I/flutter (27799): received msg: {"path":"uid=3;encointer.subscribeTimestamp"}
I/flutter (27799): received msg: {"path":"uid=4;encointer.fetchCurrencyIdentifiers","data":{"cids":["0xf26bfaa0feee0968ec0637e1933e64cd1947294d3b667d43b76b3915fc330b53","0x2ebf164a5bb618ec6caad31488161b237e24d75efa3040286767b620d9183989","0xc792bf36f892404a27603ffd14cd5a12e794ed3c740bab0929ba55b8c747c615","0x7c6be63172ccf4665b618538c9abb5a79349ca6c584aff52648802e919dfe1f4","0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","0x410351342f6680535043f362a73662d3e0a0335f61f8a1d6be9d32d207de0edf"]}}
I/flutter (27799): received msg: {"path":"uid=5;encointer.fetchCurrentCeremonyIndex","data":4215}
I/flutter (27799): received msg: {"path":"uid=7;encointer.fetchParticipantCount","data":0}
I/flutter (27799): received msg: {"path":"log","data":"CurrentPhase: Attesting"}
I/flutter (27799): received msg: {"path":"log","data":"Duration: 600000"}
E/DartVM  (27799): Aborting re-entrant request for stack trace.
E/DartVM  (27799): Aborting re-entrant request for stack trace.
E/DartVM  (27799): Aborting re-entrant request for stack trace.
E/DartVM  (27799): Aborting re-entrant request for stack trace.
E/DartVM  (27799): Aborting re-entrant request for stack trace.
E/DartVM  (27799): isolate_instructions=0, vm_instructions=56c9d400
I/flutter (28420): notification_plugin initialised: true
I/flutter (28420): initailizing app state
I/flutter (28420): sys locale: en
I/flutter (28420): No observables detected in the build method of Observer
I/flutter (28420): #3      _WalletAppState.build.<anonymous closure> (package:polka_wallet/app.dart:184:38)
I/flutter (28420): webview loaded for network encointer
E/flutter (28420): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The getter 'home' was called on null.
E/flutter (28420): Receiver: null
E/flutter (28420): Tried calling: home
E/flutter (28420): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
E/flutter (28420): #1      UI.checkUpdate (package:polka_wallet/utils/UI.dart:80:38)
E/flutter (28420): #2      _WalletAppState._checkUpdate (package:polka_wallet/app.dart:126:8)
E/flutter (28420): <asynchronous suspension>
E/flutter (28420): #3      _WalletAppState._initStore (package:polka_wallet/app.dart:143:7)
E/flutter (28420): #4      _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (28420): #5      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (28420): #6      _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
E/flutter (28420): #7      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
E/flutter (28420): #8      Future._propagateToListeners (dart:async/future_impl.dart:711:32)
E/flutter (28420): #9      Future._completeWithValue (dart:async/future_impl.dart:526:5)
E/flutter (28420): #10     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
E/flutter (28420): #11     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
E/flutter (28420): #12     AsyncAction.run (package:mobx/src/api/async/async_action.dart)
E/flutter (28420): #13     _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (28420): #14     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (28420): #15     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
E/flutter (28420): #16     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
E/flutter (28420): #17     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
E/flutter (28420): #18     Future._complete (dart:async/future_impl.dart:516:7)
E/flutter (28420): #19     new Future.microtask.<anonymous closure> (dart:async/future.dart:202:16)
E/flutter (28420): #20     _rootRun (dart:async/zone.dart:1180:38)
E/flutter (28420): #21     _CustomZone.run (dart:async/zone.dart:1077:19)
E/flutter (28420): #22     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
E/flutter (28420): #23     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
E/flutter (28420): #24     _rootRun (dart:async/zone.dart:1184:13)
E/flutter (28420): #25     _CustomZone.run (dart:async/zone.dart:1077:19)
E/flutter (28420): #26     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
E/flutter (28420): #27     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
E/flutter (28420): #28     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
E/flutter (28420): #29     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
E/flutter (28420): 
I/flutter (28420): js file loaded
I/flutter (28420): received msg: {"path":"log","data":"main js loaded"}
I/flutter (28420): received msg: {"path":"uid=0;account.initKeys","data":{"0":{"0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235":"14uojxCRsEXs5WzwxSHenusWLEbmRpz1C4YA3rjWxRWaJ9x9"},"2":{"0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235":"GV8FwHEdpHKPdosmW3hYiQMdCtMYCF3ZweRHE27t8hYrc1F"},"42":{"0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7"}}}
I/flutter (28420): received msg: {"path":"log","data":"wss://gesell.encointer.org wss connected success"}
I/flutter (28420): received msg: {"path":"uid=1;settings.connectAll","data":"wss://gesell.encointer.org"}
I/flutter (28420): received msg: {"path":"log","data":"s(...) is not a function"}
I/flutter (28420): received msg: {"path":"uid=3;settings.getNetworkConst","data":{"timestamp":{"minimumPeriod":3000},"balances":{"existentialDeposit":500},"transactionPayment":{"transactionBaseFee":0,"transactionByteFee":1},"encointerScheduler":{"momentsPerDay":86400000}}}
I/flutter (28420): received msg: {"path":"uid=4;api.rpc.system.properties","data":{"ss58Format":42,"tokenDecimals":12,"tokenSymbol":"ERT"}}
I/flutter (28420): received msg: {"path":"uid=5;api.rpc.system.chain","data":"Encointer Testnet Gesell"}
I/flutter (28420): received msg: {"path":"uid=6;account.getBalance","data":{"accountId":"5FyWbcwN1TGPdyzRzoEeem3MUcc7jXRs7ZoftZkAQLV47nS7","accountNonce":291,"availableBalance":1000997049245,"freeBalance":1000997049245,"frozenFee":0,"frozenMisc":0,"isVesting":false,"lockedBalance":0,"lockedBreakdown":[],"reservedBalance":0,"vestedBalance":0,"vestingTotal":0,"votingBalance":1000997049245}}
I/flutter (28420): Subscribing to current phase
I/flutter (28420): Fetching participant index for 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235
I/flutter (28420): request encointer.fetchCurrencyIdentifiers loading
I/flutter (28420): request encointer.fetchCurrentCeremonyIndex loading
I/flutter (28420): Fetching participant index for 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235
I/flutter (28420): request encointer.fetchParticipantIndex loading
I/flutter (28420): request encointer.fetchCurrencyIdentifiers loading
I/flutter (28420): received msg: {"path":"uid=7;encointer.subscribeTimestamp"}
I/flutter (28420): received msg: {"path":"timestamp","data":1593977322000}
I/flutter (28420): received msg: {"path":"uid=8;encointer.fetchCurrencyIdentifiers","data":{"cids":["0xf26bfaa0feee0968ec0637e1933e64cd1947294d3b667d43b76b3915fc330b53","0x2ebf164a5bb618ec6caad31488161b237e24d75efa3040286767b620d9183989","0xc792bf36f892404a27603ffd14cd5a12e794ed3c740bab0929ba55b8c747c615","0x7c6be63172ccf4665b618538c9abb5a79349ca6c584aff52648802e919dfe1f4","0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb","0x410351342f6680535043f362a73662d3e0a0335f61f8a1d6be9d32d207de0edf"]}}
I/flutter (28420): received msg: {"path":"uid=9;encointer.fetchCurrentCeremonyIndex","data":4215}
I/flutter (28420): received msg: {"path":"uid=10;encointer.subscribeCurrentPhase","data":{}}
I/flutter (28420): received msg: {"path":"currentPhase","data":"Attesting"}
I/flutter (28420): received msg: {"path":"log","data":"Fetching participant index for Cid: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb, cIndex: 0 and address: 0xacfacdd8d053c4263094ad49e3eb2dbd85a084245f9599d3ebba7aada560b235"}
I/flutter (28420): received msg: {"path":"log","data":"Fetching participant count for Cid: 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb and cIndex: 0"}
I/flutter (28420): received msg: {"path":"log","data":"Participant index: 0"}
I/flutter (28420): received msg: {"path":"uid=11;encointer.fetchParticipantIndex","data":0}
I/flutter (28420): received msg: {"path":"uid=12;encointer.fetchParticipantCount","data":0}
I/flutter (28420): received msg: {"path":"uid=13;encointer.fetchMeetupIndex","data":0}
I/flutter (28420): received msg: {"path":"log","data":"Fetching next meetup time for Cid 0xcef98d744e978f3e33724cfb5677d2104e020909fbec6e97c2c594aa607d78cb and location: 0x, 0x"}
I/flutter (28420): received msg: {"path":"log","data":"CurrentPhase: Attesting"}
I/flutter (28420): received msg: {"path":"log","data":"Duration: 600000"}
I/flutter (28420): received msg: {"path":"uid=14;encointer.fetchNextMeetupTime","data":1593976800000}
I/flutter (28420): received msg: {"path":"timestamp","data":1593977328000}
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): Aborting re-entrant request for stack trace.
E/DartVM  (28420): version=2.8.1 (stable) (Thu Apr 30 09:25:21 2020 +0200) on "android_arm"
E/DartVM  (28420): pid=28420, thread=28782, isolate=(null)(0x0)
E/DartVM  (28420): isolate_instructions=0, vm_instructions=56c9d400
E/DartVM  (28420):   pc 0x56d61359 fp 0x67a7df60 /data/app/org.encointer.wallet-1/lib/arm/libflutter.so+0x139c359
E/DartVM  (28420): -- End of DumpStackTrace
I/flutter (28420): received msg: {"path":"timestamp","data":1593977334000}
E/DartVM  (28420): Exhausted heap space, trying to allocate 128 bytes.
E/DartVM  (28420): Aborting re-entrant request for stack trace.

implement proper state caching with dependencies and time-to-live

this is connected to #24, so think about that first!

The app is awfully slow now because we re-fetch all state with every change of phase or view. Moreover, the state can get inconsistent (register for a ceremony, wait for attesting, change selected currency -> registration status won't update)
We should have a proper caching which is aware when something is expected to change (because of offline considerations we may not want to work with subscriptions too much? check!)

Dependencies must be respected. Draw the dependency graph of all used onchain state for documentation purposes

Also consider that some state might be fetched from worker-api later (Cantillon)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.