Skip to main content

Timelines

The Timeline is a core component designed to ensure integrity, immutability, and chronological order of messages or actions performed by an individual or entity. It functions as a hash chain where each entry is a Blue Language document, and all messages are also written in Blue Language. This allows for secure, verifiable, and interconnected records.


Introduction

A Timeline is a sequence of entries, each cryptographically linked to the previous one, forming a secure and immutable record of actions or messages. It allows the owner to append any content they wish, ensuring that the history cannot be tampered with or altered retroactively.

Each entry in a Timeline is:

  • Written in Blue Language, ensuring consistency and interoperability.
  • Identified by a unique blueId, a content hash of the entry.
  • Cryptographically linked to previous entries, forming a hash chain.

Key Features

Hash Chain Structure

  • Sequential Entries: Each entry references the blueId of the previous entry (timelinePrev), creating an immutable chain.
  • Integrity: The hash chain ensures that any alteration in an entry would invalidate all subsequent entries.
  • Owner Control: Only the owner can append new entries to their Timeline.

Entries in Blue Language

  • Uniform Format: All Timeline entries are Blue Language documents, allowing for structured and typed data.
  • Messages in Blue: The message field within each entry is also a Blue document, enabling rich and complex data structures.

Content-Addressable IDs (blueId)

  • Unique Identification: Each entry is assigned a blueId, a content hash calculated from the entry's content.
  • Interconnection: Entries can reference each other and other documents via blueId, creating a web of interconnected data.
  • Immutability: The blueId ensures that the content is tamper-proof; any change in the content results in a new blueId.

Timeline Entry Structure

Each Timeline entry follows a specific structure:

timeline:       # blueId of the initial document starting the Timeline
timelinePrev: # blueId of the previous entry in the Timeline
thread: # (Optional) blueId of the thread the entry belongs to
threadPrev: # (Optional) blueId of the previous entry in the same thread
message: # The content of the entry (a Blue document)
signature: # Cryptographic signature of the entry

Fields Explanation:

  • timeline: References the blueId of the first entry in the Timeline, serving as the Timeline's identifier.
  • timelinePrev: References the blueId of the immediate previous entry, linking entries sequentially.
  • thread: (Optional) References the blueId of the thread's initial entry, grouping related entries.
  • threadPrev: (Optional) References the blueId of the previous entry within the same thread.
  • message: Contains the main content of the entry, written in Blue Language.
  • signature: Cryptographic signature verifying the authenticity and integrity of the entry.

Threads

Threads allow for the organization of Timeline entries around specific topics or purposes, similar to folders in a file system or conversation threads in messaging apps.

  • Thread Identification: The thread field contains the blueId of the thread's initial entry.
  • Thread Linking: The threadPrev field links to the previous entry in the same thread, allowing for sequential traversal.

Examples

Current Timeline Examples

Example 1: Initiating a Contract

timeline:
blueId: 6S3id6ShZbKzsHxHMmJtiT3a6HfkVfpxVUvpcxUfxeEx
type: Simulator Timeline Entry
timelinePrev:
blueId: 6S3id6ShZbKzsHxHMmJtiT3a6HfkVfpxVUvpcxUfxeEx
message:
initiateContractEntry:
blueId: BWhvLzqXHFaJnBo52W2cbBEHt9d7B5LJWm3YypVGQ6qh
contract:
type: Task
messaging:
participants:
User:
timeline:
blueId: C74uRd4sPfeawKhWBewVKqFLSACiv8B9EiYpuryYUXuR
type: Participant
Assistant:
timeline:
blueId: yPcbdfUDeMa5N5sCpw8xSea8yq4FjX69uQ3MH4TA72q
type: Participant
type: Initiate Contract Processing Action
signature: [signature_value]

Example 2: Contract Update

timeline:
blueId: 6S3id6ShZbKzsHxHMmJtiT3a6HfkVfpxVUvpcxUfxeEx
thread:
blueId: Dfop2aShVAqJ7PvCyCJDJyL37eMtyFTqYembyYNoAprQ
type: Simulator Timeline Entry
timelinePrev:
blueId: Dfop2aShVAqJ7PvCyCJDJyL37eMtyFTqYembyYNoAprQ
message:
initiateContractEntry:
blueId: BWhvLzqXHFaJnBo52W2cbBEHt9d7B5LJWm3YypVGQ6qh
contractInstance:
processingState:
startedLocalContractCount:
type: Integer
value: 0
terminatedWithError:
type: Boolean
value: false
completed:
type: Boolean
value: false
startedWorkflowCount:
type: Integer
value: 0
contractState:
type: Task
properties:
actualTask:
type: Local Contract
conversation:
type: List
messaging:
secureChannel:
description: Channel part
participants:
User:
description: Someone providing a task
timeline:
blueId: C74uRd4sPfeawKhWBewVKqFLSACiv8B9EiYpuryYUXuR
type: Participant
Assistant:
description: Someone processing a task
timeline:
blueId: yPcbdfUDeMa5N5sCpw8xSea8yq4FjX69uQ3MH4TA72q
type: Participant
valueType: Participant
type: Dictionary
keyType: Text
id:
type: Integer
value: 0
incomingEvent:
type: Contract Initialization Event
epoch:
type: Integer
value: 0
initiateContractProcessingEntry:
blueId: Dfop2aShVAqJ7PvCyCJDJyL37eMtyFTqYembyYNoAprQ
type: Contract Update Action
signature: [signature_value]

Explanation:

  • The timeline field references the initial entry's blueId, indicating the Timeline this entry belongs to.
  • The thread field indicates the thread within the Timeline, grouping related entries.
  • timelinePrev references the previous entry's blueId, linking the entries sequentially.
  • The message contains structured data about contract initiation and updates, demonstrating how complex actions can be recorded.
  • The signature ensures the authenticity and integrity of the entry.