gardens icon indicating copy to clipboard operation
gardens copied to clipboard

Refactor honey-pot to use IDX + Ceramic to fetch user profiles data

Open 0xGabi opened this issue 3 years ago • 12 comments

IDX documentation: https://developers.idx.xyz/learn/welcome/ Ceramic documentation: https://ceramic.network

Good example projects that already integrate:

  • MetaCred: https://github.com/meta-cred/core
  • Self.id: https://github.com/ceramicstudio/self.id/blob/main/packages/core/src/core.ts

TODO: mention the pieces of logic we need to update.

0xGabi avatar Apr 16 '21 16:04 0xGabi

I started to implement IDX in a honeypot new branch. Should this be implemented in the honeypot repo or gardens repo? I'm not sure what we decided regarding on having two different repos.

famole avatar Apr 16 '21 16:04 famole

@famole good question. I think we can add that functionality in a new branch and then merge it both on master and gardens branches

0xGabi avatar Apr 16 '21 18:04 0xGabi

I've been going deeper in the idx+ceramics thing, there are a couple of point to have in consideration

  • Ceramic is running in testnet yet, there are two different networks, one is readonly and the another is for dev proposes (this means that data can be erased anytime).
  • There is not a clear path about production and migration data, i've joined ceramics discord and was chatting with the devs, but many question are still with no response from their side.
  • There is a function that gets the information from the 3box nodes that can be used for the migration, this information is returning a basic profile, there are some fields that are not coming like github and twitter account.

I've been doing some code testing and was able to connect their network and get the basic profile.

My next steps are:

  • Create all the methods needed to manage profiles from scratch
  • Get rid of the 3box code and make honeypot functional using this getLegacy3BoxProfileAsBasicProfile function until have more information from their side about migration data and production environments.

My recomendation:

  • Keep the new implementation in a different branch until have a clear picture about the existing data.

Discord chat with questions: https://discord.com/channels/682786569857662976/738438758483099678/833692866131787786

famole avatar Apr 19 '21 13:04 famole

Awesome progress Fabi, good discussion offline as well on the next steps 💪

0xGabi avatar Apr 20 '21 00:04 0xGabi

Quick update on this.

Updated 3id-connect library, currently we are able to prompt the migration message, but when performing the link to existing accounts or create a new one we get an exception coming from the 3id-connect lib.

I sent the issue in the ceramic/idx discord, this is what they sent back to me:

thanks for the ping, missed this, yeah i have not seen this issue yet, but i can try to test it in a bit, as mentioned above we were in process of a bunch of bigger changes/refactors, and 3id-connect will be stabilizing a lot more in a few days

I'll be pinging them in case i dont get any news soon. Discord message reporting the issue: https://discord.com/channels/682786569857662976/738438758483099678/834462948901650482

famole avatar Apr 22 '21 15:04 famole

Thanks for the update!

0xGabi avatar Apr 22 '21 15:04 0xGabi

Another update on this task:

I'm still blocked with the migration, there is no way to make it work. I've been in contact with the ceramic/idx team and this is the last message that i got

thanks @FabiM for the update, same status unfortunately that next more stable release of 3id-connect coming soon, a bit delayed by a few issues, also migrations wont really work until ceramic mainnet, they would just be dont on clay-testnet right now, but maybe you are just trying to test it?

I'll wait until next release is published and update the creation data code. But eventually we will need to wait for the ceramic mainnet network for make this whole feature functional i think 😞

https://discord.com/channels/682786569857662976/738438758483099678/837019970336194560

famole avatar Apr 28 '21 17:04 famole

@0xGabi @fabriziovigevani @lkngtn @famole in order to move forward with this , what do you guys think about getting rid of our old profiles and skip migration? i don't think anybody is going to get upset for missing the profile and create a new one, is it possible to move forward creating it from scratch without migrating @famole ?

rperez89 avatar Apr 28 '21 19:04 rperez89

Te migration popup is triggered automatically by @3id/connect once the account is connected, we can't avoid that i think, i'll double check just in case

famole avatar Apr 28 '21 23:04 famole

I agree with @rperez89 we can just skip the migration. The current 3box dependencies are super heavy and also producing problems with the installation in the new Mac M1. We can refactor to use IDX + Ceramic for the Clay testnet for now without a migration option.

What you think of merge the changes on gardens for now and if we feel good about it also move them to honey-pot master?

0xGabi avatar Apr 29 '21 17:04 0xGabi

Te migration popup is triggered automatically by @3id/connect once the account is connected, we can't avoid that i think, i'll double check just in case

Hey fabi that seems a bit weird, what happen with a project that never used 3box before and is using idx from scratch? There should be a way to start from scratch regardless used 3box or not I guess

rperez89 avatar Apr 30 '21 15:04 rperez89

@rperez89 maybe i wasn't clear in my explanation, in case you haven't used 3box before, there is no issue, you should be able to create a new profile from scratch.

The issue is happening with existing accounts, 3id/connect checks if you have created your profile in 3box at the moment of connecting your wallet. In case there is information in 3box you will be seeing the migration popup (i think until you confirm the migration, but i can not test this because the library fails at the moment).

Anyway 3id/connect is needed to be used with ceramic and idx, i've been sending them all the issues that i'm facing and they are going to release a new version in the next few days. The new version will help on the create new profiles, but i't wont for existing accounts.

The migration popup has two options, "Link your existing account" (this is the one that wont work until production) and "Create" ( my guess is on the new version we should be able to create an existing account in 3box, from scratch in ceramic and that should be it for sending this to done :) )

Let me know if there is any doubt about this and we can jump in a call

famole avatar Apr 30 '21 16:04 famole