Grant-Milestone-Delivery
Grant-Milestone-Delivery copied to clipboard
Milestone Delivery: Zaturn
Milestone Delivery Checklist
- [x] The milestone-delivery-template.md has been copied and updated.
- [x] The invoice form :pencil: has been filled out for this milestone.
- [x] This pull request is being made by the same account as the accepted application.
- [x] In case of acceptance, the payment will be transferred to the BTC/ETH payment address provided in the application.
- [x] The delivery is according to the Guidelines for Milestone Deliverables.
Link to the application pull request: application was non-public
@pascuin thanks for submitting your delivery and sorry for the delay here. I'll take a look soon.
- 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.
- I noticed that the acurast-processor repo is currently not accessible:
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 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.
@pascuin FYI - I'm still blocked, but I should get my hands on an Android phone sometime next week :)
@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.
@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 For my understanding with node you mean a node of the Acurast chain and not the Acurast Processor?
@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.
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 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:

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?
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
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.
@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?
Hi @takahser,
Yes. I will send you an email to schedule the call.
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
@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.
@pascuin I added the M2 evaluation. There are a couple of points to improve there, feel free to have a look.
@pascuin thanks for the updates. I finished the evaluation for M3, feel free to have a look.
@takahser thanks for the evaluation we will take a look at it and get back to you as soon as they addressed.
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 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
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 @pascuin apologies, my bad. I accidentally ran the tests on the wrong machine, hence the error 😄 Updated test report overview:

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?
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 thanks, I downloaded the artifacts and opened it in my browser, it seems to work:

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):

Any idea where the difference comes from?
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 (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. 👍
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.
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.
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