BitClock is a distributed timestamp system without requiring consensus. Each node generates and shares stamps, which are then compiled into a proof, allowing the order in which the data was generated to be verified.
Note
BitClock is currently in active development. The API and features may change without notice.
- 🔒 Instant finality - A proof is finalized once it is validated by the network and cannot be reversed.
- 🏎️ No consensus required - Timestamps can be issued without consensus.
- 🕰️ Distributed timestamp without ledger - We can verify timestamp without global ledgers or blockchains.
- ⚡ Fast timestamp creation - Once you've collected a certain number of stamps, you can create a proof right away.
BitClock requires a certain amount of computational work via Proof of Work to generate timestamps and uses a Verifiable Delay Function (VDF) to ensure a fixed delay. This makes the system resistant to Sybil attacks.
With BitClock, you can not only create digital certificates but also prove their order.
BitClock does not have a global clock.
Instead, each node maintains a counter that serves as its local time, and the timeline is determined by observing changes in these counters. This timeline determination is performed by compare_time.
# Clone the repository (or Download ZIP)
$ git clone https://github.com/kotagit75/bitclock.git
# Navigate to the project directory
$ cd bitclock
# build
$ cargo build --release- Text-Proof - You can create simple proofs.
3.Tutorial
# run
$ ./target/release/bitclock bitclock
# get status
$ curl http://localhost:8080/status
# add peer
$ ./target/release/cli addpeer '[peer_ip_address]'
# create proof
$ ./target/release/cli proof '[recipient]' '[content]'
# get state(address, secret_key, pool, peers)
$ ./target/release/cli state
# get address
$ ./target/release/cli address
# get pool
$ ./target/release/cli pool
# get peers
$ ./target/release/cli peers
# find proof by secret key
$ ./target/release/cli find '[secret_key]'
# verify proof
$ ./target/release/cli verify '[proof]'
# compare the issuance times of the two proofs
$ ./target/release/cli compare '[secret_key1]' '[secret_key2]'
# sort proofs by time
$ ./target/release/cli sort
# display help
$ ./target/release/bitclock -h
Usage: bitclock [OPTIONS]
Options:
-l, --level <LEVEL> [default: INFO]
-h, --help Print helpCaution
Never make the node directory or any files within it publicly accessible. Doing so could result in the leakage of your private key.
Users can control BitClock via an HTTP server.
| implemented | method | endpoint | feature |
|---|---|---|---|
POST |
/ | execute command | |
GET |
/status | get status | |
GET |
/query | get state | |
GET |
/query/address | get address | |
GET |
/query/pool | get proof pool | |
GET |
/query/peers | get peers | |
GET |
/query/compare | compare the issuance times of the two proofs | |
GET |
/query/sort | sort proofs by time |
- Add a peer - Post a request with
{"AddPeer": "peerIP"}in the body - Create proof - Post a request with
{"Proof": "some data"}in the body
