Skip to content

Porolan (v1.13.6)

Compare
Choose a tag to compare
@holiman holiman released this 18 Dec 18:09
· 169 commits to release/1.13 since this release
da6cdaf

Geth v1.13.6 is a scheduled maintenance release, but it also contains some changes which might affect node operators, concerning logging.

Gas estimation changes

The gas estimator was heavily reworked (#28600, #28618). The new version runs quite a bit faster (normally completing in 7-8 attempts rather than 18-20). However, the results have an error ratio of 1.5%, and the estimation outcome won't always be deterministic.

Logging changes

In the absence of an 'official' Go logging framework, go-ethereum has, for a very long time, used a custom in-house logger. However, just such an 'official' Go logging framework has now arrived, with the slog package.

As of v1.13.6 , geth now uses slog, which will affect Geth users in different ways.

Main changes are as follows:

  • Verbosity level constants are changed to match slog constant values. Internal translation is done to make this opaque to the user and backwards compatible with existing --verbosity and --vmodule options.
  • --log.backtraceat and --log.debug are removed.
  • Removes interface log.Format and the method log.FormatFunc,
  • Unexports TerminalHandler.TerminalFormat formatting methods (renamed to TerminalHandler.format)
  • Removes the notion of log.Lazy values

The external-facing API is largely the same as the existing Geth logger. Method signatures remain unchanged. A small semantic difference is that a Handler can only be set once per Logger and not changed dynamically. This just means that a new logger must be instantiated every time the handler of the root logger is changed.

For users of the github.com/ethereum/go-ethereum/log package: If you were using this package for your own project, you will need to change the initialization. If you previously did

    log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stderr, log.TerminalFormat(true))))

You now instead need to do

    log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))

The lazy handler was useful in the old log package, since it could defer the evaluation of costly attributes until later in the log pipeline. Thus, if the logging was done at 'Trace', we could skip evaluation if logging only was set to 'Info'. With the move to slog, this way of deferring evaluation is no longer needed, since slog introduced 'Enabled'. Thus the caller can do the evaluate-or-not decision at the callsite, which is much more straight-forward than dealing with lazy reflect-based evaluation.

See more about reasoning here: #28558 (comment)

More detailed information can be found in the PRs #28187, #28621, #28622 )

Other changes

  • Fixes a database corruption issue that could occur during state healing (#28595)
  • Fixes an issue where node liveness was not always verified correctly in discv5 (#28686)
  • Fix so state-dump can be performed after test execution (#28650, #28504)
  • Fix a ns/µs mismatch in metrics for rpc-methods (#28649)
  • Fix a bug with wrong priority for HTTPHost, WSHost flags (#28669)
  • Fix type inconsistencies in tracer framework (#28488)
  • Add contextual information to errors returned by abi unpack (#28529)
  • Make evm t8n support custom tracers (#28557)

For a full rundown of the changes please consult the Geth 1.13.6 release milestone.


As with all our previous releases, you can find the: