Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Release 0.17.0 #632

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c8de17a
Logging sinks
Jan 27, 2017
9b48450
Refinements to ChannelLogger and added filters to config
Jan 31, 2017
1fc35fa
Wire up config
Feb 6, 2017
3c277b5
Add captures, fix syslog test
Feb 14, 2017
6259173
Fix draining of channel logger and improve tests
Feb 15, 2017
5b79d41
Replace further instances of old style logging and improve structure
Feb 16, 2017
51a4048
get ahead of rename
Apr 10, 2017
f1182da
Merge in rename
Apr 10, 2017
48141ba
Apply goimports
Apr 10, 2017
6738cc8
Inject logger to ExecTx and friends
Apr 10, 2017
eff7385
Removed logging from HasPermission, ugly to pass log in for each of t…
Apr 11, 2017
69ac8c2
Merge in hyperledger rename/develop
Apr 12, 2017
a29ae39
Merge pull request #574 from silasdavis/hotfix-badges
benjaminbollen Apr 13, 2017
949c7b1
Use docker 1.10.0 and cleanup build image
Apr 13, 2017
c1ce6bb
Merge pull request #576 from silasdavis/fix-ci
Apr 13, 2017
23b629b
remove eris-keys and fix imports
Apr 13, 2017
898cf2a
Merge remote-tracking branch 'silas/logging' into test-pr484
benjaminbollen Apr 13, 2017
bec892f
Merge pull request #578 from benjaminbollen/test-pr484
benjaminbollen Apr 13, 2017
4636271
add extended tendermint config values and correct cs_wal_*
Apr 26, 2017
027076e
Merge pull request #591 from silasdavis/fix-ext-tendermint-config
benjaminbollen Apr 27, 2017
4de1264
Update tendermint in glide
Apr 26, 2017
10e93bc
Fix various things for Tendermint 0.9.2 compatibility
Apr 27, 2017
f0a23cc
make fmt
May 2, 2017
e0225b3
Merge pull request #595 from silasdavis/tm-0.9.2-only
benjaminbollen May 2, 2017
d1ef4fe
Strip back module-specific versioning
Apr 29, 2017
3cc9f9a
Fix broken unsubscribe, and don't rely on go-rpc's definition of Subs…
May 4, 2017
7454c0a
Merge pull request #598 from silasdavis/fix-sub-test-race
benjaminbollen May 4, 2017
ea0bd09
make multiline terminal output the default for cli
May 5, 2017
8da47c0
Merge pull request #599 from silasdavis/terminal-logging
benjaminbollen May 5, 2017
c436654
rename suicide to selfdestruct to match upstream
May 5, 2017
27b8a7f
Don't capture time twice
May 5, 2017
a0973f7
Merge pull request #603 from silasdavis/logging-time
benjaminbollen May 8, 2017
17d3700
Merge pull request #604 from silasdavis/rename-suicide
benjaminbollen May 8, 2017
9ce5b1b
change hasBase to bool return as intended and add check for native co…
May 6, 2017
8f4e266
Merge pull request #606 from silasdavis/snative-tweaks
benjaminbollen May 8, 2017
288737d
clean up storage and account tombstones from BlockCache when account …
May 5, 2017
7e7a2fd
Merge pull request #605 from silasdavis/fix-selfdestruct-542
benjaminbollen May 11, 2017
2fff837
client: # of verbs should match # of arguments in Errorf
zramsay May 11, 2017
ba4907b
Merge pull request #608 from zramsay/fix-error-message
silasdavis May 11, 2017
22e09db
client websocket: add missing verb to error message
zramsay May 15, 2017
7869164
Implement dynamic memory and fix out of bounds issues
May 8, 2017
ab65a80
Merge pull request #607 from silasdavis/evm-arrays
benjaminbollen May 15, 2017
abe5d62
Merge pull request #610 from zramsay/fix-an-error-message
silasdavis May 15, 2017
6d2f518
Merge pull request #596 from silasdavis/remove-module-versioning
benjaminbollen May 24, 2017
04bc5c4
Remove hell since factored out and improved on in https://github.com/…
May 23, 2017
7f6cda4
Step back from (that is remove) the notion of two independent
May 17, 2017
9c25a86
Merge pull request #614 from silasdavis/remove-hell
benjaminbollen Jun 2, 2017
9367725
Merge pull request #613 from silasdavis/logging
benjaminbollen Jun 2, 2017
fc29566
port changes from master
Aug 4, 2017
06b4857
Revert "clean up storage and account tombstones from BlockCache when …
Aug 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# burrow changelog
## v0.16.3
This release adds an stop-gap fix to the `Transact` method so that it never
transfers value with the `CallTx` is generates.

We hard-code `amount = fee` so that no value is transferred
regardless of fee sent. This fixes an invalid jump destination error arising
from transferring value to non-payable functions with newer versions of solidity.
By doing this we can resolve some issues with users of the v0 RPC without making
a breaking API change.

## v0.16.2
This release finalises our accession to the Hyperledger project and updates our
root package namespace to github.com/hyperledger/burrow.

It also includes a bug fix for rpc/V0 so that BroadcastTx can accept any
transaction type and various pieces of internal clean-up.

## v0.16.1
This release was an internal rename to 'Burrow' with some minor other attendant
clean up.

## v0.16.0
This is a consolidation release that fixes various bugs and improves elements
of the architecture across the Monax Platform to support a quicker release
Expand Down
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ check:
@gofmt -l -d ${GOFILES_NOVENDOR}
@gofmt -l ${GOFILES_NOVENDOR} | read && echo && echo "Your marmot has found a problem with the formatting style of the code." 1>&2 && exit 1 || true

# Just fix it
.PHONY: fix
fix:
@goimports -l -w ${GOFILES_NOVENDOR}

# fmt runs gofmt -w on the code, modifying any files that do not match
# the style guide.
.PHONY: fmt
Expand Down Expand Up @@ -67,12 +72,6 @@ install_vendor:
go get github.com/Masterminds/glide
glide install

# hell runs utility tool hell to selectively update glide dependencies
.PHONY: hell
hell:
go build -o ${REPO}/target/hell ./util/hell/cmd/hell/main.go
./target/hell $(filter-out $@,$(MAKECMDGOALS))

# Dumps Solidity interface contracts for SNatives
.PHONY: snatives
snatives:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ For a Vagrant file see [monax-vagrant](https://github.com/monax/monax-vagrant) f

## Usage

Once the server has started, it will begin syncing up with the network. At that point you may begin using it. The preferred way is through our [javascript api](https://github.com/hyperledger/burrow.js), but it is possible to connect directly via HTTP or websocket.
Once the server has started, it will begin syncing up with the network. At that point you may begin using it. The preferred way is through our [javascript api](https://github.com/monax/legacy-contracts.js), but it is possible to connect directly via HTTP or websocket.

## Configuration

Expand Down
16 changes: 8 additions & 8 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
machine:
environment:
GOPATH: $HOME/.go_workspace
REPO: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
DOCKER_VERSION: 1.9.1
DOCKER_MACHINE_VERSION: 0.6.0
REPO: ${GOPATH}/src/github.com/hyperledger/burrow
GO15VENDOREXPERIMENT: 1
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
post:
- git config --global user.email "[email protected]"
- git config --global user.name "Billings the Bot"
- rm -rf ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}
- mkdir -p ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}
- cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME} ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}/.
- rm -rf ${GOPATH%%:*}/src/github.com/hyperledger
- mkdir -p ${GOPATH%%:*}/src/github.com/hyperledger
- cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME} ${GOPATH%%:*}/src/github.com/hyperledger/.

dependencies:
override:
- sudo curl -L -o /usr/bin/docker http://s3-external-1.amazonaws.com/circle-downloads/docker-$DOCKER_VERSION-circleci; sudo chmod 0775 /usr/bin/docker; sudo usermod -a -G docker $USER; true
- sudo service docker start
- sudo apt-get update && sudo apt-get install -y libgmp3-dev
- sudo apt-get install jq curl && go get github.com/Masterminds/glide

Expand Down
15 changes: 11 additions & 4 deletions client/methods/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"github.com/hyperledger/burrow/definitions"
"github.com/hyperledger/burrow/logging"
"github.com/hyperledger/burrow/logging/lifecycle"
"github.com/hyperledger/burrow/logging/loggers"
logging_types "github.com/hyperledger/burrow/logging/types"
)

func unpackSignAndBroadcast(result *rpc.TxResult, logger loggers.InfoTraceLogger) {
func unpackSignAndBroadcast(result *rpc.TxResult, logger logging_types.InfoTraceLogger) {
if result == nil {
// if we don't provide --sign or --broadcast
return
Expand All @@ -45,10 +45,17 @@ func unpackSignAndBroadcast(result *rpc.TxResult, logger loggers.InfoTraceLogger
logging.InfoMsg(logger, "SignAndBroadcast result")
}

func loggerFromClientDo(do *definitions.ClientDo, scope string) (loggers.InfoTraceLogger, error) {
func loggerFromClientDo(do *definitions.ClientDo, scope string) (logging_types.InfoTraceLogger, error) {
lc, err := core.LoadLoggingConfigFromClientDo(do)
if err != nil {
return nil, err
}
return logging.WithScope(lifecycle.NewLoggerFromLoggingConfig(lc), scope), nil
logger, err := lifecycle.NewLoggerFromLoggingConfig(lc)
if err != nil {
return nil, err
}
logger = logging.WithScope(logger, scope)
lifecycle.CaptureStdlibLogOutput(logger)
lifecycle.CaptureTendermintLog15Output(logger)
return logger, nil
}
3 changes: 2 additions & 1 deletion client/mock/client_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
consensus_types "github.com/hyperledger/burrow/consensus/types"
core_types "github.com/hyperledger/burrow/core/types"
"github.com/hyperledger/burrow/logging/loggers"
logging_types "github.com/hyperledger/burrow/logging/types"
"github.com/hyperledger/burrow/txs"
)

Expand Down Expand Up @@ -115,6 +116,6 @@ func (mock *MockNodeClient) ListValidators() (blockHeight int, bondedValidators,
return 0, nil, nil, nil
}

func (mock *MockNodeClient) Logger() loggers.InfoTraceLogger {
func (mock *MockNodeClient) Logger() logging_types.InfoTraceLogger {
return loggers.NewNoopInfoTraceLogger()
}
32 changes: 16 additions & 16 deletions client/node_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
consensus_types "github.com/hyperledger/burrow/consensus/types"
core_types "github.com/hyperledger/burrow/core/types"
"github.com/hyperledger/burrow/logging"
"github.com/hyperledger/burrow/logging/loggers"
logging_types "github.com/hyperledger/burrow/logging/types"
tendermint_client "github.com/hyperledger/burrow/rpc/tendermint/client"
tendermint_types "github.com/hyperledger/burrow/rpc/tendermint/core/types"
"github.com/hyperledger/burrow/txs"
Expand All @@ -46,7 +46,7 @@ type NodeClient interface {
ListValidators() (blockHeight int, bondedValidators, unbondingValidators []consensus_types.Validator, err error)

// Logging context for this NodeClient
Logger() loggers.InfoTraceLogger
Logger() logging_types.InfoTraceLogger
}

type NodeWebsocketClient interface {
Expand All @@ -64,12 +64,12 @@ var _ NodeClient = (*burrowNodeClient)(nil)
// burrow-client is a simple struct exposing the client rpc methods
type burrowNodeClient struct {
broadcastRPC string
logger loggers.InfoTraceLogger
logger logging_types.InfoTraceLogger
}

// BurrowKeyClient.New returns a new monax-keys client for provided rpc location
// Monax-keys connects over http request-responses
func NewBurrowNodeClient(rpcString string, logger loggers.InfoTraceLogger) *burrowNodeClient {
func NewBurrowNodeClient(rpcString string, logger logging_types.InfoTraceLogger) *burrowNodeClient {
return &burrowNodeClient{
broadcastRPC: rpcString,
logger: logging.WithScope(logger, "BurrowNodeClient"),
Expand All @@ -87,7 +87,7 @@ func init() {
// broadcast to blockchain node

func (burrowNodeClient *burrowNodeClient) Broadcast(tx txs.Tx) (*txs.Receipt, error) {
client := rpcclient.NewClientURI(burrowNodeClient.broadcastRPC)
client := rpcclient.NewURIClient(burrowNodeClient.broadcastRPC)
receipt, err := tendermint_client.BroadcastTx(client, tx)
if err != nil {
return nil, err
Expand Down Expand Up @@ -134,7 +134,7 @@ func (burrowNodeClient *burrowNodeClient) DeriveWebsocketClient() (nodeWsClient
// Status returns the ChainId (GenesisHash), validator's PublicKey, latest block hash
// the block height and the latest block time.
func (burrowNodeClient *burrowNodeClient) Status() (GenesisHash []byte, ValidatorPublicKey []byte, LatestBlockHash []byte, LatestBlockHeight int, LatestBlockTime int64, err error) {
client := rpcclient.NewClientJSONRPC(burrowNodeClient.broadcastRPC)
client := rpcclient.NewJSONRPCClient(burrowNodeClient.broadcastRPC)
res, err := tendermint_client.Status(client)
if err != nil {
err = fmt.Errorf("Error connecting to node (%s) to get status: %s",
Expand All @@ -152,7 +152,7 @@ func (burrowNodeClient *burrowNodeClient) Status() (GenesisHash []byte, Validato
}

func (burrowNodeClient *burrowNodeClient) ChainId() (ChainName, ChainId string, GenesisHash []byte, err error) {
client := rpcclient.NewClientJSONRPC(burrowNodeClient.broadcastRPC)
client := rpcclient.NewJSONRPCClient(burrowNodeClient.broadcastRPC)
chainIdResult, err := tendermint_client.ChainId(client)
if err != nil {
err = fmt.Errorf("Error connecting to node (%s) to get chain id: %s",
Expand All @@ -170,19 +170,19 @@ func (burrowNodeClient *burrowNodeClient) ChainId() (ChainName, ChainId string,
// QueryContract executes the contract code at address with the given data
// NOTE: there is no check on the caller;
func (burrowNodeClient *burrowNodeClient) QueryContract(callerAddress, calleeAddress, data []byte) (ret []byte, gasUsed int64, err error) {
client := rpcclient.NewClientJSONRPC(burrowNodeClient.broadcastRPC)
client := rpcclient.NewJSONRPCClient(burrowNodeClient.broadcastRPC)
callResult, err := tendermint_client.Call(client, callerAddress, calleeAddress, data)
if err != nil {
err = fmt.Errorf("Error connnecting to node (%s) to query contract at (%X) with data (%X)",
burrowNodeClient.broadcastRPC, calleeAddress, data, err.Error())
err = fmt.Errorf("Error (%v) connnecting to node (%s) to query contract at (%X) with data (%X)",
err.Error(), burrowNodeClient.broadcastRPC, calleeAddress, data)
return nil, int64(0), err
}
return callResult.Return, callResult.GasUsed, nil
}

// QueryContractCode executes the contract code at address with the given data but with provided code
func (burrowNodeClient *burrowNodeClient) QueryContractCode(address, code, data []byte) (ret []byte, gasUsed int64, err error) {
client := rpcclient.NewClientJSONRPC(burrowNodeClient.broadcastRPC)
client := rpcclient.NewJSONRPCClient(burrowNodeClient.broadcastRPC)
// TODO: [ben] Call and CallCode have an inconsistent signature; it makes sense for both to only
// have a single address that is the contract to query.
callResult, err := tendermint_client.CallCode(client, address, code, data)
Expand All @@ -196,7 +196,7 @@ func (burrowNodeClient *burrowNodeClient) QueryContractCode(address, code, data

// GetAccount returns a copy of the account
func (burrowNodeClient *burrowNodeClient) GetAccount(address []byte) (*acc.Account, error) {
client := rpcclient.NewClientJSONRPC(burrowNodeClient.broadcastRPC)
client := rpcclient.NewJSONRPCClient(burrowNodeClient.broadcastRPC)
account, err := tendermint_client.GetAccount(client, address)
if err != nil {
err = fmt.Errorf("Error connecting to node (%s) to fetch account (%X): %s",
Expand All @@ -213,7 +213,7 @@ func (burrowNodeClient *burrowNodeClient) GetAccount(address []byte) (*acc.Accou

// DumpStorage returns the full storage for an account.
func (burrowNodeClient *burrowNodeClient) DumpStorage(address []byte) (storage *core_types.Storage, err error) {
client := rpcclient.NewClientJSONRPC(burrowNodeClient.broadcastRPC)
client := rpcclient.NewJSONRPCClient(burrowNodeClient.broadcastRPC)
resultStorage, err := tendermint_client.DumpStorage(client, address)
if err != nil {
err = fmt.Errorf("Error connecting to node (%s) to get storage for account (%X): %s",
Expand All @@ -231,7 +231,7 @@ func (burrowNodeClient *burrowNodeClient) DumpStorage(address []byte) (storage *
// Name registry

func (burrowNodeClient *burrowNodeClient) GetName(name string) (owner []byte, data string, expirationBlock int, err error) {
client := rpcclient.NewClientJSONRPC(burrowNodeClient.broadcastRPC)
client := rpcclient.NewJSONRPCClient(burrowNodeClient.broadcastRPC)
entryResult, err := tendermint_client.GetName(client, name)
if err != nil {
err = fmt.Errorf("Error connecting to node (%s) to get name registrar entry for name (%s)",
Expand All @@ -249,7 +249,7 @@ func (burrowNodeClient *burrowNodeClient) GetName(name string) (owner []byte, da

func (burrowNodeClient *burrowNodeClient) ListValidators() (blockHeight int,
bondedValidators []consensus_types.Validator, unbondingValidators []consensus_types.Validator, err error) {
client := rpcclient.NewClientJSONRPC(burrowNodeClient.broadcastRPC)
client := rpcclient.NewJSONRPCClient(burrowNodeClient.broadcastRPC)
validatorsResult, err := tendermint_client.ListValidators(client)
if err != nil {
err = fmt.Errorf("Error connecting to node (%s) to get validators",
Expand All @@ -263,6 +263,6 @@ func (burrowNodeClient *burrowNodeClient) ListValidators() (blockHeight int,
return
}

func (burrowNodeClient *burrowNodeClient) Logger() loggers.InfoTraceLogger {
func (burrowNodeClient *burrowNodeClient) Logger() logging_types.InfoTraceLogger {
return burrowNodeClient.logger
}
19 changes: 11 additions & 8 deletions client/websocket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ import (
"fmt"
"time"

logging_types "github.com/hyperledger/burrow/logging/types"
"github.com/tendermint/go-rpc/client"
"github.com/tendermint/go-wire"

"github.com/hyperledger/burrow/logging"
"github.com/hyperledger/burrow/logging/loggers"
tendermint_client "github.com/hyperledger/burrow/rpc/tendermint/client"
ctypes "github.com/hyperledger/burrow/rpc/tendermint/core/types"
"github.com/hyperledger/burrow/txs"
)
Expand All @@ -46,18 +47,20 @@ var _ NodeWebsocketClient = (*burrowNodeWebsocketClient)(nil)
type burrowNodeWebsocketClient struct {
// TODO: assert no memory leak on closing with open websocket
tendermintWebsocket *rpcclient.WSClient
logger loggers.InfoTraceLogger
logger logging_types.InfoTraceLogger
}

// Subscribe to an eventid
func (burrowNodeWebsocketClient *burrowNodeWebsocketClient) Subscribe(eventid string) error {
func (burrowNodeWebsocketClient *burrowNodeWebsocketClient) Subscribe(eventId string) error {
// TODO we can in the background listen to the subscription id and remember it to ease unsubscribing later.
return burrowNodeWebsocketClient.tendermintWebsocket.Subscribe(eventid)
return tendermint_client.Subscribe(burrowNodeWebsocketClient.tendermintWebsocket,
eventId)
}

// Unsubscribe from an eventid
func (burrowNodeWebsocketClient *burrowNodeWebsocketClient) Unsubscribe(subscriptionId string) error {
return burrowNodeWebsocketClient.tendermintWebsocket.Unsubscribe(subscriptionId)
return tendermint_client.Unsubscribe(burrowNodeWebsocketClient.tendermintWebsocket,
subscriptionId)
}

// Returns a channel that will receive a confirmation with a result or the exception that
Expand All @@ -73,10 +76,10 @@ func (burrowNodeWebsocketClient *burrowNodeWebsocketClient) WaitForConfirmation(
var latestBlockHash []byte

eid := txs.EventStringAccInput(inputAddr)
if err := burrowNodeWebsocketClient.tendermintWebsocket.Subscribe(eid); err != nil {
if err := burrowNodeWebsocketClient.Subscribe(eid); err != nil {
return nil, fmt.Errorf("Error subscribing to AccInput event (%s): %v", eid, err)
}
if err := burrowNodeWebsocketClient.tendermintWebsocket.Subscribe(txs.EventStringNewBlock()); err != nil {
if err := burrowNodeWebsocketClient.Subscribe(txs.EventStringNewBlock()); err != nil {
return nil, fmt.Errorf("Error subscribing to NewBlock event: %v", err)
}
// Read the incoming events
Expand Down Expand Up @@ -163,7 +166,7 @@ func (burrowNodeWebsocketClient *burrowNodeWebsocketClient) WaitForConfirmation(
confirmationChannel <- Confirmation{
BlockHash: latestBlockHash,
Event: &data,
Exception: fmt.Errorf("Transaction confirmed with exception:", data.Exception),
Exception: fmt.Errorf("Transaction confirmed with exception: %v", data.Exception),
Error: nil,
}
return
Expand Down
20 changes: 16 additions & 4 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
vm "github.com/hyperledger/burrow/manager/burrow-mint/evm"
"github.com/hyperledger/burrow/util"

"github.com/hyperledger/burrow/config"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -95,6 +96,11 @@ func NewCoreFromDo(do *definitions.Do) (*core.Core, error) {
do.GenesisFile = path.Join(do.WorkDir,
do.Config.GetString("chain.genesis_file"))

err := config.AssertConfigCompatibleWithRuntime(do.Config)
if err != nil {
return nil, err
}

if do.Config.GetString("chain.genesis_file") == "" {
return nil, fmt.Errorf("The config value chain.genesis_file is empty, " +
"but should be set to the location of the genesis.json file.")
Expand All @@ -109,8 +115,12 @@ func NewCoreFromDo(do *definitions.Do) (*core.Core, error) {
return nil, fmt.Errorf("Failed to load logging config: %s", err)
}

logger, err := lifecycle.NewLoggerFromLoggingConfig(loggerConfig)
if err != nil {
return nil, fmt.Errorf("Failed to build logger from logging config: %s", err)
}
// Create a root logger to pass through to dependencies
logger := logging.WithScope(lifecycle.NewLoggerFromLoggingConfig(loggerConfig), "Serve")
logger = logging.WithScope(logger, "Serve")
// Capture all logging from tendermint/tendermint and tendermint/go-*
// dependencies
lifecycle.CaptureTendermintLog15Output(logger)
Expand Down Expand Up @@ -143,8 +153,8 @@ func NewCoreFromDo(do *definitions.Do) (*core.Core, error) {
}

logging.Msg(logger, "Modules configured",
"consensusModule", consensusConfig.Version,
"applicationManager", managerConfig.Version)
"consensusModule", consensusConfig.Name,
"applicationManager", managerConfig.Name)

return core.NewCore(do.ChainId, consensusConfig, managerConfig, logger)
}
Expand All @@ -171,7 +181,7 @@ func ServeRunner(do *definitions.Do) func(*cobra.Command, []string) {
}

if !do.DisableRpc {
serverConfig, err := core.LoadServerConfig(do)
serverConfig, err := core.LoadServerConfigFromDo(do)
if err != nil {
util.Fatalf("Failed to load server configuration: %s.", err)
}
Expand All @@ -188,6 +198,8 @@ func ServeRunner(do *definitions.Do) func(*cobra.Command, []string) {
util.Fatalf("Failed to start Tendermint gateway")
}
<-serverProcess.StopEventChannel()
// Attempt graceful shutdown
newCore.Stop()
} else {
signals := make(chan os.Signal, 1)
signal.Notify(signals, syscall.SIGINT, syscall.SIGTERM)
Expand Down
Loading