Gitcoin bounty to enhance Java-driver
Closed this issue · 29 comments
Hi there!
Thank you for dropping by. BigchainDB is open source project that has many moving parts. We try to allocate time to each issue and feature request but sometimes we run out of time or the problem is out of our maintainers expertise reach. To combat this problem we add bounties to issues / features. this is our way of saying Thanks for your contribution to our cause.
If you do not have any gas (Gwei) to pay transaction fee for work submission, we will be happy to send Gwei to you :)
We will try to help you help us getting this issue closed. But, if for some reason you would not be able to work on this bounty, please see our Gitcoin profile for our other open bounties. We would also encourage you to watch this repo as we are planning more upcoming bounties and we would love to have your contributions.
How can you help?
We are looking for some help to update and maintain java driver for bigchaindb. We already have community supported java driver - https://github.com/authenteq/java-bigchaindb-driver, but after version upgrade for "1.x" to "2.0", there are breaking changes and it needs to be updated. Also, we would like to add support for Android so that even android app developers can take advantages of bigchaindb. There is already a reference repo by Gerardo for android bigchaindb driver - https://github.com/GerardoGa/bigchaindb-android, but we are looking for maintaining a single repo for java and android.
What needs to be done?
- Upgrade java driver to support version 2.0 of bigchainDB. This spec - https://github.com/bigchaindb/BEPs/blob/master/13/README.md#changes-between-version-1-and-2-of-this-spec explains changes in version 2.0
- Add android support.
- Improve code coverage to >95%.
We are very happy when -
When all below changes is merged with master branch -
- Java driver is compatible with version 2.0 of bigchaindb with changes implemented according to this spec
- Java driver is now compatible Android and supports android devices with version >= 6.0.
- Code coverage is improved to >95%
Seen this problem before ?
Any help solving this is welcome. Feel free to leave any comments and help someone else to solve it. We might airdrop tokens to someone even if not directly completing bounty.
Questions & Reviews
Pull requests will be reviewed by one of maintainers or long term contributors. In case of any additional questions feel free to ask in this thread (preferred) or message me personally on Gitter (username - innoprenuer) and we will do our best to add the missing info :)
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 1.0 ETH (429.59 USD @ $429.59/ETH) attached to it.
- If you would like to work on this issue you can 'start work' on the Gitcoin Issue Details page.
- Questions? Checkout Gitcoin Help or the Gitcoin Slack
- $19,256.90 more funded OSS Work available on the Gitcoin Issue Explorer
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Workers have applied to start work.
These users each claimed they can complete the work by 4 weeks, 1 day from now. Please review their questions below:
- bakaoh has applied to start work (Funders only: approve worker | reject worker).
- Q: I will finish this in a week
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 1 week, 5 days from now.
Please review their action plans below:
-
bakaoh has been approved to start work.
I will finish this in a week
Learn more on the Gitcoin Issue Details page.
@bakaoh: Thanks for offering your help. Very happy to work with you. What would be your approach to solve this issue? Could you please briefly share your thoughts? We have a gitter channel that usually is very helpful too: https://gitter.im/bigchaindb/bigchaindb-driver
Also, if you'd like please reach out to @innoprenuer, one of our experienced dev engineers. He will be also reviewing your submission.
@chalidbdb -- i think i will use the python driver for reference, but i will go through the document first to understand the api.
@bakaoh Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
- warning (3 days)
- escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@bakaoh Are you still working on this? or it is completed? This PR -bigchaindb/java-bigchaindb-driver#2 - is it WIP or Completed?
@innoprenuer --- i'm still working on this, #2 is WIP, i will edit the title when it completed
@bakaoh Ok sure. Just wanted to confirm that you are working on this.
@bakaoh You may find the BigchainDB Transactions Spec v2 helpful to understand all the pieces of a transaction, and how the computed pieces are computed. It's also known as BEP-13:
thanks @ttmc
@innoprenuer --- it's done. Sorry for the delay, it took more time to make it compatible with android api 23 than i expected. Some of work go into modify crypto-conditions library here https://github.com/bakaoh/android-crypto-conditions
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 1.0 ETH (459.0 USD @ $459.0/ETH) has been submitted by:
@chalidbdb please take a look at the submitted work:
- Learn more on the Gitcoin Issue Details page
- Questions? Checkout Gitcoin Help or the Gitcoin Slack
$27,814.16 more funded OSS Work available on the Gitcoin Issue Explorer
@bakaoh Thanks. And no worries about delays. We will review the submission. If all is well, we will merge it into master and release your well deserved bounty reward :)
@bakaoh I would also like to know what issues you faced with exisiting crypto-conditions (why you couldn't use the exisiting library?) and what changes were made to make it compatible with android, just for the knowledge and future implementations.
@innoprenuer --- the existing library working at api 26 but it uses some methods that is not supported at api 23. Also commons-codec cause problems with android so i replaced it with google-api-client
@bakaoh - okay thanks. Could you please also update README.md with usage instructions if there are any changes with java and android!
@innoprenuer --- sure, i'm busy tonight and weekend, i will update usage on monday
@bakaoh alright. Thanks
@bakaoh Any progress on updating README? Once its done, please comment here, so we can review this PR and release your bounty reward if all works as expected 👍
sorry @innoprenuer , i got flu >_< i will try to get it done asap
@innoprenuer -- its done :D
@bakaoh Thanks. We will do the review and merge it once done. Do you already have an android project where you tested it? It would be nice if you can share the source so that we don't have to create it seperately. It would be faster.
@innoprenuer --- i've just added some simple test here https://github.com/bakaoh/android-bigchaindb-demo
@bakaoh - I have reviewed your PR. Looks good for most parts. Please find below my observations -
-
Works with Java
-
Works with Android Api 28
-
Doesn't work with Android Api 23.
For Android, your project - https://github.com/bakaoh/android-bigchaindb-demo, only creates Transaction and displaying it on device. But, we needed was to verify that Transactions are being committed and assets are being fetched successfully from bigchaindb. So, I added some extra code and tried fetching assets after commit. It works for API 28, but fails for API 23. Below is the stack trace -
07-25 14:39:11.791 3928-3928/com.bakaoh.bigchaindb E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.bakaoh.bigchaindb, PID: 3928
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bakaoh.bigchaindb/com.bakaoh.bigchaindb.MainActivity}: java.lang.IllegalArgumentException: Unknown pattern character 'X'
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.IllegalArgumentException: Unknown pattern character 'X'
at java.text.SimpleDateFormat.validatePatternCharacter(SimpleDateFormat.java:323)
at java.text.SimpleDateFormat.validatePattern(SimpleDateFormat.java:312)
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:365)
at com.google.gson.DefaultDateTypeAdapter.<init>(DefaultDateTypeAdapter.java:55)
at com.google.gson.GsonBuilder.addTypeAdaptersForDate(GsonBuilder.java:585)
at com.google.gson.GsonBuilder.create(GsonBuilder.java:570)
at com.authenteq.util.JsonUtils.getGson(JsonUtils.java:64)
at com.authenteq.util.JsonUtils.fromJson(JsonUtils.java:123)
at com.authenteq.builders.BigchainDbConfigBuilder$Builder.setup(BigchainDbConfigBuilder.java:145)
at com.bakaoh.bigchaindb.MainActivity.onCreate(MainActivity.java:49)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
I tried searching for cause - here, here and here. It seems like date format issue.
Please have a look into that. I have created - a gist for MainActivity.java file in your android project so that you can use that code and reproduce issue quickly.
P.S. you will also need to add
<uses-permission android:name="android.permission.INTERNET"/>
in your manifest file.
@innoprenuer --- thanks for your support, i fixed the bug by setting "yyyy-MM-dd'T'HH:mm:ssZZZZZ" as default
@bakaoh cool. I will look into that. Also could you confirm that you implemented all 3 changes in changes from v1.3 to 2.0 especially hash-then-fulfill to fulfill first then hash ?https://github.com/bigchaindb/BEPs/blob/master/13/README.md
@innoprenuer --- sorry for late reply, i'm on vacation. Yes, all 3 changes is implemented. You can check it in sign
function of the builder, fulfillment is calculated first then it hash the transaction to set the Id
@bakaoh - Thanks for the reply. I will review that and once confirmed I will set this bounty as done. Meanwhile it would be nice if you could join our gitter channel - https://gitter.im/bigchaindb/bigchaindb. We usually help other devs with their queries and also announce new bounties there. It would be cool to have you there and help other devs with their queries with java driver :)
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
The funding of 1.0 ETH (463.24 USD @ $463.24/ETH) attached to this issue has been approved & issued to @bakaoh.
- Learn more on the Gitcoin Issue Details page
- Questions? Checkout Gitcoin Help or the Gitcoin Slack
- $29,419.17 more funded OSS Work available on the Gitcoin Issue Explorer