<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-dirserver/src/database.rs, branch arti-v2.3.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.3.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.3.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2026-04-28T16:27:56Z</updated>
<entry>
<title>tor-dirserver: Fix for missing_extra_infos() for NULL</title>
<updated>2026-04-28T16:27:56Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-04-28T08:09:13Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=67c4e02d595fed7ce3afc06e43f2577244b67ff4'/>
<id>urn:sha1:67c4e02d595fed7ce3afc06e43f2577244b67ff4</id>
<content type='text'>
If extra-infos is set to NULL, which might be the case for micro
descriptors or even router descriptors because the field is optional
there, this SQL query fails because it cannot LEFT JOIN
server.extra_unsigned_sha1 when this field is NULL.

To fix this, we simply add an additional clause to the WHERE statement
that filters such rows out.
</content>
</entry>
<entry>
<title>tor-dirserver: Make use of only one descriptor hash in missing selection</title>
<updated>2026-04-27T15:46:58Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-04-14T09:01:32Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6b26ebb430da64239c1698798b2ee1543129cba7'/>
<id>urn:sha1:6b26ebb430da64239c1698798b2ee1543129cba7</id>
<content type='text'>
This commit makes use of the presence of only one descriptor hash inside
consensus_router_descriptor_member by adding a respective AND clause to
the select statements of missing descriptors to only select the rows
with a non-null SHA-1 (or SHA-2 for the sake of microdescs) in the
consensus_router_descriptor_member table.

This is defensive programming and should not be required in practice
because the docid as well as the "XOR" CHECK should already ensure that
this value is always non-NULL.  However, if it still happens and slips
through, the statement would return NULL rows, which is not what we
want and was previously prevented by ensuring this field was never NULL
in the first place.
</content>
</entry>
<entry>
<title>tor-dirserver: Store precisely one descriptor hash in schema</title>
<updated>2026-04-27T15:46:58Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-04-14T08:49:56Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0b07bd3ee6a19af1025c02c52971a9071b937620'/>
<id>urn:sha1:0b07bd3ee6a19af1025c02c52971a9071b937620</id>
<content type='text'>
This commit modifies the consensus_router_descriptor_member table in the
database schema, removing the NOT NULL constraint on unsigned_sha1 and
unsigned_sha2 by replacing it with a new CHECK constraint that checks
that either one of them is set but not both.

The reason for this is as follows: We are going to use this table to
compute the queue of missing descriptors, which means that we can only
populate this table with the data we know from the consensus.  The
consensus however tells us only one of those hashes, namely sha1 in the
case of a consensus-ns and sha2 in the case of a consensus-md.

In other words: This commit can also be seen as an effort to change the
design of the operation in such a way that the queue is obtained
directly from the database and not computed at the start during state
transition.
</content>
</entry>
<entry>
<title>dirserver: Skip warnings re SaturatingTime::saturating_duration_since</title>
<updated>2026-04-21T14:52:33Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-04-19T20:06:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=80460f968db2c90d3d1dbc6a1592bff5e68f8de9'/>
<id>urn:sha1:80460f968db2c90d3d1dbc6a1592bff5e68f8de9</id>
<content type='text'>
Rust 1.95 warns us that this is an experimental API that could be
stabilized in the future.
</content>
</entry>
<entry>
<title>Fix typos</title>
<updated>2026-03-24T16:04:08Z</updated>
<author>
<name>Tobias Stoeckmann</name>
<email>tobias@stoeckmann.org</email>
</author>
<published>2026-03-24T16:04:08Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=1fb2b8dd4aee7c943ce90d6631be473f2a296fe6'/>
<id>urn:sha1:1fb2b8dd4aee7c943ce90d6631be473f2a296fe6</id>
<content type='text'>
Typos found with codespell
</content>
</entry>
<entry>
<title>tor-dirserver: Use collect instead of mutable for</title>
<updated>2026-03-09T08:31:28Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-02-25T11:16:09Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ec1dc8a0dba0c7e2389dcf6291c80b5626472354'/>
<id>urn:sha1:ec1dc8a0dba0c7e2389dcf6291c80b5626472354</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-dirserver: Use tor-llcrypto for digests</title>
<updated>2026-03-09T08:31:28Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-02-25T10:41:43Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=c3738787191c3f21b74e592ea67cce6a60f1af53'/>
<id>urn:sha1:c3738787191c3f21b74e592ea67cce6a60f1af53</id>
<content type='text'>
This commit replaces the uses of sha1, sha2, and sha3 with their
respective pedants from tor-llcrypto for better consistency.

Internally, they still use the same logic and underlying crates but
let's use this encapsulation nonetheless.
</content>
</entry>
<entry>
<title>tor-dirserver: Improve hash wrapper macro docs</title>
<updated>2026-03-09T08:31:28Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-02-25T10:29:55Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=27a1ebcef3263522acb9a02763f52eadf113fe4c'/>
<id>urn:sha1:27a1ebcef3263522acb9a02763f52eadf113fe4c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-dirserver: Move schema to own file</title>
<updated>2026-03-09T08:31:28Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-02-25T09:11:55Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7814e15ae0f88da389349d2ada0e1101f235063c'/>
<id>urn:sha1:7814e15ae0f88da389349d2ada0e1101f235063c</id>
<content type='text'>
This commit moves the database schema into schema_v1.sql and uses
include_str to include it.  For now, the schema lives in the `src/`
directory.  If this becomes a problem because we get more schemas and
schema upgrades, we can move it into another sub directory, but let's
not overengineer the hierarchy there.
</content>
</entry>
<entry>
<title>tor-dirserver: Implement `State::AuthCerts`</title>
<updated>2026-03-09T08:31:23Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-02-09T13:13:33Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=03b54563e88b41c63bc176ecbfcac364b0a389f5'/>
<id>urn:sha1:03b54563e88b41c63bc176ecbfcac364b0a389f5</id>
<content type='text'>
This commit implements the logic required for retrieving, validating,
and storing authority certificates.

The implementation determines the missing certificates by looking at the
signatories of the unvalidated consensus and checking them in the db.
Afterwards, they will be queried and individually filtered and verified
before being inserted into the database.

A return of this implementation notably DOES NOT imply all missing
certificates have been downloaded.  This was chosen for a simplified
retry logic.
</content>
</entry>
</feed>
