Skip to content

Latest commit

 

History

History

mysql

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

MySQL Storage for Trillian Tessera

This directory contains the implementation of a storage backend for Trillian Tessera using MySQL. This allows Tessera to leverage MySQL as its underlying database for storing checkpoint, entry hashes and data in tiles format.

Design

See MySQL storage design documentation.

Requirements

  • A running MySQL server instance. This storage implementation has been tested against MySQL 8.4.

Usage

Constructing the Storage Object

Here is an example code snippet to initialise the MySQL storage in Trillian Tessera.

import (
    "context"

    tessera "github.com/transparency-dev/trillian-tessera"
    "github.com/transparency-dev/trillian-tessera/storage/mysql"
    "k8s.io/klog/v2"
)

func main() {
    mysqlURI := "user:password@tcp(db:3306)/tessera"
    db, err := sql.Open("mysql", mysqlURI)
    if err != nil {
        klog.Exitf("Failed to connect to DB: %v", err)
    }

    storage, err := mysql.New(ctx, db)
    if err != nil {
        klog.Exitf("Failed to create new MySQL storage: %v", err)
    }
}

Example personality

See MySQL conformance example.

Future Work