-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tm2/crypto/keys): In the gnokey CLI, add command to update the p…
…assword (#2700) The `Keybase` API supports a method to [change the password of a key](https://github.com/gnolang/gno/blob/8a62a28f672d3311163bee75f5e8f10ba3d4d52b/tm2/pkg/crypto/keys/keybase.go#L450). It is currently called `Update` which is confusing. This PR renames the API function to `Rotate` and adds the "rotate" command to the gnokey CLI. BREAKING CHANGE: The Keybase API function `Update` is renamed to `Rotate`. (Note: I haven't seen code using this function, so it should be minimal impact.) <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 </details> --------- Signed-off-by: Jeff Thompson <jeff@thefirst.org> Co-authored-by: Morgan <morgan@morganbaz.com>
- Loading branch information
Showing
9 changed files
with
196 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package client | ||
|
||
import ( | ||
"context" | ||
"flag" | ||
"fmt" | ||
|
||
"github.com/gnolang/gno/tm2/pkg/commands" | ||
"github.com/gnolang/gno/tm2/pkg/crypto/keys" | ||
) | ||
|
||
type RotateCfg struct { | ||
RootCfg *BaseCfg | ||
|
||
Force bool | ||
} | ||
|
||
func NewRotateCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command { | ||
cfg := &RotateCfg{ | ||
RootCfg: rootCfg, | ||
} | ||
|
||
return commands.NewCommand( | ||
commands.Metadata{ | ||
Name: "rotate", | ||
ShortUsage: "rotate [flags] <key-name>", | ||
ShortHelp: "rotate the password of a key in the keybase to a new password", | ||
}, | ||
cfg, | ||
func(_ context.Context, args []string) error { | ||
return execRotate(cfg, args, io) | ||
}, | ||
) | ||
} | ||
|
||
func (c *RotateCfg) RegisterFlags(fs *flag.FlagSet) { | ||
} | ||
|
||
func execRotate(cfg *RotateCfg, args []string, io commands.IO) error { | ||
if len(args) != 1 { | ||
return flag.ErrHelp | ||
} | ||
|
||
nameOrBech32 := args[0] | ||
|
||
kb, err := keys.NewKeyBaseFromDir(cfg.RootCfg.Home) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
oldpass, err := io.GetPassword("Enter the current password:", cfg.RootCfg.InsecurePasswordStdin) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
newpass, err := io.GetCheckPassword( | ||
[2]string{ | ||
"Enter the new password to encrypt your key to disk:", | ||
"Repeat the password:", | ||
}, | ||
cfg.RootCfg.InsecurePasswordStdin, | ||
) | ||
if err != nil { | ||
return fmt.Errorf("unable to parse provided password, %w", err) | ||
} | ||
|
||
getNewpass := func() (string, error) { return newpass, nil } | ||
err = kb.Rotate(nameOrBech32, oldpass, getNewpass) | ||
if err != nil { | ||
return err | ||
} | ||
io.ErrPrintln("Password rotated") | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
package client | ||
|
||
import ( | ||
"strings" | ||
"testing" | ||
|
||
"github.com/gnolang/gno/tm2/pkg/commands" | ||
"github.com/gnolang/gno/tm2/pkg/crypto/keys" | ||
"github.com/gnolang/gno/tm2/pkg/testutils" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func Test_execRotate(t *testing.T) { | ||
t.Parallel() | ||
|
||
// make new test dir | ||
kbHome, kbCleanUp := testutils.NewTestCaseDir(t) | ||
defer kbCleanUp() | ||
|
||
// initialize test options | ||
cfg := &RotateCfg{ | ||
RootCfg: &BaseCfg{ | ||
BaseOptions: BaseOptions{ | ||
Home: kbHome, | ||
InsecurePasswordStdin: true, | ||
}, | ||
}, | ||
} | ||
|
||
io := commands.NewTestIO() | ||
|
||
// Add test accounts to keybase. | ||
kb, err := keys.NewKeyBaseFromDir(kbHome) | ||
assert.NoError(t, err) | ||
|
||
keyName := "rotateApp_Key1" | ||
p1, p2 := "1234", "foobar" | ||
mnemonic := "equip will roof matter pink blind book anxiety banner elbow sun young" | ||
|
||
_, err = kb.CreateAccount(keyName, mnemonic, "", p1, 0, 0) | ||
assert.NoError(t, err) | ||
|
||
{ | ||
// test: Key not found | ||
args := []string{"blah"} | ||
io.SetIn(strings.NewReader(p1 + "\n" + p2 + "\n" + p2 + "\n")) | ||
err = execRotate(cfg, args, io) | ||
require.Error(t, err) | ||
require.Equal(t, "Key blah not found", err.Error()) | ||
} | ||
|
||
{ | ||
// test: Wrong password | ||
args := []string{keyName} | ||
io.SetIn(strings.NewReader("blah" + "\n" + p2 + "\n" + p2 + "\n")) | ||
err = execRotate(cfg, args, io) | ||
require.Error(t, err) | ||
require.Equal(t, "invalid account password", err.Error()) | ||
} | ||
|
||
{ | ||
// test: New passwords don't match | ||
args := []string{keyName} | ||
io.SetIn(strings.NewReader(p1 + "\n" + p2 + "\n" + "blah" + "\n")) | ||
err = execRotate(cfg, args, io) | ||
require.Error(t, err) | ||
require.Equal(t, "unable to parse provided password, passphrases don't match", err.Error()) | ||
} | ||
|
||
{ | ||
// Rotate the password | ||
args := []string{keyName} | ||
io.SetIn(strings.NewReader(p1 + "\n" + p2 + "\n" + p2 + "\n")) | ||
err = execRotate(cfg, args, io) | ||
require.NoError(t, err) | ||
} | ||
|
||
{ | ||
// test: The old password shouldn't work | ||
args := []string{keyName} | ||
io.SetIn(strings.NewReader(p1 + "\n" + p1 + "\n" + p1 + "\n")) | ||
err = execRotate(cfg, args, io) | ||
require.Error(t, err) | ||
require.Equal(t, "invalid account password", err.Error()) | ||
} | ||
|
||
{ | ||
// Updating the new password to itself should work | ||
args := []string{keyName} | ||
io.SetIn(strings.NewReader(p2 + "\n" + p2 + "\n" + p2 + "\n")) | ||
err = execRotate(cfg, args, io) | ||
require.NoError(t, err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
641d2fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.BenchmarkBinary/EmptyStruct:encode
973.5
ns/op 96 B/op 2 allocs/op437.5
ns/op 96 B/op 2 allocs/op2.23
BenchmarkBinary/EmptyStruct:encode - ns/op
973.5
ns/op437.5
ns/op2.23
BenchmarkBinary/EmptyStruct:decode
603.7
ns/op 0 B/op 0 allocs/op235.9
ns/op 0 B/op 0 allocs/op2.56
BenchmarkBinary/EmptyStruct:decode - ns/op
603.7
ns/op235.9
ns/op2.56
BenchmarkBinary/PrimitivesStruct:encode
9551
ns/op 1724 B/op 60 allocs/op5812
ns/op 1724 B/op 60 allocs/op1.64
BenchmarkBinary/PrimitivesStruct:encode - ns/op
9551
ns/op5812
ns/op1.64
BenchmarkBinary/PrimitivesStruct:decode
6162
ns/op 137 B/op 7 allocs/op3725
ns/op 137 B/op 7 allocs/op1.65
BenchmarkBinary/PrimitivesStruct:decode - ns/op
6162
ns/op3725
ns/op1.65
BenchmarkBinary/ShortArraysStruct:encode
1657
ns/op 192 B/op 4 allocs/op925
ns/op 192 B/op 4 allocs/op1.79
BenchmarkBinary/ShortArraysStruct:encode - ns/op
1657
ns/op925
ns/op1.79
BenchmarkBinary/ShortArraysStruct:decode
780.5
ns/op 0 B/op 0 allocs/op345.7
ns/op 0 B/op 0 allocs/op2.26
BenchmarkBinary/ShortArraysStruct:decode - ns/op
780.5
ns/op345.7
ns/op2.26
BenchmarkBinary/ArraysStruct:decode
16861
ns/op 790 B/op 40 allocs/op13560
ns/op 789 B/op 40 allocs/op1.24
BenchmarkBinary/ArraysStruct:decode - ns/op
16861
ns/op13560
ns/op1.24
BenchmarkBinary/PointersStruct:encode
10715
ns/op 1702 B/op 59 allocs/op6700
ns/op 1702 B/op 59 allocs/op1.60
BenchmarkBinary/PointersStruct:encode - ns/op
10715
ns/op6700
ns/op1.60
BenchmarkBinary/PointersStruct:decode
9221
ns/op 286 B/op 26 allocs/op5647
ns/op 286 B/op 26 allocs/op1.63
BenchmarkBinary/PointersStruct:decode - ns/op
9221
ns/op5647
ns/op1.63
BenchmarkBinary/EmbeddedSt1:encode
10518
ns/op 2037 B/op 65 allocs/op6554
ns/op 2037 B/op 65 allocs/op1.60
BenchmarkBinary/EmbeddedSt1:encode - ns/op
10518
ns/op6554
ns/op1.60
BenchmarkBinary/EmbeddedSt1:decode
6814
ns/op 300 B/op 8 allocs/op4122
ns/op 300 B/op 8 allocs/op1.65
BenchmarkBinary/EmbeddedSt1:decode - ns/op
6814
ns/op4122
ns/op1.65
BenchmarkBinary/AminoMarshalerStruct1:encode
5083
ns/op 512 B/op 16 allocs/op3233
ns/op 512 B/op 16 allocs/op1.57
BenchmarkBinary/AminoMarshalerStruct1:encode - ns/op
5083
ns/op3233
ns/op1.57
BenchmarkBinary/AminoMarshalerStruct1:decode
4548
ns/op 200 B/op 8 allocs/op2837
ns/op 200 B/op 8 allocs/op1.60
BenchmarkBinary/AminoMarshalerStruct1:decode - ns/op
4548
ns/op2837
ns/op1.60
BenchmarkBinary/AminoMarshalerStruct2:encode
9953
ns/op 1783 B/op 53 allocs/op7202
ns/op 1783 B/op 53 allocs/op1.38
BenchmarkBinary/AminoMarshalerStruct2:encode - ns/op
9953
ns/op7202
ns/op1.38
BenchmarkBinary/AminoMarshalerStruct2:decode
9557
ns/op 832 B/op 31 allocs/op6478
ns/op 832 B/op 31 allocs/op1.48
BenchmarkBinary/AminoMarshalerStruct2:decode - ns/op
9557
ns/op6478
ns/op1.48
BenchmarkBinary/AminoMarshalerStruct3:encode
4462
ns/op 352 B/op 12 allocs/op2730
ns/op 352 B/op 12 allocs/op1.63
BenchmarkBinary/AminoMarshalerStruct3:encode - ns/op
4462
ns/op2730
ns/op1.63
BenchmarkBinary/AminoMarshalerStruct3:decode
4209
ns/op 200 B/op 8 allocs/op2582
ns/op 200 B/op 8 allocs/op1.63
BenchmarkBinary/AminoMarshalerStruct3:decode - ns/op
4209
ns/op2582
ns/op1.63
BenchmarkBinary/AminoMarshalerInt4:encode
4801
ns/op 464 B/op 14 allocs/op2975
ns/op 464 B/op 14 allocs/op1.61
BenchmarkBinary/AminoMarshalerInt4:encode - ns/op
4801
ns/op2975
ns/op1.61
BenchmarkBinary/AminoMarshalerInt4:decode
4323
ns/op 200 B/op 8 allocs/op2644
ns/op 200 B/op 8 allocs/op1.64
BenchmarkBinary/AminoMarshalerInt4:decode - ns/op
4323
ns/op2644
ns/op1.64
BenchmarkBinary/AminoMarshalerInt5:encode
5244
ns/op 399 B/op 15 allocs/op3319
ns/op 399 B/op 15 allocs/op1.58
BenchmarkBinary/AminoMarshalerInt5:encode - ns/op
5244
ns/op3319
ns/op1.58
BenchmarkBinary/AminoMarshalerInt5:decode
4488
ns/op 231 B/op 10 allocs/op2793
ns/op 231 B/op 10 allocs/op1.61
BenchmarkBinary/AminoMarshalerInt5:decode - ns/op
4488
ns/op2793
ns/op1.61
BenchmarkBinary/AminoMarshalerStruct6:encode
8097
ns/op 904 B/op 29 allocs/op5417
ns/op 904 B/op 29 allocs/op1.49
BenchmarkBinary/AminoMarshalerStruct6:encode - ns/op
8097
ns/op5417
ns/op1.49
BenchmarkBinary/AminoMarshalerStruct6:decode
7949
ns/op 464 B/op 20 allocs/op5172
ns/op 464 B/op 20 allocs/op1.54
BenchmarkBinary/AminoMarshalerStruct6:decode - ns/op
7949
ns/op5172
ns/op1.54
BenchmarkBinary/AminoMarshalerStruct7:encode
7525
ns/op 696 B/op 24 allocs/op4803
ns/op 696 B/op 24 allocs/op1.57
BenchmarkBinary/AminoMarshalerStruct7:encode - ns/op
7525
ns/op4803
ns/op1.57
BenchmarkBinary/AminoMarshalerStruct7:decode
7702
ns/op 432 B/op 20 allocs/op4932
ns/op 432 B/op 20 allocs/op1.56
BenchmarkBinary/AminoMarshalerStruct7:decode - ns/op
7702
ns/op4932
ns/op1.56
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
69383730
ns/op 5130 B/op 9 allocs/op34774626
ns/op 5126 B/op 9 allocs/op2.00
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
69383730
ns/op34774626
ns/op2.00
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
138711293
ns/op 5139 B/op 9 allocs/op34774626
ns/op 5126 B/op 9 allocs/op3.99
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
138711293
ns/op34774626
ns/op3.99
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
277473245
ns/op 5158 B/op 9 allocs/op34774626
ns/op 5126 B/op 9 allocs/op7.98
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
277473245
ns/op34774626
ns/op7.98
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
554764352
ns/op 5196 B/op 10 allocs/op34774626
ns/op 5126 B/op 9 allocs/op15.95
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
554764352
ns/op34774626
ns/op15.95
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
1109290083
ns/op 5736 B/op 15 allocs/op34774626
ns/op 5126 B/op 9 allocs/op31.90
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
1109290083
ns/op34774626
ns/op31.90
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - allocs/op
15
allocs/op9
allocs/op1.67
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
2219536939
ns/op 5528 B/op 13 allocs/op34774626
ns/op 5126 B/op 9 allocs/op63.83
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
2219536939
ns/op34774626
ns/op63.83
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - allocs/op
13
allocs/op9
allocs/op1.44
BenchmarkSigning
97445
ns/op 1856 B/op 36 allocs/op31111
ns/op 64 B/op 1 allocs/op3.13
BenchmarkSigning - ns/op
97445
ns/op31111
ns/op3.13
BenchmarkSigning - B/op
1856
B/op64
B/op29
BenchmarkSigning - allocs/op
36
allocs/op1
allocs/op36
BenchmarkSigning
99627
ns/op 1856 B/op 36 allocs/op31111
ns/op 64 B/op 1 allocs/op3.20
BenchmarkSigning - ns/op
99627
ns/op31111
ns/op3.20
BenchmarkSigning - B/op
1856
B/op64
B/op29
BenchmarkSigning - allocs/op
36
allocs/op1
allocs/op36
BenchmarkVerification
188069
ns/op 864 B/op 19 allocs/op73474
ns/op 0 B/op 0 allocs/op2.56
BenchmarkVerification - ns/op
188069
ns/op73474
ns/op2.56
BenchmarkVerification - B/op
864
B/op0
B/op+∞
BenchmarkVerification - allocs/op
19
allocs/op0
allocs/op+∞
BenchmarkVerification
193971
ns/op 864 B/op 19 allocs/op73474
ns/op 0 B/op 0 allocs/op2.64
BenchmarkVerification - ns/op
193971
ns/op73474
ns/op2.64
BenchmarkVerification - B/op
864
B/op0
B/op+∞
BenchmarkVerification - allocs/op
19
allocs/op0
allocs/op+∞
BenchmarkRandomBytes/random
88.89
ns/op 16 B/op 1 allocs/op46.88
ns/op 4 B/op 1 allocs/op1.90
BenchmarkRandomBytes/random - ns/op
88.89
ns/op46.88
ns/op1.90
BenchmarkRandomBytes/random - B/op
16
B/op4
B/op4
BenchmarkRandomBytes/random
135.1
ns/op 32 B/op 1 allocs/op46.88
ns/op 4 B/op 1 allocs/op2.88
BenchmarkRandomBytes/random - ns/op
135.1
ns/op46.88
ns/op2.88
BenchmarkRandomBytes/random - B/op
32
B/op4
B/op8
BenchmarkRandomBytes/random
331.3
ns/op 112 B/op 1 allocs/op46.88
ns/op 4 B/op 1 allocs/op7.07
BenchmarkRandomBytes/random - ns/op
331.3
ns/op46.88
ns/op7.07
BenchmarkRandomBytes/random - B/op
112
B/op4
B/op28
BenchmarkRandomBytes/random
2824
ns/op 1024 B/op 1 allocs/op46.88
ns/op 4 B/op 1 allocs/op60.24
BenchmarkRandomBytes/random - ns/op
2824
ns/op46.88
ns/op60.24
BenchmarkRandomBytes/random - B/op
1024
B/op4
B/op256
BenchmarkSmall/boltdb-1000-100-16-40/update
1402634
ns/op 46555 B/op 401 allocs/op843765
ns/op 36903 B/op 364 allocs/op1.66
BenchmarkSmall/boltdb-1000-100-16-40/update - ns/op
1402634
ns/op843765
ns/op1.66
BenchmarkSmall/boltdb-1000-100-16-40/update - B/op
46555
B/op36903
B/op1.26
BenchmarkSmall/goleveldb-1000-100-16-40/block
13746210
ns/op 4406203 B/op 46898 allocs/op11334793
ns/op 3288144 B/op 35620 allocs/op1.21
BenchmarkSmall/goleveldb-1000-100-16-40/block - ns/op
13746210
ns/op11334793
ns/op1.21
BenchmarkSmall/goleveldb-1000-100-16-40/block - B/op
4406203
B/op3288144
B/op1.34
BenchmarkSmall/goleveldb-1000-100-16-40/block - allocs/op
46898
allocs/op35620
allocs/op1.32
BenchmarkSmall/memdb-1000-100-16-40/block
20737727
ns/op 9069661 B/op 165088 allocs/op15591488
ns/op 6576384 B/op 116691 allocs/op1.33
BenchmarkSmall/memdb-1000-100-16-40/block - ns/op
20737727
ns/op15591488
ns/op1.33
BenchmarkSmall/memdb-1000-100-16-40/block - B/op
9069661
B/op6576384
B/op1.38
BenchmarkSmall/memdb-1000-100-16-40/block - allocs/op
165088
allocs/op116691
allocs/op1.41
BenchmarkMedium/boltdb-100000-100-16-40/update
6673256
ns/op 129759 B/op 1013 allocs/op4814868
ns/op 95463 B/op 810 allocs/op1.39
BenchmarkMedium/boltdb-100000-100-16-40/update - ns/op
6673256
ns/op4814868
ns/op1.39
BenchmarkMedium/boltdb-100000-100-16-40/update - B/op
129759
B/op95463
B/op1.36
BenchmarkMedium/boltdb-100000-100-16-40/update - allocs/op
1013
allocs/op810
allocs/op1.25
BenchmarkMedium/memdb-100000-100-16-40/update
1369540
ns/op 373984 B/op 7409 allocs/op1059697
ns/op 257418 B/op 4965 allocs/op1.29
BenchmarkMedium/memdb-100000-100-16-40/update - ns/op
1369540
ns/op1059697
ns/op1.29
BenchmarkMedium/memdb-100000-100-16-40/update - B/op
373984
B/op257418
B/op1.45
BenchmarkMedium/memdb-100000-100-16-40/update - allocs/op
7409
allocs/op4965
allocs/op1.49
BenchmarkLevelDBBatchSizes/goleveldb-100000-400-16-40/update - B/op
48984
B/op39205
B/op1.25
BenchmarkLevelDBBatchSizes/goleveldb-100000-400-16-40/update - allocs/op
592
allocs/op455
allocs/op1.30
BenchmarkHash/ripemd160
3956
ns/op 25 B/op 1 allocs/op1019
ns/op 25 B/op 1 allocs/op3.88
BenchmarkHash/ripemd160 - ns/op
3956
ns/op1019
ns/op3.88
BenchmarkHash/sha2-256
1773
ns/op 33 B/op 1 allocs/op506.9
ns/op 33 B/op 1 allocs/op3.50
BenchmarkHash/sha2-256 - ns/op
1773
ns/op506.9
ns/op3.50
BenchmarkHash/sha3-256
2077
ns/op 33 B/op 1 allocs/op763.6
ns/op 33 B/op 1 allocs/op2.72
BenchmarkHash/sha3-256 - ns/op
2077
ns/op763.6
ns/op2.72
BenchmarkSwitchBroadcast
17373
ns/op 1760 B/op 53 allocs/op11733
ns/op 1762 B/op 53 allocs/op1.48
BenchmarkSwitchBroadcast - ns/op
17373
ns/op11733
ns/op1.48
BenchmarkReadSecretConnection
3349
ns/op 0 B/op 0 allocs/op2777
ns/op 0 B/op 0 allocs/op1.21
BenchmarkReadSecretConnection - ns/op
3349
ns/op2777
ns/op1.21
BenchmarkCacheStoreIterator50000 - allocs/op
5247
allocs/op4313
allocs/op1.22
This comment was automatically generated by workflow using github-action-benchmark.
CC: @ajnavarro @thehowl @zivkovicmilos