Omar Sy
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Github definition / scoping ## Ressources 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>/.gno with a config.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. ## Proposal 1 1. **Repository Creation** - Users will create a dedicated repository on GitHub with the following format: `github.com/<username>/.gno` - Inside this repository, users will place a `config.yml` file containing necessary information and sign it with their private key. example: ```yaml functions: LinkAccount signatures: xxx public_key: xxxx ``` 2. **User Interaction** - When a user wants to interact with the Oracle, they can: - **GitHub**: Comment on a Gno-related issue in the gno project. - **Discord**: Send a specific message format in a designated Discord channel. 3. **Server Validation** - The Gno server will monitor these interactions thenIt will parse the comments on Gno-related issues, extracting the signed `config.yml` file. - The server will then: - Verify the signature on the `config.yml` file to ensure authenticity. - Validate the content of the `config.yml` for required fields and format. 4. **Data Push to Chain** - Upon successful validation: - The function will be excuted onto the Gno Realm. Cons: Gno will pay the gas ```mermaid sequenceDiagram User ->> Server: Ask github verification Server ->> Github: Get user gno/config.yaml Server ->> Server: Parse to get user address Server ->> Oracle: Push address, githubId ``` ## Proposal 2 1. **Repository Creation** - Users will create a dedicated repository on GitHub with the following format: `github.com/<username>/.gno` - Inside this repository, users will place a `config.yml` file containing necessary information and sign it with their private key. - Example `config.yml`: ```yaml functions: LinkAccount signatures: xxx public_key: xxxx ``` 2. **User Interface** - When a user wants to interact with the Oracle, they can: - Request the server to verify their repository and ask signature. - Provide the necessary information such as repository URL, signed `config.yml`, and desired action. 3. **Server Validation** - The Gno server will parse the request and validate the repository: - It will check the provided repository URL and fetch the signed `config.yml` file. - Verify the signature on the `config.yml` file to ensure authenticity. - Validate the content of the `config.yml` for required fields and format. - If the validation is successful, the server will generate a unique signature for the requested function and argument. 4. **User Interaction with the Oracle** - The server will respond to the user with the signed function and argument, ready for execution on the Gno Realm. - The user can then execute this function on the Gno Realm with the provided signature. 5. **Oracle** - Upon receiving the signed function and argument from the user: - The Gno Realm will verify the provided signature to ensure the request's authenticity. Cons: user will pay the gas ```mermaid sequenceDiagram Server ->> Realm: Add Public Key User ->> Server: Ask github verification Server ->> Github: Get user gno/config.yaml Server ->> Server: Parse to get user address Server ->> User: Signature(address,githubID) User ->> Realm: Push address,githubID, serverSignature ``` ## Some sequence diagram for other flows ### ```mermaid sequenceDiagram User ->> Github: Comment on github Github ->> Bot: User Comment Bot ->> Github: Get user gno/config.yaml Bot ->> Bot: Parse to get user address Bot ->> Oracle: Push adress, githubId, data related to the comment ``` ## Exploration

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully