Proof of History in Golang. Taking key concepts from the Solana whitepaper and providing examples in Go

Proof of History - Concepts in Go

 ________  ________  ___  ___         
|\   __  \|\   __  \|\  \|\  \        
\ \  \|\  \ \  \|\  \ \  \\\  \       
 \ \   ____\ \  \\\  \ \   __  \      
  \ \  \___|\ \  \\\  \ \  \ \  \ ___ 
   \ \__\    \ \_______\ \__\ \__\\__\
    \|__|     \|_______|\|__|\|__\|__| go!
                           

Objective

Provide source-code concepts from the Solana whitepaper in Golang to understand proof-of-history and the mechanics behind Solana further.

Used as an exercise to understand Proof of History further by writing a simple implementation as described in the whitepaper.

Usage

make build

Build from source

./bin/poh-golang

Run a proof-of-history to generate the hashrate on a single core, and validate the results on all available CPU cores

CPU Cores 8
Generate Hashrate 1482625 p/sec (1-core)
Verify Hashrate 4701530 p/sec (8-cores)
Verify Hashrate 587691 p/core

Benchmarks

make bench

Simulate benchmarks to generate proof-of-history (POH) using a single core, and verify the output on multiple cores.

Roadmap

  • Calculate hashrate for POH generation (single core)
  • Calculate hashrate for POH validation (multiple cores)
  • Implement Solana hash table indexes for user addresses and packet payloads described in the whitepaper.
  • Add GPU support via Cuda implementation of SHA256
  • Synchronize multiple POH validators on the local network
  • Implement event signatures
  • Add basic Proof of Stake implementation as per the Solana whitepaper
  • Implement vote support for PoS implementation
  • Implement election for PoS and simulate PoH generator failure
  • Add PoH election support and secondary validator promotion
  • Implement Streaming proof of Replication using basic CBC encryption and XOR inputs
Owner
Ben Duncan
I have a passion for tech, building companies, and assembling world-class engineering teams. @atmail founder @aws Startup SA. Surfer & ocean addict.
Ben Duncan
Similar Resources

Proof-Of-Work blockchian written in Go

gagchain (Gagcoin) Experimental blockchain built in Golang. It is still under development and features will be updated regulary. Features Custom TCP s

Feb 21, 2022

Pet-blockchain-go is a simple proof of work mining algorithm in Go.

pet-blockchain-go Pet-blockchain-go is a simple proof of work mining algorithm in Go. Inspired by: cosme12 / SimpleCoin nosequeldeebee / blockchain-tu

Mar 10, 2022

sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP

sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP

sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP. (demo)

Jan 9, 2023

An easy-to-use XChaCha20-encryption wrapper for io.ReadWriteCloser (even lossy UDP) using ECDH key exchange algorithm, ED25519 signatures and Blake3+Poly1305 checksums/message-authentication for Go (golang). Also a multiplexer.

Quick start Prepare keys (on both sides): [ -f ~/.ssh/id_ed25519 ] && [ -f ~/.ssh/id_ed25519.pub ] || ssh-keygen -t ed25519 scp ~/.ssh/id_ed25519.pub

Dec 30, 2022

Signature-server - stores transaction blobs and uses predefined secret key to sign and verify those transactions

Signature Server Signature server stores transaction blobs and uses predefined s

Feb 14, 2022

:key: Idiotproof golang password validation library inspired by Python's passlib

passlib for go 100% modules-free. Python's passlib is quite an amazing library. I'm not sure there's a password library in existence with more thought

Dec 19, 2022

Simple, fast and safe cross-platform linear binary stream communication protocol. AES key exchange based on ecc secp256k1

FFAX Protocol 2 dev 简体中文 Welcome to FFAX Protocol v2 Quick start go get github.com/RealFax/FFAX func example() { listener, err := net.Listen("tcp",

Mar 21, 2022

This project parses all mails from google-search within key-words and ban-words

mailParser This project parses all mails from google-search within key-words and ban-words For launch program create the input file first string conta

Feb 2, 2022

generate a chia address by public key, chia公钥生成地址

chia-address-generator This repo is a hack way to generate an address from publicKey. So it's not a good enough way to use it in prod, use it just for

Mar 9, 2022
A web-based demonstration of blockchain concepts.
A web-based demonstration of blockchain concepts.

Blockchain Demo A web-based demonstration of blockchain concepts. This is a very basic visual introduction to the concepts behind a blockchain. We int

Jan 7, 2023
Decrypt passwords/cookies/history/bookmarks from the browser.
Decrypt passwords/cookies/history/bookmarks from the browser.

hack-browser-data is an open-source tool that could help you decrypt data ( passwords|bookmarks|cookies|history ) from the browser. It supports the most popular browsers on the market and runs on Windows, macOS and Linux.

Jan 9, 2023
Public key derivator for ECDSA (without knowledge of the private key)

A proof of concept of a public key derivation for ECDSA (without knowledge of the private key) It is a demonstration of how to implement a simple key

Nov 9, 2022
Proof of Work Algorithms For Golang

Proof of Work Algorithms Overview Note: This library is still in active developm

Jan 7, 2022
Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and interoperable with Ethereum.

Evmos Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and interoperable with Ethereum. It's built using the Co

Dec 31, 2022
Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK.
Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK.

Ethermint Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on to

Jan 3, 2023
Go implementation of Ethereum proof of stake

Prysm: An Ethereum Consensus Implementation Written in Go This is the core repository for Prysm, a Golang implementation of the Ethereum Consensus spe

Jan 1, 2023
Proof on concept with metamask

Local Run go run ./app.go # generate swagger go get github.com/swaggo/swag/cmd/swag Swag init -g app.go Local Docker Compose Run # rebuild docker ima

Aug 6, 2022
A Verifyable Chain Relay for Proof of Stake Blockchains

A Verifyable Chain Relay for Proof of Stake Blockchains This repository contains

Nov 11, 2022
Proof of Work (POW) using SHA1 hashes

Important The main repository is hosted at Codeberg. Proof of Work (SHA1) This repository contains a naive implementation of a Proof of Work (POW) usi

Dec 23, 2021