mirror of
https://github.com/logos-co/logos-evm-token-list-module.git
synced 2026-08-27 04:11:06 +00:00
main
The previous commit broke CI on main here, and the mechanism is worth recording.
Measured, by asking each cache for the path that failed in keystore-module
(the same class of path fails in every Rust-building repo):
logos-co.cachix.org 200 <- present
cache.nix.logos.co/public 404
cache.nix.logos.co/ci 404
cache.nixos.org 404
The failing path is a fixed-output fetch of a crates.io tarball
(crate-alloy-eip7928-0.3.4.tar.gz). With Cachix in the substituters CI never
performed that fetch -- it downloaded the finished path. Dropping Cachix
therefore did not merely cost cache hits: it made CI attempt the fetch for the
first time, and it fails there in ~7 minutes, taking cargo-vendor-dir and the
whole module with it.
The crate itself is healthy: that URL returns 20373 bytes hashing to
407510740da5..., exactly the expected outputHash. So this is not a yanked crate
or a stale hash -- it is an untested assumption ("CI can fetch from crates.io")
that Cachix had been hiding.
Cachix therefore stays as a READ-ONLY substituter until Attic has the paths. It
is credential-free (the cache is public) and nothing publishes to it any more:
pushes go to Attic, public on main and ci elsewhere. Drop these two lines once
Attic is seeded -- and expect that first uncached build to exercise the fetch
path for real.
The Attic side is confirmed working in the failing runs themselves: they
substituted python3-env and doctest from cache.nix.logos.co/public, and the push
step correctly skipped, since these repos have no public-cache environment yet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
logos-evm-token-list-module
A Logos core module (Rust, rust-first cdylib) that manages token lists for
the Logos multi-chain EVM wallet: download, parse, and merge
Uniswap token-lists plus a user "custom"
list, deduped per chain.
Downloads go through the same fail-closed proxy chokepoint as eth_rpc_module
(src/proxy.rs), so list fetches are proxyable/Tor-ready and refuse to fall back
to the clear when a proxy is required.
Contract (TokenListModule)
configure({listUrls, proxy?, proxyRequired?, refreshSecs?}), refresh_now,
get_tokens(chainId), get_all_tokens, add_custom_token,
remove_custom_token, get_custom_tokens, get_list_sources. Event:
tokens_updated(chainId). Periodic refresh is driven on demand (the wallet
backend schedules it).
Build & test
cd rust-lib && cargo test --no-default-features # parse/merge/custom + mock fetch + fail-closed
nix build .#install # -> result/modules/token_list_module/
Description
Logos EVM wallet token-lists: download/parse/merge Uniswap lists + custom (proxyable, fail-closed).
1.7 MiB
Languages
Rust
91.4%
Shell
4%
Nix
2.9%
CMake
1.7%