diff --git a/blockchain/types/mocks/statedb_mock.go b/blockchain/types/mocks/statedb_mock.go new file mode 100644 index 000000000..c041f125c --- /dev/null +++ b/blockchain/types/mocks/statedb_mock.go @@ -0,0 +1,190 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/kaiachain/kaia/blockchain/types (interfaces: StateDB) +// +// Generated by this command: +// +// mockgen -destination=./blockchain/types/mocks/statedb_mock.go github.com/kaiachain/kaia/blockchain/types StateDB +// + +// Package mock_types is a generated GoMock package. +package mock_types + +import ( + reflect "reflect" + + account "github.com/kaiachain/kaia/blockchain/types/account" + accountkey "github.com/kaiachain/kaia/blockchain/types/accountkey" + common "github.com/kaiachain/kaia/common" + params "github.com/kaiachain/kaia/params" + gomock "go.uber.org/mock/gomock" +) + +// MockStateDB is a mock of StateDB interface. +type MockStateDB struct { + ctrl *gomock.Controller + recorder *MockStateDBMockRecorder + isgomock struct{} +} + +// MockStateDBMockRecorder is the mock recorder for MockStateDB. +type MockStateDBMockRecorder struct { + mock *MockStateDB +} + +// NewMockStateDB creates a new mock instance. +func NewMockStateDB(ctrl *gomock.Controller) *MockStateDB { + mock := &MockStateDB{ctrl: ctrl} + mock.recorder = &MockStateDBMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockStateDB) EXPECT() *MockStateDBMockRecorder { + return m.recorder +} + +// CreateEOA mocks base method. +func (m *MockStateDB) CreateEOA(addr common.Address, humanReadable bool, key accountkey.AccountKey) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "CreateEOA", addr, humanReadable, key) +} + +// CreateEOA indicates an expected call of CreateEOA. +func (mr *MockStateDBMockRecorder) CreateEOA(addr, humanReadable, key any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateEOA", reflect.TypeOf((*MockStateDB)(nil).CreateEOA), addr, humanReadable, key) +} + +// CreateSmartContractAccount mocks base method. +func (m *MockStateDB) CreateSmartContractAccount(addr common.Address, format params.CodeFormat, r params.Rules) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "CreateSmartContractAccount", addr, format, r) +} + +// CreateSmartContractAccount indicates an expected call of CreateSmartContractAccount. +func (mr *MockStateDBMockRecorder) CreateSmartContractAccount(addr, format, r any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSmartContractAccount", reflect.TypeOf((*MockStateDB)(nil).CreateSmartContractAccount), addr, format, r) +} + +// CreateSmartContractAccountWithKey mocks base method. +func (m *MockStateDB) CreateSmartContractAccountWithKey(addr common.Address, humanReadable bool, key accountkey.AccountKey, format params.CodeFormat, r params.Rules) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "CreateSmartContractAccountWithKey", addr, humanReadable, key, format, r) +} + +// CreateSmartContractAccountWithKey indicates an expected call of CreateSmartContractAccountWithKey. +func (mr *MockStateDBMockRecorder) CreateSmartContractAccountWithKey(addr, humanReadable, key, format, r any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSmartContractAccountWithKey", reflect.TypeOf((*MockStateDB)(nil).CreateSmartContractAccountWithKey), addr, humanReadable, key, format, r) +} + +// Exist mocks base method. +func (m *MockStateDB) Exist(arg0 common.Address) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Exist", arg0) + ret0, _ := ret[0].(bool) + return ret0 +} + +// Exist indicates an expected call of Exist. +func (mr *MockStateDBMockRecorder) Exist(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exist", reflect.TypeOf((*MockStateDB)(nil).Exist), arg0) +} + +// GetAccount mocks base method. +func (m *MockStateDB) GetAccount(addr common.Address) account.Account { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccount", addr) + ret0, _ := ret[0].(account.Account) + return ret0 +} + +// GetAccount indicates an expected call of GetAccount. +func (mr *MockStateDBMockRecorder) GetAccount(addr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockStateDB)(nil).GetAccount), addr) +} + +// GetKey mocks base method. +func (m *MockStateDB) GetKey(addr common.Address) accountkey.AccountKey { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetKey", addr) + ret0, _ := ret[0].(accountkey.AccountKey) + return ret0 +} + +// GetKey indicates an expected call of GetKey. +func (mr *MockStateDBMockRecorder) GetKey(addr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKey", reflect.TypeOf((*MockStateDB)(nil).GetKey), addr) +} + +// IncNonce mocks base method. +func (m *MockStateDB) IncNonce(arg0 common.Address) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IncNonce", arg0) +} + +// IncNonce indicates an expected call of IncNonce. +func (mr *MockStateDBMockRecorder) IncNonce(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncNonce", reflect.TypeOf((*MockStateDB)(nil).IncNonce), arg0) +} + +// IsContractAvailable mocks base method. +func (m *MockStateDB) IsContractAvailable(addr common.Address) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsContractAvailable", addr) + ret0, _ := ret[0].(bool) + return ret0 +} + +// IsContractAvailable indicates an expected call of IsContractAvailable. +func (mr *MockStateDBMockRecorder) IsContractAvailable(addr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsContractAvailable", reflect.TypeOf((*MockStateDB)(nil).IsContractAvailable), addr) +} + +// IsProgramAccount mocks base method. +func (m *MockStateDB) IsProgramAccount(addr common.Address) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsProgramAccount", addr) + ret0, _ := ret[0].(bool) + return ret0 +} + +// IsProgramAccount indicates an expected call of IsProgramAccount. +func (mr *MockStateDBMockRecorder) IsProgramAccount(addr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsProgramAccount", reflect.TypeOf((*MockStateDB)(nil).IsProgramAccount), addr) +} + +// IsValidCodeFormat mocks base method. +func (m *MockStateDB) IsValidCodeFormat(addr common.Address) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsValidCodeFormat", addr) + ret0, _ := ret[0].(bool) + return ret0 +} + +// IsValidCodeFormat indicates an expected call of IsValidCodeFormat. +func (mr *MockStateDBMockRecorder) IsValidCodeFormat(addr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsValidCodeFormat", reflect.TypeOf((*MockStateDB)(nil).IsValidCodeFormat), addr) +} + +// UpdateKey mocks base method. +func (m *MockStateDB) UpdateKey(addr common.Address, key accountkey.AccountKey, currentBlockNumber uint64) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateKey", addr, key, currentBlockNumber) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateKey indicates an expected call of UpdateKey. +func (mr *MockStateDBMockRecorder) UpdateKey(addr, key, currentBlockNumber any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateKey", reflect.TypeOf((*MockStateDB)(nil).UpdateKey), addr, key, currentBlockNumber) +} diff --git a/blockchain/types/tx_internal_data_test.go b/blockchain/types/tx_internal_data_test.go new file mode 100644 index 000000000..bd46d7994 --- /dev/null +++ b/blockchain/types/tx_internal_data_test.go @@ -0,0 +1,237 @@ +// Copyright 2024 The Kaia Authors +// This file is part of the Kaia library. +// +// The Kaia library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The Kaia library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the Kaia library. If not, see . + +package types + +import ( + "testing" + + "github.com/kaiachain/kaia/blockchain/types/account" + mock_types "github.com/kaiachain/kaia/blockchain/types/mocks" + "github.com/kaiachain/kaia/common" + "github.com/kaiachain/kaia/kerrors" + "go.uber.org/mock/gomock" + "gotest.tools/assert" +) + +// Coverage is detected by calling functions that modify state. +func TestValidate7702(t *testing.T) { + // prepare target txType + typesToMustBeEoaWithoutCode := []TxType{ + TxTypeValueTransfer, TxTypeFeeDelegatedValueTransfer, TxTypeFeeDelegatedValueTransferWithRatio, + TxTypeValueTransferMemo, TxTypeFeeDelegatedValueTransferMemo, TxTypeFeeDelegatedValueTransferMemoWithRatio, + } + typesFromMustBeEoaWithoutCode := []TxType{ + TxTypeAccountUpdate, TxTypeFeeDelegatedAccountUpdate, TxTypeFeeDelegatedAccountUpdateWithRatio, + } + typesToMustBeEOAWithCodeOrSCA := []TxType{ + TxTypeSmartContractExecution, TxTypeFeeDelegatedSmartContractExecution, TxTypeFeeDelegatedSmartContractExecutionWithRatio, + } + + // prepare account + nonEmptyCodeHash := common.HexToHash("aaaaaaaabbbbbbbbccccccccddddddddaaaaaaaabbbbbbbbccccccccdddddddd").Bytes() + eoaWithoutCode, _ := account.NewAccountWithType(account.ExternallyOwnedAccountType) + eoa, _ := account.NewAccountWithType(account.ExternallyOwnedAccountType) + eoaWithCode := account.GetProgramAccount(eoa) + if eoaWithCode != nil { + eoaWithCode.SetCodeHash(nonEmptyCodeHash) + } + sca, _ := account.NewAccountWithType(account.SmartContractAccountType) + + // Because we are testing with mocks, the consistency of the key and address is not important. + // Therefore, we assign simple addresses. + eoaWithoutCodeAddress := common.HexToAddress("0x000000000000000000000000000000000000aaaa") + eoaWithCodeAddress := common.HexToAddress("0x000000000000000000000000000000000000bbbb") + scaAddress := common.HexToAddress("0x000000000000000000000000000000000000cccc") + + type Args struct { + targetTypes []TxType + from common.Address + to common.Address + } + + tests := []struct { + name string + args Args + expectedErr error + expectedMockCalls func(m *mock_types.MockStateDB) + }{ + // Group1: type of value transfer + { + name: "valid value transfer (to account not exist)", + args: Args{ + targetTypes: typesToMustBeEoaWithoutCode, + from: common.Address{}, + to: eoaWithoutCodeAddress, + }, + expectedErr: nil, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(eoaWithoutCodeAddress).Return(nil) + }, + }, + { + name: "valid value transfer (to account is EOA without a code)", + args: Args{ + targetTypes: typesToMustBeEoaWithoutCode, + from: common.Address{}, + to: eoaWithoutCodeAddress, + }, + expectedErr: nil, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(eoaWithoutCodeAddress).Return(eoaWithoutCode) + }, + }, + { + name: "invalid value transfer (to account is EOA with a code)", + args: Args{ + targetTypes: typesToMustBeEoaWithoutCode, + from: common.Address{}, + to: eoaWithCodeAddress, + }, + expectedErr: kerrors.ErrToMustBeEOAWithoutCode, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(eoaWithCodeAddress).Return(eoaWithCode) + }, + }, + { + name: "invalid value transfer (to account is SCA)", + args: Args{ + targetTypes: typesToMustBeEoaWithoutCode, + from: common.Address{}, + to: scaAddress, + }, + expectedErr: kerrors.ErrToMustBeEOAWithoutCode, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(scaAddress).Return(sca) + }, + }, + + // Group2: type of account update + { + name: "valid account update (from account not exist)", + args: Args{ + targetTypes: typesFromMustBeEoaWithoutCode, + from: eoaWithoutCodeAddress, + to: eoaWithoutCodeAddress, + }, + expectedErr: nil, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(eoaWithoutCodeAddress).Return(nil) + }, + }, + { + name: "valid account update (from account is EOA without a code)", + args: Args{ + targetTypes: typesFromMustBeEoaWithoutCode, + from: eoaWithoutCodeAddress, + to: common.Address{}, + }, + expectedErr: nil, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(eoaWithoutCodeAddress).Return(eoaWithoutCode) + }, + }, + { + name: "invalid account update (from account is EOA with a code)", + args: Args{ + targetTypes: typesFromMustBeEoaWithoutCode, + from: eoaWithCodeAddress, + to: common.Address{}, + }, + expectedErr: kerrors.ErrFromMustBeEOAWithoutCode, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(eoaWithCodeAddress).Return(eoaWithCode) + }, + }, + { + name: "invalid account update (from account is SCA)", + args: Args{ + targetTypes: typesFromMustBeEoaWithoutCode, + from: scaAddress, + to: common.Address{}, + }, + expectedErr: kerrors.ErrFromMustBeEOAWithoutCode, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(scaAddress).Return(sca) + }, + }, + + // Group3: type of smart contract execution + { + name: "valid smart contract execution (to account is SCA)", + args: Args{ + targetTypes: typesToMustBeEOAWithCodeOrSCA, + from: common.Address{}, + to: scaAddress, + }, + expectedErr: nil, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(scaAddress).Return(sca) + }, + }, + { + name: "valid smart contract execution (to account is EOA with a code)", + args: Args{ + targetTypes: typesToMustBeEOAWithCodeOrSCA, + from: common.Address{}, + to: eoaWithCodeAddress, + }, + expectedErr: nil, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(eoaWithCodeAddress).Return(eoaWithCode) + }, + }, + { + name: "invalid smart contract execution (to account not exist)", + args: Args{ + targetTypes: typesToMustBeEOAWithCodeOrSCA, + from: common.Address{}, + to: eoaWithoutCodeAddress, + }, + expectedErr: kerrors.ErrToMustBeEOAWithCodeOrSCA, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(eoaWithoutCodeAddress).Return(nil) + }, + }, + { + name: "invalid smart contract execution (to account is EOA without a code)", + args: Args{ + targetTypes: typesToMustBeEOAWithCodeOrSCA, + from: common.Address{}, + to: eoaWithoutCodeAddress, + }, + expectedErr: kerrors.ErrToMustBeEOAWithCodeOrSCA, + expectedMockCalls: func(m *mock_types.MockStateDB) { + m.EXPECT().GetAccount(eoaWithoutCodeAddress).Return(eoaWithoutCode) + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + for _, txType := range tt.args.targetTypes { + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + mockStateDB := mock_types.NewMockStateDB(mockCtrl) + tt.expectedMockCalls(mockStateDB) + + err := validate7702(mockStateDB, txType, tt.args.from, tt.args.to) + assert.Equal(t, tt.expectedErr, err) + } + }) + } +} diff --git a/go.mod b/go.mod index 99b4e00c3..9ad5a75f2 100644 --- a/go.mod +++ b/go.mod @@ -56,10 +56,10 @@ require ( github.com/urfave/cli/v2 v2.25.7 github.com/valyala/fasthttp v1.40.0 go.uber.org/zap v1.13.0 - golang.org/x/crypto v0.21.0 - golang.org/x/net v0.23.0 - golang.org/x/sys v0.18.0 - golang.org/x/tools v0.19.0 + golang.org/x/crypto v0.24.0 + golang.org/x/net v0.26.0 + golang.org/x/sys v0.21.0 + golang.org/x/tools v0.22.0 google.golang.org/grpc v1.56.3 gopkg.in/DataDog/dd-trace-go.v1 v1.42.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c @@ -78,6 +78,7 @@ require ( github.com/satori/go.uuid v1.2.0 github.com/tyler-smith/go-bip32 v1.0.0 github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1 + go.uber.org/mock v0.5.0 golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 ) @@ -115,7 +116,7 @@ require ( github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.1.0 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/jcmturner/gofork v1.0.0 // indirect @@ -149,9 +150,9 @@ require ( go4.org/intern v0.0.0-20211027215823-ae77deb06f29 // indirect go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/mod v0.16.0 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect diff --git a/go.sum b/go.sum index 2fc698420..12150399a 100644 --- a/go.sum +++ b/go.sum @@ -308,8 +308,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/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.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -663,6 +663,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -690,8 +692,8 @@ golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -731,8 +733,8 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -773,8 +775,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -857,8 +859,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -869,8 +871,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -928,8 +930,8 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=