Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Oracle packages and Github verification realm #1568

Merged
merged 53 commits into from
May 7, 2024

Conversation

deelawn
Copy link
Contributor

@deelawn deelawn commented Jan 22, 2024

Relates to #1133

Note: the unit tests are missing from the gnorkle packages. This will not be merged without unit tests. They will be written once the design has been reviewed so no time is wasted writing and rewriting them should it be determined that structural changes need to occur.

Note 2: there are two readme files included in this PR so maybe read those first.

The PR is meant to be a first attempt at implementing a gno package that allows realms to integrate oracle functionality. There is a gh (github) application bundled in this PR that is an oracle and will be able to handle github handle -> gno address verification requests.

Everything at the gno package (/p) level falls within a v1 path because I think this package still has a lot of room for improvements.

Some things that need to be done before marking this ready for review:

  • remove old first iteration code
  • convert newest prototyped code from go to gno and restructure subdirectories for compatibility
  • add more comments and doc strings
  • create readmes
  • add unit tests
  • add gh verification realm tests
  • make a way for the owner or an orkle instance to manage both instance and individual feeds' whitelists
Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Jan 22, 2024
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.36%. Comparing base (dd68d61) to head (189bcfa).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1568      +/-   ##
==========================================
- Coverage   48.44%   48.36%   -0.08%     
==========================================
  Files         409      410       +1     
  Lines       61965    62783     +818     
==========================================
+ Hits        30019    30366     +347     
- Misses      29446    29881     +435     
- Partials     2500     2536      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

agent/devmock/avl/tree.go Outdated Show resolved Hide resolved
@deelawn deelawn changed the title Feat/agents Oracle packages and Github verification realm Jan 23, 2024
@deelawn deelawn changed the title Oracle packages and Github verification realm feat: Oracle packages and Github verification realm Jan 23, 2024
@ajnavarro
Copy link
Contributor

I have a question about this implementation: Maybe I missed something, but, how can you trust the oracle?

In other implementations, several Oracles will provide the same requested information, and the requester is in charge of comparing and checking to discard possible misleading info. Here only one Oracle is in charge of answering the request, right?

Thanks and sorry if I misunderstood something.

@deelawn
Copy link
Contributor Author

deelawn commented Mar 6, 2024

I have a question about this implementation: Maybe I missed something, but, how can you trust the oracle?

In other implementations, several Oracles will provide the same requested information, and the requester is in charge of comparing and checking to discard possible misleading info. Here only one Oracle is in charge of answering the request, right?

Thanks and sorry if I misunderstood something.

You're completely correct; you can't trust the oracle in this first implementation unless you are also the one providing the data. The idea is to build up trust eventually using two strategies:

  1. Data feeds will be able to accept task results from many agents and can aggregate the data, rewarding and penalizing them based on where their responses fall within the range of responses received.
  2. There can be layers of oracles, each aggregating data from multiple agents (data sources). The results of the oracles are then themselves aggregated. A kind of oracle DAO may facilitate this.

Both strategies are just ideas and no one may want to ever try building something like that. It depends on the level of trust an oracle has with the data providers contributing to its feeds. But if someone would like to do that, I think the structure is defined in this package to allow it to happen.

The first big win with this PR is to provide the tools to enable realms to bring offchain data onchain so it can be used in their applications.

Copy link
Member

@moul moul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deelawn
Copy link
Contributor Author

deelawn commented May 1, 2024

thanks Manfred. I will add some unit tests before merging.

@deelawn deelawn requested a review from a team as a code owner May 3, 2024 21:17
@deelawn deelawn merged commit 143fa9c into gnolang:master May 7, 2024
196 of 199 checks passed
@deelawn deelawn deleted the feat/agents branch May 7, 2024 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants