META GitHub oracle & `r/gh`
Revisiting our previous discussions on the GitHub oracle idea, I'd like to delve deeper into some specifics and potential enhancements.
To recap, the oracle, comprising certain contracts and an external bot, aims to translate select GitHub metrics onto the chain, rendering them usable in our on-chain ecosystem.
While I've shared my skepticism about GitHub being the sole platform for evaluations and score/token allocations, I remain steadfast in treating GitHub as a reliable data source. It's essential we maintain its widely recognized URIs for consistency.
Elaborating further:
- On-Chain Reflection of Issues and PRs: I propose that we mirror essential data from GitHub, such as titles, statuses (open, closed, merged), URIs, and some metadata. Visualize it like this:
import "gno.land/r/github"
issue := github.IssueByID("gnolang/gno#4242")
println(issue.Title, issue.State)
This allows on-chain management and tracking that's interlinked with GitHub issues. As @waymobetta and @MichaelFrazzy have been exploring similar territory, I'd like to emphasize: - We shouldn't treat GitHub activities as direct equivalents to scores. While these metrics can guide score determinations, human oversight is vital to ensure fairness and counteract potential manipulation. - The focus shouldn't be restricted to "merged PRs." Open issues, valuable but closed PRs, and other meaningful contributions deserve recognition.
-
Two-Way Data Flow: While our bot can translate GitHub activities on-chain, the opposite should be feasible too. It can monitor on-chain events and mirror these as comments on GitHub issues and PRs.
-
GitHub and Gno Account Linkage: As discussed, users can create a repository like
github.com/<username>/.gnowith aconfig.yml, signed with their private key. An on-chain transaction like:
gnokey maketx gno.land/r/github -func LinkAccount -args moul -args sig(moul)`
can create a robust two-way connection, broadening our interaction possibilities, such as a bot commenting on GitHub issues/PRs.
I believe refining these concepts can significantly enhance our integration and workflow.
Edit: bootstrapping foundations here: https://github.com/gnolang/gno/pull/1134
@waymobetta
Who will provide oracle service for gno.land in this case?
Who will provide oracle service for gno.land in this case?
It'd be really cool to have a native solution, but absolute worst case I have friends at Chainlink
A quick update on the needs we can expect from the GitHub realm, oracle, and bot:
Essentially, we require a GitHub realm for the following purposes:
- Allowing an oracle to notify the blockchain about off-chain events. In the case of GitHub, this would involve linking on-chain contributions with pull requests (PRs) and potentially including other information related to issues.
- Enabling semi-automated contribution review/annotation.
- Facilitating the development of GitHub bots that can respond and update GitHub issues and PRs based on on-chain activities.
- Establishing a bi-directional link between a GitHub account and a GNO account, similar to how Keybase used to do it.
- Enabling the creation of a GitHub faucet. This would allow us, after the launch, to attract not only Cosmos citizens through the current airdrop, but also developers. Developers would be a better early target than web3 DeFi users for the initial use cases of the chain. -> this one will have its own issue, soon. cc @MichaelFrazzy
This PR is the WIP for a both a github oracle realm and package to integrate generalized oracle functionality into realms. Wi need to clean it up a bit before it is ready for review. https://github.com/gnolang/gno/pull/1568