Skip to content

Commit

Permalink
docs: add adr for lowercase infohashes
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed May 15, 2023
1 parent 556306a commit 07943f1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
20 changes: 20 additions & 0 deletions adrs/20230510152112_lowercas_infohashes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Lowercase infohashes

## Description

We use both uppercase and lowercase infohashes. This is a problem because
we have to check both cases. For example, we have to convert to uppercase before
inserting into the database or querying the database.

The database and API URLs use uppercase infohashes, and they are case-sensitive.

## Agreement

We agree on use lowercase infohashes everywhere and try to convert then as soon
as possible from the input.

There is no specific reason to use lowercase infohashes, but we have to choose
one of them. We decided to use lowercase because the infohash is a hash, and
hashes are usually lowercase.

We will change them progressively.
23 changes: 23 additions & 0 deletions adrs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Architectural Decision Records (ADRs)

This directory contains the architectural decision records (ADRs) for the
project. ADRs are a way to document the architectural decisions made in the
project.

More info: <https://adr.github.io/>.

## How to add a new record

For the prefix:

```s
date -u +"%Y%m%d%H%M%S"
```

Then you can create a new markdown file with the following format:

```s
20230510152112_title.md
```

For the time being, we are not following any specific template.

0 comments on commit 07943f1

Please sign in to comment.