Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateTotals ¶
func CalculateTotals(block *Block)
nolint CalculateTotals will calculate totals for a block.
func HandlerMetrics ¶
func HandlerMetrics(w http.ResponseWriter, r *http.Request)
HandlerMetrics is a HTTP response handler for /metrics.
func RunMetrics ¶
RunMetrics will run the metrics collection endpoint.
Types ¶
type Block ¶
type Block struct { Header Header `json:"header"` Txs []Transaction `json:"transactions"` }
Block defines a block on the Dusk blockchain.
type Blocks ¶
type Blocks struct {
Blocks []Block `json:"blocks"`
}
Blocks is the placeholder for blocks.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper for a gRPC client. It establishes connection with the server on startup, and then handles requests from other components over the RPCBus.
func InitRPCClients ¶
InitRPCClients opens the connection with the Rusk gRPC server, and initializes the different clients which can speak to the Rusk server.
As the Rusk server is a fundamental part of the node functionality, this function will panic if the connection can not be established successfully.
type DuskInfo ¶
type DuskInfo struct { ContractsCreated int64 TokenTransfers int64 ContractCalls int64 DuskTransfers int64 BlockSize float64 LoadTime float64 TotalDusk *big.Int EffectiveBlockTime int64 GQLEndpoint string GQLClient *graphql.Client NodeAPIPort int }
DuskInfo is the placeholder for exporter metrics.
type Header ¶
type Header struct { Version uint8 `json:"version"` // Block version byte Height uint64 `json:"height"` // Block height Timestamp string `json:"timestamp"` // Block timestamp GasLimit uint64 `json:"gaslimit"` // Block gas limit PrevBlockHash []byte `json:"prev-hash"` // Hash of previous block (32 bytes) Seed []byte `json:"seed"` // Marshaled BLS signature or hash of the previous block seed (32 bytes) GeneratorBlsPubkey []byte `json:"generator"` // Generator BLS Public Key (96 bytes) //*Certificate `json:"certificate"` // Block certificate Hash []byte `json:"hash"` // Hash of all previous fields }
Header defines a block header on a Dusk block.
type Transaction ¶
type Transaction struct { // Inputs []byte `json:"inputs,omitempty"` // Outputs []byte `json:"outputs"` // Fee *byte `json:"fee,omitempty"` // Proof []byte `json:"proof,omitempty"` Data []byte `json:"data,omitempty"` }
Transaction according to the Phoenix model.