Grant-Milestone-Delivery icon indicating copy to clipboard operation
Grant-Milestone-Delivery copied to clipboard

Milestone Delivery: Zaturn

Open pascuin opened this issue 2 years ago • 3 comments

Milestone Delivery Checklist

Link to the application pull request: application was non-public

pascuin avatar Oct 19 '22 14:10 pascuin

@pascuin thanks for submitting your delivery and sorry for the delay here. I'll take a look soon.

takahser avatar Oct 28 '22 09:10 takahser

  • I like that you included some examples into your docs. However, I identified a bug: When clicking the Edit Code button and consecutively clicking the Show Example button, the site crashes:

Thanks for reporting this, we have fixed it.

As mentioned in the attached document this repository is currently private, I've invited you to it.

  • since the docs don't contain step-by-step instructions or a tutorial to guide on how to the the deliveries, I'd assume that the acurast-processor repo contains theses for all 3 milestones, is that correct? If not, could you point out where to find these for M1 and M2?

The details should be in the processor repository and in the mentioned document. Let me know if you think something is missing.

Also, thanks for merging my PRs in the docs repo 👍

Many thanks for opening them!

pascuin avatar Nov 04 '22 07:11 pascuin

@pascuin FYI - I'm currently blocked by the requirement of having an Android phone to test your delivery since I only have an iPhone. However, I'm in the process to acquiring one to test your delivery. I'll update you again once I have one.

takahser avatar Nov 08 '22 09:11 takahser

@pascuin FYI - I'm still blocked, but I should get my hands on an Android phone sometime next week :)

takahser avatar Nov 11 '22 08:11 takahser

@pascuin - quick update, I got a physical Android phone now, but I'm struggling with setting up the Android Wireless Debugging properly. Will update you when I'm making progress here.

takahser avatar Nov 16 '22 12:11 takahser

@pascuin thanks for your patience and sorry for the delay here. I was finally able to run your app on a physical android phone. Since it's a Xiaomi phone, I first had to disable MIUI optimization in order to make it work, otherwise, all I'd get were errors. I tried following your instructions but it's not clear to me, how I'm supposed to start a node. Could you add them or guide me where I can find them, if they already exist?

takahser avatar Nov 21 '22 22:11 takahser

@takahser For my understanding with node you mean a node of the Acurast chain and not the Acurast Processor?

pascuin avatar Nov 22 '22 10:11 pascuin

@pascuin the Acurast Processor is the mobile app, right?

you mean a node of the Acurast chain

Yes exactly, I'm referring to a Substrate-based node.

takahser avatar Nov 23 '22 08:11 takahser

Hi @takahser

I have added you to the demo repository: https://github.com/Acurast/demo-1

Let me know if you have any question.

RomarQ avatar Dec 13 '22 21:12 RomarQ

@RomarQ thanks, I checked out the repo and followed the instructions in the README.

I was able to:

  • install the apk on my android phone using wireless debugging and adp

    cd ./platform-tools # downloaded from https://developer.android.com/studio/releases/platform-tools
    ./adb pair 192.168.0.20:33713 # note that the port for pairing is different from the connection port (see below)
    ./adb connect 192.168.0.20:38331
    ./adb devices
    ./adb -s 192.168.0.20:38331 install ../demo-debug-unsigned.apk
    
  • start the nodes

    make start
    
    (...)
    ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
    │ Acurast Testnet ⚙ Added Boot Nodes                                                                                     │
    ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ /ip4/127.0.0.1/tcp/54455/ws/p2p/12D3KooWLy55ZJsFcVg4PL1g7YstYQmGQ4PH2sAQJA7HDRnd46Th                                   │
    └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
    ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
    │                                                       Network launched 🚀🚀                                                       │
    ├──────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Namespace                    │ zombie-ce7a399ad4f9d58f78e9c60fd1957115                                                            │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Provider                     │ native                                                                                             │
    ├──────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │                                                         Node Information                                                          │
    ├──────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Name                         │ alice                                                                                              │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Direct Link                  │ https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/explorer                                    │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Prometheus Link              │ http://127.0.0.1:54442/metrics                                                                     │
    ├──────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │                                                         Node Information                                                          │
    ├──────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Name                         │ bob                                                                                                │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Direct Link                  │ https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:54444#/explorer                                   │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Prometheus Link              │ http://127.0.0.1:54446/metrics                                                                     │
    ├──────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │                                                         Node Information                                                          │
    ├──────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Name                         │ charlie                                                                                            │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Direct Link                  │ https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:54448#/explorer                                   │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Prometheus Link              │ http://127.0.0.1:54450/metrics                                                                     │
    ├──────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │                                                         Node Information                                                          │
    ├──────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Name                         │ dave                                                                                               │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Direct Link                  │ https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:54452#/explorer                                   │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Prometheus Link              │ http://127.0.0.1:54454/metrics                                                                     │
    ├──────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │                                                         Node Information                                                          │
    ├──────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Name                         │ acurast-collator                                                                                   │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Direct Link                  │ https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8802#/explorer                                    │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Prometheus Link              │ http://127.0.0.1:54456/metrics                                                                     │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ Parachain ID                 │ 2001                                                                                               │
    ├──────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ ChainSpec Path               │ /var/folders/9y/ny58jn152dzcqf036v5cb4nh0000gn/T/zombie-ce7a399ad4f9d58f78e9c60fd1957115_-86712-x… │
    └──────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘
    

Unfortunately, I'm not able to access the nodes through polkadotjs apps though:

image

Any idea why that happens?

Also, as I'm new to Android debugging, could you recommend me a way to mirror the android device on my macbook?

takahser avatar Dec 16 '22 02:12 takahser

Hi @takahser,

You want to access the parachain explorer, which is available at https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8802#/explorer

For mirroring the android device I use scrcpy. It can be installed with brew install scrcpy on macOS.

RomarQ avatar Dec 16 '22 08:12 RomarQ

@RomarQ

You want to access the parachain explorer, which is available at https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8802#/explorer

Yes, iirc I tried that as well and got the same result. But let me try again, to be sure. I'll keep you posted.

takahser avatar Dec 19 '22 07:12 takahser

@RomarQ sorry for the delay here. I re-tested and I confirm I can't connect to the node on https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8802#/explorer Shell we have another call and check together whether we can resolve this issue?

takahser avatar Jan 09 '23 08:01 takahser

Hi @takahser,

Yes. I will send you an email to schedule the call.

RomarQ avatar Jan 09 '23 10:01 RomarQ

Just adding a short update here for transparency:

  • we had various calls last and this week, the grantee was very helpful in troubleshooting what appears to be environment/machine-based issues
  • in the grantee's test environment I was able to test the whole flow, using my own physical Android device
  • when running the node locally on my machine, so far, I haven't been able to access it using my Android phone; according to the grantee it should work and they successfully tested it on a similar machine. I'm still trying to figure out what the issue is, although it's not the first priority, since all use cases have been smoke-tested successfully already.
  • currently, a few deliverables are missing in the delivery report and the grantee is currently taking a look at it
  • I wasn't able to find the test instructions for acurast-core (here I successfully used cargo test but this information should be provided, e.g. in the README) and acurast-processor (I'm referring to automated tests here)
  • the code is still being reviewed

takahser avatar Jan 20 '23 14:01 takahser

@pascuin I accepted M1, feel free to have a look at my M1 evaluation. I'm still working on the M2 evaluation. For M3 I'm waiting for your feedback, as discussed in the private channel.

takahser avatar Jan 23 '23 22:01 takahser

@pascuin I added the M2 evaluation. There are a couple of points to improve there, feel free to have a look.

takahser avatar Jan 25 '23 16:01 takahser

@pascuin thanks for the updates. I finished the evaluation for M3, feel free to have a look.

takahser avatar Jan 26 '23 11:01 takahser

@takahser thanks for the evaluation we will take a look at it and get back to you as soon as they addressed.

pascuin avatar Jan 26 '23 11:01 pascuin

Hey @takahser appreciate the feedback

  • Afaik you didn't comment on the V8Executor.kt and App.kt classes, so I wanted to check whether you plan to add tests there or if there is a reason not to do that.

We have added tests for the V8Executor.kt as for the App.kt, this is what bootstraps the android application. Every android connected test calls that file. The readme was also update with instructions to run the android connected tests.

Also, one test failed, even after running it multiple times:

Are you still seeing this issues with the test, we have run this on the GitHub pipeline, our internal GitLab pipelines and locally without any issues.

pascuin avatar Feb 07 '23 07:02 pascuin

@pascuin for me both the build and tests fail now, could you double-check on your side?

Build

acurast-processor$ ./gradlew assemble 

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file at '/home/seraya/repos/acurast-processor/local.properties'.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 403ms

Tests

acurast-processor$ ./gradlew test

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file at '/home/seraya/repos/acurast-processor/local.properties'.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s

takahser avatar Feb 09 '23 16:02 takahser

Hi @takahser,

The issue is described in the error message:

SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file at '/home/seraya/repos/acurast-processor/local.properties'.

You will need to create a file /home/seraya/repos/acurast-processor/local.properties with the following content sdk.dir=<ANDROID_SDK_LOCATION>.

This file is usually created by android studio when you open the project.

RomarQ avatar Feb 09 '23 16:02 RomarQ

@RomarQ @pascuin apologies, my bad. I accidentally ran the tests on the wrong machine, hence the error 😄 Updated test report overview:

image

It's still the same test failing with the same error. I checked the GitHub pipeline but fore some reason I was unable to find the Job fulfillment test. Can you assist me in either fixing the problem or finding the test in the excerpt in the pipeline?

takahser avatar Feb 09 '23 19:02 takahser

Hi @takahser,

I have updated the CI pipeline to produce artifacts with the test results. Please have a look Build 549774320 on the main branch

RomarQ avatar Feb 09 '23 21:02 RomarQ

@RomarQ thanks, I downloaded the artifacts and opened it in my browser, it seems to work:

image

However, when opening the build at the height of the most current commit 28d0b7aeb57e1e0963d50520c598b425ea30e607 on the main branch it shows me only 20 tests (not 22):

image

Any idea where the difference comes from?

takahser avatar Feb 13 '23 05:02 takahser

The message 89 actionable tasks: 20 executed, 69 up-to-date means that 20 gradle tasks got executed, the tests got executed by one of these tasks.

RomarQ avatar Feb 13 '23 06:02 RomarQ

@RomarQ (cc @pascuin) fair enough, that's also why I didn't find that test in the excerpt. 😄 I tried to run it again on my machine, that one test is still failing, but since they pass (which I verified when downloading the test artifacts from the ci build, as indicated earlier) I'm happy to accept it, you can find my final M2 evaluation here. On another note, I saw that the processor repository is still private, so I'd like to ask you to make it public. Also, I have accepted M3.

After said repository has been made public I'm going to merge this PR and internally forward the invoices for all 3 milestones. 👍

takahser avatar Feb 13 '23 15:02 takahser

Putting this on hold for now, until said repo is made public - just to avoid this to be accidentally merged. As soon as it's made public the label can be removed and the delivery PR merged.

takahser avatar Feb 13 '23 16:02 takahser

FYI - I removed the to close label because the grantee reached out to me, telling me that they'll open source an adjusted but fully-functional version of their Android app once all deliveries are approved. Hence, I'll need to re-test this part of the delivery.

takahser avatar Mar 01 '23 11:03 takahser

Hi @takahser,

The application is connecting to acurast testnet at https://rpc.collator-1.acurast.papers.tech.

By clicking in Submit Attestation it will submit an attestation about your device on-chain. If it fails, it means the android root CA in your device is no longer trusted by google. https://developer.android.com/training/articles/security-key-attestation#root_certificate

RomarQ avatar Mar 03 '23 14:03 RomarQ