Browse Source

small fixes to changelog, config, default logging

pull/516/head
Ethan Buchman 7 years ago
parent
commit
3fbe286e5a
3 changed files with 16 additions and 10 deletions
  1. +4
    -2
      CHANGELOG.md
  2. +10
    -7
      config/toml.go
  3. +2
    -1
      state/execution.go

+ 4
- 2
CHANGELOG.md View File

@ -19,8 +19,10 @@ BREAKING CHANGES:
- Remove config/tendermint and config/tendermint_test. Defaults are handled by viper and `DefaultConfig() / `TestConfig()` functions
- Tests do not read config from file
- New logger (`github.com/tendermint/tmlibs/log`)
- Reduced to three levels: Error, Info, Debug
- Reduced to three levels: `error`, `info`, and `debug`
- NOTE: The default in previous versions was `notice`, which is no longer valid. Please change it in the `config.toml`
- Per-module log levels
- The new default is `state:info,*:error`, which means the `state` package logs at `info` level, and everything else logs at `error` level
- No global loggers (loggers are passed into constructors, or preferably set with a `SetLogger` method)
- RPC serialization cleanup:
- Lowercase json names for ValidatorSet fields
@ -46,7 +48,7 @@ IMPROVEMENTS:
- `go-data -> go-wire/data`
- All other `go-*` libs, except `go-crypto` and `go-wire`, merged under `tmlibs`
- Return HTTP status codes with errors for RPC responses
- Use `.Wrap()` and `.Unwarp()` instead of eg. `PubKeyS` for `go-crypto` types
- Use `.Wrap()` and `.Unwrap()` instead of eg. `PubKeyS` for `go-crypto` types
- Color code different instances of the consensus for tests
- RPC JSON responses use pretty printing (via `json.MarshalIndent`)


+ 10
- 7
config/toml.go View File

@ -30,17 +30,18 @@ var defaultConfigTmpl = `# This is a TOML config file.
proxy_app = "tcp://127.0.0.1:46658"
moniker = "__MONIKER__"
node_laddr = "tcp://0.0.0.0:46656"
seeds = ""
fast_sync = true
db_backend = "leveldb"
log_level = "info"
rpc_laddr = "tcp://0.0.0.0:46657"
[p2p]
laddr = "tcp://0.0.0.0:46656"
seeds = ""
`
func defaultConfig(moniker string) (defaultConfig string) {
defaultConfig = strings.Replace(defaultConfigTmpl, "__MONIKER__", moniker, -1)
return
func defaultConfig(moniker string) string {
return strings.Replace(defaultConfigTmpl, "__MONIKER__", moniker, -1)
}
/****** these are for test settings ***********/
@ -90,12 +91,14 @@ var testConfigTmpl = `# This is a TOML config file.
proxy_app = "dummy"
moniker = "__MONIKER__"
node_laddr = "tcp://0.0.0.0:36656"
seeds = ""
fast_sync = false
db_backend = "memdb"
log_level = "info"
rpc_laddr = "tcp://0.0.0.0:36657"
[p2p]
laddr = "tcp://0.0.0.0:36656"
seeds = ""
`
func testConfig(moniker string) (testConfig string) {


+ 2
- 1
state/execution.go View File

@ -259,7 +259,8 @@ func (s *State) CommitStateUpdateMempool(proxyAppConn proxy.AppConnConsensus, bl
s.logger.Debug("Commit.Log: " + res.Log)
}
s.logger.Info("Committed state", "hash", res.Data)
s.logger.Info("Committed state", "height", block.Height, "hash", res.Data)
// Set the state's new AppHash
s.AppHash = res.Data


Loading…
Cancel
Save