Skip to content

Commit 3502eea

Browse files
🎉 Autoblockchainify is born
1 parent 805e125 commit 3502eea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+819
-3882
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
.idea
22
build
3+
venv
34
dist
45
*.egg-info
56
# Locally modified copy of sample.env:
6-
server.env
7+
autoblockchainify.env
78
dev.env
8-
zeitgitter-dev/
9-
persistent-data-dev/
9+
autoblockchainify-dev/
10+
blockchain-dev/

CHANGELOG.md

Lines changed: 2 additions & 182 deletions
Original file line numberDiff line numberDiff line change
@@ -5,190 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](https://semver.org/).
66

77

8-
# 1.0.2+ - [Unreleased]
8+
# 0.9.0 - [Unreleased]
99
## Added
10+
- Derived from Zeitgitter timestamping server
1011

1112
## Fixed
1213

1314
## Changed
14-
- Docker image is now based on `debian:buster-slim`. As the same number of
15-
packages (171) has to be added on top of it, starting with the smaller image
16-
is preferable. (See [#0.9.6---2020-08-13](v0.9.6 below) for why not using one
17-
of the `python` base images.)
18-
19-
20-
# 1.0.2 - 2020-08-15
21-
## Added
22-
- Allow testing docker images without having to publish to PyPI and DockerHub.
23-
This will allow better testing in the future before releasing. (If you wonder
24-
why this Changelog does not say anything about v1.0.1, this is why.)
25-
26-
## Fixed
27-
- Data loss can occur (and did in fact occur on `gitta.zeitgitter.net`) if
28-
`git` is not installed, due to `FileNotFoundError` signalling both harmless
29-
events (whether a file tested for presence exists) and important events
30-
(`git` cannot be executed, as it cannot be found). This resulted in
31-
destructive file operations being performed, as it was wrongly believed that
32-
the data was already recorded persistently in `git`. This has been fixed.
33-
:warning: Please refrain from using Docker image versions 1.0.0 or 0.9.6, and
34-
do update to 1.0.1 also for non-Docker instances, as they will fail more
35-
harmlessly (i.e., just lengthen the interval until `git` is present (again),
36-
resulting in precision loss from cross-timestamping, instead of with data
37-
loss).
38-
- `git` included in Docker image
39-
- Recovering from dangling repositories
40-
41-
## Changed
42-
- A commit will be created after creating the timestamping repository and
43-
adding `pubkey.asc` to it, so that cross-timestamping can start then.
44-
Otherwise, cross-timestamping would result in error messages until the first
45-
external timestamping request arrives.
46-
47-
48-
# 1.0.0 - 2020-08-13
49-
## Added
50-
51-
## Fixed
52-
53-
## Changed
54-
- Releasing 0.9.6 as 1.0.0
55-
56-
57-
# 0.9.6 - 2020-08-13
58-
## Added
59-
60-
## Fixed
61-
62-
## Changed
63-
- Commit/tag message now starts with :watch:; this is not only useful for projects
64-
following [gitmoji](https://gitmoji.carloscuesta.me/) style, but also for
65-
visually distinguishing timestamps from regular commits/tags
66-
- Base Docker image on `debian:buster`, as
67-
[`python:*` is on purpose not meant to be used with local system
68-
packages](https://github.com/docker-library/python/issues/482). However,
69-
`pygit2` is impractical to install without relying on system packages.
70-
71-
72-
# 0.9.5 - 2020-05-13
73-
## Added
74-
- README for the Docker file
75-
- Support for ARM and ARM64 docker images
76-
- Documented support for multiple debug classes
77-
78-
## Fixed
79-
- Web files again included in wheel
80-
- `async_email_timestamp()` now really waits in a new thread for the mail reply
81-
82-
## Changed
83-
- Reduced logging for PGP Timestamping Server mail handling
84-
- Updated gnupg config documentation
85-
- Newer GnuPG versions seem to ignore the symlink trick, now copying for real
86-
- Restarting the server tries to resume a pending `async_email_timestamp()`
87-
waiting for the reply mail
88-
89-
90-
# 0.9.4 - 2020-05-09
91-
## Added
92-
- Support for data in binary packages
93-
94-
## Fixed
95-
96-
## Changed
97-
- Default port is now 15177 (as has been for systemd); tests use 15178
98-
- Default debug level is now INFO. Numeric debug levels are now deprecated.
99-
- Default commit interval has been set to 1h
100-
- Simplified Docker setup/usage. Now created from pypi images.
101-
- Docker is now the recommended usage platform.
102-
103-
104-
# 0.9.3 - 2020-05-08
105-
## Added
106-
- Allow dots in tag names, as long as they are not next to each other
107-
(i.e., `..` is not allowed)
108-
- Added support for
109-
[PGP Digital Timestamping Service](http://www.itconsult.co.uk/stamper.htm)
110-
and improved documentation
111-
- Timestamp our commit id as well with PGP Timestamper
112-
- Configuration now easier: Just look for `EASYCONFIG` in `zeitgitter.conf`
113-
- Added support for (semi-)automatic configuration
114-
- Configuration through environment variables
115-
- Support Docker
116-
- More detailed debug support (see `--debug-level`)
117-
- Minimal support for HTTP `HEAD` requests
118-
- Can use IMAP servers without `IDLE` support (are there still any out there?)
119-
- Work around a bug in some(?) Dovecot mail servers which cannot match the
120-
last character of a mail domain. I.e., `mailer@itconsult.co.uk` does not
121-
match the `From: Stamper <mailer@itconsult.co.uk>` header in IMAP SEARCH,
122-
but `mailer@itconsult.co.u` (note the missing `k`!) does match the header.
123-
This can be turned off via `--no-dovecot-bug-workaround`.
124-
125-
## Fixed
126-
- Correctly handles IMAP `IDLE` responses other than `EXISTS` (especially
127-
Dovecot's `* OK still here`)
128-
- End line in stamper mails may now also be in last line.
129-
- Not receiving a stamper mail in time does no longer raise an exception
130-
131-
## Changed
132-
- Split into client (git-timestamp) and server (zeitgitterd).
133-
- Calculate a default for `--gnupg-home` to allow `--number-of-gpg-agents` > 1
134-
- Commit log message includes timestamp as well to improve readability for
135-
`git blame` etc.
136-
- Log message timestamps (including "Found uncommitted data") now say "UTC"
137-
- Renamed all PGP Digital Timestamper related parameters to a common
138-
`--stamper-` prefix (the old names are still accepted, but deprecated)
139-
- Mail tests now include a (local) configuration file for the site secrets.
140-
- Maintainer affiliation
141-
- Release on PyPI
142-
143-
144-
# 0.9.2 - 2019-05-10
145-
## Added
146-
- `make apt` installs dependencies on systems supporting `apt`
147-
148-
### Client
149-
- Distributable via PyPI
150-
- Added Python 2.x compatibility; tested with 2.7
151-
- Automatically derive default timestamp branch name from servername
152-
(first component not named 'igitt') followd by '-timestamps'.
153-
- Better error message when wrong `gnupg` module has been installed
154-
155-
## Fixed
156-
### Client
157-
- Fetch GnuPG key again if missing from keyring. This fixes unexpected
158-
behavior when running as sudo vs. natively as root.
159-
- Work around a bug in older GnuPG installs (create `pubring.kbx` if it does
160-
not yet exist before attempting `scan_keys()`).
161-
162-
## Changed
163-
- Higher-level README
164-
165-
### Client
166-
- Is now implemented as a package (`make install` still installs a flat file
167-
though, for simplicity)
168-
169-
170-
# 0.9.1 - 2019-04-19
171-
## Added
172-
### Client
173-
- `--server` can be set in git config
174-
- Prevent actual duplicate entries created by `git timestamp --branch`
175-
- Documented that `git timestamp --help` does not work and to use `-h`, as
176-
`--help` is swallowed by `git` and not forwarded to `git-timestamp`.
177-
- Client system tests (require Internet connectivity)
178-
179-
### Server
180-
- Ability to run multiple GnuPG processes (including gpg-agents) in parallel
181-
- Handle missing `--push-repository` (again)
182-
183-
## Fixed
184-
- Made tests compatible with older GnuPG versions
185-
186-
## Changed
187-
### Client
188-
- Made some error messages more consistent
189-
- `--tag` overrides `--branch`. This allows to store a default branch in
190-
`git config`, yet timestamp a tag when necessary.
191-
192-
193-
# 0.9.0 - 2019-04-04
194-
Initial public release

GitBlockchainTimestamping.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# GIT as a Blockchain with Timestamping
2+
3+
`git` is probably the oldest and most widely used Blockchain with the largest
4+
user base and toolset, even though most people think of `git` as a source code
5+
control system.
6+
7+
## `git` as a Blockchain, really?
8+
9+
The first two paragraphs of the [Wikipedia article on
10+
*Blockchain*](https://en.wikipedia.org/wiki/Blockchain) read, as of 2020-09-18:
11+
12+
> A blockchain, originally block chain, is a growing list of records, called
13+
> blocks, that are linked using cryptography. Each block contains a
14+
> cryptographic hash of the previous block, a timestamp, and transaction data
15+
> (generally represented as a Merkle tree).
16+
17+
> By design, a blockchain is resistant to modification of the data. It is "an
18+
> open, distributed ledger that can record transactions between two parties
19+
> efficiently and in a verifiable and permanent way". For use as a distributed
20+
> ledger, a blockchain is typically managed by a peer-to-peer network
21+
> collectively adhering to a protocol for inter-node communication and
22+
> validating new blocks. Once recorded, the data in any given block cannot be
23+
> altered retroactively without alteration of all subsequent blocks, which
24+
> requires consensus of the network majority. Although blockchain records are
25+
> not unalterable, blockchains may be considered secure by design and exemplify
26+
> a distributed computing system with high Byzantine fault tolerance.
27+
> Decentralized consensus has therefore been claimed with a blockchain.
28+
29+
This is pretty much what `git` does, with the *transaction data* being the
30+
current contents of the directory tree, and the Merkle tree being modeled after
31+
the directory structure.
32+
33+
The main difference is in terms of distribution and consensus. However, most
34+
blockchains used for mission-critical purposes (e.g., company, government
35+
usage) place application-specific limitations on distribution and consensus.
36+
These can also be implemented easily with `git`.
37+
38+
## Timestamping
39+
40+
The seminal 1991 paper by Haber and Stornetta lists requirements and possible
41+
solutions for (trusted) timestamping services:
42+
43+
> The first approach is to constrain a centralized but possibly untrustworthy
44+
> TSS [time-stamping services] to produce genuine time-stamps, in such a way
45+
> that fake ones are difficult to produce. The second approach is somehow to
46+
> distribute the required trust among the users of the service.
47+
48+
In 1995, the [PGP Digital Timestamping
49+
Service](http://www.itconsult.co.uk/stamper/stampinf.htm), started offering a
50+
service along Haber and Stornetta's first approach: They were
51+
* publishing a complete list of all timestamps they ever produced,
52+
* publishing daily and weekly summary of those timestamps, and
53+
* posting the latter to third-party archived sites.
54+
55+
In 2019, [Zeitgitter](https://zeitgitter.net) started extending this to the
56+
second approach:
57+
* The timestamped histories are (cross-)timestamped by other timestamping
58+
servers and services.
59+
As a result, a **single(!)** trustworthy operator in this network can prevent
60+
**everbody else** from cheating. This is a much stronger result than the
61+
greater-than-50%-trustworthiness requirement available to typical Blockchains.
62+
63+
# References
64+
65+
1. Haber, S.; Stornetta, W. S. (1991). ["How to time-stamp a digital
66+
document"](https://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.8740).
67+
Journal of Cryptology. 3 (2): 99–111.

MANIFEST.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
include zeitgitter/web/*.html
2-
include zeitgitter/sample.conf
1+
include sample.env

0 commit comments

Comments
 (0)