Skip to content

Instantly share code, notes, and snippets.

@porcuquine
porcuquine / variable-merkle-tree.lisp
Last active July 10, 2021 18:14
Variable Merkle Tree
;;; Sketch of algorithms for merkle tree with incremental storage.
;;; Starting with an empty tree, leaves can be inserted up to the maximum allowed by the tree's height.
;;; Inclusion proofs and update proofs can be generated and verified.
;;; For zero-knowledge applications, prove the verification in a circuit.
;;; @porcuquine
(defpackage vtree (:use :common-lisp))
(in-package vtree)
(defun hash (a b)

Keybase proof

I hereby claim:

  • I am porcuquine on github.
  • I am porcuquine (https://keybase.io/porcuquine) on keybase.
  • I have a public key whose fingerprint is D921 AFAF AAAB 09E0 1D30 4152 BF10 9CFF 8075 B4EF

To claim this, I am signing this object:

(* HORATIO
* O day and night, but this is wondrous strange!
* HORATIO
* My God, this is unbelievably strange.
* HAMLET
* And therefore as a stranger give it welcome.
* There are more things in heaven and earth, Horatio,
* Than are dreamt of in your philosophy.
Hamlet(1.5.185-8)
(* HORATIO
* O day and night, but this is wondrous strange!
* HORATIO
* My God, this is unbelievably strange.
* HAMLET
* And therefore as a stranger give it welcome.
* There are more things in heaven and earth, Horatio,
* Than are dreamt of in your philosophy.
Hamlet(1.5.185-8)
package main
import (
"fmt"
)
type asdf = struct {
x int
}