This is the source repo for the Crums timechain. I'm developing a new version of the timechain. Unlike its previous incarnation, this repo now includes both client- and server-side code. (The client for the legacy chain is archived under the TC-1 subdirectory.)
The project documentation page details a conceptual overview of timechains and their proof structures.
The implementation is organized in 3 modules, each layered atop the other.
- timechain - Defines the basic timechain, and its proof structures. Additionally, it provides client-side code for accessing a timechain.
- notary - This module implements the background daemon service that collects crums (witnessed hashes) and publishes their collective hash per block (bin) interval as the cargo hash of the corresponding timechain block. The notary is designed to be safe under concurrent read/write access from multiple processes (not just threads).
- ergd - This is a standaolone, embedded HTTP REST server launched from the command line. New timechains can also be incepted (created) thru this CLI.
The first (alpha) version is nearing release. It works.
The most glaring TODOs:
- Command line timechain client. (There'll be something on first release.)
- witness
- verify crumtrail
- update block proof (in crumtrail) from timechain
- Client-side storage and archival of crumtrails (witness proofs) needs work. As a chain evolves (as it accumulates new blocks) the block proofs in archived crumtrails can be updated en mass. With a bit of planning, this can be made efficient, since crumtrails from the same chain share the same lineage and therefore share common information.
- Need to work out details about how otherwise independent timechains on the network can choose to record one another's state in order to assert each others' bona fides.
- Broken landing page (To be fixed before release).
- Snapshot build script.
The project's build tool is Maven. Presently, SNAPSHOT versions are not published anywhere. To build this project, you'll have to clone and build a number of dependencies yourself. Clone the following projects in the suggested order, and build them using
$ mvn clean install
-
merkle-tree - Merkle tree implementation. Dependencies: none.
-
io-util - Small, multi-module, utility library. Dependencies: none.
-
stowkwik - Simple file-per-object store, indexed by hash. Dependencies:
io-util
. -
skipledger - Base module defining the data structure and other modules for packaging proofs from general ledgers. This project used to know about this repo. The code was refactored so that the base layer no longer knows about this project (the relationship is in fact now reversed). Dependencies:
merkle-tree
,io-util
. -
Clone this project and build:
To build the last project ergd
(the REST server)
$ mvn clean package appassembler:assemble
Then give this a try..
$ ./target/binary/bin/ergd -h
~ Babak
July 2024