<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-dirserver/src/database.rs, branch arti-v2.1.0</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.1.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.1.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2026-01-22T16:25:24Z</updated>
<entry>
<title>tor-dirserver: Add comment on compression bug</title>
<updated>2026-01-22T16:25:24Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-22T14:42:47Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7678f36d675ca762f3672c5bdc0cc3f007ee299e'/>
<id>urn:sha1:7678f36d675ca762f3672c5bdc0cc3f007ee299e</id>
<content type='text'>
This commit adds a comment explaining why we treat compression errors as
a bug.
</content>
</entry>
<entry>
<title>tor-dirserver: Make compression failures a bug</title>
<updated>2026-01-22T16:25:15Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-21T17:53:24Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=bc59f1ef133eab5c70426388deb2bc95b8c6b8a4'/>
<id>urn:sha1:bc59f1ef133eab5c70426388deb2bc95b8c6b8a4</id>
<content type='text'>
This commit removes `DatabaseError::Compression` because it does not fit
in.  Right now, this single variant makes the error to be call-site
oriented which is not nice for error handling.  Instead, this error
should indicate that something was truly wrong with the database in
itself, such as an invalid schema, a low-level SQLite bug, etc.

Instead, we now map a compression error to `DatabaseError::Bug` because
there is no good reason on why it should fail, given that we compress
memory data to memory data.  Probably because it uses the
`std::io::Writer` interface which itself demands use of
`std::io::Result`.
</content>
</entry>
<entry>
<title>tor-dirserver: Remove FromStr for DocumentId</title>
<updated>2026-01-22T15:20:19Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-22T15:20:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=e17869b7bc0e7c674d5d770aec8c5cd120246a4c'/>
<id>urn:sha1:e17869b7bc0e7c674d5d770aec8c5cd120246a4c</id>
<content type='text'>
This commit removes FromStr for DocumentId because it was only used in
testing anyways.

Instead, it replaces it with a simple From&lt;[u8; 32]&gt; only enabled in
test builds, which is sufficient for what we are trying to do.

An alternative would be to make the inner field pub, but this seems to
aggressive for a testing only thing.
</content>
</entry>
<entry>
<title>tor-dirserver: Add `sha2` to `router_descriptor`</title>
<updated>2026-01-19T10:01:59Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-15T14:55:13Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4dc3571fe6c6b7bd8a3aa9d15da3074a140b054e'/>
<id>urn:sha1:4dc3571fe6c6b7bd8a3aa9d15da3074a140b054e</id>
<content type='text'>
This comit adds a `sha2` column to `router_descriptor` alongside a
`CHECK` to see whether it equals `docid`.

The reason for this is simple: Microdescriptors are the only kind of
documents that are queriable with a SHA2 hash.  Previously, we would
have simply used the `docid` column for this, but in order to abstract
it better, a distinct column with this hash is better.
</content>
</entry>
<entry>
<title>tor-dirserver: Rename `doc_id` to `docid`</title>
<updated>2026-01-19T10:01:59Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-15T14:53:39Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0ba6540a84dc6ee15b79cdb49137fa659f4a4de8'/>
<id>urn:sha1:0ba6540a84dc6ee15b79cdb49137fa659f4a4de8</id>
<content type='text'>
Because we went with `docid` in the database (due to `rowid`), it is
only natural to call the code variables `docid` too.
</content>
</entry>
<entry>
<title>tor-dirserver: Rename sha256 to docid in schema</title>
<updated>2026-01-19T10:01:59Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-15T14:50:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=30d43c6384c57c7f90dbac7f40d496143cec6102'/>
<id>urn:sha1:30d43c6384c57c7f90dbac7f40d496143cec6102</id>
<content type='text'>
This commit renames the sha256 column to docid for the reason that we
agreed upon making the schema visible to all modules, so if we were to
encapsulate docid properly, this change is only natural.
</content>
</entry>
<entry>
<title>tor-dirserver: Rename database meta table</title>
<updated>2026-01-19T10:01:59Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-15T14:43:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=aa72981f33acc66312db73601c09958d6cfa6ba0'/>
<id>urn:sha1:aa72981f33acc66312db73601c09958d6cfa6ba0</id>
<content type='text'>
This commit renames arti_dirmirror_schema_version to
arti_dirserver_schema_version.
</content>
</entry>
<entry>
<title>database: Introduce DocumentId</title>
<updated>2026-01-19T10:01:59Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-15T14:33:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2e0bf76a2878e7f9979dcac4bebe5b986596d6aa'/>
<id>urn:sha1:2e0bf76a2878e7f9979dcac4bebe5b986596d6aa</id>
<content type='text'>
This commit introduces a new type in the database module named
`DocumentId` for abstracting the underlying content-addressable hash
algorithm we are using.
</content>
</entry>
<entry>
<title>tor-dirserver: Small pre-merge fixes</title>
<updated>2026-01-15T10:59:00Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-15T10:59:00Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4c2ce57374d88e4f34c60daac212247415a9d6d7'/>
<id>urn:sha1:4c2ce57374d88e4f34c60daac212247415a9d6d7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-dirserver: Add TODO wrt hex::encode_upper</title>
<updated>2026-01-15T10:49:46Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-01-13T12:49:08Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5bb2296c28fbb01238953264063ca1390752b4bc'/>
<id>urn:sha1:5bb2296c28fbb01238953264063ca1390752b4bc</id>
<content type='text'>
Adding a comment suggesting to implement this as part of abstracting
`Sha256` behind a more generic identifier.
</content>
</entry>
</feed>
