Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative to rocksdb: Added jammdb as another lightweight option for wallet storage #1004

Closed
wants to merge 56 commits into from

Conversation

mighty840
Copy link

@mighty840 mighty840 commented Aug 11, 2023

Description of change

Added support for JammDB as storage provider, in addition to RocksDB and memory storage for the wallet module.

See Jammdb here

Motivation

Currently, rocksdb is too bulky for usage on end-devices like IoT Edge devices, android, ios Mobile phones and successive builds are not guaranteed due to breaking changes coming from up stream. Jammdb offers a simpler and light-weight option. Rocksdb can still be used and is also the default.

ETO GRUPPE wanted to have own integrated wallet and hence the fork was created for adding support with JammDB. After testing and integration with different bindings for android, ios and capacitorjs, it was found to be stable and can be used as an alternative to rocksdb.

As maintaining the fork was no longer necessary it was decided to contribute these changes back to the IOTA-SDK and also allow everyone else to use the jammdb variant. The rocksdb feature is still the default and jammdb is just another optional feature which can be used.

By removing dependency from the fork, it would be easier to always pull the latest update from IOTA-SDK rather than maintaining the fork.

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Tested with wallet integration in various android and iOS apps @ ETOGRUPPE.

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked that new and existing unit tests pass locally with my changes

sdk/Cargo.toml Outdated Show resolved Hide resolved
@DaughterOfMars
Copy link

I fixed that issue. Please resolve conflicts

@thibault-martinez
Copy link
Member

Also, can you please change the base branch to 1.1? We'd probably release that together with other updates.

@mighty840 mighty840 changed the base branch from develop to 1.1 August 28, 2023 14:11
@DaughterOfMars
Copy link

I don't think the merge went okay. Also, regarding the cfg-if macros, I think the problem is actually that you used parenthesis () instead of brackets {}.

@mighty840
Copy link
Author

ahh yes. I understood my error. Fixing it now. It works after replacing () with {}. cargo check also works! Thanks for the input.

@DaughterOfMars
Copy link

The merge is seriously eff'd. You may want to start over if you don't feel that you can fix it

@mighty840
Copy link
Author

I dont understand what remains now to be fixed.

@mighty840
Copy link
Author

I have resolved the newer conflicts. Its very hard to understand the cryptic and unregulated comments as well as hard to follow two lines of action coming in from different devs. If you feel like merging this in the up stream, let us know, otherwise we will keep maintaining the fork, but I think there is no point for us now to waste our time beautifying and "eff'ing" your code in this PR.

Also, would like to know where to report code of conduct violations.

@thibault-martinez
Copy link
Member

Hi @mighty840,

Its very hard to understand the cryptic and unregulated comments

I've read everything again and honestly don't see anything cryptic at all. Can you give me an example?
Also please be sure you can always ask for clarification and we will happily answer.

hard to follow two lines of action coming in from different devs

We require 2 approvals from the team (and even sometimes 4) to merge PRs. This is a very standard practice so you will always have different devs giving their opinion. Please have a look at ALL our other PRs and you will see that this one hasn't been treated any different.

If you feel like merging this in the up stream

We are not sure yet, we need to spend some time investigating that library before we take any decision.

waste our time beautifying and "eff'ing" your code in this PR.

I am sorry you feel this way but we are not going to reduce our quality standards. Again, this PR is treated as any other PR, internal or external.

Also, would like to know where to report code of conduct violations.

Feel free to send a mail to [email protected].

@thibault-martinez
Copy link
Member

Hi @mighty840, sorry for the delay, we have been super busy with stardust on mainnet and work on 2.0. We have taken the time to think about this and for now it seems that the best solution is for you to continue maintaining your fork. With 2.0, we have the opportunity to do breaking changes and completely revisit our storage layer so we will definitely take your input regarding IoT devices in consideration. Thanks for your understanding.

@mighty840
Copy link
Author

@thibault-martinez works for us. Keep us posted if you need to merge it later. We will try to keep our fork patched as far as we can.

@thibault-martinez
Copy link
Member

thibault-martinez commented Oct 23, 2023

@thibault-martinez works for us. Keep us posted if you need to merge it later. We will try to keep our fork patched as far as we can.

Thank you for your understanding. I will close the PR until we start working on the database layer for 2.0, is that fine with you? Also, develop won't change too much now so it should be fairly easy to maintain your fork.

@mighty840
Copy link
Author

Yes. I am closing the PR now from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants