diff --git a/Makefile b/Makefile index 4329c0227cf..19bd4da9990 100644 --- a/Makefile +++ b/Makefile @@ -199,6 +199,7 @@ generate-mocks: install-mock-generators mockery --name '.*' --dir="./consensus/hotstuff" --case=underscore --output="./consensus/hotstuff/mocks" --outpkg="mocks" mockery --name '.*' --dir="./engine/access/wrapper" --case=underscore --output="./engine/access/mock" --outpkg="mock" mockery --name 'API' --dir="./access" --case=underscore --output="./access/mock" --outpkg="mock" + mockery --name 'Blocks' --dir="./access" --case=underscore --output="./access/mock" --outpkg="mock" mockery --name 'API' --dir="./engine/protocol" --case=underscore --output="./engine/protocol/mock" --outpkg="mock" mockery --name '.*' --dir="./engine/access/state_stream" --case=underscore --output="./engine/access/state_stream/mock" --outpkg="mock" mockery --name 'BlockTracker' --dir="./engine/access/subscription" --case=underscore --output="./engine/access/subscription/mock" --outpkg="mock" diff --git a/access/errors.go b/access/errors.go index 9f685508036..a663179f018 100644 --- a/access/errors.go +++ b/access/errors.go @@ -4,6 +4,8 @@ import ( "errors" "fmt" + "github.com/onflow/cadence" + "github.com/onflow/flow-go/model/flow" ) @@ -98,3 +100,18 @@ type InvalidTxRateLimitedError struct { func (e InvalidTxRateLimitedError) Error() string { return fmt.Sprintf("transaction rate limited for payer (%s)", e.Payer) } + +type InsufficientBalanceError struct { + Payer flow.Address + RequiredBalance cadence.UFix64 +} + +func (e InsufficientBalanceError) Error() string { + return fmt.Sprintf("transaction payer (%s) has insufficient balance to pay transaction fee. "+ + "Required balance: (%s). ", e.Payer, e.RequiredBalance.String()) +} + +func IsInsufficientBalanceError(err error) bool { + var balanceError InsufficientBalanceError + return errors.As(err, &balanceError) +} diff --git a/access/mock/blocks.go b/access/mock/blocks.go new file mode 100644 index 00000000000..153c2160321 --- /dev/null +++ b/access/mock/blocks.go @@ -0,0 +1,117 @@ +// Code generated by mockery v2.43.2. DO NOT EDIT. + +package mock + +import ( + flow "github.com/onflow/flow-go/model/flow" + mock "github.com/stretchr/testify/mock" +) + +// Blocks is an autogenerated mock type for the Blocks type +type Blocks struct { + mock.Mock +} + +// FinalizedHeader provides a mock function with given fields: +func (_m *Blocks) FinalizedHeader() (*flow.Header, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for FinalizedHeader") + } + + var r0 *flow.Header + var r1 error + if rf, ok := ret.Get(0).(func() (*flow.Header, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() *flow.Header); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*flow.Header) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// HeaderByID provides a mock function with given fields: id +func (_m *Blocks) HeaderByID(id flow.Identifier) (*flow.Header, error) { + ret := _m.Called(id) + + if len(ret) == 0 { + panic("no return value specified for HeaderByID") + } + + var r0 *flow.Header + var r1 error + if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Header, error)); ok { + return rf(id) + } + if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.Header); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*flow.Header) + } + } + + if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { + r1 = rf(id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SealedHeader provides a mock function with given fields: +func (_m *Blocks) SealedHeader() (*flow.Header, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for SealedHeader") + } + + var r0 *flow.Header + var r1 error + if rf, ok := ret.Get(0).(func() (*flow.Header, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() *flow.Header); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*flow.Header) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NewBlocks creates a new instance of Blocks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBlocks(t interface { + mock.TestingT + Cleanup(func()) +}) *Blocks { + mock := &Blocks{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/access/utils/cadence.go b/access/utils/cadence.go new file mode 100644 index 00000000000..90199d01f79 --- /dev/null +++ b/access/utils/cadence.go @@ -0,0 +1,20 @@ +package utils + +import ( + "errors" + + "github.com/onflow/cadence" + "github.com/onflow/cadence/encoding/json" +) + +func EncodeArgs(argValues []cadence.Value) ([][]byte, error) { + args := make([][]byte, len(argValues)) + for i, arg := range argValues { + var err error + args[i], err = json.Encode(arg) + if err != nil { + return nil, errors.New("could not encode cadence value: " + err.Error()) + } + } + return args, nil +} diff --git a/access/validator.go b/access/validator.go index afe951711bd..6463632fadd 100644 --- a/access/validator.go +++ b/access/validator.go @@ -1,13 +1,22 @@ package access import ( + "context" "errors" "fmt" + "github.com/onflow/cadence" + jsoncdc "github.com/onflow/cadence/encoding/json" "github.com/onflow/cadence/runtime/parser" "github.com/onflow/crypto" + "github.com/onflow/flow-core-contracts/lib/go/templates" + "github.com/rs/zerolog/log" + cadenceutils "github.com/onflow/flow-go/access/utils" + "github.com/onflow/flow-go/fvm" + "github.com/onflow/flow-go/fvm/systemcontracts" "github.com/onflow/flow-go/model/flow" + "github.com/onflow/flow-go/module/execution" "github.com/onflow/flow-go/state" "github.com/onflow/flow-go/state/protocol" ) @@ -15,6 +24,7 @@ import ( type Blocks interface { HeaderByID(id flow.Identifier) (*flow.Header, error) FinalizedHeader() (*flow.Header, error) + SealedHeader() (*flow.Header, error) } type ProtocolStateBlocks struct { @@ -42,6 +52,10 @@ func (b *ProtocolStateBlocks) FinalizedHeader() (*flow.Header, error) { return b.state.Final().Head() } +func (b *ProtocolStateBlocks) SealedHeader() (*flow.Header, error) { + return b.state.Sealed().Head() +} + // RateLimiter is an interface for checking if an address is rate limited. // By convention, the address used is the payer field of a transaction. // This rate limiter is applied when a transaction is first received by a @@ -70,28 +84,40 @@ type TransactionValidationOptions struct { CheckScriptsParse bool MaxTransactionByteSize uint64 MaxCollectionByteSize uint64 + CheckPayerBalance bool } type TransactionValidator struct { - blocks Blocks // for looking up blocks to check transaction expiry - chain flow.Chain // for checking validity of addresses - options TransactionValidationOptions - serviceAccountAddress flow.Address - limiter RateLimiter + blocks Blocks // for looking up blocks to check transaction expiry + chain flow.Chain // for checking validity of addresses + options TransactionValidationOptions + serviceAccountAddress flow.Address + limiter RateLimiter + scriptExecutor execution.ScriptExecutor + verifyPayerBalanceScript []byte } func NewTransactionValidator( blocks Blocks, chain flow.Chain, options TransactionValidationOptions, -) *TransactionValidator { - return &TransactionValidator{ - blocks: blocks, - chain: chain, - options: options, - serviceAccountAddress: chain.ServiceAddress(), - limiter: NewNoopLimiter(), + executor execution.ScriptExecutor, +) (*TransactionValidator, error) { + if options.CheckPayerBalance && executor == nil { + return nil, errors.New("transaction validator cannot use checkPayerBalance with nil executor") } + + env := systemcontracts.SystemContractsForChain(chain.ChainID()).AsTemplateEnv() + + return &TransactionValidator{ + blocks: blocks, + chain: chain, + options: options, + serviceAccountAddress: chain.ServiceAddress(), + limiter: NewNoopLimiter(), + scriptExecutor: executor, + verifyPayerBalanceScript: templates.GenerateVerifyPayerBalanceForTxExecution(env), + }, nil } func NewTransactionValidatorWithLimiter( @@ -109,7 +135,7 @@ func NewTransactionValidatorWithLimiter( } } -func (v *TransactionValidator) Validate(tx *flow.TransactionBody) (err error) { +func (v *TransactionValidator) Validate(ctx context.Context, tx *flow.TransactionBody) (err error) { // rate limit transactions for specific payers. // a short term solution to prevent attacks that send too many failed transactions // if a transaction is from a payer that should be rate limited, all the following @@ -159,6 +185,20 @@ func (v *TransactionValidator) Validate(tx *flow.TransactionBody) (err error) { return err } + err = v.checkSufficientBalanceToPayForTransaction(ctx, tx) + if err != nil { + // we only return InsufficientBalanceError as it's a client-side issue + // that requires action from a user. Other errors (e.g. parsing errors) + // are 'internal' and related to script execution process. they shouldn't + // prevent the transaction from proceeding. + if IsInsufficientBalanceError(err) { + return err + } + + // log and ignore all other errors + log.Info().Err(err).Msg("check payer validation skipped due to error") + } + // TODO replace checkSignatureFormat by verifying the account/payer signatures return nil @@ -346,6 +386,48 @@ func (v *TransactionValidator) checkSignatureFormat(tx *flow.TransactionBody) er return nil } +func (v *TransactionValidator) checkSufficientBalanceToPayForTransaction(ctx context.Context, tx *flow.TransactionBody) error { + if !v.options.CheckPayerBalance { + return nil + } + + header, err := v.blocks.SealedHeader() + if err != nil { + return fmt.Errorf("could not fetch block header: %w", err) + } + + payerAddress := cadence.NewAddress(tx.Payer) + inclusionEffort := cadence.UFix64(tx.InclusionEffort()) + gasLimit := cadence.UFix64(tx.GasLimit) + + args, err := cadenceutils.EncodeArgs([]cadence.Value{payerAddress, inclusionEffort, gasLimit}) + if err != nil { + return fmt.Errorf("failed to encode cadence args for script executor: %w", err) + } + + result, err := v.scriptExecutor.ExecuteAtBlockHeight(ctx, v.verifyPayerBalanceScript, args, header.Height) + if err != nil { + return fmt.Errorf("script finished with error: %w", err) + } + + value, err := jsoncdc.Decode(nil, result) + if err != nil { + return fmt.Errorf("could not decode result value returned by script executor: %w", err) + } + + canExecuteTransaction, requiredBalance, _, err := fvm.DecodeVerifyPayerBalanceResult(value) + if err != nil { + return fmt.Errorf("could not parse cadence value returned by script executor: %w", err) + } + + // return no error if payer has sufficient balance + if bool(canExecuteTransaction) { + return nil + } + + return InsufficientBalanceError{Payer: tx.Payer, RequiredBalance: requiredBalance} +} + func remove(s []string, r string) []string { for i, v := range s { if v == r { diff --git a/access/validator_test.go b/access/validator_test.go new file mode 100644 index 00000000000..1554a91cfcb --- /dev/null +++ b/access/validator_test.go @@ -0,0 +1,164 @@ +package access_test + +import ( + "context" + "errors" + "testing" + + "github.com/onflow/cadence" + "github.com/onflow/cadence/runtime/common" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/suite" + + jsoncdc "github.com/onflow/cadence/encoding/json" + + "github.com/onflow/flow-go/access" + accessmock "github.com/onflow/flow-go/access/mock" + "github.com/onflow/flow-go/fvm" + "github.com/onflow/flow-go/model/flow" + execmock "github.com/onflow/flow-go/module/execution/mock" + "github.com/onflow/flow-go/utils/unittest" +) + +func TestTransactionValidatorSuite(t *testing.T) { + suite.Run(t, new(TransactionValidatorSuite)) +} + +type TransactionValidatorSuite struct { + suite.Suite + blocks *accessmock.Blocks + header *flow.Header + chain flow.Chain + validatorOptions access.TransactionValidationOptions +} + +func (s *TransactionValidatorSuite) SetupTest() { + s.blocks = accessmock.NewBlocks(s.T()) + assert.NotNil(s.T(), s.blocks) + + s.header = unittest.BlockHeaderFixture() + assert.NotNil(s.T(), s.header) + + s.blocks. + On("HeaderByID", mock.Anything). + Return(s.header, nil) + + s.blocks. + On("FinalizedHeader"). + Return(s.header, nil) + + s.blocks. + On("SealedHeader"). + Return(s.header, nil) + + s.chain = flow.Testnet.Chain() + s.validatorOptions = access.TransactionValidationOptions{ + CheckPayerBalance: true, + MaxTransactionByteSize: flow.DefaultMaxTransactionByteSize, + MaxCollectionByteSize: flow.DefaultMaxCollectionByteSize, + } +} + +var verifyPayerBalanceResultType = cadence.NewStructType( + common.StringLocation("test"), + "VerifyPayerBalanceResult", + []cadence.Field{ + { + Identifier: fvm.VerifyPayerBalanceResultTypeCanExecuteTransactionFieldName, + Type: cadence.BoolType, + }, + { + Identifier: fvm.VerifyPayerBalanceResultTypeRequiredBalanceFieldName, + Type: cadence.UFix64Type, + }, + { + Identifier: fvm.VerifyPayerBalanceResultTypeMaximumTransactionFeesFieldName, + Type: cadence.UFix64Type, + }, + }, + nil, +) + +func (s *TransactionValidatorSuite) TestTransactionValidator_ScriptExecutorInternalError() { + scriptExecutor := execmock.NewScriptExecutor(s.T()) + assert.NotNil(s.T(), scriptExecutor) + + scriptExecutor. + On("ExecuteAtBlockHeight", mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(nil, errors.New("script executor internal error")). + Once() + + validator, err := access.NewTransactionValidator(s.blocks, s.chain, s.validatorOptions, scriptExecutor) + assert.NoError(s.T(), err) + assert.NotNil(s.T(), validator) + + txBody := unittest.TransactionBodyFixture() + + err = validator.Validate(context.Background(), &txBody) + assert.NoError(s.T(), err) +} + +func (s *TransactionValidatorSuite) TestTransactionValidator_SufficientBalance() { + scriptExecutor := execmock.NewScriptExecutor(s.T()) + + canExecuteTransaction := cadence.Bool(true) + requiredBalance := cadence.UFix64(1000) + maximumTransactionFees := cadence.UFix64(1000) + fields := []cadence.Value{canExecuteTransaction, requiredBalance, maximumTransactionFees} + + actualResponseValue := cadence.NewStruct(fields).WithType(verifyPayerBalanceResultType) + actualResponse, err := jsoncdc.Encode(actualResponseValue) + assert.NoError(s.T(), err) + + scriptExecutor. + On("ExecuteAtBlockHeight", mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(actualResponse, nil). + Once() + + validator, err := access.NewTransactionValidator(s.blocks, s.chain, s.validatorOptions, scriptExecutor) + assert.NoError(s.T(), err) + assert.NotNil(s.T(), validator) + + txBody := unittest.TransactionBodyFixture() + + err = validator.Validate(context.Background(), &txBody) + assert.NoError(s.T(), err) +} + +func (s *TransactionValidatorSuite) TestTransactionValidator_InsufficientBalance() { + scriptExecutor := execmock.NewScriptExecutor(s.T()) + + canExecuteTransaction := cadence.Bool(false) + requiredBalance := cadence.UFix64(1000) + maximumTransactionFees := cadence.UFix64(1000) + fields := []cadence.Value{canExecuteTransaction, requiredBalance, maximumTransactionFees} + + actualResponseValue := cadence.NewStruct(fields).WithType(verifyPayerBalanceResultType) + actualResponse, err := jsoncdc.Encode(actualResponseValue) + assert.NoError(s.T(), err) + + scriptExecutor. + On("ExecuteAtBlockHeight", mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(actualResponse, nil). + Once() + + actualAccountResponse, err := unittest.AccountFixture() + assert.NoError(s.T(), err) + assert.NotNil(s.T(), actualAccountResponse) + + validator, err := access.NewTransactionValidator(s.blocks, s.chain, s.validatorOptions, scriptExecutor) + assert.NoError(s.T(), err) + assert.NotNil(s.T(), validator) + + txBody := unittest.TransactionBodyFixture() + + expectedError := access.InsufficientBalanceError{ + Payer: unittest.AddressFixture(), + RequiredBalance: requiredBalance, + } + + actualErr := validator.Validate(context.Background(), &txBody) + + assert.ErrorIs(s.T(), actualErr, expectedError) +} diff --git a/cmd/access/node_builder/access_node_builder.go b/cmd/access/node_builder/access_node_builder.go index 6ec79994829..eba13cab3e5 100644 --- a/cmd/access/node_builder/access_node_builder.go +++ b/cmd/access/node_builder/access_node_builder.go @@ -163,6 +163,7 @@ type AccessNodeConfig struct { registerCacheType string registerCacheSize uint programCacheSize uint + checkPayerBalance bool } type PublicNetworkConfig struct { @@ -262,6 +263,7 @@ func DefaultAccessNodeConfig() *AccessNodeConfig { registerCacheType: pStorage.CacheTypeTwoQueue.String(), registerCacheSize: 0, programCacheSize: 0, + checkPayerBalance: false, } } @@ -1358,6 +1360,10 @@ func (builder *FlowAccessNodeBuilder) extraFlags() { "program-cache-size", defaultConfig.programCacheSize, "[experimental] number of blocks to cache for cadence programs. use 0 to disable cache. default: 0. Note: this is an experimental feature and may cause nodes to become unstable under certain workloads. Use with caution.") + flags.BoolVar(&builder.checkPayerBalance, + "check-payer-balance", + defaultConfig.checkPayerBalance, + "checks that a transaction payer has sufficient balance to pay fees before submitting it to collection nodes") }).ValidateFlags(func() error { if builder.supportsObserver && (builder.PublicNetworkConfig.BindAddress == cmd.NotSet || builder.PublicNetworkConfig.BindAddress == "") { return errors.New("public-network-address must be set if supports-observer is true") @@ -1421,6 +1427,10 @@ func (builder *FlowAccessNodeBuilder) extraFlags() { return errors.New("transaction-error-messages-cache-size must be greater than 0") } + if builder.checkPayerBalance && !builder.executionDataIndexingEnabled { + return errors.New("execution-data-indexing-enabled must be set if check-payer-balance is enabled") + } + return nil }) } @@ -1822,6 +1832,7 @@ func (builder *FlowAccessNodeBuilder) Build() (cmd.Node, error) { TxErrorMessagesCacheSize: builder.TxErrorMessagesCacheSize, ScriptExecutor: builder.ScriptExecutor, ScriptExecutionMode: scriptExecMode, + CheckPayerBalance: builder.checkPayerBalance, EventQueryMode: eventQueryMode, BlockTracker: blockTracker, SubscriptionHandler: subscription.NewSubscriptionHandler( diff --git a/engine/access/rpc/backend/backend.go b/engine/access/rpc/backend/backend.go index 2ff8a37c0ed..3af46045697 100644 --- a/engine/access/rpc/backend/backend.go +++ b/engine/access/rpc/backend/backend.go @@ -110,6 +110,7 @@ type Params struct { TxErrorMessagesCacheSize uint ScriptExecutor execution.ScriptExecutor ScriptExecutionMode IndexQueryMode + CheckPayerBalance bool EventQueryMode IndexQueryMode BlockTracker subscription.BlockTracker SubscriptionHandler *subscription.SubscriptionHandler @@ -245,6 +246,11 @@ func New(params Params) (*Backend, error) { nodeInfo: nodeInfo, } + txValidator, err := configureTransactionValidator(params.State, params.ChainID, params.ScriptExecutor, params.CheckPayerBalance) + if err != nil { + return nil, fmt.Errorf("could not create transaction validator: %w", err) + } + b.backendTransactions = backendTransactions{ TransactionsLocalDataProvider: transactionsLocalDataProvider, log: params.Log, @@ -252,7 +258,7 @@ func New(params Params) (*Backend, error) { chainID: params.ChainID, transactions: params.Transactions, executionReceipts: params.ExecutionReceipts, - transactionValidator: configureTransactionValidator(params.State, params.ChainID), + transactionValidator: txValidator, transactionMetrics: params.AccessMetrics, retry: retry, connFactory: params.ConnFactory, @@ -304,7 +310,7 @@ func identifierList(ids []string) (flow.IdentifierList, error) { return idList, nil } -func configureTransactionValidator(state protocol.State, chainID flow.ChainID) *access.TransactionValidator { +func configureTransactionValidator(state protocol.State, chainID flow.ChainID, executor execution.ScriptExecutor, checkPayerBalance bool) (*access.TransactionValidator, error) { return access.NewTransactionValidator( access.NewProtocolStateBlocks(state), chainID.Chain(), @@ -317,7 +323,9 @@ func configureTransactionValidator(state protocol.State, chainID flow.ChainID) * MaxGasLimit: flow.DefaultMaxTransactionGasLimit, MaxTransactionByteSize: flow.DefaultMaxTransactionByteSize, MaxCollectionByteSize: flow.DefaultMaxCollectionByteSize, + CheckPayerBalance: checkPayerBalance, }, + executor, ) } diff --git a/engine/access/rpc/backend/backend_transactions.go b/engine/access/rpc/backend/backend_transactions.go index 2aab3385703..7436863f9af 100644 --- a/engine/access/rpc/backend/backend_transactions.go +++ b/engine/access/rpc/backend/backend_transactions.go @@ -56,7 +56,7 @@ func (b *backendTransactions) SendTransaction( ) error { now := time.Now().UTC() - err := b.transactionValidator.Validate(tx) + err := b.transactionValidator.Validate(ctx, tx) if err != nil { return status.Errorf(codes.InvalidArgument, "invalid transaction: %s", err.Error()) } diff --git a/engine/collection/ingest/engine.go b/engine/collection/ingest/engine.go index 81141b65977..a8adcedaded 100644 --- a/engine/collection/ingest/engine.go +++ b/engine/collection/ingest/engine.go @@ -355,8 +355,8 @@ func (e *Engine) ingestTransaction( return nil } - // check if the transaction is valid - err = e.transactionValidator.Validate(tx) + // we don't pass actual ctx as we don't execute any scripts inside for now + err = e.transactionValidator.Validate(context.Background(), tx) if err != nil { return engine.NewInvalidInputErrorf("invalid transaction (%x): %w", txID, err) } diff --git a/fvm/transactionPayerBalanceChecker.go b/fvm/transactionPayerBalanceChecker.go index 79edfff5804..f3056e8b148 100644 --- a/fvm/transactionPayerBalanceChecker.go +++ b/fvm/transactionPayerBalanceChecker.go @@ -16,9 +16,9 @@ const VerifyPayerBalanceResultTypeCanExecuteTransactionFieldName = "canExecuteTr const VerifyPayerBalanceResultTypeRequiredBalanceFieldName = "requiredBalance" const VerifyPayerBalanceResultTypeMaximumTransactionFeesFieldName = "maximumTransactionFees" -// decodeVerifyPayerBalanceResult decodes the VerifyPayerBalanceResult struct +// DecodeVerifyPayerBalanceResult decodes the VerifyPayerBalanceResult struct // https://github.com/onflow/flow-core-contracts/blob/7c70c6a1d33c2879b60c78e363fa68fc6fce13b9/contracts/FlowFees.cdc#L75 -func decodeVerifyPayerBalanceResult(resultValue cadence.Value) ( +func DecodeVerifyPayerBalanceResult(resultValue cadence.Value) ( canExecuteTransaction cadence.Bool, requiredBalance cadence.UFix64, maximumTransactionFees cadence.UFix64, @@ -86,7 +86,7 @@ func (_ TransactionPayerBalanceChecker) CheckPayerBalanceAndReturnMaxFees( return 0, errors.NewPayerBalanceCheckFailure(proc.Transaction.Payer, err) } - payerCanPay, requiredBalance, maxFees, err := decodeVerifyPayerBalanceResult(resultValue) + payerCanPay, requiredBalance, maxFees, err := DecodeVerifyPayerBalanceResult(resultValue) if err != nil { return 0, errors.NewPayerBalanceCheckFailure(proc.Transaction.Payer, err) } diff --git a/go.mod b/go.mod index 1816fb8b67e..50230de0cf0 100644 --- a/go.mod +++ b/go.mod @@ -50,8 +50,8 @@ require ( github.com/onflow/cadence v1.0.0-preview.38 github.com/onflow/crypto v0.25.1 github.com/onflow/flow v0.3.4 - github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 - github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 + github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 + github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 github.com/onflow/flow-go-sdk v1.0.0-preview.41 github.com/onflow/flow/protobuf/go/flow v0.4.5 github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 diff --git a/go.sum b/go.sum index 1ed946ed411..ecd4ff47c65 100644 --- a/go.sum +++ b/go.sum @@ -2174,10 +2174,10 @@ github.com/onflow/crypto v0.25.1 h1:0txy2PKPMM873JbpxQNbJmuOJtD56bfs48RQfm0ts5A= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/flow v0.3.4 h1:FXUWVdYB90f/rjNcY0Owo30gL790tiYff9Pb/sycXYE= github.com/onflow/flow v0.3.4/go.mod h1:lzyAYmbu1HfkZ9cfnL5/sjrrsnJiUU8fRL26CqLP7+c= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 h1:cq3RfBr9TnTSnsGlUHMjMGZib24Horfb1XJqMpkN5ew= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 h1:aMFJdB2CW+Dzm+AJ5QN6J1yWh+a0l2RxHN2/TtLaXUo= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4bmSrhtTkyc2cZF4/gH11ix9E3F5k= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= diff --git a/insecure/go.mod b/insecure/go.mod index 1c6f93ba2ce..5343d191829 100644 --- a/insecure/go.mod +++ b/insecure/go.mod @@ -202,8 +202,8 @@ require ( github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/atree v0.7.0-rc.2 // indirect github.com/onflow/cadence v1.0.0-preview.38 // indirect - github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 // indirect - github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 // indirect + github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 // indirect + github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 // indirect github.com/onflow/flow-ft/lib/go/contracts v1.0.0 // indirect github.com/onflow/flow-ft/lib/go/templates v1.0.0 // indirect github.com/onflow/flow-go-sdk v1.0.0-preview.41 // indirect diff --git a/insecure/go.sum b/insecure/go.sum index 0a3fb4d2d2d..8c233a62bf0 100644 --- a/insecure/go.sum +++ b/insecure/go.sum @@ -2162,10 +2162,10 @@ github.com/onflow/cadence v1.0.0-preview.38/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmp github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.1 h1:0txy2PKPMM873JbpxQNbJmuOJtD56bfs48RQfm0ts5A= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 h1:cq3RfBr9TnTSnsGlUHMjMGZib24Horfb1XJqMpkN5ew= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 h1:aMFJdB2CW+Dzm+AJ5QN6J1yWh+a0l2RxHN2/TtLaXUo= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4bmSrhtTkyc2cZF4/gH11ix9E3F5k= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= diff --git a/integration/go.mod b/integration/go.mod index 69d3a090183..e44e89f7816 100644 --- a/integration/go.mod +++ b/integration/go.mod @@ -21,10 +21,10 @@ require ( github.com/libp2p/go-libp2p v0.32.2 github.com/onflow/cadence v1.0.0-preview.38 github.com/onflow/crypto v0.25.1 - github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 - github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 - github.com/onflow/flow-emulator v1.0.0-preview.34 - github.com/onflow/flow-go v0.36.2-0.20240717162253-d5d2e606ef53 + github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 + github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 + github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240718190812-a4af59d6987a + github.com/onflow/flow-go v0.36.2-0.20240717214129-9ea6faeee3e7 github.com/onflow/flow-go-sdk v1.0.0-preview.41 github.com/onflow/flow-go/insecure v0.0.0-00010101000000-000000000000 github.com/onflow/flow/protobuf/go/flow v0.4.5 @@ -256,7 +256,7 @@ require ( github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pierrec/lz4/v4 v4.1.18 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect @@ -280,13 +280,14 @@ require ( github.com/sergi/go-diff v1.2.0 // indirect github.com/sethvargo/go-retry v0.2.3 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/shirou/gopsutil/v3 v3.22.2 // indirect + github.com/shirou/gopsutil/v3 v3.24.5 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/slok/go-http-metrics v0.10.0 // indirect github.com/sony/gobreaker v0.5.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.10.0 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -309,7 +310,7 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/yhassanzadeh13/go-libp2p-pubsub v0.6.11-flow-expose-msg.0.20240220190333-03695dea34a3 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zeebo/blake3 v0.2.3 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect go.opencensus.io v0.24.0 // indirect @@ -327,15 +328,15 @@ require ( go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.20.0 // indirect + golang.org/x/tools v0.22.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/api v0.162.0 // indirect diff --git a/integration/go.sum b/integration/go.sum index e632b76abd0..41c47576042 100644 --- a/integration/go.sum +++ b/integration/go.sum @@ -2146,12 +2146,12 @@ github.com/onflow/cadence v1.0.0-preview.38/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmp github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.1 h1:0txy2PKPMM873JbpxQNbJmuOJtD56bfs48RQfm0ts5A= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 h1:cq3RfBr9TnTSnsGlUHMjMGZib24Horfb1XJqMpkN5ew= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 h1:aMFJdB2CW+Dzm+AJ5QN6J1yWh+a0l2RxHN2/TtLaXUo= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= -github.com/onflow/flow-emulator v1.0.0-preview.34 h1:GeK6erPZZV8/z0s9LLA2QFXu2L7OkGsLP3niidDWJ7M= -github.com/onflow/flow-emulator v1.0.0-preview.34/go.mod h1:0c5HbKiPHDnMVkjMjoF8B0fLCdyGkXrWSheSnH8+hVY= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4bmSrhtTkyc2cZF4/gH11ix9E3F5k= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= +github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240718190812-a4af59d6987a h1:GzAosZmXAYM+qGs5y0DjdtjFfjO4h10sCmivKR3oeKA= +github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240718190812-a4af59d6987a/go.mod h1:+8V41dSi5qyU7beu+qbyLpK7p1olx9JoeJAbuqmly6E= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= @@ -2203,8 +2203,8 @@ github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChl github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= @@ -2337,8 +2337,12 @@ github.com/sethvargo/go-retry v0.2.3 h1:oYlgvIvsju3jNbottWABtbnoLC+GDtLdBHxKWxQm github.com/sethvargo/go-retry v0.2.3/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.22.2 h1:wCrArWFkHYIdDxx/FSfF5RB4dpJYW6t7rcp3+zL8uks= -github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= +github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= +github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= @@ -2393,8 +2397,8 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= -github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= @@ -2452,11 +2456,9 @@ github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8 github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= -github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -2523,8 +2525,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= @@ -2639,8 +2641,8 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +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= @@ -2714,8 +2716,8 @@ golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.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-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2802,8 +2804,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +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-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2956,7 +2958,6 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2967,7 +2968,6 @@ golang.org/x/sys v0.0.0-20211020174200-9d6173849985/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -3005,8 +3005,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.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-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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= @@ -3024,8 +3024,8 @@ golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -3046,8 +3046,9 @@ golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -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-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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= @@ -3143,8 +3144,8 @@ golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +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=