event icon indicating copy to clipboard operation
event copied to clipboard

New Tor engine Android test

Open KoalaSat opened this issue 1 year ago • 6 comments

Description

This is a POC for including a new Tor engine that is being used by Samourai's Sentinel and Robosats' app.

I implemented a simple POC only for Android, to be able to show how the code looks like. The library is https://github.com/05nelsonm/kmp-tor/tree/master, the iOS compatibility is about to be released in v2.

Happy to answer questions and discuss potential issues or improvements :)

This pull request is categorized as a:

  • [ ] New feature
  • [ ] Bug fix
  • [ ] Code refactor
  • [x] Configuration change
  • [ ] Locales update
  • [ ] Quality assurance
  • [ ] Other

Checklist

  • [ ] I’ve run yarn run tsc and made sure my code compiles correctly
  • [ ] I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • [ ] I’ve run yarn run prettier and made sure my code is formatted correctly
  • [ ] I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • [ ] No, I’m a fool
  • [ ] Yes
  • [ ] N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • [x] Android
  • [ ] iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

  • [ ] Embedded LND
  • [ ] LND (REST)
  • [ ] LND (Lightning Node Connect)
  • [ ] Core Lightning (c-lightning-REST)
  • [ ] LndHub
  • [ ] [DEPRECATED] Core Lightning (Spark)
  • [ ] [DEPRECATED] Eclair

Locales

  • [ ] I’ve added new locale text that requires translations
  • [ ] I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • [ ] Contributors will need to run yarn after this PR is merged in
  • [ ] 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • [ ] Changes were made that require an update to the README
  • [ ] Changes were made that require an update to onboarding

KoalaSat avatar Jun 26 '24 16:06 KoalaSat

@KoalaSat looks like v2 is now out. Do you have an iOS dev env to test on?

kaloudis avatar Apr 19 '25 01:04 kaloudis

@KoalaSat looks like v2 is now out.

Correct, and I have been testing it with other apps and works pretty well 🤙 I can change this PR to use V2

Do you have an iOS dev env to test on?

I have a OSx machine, I'll try it out and come back

KoalaSat avatar Apr 19 '25 16:04 KoalaSat

@kaloudis I have been testing v2 and it looks like it requires Kotlin 2.1.10. I checked it out but that collides with some RN libraries on the project (i.e. gestureHandler) so unless we update all these libraries to be compatible with the latest version of Kotlin I don´t thing v2 will work here

KoalaSat avatar Apr 22 '25 11:04 KoalaSat

@kaloudis I have been testing v2 and it looks like it requires Kotlin 2.1.10. I checked it out but that collides with some RN libraries on the project (i.e. gestureHandler) so unless we update all these libraries to be compatible with the latest version of Kotlin I don´t thing v2 will work here

You are free to upgrade react-native-gesture-handler to the latest version. I had tried in a RN upgrade branch and it seemed to be no issue.

If it's more complicated than that, just let us know, and we can pin it until we get all our dependencies updated.

kaloudis avatar Apr 22 '25 16:04 kaloudis

@kaloudis I digged into it a bit more. The problem was not in react-native-gesture-handle these libraries seems to use whatever Kotlin version you configure in your gradle file.

In a nutshell, for kmp-tor v2 to work we need Kotlin 2.1.10 but this version seem to still have some issue with react-native: https://github.com/facebook/react-native/issues/48274, specially for the last one, I got that exact same error code when I run ./gradlew clean. There is also seems to be some fixes already merged (https://github.com/facebook/react-native/commit/63fdc048880ccb4e6d88825e7081772efcb44dc6) 1 month ago for RN 0.79.1 so upgrading could potentially solve the problem.

If you want to avoid upgrading RN I see some fixes and workarounds for it but I don´t like them because it's just hacking RN's build.

KoalaSat avatar Apr 23 '25 11:04 KoalaSat

I just pushed my changes to upgrade Kotlin so you can reproduce the error

KoalaSat avatar Apr 23 '25 11:04 KoalaSat