Skip to content

Commit

Permalink
remove ipfs for good
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Aug 2, 2023
1 parent dcc46ab commit 0dd4087
Show file tree
Hide file tree
Showing 7 changed files with 3,023 additions and 9,102 deletions.
3,023 changes: 0 additions & 3,023 deletions checksums/PackManifest

This file was deleted.

9,066 changes: 3,022 additions & 6,044 deletions stats.json

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions syzygy_tables_info/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,17 +630,6 @@ async def download_txt(request: aiohttp.web.Request) -> aiohttp.web.Response:
result.append("{}/7-WDL/{}.rtbw".format(base, table))
if include_dtz:
result.append("{}/7-DTZ/{}.rtbz".format(base, table))
elif source in ["ipfs", "ipfs.syzygy-tables.info"]:
if len(table) <= 6:
# More reliably seeded.
base = "QmNbKYpPyXFAHFMnAxoc2i28Jf7jhShM8EEnfWUMv6u2DQ"
else:
# /ipns/ipfs.syzygy-tables.info
base = "QmVgcSADsoW5w19MkL2RNKNPGtaz7UhGhU62XRm6pQmzct"
if include_wdl:
result.append("/ipfs/{}/{}.rtbw".format(base, table))
if include_dtz:
result.append("/ipfs/{}/{}.rtbz".format(base, table))
elif source in ["stem", "material"]:
result.append(table)
elif source in ["file", "filename"]:
Expand Down Expand Up @@ -682,7 +671,6 @@ def make_app(config: configparser.ConfigParser) -> aiohttp.web.Application:
app.router.add_route("GET", "/checksums/sha256", static("checksums/sha256", content_type="text/plain"))
app.router.add_route("GET", "/checksums/sha512", static("checksums/sha512", content_type="text/plain"))
app.router.add_route("GET", "/checksums/sha3-224", static("checksums/sha3-224", content_type="text/plain"))
app.router.add_route("GET", "/checksums/PackManifest", static("checksums/PackManifest", content_type="text/plain"))
app.router.add_route("GET", "/endgames.pgn", static("stats/regular/maxdtz.pgn", content_type="application/x-chess-pgn"))
app.router.add_route("GET", "/stats.json", static("stats.json"))

Expand Down
1 change: 0 additions & 1 deletion syzygy_tables_info/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class TableStats(typing.TypedDict):
sha256: str
sha512: str
b2: str
ipfs: str
except AttributeError:
TableStats = dict # type: ignore

Expand Down
9 changes: 1 addition & 8 deletions syzygy_tables_info/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,6 @@ def move(m: RenderMove) -> Frag:
h("td")("http, https, EU"),
h("td")(h("a", href="/download.txt?source=lichess&max-pieces=7", title="List of URLs (txt)")(h("span", klass="icon icon-list")())),
),
#h("tr")(
# h("td")(h("a", href="https://ipfs.syzygy-tables.info/")("ipfs.syzygy-tables.info")),
# h("td")("ipfs, Cloudflare"),
# h("td")(h("a", href="/download.txt?source=ipfs&max-pieces=7", title="List of URLs (txt)")(h("span", klass="icon icon-list")())),
#),
),
),
h("h3")("Checksums"),
Expand All @@ -435,7 +430,6 @@ def move(m: RenderMove) -> Frag:
middot, h("a", href="/checksums/sha3-224")("sha3-224"),
middot, h("a", href="/checksums/b2")("b2"),
middot, h("a", href="/checksums/b3")("b3"),
#middot, h("a", href="/checksums/PackManifest", title="PackManifest")("ipfs"),
),
h("section", id="contact")(
h("h2")("Contact"),
Expand Down Expand Up @@ -758,8 +752,7 @@ def stats(*, development: bool) -> Frag:
"sha1": "07a0e4...",
"sha256": "f3386d...",
"sha512": "c4bf73...",
"b2": "b970e0...", // blake 2
"ipfs": "QmXW4S..."
"b2": "b970e0..." // blake 2
},
"rtbz": {
// ...
Expand Down
7 changes: 0 additions & 7 deletions util/stats-v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ def main():
with open("stats.json") as f:
stats = json.load(f)

ipfs = {}
for line in open("checksums/PackManifest"):
h, _, filename = line.strip().split()
ipfs[filename] = h

sizes = {}
for line in open("checksums/bytes.tsv"):
b, filename = line.strip().split()
Expand Down Expand Up @@ -83,7 +78,6 @@ def sort_key(endgame):
"sha256": checksums["sha256"][f"{table}.rtbw"],
"sha512": checksums["sha512"][f"{table}.rtbw"],
"b2": checksums["b2"][f"{table}.rtbw"],
"ipfs": ipfs[f"{table}.rtbw"],
},
"rtbz": {
"bytes": sizes[f"{table}.rtbz"],
Expand All @@ -93,7 +87,6 @@ def sort_key(endgame):
"sha256": checksums["sha256"][f"{table}.rtbz"],
"sha512": checksums["sha512"][f"{table}.rtbz"],
"b2": checksums["b2"][f"{table}.rtbz"],
"ipfs": ipfs[f"{table}.rtbz"],
},
"longest": stats[table]["longest"],
"histogram": {
Expand Down
7 changes: 0 additions & 7 deletions util/stats-v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ def main():
with open("stats.json") as f:
stats = json.load(f)

ipfs = {}
for line in open("checksums/PackManifest"):
h, _, filename = line.strip().split()
ipfs[filename] = h

sizes = {}
for line in open("checksums/bytes.tsv"):
b, filename = line.strip().split()
Expand Down Expand Up @@ -85,7 +80,6 @@ def sort_key(endgame):
"sha3-224": checksums["sha3-224"][f"{table}.rtbw"],
"b2": checksums["b2"][f"{table}.rtbw"],
"b3": checksums["b3"][f"{table}.rtbw"],
"ipfs": ipfs[f"{table}.rtbw"],
},
"rtbz": {
"bytes": sizes[f"{table}.rtbz"],
Expand All @@ -97,7 +91,6 @@ def sort_key(endgame):
"sha3-224": checksums["sha3-224"][f"{table}.rtbz"],
"b2": checksums["b2"][f"{table}.rtbz"],
"b3": checksums["b3"][f"{table}.rtbz"],
"ipfs": ipfs[f"{table}.rtbz"],
},
"longest": stats[table]["longest"],
"histogram": {
Expand Down

0 comments on commit 0dd4087

Please sign in to comment.