This project is a demonstration implementation that includes only the core components of the system described in the paper:
"Pistis: A Decentralized Knowledge Graph Platform Enabling Ownership-Preserving SPARQL Querying" (VLDB 2025)
It consists of three main components:
- Merkle Trie Construction (
trie.go): A prefix tree for RDF triples, similar to a Merkle Patricia Trie. - Encrypted Merkle Trie (
emst.go): Implements the STRP algorithm, including padding, encryption, and permutation. - VO-SPARQL Secure Query Verification (
vo_sparql.go): Performs secure SPARQL query verification using secret sharing and MPC principles.
.
βββ trie.go # Implements the Merkle Trie for RDF data
βββ emst.go # Encrypted Merkle Trie with STRP: Padding, Encrypting, Permuting
βββ vo_sparql.go # Secure SPARQL verification using MPC
βββ go.mod # Go module definition
βββ README.md # This file- Go 1.17+
- LevelDB (for trie persistence)
- ABY Framework (if using real MPC, optional)
- Unix-like OS (recommended for subprocess execution)
Install Go and dependencies:
# Ubuntu
sudo apt install golang libleveldb-dev
# MacOS (with Homebrew)
brew install go leveldbgit clone https://github.com/garlicZhou/pistis
cd pistisgo mod init pistis
go mod tidygo run xx.goThe trie supports:
- Insertion of RDF triples with S/P/O hashing
- RLP encoding and SHA-256 for Merkle hash generation
- On-disk persistence using LevelDB
Implements the STRP Algorithm:
- Padding
- Encrypting
- Permuting
- Simulates secret sharing of RDF query answers
- Demonstrates verifiable computation with reconstruction
To test the performance of Pistis in real blockchain scenarios, please replace the trie.go file in the ETHMST project with the trie.go file from this project.
Also, add the other Go files (emst.go, vo_sparql.go, etc.) to the appropriate directory in ETHMST for compatibility.
The ETHMST repository address is:
π ETHMST GitHub Repository
This is a research prototype inspired by the VLDB 2025 paper.
For academic use only.