build: upgrade to go 1.19 (#25726)
This changes the CI / release builds to use the latest Go version. It also upgrades golangci-lint to a newer version compatible with Go 1.19. In Go 1.19, godoc has gained official support for links and lists. The syntax for code blocks in doc comments has changed and now requires a leading tab character. gofmt adapts comments to the new syntax automatically, so there are a lot of comment re-formatting changes in this PR. We need to apply the new format in order to pass the CI lint stage with Go 1.19. With the linter upgrade, I have decided to disable 'gosec' - it produces too many false-positive warnings. The 'deadcode' and 'varcheck' linters have also been removed because golangci-lint warns about them being unmaintained. 'unused' provides similar coverage and we already have it enabled, so we don't lose much with this change.
This commit is contained in:
@@ -37,14 +37,15 @@ func init() {
|
||||
// a reversed signature can be matched against the size of the data.
|
||||
//
|
||||
// Example:
|
||||
// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"})
|
||||
// {
|
||||
// 0x27dc297e-128: 1,
|
||||
// 0x38cc4831-0: 2,
|
||||
// 0x524f3889-96: 1,
|
||||
// 0xadf59f99-288: 1,
|
||||
// 0xc281d19e-0: 1
|
||||
// }
|
||||
//
|
||||
// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"})
|
||||
// {
|
||||
// 0x27dc297e-128: 1,
|
||||
// 0x38cc4831-0: 2,
|
||||
// 0x524f3889-96: 1,
|
||||
// 0xadf59f99-288: 1,
|
||||
// 0xc281d19e-0: 1
|
||||
// }
|
||||
type fourByteTracer struct {
|
||||
env *vm.EVM
|
||||
ids map[string]int // ids aggregates the 4byte ids found
|
||||
|
||||
@@ -14,24 +14,20 @@
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/*
|
||||
Package native is a collection of tracers written in go.
|
||||
|
||||
In order to add a native tracer and have it compiled into the binary, a new
|
||||
file needs to be added to this folder, containing an implementation of the
|
||||
`eth.tracers.Tracer` interface.
|
||||
|
||||
Aside from implementing the tracer, it also needs to register itself, using the
|
||||
`register` method -- and this needs to be done in the package initialization.
|
||||
|
||||
Example:
|
||||
|
||||
```golang
|
||||
func init() {
|
||||
register("noopTracerNative", newNoopTracer)
|
||||
}
|
||||
```
|
||||
*/
|
||||
// Package native is a collection of tracers written in go.
|
||||
//
|
||||
// In order to add a native tracer and have it compiled into the binary, a new
|
||||
// file needs to be added to this folder, containing an implementation of the
|
||||
// `eth.tracers.Tracer` interface.
|
||||
//
|
||||
// Aside from implementing the tracer, it also needs to register itself, using the
|
||||
// `register` method -- and this needs to be done in the package initialization.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// func init() {
|
||||
// register("noopTracerNative", newNoopTracer)
|
||||
// }
|
||||
package native
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user