diff --git a/client/value.go b/client/value.go new file mode 100644 index 0000000000000000000000000000000000000000..342aea66cc536113b49ead9e465ef6fac1408045 --- /dev/null +++ b/client/value.go @@ -0,0 +1,64 @@ +package client + +import ( + "fmt" + "net/http" + + webapi_attachments "github.com/iotaledger/goshimmer/plugins/webapi/value/attachments" + webapi_gettxn "github.com/iotaledger/goshimmer/plugins/webapi/value/gettransactionbyid" + webapi_sendtxn "github.com/iotaledger/goshimmer/plugins/webapi/value/sendtransaction" + webapi_unspentoutputs "github.com/iotaledger/goshimmer/plugins/webapi/value/unspentoutputs" +) + +const ( + routeAttachments = "value/attachments" + routeGetTxnByID = "value/transactionByID" + routeSendTxn = "value/sendTransaction" + routeUnspentOutputs = "value/unspentOutputs" +) + +// GetAttachments gets the attachments of a transaction ID +func (api *GoShimmerAPI) GetAttachments(base58EncodedTxnID string) (*webapi_attachments.Response, error) { + res := &webapi_attachments.Response{} + if err := api.do(http.MethodGet, func() string { + return fmt.Sprintf("%s?txnID=%s", routeAttachments, base58EncodedTxnID) + }(), nil, res); err != nil { + return nil, err + } + + return res, nil +} + +// GetTransactionByID gets the transaction of a transaction ID +func (api *GoShimmerAPI) GetTransactionByID(base58EncodedTxnID string) (*webapi_gettxn.Response, error) { + res := &webapi_gettxn.Response{} + if err := api.do(http.MethodGet, func() string { + return fmt.Sprintf("%s?txnID=%s", routeGetTxnByID, base58EncodedTxnID) + }(), nil, res); err != nil { + return nil, err + } + + return res, nil +} + +// GetUnspentOutputs return unspent output IDs of addresses +func (api *GoShimmerAPI) GetUnspentOutputs(addresses []string) (*webapi_unspentoutputs.Response, error) { + res := &webapi_unspentoutputs.Response{} + if err := api.do(http.MethodPost, routeUnspentOutputs, + &webapi_unspentoutputs.Request{Addresses: addresses}, res); err != nil { + return nil, err + } + + return res, nil +} + +// SendTransaction sends the transaction(bytes) to Tangle and returns transaction ID +func (api *GoShimmerAPI) SendTransaction(txnBytes []byte) (string, error) { + res := &webapi_sendtxn.Response{} + if err := api.do(http.MethodPost, routeSendTxn, + &webapi_sendtxn.Request{TransactionBytes: txnBytes}, res); err != nil { + return "", err + } + + return res.TransactionID, nil +} diff --git a/dapps/valuetransfers/packages/transaction/outputid.go b/dapps/valuetransfers/packages/transaction/outputid.go index 3eadb0977520e425dc3fea61fd743ccaf665c893..b8386d60dbc42dfbbb7bb78a73481fb14999284f 100644 --- a/dapps/valuetransfers/packages/transaction/outputid.go +++ b/dapps/valuetransfers/packages/transaction/outputid.go @@ -1,6 +1,7 @@ package transaction import ( + "fmt" "github.com/mr-tron/base58" "github.com/iotaledger/hive.go/marshalutil" @@ -19,6 +20,27 @@ func NewOutputID(outputAddress address.Address, transactionID ID) (outputID Outp return } +// OutputIDFromBase58 creates an output id from a base58 encoded string. +func OutputIDFromBase58(base58String string) (outputid OutputID, err error) { + // decode string + bytes, err := base58.Decode(base58String) + if err != nil { + return + } + + // sanitize input + if len(bytes) != OutputIDLength { + err = fmt.Errorf("base58 encoded string does not match the length of a output id") + + return + } + + // copy bytes to result + copy(outputid[:], bytes) + + return +} + // OutputIDFromBytes unmarshals an OutputID from a sequence of bytes. func OutputIDFromBytes(bytes []byte) (result OutputID, consumedBytes int, err error) { // parse the bytes diff --git a/pluginmgr/webapi/plugins.go b/pluginmgr/webapi/plugins.go index a630d587052a1ec0611a98f56d6ec72c927e07c4..f591b6e7a3c956e8bf7cc5dac24ec834b8d9a032 100644 --- a/pluginmgr/webapi/plugins.go +++ b/pluginmgr/webapi/plugins.go @@ -9,6 +9,7 @@ import ( "github.com/iotaledger/goshimmer/plugins/webapi/info" "github.com/iotaledger/goshimmer/plugins/webapi/message" "github.com/iotaledger/goshimmer/plugins/webapi/spammer" + "github.com/iotaledger/goshimmer/plugins/webapi/value" "github.com/iotaledger/goshimmer/plugins/webauth" "github.com/iotaledger/hive.go/node" ) @@ -23,4 +24,5 @@ var PLUGINS = node.Plugins( autopeering.Plugin, info.Plugin, fpctest.Plugin, + value.Plugin, ) diff --git a/plugins/analysis/dashboard/frontend/src/app/stores/FPCStore.tsx b/plugins/analysis/dashboard/frontend/src/app/stores/FPCStore.tsx index 1e252a04c6eb1f73b7813caa2ba68ad0db7e863f..7f6f4cc6ac4137fb1e8b6a93ba134adcdbbda850 100644 --- a/plugins/analysis/dashboard/frontend/src/app/stores/FPCStore.tsx +++ b/plugins/analysis/dashboard/frontend/src/app/stores/FPCStore.tsx @@ -3,6 +3,7 @@ import {action, computed, observable, ObservableMap} from "mobx"; import Col from "react-bootstrap/Col"; import * as React from "react"; import {registerHandler, WSMsgType} from "app/misc/WS"; +<<<<<<< HEAD import {Link} from 'react-router-dom'; export class Node { @@ -20,13 +21,39 @@ function SetColor(opinion) { enum Opinion { Like = 1, Dislike +======= + +export class Node { + id: number; + opinion: number = 0; +} + +export function LightenDarkenColor(col, amt) { + var num = parseInt(col, 16); + var r = (num >> 16) + amt; + var b = ((num >> 8) & 0x00FF) + amt; + var g = (num & 0x0000FF) + amt; + var newColor = g | (b << 8) | (r << 16); + return newColor.toString(16); +} + +function SetColor(opinion) { + if (opinion == 0) { + return "#BD0000" + } + return "#00BD00" +>>>>>>> develop } class VoteContext { nodeid: string; rounds: number; opinions: number[]; +<<<<<<< HEAD status: number; +======= + like: number; +>>>>>>> develop } class Conflict { nodesview: Map<string, VoteContext> @@ -166,4 +193,4 @@ function getColorShade(eta) { if (eta > 0.2) return "#FF2A2A"; if (eta > 0.1) return "#D40000"; return "#800000"; -} \ No newline at end of file +} diff --git a/plugins/analysis/dashboard/packrd/packed-packr.go b/plugins/analysis/dashboard/packrd/packed-packr.go index 781e26b1d9d9b4a371fdace9ebecacc02eeedd3e..109e4ccf36d50874bfdb028138ee8a3c14116d9c 100644 --- a/plugins/analysis/dashboard/packrd/packed-packr.go +++ b/plugins/analysis/dashboard/packrd/packed-packr.go @@ -22,7 +22,6 @@ var _ = func() error { } g.DefaultResolver = hgr - func() { b := packr.New("AnalysisDashboard_Assets", "./frontend/src/assets") b.SetResolver("index.html", packr.Pointer{ForwardBox: gk, ForwardPath: "a531f1ecaa4c59f1b1b4d21b3a1bcddf"}) diff --git a/plugins/webapi/value/attachments/handler.go b/plugins/webapi/value/attachments/handler.go new file mode 100644 index 0000000000000000000000000000000000000000..71cca4df720c44af2312ca0178c1a61ebe02cef3 --- /dev/null +++ b/plugins/webapi/value/attachments/handler.go @@ -0,0 +1,68 @@ +package attachments + +import ( + "net/http" + + "github.com/iotaledger/goshimmer/dapps/valuetransfers" + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/transaction" + "github.com/iotaledger/goshimmer/plugins/webapi/value/utils" + "github.com/labstack/echo" + "github.com/labstack/gommon/log" +) + +// Handler gets the value attachments. +func Handler(c echo.Context) error { + txnID, err := transaction.IDFromBase58(c.QueryParam("txnID")) + if err != nil { + log.Info(err) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + + var valueObjs []ValueObject + + // get txn by txn id + txnObj := valuetransfers.Tangle.Transaction(txnID) + if !txnObj.Exists() { + return c.JSON(http.StatusNotFound, Response{Error: "Transaction not found"}) + } + txn := utils.ParseTransaction(txnObj.Unwrap()) + + // get attachements by txn id + for _, attachmentObj := range valuetransfers.Tangle.Attachments(txnID) { + if !attachmentObj.Exists() { + continue + } + attachment := attachmentObj.Unwrap() + + // get payload by payload id + payloadObj := valuetransfers.Tangle.Payload(attachment.PayloadID()) + if !payloadObj.Exists() { + continue + } + payload := payloadObj.Unwrap() + + // append value object + valueObjs = append(valueObjs, ValueObject{ + ID: payload.ID().String(), + ParentID0: payload.TrunkID().String(), + ParentID1: payload.BranchID().String(), + Transaction: txn, + }) + } + + return c.JSON(http.StatusOK, Response{Attachments: valueObjs}) +} + +// Response is the HTTP response from retreiving value objects. +type Response struct { + Attachments []ValueObject `json:"attachments,omitempty"` + Error string `json:"error,omitempty"` +} + +// ValueObject holds the information of a value object. +type ValueObject struct { + ID string `json:"id"` + ParentID0 string `json:"parent0_id"` + ParentID1 string `json:"parent1_id"` + Transaction utils.Transaction `json:"transaction"` +} diff --git a/plugins/webapi/value/gettransactionbyid/handler.go b/plugins/webapi/value/gettransactionbyid/handler.go new file mode 100644 index 0000000000000000000000000000000000000000..3ae7e4fd029bdb77af3359aa8664099c3c68b3af --- /dev/null +++ b/plugins/webapi/value/gettransactionbyid/handler.go @@ -0,0 +1,44 @@ +package gettransactionbyid + +import ( + "net/http" + + "github.com/iotaledger/goshimmer/dapps/valuetransfers" + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/transaction" + "github.com/iotaledger/goshimmer/plugins/webapi/value/utils" + "github.com/labstack/echo" + "github.com/labstack/gommon/log" +) + +// Handler gets the transaction by id. +func Handler(c echo.Context) error { + txnID, err := transaction.IDFromBase58(c.QueryParam("txnID")) + if err != nil { + log.Info(err) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + + // get txn by txn id + txnObj := valuetransfers.Tangle.Transaction(txnID) + if !txnObj.Exists() { + return c.JSON(http.StatusNotFound, Response{Error: "Transaction not found"}) + } + txn := utils.ParseTransaction(txnObj.Unwrap()) + + // TODO: get inclusion state + return c.JSON(http.StatusOK, Response{ + Transaction: txn, + InclusionState: utils.InclusionState{ + Confirmed: true, + Conflict: false, + Liked: true, + }, + }) +} + +// Response is the HTTP response from retreiving transaction. +type Response struct { + Transaction utils.Transaction `json:"transaction,omitempty"` + InclusionState utils.InclusionState `json:"inclusion_state,omitempty"` + Error string `json:"error,omitempty"` +} diff --git a/plugins/webapi/value/plugin.go b/plugins/webapi/value/plugin.go new file mode 100644 index 0000000000000000000000000000000000000000..72facce9182a959913a67031ecdf92ea0d3b40ca --- /dev/null +++ b/plugins/webapi/value/plugin.go @@ -0,0 +1,27 @@ +package value + +import ( + "github.com/iotaledger/goshimmer/plugins/webapi" + "github.com/iotaledger/goshimmer/plugins/webapi/value/attachments" + "github.com/iotaledger/goshimmer/plugins/webapi/value/gettransactionbyid" + "github.com/iotaledger/goshimmer/plugins/webapi/value/sendtransaction" + "github.com/iotaledger/goshimmer/plugins/webapi/value/testsendtxn" + "github.com/iotaledger/goshimmer/plugins/webapi/value/unspentoutputs" + "github.com/iotaledger/hive.go/node" +) + +// PluginName is the name of the web API DRNG endpoint plugin. +const PluginName = "WebAPI Value Endpoint" + +var ( + // Plugin is the plugin instance of the web API DRNG endpoint plugin. + Plugin = node.NewPlugin(PluginName, node.Enabled, configure) +) + +func configure(_ *node.Plugin) { + webapi.Server.GET("value/attachments", attachments.Handler) + webapi.Server.POST("value/unspentOutputs", unspentoutputs.Handler) + webapi.Server.POST("value/sendTransaction", sendtransaction.Handler) + webapi.Server.POST("value/testSendTxn", testsendtxn.Handler) + webapi.Server.GET("value/transactionByID", gettransactionbyid.Handler) +} diff --git a/plugins/webapi/value/sendtransaction/handler.go b/plugins/webapi/value/sendtransaction/handler.go new file mode 100644 index 0000000000000000000000000000000000000000..b1dfa63d99ed7f3b85b4ac1432f4e9e4ab1ecc61 --- /dev/null +++ b/plugins/webapi/value/sendtransaction/handler.go @@ -0,0 +1,48 @@ +package sendtransaction + +import ( + "net/http" + + "github.com/iotaledger/goshimmer/dapps/valuetransfers" + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/transaction" + "github.com/iotaledger/goshimmer/plugins/issuer" + "github.com/labstack/echo" + "github.com/labstack/gommon/log" +) + +// Handler sends a transaction. +func Handler(c echo.Context) error { + var request Request + if err := c.Bind(&request); err != nil { + log.Info(err.Error()) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + + // prepare transaction + tx, _, err := transaction.FromBytes(request.TransactionBytes) + if err != nil { + log.Info(err.Error()) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + + // Prepare value payload and send the message to tangle + payload := valuetransfers.ValueObjectFactory().IssueTransaction(tx) + _, err = issuer.IssuePayload(payload) + if err != nil { + log.Info(err.Error()) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + + return c.JSON(http.StatusOK, Response{TransactionID: tx.ID().String()}) +} + +// Request holds the transaction object(bytes) to send. +type Request struct { + TransactionBytes []byte `json:"txn_bytes"` +} + +// Response is the HTTP response from sending transaction. +type Response struct { + TransactionID string `json:"transaction_id,omitempty"` + Error string `json:"error,omitempty"` +} diff --git a/plugins/webapi/value/testsendtxn/handler.go b/plugins/webapi/value/testsendtxn/handler.go new file mode 100644 index 0000000000000000000000000000000000000000..927de126357de3f4c84a88dcf8bc94b77a4370a8 --- /dev/null +++ b/plugins/webapi/value/testsendtxn/handler.go @@ -0,0 +1,84 @@ +package testsendtxn + +import ( + "net/http" + + "github.com/iotaledger/goshimmer/dapps/valuetransfers" + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/address" + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/balance" + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/transaction" + "github.com/iotaledger/goshimmer/plugins/issuer" + "github.com/iotaledger/goshimmer/plugins/webapi/value/utils" + "github.com/labstack/echo" + "github.com/labstack/gommon/log" +) + +// Handler sends a transaction. +func Handler(c echo.Context) error { + var request Request + if err := c.Bind(&request); err != nil { + log.Info(err.Error()) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + + // prepare inputs + outputids := []transaction.OutputID{} + for _, in := range request.Inputs { + id, err := transaction.OutputIDFromBase58(in) + if err != nil { + log.Info(err.Error()) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + outputids = append(outputids, id) + } + inputs := transaction.NewInputs(outputids...) + + // prepare outputs + outmap := map[address.Address][]*balance.Balance{} + for _, out := range request.Outputs { + addr, err := address.FromBase58(out.Address) + if err != nil { + log.Info(err.Error()) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + + // iterate balances + balances := []*balance.Balance{} + for _, b := range out.Balances { + // get token color + color, _, err := balance.ColorFromBytes([]byte(b.Color)) + if err != nil { + log.Info(err.Error()) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + balances = append(balances, balance.New(color, b.Value)) + } + outmap[addr] = balances + } + outputs := transaction.NewOutputs(outmap) + + // prepare transaction + // Note: not signed + tx := transaction.New(inputs, outputs) + + // Prepare value payload and send the message to tangle + payload := valuetransfers.ValueObjectFactory().IssueTransaction(tx) + _, err := issuer.IssuePayload(payload) + if err != nil { + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + + return c.JSON(http.StatusOK, Response{TransactionID: tx.ID().String()}) +} + +// Request holds the inputs and outputs to send. +type Request struct { + Inputs []string `json:"inputs"` + Outputs []utils.Output `json:"outputs"` +} + +// Response is the HTTP response from sending transaction. +type Response struct { + TransactionID string `json:"transaction_id,omitempty"` + Error string `json:"error,omitempty"` +} diff --git a/plugins/webapi/value/unspentoutputs/handler.go b/plugins/webapi/value/unspentoutputs/handler.go new file mode 100644 index 0000000000000000000000000000000000000000..7523fcb52226a1fe00f0e6831125fd398ea6136e --- /dev/null +++ b/plugins/webapi/value/unspentoutputs/handler.go @@ -0,0 +1,78 @@ +package unspentoutputs + +import ( + "net/http" + + "github.com/iotaledger/goshimmer/dapps/valuetransfers" + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/address" + "github.com/iotaledger/goshimmer/plugins/webapi/value/utils" + "github.com/labstack/echo" + "github.com/labstack/gommon/log" +) + +// Handler gets the unspent outputs. +func Handler(c echo.Context) error { + var request Request + if err := c.Bind(&request); err != nil { + log.Info(err.Error()) + return c.JSON(http.StatusBadRequest, Response{Error: err.Error()}) + } + + var unspents []UnspentOutput + for _, strAddress := range request.Addresses { + address, err := address.FromBase58(strAddress) + if err != nil { + log.Info(err.Error()) + continue + } + + outputids := make([]OutputID, 0) + // get outputids by address + for id, outputObj := range valuetransfers.Tangle.OutputsOnAddress(address) { + output := outputObj.Unwrap() + + // TODO: get inclusion state + if output.ConsumerCount() == 0 { + outputids = append(outputids, OutputID{ + ID: id.String(), + InclusionState: utils.InclusionState{ + Confirmed: true, + Conflict: false, + Liked: true, + }, + }) + } + } + + unspents = append(unspents, UnspentOutput{ + Address: strAddress, + OutputIDs: outputids, + }) + } + + return c.JSON(http.StatusOK, Response{UnspentOutputs: unspents}) +} + +// Request holds the addresses to query. +type Request struct { + Addresses []string `json:"addresses,omitempty"` + Error string `json:"error,omitempty"` +} + +// Response is the HTTP response from retreiving value objects. +type Response struct { + UnspentOutputs []UnspentOutput `json:"unspent_outputs,omitempty"` + Error string `json:"error,omitempty"` +} + +// UnspentOutput holds the address and the corresponding unspent output ids +type UnspentOutput struct { + Address string `json:"address"` + OutputIDs []OutputID `json:"output_ids"` +} + +// OutputID holds the output id and its inclusion state +type OutputID struct { + ID string `json:"id"` + InclusionState utils.InclusionState `json:"inclusion_state"` +} diff --git a/plugins/webapi/value/utils/transaction_handler.go b/plugins/webapi/value/utils/transaction_handler.go new file mode 100644 index 0000000000000000000000000000000000000000..308904d55c3e577c0d6f5cdd08b0d2fecc0590f2 --- /dev/null +++ b/plugins/webapi/value/utils/transaction_handler.go @@ -0,0 +1,70 @@ +package utils + +import ( + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/address" + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/balance" + "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/transaction" +) + +// ParseTransaction handle transaction json object. +func ParseTransaction(t *transaction.Transaction) (txn Transaction) { + var inputs []string + var outputs []Output + // process inputs + t.Inputs().ForEachAddress(func(currentAddress address.Address) bool { + inputs = append(inputs, currentAddress.String()) + return true + }) + + // process outputs: address + balance + t.Outputs().ForEach(func(address address.Address, balances []*balance.Balance) bool { + var b []Balance + for _, balance := range balances { + b = append(b, Balance{ + Value: balance.Value(), + Color: balance.Color().String(), + }) + } + t := Output{ + Address: address.String(), + Balances: b, + } + outputs = append(outputs, t) + + return true + }) + + return Transaction{ + Inputs: inputs, + Outputs: outputs, + Signature: t.SignatureBytes(), + DataPayload: t.GetDataPayload(), + } +} + +// Transaction holds the information of a transaction. +type Transaction struct { + Inputs []string `json:"inputs"` + Outputs []Output `json:"outputs"` + Signature []byte `json:"signature"` + DataPayload []byte `json:"data_payload"` +} + +// Output consists an address and balances +type Output struct { + Address string `json:"address"` + Balances []Balance `json:"balances"` +} + +// Balance holds the value and the color of token +type Balance struct { + Value int64 `json:"value"` + Color string `json:"color"` +} + +// InclusionState represents the different states of an OutputID +type InclusionState struct { + Confirmed bool `json:"confirmed,omitempty"` + Conflict bool `json:"conflict,omitempty"` + Liked bool `json:"liked,omitempty"` +} diff --git a/tools/docker-network/README.md b/tools/docker-network/README.md index 5b0d1f61eaf080d4cb14575a496fdeee5f11e107..bb00f066e35603c5b9c62e976e6301aaddbcb6e2 100644 --- a/tools/docker-network/README.md +++ b/tools/docker-network/README.md @@ -5,7 +5,7 @@ Running `./run.sh` spins up a GoShimmer network within Docker as schematically shown in the figure above. `N` defines the number of `peer_replicas` and can be specified when running the network. The peers can communicate freely within the Docker network -while the autopeering network visualizer, `master_peer's` dashboard and web API are reachable from the host system on the respective ports. +while the analysis dashboard, `master_peer's` dashboard and web API are reachable from the host system on the respective ports. The different containers (`entry_node`, `peer_master`, `peer_replica`) are based on the same config file and separate config file and modified as necessary, respectively. @@ -18,7 +18,7 @@ Prerequisites: - Docker compose: file format 3.5 Reachable from the host system -- autopeering visualizer: http://localhost:9000 +- analysis dashboard (autopeering visualizer): http://localhost:9000 - `master_peer's` dashboard: http: http://localhost:8081 - `master_peer's` web API: http: http://localhost:8080 diff --git a/tools/docker-network/config.docker.json b/tools/docker-network/config.docker.json index 107be6a26ff86fa853b874d28bba265b8515959b..b32bf018bdad2d8a99e1c41d0816cee22f2867dc 100644 --- a/tools/docker-network/config.docker.json +++ b/tools/docker-network/config.docker.json @@ -6,7 +6,7 @@ "server": { "bindAddress": "0.0.0.0:1888" }, - "webInterface": { + "dashboard": { "bindAddress": "0.0.0.0:9000", "dev": false } diff --git a/tools/docker-network/docker-compose.yml b/tools/docker-network/docker-compose.yml index b97c9028f1d385ccce2082a0b25f8f1c8f065189..b985605dd882870f0397564149916f7dbf576a7c 100644 --- a/tools/docker-network/docker-compose.yml +++ b/tools/docker-network/docker-compose.yml @@ -11,9 +11,9 @@ services: --autopeering.seed=uuDCzsjyLNQ17/7fWKPNMYmr4IWuaVRf7qKqRL0v/6c= --autopeering.entryNodes= --analysis.server.bindAddress=0.0.0.0:1888 - --node.enablePlugins=analysis-server,analysis-webinterface,analysis-dashboard - --node.disablePlugins=portcheck,dashboard - --node.enablePlugins=bootstrap + --analysis.dashboard.bindAddress=0.0.0.0:9000 + --node.enablePlugins=analysis-server,analysis-dashboard + --node.disablePlugins=portcheck,dashboard,analysis-client,gossip,drng,issuer,sync,metrics,messagelayer,webapi,webapibroadcastdataendpoint,webapifindtransactionhashesendpoint,webapigetneighborsendpoint,webapigettransactionobjectsbyhashendpoint,webapigettransactiontrytesbyhashendpoint volumes: - ./config.docker.json:/tmp/config.json:ro - goshimmer-cache:/go diff --git a/tools/entry-node/README.md b/tools/entry-node/README.md index 1472c5d49332d2ff3eaf9a805585712adcc415f1..086371ec43698fd86f219b178ae2763d414b4ac9 100644 --- a/tools/entry-node/README.md +++ b/tools/entry-node/README.md @@ -8,7 +8,7 @@ The GoShimmer DB is persisted in a named Docker volume. The entry node exposes the following ports on the host: - 14626/udp (Autopeering) - 188/tcp (Analysis Server) -- 80/tcp (Analysis Visualizer) +- 80/tcp (Analysis Dashboard) ## How to run diff --git a/tools/entry-node/docker-compose.yml b/tools/entry-node/docker-compose.yml index b400783439a8b43a9bad7460e4567dc21cf29eec..64ba01d30ab0bb5b7134b0a4c1045ef50db1a827 100644 --- a/tools/entry-node/docker-compose.yml +++ b/tools/entry-node/docker-compose.yml @@ -11,7 +11,7 @@ services: - entrynode:/mainnetdb ports: - "1888:188/tcp" # analysis server - - "8080:80/tcp" # analysis HTTP server + - "8080:80/tcp" # analysis dashboard - "14626:14626/udp" # autopeering discovery restart: unless-stopped command: > @@ -19,8 +19,8 @@ services: --autopeering.entryNodes= --analysis.client.serverAddress= --analysis.server.bindAddress=0.0.0.0:1888 - --analysis.webInterface.bindAddress=0.0.0.0:8080 - --node.enablePlugins=analysis-server,analysis-webinterface + --analysis.dashboard.bindAddress=0.0.0.0:8080 + --node.enablePlugins=analysis-server,analysis-dashboard --node.disablePlugins=analysis-client,gossip,portcheck,spa,dashboard,webapi,webapibroadcastdataendpoint,webapifindtransactionhashesendpoint,webapigetneighborsendpoint,webapigettransactionobjectsbyhashendpoint,webapigettransactiontrytesbyhashendpoint volumes: