Skip to content

Commit

Permalink
chore: fix issues reported by go vet (#2952)
Browse files Browse the repository at this point in the history
<!-- please provide a detailed description of the changes made in this
pull request. -->
Passing `go vet` is the minimum level of code quality for a go project.
This is addressed here for the full mono-repo. Mainly trivial changes,
except for a few `copy lock` issues which could be more meaningful (kept
for a separate pull request).

Addresses #2954 (but not sufficient to close it yet).

Hint for reviewers: it's easier to review each commit individually.
 
<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [ ] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
  • Loading branch information
mvertes authored Oct 15, 2024
1 parent 679301a commit a73cb22
Show file tree
Hide file tree
Showing 23 changed files with 64 additions and 69 deletions.
4 changes: 2 additions & 2 deletions gno.land/pkg/gnoweb/gnoweb.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ func handleNotFound(logger *slog.Logger, app gotuna.App, cfg *Config, path strin
// decode path for non-ascii characters
decodedPath, err := url.PathUnescape(path)
if err != nil {
logger.Error("failed to decode path", err)
logger.Error("failed to decode path", "error", err)
decodedPath = path
}
w.WriteHeader(http.StatusNotFound)
Expand All @@ -491,7 +491,7 @@ func writeError(logger *slog.Logger, w http.ResponseWriter, err error) {
if details := errors.Unwrap(err); details != nil {
logger.Error("handler", "error", err, "details", details)
} else {
logger.Error("handler", "error:", err)
logger.Error("handler", "error", err)
}

// XXX: writeError should return an error page template.
Expand Down
4 changes: 2 additions & 2 deletions gno.land/pkg/sdk/vm/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ func (bnk *SDKBanker) TotalCoin(denom string) int64 {

func (bnk *SDKBanker) IssueCoin(b32addr crypto.Bech32Address, denom string, amount int64) {
addr := crypto.MustAddressFromString(string(b32addr))
_, err := bnk.vmk.bank.AddCoins(bnk.ctx, addr, std.Coins{std.Coin{denom, amount}})
_, err := bnk.vmk.bank.AddCoins(bnk.ctx, addr, std.Coins{std.Coin{Denom: denom, Amount: amount}})
if err != nil {
panic(err)
}
}

func (bnk *SDKBanker) RemoveCoin(b32addr crypto.Bech32Address, denom string, amount int64) {
addr := crypto.MustAddressFromString(string(b32addr))
_, err := bnk.vmk.bank.SubtractCoins(bnk.ctx, addr, std.Coins{std.Coin{denom, amount}})
_, err := bnk.vmk.bank.SubtractCoins(bnk.ctx, addr, std.Coins{std.Coin{Denom: denom, Amount: amount}})
if err != nil {
panic(err)
}
Expand Down
18 changes: 9 additions & 9 deletions gno.land/pkg/sdk/vm/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestVMKeeperOrigSend1(t *testing.T) {

// Create test package.
files := []*std.MemFile{
{"init.gno", `
{Name: "init.gno", Body: `
package test
import "std"
Expand Down Expand Up @@ -126,7 +126,7 @@ func TestVMKeeperOrigSend2(t *testing.T) {

// Create test package.
files := []*std.MemFile{
{"init.gno", `
{Name: "init.gno", Body: `
package test
import "std"
Expand Down Expand Up @@ -180,7 +180,7 @@ func TestVMKeeperOrigSend3(t *testing.T) {

// Create test package.
files := []*std.MemFile{
{"init.gno", `
{Name: "init.gno", Body: `
package test
import "std"
Expand Down Expand Up @@ -224,7 +224,7 @@ func TestVMKeeperRealmSend1(t *testing.T) {

// Create test package.
files := []*std.MemFile{
{"init.gno", `
{Name: "init.gno", Body: `
package test
import "std"
Expand Down Expand Up @@ -268,7 +268,7 @@ func TestVMKeeperRealmSend2(t *testing.T) {

// Create test package.
files := []*std.MemFile{
{"init.gno", `
{Name: "init.gno", Body: `
package test
import "std"
Expand Down Expand Up @@ -312,7 +312,7 @@ func TestVMKeeperOrigCallerInit(t *testing.T) {

// Create test package.
files := []*std.MemFile{
{"init.gno", `
{Name: "init.gno", Body: `
package test
import "std"
Expand Down Expand Up @@ -363,7 +363,7 @@ func TestVMKeeperRunSimple(t *testing.T) {
env.acck.SetAccount(ctx, acc)

files := []*std.MemFile{
{"script.gno", `
{Name: "script.gno", Body: `
package main
func main() {
Expand Down Expand Up @@ -402,7 +402,7 @@ func testVMKeeperRunImportStdlibs(t *testing.T, env testEnv) {
env.acck.SetAccount(ctx, acc)

files := []*std.MemFile{
{"script.gno", `
{Name: "script.gno", Body: `
package main
import "std"
Expand Down Expand Up @@ -474,7 +474,7 @@ func TestVMKeeperReinitialize(t *testing.T) {

// Create test package.
files := []*std.MemFile{
{"init.gno", `
{Name: "init.gno", Body: `
package test
func Echo(msg string) string {
Expand Down
2 changes: 1 addition & 1 deletion gnovm/pkg/gnomod/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (in *input) readToken() {

// Otherwise, save comment for later attachment to syntax tree.
in.endToken(_EOLCOMMENT)
in.comments = append(in.comments, modfile.Comment{in.token.pos, in.token.text, suffix})
in.comments = append(in.comments, modfile.Comment{Start: in.token.pos, Token: in.token.text, Suffix: suffix})
return
}

Expand Down
4 changes: 2 additions & 2 deletions gnovm/tests/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,12 +597,12 @@ func (tb *testBanker) TotalCoin(denom string) int64 {

func (tb *testBanker) IssueCoin(addr crypto.Bech32Address, denom string, amt int64) {
coins, _ := tb.coinTable[addr]
sum := coins.Add(std.Coins{{denom, amt}})
sum := coins.Add(std.Coins{{Denom: denom, Amount: amt}})
tb.coinTable[addr] = sum
}

func (tb *testBanker) RemoveCoin(addr crypto.Bech32Address, denom string, amt int64) {
coins, _ := tb.coinTable[addr]
rest := coins.Sub(std.Coins{{denom, amt}})
rest := coins.Sub(std.Coins{{Denom: denom, Amount: amt}})
tb.coinTable[addr] = rest
}
2 changes: 1 addition & 1 deletion misc/logos/cmd/logos.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func makeTestPage() *logos.BufferedElemView {
// make a buffered page.
ts := makeTestString()
style := logos.DefaultStyle()
style.Padding = logos.Padding{2, 2, 2, 2}
style.Padding = logos.Padding{Left: 2, Top: 2, Right: 2, Bottom: 2}
style.Border = logos.DefaultBorder()
// TODO width shouldn't matter.
page := logos.NewPage(ts, 84, true, style)
Expand Down
1 change: 0 additions & 1 deletion tm2/pkg/amino/wellknown.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ func isJSONWellKnownType(rt reflect.Type) (wellKnown bool) {
default:
return false
}
return false
}

// Returns ok=false if nothing was done because the default behavior is fine (or if err).
Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/bft/abci/example/kvstore/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func RandVal(i int) abci.ValidatorUpdate {
pubkey := ed25519.GenPrivKey().PubKey()
power := random.RandUint16() + 1
v := abci.ValidatorUpdate{pubkey.Address(), pubkey, int64(power)}
v := abci.ValidatorUpdate{Address: pubkey.Address(), PubKey: pubkey, Power: int64(power)}
return v
}

Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/bft/abci/example/kvstore/persistent_kvstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (app *PersistentKVStoreApplication) execValidatorTx(tx []byte) (res abci.Re
}

// update
return app.updateValidator(abci.ValidatorUpdate{pubkey.Address(), pubkey, power})
return app.updateValidator(abci.ValidatorUpdate{Address: pubkey.Address(), PubKey: pubkey, Power: power})
}

// add, update, or remove a validator
Expand Down
22 changes: 11 additions & 11 deletions tm2/pkg/bft/consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (ti *timeoutInfo) GetHRS() cstypes.HRS {
if ti == nil {
return cstypes.HRS{}
} else {
return cstypes.HRS{ti.Height, ti.Round, ti.Step}
return cstypes.HRS{Height: ti.Height, Round: ti.Round, Step: ti.Step}
}
}

Expand Down Expand Up @@ -746,13 +746,13 @@ func (cs *ConsensusState) handleTimeout(ti timeoutInfo, rs cstypes.RoundState) {
case cstypes.RoundStepNewRound:
cs.enterPropose(ti.Height, 0)
case cstypes.RoundStepPropose:
cs.evsw.FireEvent(cstypes.EventTimeoutPropose{cs.RoundState.GetHRS()})
cs.evsw.FireEvent(cstypes.EventTimeoutPropose{HRS: cs.RoundState.GetHRS()})
cs.enterPrevote(ti.Height, ti.Round)
case cstypes.RoundStepPrevoteWait:
cs.evsw.FireEvent(cstypes.EventTimeoutWait{cs.RoundState.GetHRS()})
cs.evsw.FireEvent(cstypes.EventTimeoutWait{HRS: cs.RoundState.GetHRS()})
cs.enterPrecommit(ti.Height, ti.Round)
case cstypes.RoundStepPrecommitWait:
cs.evsw.FireEvent(cstypes.EventTimeoutWait{cs.RoundState.GetHRS()})
cs.evsw.FireEvent(cstypes.EventTimeoutWait{HRS: cs.RoundState.GetHRS()})
cs.enterPrecommit(ti.Height, ti.Round)
cs.enterNewRound(ti.Height, ti.Round+1)
default:
Expand Down Expand Up @@ -1126,7 +1126,7 @@ func (cs *ConsensusState) enterPrecommit(height int64, round int) {
}

// At this point +2/3 prevoted for a particular block or nil.
cs.evsw.FireEvent(cstypes.EventPolka{cs.RoundState.GetHRS()})
cs.evsw.FireEvent(cstypes.EventPolka{HRS: cs.RoundState.GetHRS()})

// the latest POLRound should be this round.
polRound, _ := cs.Votes.POLInfo()
Expand All @@ -1143,7 +1143,7 @@ func (cs *ConsensusState) enterPrecommit(height int64, round int) {
cs.LockedRound = -1
cs.LockedBlock = nil
cs.LockedBlockParts = nil
cs.evsw.FireEvent(cstypes.EventUnlock{cs.RoundState.GetHRS()})
cs.evsw.FireEvent(cstypes.EventUnlock{HRS: cs.RoundState.GetHRS()})
}
cs.signAddVote(types.PrecommitType, nil, types.PartSetHeader{})
return
Expand All @@ -1155,7 +1155,7 @@ func (cs *ConsensusState) enterPrecommit(height int64, round int) {
if cs.LockedBlock.HashesTo(blockID.Hash) {
logger.Info("enterPrecommit: +2/3 prevoted locked block. Relocking")
cs.LockedRound = round
cs.evsw.FireEvent(cstypes.EventRelock{cs.RoundState.GetHRS()})
cs.evsw.FireEvent(cstypes.EventRelock{HRS: cs.RoundState.GetHRS()})
cs.signAddVote(types.PrecommitType, blockID.Hash, blockID.PartsHeader)
return
}
Expand All @@ -1170,7 +1170,7 @@ func (cs *ConsensusState) enterPrecommit(height int64, round int) {
cs.LockedRound = round
cs.LockedBlock = cs.ProposalBlock
cs.LockedBlockParts = cs.ProposalBlockParts
cs.evsw.FireEvent(cstypes.EventLock{cs.RoundState.GetHRS()})
cs.evsw.FireEvent(cstypes.EventLock{HRS: cs.RoundState.GetHRS()})
cs.signAddVote(types.PrecommitType, blockID.Hash, blockID.PartsHeader)
return
}
Expand All @@ -1186,7 +1186,7 @@ func (cs *ConsensusState) enterPrecommit(height int64, round int) {
cs.ProposalBlock = nil
cs.ProposalBlockParts = types.NewPartSetFromHeader(blockID.PartsHeader)
}
cs.evsw.FireEvent(cstypes.EventUnlock{cs.RoundState.GetHRS()})
cs.evsw.FireEvent(cstypes.EventUnlock{HRS: cs.RoundState.GetHRS()})
cs.signAddVote(types.PrecommitType, nil, types.PartSetHeader{})
}

Expand Down Expand Up @@ -1591,7 +1591,7 @@ func (cs *ConsensusState) addVote(vote *types.Vote, peerID p2p.ID) (added bool,
return
}

cs.evsw.FireEvent(types.EventVote{vote})
cs.evsw.FireEvent(types.EventVote{Vote: vote})

switch vote.Type {
case types.PrevoteType:
Expand Down Expand Up @@ -1620,7 +1620,7 @@ func (cs *ConsensusState) addVote(vote *types.Vote, peerID p2p.ID) (added bool,
cs.LockedRound = -1
cs.LockedBlock = nil
cs.LockedBlockParts = nil
cs.evsw.FireEvent(cstypes.EventUnlock{cs.RoundState.GetHRS()})
cs.evsw.FireEvent(cstypes.EventUnlock{HRS: cs.RoundState.GetHRS()})
}

// Update Valid* if we can.
Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/bft/consensus/wal_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (w *heightStopWAL) Write(m walm.WALMessage) error {
}

w.logger.Debug("WAL Write Message", "msg", m)
err := w.enc.Write(walm.TimedWALMessage{fixedTime, m})
err := w.enc.Write(walm.TimedWALMessage{Time: fixedTime, Msg: m})
if err != nil {
panic(fmt.Sprintf("failed to encode the msg %v", m))
}
Expand Down
6 changes: 3 additions & 3 deletions tm2/pkg/bft/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ var validatorPubKeyTypeURLs = map[string]struct{}{

func DefaultConsensusParams() abci.ConsensusParams {
return abci.ConsensusParams{
DefaultBlockParams(),
DefaultValidatorParams(),
Block: DefaultBlockParams(),
Validator: DefaultValidatorParams(),
}
}

Expand All @@ -51,7 +51,7 @@ func DefaultBlockParams() *abci.BlockParams {
}

func DefaultValidatorParams() *abci.ValidatorParams {
return &abci.ValidatorParams{[]string{
return &abci.ValidatorParams{PubKeyTypeURLs: []string{
amino.GetTypeURL(ed25519.PubKeyEd25519{}),
}}
}
Expand Down
4 changes: 2 additions & 2 deletions tm2/pkg/crypto/hd/hdpath_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func mnemonicToSeed(mnemonic string) []byte {
return bip39.NewSeed(mnemonic, defaultBIP39Passphrase)
}

func ExampleStringifyPathParams() {
func ExampleNewParams() {
path := NewParams(44, 0, 0, false, 0)
fmt.Println(path.String())
path = NewParams(44, 33, 7, true, 9)
Expand Down Expand Up @@ -109,7 +109,7 @@ func TestParamsFromPath(t *testing.T) {
}
}

func ExampleSomeBIP32TestVecs() {
func ExampleDerivePrivateKeyForPath() {
seed := mnemonicToSeed("barrel original fuel morning among eternal " +
"filter ball stove pluck matrix mechanic")
master, ch := ComputeMastersFromSeed(seed)
Expand Down
4 changes: 2 additions & 2 deletions tm2/pkg/db/boltdb/boltdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ func (bdb *BoltDB) NewBatch() db.Batch {
// It is safe to modify the contents of the argument after Set returns but not
// before.
func (bdb *boltDBBatch) Set(key, value []byte) {
bdb.ops = append(bdb.ops, internal.Operation{internal.OpTypeSet, key, value})
bdb.ops = append(bdb.ops, internal.Operation{OpType: internal.OpTypeSet, Key: key, Value: value})
}

// It is safe to modify the contents of the argument after Delete returns but
// not before.
func (bdb *boltDBBatch) Delete(key []byte) {
bdb.ops = append(bdb.ops, internal.Operation{internal.OpTypeDelete, key, nil})
bdb.ops = append(bdb.ops, internal.Operation{OpType: internal.OpTypeDelete, Key: key})
}

// NOTE: the operation is synchronous (see BoltDB for reasons)
Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/db/memdb/mem_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (db *MemDB) NewBatch() dbm.Batch {
db.mtx.Lock()
defer db.mtx.Unlock()

return &internal.MemBatch{db, nil}
return &internal.MemBatch{DB: db}
}

// ----------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/p2p/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (sw *Switch) OnStop() {
if t, ok := sw.transport.(TransportLifecycle); ok {
err := t.Close()
if err != nil {
sw.Logger.Error("Error stopping transport on stop: ", err)
sw.Logger.Error("Error stopping transport on stop: ", "error", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/sdk/bank/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestBankKeeper(t *testing.T) {
// validate coins with invalid denoms or negative values cannot be sent
// NOTE: We must use the Coin literal as the constructor does not allow
// negative values.
err = bank.SendCoins(ctx, addr, addr2, sdk.Coins{sdk.Coin{"FOOCOIN", -5}})
err = bank.SendCoins(ctx, addr, addr2, sdk.Coins{sdk.Coin{Denom: "FOOCOIN", Amount: -5}})
require.Error(t, err)
}

Expand Down
4 changes: 0 additions & 4 deletions tm2/pkg/sdk/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,6 @@ func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery) {
default:
return handleQueryCustom(app, path, req)
}

msg := "unknown query path " + req.Path
res.Error = ABCIError(std.ErrUnknownRequest(msg))
return
}

func handleQueryApp(app *BaseApp, path []string, req abci.RequestQuery) (res abci.ResponseQuery) {
Expand Down
Loading

1 comment on commit a73cb22

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Go Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: a73cb22 Previous: 5444859 Ratio
BenchmarkBinary/EmptyStruct:encode 482.9 ns/op 96 B/op 2 allocs/op 291.2 ns/op 96 B/op 2 allocs/op 1.66
BenchmarkBinary/EmptyStruct:encode - ns/op 482.9 ns/op 291.2 ns/op 1.66
BenchmarkBinary/EmptyStruct:decode 248.6 ns/op 0 B/op 0 allocs/op 145.4 ns/op 0 B/op 0 allocs/op 1.71
BenchmarkBinary/EmptyStruct:decode - ns/op 248.6 ns/op 145.4 ns/op 1.71
BenchmarkBinary/ShortArraysStruct:encode 778.3 ns/op 192 B/op 4 allocs/op 609.4 ns/op 192 B/op 4 allocs/op 1.28
BenchmarkBinary/ShortArraysStruct:encode - ns/op 778.3 ns/op 609.4 ns/op 1.28
BenchmarkBinary/ShortArraysStruct:decode 349.8 ns/op 0 B/op 0 allocs/op 230.1 ns/op 0 B/op 0 allocs/op 1.52
BenchmarkBinary/ShortArraysStruct:decode - ns/op 349.8 ns/op 230.1 ns/op 1.52
BenchmarkBcryptGenerateFromPassword/benchmark-security-param 63807299 ns/op 5130 B/op 9 allocs/op 31915575 ns/op 5125 B/op 9 allocs/op 2.00
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op 63807299 ns/op 31915575 ns/op 2.00
BenchmarkBcryptGenerateFromPassword/benchmark-security-param 127516897 ns/op 5139 B/op 9 allocs/op 31915575 ns/op 5125 B/op 9 allocs/op 4.00
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op 127516897 ns/op 31915575 ns/op 4.00
BenchmarkBcryptGenerateFromPassword/benchmark-security-param 254987971 ns/op 5158 B/op 9 allocs/op 31915575 ns/op 5125 B/op 9 allocs/op 7.99
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op 254987971 ns/op 31915575 ns/op 7.99
BenchmarkBcryptGenerateFromPassword/benchmark-security-param 509971014 ns/op 5196 B/op 10 allocs/op 31915575 ns/op 5125 B/op 9 allocs/op 15.98
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op 509971014 ns/op 31915575 ns/op 15.98
BenchmarkBcryptGenerateFromPassword/benchmark-security-param 1019616010 ns/op 5528 B/op 13 allocs/op 31915575 ns/op 5125 B/op 9 allocs/op 31.95
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op 1019616010 ns/op 31915575 ns/op 31.95
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - allocs/op 13 allocs/op 9 allocs/op 1.44
BenchmarkBcryptGenerateFromPassword/benchmark-security-param 2040020395 ns/op 5736 B/op 15 allocs/op 31915575 ns/op 5125 B/op 9 allocs/op 63.92
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op 2040020395 ns/op 31915575 ns/op 63.92
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - allocs/op 15 allocs/op 9 allocs/op 1.67
BenchmarkSigning 84658 ns/op 1856 B/op 36 allocs/op 25697 ns/op 64 B/op 1 allocs/op 3.29
BenchmarkSigning - ns/op 84658 ns/op 25697 ns/op 3.29
BenchmarkSigning - B/op 1856 B/op 64 B/op 29
BenchmarkSigning - allocs/op 36 allocs/op 1 allocs/op 36
BenchmarkSigning 84375 ns/op 1856 B/op 36 allocs/op 25697 ns/op 64 B/op 1 allocs/op 3.28
BenchmarkSigning - ns/op 84375 ns/op 25697 ns/op 3.28
BenchmarkSigning - B/op 1856 B/op 64 B/op 29
BenchmarkSigning - allocs/op 36 allocs/op 1 allocs/op 36
BenchmarkVerification 170968 ns/op 864 B/op 19 allocs/op 60930 ns/op 0 B/op 0 allocs/op 2.81
BenchmarkVerification - ns/op 170968 ns/op 60930 ns/op 2.81
BenchmarkVerification - B/op 864 B/op 0 B/op +∞
BenchmarkVerification - allocs/op 19 allocs/op 0 allocs/op +∞
BenchmarkVerification 170022 ns/op 864 B/op 19 allocs/op 60930 ns/op 0 B/op 0 allocs/op 2.79
BenchmarkVerification - ns/op 170022 ns/op 60930 ns/op 2.79
BenchmarkVerification - B/op 864 B/op 0 B/op +∞
BenchmarkVerification - allocs/op 19 allocs/op 0 allocs/op +∞
BenchmarkRandomBytes/random 68.38 ns/op 16 B/op 1 allocs/op 32.73 ns/op 4 B/op 1 allocs/op 2.09
BenchmarkRandomBytes/random - ns/op 68.38 ns/op 32.73 ns/op 2.09
BenchmarkRandomBytes/random - B/op 16 B/op 4 B/op 4
BenchmarkRandomBytes/random 105.8 ns/op 32 B/op 1 allocs/op 32.73 ns/op 4 B/op 1 allocs/op 3.23
BenchmarkRandomBytes/random - ns/op 105.8 ns/op 32.73 ns/op 3.23
BenchmarkRandomBytes/random - B/op 32 B/op 4 B/op 8
BenchmarkRandomBytes/random 266.1 ns/op 112 B/op 1 allocs/op 32.73 ns/op 4 B/op 1 allocs/op 8.13
BenchmarkRandomBytes/random - ns/op 266.1 ns/op 32.73 ns/op 8.13
BenchmarkRandomBytes/random - B/op 112 B/op 4 B/op 28
BenchmarkRandomBytes/random 2308 ns/op 1024 B/op 1 allocs/op 32.73 ns/op 4 B/op 1 allocs/op 70.52
BenchmarkRandomBytes/random - ns/op 2308 ns/op 32.73 ns/op 70.52
BenchmarkRandomBytes/random - B/op 1024 B/op 4 B/op 256
BenchmarkSmall/boltdb-1000-100-16-40/update 1405481 ns/op 41421 B/op 378 allocs/op 926569 ns/op 37612 B/op 369 allocs/op 1.52
BenchmarkSmall/boltdb-1000-100-16-40/update - ns/op 1405481 ns/op 926569 ns/op 1.52
BenchmarkSmall/memdb-1000-100-16-40/block 18789110 ns/op 9011885 B/op 163981 allocs/op 12279193 ns/op 6595721 B/op 117024 allocs/op 1.53
BenchmarkSmall/memdb-1000-100-16-40/block - ns/op 18789110 ns/op 12279193 ns/op 1.53
BenchmarkSmall/memdb-1000-100-16-40/block - B/op 9011885 B/op 6595721 B/op 1.37
BenchmarkSmall/memdb-1000-100-16-40/block - allocs/op 163981 allocs/op 117024 allocs/op 1.40
BenchmarkMedium/boltdb-100000-100-16-40/update 6484751 ns/op 131140 B/op 1021 allocs/op 5013464 ns/op 96661 B/op 818 allocs/op 1.29
BenchmarkMedium/boltdb-100000-100-16-40/update - ns/op 6484751 ns/op 5013464 ns/op 1.29
BenchmarkMedium/boltdb-100000-100-16-40/update - B/op 131140 B/op 96661 B/op 1.36
BenchmarkMedium/boltdb-100000-100-16-40/update - allocs/op 1021 allocs/op 818 allocs/op 1.25
BenchmarkMedium/memdb-100000-100-16-40/update - B/op 357982 B/op 266355 B/op 1.34
BenchmarkMedium/memdb-100000-100-16-40/update - allocs/op 7091 allocs/op 5150 allocs/op 1.38
BenchmarkLevelDBBatchSizes/goleveldb-100000-400-16-40/update - B/op 47362 B/op 38986 B/op 1.21
BenchmarkLevelDBBatchSizes/goleveldb-100000-400-16-40/update - allocs/op 569 allocs/op 455 allocs/op 1.25
BenchmarkLevelDBBatchSizes/goleveldb-100000-2000-16-40/update - allocs/op 439 allocs/op 340 allocs/op 1.29
BenchmarkLevelDBBatchSizes/goleveldb-100000-2000-16-40/block - B/op 108541290 B/op 81167928 B/op 1.34
BenchmarkLevelDBBatchSizes/goleveldb-100000-2000-16-40/block - allocs/op 1232359 allocs/op 1017216 allocs/op 1.21
BenchmarkHash/ripemd160 2829 ns/op 25 B/op 1 allocs/op 702.6 ns/op 25 B/op 1 allocs/op 4.03
BenchmarkHash/ripemd160 - ns/op 2829 ns/op 702.6 ns/op 4.03
BenchmarkHash/sha2-256 521.4 ns/op 33 B/op 1 allocs/op 169.8 ns/op 33 B/op 1 allocs/op 3.07
BenchmarkHash/sha2-256 - ns/op 521.4 ns/op 169.8 ns/op 3.07
BenchmarkHash/sha3-256 1841 ns/op 33 B/op 1 allocs/op 690.5 ns/op 33 B/op 1 allocs/op 2.67
BenchmarkHash/sha3-256 - ns/op 1841 ns/op 690.5 ns/op 2.67
BenchmarkWriteSecretConnection 6206 ns/op 0 B/op 0 allocs/op 4022 ns/op 0 B/op 0 allocs/op 1.54
BenchmarkWriteSecretConnection - ns/op 6206 ns/op 4022 ns/op 1.54
BenchmarkReadSecretConnection 3863 ns/op 0 B/op 0 allocs/op 2349 ns/op 0 B/op 0 allocs/op 1.64
BenchmarkReadSecretConnection - ns/op 3863 ns/op 2349 ns/op 1.64

This comment was automatically generated by workflow using github-action-benchmark.

CC: @ajnavarro @thehowl @zivkovicmilos

Please sign in to comment.