ICDevs.org Bounty 0 - React-Native Agent

React-Native IC Agent Bounty - #0

Current Status: Discussion

  • Discussion (10/18/2021) ← We are here

  • Ratification

  • Open for application

  • Assigned

  • In Review

  • Closed

Bounty Details

  • Current Bounty Amount: 20 ICP

  • ICDevs.org Match Available: 20 ICP - (For every ICP sent to e156fe180f0f6deffa87344390dc45b2e6d4483d4007f6ea8f3f4d89e56fa5d2, ICDevs.org will add one more ICP to the bounty, up to 20 ICP, After 20 ICP, Donations to the above address will add .25 ICP to this issue and .75 ICP to fund other ICDevs.org initiatives)

  • Time Left: Expires 12/31/2022

  • Project Type: Single Contributor

  • Opened: 10/18/2021

  • Time Commitment: Days

  • Project Type: Traditional

  • Experience Type: Intermediate

  • Issue Type: Improvement

Description

The js agent provided by DFINITY works well for web applications. It has issues when trying to use it from Android and iOS. There has already been a good bit of discussion on the issue here: Making HTTP calls from mobile apps - #25 by Safik

This bounty will be awarded to the developer who delivers an open source solution that react-native developers can use in their react-native projects. We would prefer that these template projects become part of GitHub - MioQuispe/create-ic-app.

The repos can be delivered as either one or two project templates. If two are needed, one should be for iOS and one should be for android. Developers should target the OS version that would be relevant to at least 50% of OS users(currently iOS 12, Android 10).

Repos should follow the same module signature as other react-native projects and any new components or shims should be easily accessible from npm and yarn.

If specific configuration is necessary then the configuration should be well documented in the readme file.

If a custom js engine is necessary, specific instructions should be provided for how to download, compile, and include the custom js engine in the project. This should consist of both a description of the changes to the js engine and a script to set up a project properly so that it ‘just works’ like other create-ic-app templates

To apply for this bounty you should:

  • Include links to previous work with react-native and project templating and any other open source contributions(ie. your github).

  • Include a brief overview of how you will complete the task. This can include things like which dependencies you will use, how you will make it self contained, the sacrifices you would have to make to achieve that, or how you will make it simple. Anything that can convince us you are taking a thoughtful and expert approach to this design.

  • Give an estimated timeline on completing the task.

  • Post your application text to the Bounty Thread

Selection Process

The ICDevs.org developer’s advisors will propose a vote to award the bounty and the Developer Advisors will vote.

Bounty Completion

Please keep your ongoing code in a public repository(fork or branch is ok). Please provide regular (at least weekly) updates. Code commits count as updates if you link to your branch/fork from the bounty thread. We just need to be able to see that you are making progress.

Once you have finished, please alert the dev forum thread that you have completed work and where we can find that work. We will review and award the bounty reward if the terms have been met. If there is any coordination work(like a pull request) or additional documentation needed we will inform you of what is needed before we can award the reward.

Bounty Abandonment and Re-awarding

If you cease work on the bounty for a prolonged(at the Developer Advisory Board’s discretion) or if the quality of work degrades to the point that we think someone else should be working on the bounty we may re-award it. We will be transparent about this and try to work with you to push through and complete the project, but sometimes, it may be necessary to move on or to augment your contribution with another resource which would result in a split bounty.

Funding

The bounty was generously funded by the community. If you would like to turbocharge this bounty you can seed additional donations of ICP to e156fe180f0f6deffa87344390dc45b2e6d4483d4007f6ea8f3f4d89e56fa5d2. ICDevs will match the bounty 1:1 for the first 20 ICP and then 0.25:1 after that. All donations will be tax deductible for US Citizens and Corporations. If you send a donation and need a donation receipt, please email the hash of your donation transaction, physical address, and name to [email protected]. More information about how you can contribute can be found at our donations page.

General Bounty Process

Discussion

The draft bounty is posted to the DFINITY developer’s forum for discussion

Ratification

The developer advisor’s board will propose a bounty be ratified and a vote will take place to ratify the bounty. Until a bounty is ratified by the Dev it hasn’t been officially adopted. Please take this into consideration if you are considering starting early.

Open for application

Developers can submit applications to the Dev Forum post. The council will consider these as they come in and propose a vote to award the bounty to one of the applicants.

Assigned

A developer is currently working on this bounty, you are free to contribute, but any splitting of the award will need to be discussed with the currently assigned developer.

In Review

The Dev Council is reviewing the submission

Awarded

The award has be been given and the bounty is closed.

Other ICDevs.org Bounties

8 Likes

If you have any questions/concerns/comments about how this is set up or if this should be posted here, etc, please log them over at ICDevs.org - Voting and Discussing Bounties. I’d love your input on making this process as efficient and effective as possible. Try to keep the discussion in this thread about the actual task at hand. Thanks!

At ORIGYN, we already open-sourced a react-native TODOs application: GitHub - ORIGYN-SA/todos-react-native-dfinity: simple react native todo list app powered by dfinity

Hint for whoever interested by the bounty: You can check the patches applied in order to have that working.

Main bottleneck are around BLS verification that takes time.

6 Likes

Awesome. Between what Origyn has and what @jzxchiang has done, someone should be able to put this into the GitHub - MioQuispe/create-ic-app framework fairly easily. Hopefully this will be a quick win for the community.

3 Likes

I spent several days porting agent-rs, tried to compile it on Android(cradle.plugin.com.github.william.rust:plugin:0.3.4). Nothing has come out yet. This works with the demo code on rust. I think the problem will be solved quickly when google officially integrates rust into Android Studio

3 Likes

We’ve had our first match donation. The Bounty is now 21 ICP Thanks to Deepsea (Jeremy K).

I won’t post all of these, but I will let everyone know when we’ve hit the match.

1 Like

Take jniLIbs agent_dart/android/src/main/jniLibs at main · AstroxNetwork/agent_dart · GitHub

and .a

They are BLS compiled from rust.

And just experiment to see if they work. Then I will try ripping the compiling project out of agent dart

2 Likes

We’ve initiated the vote to approve this bounty. Axon
You could be voting if you join the developer advisory council. Details are here: ICDevs.org

1 Like

Exciting. Wishing the best to those already on the hunt!
Will finish the Dfinity/Encode hackathon first and if this is still running later might give it a go.

1 Like

The bounty has been ratified and is open for applications. I’m trying to work with DFINITY to fix the message board code that won’t let me edit my original post…if we can’t get it resolved we may need to pick a different venue.

This step is pretty straightforward. In an effort to keep people from duplicating the effort, someone needs to step up and ‘apply’ for the bounty. The bounty is now 21 ICP.

If you’d like to apply in a less public way you are welcome to send me a DM on the forum software or at Austin at icdevs dot org.

2 Likes

@skilesare

I saw the NNS Motion proposal which I assumed created: Internet Computer Network Status

Maybe I am missing something, but I am not sure what the proposal is asking the community, to be honest. Since the proposal is sent, can you help update in the thread to clarify what the community is voting on?

(its possible I am the one missing something very obvious)

Oh man… I guess I screwed that up. I was using axon: Axon and I thought that “motions” just stayed on the system and had no action. I guess we approved the neuron to propose a motion to the NNS. Oops. Well…I guess the community can ratify it also!

This was not meant to go to the NNS. I guess we need to add a top-level “motion” to axon to use it the way we want to.

6 Likes

Hello. How relevant is this task for porting Android Kotlin/Java?

Probably only tangentially related. I’d imagine that some of the code that would work for Java/kotlin would be on the back end of the Android libraries that react native has to talk to to communicate with the Android OS. If your interested in that side we could carve out that portion of it, but this bounty does require wiring it all up in react native template project.

I have fantastic news to share.

Thanks to the work of the maintainer of react-native-v8, the latest version of that library now supports WebAssembly.

That means BLS signature verification now works on both iOS and Android without needing to write any custom Rust or C++ native code.

Caveats:

  • Must be at least iOS 14 and can’t use Hermes
  • Android must use react-native-v8 v0.65.2-patch.1 or v0.66.3-patch.1. That means you must be running React Native v0.65 or v0.66 (for now). Hermes and JSC (for Android) are not yet supported
5 Likes

This is great news! Does this mean that setting up a project is as easy as npm install with the right config?

Hmm that would be part of it, but the tricky thing with mobile is that every RN + IC project would still need to make some changes to their Android and iOS native code to properly install some of the npm dependencies, such as react-native-v8.

For example, they will need to update their build.gradle files. There might need to be a custom script (kinda like create-react-app or dfx new) that can auto-generate a skeleton RN + IC git repo.

Ok cool…so it sounds like this bounty has been reduced to writing up some basic instructions and integrating the configurations with those instructions into GitHub - MioQuispe/create-ic-app: Use your favourite frontend framework with the Internet Computer.

There are 21 ICP in this bounty right now…maybe we should reward the maintainer of react-native-v8 with some of this? And the have the rest for the person willing to put the instructions together?

This is a great opportunity for someone to get their feet wet with the IC and make ~$800 in the process.

2 Likes

Yeah, that’d be awesome if we could reward the react-native-v8 maintainer with a part of the bounty. I’m sure he would be happy about that.

2 Likes

Do you have a github username? I can reach out.

1 Like