{"id":18493024,"url":"https://github.com/graphprotocol/ens-rainbow","last_synced_at":"2025-07-30T18:06:07.429Z","repository":{"id":43018844,"uuid":"182834972","full_name":"graphprotocol/ens-rainbow","owner":"graphprotocol","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-30T18:28:20.000Z","size":14,"stargazers_count":22,"open_issues_count":4,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T16:50:36.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/graphprotocol.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-22T17:26:34.000Z","updated_at":"2023-08-29T16:39:58.000Z","dependencies_parsed_at":"2024-11-06T13:12:27.502Z","dependency_job_id":"0fc703b1-4c71-40c4-b60e-a0eac5ec96f3","html_url":"https://github.com/graphprotocol/ens-rainbow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/graphprotocol/ens-rainbow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fens-rainbow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fens-rainbow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fens-rainbow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fens-rainbow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphprotocol","download_url":"https://codeload.github.com/graphprotocol/ens-rainbow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fens-rainbow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267913616,"owners_count":24164563,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-06T13:12:17.577Z","updated_at":"2025-07-30T18:06:07.159Z","avatar_url":"https://github.com/graphprotocol.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Importing the rainbow tables\n\nYou will need an already initialized `graph-node` database. You will also\nneed to be able to run `psql` and connect to the `graph-node` database. If\nyour database is sharded, this data needs to be imported into the primary\ndatabase\n\n#### Download the SQL dump file from Goolge cloud storage:\n  * Compressed with `gzip` (5.9 GB):\n    [ens_names.sql.gz](https://storage.cloud.google.com/ens-files/ens_names.sql.gz) ([sha256](https://storage.googleapis.com/ens-files/ens_names.sql.gz.sha256sum))\n  * Compressed with `zstd` (5.6 GB):\n    [ens_names.sql.zst](https://storage.googleapis.com/ens-files/ens_names.sql.zst) ([sha256](https://storage.googleapis.com/ens-files/ens_names.sql.zst.sha256sum))\n\n#### Import the dump:\n\nThe `psql` command for the import has to be run as the same user as the\nuser that `graph-node` uses to connect to the database.\n\n```\nzcat ens_names.sql.gz | psql graph\n```\nor\n```\nzstdcat ens_names.sql.zst | psql graph\n```\n\n## Data preparation\n\nThese are the steps to generate the `ens_names.sql.gz` file, and are not\nneeded for just importing that data.\n\nConvert ENS's rainbow table data into a SQL script that we can ingest with\n`psql`, similar to a plain text dump from `pg_dump`.\n\nDownload input for rainbow tables via `gsutil cp gs://ens-files/preimages/* .`\n\nRun this as `cat preimages-* | cargo run --release | gzip \u003e data.sql`.\n\nTakes a while (10 minutes) on my machine and results in a 6GB file (133M entities)\n\n### Exporting the prepared data:\n```\npg_dump -c -x -O --if-exists --no-tablespaces -t ens_names -f /var/tmp/ens_names.sql.gz -Z9\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fens-rainbow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphprotocol%2Fens-rainbow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fens-rainbow/lists"}