Wasabi Wallet Documentation

From a hosting perspective, it’s all very simple. Basically, the SourceCred frontend is all self-contained; it just needs any HTTP server to provide the webapp along with some static JSON, but there’s no back-end. Which means that you can host a SourceCred instance anywhere you like; I personally tend to host instances on GitHub pages.

I would recommend making a new repository like zkSNACKs/WasabiDocCred, and set it up so that it hosts on GitHub pages. Then we can add an update script to that repo, and whenever the script is invoked, it will run SourceCred on zkSNACKs/WasabiDoc, and save the resultant frontend into the WasabiDocCred repo. Then you (or whoever is running it) can review it, commit it, and push it to GitHub pages. (Or you can just connect it to a cron job and have it automatically update every day; I think that @Beanow did something like that for SFOSC’s cred.)

A simple implementation of the script could be that it sets up SourceCred as a submodule, runs yarn to install the deps, and then calls ./sourcecred/scripts/build_static_site.sh --target . --project zkSNACKs/WasabiDoc. Though we’d want to add a bit more complexity to get stuff like caching of the data from GitHub… I’ll be happy to help set it up.

SourceCred also has a CLI command for getting the scores programattically. So at the end of the month you could use that to get the exact scores so as to divide up the bitcoin according to cred.

There’s also the issue of getting the lines of code weights integrated. It sounds like using the LOC weighting is a pretty big improvement from your perspective, so we should make sure it’s included in your instance. For the prototype in this thread, I implemented line of code weighting in a hacky way. It works, but before merging into master I will want to refactor it into a more maintainable solution. That said, there’s nothing stopping you from using the same prototype for now. It works, it will just add a bit more complexity to the update script; and we could easily migrate off the prototype and onto master once I merge official support.

But overall, I’d say: if you want to set up SourceCred on WasabiDoc tomorrow, we could make it happen. :smile: Let me know what your timeline is. Also, you can spend some time playing with the weights on any of the instances above, if you find settings you like we can canoncialize them for your project.

1 Like