Open jefft0 opened 10 months ago
To work on GnoSocial, we have gotten started with the development cycle using gnodev and gnofaucet . We have opened the following PRs with contributions which are making our work smoother and hopefully for others too.
More to come for sure!
In working with gnodev, we ran across an easy and a hard problem.
time.Now()
, explained here https://github.com/gnolang/gno/issues/1507 and fixed in PR https://github.com/gnolang/gno/pull/1510 (Merged)time.Now()
is the time of replay, not the time of the original transaction. This has the effect of erasing all timestamps. It happens in gnodev but also in other places where transactions are replayed such to migrate to a new testnet. You can see that all the timestamps are the same on the message board for testnet3. https://test3.gno.land/r/demo/boards:testboard . There are already plans to fix this in https://github.com/gnolang/gno/issues/1511 .GnoSocial is a modification of r/demo/boards . As we were developing we found some bugs which we fixed in GnoSocial, so we contributed some PRs to fix the same in r/demo/boards.
Run
to gnoclientGnoSocial uses Gno Native Kit which is a thin wrapper on top of the gnoclient API. This already has Call
to call a realm function. But for stress testing in GnoSocial we need to use ad-hoc scripts which run on the node and do multiple function calls. This was one of the purposes of the command-line gnokey maketx run
. This pull request adds Run
to gnoclient so we can do this programmatically. https://github.com/gnolang/gno/pull/1574 (Merged)
Thanks to the Gno devs merging the PRs mentioned above, Gno Native Kit can now use the Run
command to call realm functions repeatedly. We made a PR to use Run
and gnodev to stress test storing thousands of messages. See the PR for preliminary results and near-term recommendations. Eventually, apps like this can be part of the automated testing of the Gno code. https://github.com/gnolang/gno/pull/1583 (1 approval)
Some of the recommendations are done by this gnodev PR. https://github.com/gnolang/gno/pull/1622 (Merged)
One of our devs lost time trying to understand an uninformative error message when calling a realm function with the wrong number of arguments. This will be a common problem for other devs. We made a small PR for the VM to check the number of arguments and give time-saving informative error messages. https://github.com/gnolang/gno/pull/1610 (Merged)
Send
to gnoclientThe gnoclient API already had support for MsgCall. Above, we mentioned how we added support for MsgRun. Here, we made a PR to add MsgSend to send coins from one account to another. We will be using this in the GnoSocial demo app. https://github.com/gnolang/gno/pull/1639 (Merged)
With the help of @gfanton to show where to increase the maximum allowed gas in gnoland, it can be used for stress testing where hundreds of posts are added to the boards realm in each transaction. gnoland stores the data on disk, not in memory like gnodev currently does. So we wanted to stress test adding one million posts. Full details are in the stress test PR. In short, gnoland performed well. Transaction times remained constant and memory usage was reasonable.
We have explored some approaches to onboard users on the GnoSocial dApp. After some discussions, we've decided to keep using the Faucet Strategy. Even though we know that strategy is not suitable for the Mainet launch, we agreed to keep with it since we don't have any other alternative for now. You can check out a quick demo about the Faucet Strategy here.
References: Jae Kwon - gno demo at 25:20 How do you solve the onboarding with gas fees, or even like social media with gas fees?
ListUsersByPrefix
In GnoSocial, we needed a utility to search the r/demo/users usernames by prefix. This is a useful tool for the avl.Tree, so after some discussion, we decided to make a new package p/demo/avlhelpers with a helper function ListKeysByPrefix
. (In general, Gno devs are encouraged to write general packages.) Then the r/demo/users function ListUsersByPrefix
simply calls it. https://github.com/gnolang/gno/pull/1708 (Merged)
While developing GnoSocial, we discovered a bug where the GnoVM hangs during the Render function. (This is in line with a goal of the GnoSocial project to stress test Gno.) Here is the PR with a txtar script which reproduces the error:
Here is the bug report (Reviewing). When there is a PR to implement the solution, we'll update this post.
As we add features to GnoSocial we're exploring interesting solutions for scalability, as explained below.
New GnoSocial interface features:
Next steps:
Here's a short video that shows the UI/UX parts we're working on:
We started the GnoSocial project to experiment with ways to implement social media features in Gno.land. The idea was to see what would be the main challenges to implement social media functionality using this decentralized tech and test various approaches to this.
Some of the basic features are already here: create/delete account, post message and reply to message. And others are on the way: react to post, profile pic and hopefully more complex stuff like notifications or even integrations are cooking in the background.
Recently, to align with the Gno naming policy, we decided to rename the app from GnoSocial to dSocial. So, our new repo is https://github.com/gnolang/dsocial . For the record, we will leave "GnoSocial" in the previous posts and videos of this Journey, but from now on we will use dSocial everywhere.
Oh, and one more thing: we plan to bring the app to Test Flight and Google Play Console very soon. Access will be invite only so if you're interested in playing with it, let us know and we'll set you up with a test account.
dSocial needs some services available online, e.g. gnodev, faucet, tx-indexer. To be able to deploy some Gno services on our Berty server, we contribute to add gnodev in the gno's Dockerfile: https://github.com/gnolang/gno/pull/2009 (closed to open a new PR) You can watch this video that shows how we manage the different services together with Docker: https://www.loom.com/share/5395c039c0b24118bee56ae5edd7a224?sid=30b17f0e-53ea-4f39-8f0e-1b8b3c150eee
While working on dSocial, we discovered that it doesn't load with addpkg. An investigation showed that a recent PR to improve error checking on loading a package produces an error when importing the "time" package. We made a PR with a simple txtar test to show it, https://github.com/gnolang/gno/pull/2111 . This PR was merged as a regression test after the fix in https://github.com/gnolang/gno/pull/2105 was merged.
Hi there. We are happy to share that the dSocial mobile App was released on Apple (TestFlight) and Android Play (Internal Test). As you may know, this app uses GnoNative npm SDK (@gnolang/gnonative) that makes building on mobile for Gno easy peasy. We also used the opportunity to create and improve many pieces on the backend side. You can check more details on our journey entries. If you want to try, please, send a dm with your email to me (Iuri) on Signal. Please say if you have an iPhone or Android phone.
Hi everyone,
We consolidated the scalability tests finds around avl.Tree resource consumption, tx time, gas limits and more. Check it out here https://github.com/gnolang/hackerspace/issues/67
You can now tell us on dSocial. Create Account, Follow, Post, Repost, Reply to a Post features are here (Reply to a post is affected by a bug, but it will work again soon).
We are working to add "React to a post" and "Notifications" features.
Here's how you can test dSocial:
Oh, and don't forget that you will need funds to make transactions (posts, cat-posts, replies, etc.) so after you sign-up you'll have to click on "Onboard user" to receive gnots.
After that you'll be able to cat-post
Since dSocial (and Gno Native Kit) use the Keybase API, we are interested in how the design of this API enforces bindings between a key address and a username. We identified possible design issues and opened PRs to demonstrate the issues. The PRs are a place to discuss the design and possible solutions.
New features are now available on dSocial:
If you haven't already, we super encourage you to try dSocial yourselves. All you need to do is
• iOS: follow the instructions of this link. You will need to install Testflight on your iPhone • Android: send your email address via Signal to our colleague Iuri, using this link: and you will receive install instructions.
This documents the continuing journey of Berty into Gno.land. This follows from our previous journey to create Gno Native Kit (formerly called GnoMobile).
The goal of dSocial is to create a test bed for building decentralized social media type of applications and experimenting with smart contract integrations around social media features. This test bed is not intended to be a polished end-user app but to experiment and stress test technical issues in using Gno.land related to implementing decentralized social apps.
The first version of dSocial will include the basic Twitter-like features like: post, react, notification, mentions, etc. dSocial will be built for mobile using the Gno Native Kit framework, but we will also include a minimal desktop app and a read-only web version.
Additional R&D issues we will investigate are:
You're invited to follow our Journey where we will document our experience using Gno, writing realm code, and track our issues and R&D results. 🚀