dela – go.dedis.ch/dela Index | Files | Directories

package dela

import "go.dedis.ch/dela"

Package dela defines the logger.

Dela stands for DEDIS Ledger Architecture. It defines the modules that will be combined to deploy a distributed public ledger.

Dela is using a global logger with some default parameters. It is disabled by default and the level can be increased using a environment variable:

LLVL=trace go test ./...
LLVL=info go test ./...
LLVL=debug LOGF=$HOME/dela.log go test ./...

Index

Constants

const EnvLogFile = "LOGF"

EnvLogFile is the name of the environment variable to log in a given file.

const EnvLogLevel = "LLVL"

EnvLogLevel is the name of the environment variable to change the logging level.

Variables

var Logger = zerolog.New(consoleOut).Level(defaultLevel).
	With().Timestamp().Logger().
	With().Caller().Logger().
	Hook(promHook{})

Logger is a globally available logger instance. By default, it only prints error level messages but it can be changed through a environment variable.

var PromCollectors []prometheus.Collector

PromCollectors exposes Prometheus collectors created in Dela. By default Dela doesn't register the metrics. It is left to the user to use the registry of its choice and register the collectors. For example with the default:

prometheus.DefaultRegisterer.MustRegister(PromCollectors...)

Note that the collectors can be registered only once and will panic otherwise. This slice is not thread-safe and should only be initialized in init() functions.

Source Files

mod.go

Directories

PathSynopsis
cliPackage cli defines the Builder type, which allows one to build a CLI application in a modular way.
cli/cryptoPackage main provides a cli for crypto operations like generating keys or displaying specific key formats.
cli/nodePackage node defines the Builder type, which builds an CLI application to controle a node.
cli/node/memcoinPackage main implements a ledger based on in-memory components.
cli/ucliPackage ucli provides a cli builder implementation based on the urfave/cli library.
contracts
contracts/accessPackage access implements a native contract to handle access.
contracts/access/controllerPackage controller implements a controller for the access contract.
contracts/valuePackage value implements a simple native contract that can store, delete, and display values.
contracts/value/controller
corePackage core implements commonly used tools.
core/accessPackage access defines the interfaces for Access Rights Controls.
core/access/darcPackage darc implements Distributed Access Rights Controls.
core/access/darc/json
core/access/darc/typesPackage types implements the darc messages.
core/executionPackage execution defines the service to execute a step in a validation batch.
core/execution/nativePackage native implements an execution service to run native smart contracts.
core/orderingPackage ordering defines the interface of the ordering service.
core/ordering/cosipbftPackage cosipbft implements an ordering service using collective signatures for the consensus.
core/ordering/cosipbft/authorityPackage authority defines the collective authority for cosipbft.
core/ordering/cosipbft/authority/json
core/ordering/cosipbft/blockstorePackage blockstore defines the different storage the ordering service is using.
core/ordering/cosipbft/blocksyncPackage blocksync defines a block synchronizer for the ordering service.
core/ordering/cosipbft/blocksync/json
core/ordering/cosipbft/blocksync/typesPackage types implements the network messages for a synchronization.
core/ordering/cosipbft/contracts
core/ordering/cosipbft/contracts/viewchangePackage viewchange implements a native smart contract to update the roster of a chain.
core/ordering/cosipbft/controllerPackage controller implements a minimal controller for cosipbft.
core/ordering/cosipbft/json
core/ordering/cosipbft/pbftPackage pbft defines a state machine to perform PBFT using collective signatures.
core/ordering/cosipbft/typesPackage types implements the network messages for cosipbft.
core/ordering/powPackage pow implements a Proof-of-Work ordering service.
core/storePackage store defines the primitives of a simple key/value storage.
core/store/hashtreePackage hashtree defines the specialization of the store as a Merkle tree.
core/store/hashtree/binprefixPackage binprefix implements the hash tree interface by following the merkle binary prefix tree algorithm.
core/store/kvPackage kv defines the abstraction for a key/value database.
core/store/kv/controllerPackage controller implements a CLI controller for the key/value database.
core/store/prefixed
core/txnPackage txn defines the abstraction of transactions.
core/txn/poolPackage pool defines the interface for a transaction pool.
core/txn/pool/controllerPackage controller implements a controller for the pool
core/txn/pool/gossipPackage gossip implements a transaction pool that is using a gossip protocol to spread the transactions to other participants.
core/txn/pool/mem
core/txn/signedPackage signed is an implementation of the transaction abstraction.
core/txn/signed/controllerPackage controller implements a CLI controller to inject a transaction manager.
core/txn/signed/json
core/validationPackage validation defines a validation service that will apply a batch of transactions to a store snapshot.
core/validation/simplePackage simple implements a validation service that executes a batch of transactions sequentially.
core/validation/simple/json
cosiPackage cosi defines a collective signing protocol abstraction.
cosi/flatcosiPackage flatcosi is a flat implementation of a collective signing so that the orchestrator will contact all the participants to require their signatures and then aggregate them to the final one.
cosi/json
cosi/thresholdPackage threshold is a stream-based implementation of a collective signing so that the orchestrator contacts only a subset of the participants.
cosi/threshold/json
cosi/threshold/typesPackage types implements the threshold collective signature and its verifier.
cryptoPackage crypto defines cryptographic primitives shared by the different modules of Dela.
crypto/blsPackage bls implements the cryptographic primitives using the BLS signature scheme and the BN256 elliptic curve.
crypto/bls/commandPackage command defines cli commands for the bls package.
crypto/bls/json
crypto/commonPackage common implements the factories of the crypto primitives to allow the use of multiple algorithms over the same communication channel.
crypto/common/json
crypto/ed25519Package ed25519 implements the cryptographic primitives for the Edwards 25519 elliptic curve.
crypto/ed25519/json
crypto/loaderPackage loader defines an abstraction to store a private, or a public, key in a storage.
dkg
dkg/pedersen
dkg/pedersen/controller
dkg/pedersen/dkgcli
dkg/pedersen/json
dkg/pedersen/types
internal
minoPackage mino defines a minimalist network overlay to communicate between a set of participants.
mino/gossipPackage gossip defines an abstraction to gossip messages to a defined set of participants.
mino/minochPackage minoch is an implementation of Mino that is using channels and a local manager to exchange messages.
mino/minogrpc
mino/minogrpc/certsPackage certs defines a certificate store that will provide primitives to store and get certificates for a given address.
mino/minogrpc/controllerPackage controller implements a controller for minogrpc.
mino/minogrpc/ptypesPackage ptypes contains the protobuf definitions for the implementation of minogrpc.
mino/minogrpc/sessionPackage session defines an abstraction of a session during a distributed RPC.
mino/minogrpc/tokensPackage tokens defines a token holder to generate and validate access tokens.
mino/proxy
mino/proxy/http
mino/proxy/http/controller
mino/routerPackage router defines the primitives to route a packet among a set of participants.
mino/router/treePackage tree is an implementation of a tree-based routing algorithm.
mino/router/tree/json
mino/router/tree/typesPackage types implements the packet and handshake messages for the tree routing algorithm.
serdePackage serde defines the serialization and deserialization mechanisms.
serde/jsonPackage json implements the context engine for a the JSON format.
serde/registryPackage registry defines the format registry mechanism.
serde/xmlPackage xml implements the context engine for the XML encoding.
test
testing
testing/fakePackage fake provides fake implementations for interfaces commonly used in the repository.
Version
v0.1.0 (latest)
Published
Apr 10, 2024
Platform
linux/amd64
Imports
4 packages
Last checked
1 month ago

Tools for package owners.