GL1X · GenesisL1 explorer

GL1X docs · Operators

Operations

How to install, configure, size, scale, upgrade and watch a GL1X server. GL1X is one binary (/usr/local/bin/gl1x), one PostgreSQL database and nginx; its settings are one file (/etc/gl1x/gl1x.env).

Install #

Debian 12 or Ubuntu 22.04/24.04, x86_64 or arm64. For all of GenesisL1's history plan on 8 GB of RAM or more and an SSD with 100 GB free.

tar xzf gl1x-3.6.0.tar.gz && cd gl1x
sudo ./install.sh --domain explorer.example.org --email you@example.org

The installer sets up, and nothing else: PostgreSQL 17 (tuned for the machine, its own gl1x database and user with a random password), kernel settings for many connections (/etc/sysctl.d/60-gl1x.conf), the binary and its systemd services (gl1x, gl1x-supply, and gl1x-web@N on large machines), /etc/gl1x/gl1x.env with GenesisL1's ranges and endpoints and a random admin token, nginx in front (next to any sites it already serves), and with --domain the HTTPS site with a Let's Encrypt certificate obtained by GL1X itself and renewed by gl1x-cert.timer. It prints the admin token at the end; sudo gl1x admin-token shows it again.

OptionEffect
--domain NAMEthe public HTTPS site for NAME (ports 80 and 443)
--email ADDRESSLet's Encrypt contact (optional)
--public-ip [ADDRESS]public over plain HTTP on the server's address, before a domain points at it
--localthis machine only (http://127.0.0.1/)
--web-workers Nindexing in gl1x, N web processes gl1x-web@1…N (auto: the installer chooses, 0: one process)
--db-read URLthe API's reads from a PostgreSQL hot standby
--web-only --db URLan extra web server for an existing database (no PostgreSQL, no indexing)
--listen ADDRwhere GL1X itself listens (default 127.0.0.1:8080)
--no-nginxno nginx; GL1X answers on --listen

Upgrade: run the new bundle's install.sh with the same options. Settings, data, the admin token, the domain and the layout are kept; a database layout change is converted in place, in one transaction, and the previous binary is put back if anything fails.

Upgrading to 2.9.0 adds the ligand index: two columns of molecular_structures (ligands, ligands_derivation, added without rewriting the table) and two tables, molecular_ligands and molecular_ligand_components. Structures read from then on keep their ligands as they are read; those read before are read again for them by the structure queue's free workers when it has nothing else to read, experimental structures first, their chains, GSA and comparisons kept as they are. Nothing needs to be set: GL1X_STRUCTURE_WORKERS=0 stops it with the rest of the structure queue, and the admin's Bio tab follows it.

Upgrading to 3.0.0 adds the full-atom analysis: columns of molecular_structures and molecular_chains3d (added without rewriting the tables), the ligands' occupancy, and three tables, molecular_interfaces, molecular_pockets and molecular_ptms. Structures read from then on are analysed as they are read; those read before are read again by the structure queue's free workers when it has nothing else to read, experimental structures first, and analysed (DSSP, accessibility, side-chain points, interfaces, pockets, base pairs, modifications, and their ligands again at 4.5 Å). A structure takes about a third of a second to analyse on one CPU (two seconds for a ribosome), so fetching the files again sets the pace; the admin's Bio tab shows how many are left. A record opened before its turn (in the workbench, through the API or MCP) is analysed on the spot; the archive searches (pockets, interfaces, patterns, templates, modifications) cover the structures analysed so far. Nothing needs to be set.

Upgrading to 3.1.0 adds a column to molecular_records, changed_at (when what a record's page shows last changed: a reading that changes something, kept by a trigger, so the weekly refresh that finds nothing new leaves it alone, and its structure read or analysed), with an index, and three settings for IndexNow, which starts on its own when GL1X_PUBLIC_URL is a public https address that serves this install's key. The first run sends the explorer's pages; the archive's records, ligands and proteins follow over the next days within GL1X_INDEXNOW_DAILY. Verify the site with the search engines on the admin's Site tab and submit /sitemap.xml there.

Upgrading to 3.5.0 gives every MolNFT record a page address of its own, /molnft/{PDB ID, accession or name} (record addresses), kept in a new table, molnft_slugs. The first process to start gives the records already indexed theirs in the background (under a minute for a million records; the log says how many, collection by collection), and the records indexed from then on get theirs as they are written; until it is done, pages link records at their token pages, which then answer 301 to the addresses. Every five minutes the processes that migrate the database look for records written without an address and give them theirs. A new install gives the addresses once its molecular index has read the collections through (the log says so when it starts waiting). The sitemaps list the records at their addresses and IndexNow sends the archive once more, within GL1X_INDEXNOW_DAILY; nothing needs to be set. Each web process keeps the addresses in memory (about 12 bytes a record) and reads the new ones every 20 seconds.

Upgrading to 3.6.0 gives every MolNFT record its molecule's picture and adds the collections page, /molnft (collections and pictures). A MolNFT v2 record's picture is its own, read from the chain; a MolNFT v1 record's is drawn from its structure the first time anyone asks for it and kept in GL1X_DATA_DIR/picture-cache, shared by the web processes on one machine, half a year. GL1X_PICTURE_CACHE_MB sets the disk it may take: auto (the default) is a quarter of the disk free when the process starts, at most 40 GB — the pictures of a million records take about 30 GB — and the log says how much; a number of MB; 0 keeps them in memory only. Nothing is migrated and nothing needs to be set: from two minutes after a web process starts, the archive's pictures are made in the background, one at a time and out of visitors' way, by one process of the layout at a time (every half hour it looks for records minted since; up to nine tenths of the cache, so pictures visitors look at are never pushed out for it; the log counts what each pass made; GL1X_PICTURE_WARM=off leaves each to be made when first asked for). A picture asked for before its turn is made at once (0.1–0.2 s once the structure is read, a few at once with drawing slots of their own; past 256 waiting, a request is answered 503 picture_busy with Retry-After). Link previews are drawn again (their addresses end ?v=3), so services that keep previews fetch the new ones: every page has its own. A cache in front (the nginx of the installer) may keep /molnft/{id}/picture.jpg and /api/bio/records/{contract}/{token}/picture a day, as their answers say.

Settings #

Every setting is an environment variable in /etc/gl1x/gl1x.env (deploy/gl1x.env.example documents them all). Restart after editing: sudo systemctl restart gl1x gl1x-supply (and gl1x-web@*). Ranges and live endpoints are copied into the database on first start and managed on the admin page afterwards.

Core #

SettingDefaultMeaning
GL1X_DB(installer)PostgreSQL URL
GL1X_DB_READ—a hot standby for the API's reads
GL1X_ADMIN_TOKEN(installer)the admin page's token
GL1X_LISTEN, GL1X_SUPPLY_LISTEN127.0.0.1:8080, :8081addresses of the web and supply servers
GL1X_PUBLIC_URLthe public address: every page's canonical address and preview image, the sitemaps, robots.txt, the MCP description. Set it to the address visitors use (https://gl1x.com)
GL1X_DATA_DIR/var/lib/gl1xprocess history, crash reports, data
GL1X_ROLE, GL1X_MIGRATE, GL1X_WEB_WORKERSall, on, 0layout (set by the installer)
GL1X_UIbuiltinthe built-in interface (pages: GL1X's server-rendered pages)

Chain and indexing #

SettingDefaultMeaning
GL1X_EVM_RANGESGenesisL1'sEVM ranges: FROM-TO URL[,BACKUP…] [rps=N] [batch=N] [workers=N] [trace=on/off], separated by ;
GL1X_EVM_LIVE_RPChttps://rpc.genesisl1.orgnode for live reads (balances, contract reads)
GL1X_EVM_GENERATION_BOUNDARIES2000000where the hash chain restarts
GL1X_COSMOS_RANGES, GL1X_COMET_RPC, GL1X_LCDGenesisL1'sCosmos ranges and live endpoints
GL1X_LIVE_JUMP200how far behind the live lane may fall before it jumps to the head
GL1X_WORKERS, GL1X_BATCH_BLOCKS4, 25default workers and batch per range
GL1X_TRACE, GL1X_TRACE_HEAVYon, oncall traces, and those of heavy blocks
GL1X_RPC_TIMEOUT45sone node request (batches that take longer are split)
GL1X_HEAVY_BLOCK_BYTES, GL1X_BATCH_BYTES, GL1X_HEAVY_WORKERS256 KiB, 2 MiB, 2heavy-block lane
GL1X_BLOB_MAX16384larger inputs and log data keep their first 1 KB; the rest is read from the node on demand
GL1X_CHAIN_ID, GL1X_COSMOS_CHAIN_ID, GL1X_NETWORK, GL1X_COIN…, GL1X_DENOM, GL1X_BECH32_PREFIXGenesisL1'schain identity and units

Science #

SettingDefaultMeaning
GL1X_MOLECULAR_INDEXonthe MolNFT molecular indexer
GL1X_MOLECULAR_WORKERSautotune 6–16records read at once
GL1X_IPFS_GATEWAYS, GL1X_IPFS_TRUSTLESS_GATEWAYSsee the templateIPFS gateways for content and for raw blocks (proofs)
GL1X_BLAST, GL1X_BLAST_…onBLAST databases, threads, concurrency, queue, limits, cache, refresh (BLAST)
GL1X_STRUCTURE_WORKERSautotune 4–16structure files read at once (0: none); when there is nothing else to read, the same workers read older structures again for their ligands (Ligand index)
GL1X_HEADER_RATE120experimental structures read before 3.4.0 read again a minute, about, for their biological assemblies and observed accessions, by a third of the structure workers the queue leaves (Structures); off or 0 stops it
GL1X_STRUCTURE_CACHE_MB2048structure files kept once read, on disk in GL1X_DATA_DIR/structure-cache and shared by the web processes (0: no cache): a large on-chain structure is read from the node once, not for every viewer (Serving structure files)
GL1X_PICTURE_CACHE_MBautoMolNFT records' pictures kept once made (read from the chain, or drawn from the structure), on disk in GL1X_DATA_DIR/picture-cache and shared by the web processes, each kept half a year: auto takes a quarter of the disk free at start, at most 40 GB (about 30 GB hold a million records' pictures); a number of MB; 0: in memory only, 32 MB a process (Collections and pictures)
GL1X_PICTURE_WARMonthe web processes make MolNFT records' pictures in the background before anyone asks, one at a time and out of visitors' way, one process of a layout at a time, up to nine tenths of the picture cache; off: each is made when first asked for
GL1X_STRUCTURE_SEARCH, GL1X_STRUCTURE_CONCURRENCY, GL1X_STRUCTURE_TIMEOUT, GL1X_STRUCTURE_MAX_UPLOAD_MBon, auto, 120s, 20structure search and alignment (Structures)
GL1X_STRUCTURE_TEMPLATESonthe CA and side-chain points of every analysed protein chain in memory, for 3D templates and the geometry of secondary-structure patterns (Structure analysis); off saves that memory and turns those two searches off

PubMed #

SettingDefaultMeaning
GL1X_PUBMEDonthe PubMed search page, its API routes and the MCP tool pubmed_search (off: the routes answer 503, the tool is not offered, and the interface leaves out the menu entry and the structures' PubMed links)
GL1X_NCBI_API_KEY—an NCBI API key (free, from an NCBI account's settings): NCBI's limit rises from 3 to 10 requests a second for the whole site (GL1X uses 9). It is added on the server and never reaches a browser
GL1X_NCBI_EMAIL—the contact NCBI asks tools to give with tool=gl1x, so NCBI can write before it blocks a site that misbehaves
GL1X_NCBI_EUTILShttps://eutils.ncbi.nlm.nih.gov/entrez/eutils/the E-utilities address

The server must reach eutils.ncbi.nlm.nih.gov on port 443. The rate is shared by the web processes (each takes its part), answers are cached in memory for 30 minutes (searches) and 24 hours (records), and the installed nginx configuration keeps /api/bio/pubmed/ out of its access log and its cache (PubMed search). What the search page starts with (the clustering algorithm, the map, the records a search fetches) is set on the admin's Site tab, not in the environment (Admin).

Dapps, prices and visitors #

SettingDefaultMeaning
GL1X_DAPP_RPCGL1X_EVM_LIVE_RPCa node whose gas cap allows inference read calls (2,000,000,000 gas)
GL1X_GL1F_CRYPTO_MCPcrypto.gl1f.com's"Ask the official engine" (off: only the in-browser engine)
GL1X_CHESS_CONTRACTChessPolicyNetV1the chess network
GL1X_CIPNFT_CONTRACTthe CIPNFT contractthe encrypted NFTs the CIPNFT dapp reads (off: no CIPNFT dapp)
GL1X_COINGECKO_ID, GL1X_COINGECKO_KEY, GL1X_PRICE_CURRENCIESgenesisl1, —, 20 currenciesprices
GL1X_WALLET_RPChttps://rpc.genesisl1.orgpublic RPC offered to visitors
GL1X_API_RPS, GL1X_API_BURST40, 120per-client limit on uncached API answers
GL1X_NFT_METADATAonNFT metadata reads

Capacity #

SettingDefaultMeaning
GL1X_AUTOTUNEonsizes left unset follow the machine (gl1x tune prints them)
GL1X_CACHE_MBRAM/16 per web process, 128 MB–4 GBcached API answers
GL1X_MAX_INFLIGHT, GL1X_QUEUE_WAIT4 per CPU (64–512), 5suncached work at once, and the wait for a slot
GL1X_LIVE_INFLIGHT16–48node reads for pages at once
GL1X_DB_MAX_CONNS, GL1X_DB_PREPARE3 per CPU (40–160), ondatabase pools
GL1X_GOGC, GL1X_MEMORY_LIMIT_MB200–400, a quarter of the RAMgarbage collector
GL1X_PPROF—profiles on a local address

Front and HTTPS #

SettingDefaultMeaning
GL1X_NGINX, GL1X_DOMAIN, GL1X_ACME_EMAILon, —, —nginx in front, the public domain, the ACME contact
GL1X_ACME_URL, GL1X_CERT_TEST, GL1X_CERT_RELOADLet's Encrypt, nginx -t -q, reload nginxcertificate renewal

Search engines #

SettingDefaultMeaning
GL1X_INDEXNOWautoIndexNow: the indexing process tells Bing, Yandex, Naver, Seznam, Yep and Amazon which pages are new or changed (auto: on when GL1X_PUBLIC_URL is a public https address; on; off). Nothing is sent until the site answers at GL1X_PUBLIC_URL with its key file
GL1X_INDEXNOW_DAILY10000addresses sent a day at most (100–1,000,000); a tenth of each day is kept for changes while the archive is sent
GL1X_INDEXNOW_ENDPOINThttps://api.indexnow.org/indexnowwhere submissions go
GL1X_WEBSUBautoWebSub, for Google, which reads no IndexNow: /feed.atom names a hub, and the indexing process tells the hub when the feed has new pages, at most every ten minutes (auto: on when GL1X_PUBLIC_URL is a public https address; on; off). Nothing is told until the site answers at GL1X_PUBLIC_URL with its key file, as for IndexNow
GL1X_WEBSUB_HUBhttps://pubsubhubbub.appspot.com/the hub (Google's)

Every page is served with its own title, description, canonical address, structured data and HTML for crawlers, and /sitemap.xml lists them (API). To be found: set GL1X_PUBLIC_URL to the address visitors use, verify the site in Google Search Console and Bing Webmaster Tools (Yandex and Baidu where your visitors search) with the codes they give, entered on the admin's Site tab, and submit https://YOUR-DOMAIN/sitemap.xml there (and, in Search Console, https://YOUR-DOMAIN/feed.atom: robots.txt names both). Google reads the sitemaps and the feed of new and changed pages, and hears from the feed's WebSub hub when it has something new; the IndexNow engines hear of each new record, validator change, proposal, model and documentation page as it comes.

Sizing #

With GL1X_AUTOTUNE on, sizes not set in the file follow the machine at every start: database pools, uncached computations, the response cache, BLAST concurrency and answer cache, molecular indexer workers, garbage collector pace. The installer sizes PostgreSQL (shared buffers a quarter of the RAM, in huge pages from 8 GB, workers from the CPUs, max_connections from what the processes may open) and the kernel, and on 32 CPUs and 64 GB or more splits serving into web processes. gl1x tune prints every choice; the admin page shows them under Traffic.

Memory for the science, per web process: the BLAST databases take about the size of the sequences (123 million letters: a little over that in bytes, plus the answer cache); the structure index 2 bytes per residue of indexed protein chains, and 6 more per analysed residue for 3D templates (GL1X_STRUCTURE_TEMPLATES; about 0.7 GB for 120 million residues). The archive's peptide index, which spectrum searches against the whole archive use, is built on the first such search (about 3 bytes per protein letter: 240 MB and 8 seconds for 75 million letters on two CPUs) and let go after 20 minutes unused. Work over the whole archive (peptide uniqueness, spectrum searches against the archive, alignments, clustering, HMM searches) runs two at a time per process; up to 16 requests wait for their turn, each at most 30 seconds, and more are refused at once (503 analysis_busy); couplings (DCA) run as jobs, one at a time, with four queued or running at most (API). The totals on the Bioinformatics onchain page are counted at most every ten minutes.

Scaling out #

  • --web-workers N: indexing apart from N web processes sharing the port.
  • --db-read URL: the API's reads from a hot standby (hot_standby_feedback = on there).
  • --web-only --db URL: extra web servers for the same database, behind a load balancer or DNS; each holds its own caches, BLAST databases and structure index; chess games and settings are shared through the database.
  • Each server has its own nginx; /_gl1x/health answers a load balancer from a check made every two seconds.

Database #

The schema lives in internal/store/schema.sql and is migrated on start (GL1X_MIGRATE). gl1x dbinfo and the admin's Database tab show sizes per table and index, the cache hit ratio, dead rows, the most expensive statements and the settings in effect. Back up with PostgreSQL's tools (pg_dump -Fc gl1x or a base backup with WAL archiving); everything GL1X needs is in the database and /etc/gl1x. The indexed data can always be rebuilt from the chain.

Monitoring #

WhereWhat
/adminprocesses, indexing per range, backlogs, endpoints, traffic, the BLAST databases; tabs for ranges, database, Bio, site, UI (Admin guide)
/api/healththe explorer's live and background state (200 unless the database is down)
/_gl1x/healtha load balancer's check
/_gl1x/metricsPrometheus metrics of each process (requests, cache, shed requests, gates, database pool, memory), to the machine itself or with the admin token
/api/bio/status, /api/bio/structure, /api/bio/blast/db, /api/bio/ligands?limit=1the molecular indexer, the structure index, the BLAST databases, the ligand index (coverage: structures read for their ligands and still to read)
/sitemap.xml, /robots.txt, /api/meta?path=…what search engines are given: the sitemaps, the crawling rules, a page's title, description, preview and structured data (API)
journalctl -u gl1xlogs (journald capped at 2 GB)

When a node stops. A node whose own sync stopped keeps answering with its last block, or stops answering at all, and the lane that reads it stands still. GL1X tells such a lane from a current one by the time its node's head last moved: after three minutes without a newer block the lane is stalled, and a lane that trails the head the other node reports by 50 blocks or more is behind (on GenesisL1 a Cosmos height and an EVM block number are the same block). /api/indexer/status gives each live range's status (stalled, endpoint_behind), head_updated_at and behind_chain; /api/cosmos/status has a freshness block; the admin page shows when the head last moved. A stalled Cosmos node leaves the EVM ledger current: /api/health says degraded and the interface "Live ledger needs attention"; /api/stats sets partial and names what is not current in stale (a chain-state snapshot whose sync failed, the Cosmos blocks); /api/v1/supply adds stale: true while the LCD does not answer. When the node's head moves again, the blocks the lane parked while it was stuck are retried at once instead of after their backoff (up to an hour, which the home page shows as "Retrying"). Restart or resync the node, or give it a second endpoint: GL1X_COMET_RPC and GL1X_LCD take comma-separated URLs (the first preferred, the others for failover), and each range has its own pool on Ranges and endpoints.

Commands #

gl1x status                     coverage per range, head, rate, parked ranges
gl1x admin-token                the admin page token (run with sudo)
gl1x dbinfo                     table and index sizes, cache hit ratio, settings, slowest statements
gl1x reindex FROM TO            drop a range; the running indexer refills it
gl1x name 0x… "Name"            public address name ("" removes it)
gl1x token-icon 0x… URL         token icon
gl1x hide-token 0x…             hide a token from lists
gl1x supply                     standalone supply server (the gl1x-supply unit)
gl1x mcp --url https://…/mcp    MCP over stdio for a local AI agent
gl1x tune [-workers N]          the sizes GL1X chooses for this machine
gl1x cert status|renew          HTTPS certificates
gl1x version                    the version

Troubleshooting #

SymptomLook at
"Live ledger: Unavailable"the admin's endpoints table: the live node's errors and latency
Indexing stalls on a rangeParked ranges on the admin page (the error, the next retry, Retry now); heavy blocks waiting
BLAST answers 503the databases are loading after a start (/api/bio/blast/db), or every slot is busy (admin Traffic, GL1X_BLAST_CONCURRENCY)
Structure search answers "still loading"the structure index is being built in that web process; the Bio tab shows its state
A 3D view says the structure "is still being read from the chain"a large on-chain structure read for the first time: the read goes on and the viewer asks again by itself; once read, the file is served from the structure cache (GL1X_STRUCTURE_CACHE_MB, /api/bio/status → structure_cache). It takes long when the live node (GL1X_EVM_LIVE_RPC) is slow to return contract state (Serving structure files)
Proofs say "not verified"the proof's answer names the failing call or IPFS gateway; the node may not keep the pinned block, or the gateways may not serve raw blocks
A process restartsthe admin's Processes panel: how its previous run ended, with the crash report
Pages answer 502 for a momenta web process restarting (upgrades restart them one at a time)
Link previews show the wrong address or no imageGL1X_PUBLIC_URL (canonical addresses and og:image are built from it); curl -sI https://YOUR-DOMAIN/og/index.png; services that keep previews (Telegram, X, Facebook, LinkedIn, Slack) refresh them on their own schedule or with their tools (Telegram: send the link to @WebpageBot; Facebook: the Sharing Debugger)
A page answers 404an address that is no page of the interface, or a record not in the index (yet): the interface still runs and says so, and search engines are told not to list it
IndexNow sends nothingthe admin's Site tab: "not served at the public address" means GL1X_PUBLIC_URL/{key}.txt does not answer with this install's key (the address is not this site's, or the site is not reachable from the server itself); it is checked again every 15 minutes
IndexNow refuses submissionsthe admin's Site tab shows the last refusal and the next try: 403, the engines could not read the key file (/{key}.txt) at GL1X_PUBLIC_URL; 422, addresses that are not on that host; 429, too many at once (the submitter waits an hour)
The WebSub hub is told nothingthe admin's Site tab: as for IndexNow, GL1X_PUBLIC_URL/{key}.txt must answer with this install's key; the hub hears of changes six minutes old or more, at most every ten minutes
The WebSub hub failsthe admin's Site tab shows the hub's answer; the hub fetches GL1X_PUBLIC_URL/feed.atom itself, so that address must answer from the internet; the next round tries again
Pages answer 503a record page whose record cannot be read within 2.5 seconds (the database or the node is slow or down), and was not read before, answers 503 with Retry-After: 30, so crawlers come back instead of indexing an empty page; the reading goes on for the next request, a page read before is served as it was, and the interface still runs. Look at the database (gl1x dbinfo, the admin's Database tab) and the nodes (Endpoints on the admin's Indexing tab)

GL1X is a live explorer of the GenesisL1 blockchain. Turn on JavaScript for search, charts and interactive views.