{"id":17490778,"url":"https://github.com/valentinmadrid/waverider","last_synced_at":"2025-05-06T06:31:45.156Z","repository":{"id":218586335,"uuid":"635457464","full_name":"valentinmadrid/waverider","owner":"valentinmadrid","description":"Geyser plugin that streams Solana account changes to PostgREST","archived":false,"fork":false,"pushed_at":"2024-01-22T19:16:55.000Z","size":6916,"stargazers_count":45,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T09:39:47.475Z","etag":null,"topics":["accounts","geyser","solana","supabase"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valentinmadrid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-02T18:30:39.000Z","updated_at":"2025-03-24T11:21:42.000Z","dependencies_parsed_at":"2024-01-22T23:11:37.627Z","dependency_job_id":"332a5067-37aa-4a4f-9d55-4390779dd9cb","html_url":"https://github.com/valentinmadrid/waverider","commit_stats":null,"previous_names":["nautilus-project/waverider","valentinmadrid/waverider"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentinmadrid%2Fwaverider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentinmadrid%2Fwaverider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentinmadrid%2Fwaverider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentinmadrid%2Fwaverider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valentinmadrid","download_url":"https://codeload.github.com/valentinmadrid/waverider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252633657,"owners_count":21779898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accounts","geyser","solana","supabase"],"created_at":"2024-10-19T07:01:12.385Z","updated_at":"2025-05-06T06:31:44.815Z","avatar_url":"https://github.com/valentinmadrid.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Waverider 🌊\n*Waverider is a Solana Geyser Plugin streaming account Data to a PostgREST Server*\n\n## How does it work ?\nAt a high level, Waverider allows you to specify a set of programs, from which you want the accounts (PDA's) to be streamed to your Postgres database.\n\nWaverider is divided into two plugins, one called \"default\" and the other \"atlantic\".\nThe difference between the two is that atlantic is also built to stream deserialized data to the database, while the default one only contains the raw data buffer.\n\n### Use-cases\n\n- Speed: Making a SQL Query to a Postgres database can be up to 10 times faster than using gPa (getProgramAccounts) calls.\n- Realtime: We can benefit from Supabase's realtime infrastructure to stream Realtime account updates to dApp frontends.\n- Filtering: With the atlantic plugin, we can directly filter on chain data with a SQL Query, instead of having to use gPa Filters.\n\n### Demo\n\nWalktrough of Waverider streaming deserialized account data to a Supabase instance.\n\nhttps://user-images.githubusercontent.com/94240868/236879119-5b4f104d-9741-46bc-803a-2865e54a63cd.mp4\n\n## Getting started\n\n### Clone Waverider\n\n```\ngit clone https://github.com/nautilus-project/waverider.git\ncd waverider\n```\n\n### Setting up the default Plugin\n\n1. __Build the Plugin__\n\n```\nyarn build-default\n```\n\n2. __Set up your database__\n\nThis plugin works with every PostgREST Server, although i recommend you set up a Supabase instance. They have a generous free tier, but can also be self hosted for completely free.\n\nTake the SQL Script at [config/default.sql](https://github.com/nautilus-project/waverider/blob/main/config/default.sql) and run it in your database, either via the CLI or a GUI(Supabase web GUI).\n\nIf you are using Supabase, also make sure to turn off Row Level Security for the accounts table, you can do this via the UI.\n\n3. __Fill the configuration file__\n\nIf you are a mac user, open `config/config.default.mac.json`. If you are on Windows or Linux, open `config/config.default.json`.\nFill out these fields:\n\n```json\n{\n  // Your supabase REST API URL (starting with https//). Don't forget the /rest/v1 at the end\n  \"supabase_url\": \"\u003curl\u003e/rest/v1\",\n  // Your Supabase Annon Key\n  \"supabase_key\": \"\u003ckey\u003e\",\n  // The programs you want to index accounts from\n  \"programs\": [\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\"]\n}\n```\n\n4. __Launch your validator with the plugin__\n\nWe'll use a local validator for this example, but this can be attached to a main/test/devnet validator.\n\n⚠️ Important: You HAVE to run the Solana Toolsuite (CLI) with the same version as this scripts Plugin Interface(view in Cargo.toml), and need to run the Plugin with the same Rust version you have built your Solana Toolsuite.\n\nFor mac users, run: `solana-test-validator --geyser-plugin-config config/config.default.mac.json`.\n\nFor Linux/Windows users, run: `solana-test-validator --geyser-plugin-config config/config.default.json`.\n\n### Running the atlantic Plugin\n\nIf you want deserialized data to be streamed to your accounts, it's going to take a little glass chewing.\n\nFirst, you'll have to define your structs in the `plugin.rs` file. Then, get your accounts discriminators and add them as if statements into the code. The if statements should be like: `if the first 8 bytes of the Geyser plugin Interface account data are equal to your structs discriminator, run YourStruct::deserialize. Then specify the table name where you want this data to be written to.` Keep in mind that you will have to create the SQL schema yourself based on your Account Structs.\n\nI'm going to specify more documentation to this topic soon. Feel free to contribute any ideas on how to make this process easier.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentinmadrid%2Fwaverider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalentinmadrid%2Fwaverider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentinmadrid%2Fwaverider/lists"}