bftkv

package module
v0.0.0-...-cd85d4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

README

bftkv

BFTKV is a distributed key-value storage which is tolerant to Byzantine fault. See Abstract for details.

GoDoc

Additional documents:

Design Document (restricted)

Paper (draft)

HTTP-API

Implementation Notes

Test Notes

Setup

  1. Install Go 1.13.
  2. go get -u github.com/yahoo/bftkv
  3. Install GnuPG 2.x
  4. Install Docker (if you want to run BFTKV in a Docker container)
  5. Run setup.sh in scripts (setup.sh -host bftkv for Docker)
  6. If bftkv runs with KeyTransparency, run $GOPATH/src/github.com/google/keytranspreancy/scripts/gen_bftkv_keys.sh

Build

# change to the directory where the source code is checked out
cd bftkv
go install -v github.com/yahoo/bftkv/cmd/bftkv

Parameters

A list of parameters that can be supplied to bftkv is given below:

Flag     Purpose                               Default
-home    Path to PGP home directory,           ~/.gnupg
-sec     Secret key ring path,                 $home/secring.gpg
-pub     Public key ring path,                 $home/pubring.gpg
-rev     Revocation list path,                 $home/revocation.gpg
-db      Database path,                        db
-api     Http api address,                     localhost:5792
-ws      Web socket port,                      5001

Run Options

  1. Run a node bftkv -home gnupg.key

  2. Run a BFTKV cluster cd scripts/run; ../run.sh

  3. Run a BFTKV cluster in Docker

docker build -t bftkv .
docker run -d bftkv

Visualization

BFTKV includes a visualization tool (located in visual/) for observing the current system state. The tool can display

  • Trust graphs for the servers
  • Read, write and sign requests sent to the servers
  • Revoked and inaccessible servers

To show the graph, run run.sh and open visual/index.html.

Write in Action
Write
Revoke on Read in Action
Revoke on Read

License

Copyright 2017, Yahoo Holdings Inc.

Licensed under the terms of the Apache license. See LICENSE file in project root for terms.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInsufficientNumberOfQuorum         = NewError("insufficient number of quorum")
	ErrInsufficientNumberOfResponses      = NewError("insufficient number of responses")
	ErrInsufficientNumberOfValidResponses = NewError("insufficient number of valid responses")
	ErrInvalidQuorumCertificate           = NewError("invalid quorum certficate")
	ErrInvalidTimestamp                   = NewError("invalid timestamp")
	ErrInvalidSignRequest                 = NewError("invalid signature request")
	ErrPermissionDenied                   = NewError("permission denied")
	ErrBadTimestamp                       = NewError("bad timestamp")
	ErrEquivocation                       = NewError("equivocation error")
	ErrInvalidVariable                    = NewError("invalid variable")
	ErrUnknownCommand                     = NewError("unknown command")
	ErrMalformedRequest                   = NewError("malformed request")
	ErrNoMoreWrite                        = NewError("no more write")
	ErrAuthenticationFailure              = NewError("authentication failure")
	ErrExist                              = NewError("already exist")
	ErrInvalidUserID                      = NewError("invalid user ID")
	ErrInvalidResponse                    = NewError("invalid response")
)

Functions

func ErrorFromString

func ErrorFromString(s string) error

func NewError

func NewError(s string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL