-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interstellar-Network Wallet Phase 2 Milestone 1 #918
Conversation
FirstDraft
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@n-prat not sure if I understood your instructions correctly, but running the command on my MacBook didn't work if no emulator is running:
% adb install ~/Downloads/androidApp-arm64-release-unsigned-signed.apk
adb: no devices/emulators found
As indicated earlier, I'm not able to start the Pixel 5 API 31 emulator. When I start the Pixel 5 API 34 emulator the command succeeds and the app is installed, but the behaviour remains the same:
So I guess the app is force closing and you never see the pinpad? Do you have a stack trace?
No, I've never seen the pinpad appearing after sending the transaction.
I asked my team colleague @semuelle to try it on his machine, he experienced the same.
With a Pixel 5 API 31 emulator:
It keeps crashing after hitting the checkmark button on the Send screen.
I get a Processing... and Registered toast, and then it crashes.
It also crashes when using a Pixel 3a or 7a physical device.
Ah I should have been clearer: the
Maybe we should start an Element(or other app) channel for this evaluation? edit/PS: I confirm it works both:
Only thing I did was making sure nested virtualization was set up both on the host( |
It's a linux machine.
Yes, we can do that. Can you send a mail with the element name(s) to [email protected]?
It was tested in German, but after retesting in English it actually worked. 👍 However, that's a very unexpected precondition. Why would it have to be English? Does that mean the wallet not usable from non-English devices?
Yes, it's here:
|
Will do!
Amazing! The requirement is written but I will grant you that given this issue, we should have made it more prominent.
Thanks for this! But I can't find a "standard" error I've already met... I really don't know what I can do here. Sometimes when hitting this error I have had success by switching the "Graphics" type in the emulator's settings, and sometimes I had to delete/recreate the emulator. It could also be a hardware issue, in which case there is nothing to be done. |
Hey @n-prat. I just ran the app on the phone attached to LogCat, and I suspect it's related to the decimal separator. That would explain why it crashes the second the amount field is filled. In German, the decimal separator is a comma. If you are parsing the number back in, it might cause a hiccup. See related error message below.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@n-prat did you send the email yet? I haven't seen it yet.
Regarding the language issue, after changing @semuelle's physical device to English it worked.
However, it's 30-50fps which doesn't satisfy the spec of your deliverable:
We will rewrite the garbled circuit evaluation scheme to target at least 60 fps
Logcat:
2023-09-01 21:20:07.569 31852-31852 nativeloader pid-31852 D Configuring classloader-namespace for other apk /data/app/~~P1Kw8iSL9DQkkpwKFRYy_w==/com.google.android.play.games-ILGnd-m3OIjLHDjZhtJdFg==/base.apk:/data/app/~~P1Kw8iSL9DQkkpwKFRYy_w==/com.google.android.play.games-ILGnd-m3OIjLHDjZhtJdFg==/split_config.arm64_v8a.apk:/data/app/~~P1Kw8iSL9DQkkpwKFRYy_w==/com.google.android.play.games-ILGnd-m3OIjLHDjZhtJdFg==/split_config.de.apk:/data/app/~~P1Kw8iSL9DQkkpwKFRYy_w==/com.google.android.play.games-ILGnd-m3OIjLHDjZhtJdFg==/split_config.en.apk:/data/app/~~P1Kw8iSL9DQkkpwKFRYy_w==/com.google.android.play.games-ILGnd-m3OIjLHDjZhtJdFg==/split_config.xxhdpi.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~P1Kw8iSL9DQkkpwKFRYy_w==/com.google.android.play.games-ILGnd-m3OIjLHDjZhtJdFg==/lib/arm64:/data/app/~~P1Kw8iSL9DQkkpwKFRYy_w==/com.google.android.play.games-ILGnd-m3OIjLHDjZhtJdFg==/base.apk!/lib/arm64-v8a:/data/app/~~P1Kw8iSL9DQkkpwKFRYy_w==/com.google.android.play.games-ILGnd-m3OIjLHDjZhtJdFg==/split_config.arm64_v8a.apk!/lib/arm64-v8a:/data/app
[ 1693596007.576 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 20.270392ms (avg 23.669486ms)
[ 1693596007.576 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 49.964297 (avg 43.701805)
[ 1693596007.576 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 32.000000
2023-09-01 21:20:08.579 1662-7391 NotificationService system_server W Toast already killed. pkg=gg.interstellar.wallet.android token=android.os.BinderProxy@95049cc
[ 1693596008.585 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 23.022817ms (avg 23.701373ms)
[ 1693596008.585 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 43.671574 (avg 42.507720)
[ 1693596008.585 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 75.000000
2023-09-01 21:20:09.573 1662-3089 ConnectivityService system_server D NetReassign [49984 : null → 487] [c 2] [a 4] [i 2]
[ 1693596009.573 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 20.267147ms (avg 19.762050ms)
[ 1693596009.573 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 49.487411 (avg 50.732720)
[ 1693596009.573 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 118.000000
2023-09-01 21:20:10.598 31949-32129 MetricsConfigurationPar com.amazon.kindle I MetricsConfigurationParser - Picking configuration; Domain: prod, Build: user, isDebuggable: false
[ 1693596010.598 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 26.537961ms (avg 24.874129ms)
[ 1693596010.598 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 38.672568 (avg 41.095166)
[ 1693596010.598 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 158.000000
2023-09-01 21:20:11.587 31949-32302 AmazonKind...ectionsDAO com.amazon.kindle I [pool-83-thread-1]: Creating Uncollected collection
[ 1693596011.587 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 25.509577ms (avg 23.521043ms)
[ 1693596011.587 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 40.459099 (avg 43.258783)
[ 1693596011.587 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 201.000000
2023-09-01 21:20:12.571 3445-3473 SecureElementService com.android.se D getReaders() for com.android.nfc
[ 1693596012.572 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 22.656829ms (avg 22.742259ms)
[ 1693596012.572 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 44.840416 (avg 44.657271)
[ 1693596012.572 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 245.000000
2023-09-01 21:20:13.575 32196-32506 ...uth.device.storage.s com.imdb.mobile I MAP database version: 2
[ 1693596013.576 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 25.168793ms (avg 23.275663ms)
[ 1693596013.576 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 40.669714 (avg 43.960871)
[ 1693596013.576 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 290.000000
2023-09-01 21:20:14.567 1662-5275 ConnectivityService system_server D Returning UNBLOCKED NetworkInfo to uid=10298
[ 1693596014.580 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 25.432446ms (avg 23.469794ms)
[ 1693596014.580 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 41.634822 (avg 43.542643)
[ 1693596014.580 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 332.000000
2023-09-01 21:20:15.553 30196-31699 interstellar gg.interstellar.wallet.android I wgpu_core::device: Created texture Valid((4, 216, Vulkan)) with TextureDescriptor { label: None, size: Extent3d { width: 590, height: 50, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 1, dimension: D2, format: R8Unorm, usage: COPY_DST | TEXTURE_BINDING, view_formats: [] }
[ 1693596015.579 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 28.095304ms (avg 24.890877ms)
[ 1693596015.579 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 35.796889 (avg 40.979913)
[ 1693596015.579 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 374.000000
2023-09-01 21:20:16.567 30196-31700 interstellar gg.interstellar.wallet.android I wgpu_core::device: Created texture Valid((11, 243, Vulkan)) with TextureDescriptor { label: None, size: Extent3d { width: 640, height: 360, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 1, dimension: D2, format: R8Unorm, usage: COPY_DST | TEXTURE_BINDING, view_formats: [] }
[ 1693596016.590 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 39.437358ms (avg 27.353595ms)
[ 1693596016.590 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 27.103126 (avg 39.979632)
[ 1693596016.590 30196:31700 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 415.000000
2023-09-01 21:20:17.545 30196-31697 interstellar gg.interstellar.wallet.android I wgpu_core::device: Created texture Valid((12, 282, Vulkan)) with TextureDescriptor { label: None, size: Extent3d { width: 590, height: 50, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 1, dimension: D2, format: R8Unorm, usage: COPY_DST | TEXTURE_BINDING, view_formats: [] }
[ 1693596017.564 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 30.128427ms (avg 24.841052ms)
[ 1693596017.564 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 35.991516 (avg 42.180514)
[ 1693596017.564 30196:31701 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 453.000000
2023-09-01 21:20:18.566 21927-32573 ChimeraUtils com.google.android.gms.persistent W Module com.google.android.gms.nearby_en missing resource null(0)
[ 1693596018.577 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 23.863455ms (avg 22.870679ms)
[ 1693596018.578 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 43.422526 (avg 44.676334)
[ 1693596018.578 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 497.000000
2023-09-01 21:20:19.553 30196-31701 interstellar gg.interstellar.wallet.android I wgpu_core::device: Created texture Valid((4, 301, Vulkan)) with TextureDescriptor { label: None, size: Extent3d { width: 640, height: 360, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 1, dimension: D2, format: R8Unorm, usage: COPY_DST | TEXTURE_BINDING, view_formats: [] }
[ 1693596019.581 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 22.383042ms (avg 22.922772ms)
[ 1693596019.581 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 45.032289 (avg 44.285407)
[ 1693596019.581 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 540.000000
2023-09-01 21:20:20.561 30196-31700 interstellar gg.interstellar.wallet.android I wgpu_core::device: Created texture Valid((12, 371, Vulkan)) with TextureDescriptor { label: None, size: Extent3d { width: 590, height: 50, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 1, dimension: D2, format: R8Unorm, usage: COPY_DST | TEXTURE_BINDING, view_formats: [] }
[ 1693596020.585 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 28.946212ms (avg 27.258533ms)
[ 1693596020.585 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 35.998988 (avg 37.713475)
[ 1693596020.585 30196:31697 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 577.000000
2023-09-01 21:20:21.561 30196-31697 interstellar gg.interstellar.wallet.android I wgpu_core::device: Created texture Valid((8, 375, Vulkan)) with TextureDescriptor { label: None, size: Extent3d { width: 640, height: 360, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 1, dimension: D2, format: R8Unorm, usage: COPY_DST | TEXTURE_BINDING, view_formats: [] }
[ 1693596021.581 30196:31699 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_time : 24.556489ms (avg 26.348678ms)
[ 1693596021.581 30196:31699 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic fps : 41.299239 (avg 39.147868)
[ 1693596021.581 30196:31699 I/event /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_diagnostic frame_count : 616.000000
Do you think this can be further improved? The test device was a Pixel 7a, a recent device that was released just months ago.
Not yet, I don't have the permission to create a room in our Element space.
For reference on my POCO F3(which is not at all high end): logcat (filter: "fps")
Obviously we can't guarantee a performance target on any and all devices, so we should have been clearer in the grant and specified "on our test devices". As for the performance on a Pixel 7a, this is definitely weird.
The fact that the FPS are unstable(varying by a factor of almost 2x) would suggest there is something wrong.
Unfortutely no, not easily.
|
PS
|
Putting this on hold after a lengthy discussion and debug session(s) on Element. The main problem is that the FPS is unstable, hence the 1. | Garble Circuit pallet update spec isn't satisfied:
The grantee is currently investigating the issue. Also, for the record, the grantee may release M2 before the approval of M1. The following was agreed upon:
|
@takahser following is the solution resulting of our investigation. Investigation results: However, it's important to note that guaranteeing a minimum of 60 fps on every Android device is not feasible due to variations in CPU and GPU capabilities. Additionally, certain Android operating systems may have unique characteristics related to throttling and energy management which could affect performance. We observed that some devices and Android OSs with CPU and GPU capabilities comparable to our Xiaomi test device, struggle to achieve the target framerate. For instance, the Pixel 7a, despite being slightly more potent than the Poco F3, is unable to reach 60 fps. Nonetheless, we have evidence that even on devices where the framerate underperforms relative to the computing power, the target framerate can still be achieved. For example, on a realme X50 Pro, a run that initially averaged 33/40 fps could eventually stabilize at approximately 75 fps after displaying an arbitrary number of frames. This stable optimal performance state confirms that our optimized garbled circuit evaluator implementation can achieve the target. This also indicates that the issue does not lie with our garbled circuit evaluator's performance, but rather with specific Android OS behaviors related to throttling and energy consumption management that are beyond our control.
Option considered: We can easily reach 60 FPS by reducing the size of the circuit. Here are three options that comply with our current M1 specifications. Option 1: Reduce the screen resolution. This could significantly impact the user experience. Option 2: Keep the same resolution but reduce the circuit size by excluding the transaction message from the circuit and adding a cryptographic mask instead. This could potentially decrease the security of the solution, as it might allow an attacker with significant resources to modify the transaction message. Option 3: Keep the same resolution but reduce the circuit size by slightly cropping the size of the window that displays the pixels resulting of the garbled circuit evaluation. It does not impact either the user experience or the security of our scheme. We have chosen the third option with the following results: Here is a schema to explain what we did: Before: we were "drawing"(ie computing) the pixels everywhere in blue rectangle even it they were always only background That gets us around x2 FPS on our test devices: Xiaomi Poco F3.
Realme X50 Pro (that shows the same OS limitation issues as the Pixel 7a)
Hopefully you get the same improvement on your test device, and reach the coveted 60 FPS target. |
@nashjl ok that sounds reasonable. Let me check with my colleagues if somebody can test it for me, since it won't run on my 32bit Xiaomi phone. |
@nashjl & @takahser: The app now crashes on my emulator before the input screen. But on the Pixel 7a it works better now (apart from crashing after input): fps : 50.703512 (avg 49.793978)
fps : 67.979569 (avg 64.117272)
fps : 63.727446 (avg 64.159691)
fps : 58.629709 (avg 63.926934)
fps : 63.768887 (avg 65.668349)
fps : 69.673777 (avg 64.491483)
fps : 56.816818 (avg 57.866468)
fps : 58.063973 (avg 58.273861)
fps : 60.036427 (avg 62.703114)
fps : 58.142127 (avg 50.234987) |
Which apk? You can install
Crashing? Or just closing? Right now, the app is supposed to close after entering a code. If you see the toasts "Validating transaction..." then "Transaction done!" everything is fine. If it is indeed a crash: do you have a stacktrace? |
Then everything is fine. :) Indeed, I did not think to use the x86 build for the emulator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the evaluation. I agree a lot of work need to be done wrt comments/docs/etc.
|
@n-prat even when using Here are the versions I use:
What versions and toolchain are you using in your pipeline? |
Sorry, I was not clear. These are "log warnings" but not "clippy warnings" for lack of a better term = they have nothing to do with code quality etc. The CI is always using the latest
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪙 Please fill out the invoice form in order to initiate the payment process. Thank you! |
Congratulations on completing the first milestone of this grant! As part of the Grants Program, we want to help grant recipients acknowledge their grants publicly. To that end, we've created a badge for projects that successfully deliver their first milestone. Please use the badge only in reference to the work that has been completed as part of this grant, so please do not display it on your team or project's homepage unless accompanied by a short description of the grant. Furthermore, you're now welcome to announce the grant publicly. Please remember to observe the foundation's guidelines in doing so. If you haven't already, reach out to [email protected] for feedback on your announcement and cross-promotion. |
Hi @takahser, |
@nashjl I can confirm that we have received your invoice and that it is currently being processed. We recently switched from asking for the invoice at submission to asking after approval, hence the overlap. |
Milestone Delivery Checklist
Link to the application pull request: w3f/Grants-Program#1543