GSN Starter Kit hands on experience

Good morning, In theory there shouldn’t be any differences. From the tabookey’s Relayer’s Go code, all endpoints and behaviour is standard.

At this point I have 2 options:

  • Improve the Go HTTP Relayer code and make sure everything around the "ready"attribute works well with extra logging and better design
  • Wait until you guys write it in Node JS and improve the relayer code/logging etc

@nventuro Do you plan to do the re-write anytime soon? I saw you were adding more commits and improving generally the gsn-helpers these days as well which is great.

1 Like

@nventuro @ylv-io or anybody please, do you a have full source and compilable Relayer server? I can’t improve it or debug it without having all the code.

If you open https://github.com/tabookey/tabookey-gasless/tree/v0.4.0-beta2/server and check for the usages of “Ready”, the part of code that is probably failing is: refreshBlockchainView. And there is some filtering logic that is nowhere defined and I bet a week of my happiness and mental peace that this behaviour is SILENTLY failing.

NOTE the usage but no definition. Unless some fancy regex magic for building dynamic methods and compiling them was used or Github search is betraying me.

2 Likes

Hey @lukaslukac!
I have never touched Relayer server code. Is it in https://github.com/tabookey/tabookey-gasless/blob/v0.4.0-beta2/server/src folder, like https://github.com/tabookey/tabookey-gasless/blob/v0.4.0-beta2/server/src/RelayHttpServer.go?

1 Like

That’s my question. Doesn’t seems to be complete source code or I am overlooking something. Also it has no package manager and global dependencies etc :frowning:

1 Like

@lukaslukac all of the source code is in the server directory, as well as tests, tools to make the autogenerated files (the Go wrappers for the contracts), and a Makefile to crosscompile the server on all major platforms and architectures.

1 Like

Oh OMG! Totally true. Apologies. I overlooked the part of Makefile for the go bindings generation. How could I forget about that? :man_facepalming: :man_facepalming: :man_facepalming: Thanks for hint! There is indeed a lot of build scripts! Thx @nventuro!

1 Like

Your profile pic fits perfectly

1 Like

Was thinking the same when typing it actually. Bit crazy days :slight_smile: I have one more idea what could be wrong. There may be a bug in one Lightchain RPC API.

I’ll get this to work one way or the other :slight_smile:

2 Likes

It’s a hanging RPC endpoint which would explain the “ready” attr that is based on it and also the other issue with web3 hanging based on a similar code. Would be “funny” if my setup would be OK the whole time and there would be an issue in Lightchain RPC code. Should be fully Ethereum compatible but some APIs were disabled when we were making them work with Tendermint. Working on that atm.

2 Likes

OMG I GOT IT WORKING. Hacking things here and there the current setup is still not optimal but that’s normal software evolution. Got the starter kit to work with Lightstreams custom network!

00

Will report few more improvements, ideas and write a blog post about the full setup once I deploy everything properly to LS official test network Sirius.

GG! Thx for help guys. Idk who did some improvement in Tabookey relay-server 0.4.1 but they helped a lot. Also the improvements in new versions of oz js-helpers I was monitoring.

1 Like

I created a new improvement task https://github.com/OpenZeppelin/openzeppelin-gsn-helpers/issues/19 let me know WDYT @abcoathup @nventuro and others (can tag only 2)

A post was split to a new topic: How to use the GSN with DAI?

I FOUND THE ANOTHER ROOT EVIL ISSUE. This time on my side, in Lightchain blockchain as I suspected few days ago.

Due to performance issues in Lightstream’s Ethereum compatible filtering on a Sirius test network with 560 000 blocks, looping 6000 blocks to the past hangs forever. And this explains why the “Ready” attribute wasn’t working! Finally cracked after adding some extra logging!

Changing this value to 1000 works.

PS, I had to hardcode it because is not configurable, reported a bug to tabookey: https://github.com/tabookey/tabookey-gasless/issues/224

PS2, in my previous posts I made it work on Ganache and Standalone (private local node with few blocks). Little load, that’s why it worked there.

Result:

Now we are talking!

{"RelayServerAddress":"0x9db576853177397df3a8506a0af007bdd555ef0e","MinGasPrice":500000`000000,"Ready":true,"Version":"0.4.1"} 

:slight_smile: :slight_smile: :slight_smile:

1 Like

Awesome, glad you got it working :confetti_ball: ! That block amount bug must’ve been painful to track.

Your feedback is extremely useful to us, please keep sharing your experiences as you delve deeper into your GSN application!

2 Likes

And then it took me additional few hours to figure that there is another pooling mechanism on JS side when my “increase counter” UI was hanging.

Could we make this configurable in RelayClient?

const relay_lookup_limit_blocks = 1000;
abi_decoder.addABI(relayHubAbi);

NOW, finally the whole thing is setup and works on Lightstreams Sirius test network.

RelayServer to SC: https://explorer.sirius.lightstreams.io/tx/0xc707a2818c84810ef01b9c9d6c3d0d87c13fa1096183ffc0084356caaeabd0ac

Done! Thx for support OZ team.

Now that I have the baseline working I can finally go to implement this feature to some specific app SC for our users :slight_smile:

1 Like

Good find! I opened an issue on the tabookey-gasless repo. We may soon trim some parts of the client our provider doesn't currently need, and patch these small issues as part of that.

2 Likes

Hey guys, I just wanted to let you know the majority of the GSN integration into Lightstreams stack is done and I would like to personally thank you all for the support.

I wrote a quick article and in case you would like me to mention something specific or promote any particular part of OZ then let me know and I will definitely add it to the article!

Have a great week OZ/TabooKey teams!

3 Likes

We are very happy you managed to get it working!!!

1 Like

@lukaslukac would you be interested in creating a Starter Kit to allow your users to get up and running with a complete working demo application on Lightstream?

2 Likes

Thx Dennison.

That’s a good idea. What exactly do you have in mind? A OZ starter kit with a UI configured for Lightstreams like: https://github.com/OpenZeppelin/starter-kit-gsn living in OpenZeppelin Github organization or Lightstreams?

At the moment the only “starter-kit”, more like an example are the following 2 SCs and their tests:

Smart Vault’s ACL Factory

Sample Voter

1 Like