Merge pull request #3605 from nspcc-dev/fix-linter

Enable linter for every module
This commit is contained in:
Anna Shaleva 2024-10-11 14:16:44 +03:00 committed by GitHub
commit a9242535db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 100 additions and 60 deletions

View file

@ -14,8 +14,33 @@ on:
jobs: jobs:
lint: lint:
name: Lint name: 'Lint: NeoGo'
uses: nspcc-dev/.github/.github/workflows/go-linter.yml@master uses: nspcc-dev/.github/.github/workflows/go-linter.yml@master
lint_examples:
name: 'Lint: examples (${{ matrix.contract }})'
uses: nspcc-dev/.github/.github/workflows/go-linter.yml@master
strategy:
fail-fast: false
matrix:
contract: [ 'engine', 'events', 'iterator', 'nft-d', 'nft-nd', 'nft-nd-nns', 'oracle',
'runtime', 'storage', 'timer', 'token', 'zkp/cubic_circuit', 'zkp/xor_compat']
with:
workdir: examples/${{ matrix.contract }}
lint_scripts:
name: 'Lint: scripts'
uses: nspcc-dev/.github/.github/workflows/go-linter.yml@master
with:
workdir: scripts
lint_interops:
name: 'Lint: interop'
uses: nspcc-dev/.github/.github/workflows/go-linter.yml@master
with:
workdir: pkg/interop
gomodcheck: gomodcheck:
name: Check internal dependencies name: Check internal dependencies
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -24,6 +24,9 @@ IMAGE_REPO=nspccdev/neo-go
DISABLE_NEOTEST_COVER=1 DISABLE_NEOTEST_COVER=1
ROOT_DIR:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
GOMODDIRS=$(dir $(shell find $(ROOT_DIR) -name go.mod))
# All of the targets are phony here because we don't really use make dependency # All of the targets are phony here because we don't really use make dependency
# tracking for files # tracking for files
.PHONY: build $(BINARY) deps image docker/$(BINARY) image-latest image-push image-push-latest clean-cluster \ .PHONY: build $(BINARY) deps image docker/$(BINARY) image-latest image-push image-push-latest clean-cluster \
@ -113,7 +116,9 @@ vet:
curl -L -o $@ https://github.com/nspcc-dev/.github/raw/master/.golangci.yml curl -L -o $@ https://github.com/nspcc-dev/.github/raw/master/.golangci.yml
lint: .golangci.yml lint: .golangci.yml
@golangci-lint run @for dir in $(GOMODDIRS); do \
(cd "$$dir" && golangci-lint run --config $(ROOT_DIR)/$< | sed -r "s,^,$$dir," | sed -r "s,^$(ROOT_DIR),,") \
done
fmt: fmt:
@gofmt -l -w -s $$(find . -type f -name '*.go'| grep -v "/vendor/") @gofmt -l -w -s $$(find . -type f -name '*.go'| grep -v "/vendor/")

View file

@ -4,25 +4,25 @@ import (
"github.com/nspcc-dev/neo-go/pkg/interop/runtime" "github.com/nspcc-dev/neo-go/pkg/interop/runtime"
) )
// NotifyScriptContainer sends runtime notification with script container hash // NotifyScriptContainer sends runtime notification with script container hash.
func NotifyScriptContainer() { func NotifyScriptContainer() {
tx := runtime.GetScriptContainer() tx := runtime.GetScriptContainer()
runtime.Notify("Tx", tx.Hash) runtime.Notify("Tx", tx.Hash)
} }
// NotifyCallingScriptHash sends runtime notification with calling script hash // NotifyCallingScriptHash sends runtime notification with calling script hash.
func NotifyCallingScriptHash() { func NotifyCallingScriptHash() {
callingScriptHash := runtime.GetCallingScriptHash() callingScriptHash := runtime.GetCallingScriptHash()
runtime.Notify("Calling", callingScriptHash) runtime.Notify("Calling", callingScriptHash)
} }
// NotifyExecutingScriptHash sends runtime notification about executing script hash // NotifyExecutingScriptHash sends runtime notification about executing script hash.
func NotifyExecutingScriptHash() { func NotifyExecutingScriptHash() {
execScriptHash := runtime.GetExecutingScriptHash() execScriptHash := runtime.GetExecutingScriptHash()
runtime.Notify("Executing", execScriptHash) runtime.Notify("Executing", execScriptHash)
} }
// NotifyEntryScriptHash sends notification about entry script hash // NotifyEntryScriptHash sends notification about entry script hash.
func NotifyEntryScriptHash() { func NotifyEntryScriptHash() {
entryScriptHash := runtime.GetEntryScriptHash() entryScriptHash := runtime.GetEntryScriptHash()
runtime.Notify("Entry", entryScriptHash) runtime.Notify("Entry", entryScriptHash)

View file

@ -7,7 +7,7 @@ import (
) )
// _deploy primes contract's storage with some data to be used later. // _deploy primes contract's storage with some data to be used later.
func _deploy(_ any, _ bool) { func _deploy(_ any, _ bool) { // nolint: unused
ctx := storage.GetContext() // RW context. ctx := storage.GetContext() // RW context.
storage.Put(ctx, "foo1", "1") storage.Put(ctx, "foo1", "1")
storage.Put(ctx, "foo2", "2") storage.Put(ctx, "foo2", "2")

View file

@ -60,7 +60,7 @@ const (
// Other constants. // Other constants.
const ( const (
// defaultRegisterPrice is the default price for new domain registration. // defaultRegisterPrice is the default price for new domain registration.
defaultRegisterPrice = 10_0000_0000 defaultRegisterPrice = 10_0000_0000 // nolint: unused
// millisecondsInYear is amount of milliseconds per year. // millisecondsInYear is amount of milliseconds per year.
millisecondsInYear = 365 * 24 * 3600 * 1000 millisecondsInYear = 365 * 24 * 3600 * 1000
) )
@ -79,7 +79,7 @@ func Update(nef []byte, manifest string) {
} }
// _deploy initializes defaults (total supply and registration price) on contract deploy. // _deploy initializes defaults (total supply and registration price) on contract deploy.
func _deploy(data any, isUpdate bool) { func _deploy(data any, isUpdate bool) { // nolint: unused
if isUpdate { if isUpdate {
return return
} }
@ -491,7 +491,7 @@ func getRecordKey(tokenId []byte, name string, typ RecordType) []byte {
// isValid returns true if the provided address is a valid Uint160. // isValid returns true if the provided address is a valid Uint160.
func isValid(address interop.Hash160) bool { func isValid(address interop.Hash160) bool {
return address != nil && len(address) == 20 return address != nil && len(address) == 20 // nolint: gosimple
} }
// checkCommittee panics if the script container is not signed by the committee. // checkCommittee panics if the script container is not signed by the committee.
@ -555,7 +555,7 @@ func splitAndCheck(name string, allowMultipleFragments bool) []string {
if l > 2 && !allowMultipleFragments { if l > 2 && !allowMultipleFragments {
return nil return nil
} }
for i := 0; i < l; i++ { for i := range fragments {
if !checkFragment(fragments[i], i == l-1) { if !checkFragment(fragments[i], i == l-1) {
return nil return nil
} }

View file

@ -418,11 +418,9 @@ func testTokensOf(t *testing.T, c *neotest.ContractInvoker, result [][]byte, arg
} }
require.NoError(t, err) require.NoError(t, err)
iter := s.Pop().Interop().Value().(*storage.Iterator) iter := s.Pop().Interop().Value().(*storage.Iterator)
arr := make([]stackitem.Item, 0, len(result))
for i := range result { for i := range result {
require.True(t, iter.Next()) require.True(t, iter.Next())
require.Equal(t, result[i], iter.Value().Value()) require.Equal(t, result[i], iter.Value().Value())
arr = append(arr, stackitem.Make(result[i]))
} }
require.False(t, iter.Next()) require.False(t, iter.Next())
} }

View file

@ -26,7 +26,7 @@ const (
totalSupplyPrefix = "s" totalSupplyPrefix = "s"
// balancePrefix contains map from addresses to balances. // balancePrefix contains map from addresses to balances.
balancePrefix = "b" balancePrefix = "b"
// accountPrefix contains map from address + token id to tokens // accountPrefix contains map from address + token id to tokens.
accountPrefix = "a" accountPrefix = "a"
// tokenPrefix contains map from token id to it's owner. // tokenPrefix contains map from token id to it's owner.
tokenPrefix = "t" tokenPrefix = "t"

View file

@ -7,7 +7,7 @@ import (
) )
var ( var (
// Check if the invoker of the contract is the specified owner // Check if the invoker of the contract is the specified owner.
owner = address.ToHash160("NbrUYaZgyhSkNoRo9ugRyEMdUZxrhkNaWB") owner = address.ToHash160("NbrUYaZgyhSkNoRo9ugRyEMdUZxrhkNaWB")
) )
@ -22,7 +22,7 @@ func init() {
// _deploy is called after contract deployment or update, it'll be called // _deploy is called after contract deployment or update, it'll be called
// in deployment transaction and if call update method of this contract. // in deployment transaction and if call update method of this contract.
func _deploy(_ any, isUpdate bool) { func _deploy(_ any, isUpdate bool) { // nolint: unused
if isUpdate { if isUpdate {
Log("_deploy method called after contract update") Log("_deploy method called after contract update")
return return

View file

@ -5,13 +5,13 @@ import (
"github.com/nspcc-dev/neo-go/pkg/interop/storage" "github.com/nspcc-dev/neo-go/pkg/interop/storage"
) )
// ctx holds storage context for contract methods // ctx holds storage context for contract methods.
var ctx storage.Context var ctx storage.Context
// defaultKey represents the default key. // defaultKey represents the default key.
var defaultKey = []byte("default") var defaultKey = []byte("default")
// init inits storage context before any other contract method is called // init inits storage context before any other contract method is called.
func init() { func init() {
ctx = storage.GetContext() ctx = storage.GetContext()
} }

View file

@ -9,15 +9,15 @@ import (
"github.com/nspcc-dev/neo-go/pkg/interop/storage" "github.com/nspcc-dev/neo-go/pkg/interop/storage"
) )
const defaultTicks = 3 const defaultTicks = 3 // nolint: unused
const mgmtKey = "mgmt" const mgmtKey = "mgmt"
var ( var (
// ctx holds storage context for contract methods // ctx holds storage context for contract methods.
ctx storage.Context ctx storage.Context
// Check if the invoker of the contract is the specified owner // Check if the invoker of the contract is the specified owner.
owner = address.ToHash160("NbrUYaZgyhSkNoRo9ugRyEMdUZxrhkNaWB") owner = address.ToHash160("NbrUYaZgyhSkNoRo9ugRyEMdUZxrhkNaWB")
// ticksKey is a storage key for ticks counter // ticksKey is a storage key for ticks counter.
ticksKey = []byte("ticks") ticksKey = []byte("ticks")
) )
@ -25,7 +25,7 @@ func init() {
ctx = storage.GetContext() ctx = storage.GetContext()
} }
func _deploy(_ any, isUpdate bool) { func _deploy(_ any, isUpdate bool) { // nolint: unused
if isUpdate { if isUpdate {
ticksLeft := storage.Get(ctx, ticksKey).(int) + 1 ticksLeft := storage.Get(ctx, ticksKey).(int) + 1
storage.Put(ctx, ticksKey, ticksLeft) storage.Put(ctx, ticksKey, ticksLeft)

View file

@ -8,7 +8,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/interop/storage" "github.com/nspcc-dev/neo-go/pkg/interop/storage"
) )
// Token holds all token info // Token holds all token info.
type Token struct { type Token struct {
// Token name // Token name
Name string Name string
@ -35,17 +35,17 @@ func getIntFromDB(ctx storage.Context, key []byte) int {
return res return res
} }
// GetSupply gets the token totalSupply value from VM storage // GetSupply gets the token totalSupply value from VM storage.
func (t Token) GetSupply(ctx storage.Context) int { func (t Token) GetSupply(ctx storage.Context) int {
return getIntFromDB(ctx, []byte(t.CirculationKey)) return getIntFromDB(ctx, []byte(t.CirculationKey))
} }
// BalanceOf gets the token balance of a specific address // BalanceOf gets the token balance of a specific address.
func (t Token) BalanceOf(ctx storage.Context, holder []byte) int { func (t Token) BalanceOf(ctx storage.Context, holder []byte) int {
return getIntFromDB(ctx, holder) return getIntFromDB(ctx, holder)
} }
// Transfer token from one user to another // Transfer token from one user to another.
func (t Token) Transfer(ctx storage.Context, from, to interop.Hash160, amount int, data any) bool { func (t Token) Transfer(ctx storage.Context, from, to interop.Hash160, amount int, data any) bool {
amountFrom := t.CanTransfer(ctx, from, to, amount) amountFrom := t.CanTransfer(ctx, from, to, amount)
if amountFrom == -1 { if amountFrom == -1 {
@ -74,7 +74,7 @@ func (t Token) Transfer(ctx storage.Context, from, to interop.Hash160, amount in
return true return true
} }
// CanTransfer returns the amount it can transfer // CanTransfer returns the amount it can transfer.
func (t Token) CanTransfer(ctx storage.Context, from []byte, to []byte, amount int) int { func (t Token) CanTransfer(ctx storage.Context, from []byte, to []byte, amount int) int {
if len(to) != 20 || !IsUsableAddress(from) { if len(to) != 20 || !IsUsableAddress(from) {
return -1 return -1
@ -94,10 +94,9 @@ func (t Token) CanTransfer(ctx storage.Context, from []byte, to []byte, amount i
return amountFrom return amountFrom
} }
// IsUsableAddress checks if the sender is either the correct Neo address or SC address // IsUsableAddress checks if the sender is either the correct Neo address or SC address.
func IsUsableAddress(addr []byte) bool { func IsUsableAddress(addr []byte) bool {
if len(addr) == 20 { if len(addr) == 20 {
if runtime.CheckWitness(addr) { if runtime.CheckWitness(addr) {
return true return true
} }
@ -112,13 +111,13 @@ func IsUsableAddress(addr []byte) bool {
return false return false
} }
// Mint initial supply of tokens // Mint initial supply of tokens.
func (t Token) Mint(ctx storage.Context, to interop.Hash160) bool { func (t Token) Mint(ctx storage.Context, to interop.Hash160) bool {
if !IsUsableAddress(t.Owner) { if !IsUsableAddress(t.Owner) {
return false return false
} }
minted := storage.Get(ctx, []byte("minted")) minted := storage.Get(ctx, []byte("minted"))
if minted != nil && minted.(bool) == true { if minted != nil && minted.(bool) {
return false return false
} }

View file

@ -19,7 +19,7 @@ var (
) )
// init initializes Token Interface and storage context for the Smart // init initializes Token Interface and storage context for the Smart
// Contract to operate with // Contract to operate with.
func init() { func init() {
token = nep17.Token{ token = nep17.Token{
Name: "Awesome NEO Token", Name: "Awesome NEO Token",
@ -32,32 +32,32 @@ func init() {
ctx = storage.GetContext() ctx = storage.GetContext()
} }
// Symbol returns the token symbol // Symbol returns the token symbol.
func Symbol() string { func Symbol() string {
return token.Symbol return token.Symbol
} }
// Decimals returns the token decimals // Decimals returns the token decimals.
func Decimals() int { func Decimals() int {
return token.Decimals return token.Decimals
} }
// TotalSupply returns the token total supply value // TotalSupply returns the token total supply value.
func TotalSupply() int { func TotalSupply() int {
return token.GetSupply(ctx) return token.GetSupply(ctx)
} }
// BalanceOf returns the amount of token on the specified address // BalanceOf returns the amount of token on the specified address.
func BalanceOf(holder interop.Hash160) int { func BalanceOf(holder interop.Hash160) int {
return token.BalanceOf(ctx, holder) return token.BalanceOf(ctx, holder)
} }
// Transfer token from one user to another // Transfer token from one user to another.
func Transfer(from interop.Hash160, to interop.Hash160, amount int, data any) bool { func Transfer(from interop.Hash160, to interop.Hash160, amount int, data any) bool {
return token.Transfer(ctx, from, to, amount, data) return token.Transfer(ctx, from, to, amount, data)
} }
// Mint initial supply of tokens // Mint initial supply of tokens.
func Mint(to interop.Hash160) bool { func Mint(to interop.Hash160) bool {
return token.Mint(ctx, to) return token.Mint(ctx, to)
} }

View file

@ -51,7 +51,7 @@ func (circuit *CubicCircuit) Define(api frontend.API) error {
// main demonstrates how to build the proof and verify it with the help of gnark // main demonstrates how to build the proof and verify it with the help of gnark
// library. Error handling omitted intentionally to simplify the example. // library. Error handling omitted intentionally to simplify the example.
func main() { func main() { // nolint: unused
var ( var (
circuit CubicCircuit circuit CubicCircuit
assignment = CubicCircuit{X: 3, Y: 35} assignment = CubicCircuit{X: 3, Y: 35}

View file

@ -315,7 +315,7 @@ func setup(t *testing.T, ccs constraint.ConstraintSystem, phase1ResponsePath str
// receive a []byte, deserialize it, add his contribution and send back to // receive a []byte, deserialize it, add his contribution and send back to
// coordinator, like it is done in https://github.com/bnb-chain/zkbnb-setup // coordinator, like it is done in https://github.com/bnb-chain/zkbnb-setup
// for BN254 elliptic curve. // for BN254 elliptic curve.
for i := range nContributionsPhase2 { for range nContributionsPhase2 {
srs2.Contribute() srs2.Contribute()
} }

View file

@ -43,7 +43,7 @@ var (
// proving system and is taken from the // proving system and is taken from the
// https://github.com/neo-project/neo/issues/2647#issuecomment-1002893109 without // https://github.com/neo-project/neo/issues/2647#issuecomment-1002893109 without
// changes. The verification process checks the following equality: // changes. The verification process checks the following equality:
// A * B = alpha * beta + sum(pub_input[i] * (beta * u_i(x) + alpha * v_i(x) + w_i(x)) / gamma) * gamma + C * delta // A * B = alpha * beta + sum(pub_input[i] * (beta * u_i(x) + alpha * v_i(x) + w_i(x)) / gamma) * gamma + C * delta.
func VerifyProof(a []byte, b []byte, c []byte, publicInput [][]byte) bool { func VerifyProof(a []byte, b []byte, c []byte, publicInput [][]byte) bool {
alphaPoint := crypto.Bls12381Deserialize(alpha) alphaPoint := crypto.Bls12381Deserialize(alpha)
betaPoint := crypto.Bls12381Deserialize(beta) betaPoint := crypto.Bls12381Deserialize(beta)
@ -68,11 +68,11 @@ func VerifyProof(a []byte, b []byte, c []byte, publicInput [][]byte) bool {
panic("error: inputlen or iclen") panic("error: inputlen or iclen")
} }
icPoints := make([]crypto.Bls12381Point, iclen) icPoints := make([]crypto.Bls12381Point, iclen)
for i := 0; i < iclen; i++ { for i := range icPoints {
icPoints[i] = crypto.Bls12381Deserialize(ic[i]) icPoints[i] = crypto.Bls12381Deserialize(ic[i])
} }
acc := icPoints[0] acc := icPoints[0]
for i := 0; i < inputlen; i++ { for i := range publicInput {
scalar := publicInput[i] // 32-bytes LE field element. scalar := publicInput[i] // 32-bytes LE field element.
temp := crypto.Bls12381Mul(icPoints[i+1], scalar, false) temp := crypto.Bls12381Mul(icPoints[i+1], scalar, false)
acc = crypto.Bls12381Add(acc, temp) acc = crypto.Bls12381Add(acc, temp)

View file

@ -88,7 +88,7 @@ type WitnessCondition struct {
// WitnessConditionType represents the type of rule-based witness condition. // WitnessConditionType represents the type of rule-based witness condition.
type WitnessConditionType byte type WitnessConditionType byte
// Various witness condition types // Various witness condition types.
const ( const (
// WitnessBoolean is a generic boolean condition. // WitnessBoolean is a generic boolean condition.
WitnessBoolean WitnessConditionType = 0x00 WitnessBoolean WitnessConditionType = 0x00

View file

@ -130,5 +130,4 @@ func GetAccountState(addr interop.Hash160) *AccountState {
// GetCommitteeAddress represents `getCommitteeAddress` method of NEO native contract. // GetCommitteeAddress represents `getCommitteeAddress` method of NEO native contract.
func GetCommitteeAddress() interop.Hash160 { func GetCommitteeAddress() interop.Hash160 {
return neogointernal.CallWithToken(Hash, "getCommitteeAddress", int(contract.ReadStates)).(interop.Hash160) return neogointernal.CallWithToken(Hash, "getCommitteeAddress", int(contract.ReadStates)).(interop.Hash160)
} }

View file

@ -6,7 +6,7 @@ replace github.com/nspcc-dev/neo-go => ../
require ( require (
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/nspcc-dev/neo-go v0.0.0-00010101000000-000000000000 github.com/nspcc-dev/neo-go v0.106.3
github.com/pmezard/go-difflib v1.0.0 github.com/pmezard/go-difflib v1.0.0
github.com/stretchr/testify v1.9.0 github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.4 github.com/urfave/cli/v2 v2.27.4
@ -14,13 +14,15 @@ require (
) )
require ( require (
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.8.0 // indirect github.com/bits-and-blooms/bitset v1.14.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.13.0 // indirect github.com/consensys/gnark-crypto v0.14.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.1 // indirect github.com/golang/snappy v0.0.1 // indirect
github.com/google/uuid v1.6.0 // indirect github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect github.com/gorilla/websocket v1.5.3 // indirect
@ -30,7 +32,11 @@ require (
github.com/mr-tron/base58 v1.2.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nspcc-dev/go-ordered-json v0.0.0-20240830112754-291b000d1f3b // indirect github.com/nspcc-dev/go-ordered-json v0.0.0-20240830112754-291b000d1f3b // indirect
github.com/nspcc-dev/hrw/v2 v2.0.1 // indirect
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4 // indirect
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12 // indirect
github.com/nspcc-dev/rfc6979 v0.2.3 // indirect github.com/nspcc-dev/rfc6979 v0.2.3 // indirect
github.com/nspcc-dev/tzhash v1.7.2 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/prometheus/client_golang v1.20.2 // indirect github.com/prometheus/client_golang v1.20.2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect
@ -43,12 +49,16 @@ require (
go.etcd.io/bbolt v1.3.11 // indirect go.etcd.io/bbolt v1.3.11 // indirect
go.uber.org/multierr v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.26.0 // indirect golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect
golang.org/x/mod v0.20.0 // indirect golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sync v0.8.0 // indirect golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect golang.org/x/text v0.17.0 // indirect
golang.org/x/tools v0.24.0 // indirect golang.org/x/tools v0.24.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect
google.golang.org/grpc v1.62.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect rsc.io/tmplfunc v0.0.3 // indirect

View file

@ -2,16 +2,16 @@ github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12 h
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= github.com/bits-and-blooms/bitset v1.14.2 h1:YXVoyPndbdvcEVcseEovVfp0qjJp7S+i5+xgp/Nfbdc=
github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bits-and-blooms/bitset v1.14.2/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ=
github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI=
github.com/consensys/gnark-crypto v0.13.0 h1:VPULb/v6bbYELAPTDFINEVaMTTybV5GLxDdcjnS+4oc= github.com/consensys/gnark-crypto v0.14.0 h1:DDBdl4HaBtdQsq/wfMwJvZNE80sHidrK3Nfrefatm0E=
github.com/consensys/gnark-crypto v0.13.0/go.mod h1:wKqwsieaKPThcFkHe0d0zMsbHEUWFmZcG7KBCse210o= github.com/consensys/gnark-crypto v0.14.0/go.mod h1:CU4UijNPsHawiVGNxe9co07FkzCeWHHrb1li/n1XoU0=
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@ -30,6 +30,7 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
@ -37,6 +38,7 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
@ -57,8 +59,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4=
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c=
github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY=
github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU=
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
@ -129,8 +131,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -151,8 +153,8 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -176,6 +178,8 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=