Welcome to the GitHub Lightning Bounties. Lightning Bounty is a groundbreaking project that revolutionizes code collaboration and incentivizes software developers using the power of Bitcoin. By integrating with GitHub Actions, Lightning Bounties automatically pays code contributors in Bitcoin for their valuable contributions to open-source projects.
Name: MIT Bitcoin Hackathon: Scaling Up
Dates: April 19th-21st, 2024
Venue: MIT / Online
We aim to integrate LLMs for analyzing incoming pull requests (PRs) on GitHub. This will cater to various aspects such as security analysis, code quality, and completeness checks. We recognize that LLM API calls have a cost associated, which can escalate with spam PRs. Our solution is a system that employs the Bitcoin Lightning Network to require a small payment for each PR review, thereby filtering spam and covering API costs.
We also believe in rewarding contributors. Hence, payments can be refunded if PRs are accepted, with potential bonuses for merged contributions.
- GitHub Actions: Utilize Python and Node.js scripts.
- LNBits / LND: Basic Lightning node setup.
- Lime-Green: A Python package for LLM evaluations.
- Bring Your Own Setup: Open to additional tools and libraries.
Enrique Gamboa | Will Sutton | Pavel Kononov | Alex Gill | Mike Abramo |
---|---|---|---|---|
GitHub | GitHub | GitHub | GitHub | GitHub |
- Automatic Payments: Contributors receive Bitcoin payments automatically upon merging their pull requests.
- Enhanced Collaboration: Encourages collaboration and fosters a sense of community among developers.
- Secure Transactions: Built-in security measures ensure safe and secure Bitcoin transactions.
- Anti-Spam Mechanism: Contributors are required to submit a small fee to a Lightning Network wallet, preventing spam and ensuring genuine contributions.
Customizable Bounty Payouts: Looking ahead, we aim to give project owners and managers greater control over the bounty payouts on the Lightning Bounty platform. This will allow them to customize the reward amounts based on factors like code quality, complexity, and overall impact of the contributions.
Broader Language Support: While we initially built Lightning Bounty with English and Spanish, we're eager to make our platform as globally accessible as possible. Open source development is a collaborative effort that knows no borders. Contributors from all corners of the world should feel empowered to participate regardless of their native tongue. By increasing language availability, we hope to lower barriers to entry and cultivate an even more diverse pool of talent.
Rewarding Code Contributions with NFTs: Recognizing the potential of non-fungible tokens (NFTs) to serve as digital badges of honor, we aim to integrate an NFT rewards system into the Lightning Bounty platform. This will allow open-source developers who contribute high-quality code to receive free, unique NFTs that they can showcase as proof of their valuable work. By tying these NFTs to specific code contributions, we can create a new level of recognition and ownership for developers within the open-source ecosystem.
Expanding Cryptocurrency Payment Options To further empower open-source developers and increase the accessibility of the Lightning Bounty platform, we plan to integrate support for a wider range of cryptocurrency payment options beyond just Bitcoin. This will include integrating Ethereum, Polygon, & Solana.
Hackathon Winner |
Presentation |
Pitch Deck |
Blueprint |
-
Fork the Repository and Clone it
- Fork the repository on GitHub.
- Clone the forked repository to your local machine.
-
Modify the Code
- Open the
src/main.py
file and make the desired changes to reflect your modifications.
- Open the
-
Generate a Lightning Invoice
- Generate a lightning invoice for the payment.
- Copy the invoice string into the
reward.txt
file.
-
Commit and Submit a Pull Request
- Add and commit your changes to the local repository.
- Submit a pull request to the base repository.
-
Pay the Invoice
- A GitHub action will be triggered to request a "dust" payment from you (the contributor) to the base repository (the owner).
- Choose the action that says "Please pay the invoice: lnbc10n1..." (not the one that says "Extracted values:...").
- Wait for the payment confirmation.
- Once the payment is confirmed, you'll receive a message saying "Thank you for your payment!"
-
Request a Reviewer
- Ask for a reviewer to review your pull request.
- Choose either Enrique or Will for this test.
-
Review and Analysis
- After a few seconds, a new action will run.
- It will first say "Payment has been received, sit tight, running openai query."
- Approximately 30 seconds later, it will return with a summary of your changes and a security vulnerability analysis.
-
Merging the Pull Request
- We'll keep an eye out for your pull request and attempt to merge it for you. As a contributor, you don't have the power to merge it yourself.
Alternatively: If you prefer to replicate our work in your own repository:
-
Copy the contents of the
.github/
directory into your repository. -
Modify the
main.py
file accordingly. -
Set up the following secrets in your repository settings:
OPENAI_API_KEY
PAY_INVOICE_KEY
(admin key for LNBits)WALLET_API_KEY
(invoice/read key for LNBits)WALLET_BASE_URL
(URL for your LNBits instance)