Skip to content

Store proofs per output that the outputID corresponds to its content #1918

Store proofs per output that the outputID corresponds to its content

Store proofs per output that the outputID corresponds to its content #1918

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / golangci failed Oct 11, 2023 in 1s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (48)

pkg/utils/ioutils.go|1| : # github.com/iotaledger/iota-core/pkg/utils
pkg/utils/rand.go|244 col 27| undefined: tpkg.RandEpoch (typecheck)
pkg/protocol/engine/utxoledger/snapshot.go|10 col 2| could not import github.com/iotaledger/iota-core/pkg/utils (-: # github.com/iotaledger/iota-core/pkg/utils
pkg/utils/rand.go|244 col 27| undefined: tpkg.RandEpoch) (typecheck)
pkg/protocol/engine/utxoledger/output.go|43 col 23| undefined: iotago.OutputIDProof (typecheck)
pkg/protocol/engine/utxoledger/output.go|96 col 42| undefined: iotago.OutputIDProof (typecheck)
pkg/protocol/engine/utxoledger/output.go|144 col 22| undefined: iotago.OutputIDProof (typecheck)
pkg/protocol/engine/utxoledger/output.go|173 col 22| undefined: iotago.OutputIDProof (typecheck)
pkg/protocol/engine/utxoledger/output.go|100 col 28| undefined: iotago.OutputIDProofFromBytes (typecheck)
pkg/protocol/engine/utxoledger/snapshot.go|70 col 26| undefined: iotago.OutputIDProofFromBytes (typecheck)
pkg/protocol/engine/engine.go|309 col 130| cannot infer A (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/lo.go:279:1) (typecheck)
pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go|84 col 23| parentBlock.Solid().OnUpdateOnce undefined (type reactive.Variable[bool] has no field or method OnUpdateOnce) (typecheck)
pkg/protocol/engine/accounts/accountsledger/snapshot.go|11 col 2| could not import github.com/iotaledger/iota-core/pkg/utils (-: # github.com/iotaledger/iota-core/pkg/utils
pkg/utils/rand.go|244 col 27| undefined: tpkg.RandEpoch) (typecheck)
pkg/protocol/engine/ledger/ledger/ledger.go|755 col 36| cannot infer Rank (pkg/core/vote/vote.go:21:1) (typecheck)
pkg/protocol/engine/ledger/ledger/vm.go|87 col 3| outputID declared and not used (typecheck)
pkg/protocol/engine/ledger/ledger/vm.go|173 col 24| undefined: iotago.OutputIDProofFromTransaction (typecheck)
pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go|92 col 49| not enough arguments in call to lo.PanicOnErr
components/debugapi/node.go|18 col 26| cannot infer A (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/lo.go:279:1) (typecheck)
components/inx/server_issuance.go|55 col 86| not enough arguments in call to lo.Return2
components/restapi/core/utxo.go|13 col 44| undefined: apimodels.OutputResponse (typecheck)
components/restapi/core/utxo.go|30 col 52| undefined: apimodels.OutputMetadata (typecheck)
components/restapi/core/utxo.go|48 col 56| undefined: apimodels.OutputWithMetadataResponse (typecheck)
components/restapi/core/utxo.go|84 col 71| undefined: apimodels.OutputMetadata (typecheck)
components/restapi/core/utxo.go|107 col 68| undefined: apimodels.OutputMetadata (typecheck)
components/restapi/core/accounts.go|35 col 18| cannot infer T (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/safemath/safe_math.go:36:1) (typecheck)
components/restapi/core/accounts.go|92 col 43| cannot infer T (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/lo.go:235:1) (typecheck)
components/restapi/core/utxo.go|24 col 20| undefined: apimodels.OutputResponse (typecheck)
components/restapi/core/utxo.go|65 col 21| undefined: apimodels.OutputWithMetadataResponse (typecheck)
components/restapi/core/utxo.go|77 col 20| undefined: apimodels.OutputWithMetadataResponse (typecheck)
components/restapi/core/utxo.go|87 col 21| undefined: apimodels.OutputMetadata (typecheck)
components/restapi/core/utxo.go|110 col 21| undefined: apimodels.OutputMetadata (typecheck)
pkg/protocol/engine/utxoledger/tpkg/random.go|6 col 2| could not import github.com/iotaledger/iota-core/pkg/utils (-: # github.com/iotaledger/iota-core/pkg/utils
pkg/utils/rand.go|244 col 27| undefined: tpkg.RandEpoch) (typecheck)
pkg/protocol/engine/utxoledger/tpkg/random.go|19 col 32| undefined: iotago.NewOutputIDProof (typecheck)
pkg/testsuite/mock/blockissuer.go|424 col 19| cannot infer T (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/safemath/safe_math.go:36:1) (typecheck)
pkg/protocol/snapshotcreator/snapshotcreator.go|138 col 24| undefined: iotago.NewOutputIDProof (typecheck)
pkg/testsuite/eviction.go|39 col 24| cannot infer A (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/lo.go:279:1) (typecheck)
pkg/testsuite/eviction.go|40 col 99| cannot infer A (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/lo.go:279:1) (typecheck)
pkg/testsuite/storage_prunable.go|72 col 14| cannot infer V (pkg/testsuite/storage_prunable.go:106:40) (typecheck)
pkg/testsuite/storage_prunable.go|80 col 14| cannot infer V (pkg/testsuite/storage_prunable.go:106:40) (typecheck)
pkg/testsuite/storage_prunable.go|88 col 14| cannot infer V (pkg/testsuite/storage_prunable.go:106:40) (typecheck)
pkg/testsuite/transactions_framework.go|66 col 224| undefined: iotago.OutputIDProofFromTransaction (typecheck)
pkg/testsuite/upgrades.go|43 col 198| not enough arguments in call to lo.PanicOnErr
pkg/testsuite/upgrades.go|57 col 99| not enough arguments in call to lo.PanicOnErr
pkg/testsuite/upgrades.go|58 col 246| not enough arguments in call to lo.PanicOnErr
pkg/protocol/sybilprotection/sybilprotectionv1/performance/snapshot.go|11 col 2| could not import github.com/iotaledger/iota-core/pkg/utils (-: # github.com/iotaledger/iota-core/pkg/utils
pkg/utils/rand.go|244 col 27| undefined: tpkg.RandEpoch) (typecheck)

Filtered Findings (0)

Annotations

Check failure on line 1 in pkg/utils/ioutils.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/utils/ioutils.go#L1

: # github.com/iotaledger/iota-core/pkg/utils
Raw output
pkg/utils/ioutils.go:1: : # github.com/iotaledger/iota-core/pkg/utils

Check failure on line 244 in pkg/utils/rand.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/utils/rand.go#L244

undefined: tpkg.RandEpoch (typecheck)
Raw output
pkg/utils/rand.go:244:27: undefined: tpkg.RandEpoch (typecheck)
package utils

Check failure on line 10 in pkg/protocol/engine/utxoledger/snapshot.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/utxoledger/snapshot.go#L10

could not import github.com/iotaledger/iota-core/pkg/utils (-: # github.com/iotaledger/iota-core/pkg/utils
Raw output
pkg/protocol/engine/utxoledger/snapshot.go:10:2: could not import github.com/iotaledger/iota-core/pkg/utils (-: # github.com/iotaledger/iota-core/pkg/utils

Check failure on line 244 in pkg/utils/rand.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/utils/rand.go#L244

undefined: tpkg.RandEpoch) (typecheck)
Raw output
pkg/utils/rand.go:244:27: undefined: tpkg.RandEpoch) (typecheck)
	"github.com/iotaledger/iota-core/pkg/utils"
	^

Check failure on line 43 in pkg/protocol/engine/utxoledger/output.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/utxoledger/output.go#L43

undefined: iotago.OutputIDProof (typecheck)
Raw output
pkg/protocol/engine/utxoledger/output.go:43:23: undefined: iotago.OutputIDProof (typecheck)
	outputProof  *iotago.OutputIDProof
	                     ^

Check failure on line 96 in pkg/protocol/engine/utxoledger/output.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/utxoledger/output.go#L96

undefined: iotago.OutputIDProof (typecheck)
Raw output
pkg/protocol/engine/utxoledger/output.go:96:42: undefined: iotago.OutputIDProof (typecheck)
func (o *Output) OutputIDProof() *iotago.OutputIDProof {
                                         ^

Check failure on line 144 in pkg/protocol/engine/utxoledger/output.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/utxoledger/output.go#L144

undefined: iotago.OutputIDProof (typecheck)
Raw output
pkg/protocol/engine/utxoledger/output.go:144:22: undefined: iotago.OutputIDProof (typecheck)
	outputProof *iotago.OutputIDProof,
	                    ^

Check failure on line 173 in pkg/protocol/engine/utxoledger/output.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/utxoledger/output.go#L173

undefined: iotago.OutputIDProof (typecheck)
Raw output
pkg/protocol/engine/utxoledger/output.go:173:22: undefined: iotago.OutputIDProof (typecheck)
	outputProof *iotago.OutputIDProof,
	                    ^

Check failure on line 100 in pkg/protocol/engine/utxoledger/output.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/utxoledger/output.go#L100

undefined: iotago.OutputIDProofFromBytes (typecheck)
Raw output
pkg/protocol/engine/utxoledger/output.go:100:28: undefined: iotago.OutputIDProofFromBytes (typecheck)
			proof, _, err := iotago.OutputIDProofFromBytes(api)(o.encodedProof)
			                        ^

Check failure on line 70 in pkg/protocol/engine/utxoledger/snapshot.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/utxoledger/snapshot.go#L70

undefined: iotago.OutputIDProofFromBytes (typecheck)
Raw output
pkg/protocol/engine/utxoledger/snapshot.go:70:26: undefined: iotago.OutputIDProofFromBytes (typecheck)
	proof, _, err := iotago.OutputIDProofFromBytes(apiProvider.APIForSlot(blockID.Slot()))(proofBytes)
	                        ^

Check failure on line 309 in pkg/protocol/engine/engine.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/engine.go#L309

cannot infer A (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/lo.go:279:1) (typecheck)
Raw output
pkg/protocol/engine/engine.go:309:130: cannot infer A (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/lo.go:279:1) (typecheck)
		return ierrors.Errorf("impossible to create a snapshot for slot %d because it is pruned (last pruned slot %d)", targetSlot[0], lo.Return1(e.Storage.LastPrunedEpoch()))
		                                                                                                                               ^

Check failure on line 84 in pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go#L84

parentBlock.Solid().OnUpdateOnce undefined (type reactive.Variable[bool] has no field or method OnUpdateOnce) (typecheck)
Raw output
pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go:84:23: parentBlock.Solid().OnUpdateOnce undefined (type reactive.Variable[bool] has no field or method OnUpdateOnce) (typecheck)
		parentBlock.Solid().OnUpdateOnce(func(_, _ bool) {
		                    ^

Check failure on line 11 in pkg/protocol/engine/accounts/accountsledger/snapshot.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/accounts/accountsledger/snapshot.go#L11

could not import github.com/iotaledger/iota-core/pkg/utils (-: # github.com/iotaledger/iota-core/pkg/utils
Raw output
pkg/protocol/engine/accounts/accountsledger/snapshot.go:11:2: could not import github.com/iotaledger/iota-core/pkg/utils (-: # github.com/iotaledger/iota-core/pkg/utils

Check failure on line 244 in pkg/utils/rand.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/utils/rand.go#L244

undefined: tpkg.RandEpoch) (typecheck)
Raw output
pkg/utils/rand.go:244:27: undefined: tpkg.RandEpoch) (typecheck)
	"github.com/iotaledger/iota-core/pkg/utils"
	^

Check failure on line 755 in pkg/protocol/engine/ledger/ledger/ledger.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/ledger/ledger/ledger.go#L755

cannot infer Rank (pkg/core/vote/vote.go:21:1) (typecheck)
Raw output
pkg/protocol/engine/ledger/ledger/ledger.go:755:36: cannot infer Rank (pkg/core/vote/vote.go:21:1) (typecheck)
	if err := l.conflictDAG.CastVotes(vote.NewVote(seat, voteRank), block.ConflictIDs()); err != nil {
	                                  ^

Check failure on line 87 in pkg/protocol/engine/ledger/ledger/vm.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/ledger/ledger/vm.go#L87

outputID declared and not used (typecheck)
Raw output
pkg/protocol/engine/ledger/ledger/vm.go:87:3: outputID declared and not used (typecheck)
		outputID := output.OutputID()
		^

Check failure on line 173 in pkg/protocol/engine/ledger/ledger/vm.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/ledger/ledger/vm.go#L173

undefined: iotago.OutputIDProofFromTransaction (typecheck)
Raw output
pkg/protocol/engine/ledger/ledger/vm.go:173:24: undefined: iotago.OutputIDProofFromTransaction (typecheck)
		proof, err := iotago.OutputIDProofFromTransaction(stardustTransaction, uint16(index))
		                     ^

Check failure on line 92 in pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go#L92

not enough arguments in call to lo.PanicOnErr
Raw output
pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go:92:49: not enough arguments in call to lo.PanicOnErr
	have (unknown type)
	want (T, error) (typecheck)
				if lo.PanicOnErr(storedProtocolParams.Hash()) != lo.PanicOnErr(protocolParams.Hash()) {
				                                            ^

Check failure on line 18 in components/debugapi/node.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] components/debugapi/node.go#L18

cannot infer A (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/lo.go:279:1) (typecheck)
Raw output
components/debugapi/node.go:18:26: cannot infer A (/home/runner/go/pkg/mod/github.com/iotaledger/hive.go/[email protected]/lo.go:279:1) (typecheck)
			SeatIndex:      uint8(lo.Return1(latestCommittee.GetSeat(id))),
			                      ^

Check failure on line 55 in components/inx/server_issuance.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] components/inx/server_issuance.go#L55

not enough arguments in call to lo.Return2
Raw output
components/inx/server_issuance.go:55:86: not enough arguments in call to lo.Return2
	have (unknown type)
	want (any, A, ...any) (typecheck)
			return lo.Return2(memPool.VM().Execute(executionContext, typedPayload.Transaction))
			                                                                                  ^

Check failure on line 13 in components/restapi/core/utxo.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] components/restapi/core/utxo.go#L13

undefined: apimodels.OutputResponse (typecheck)
Raw output
components/restapi/core/utxo.go:13:44: undefined: apimodels.OutputResponse (typecheck)
func getOutput(c echo.Context) (*apimodels.OutputResponse, error) {
                                           ^

Check failure on line 30 in components/restapi/core/utxo.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] components/restapi/core/utxo.go#L30

undefined: apimodels.OutputMetadata (typecheck)
Raw output
components/restapi/core/utxo.go:30:52: undefined: apimodels.OutputMetadata (typecheck)
func getOutputMetadata(c echo.Context) (*apimodels.OutputMetadata, error) {
                                                   ^

Check failure on line 48 in components/restapi/core/utxo.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] components/restapi/core/utxo.go#L48

undefined: apimodels.OutputWithMetadataResponse (typecheck)
Raw output
components/restapi/core/utxo.go:48:56: undefined: apimodels.OutputWithMetadataResponse (typecheck)
func getOutputWithMetadata(c echo.Context) (*apimodels.OutputWithMetadataResponse, error) {
                                                       ^

Check failure on line 84 in components/restapi/core/utxo.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] components/restapi/core/utxo.go#L84

undefined: apimodels.OutputMetadata (typecheck)
Raw output
components/restapi/core/utxo.go:84:71: undefined: apimodels.OutputMetadata (typecheck)
func newOutputMetadataResponse(output *utxoledger.Output) (*apimodels.OutputMetadata, error) {
                                                                      ^

Check failure on line 107 in components/restapi/core/utxo.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] components/restapi/core/utxo.go#L107

undefined: apimodels.OutputMetadata (typecheck)
Raw output
components/restapi/core/utxo.go:107:68: undefined: apimodels.OutputMetadata (typecheck)
func newSpentMetadataResponse(spent *utxoledger.Spent) (*apimodels.OutputMetadata, error) {
                                                                   ^