From 89176c505a83f3ae7599adc100873eda2f5d21a2 Mon Sep 17 00:00:00 2001 From: Jay Hou Date: Wed, 27 Jul 2022 11:28:15 -0400 Subject: [PATCH 1/6] Dont store ephemeral nodes (#2782) * Do not store ephemeral nodes * Update CHANGELOG.md to deprecate --tree_ids_with_no_ephemeral_nodes. * Fix a missing deletion. * Update TODO with GitHub issue link. Co-authored-by: Jay Hou --- CHANGELOG.md | 3 ++ .../format/testdata/dump_tree_output_1000 | 24 +-------- .../format/testdata/dump_tree_output_871 | 28 +---------- .../format/testdata/dump_tree_output_96 | 6 +-- log/sequencer.go | 49 ++----------------- log/sequencer_test.go | 5 -- 6 files changed, 12 insertions(+), 103 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6edd673185..86993f5920 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## HEAD +* Deprecate `--tree_ids_with_no_ephemeral_nodes` flag by setting it to all trees + (`*`) by default. + ## v1.4.2 * #2568: Allow disabling the writes of ephemeral nodes to storage via the diff --git a/integration/format/testdata/dump_tree_output_1000 b/integration/format/testdata/dump_tree_output_1000 index 86e7c0f0d2..759300c6a6 100644 --- a/integration/format/testdata/dump_tree_output_1000 +++ b/integration/format/testdata/dump_tree_output_1000 @@ -12,23 +12,11 @@ leaves: { key: "CAI=" value: "\xbb\x91zJ\xbb\xbbR\xc7\xe0>\xde\x1e\xe5\x9fC\x11\xe5J\x85\x0b\x00\x99\xd1^\xa2\xd8RB?;S5" } -leaves: { - key: "CAM=" - value: "\xc3\xe2VW\xbb\xed\x8f\x1eۂz\x05\xf1\x86;\xc21\x05\xae\x05\x8e\x05-o9\xb5\x05*|\x9b\x1c@" -} -internal_nodes: { - key: "BgA=" - value: "7ה\x03g\xb8+)\xe4\n\r\xb6\x9a\x83\xf8\x11}ui\xe7\xf7N\xc1:\x87S\x06%\\'\x7f\x1b" -} internal_nodes: { key: "BwA=" value: "\xc6\xee@\x91R\xb3TI\x03\xf2\x86B-}c:\x9aۢ\xef\x0f/\xdb\xf1V\x8e-\r\xcf\x17?\x92" } -internal_nodes: { - key: "BwI=" - value: "\xe3\xda%\xfem\x86\x03v#T\x8e0\xf8 \x1e\xdb\xfb\xad\xef\\\x18\x8asX\xec\x0fN\xbe\"\x901\x1e" -} -internal_node_count: 3 +internal_node_count: 1 prefix: "\x00\x00\x00\x00\x00\x00\x00" depth: 8 @@ -7116,10 +7104,6 @@ internal_nodes: { key: "AQA=" value: "\xb2\nE\x80\x9e\x88X\xb4\xe5\x14\xa7ic\x80\xd1b**.u\n\xfd \t\x90e\xae\xc4\xee\x89Q\xdc" } -internal_nodes: { - key: "AYA=" - value: "\x8e\xcc\xe2\x04\x1c}\x0b\x0f\x1f\xa0K\xc4y\xb3mӠP\x8d\xa68\x02\x178\xf2@\xac\xd3\xd1/&\x8f" -} internal_nodes: { key: "AgA=" value: "A:\x85Z\x8aıqBκ\t9\x02\x0fF\xe9\x91s\x84\x07\"\x08\x08Ů\xfe\xea-\xf6\xe8R" @@ -7132,10 +7116,6 @@ internal_nodes: { key: "AoA=" value: "\xb1P\x17A\x02\xe2\xe40\xff\x16q\x9e\x1d\x91\xf6\xf0\x0e\x81\xf6\x9a\x81\xd0\r/\xac\x0e4]?3\x12r" } -internal_nodes: { - key: "AsA=" - value: "\xf0ݟo9d\x0f\x8f𠅼\r\x85\x07k\rV2\x84\x99 \xeb\x0c4\x06\xdd\xc4\xf7K\xf2\x98" -} internal_nodes: { key: "AwA=" value: "\xf9ϧ\x1d\xf4?Zٶ\x82\xfc\\g\xc9\xf2eyĭ\x03\x0eI\rX\xc5\xdd\xd4\xf7\\K\xd0G" @@ -8012,5 +7992,5 @@ internal_nodes: { key: "Bzw=" value: "\xd5u\xac\xe5b\xa0&\xaa\x92\xd9\xf6~FO\x9c\xa2>c\x80\xe3>rI\x86\xe5\x91'l\xaf" } -internal_node_count: 230 +internal_node_count: 228 diff --git a/integration/format/testdata/dump_tree_output_871 b/integration/format/testdata/dump_tree_output_871 index e26f9f0b94..b1cdca0627 100644 --- a/integration/format/testdata/dump_tree_output_871 +++ b/integration/format/testdata/dump_tree_output_871 @@ -12,19 +12,11 @@ leaves: { key: "CAI=" value: "\xbb\x91zJ\xbb\xbbR\xc7\xe0>\xde\x1e\xe5\x9fC\x11\xe5J\x85\x0b\x00\x99\xd1^\xa2\xd8RB?;S5" } -internal_nodes: { - key: "BgA=" - value: "\xf6\x87\xc1\xbdh\x94\xb4Q\xdc\xf7\x1fZ+\x03\x9d\xce`\xf2\x87Џ\x89\x02\xc1iw\xa3AC\xbe\xa7N" -} internal_nodes: { key: "BwA=" value: "\xc6\xee@\x91R\xb3TI\x03\xf2\x86B-}c:\x9aۢ\xef\x0f/\xdb\xf1V\x8e-\r\xcf\x17?\x92" } -internal_nodes: { - key: "BwI=" - value: "\x07U\xae&\xaf\xea\xbd1\x10܍\xe6\xf0\xac\xf1\xe5)\x02\xddk\x80Q`/P\\\xa9\xe7\xfa_\xc3/" -} -internal_node_count: 3 +internal_node_count: 1 prefix: "\x00\x00\x00\x00\x00\x00\x00" depth: 8 @@ -6576,18 +6568,10 @@ internal_nodes: { key: "A0A=" value: "K\x1a\xbc\x93\xb8[20.Җ`\x9d\x12\x1f\x90W\xa3Ȥ~\r>\t0\x02\xfd\x07\tL\x03y" } -internal_nodes: { - key: "AQA=" - value: "$F\xb2T\xeb\x8c\x03\xf2\xef`3ۄ\xbfik\xba\x97\xb5\x89\x1c^\x81\xfa4\x0e\xf8\xf5#\"ӑ" -} internal_nodes: { key: "AgA=" value: "A:\x85Z\x8aıqBκ\t9\x02\x0fF\xe9\x91s\x84\x07\"\x08\x08Ů\xfe\xea-\xf6\xe8R" } -internal_nodes: { - key: "AkA=" - value: "\xf5<\x8c8C\n\x1c\xa6\xdbG\x94\xbaL\x85\xac\xf0x\xeb\xb2\x03i\xaf}\xeb\x1b\xa8\x96\x99\x19z>\xab" -} internal_nodes: { key: "AwA=" value: "\xf9ϧ\x1d\xf4?Zٶ\x82\xfc\\g\xc9\xf2eyĭ\x03\x0eI\rX\xc5\xdd\xd4\xf7\\K\xd0G" @@ -6744,10 +6728,6 @@ internal_nodes: { key: "BVg=" value: "5W\x98P\xfe\x125'\xb9K0\xcf\x08\x17\x92\xdb\xfb\x04\xda^\xf6\x03K\x04B\xd9ifHZ\xb6\xfe" } -internal_nodes: { - key: "BWA=" - value: "\xd6N^\x93e\x13Qd\xe1\xea\xc0_a\x04\x8dL\x9fu\xad\x05\xe6\xd1y&\xa3\xa1\xc3Et\xfd\xa7\xde" -} internal_nodes: { key: "BgA=" value: "\xec\x86&v\xd5C*\x15\xb3\xec\t\x89_\xf1*\xc1\xf02Ұ\xbdk\x08\xb0x\xfc\xdfȥ\xeaܾ" @@ -6848,10 +6828,6 @@ internal_nodes: { key: "BmA=" value: "\x15\xd6l\x92\xd7$*q\x9f\xbf\xd6\x7f\x88\xb0\xc2`\x1d\xc2y\xc3\xfe\x82bԥ\xc4\xe9\r}i\x97!" } -internal_nodes: { - key: "BmQ=" - value: "d\xbct\x8f\xdema\x7f\xd3\xf1\\\x14/l\xb3{{\x02\x87\xc4>\xdd,+\xfe\x87\x7f\xc8PTJ\xa7" -} internal_nodes: { key: "Bw4=" value: "\x99\xbc\xce}\xcd\xf2\xfe\xb9]\xecY:P7\x05~l\xfc\xab\x066 G\xa1y\x9c\x9a\xe4\xe1\r\x89\xb9" @@ -6980,5 +6956,5 @@ internal_nodes: { key: "Bzw=" value: "\xd5u\xac\xe5b\xa0&\xaa\x92\xd9\xf6~FO\x9c\xa2>c\x80\xe3>rI\x86\xe5\x91'l\xaf" } -internal_node_count: 102 +internal_node_count: 98 diff --git a/integration/format/testdata/dump_tree_output_96 b/integration/format/testdata/dump_tree_output_96 index 16ed0903cb..b9d86bd086 100644 --- a/integration/format/testdata/dump_tree_output_96 +++ b/integration/format/testdata/dump_tree_output_96 @@ -388,10 +388,6 @@ internal_nodes: { key: "A0A=" value: "\xa2\x9b|=$\xce/\x86+\x0b\"\x92n\xcc\xc3\\/b7Lm\xdb\xd5\x19{\xfeKo\xe8\xbdtF" } -internal_nodes: { - key: "AQA=" - value: "\xf0K\xff\xed19\x0e\tL\xea\xfc\x12U\xf1\xf2α1z\x8a\xba\xe0\xb0t\x9a\x88\x15]U\xee\xce\xd0" -} internal_nodes: { key: "AgA=" value: "\x8f\x05[\xe4\x9bG\x8fW\x12\xeb\xe2\xd8[\x89˔m\xccP\x87\x18_\x1d.\xb66S\xa5\x99\x81\x08\xce" @@ -764,5 +760,5 @@ internal_nodes: { key: "Bzw=" value: "\xd7\x1a\xff\x1a\xea\xde\xc2\xe8\xe87d" } -internal_node_count: 95 +internal_node_count: 94 diff --git a/log/sequencer.go b/log/sequencer.go index e4608063ba..f9809b364c 100644 --- a/log/sequencer.go +++ b/log/sequencer.go @@ -20,7 +20,6 @@ import ( "flag" "fmt" "strconv" - "strings" "sync" "time" @@ -66,38 +65,8 @@ var ( QuotaIncreaseFactor = 1.1 ) -// stringSet is a set of strings that can be parsed by flag package. -type stringSet map[string]bool - -func (s *stringSet) String() string { - keys := make([]string, 0, len(*s)) - for k, v := range *s { - if v { - keys = append(keys, k) - } - } - return strings.Join(keys, ",") -} - -func (s *stringSet) Set(value string) error { - *s = make(stringSet) - for _, id := range strings.Split(value, ",") { - (*s)[id] = true - } - return nil -} - -// The tree IDs for which sequencer does not store ephemeral node hashes. -// Trillian releases up to v1.4.1 store the ephemeral hashes, which corresponds -// to this slice being empty. Release v1.4.2 allows disabling this behaviour -// for individual, or all trees (denoted by the "*" wildcard). The release -// after v1.4.2 will switch to "*" behaviour unconditionally. -var idsWithNoEphemeralNodes stringSet - -// TODO(pavelkalinnikov): Remove this flag in the next release. -func init() { - flag.Var(&idsWithNoEphemeralNodes, "tree_ids_with_no_ephemeral_nodes", "Comma-separated list of tree IDs for which storing the ephemeral nodes is disabled, or * to disable it for all trees") -} +// TODO(https://github.com/google/trillian/issues/2786): Remove this flag in the next release. +var _ = flag.String("tree_ids_with_no_ephemeral_nodes", "*", "[Deprecated] Comma-separated list of tree IDs for which storing the ephemeral nodes is disabled, or * to disable it for all trees") func quotaIncreaseFactor() float64 { if QuotaIncreaseFactor < 1 { @@ -221,18 +190,8 @@ func updateCompactRange(cr *compact.Range, leaves []*trillian.LogLeaf, label str } } - // Store or not store ephemeral nodes depending on the flag. This is a - // temporary safety measure, to test this on individual trees before fully - // disabling ephemeral nodes. - storeEphemeral := store - if idsWithNoEphemeralNodes[label] || idsWithNoEphemeralNodes["*"] { - storeEphemeral = nil - glog.Infof("%s: Not storing ephemeral nodes", label) - } - - // TODO(pavelkalinnikov): Do not store the ephemeral node hashes - // unconditionally, because they are not used since v1.4.0. - hash, err := cr.GetRootHash(storeEphemeral) + // Note: Ephemeral nodes are not stored. + hash, err := cr.GetRootHash(nil) if err != nil { return nil, nil, err } diff --git a/log/sequencer_test.go b/log/sequencer_test.go index 6eeb2b9122..ba9520afda 100644 --- a/log/sequencer_test.go +++ b/log/sequencer_test.go @@ -154,11 +154,6 @@ var ( }) ) -func init() { - // The tree ID used by TestIntegrateBatch. - idsWithNoEphemeralNodes = map[string]bool{"154035": true} -} - func makeSLR(root *types.LogRootV1) *trillian.SignedLogRoot { logRoot, _ := root.MarshalBinary() return &trillian.SignedLogRoot{LogRoot: logRoot} From c9a8759b1b97b59cf03d40b74cdc7ec8a083e0c7 Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Wed, 27 Jul 2022 16:37:58 +0100 Subject: [PATCH 2/6] Format code according to go1.19rc2 (#2785) Go formatting of docs has changed a little in 1.19: https://tip.golang.org/doc/go1.19\#go-doc. This formats the code in this repo so the docs are consistent with that. Previous versions of gofmt won't change this, and this allows old and new tooling to render the docs in increasingly better ways. Announcement for 1.19rc2: https://groups.google.com/g/golang-announce/c/czoG5UpT0EU --- docs/merkletree/treetex/main.go | 1 - log/operation_manager_test.go | 5 ++- merkle/compact/nodes.go | 10 ++--- merkle/compact/range.go | 6 +-- merkle/log_proofs_test.go | 60 ++++++++++++++--------------- merkle/smt/node/id.go | 14 +++---- merkle/smt/tile.go | 8 ++-- storage/cloudspanner/log_storage.go | 5 ++- storage/storagepb/gen.go | 13 ++++--- testonly/flagsaver/flagsaver.go | 9 +++-- types/internal/tls/tls.go | 46 +++++++++++----------- types/logroot.go | 28 +++++++------- util/election2/election.go | 12 +++--- 13 files changed, 112 insertions(+), 105 deletions(-) diff --git a/docs/merkletree/treetex/main.go b/docs/merkletree/treetex/main.go index d843716a92..0af9d1e4d8 100644 --- a/docs/merkletree/treetex/main.go +++ b/docs/merkletree/treetex/main.go @@ -19,7 +19,6 @@ // Usage: go run main.go | xelatex // This should generate a PDF file called treetek.pdf containing a drawing of // the tree. -// package main import ( diff --git a/log/operation_manager_test.go b/log/operation_manager_test.go index a065aa7e05..4ea1fd4da7 100644 --- a/log/operation_manager_test.go +++ b/log/operation_manager_test.go @@ -88,8 +88,9 @@ func (l logOpInfoMatcher) String() string { // Set up some log IDs in mock storage. // The following IDs have special behaviour: -// logIDThatFailsGetTreeOp: fail the GetTree() operation -// logIDWithNoDisplayName: return a tree with no DisplayName +// +// logIDThatFailsGetTreeOp: fail the GetTree() operation +// logIDWithNoDisplayName: return a tree with no DisplayName func setupLogIDs(ctrl *gomock.Controller, logNames map[int64]string) (*storage.MockLogStorage, *storage.MockAdminStorage) { ids := make([]int64, 0, len(logNames)) for id := range logNames { diff --git a/merkle/compact/nodes.go b/merkle/compact/nodes.go index 77c00ba24e..f75e364ea9 100644 --- a/merkle/compact/nodes.go +++ b/merkle/compact/nodes.go @@ -22,11 +22,11 @@ import "math/bits" // index is its horizontal position in this level ordered from left to right. // Consider an example below where nodes are labeled as [ ]. // -// [2 0] -// / \ -// [1 0] \ -// / \ \ -// [0 0] [0 1] [0 2] +// [2 0] +// / \ +// [1 0] \ +// / \ \ +// [0 0] [0 1] [0 2] type NodeID struct { Level uint Index uint64 diff --git a/merkle/compact/range.go b/merkle/compact/range.go index 316ebaa0d2..fe43f3b745 100644 --- a/merkle/compact/range.go +++ b/merkle/compact/range.go @@ -239,9 +239,9 @@ func getMergePath(begin, mid, end uint64) (uint, uint) { // some integers m, k >= 0. // // The sequence of sizes is returned encoded as bitmasks left and right, where: -// - a 1 bit in a bitmask denotes a sub-range of the corresponding size 2^k -// - left mask bits in LSB-to-MSB order encode the left part of the sequence -// - right mask bits in MSB-to-LSB order encode the right part +// - a 1 bit in a bitmask denotes a sub-range of the corresponding size 2^k +// - left mask bits in LSB-to-MSB order encode the left part of the sequence +// - right mask bits in MSB-to-LSB order encode the right part // // The corresponding values of m are not returned (they can be calculated from // begin and the sub-range sizes). diff --git a/merkle/log_proofs_test.go b/merkle/log_proofs_test.go index 872d076d87..722832e55f 100644 --- a/merkle/log_proofs_test.go +++ b/merkle/log_proofs_test.go @@ -27,21 +27,21 @@ import ( // TestCalcInclusionProofNodeAddresses contains inclusion proof tests. For // reference, consider the following example of a tree from RFC 6962: // -// hash <== Level 3 -// / \ -// / \ -// / \ -// / \ -// / \ -// k l <== Level 2 -// / \ / \ -// / \ / \ -// / \ / \ -// g h i [ ] <== Level 1 -// / \ / \ / \ / -// a b c d e f j <== Level 0 -// | | | | | | | -// d0 d1 d2 d3 d4 d5 d6 +// hash <== Level 3 +// / \ +// / \ +// / \ +// / \ +// / \ +// k l <== Level 2 +// / \ / \ +// / \ / \ +// / \ / \ +// g h i [ ] <== Level 1 +// / \ / \ / \ / +// a b c d e f j <== Level 0 +// | | | | | | | +// d0 d1 d2 d3 d4 d5 d6 // // Our storage node layers are always populated from the bottom up, hence the // gap at level 1, index 3 in the above picture. @@ -151,21 +151,21 @@ func TestCalcInclusionProofNodeAddresses(t *testing.T) { // TestCalcConsistencyProofNodeAddresses contains consistency proof tests. For // reference, consider the following example: // -// hash5 hash7 -// / \ / \ -// / \ / \ -// / \ / \ -// / \ / \ -// / \ / \ -// k [ ] --> k l -// / \ / / \ / \ -// / \ / / \ / \ -// / \ / / \ / \ -// g h [ ] g h i [ ] -// / \ / \ / / \ / \ / \ / -// a b c d e a b c d e f j -// | | | | | | | | | | | | -// d0 d1 d2 d3 d4 d0 d1 d2 d3 d4 d5 d6 +// hash5 hash7 +// / \ / \ +// / \ / \ +// / \ / \ +// / \ / \ +// / \ / \ +// k [ ] --> k l +// / \ / / \ / \ +// / \ / / \ / \ +// / \ / / \ / \ +// g h [ ] g h i [ ] +// / \ / \ / / \ / \ / \ / +// a b c d e a b c d e f j +// | | | | | | | | | | | | +// d0 d1 d2 d3 d4 d0 d1 d2 d3 d4 d5 d6 // // The consistency proof between tree size 5 and 7 consists of nodes e, f, j, // and k. The node j is taken instead of its missing parent. diff --git a/merkle/smt/node/id.go b/merkle/smt/node/id.go index 9230e24779..a32bfa95b6 100644 --- a/merkle/smt/node/id.go +++ b/merkle/smt/node/id.go @@ -26,13 +26,13 @@ import "fmt" // Sibling. // // The internal structure of ID is driven by its use-cases: -// - To make ID objects immutable and comparable, the Golang string type is -// used for storing the bit string bytes. -// - To make Sibling and Prefix operations fast, the last byte is stored -// separately from the rest of the bytes, so that it can be "amended". -// - To make ID objects comparable, there is only one (canonical) way to encode -// an ID. For example, if the last byte is used partially, its unused bits -// are always unset. See invariants next to field definitions below. +// - To make ID objects immutable and comparable, the Golang string type is +// used for storing the bit string bytes. +// - To make Sibling and Prefix operations fast, the last byte is stored +// separately from the rest of the bytes, so that it can be "amended". +// - To make ID objects comparable, there is only one (canonical) way to encode +// an ID. For example, if the last byte is used partially, its unused bits +// are always unset. See invariants next to field definitions below. // // Constructors and methods of ID make sure its invariants are always met. // diff --git a/merkle/smt/tile.go b/merkle/smt/tile.go index 6df2a5de1f..cc6240f20d 100644 --- a/merkle/smt/tile.go +++ b/merkle/smt/tile.go @@ -28,10 +28,10 @@ import ( // all the remaining inner nodes of the tile. // // Invariants of this structure that must be preserved at all times: -// - ID is a prefix of Leaves' IDs, i.e. the nodes are in the same subtree. -// - IDs of Leaves have the same length, i.e. the nodes are at the same level. -// - Leaves are ordered by ID from left to right. -// - IDs of Leaves are unique. +// - ID is a prefix of Leaves' IDs, i.e. the nodes are in the same subtree. +// - IDs of Leaves have the same length, i.e. the nodes are at the same level. +// - Leaves are ordered by ID from left to right. +// - IDs of Leaves are unique. // // Algorithms that create Tile structures must ensure that these invariants // hold. Use NewNodesRow function for ordering nodes correctly. diff --git a/storage/cloudspanner/log_storage.go b/storage/cloudspanner/log_storage.go index 8a593a9054..c48e4b83b1 100644 --- a/storage/cloudspanner/log_storage.go +++ b/storage/cloudspanner/log_storage.go @@ -967,8 +967,9 @@ func (tx *logTX) getUsingIndex(ctx context.Context, idx string, keys [][]byte, b // Any unknown hashes will simply be ignored, and the caller should inspect the // returned leaves to determine whether this has occurred. // TODO(al): Currently, this method does not populate the IntegrateTimestamp -// member of the returned leaves. We should convert this method to use SQL -// rather than denormalising IntegrateTimestampNanos into the index too. +// +// member of the returned leaves. We should convert this method to use SQL +// rather than denormalising IntegrateTimestampNanos into the index too. func (tx *logTX) GetLeavesByHash(ctx context.Context, hashes [][]byte, bySeq bool) ([]*trillian.LogLeaf, error) { return tx.getUsingIndex(ctx, seqDataByMerkleHashIdx, hashes, bySeq) } diff --git a/storage/storagepb/gen.go b/storage/storagepb/gen.go index 94ca42b7fd..007417cd2f 100644 --- a/storage/storagepb/gen.go +++ b/storage/storagepb/gen.go @@ -16,12 +16,15 @@ // implementations. // // TODO(pavelkalinnikov, v2): SubtreeProto is used as: -// a) database storage unit in multiple storage implementations; -// b) data exchange format between storage and application layers; -// c) nodes index data structure. +// +// a) database storage unit in multiple storage implementations; +// b) data exchange format between storage and application layers; +// c) nodes index data structure. +// // We should change it so that: -// a) individual storage implementations define their own formats; -// b) data structures are defined in the application layer. +// +// a) individual storage implementations define their own formats; +// b) data structures are defined in the application layer. package storagepb //go:generate protoc -I=. --go_out=paths=source_relative:. storage.proto diff --git a/testonly/flagsaver/flagsaver.go b/testonly/flagsaver/flagsaver.go index 1763af8419..738b12e7dd 100644 --- a/testonly/flagsaver/flagsaver.go +++ b/testonly/flagsaver/flagsaver.go @@ -16,10 +16,11 @@ // TODO(RJPercival): Move this to its own GitHub project. // // Example: -// func TestFoo(t *testing.T) { -// defer flagsaver.Save().Restore() -// // Test code that changes flags -// } // flags are reset to their original values here. +// +// func TestFoo(t *testing.T) { +// defer flagsaver.Save().Restore() +// // Test code that changes flags +// } // flags are reset to their original values here. package flagsaver import ( diff --git a/types/internal/tls/tls.go b/types/internal/tls/tls.go index 8a94739132..badec7b500 100644 --- a/types/internal/tls/tls.go +++ b/types/internal/tls/tls.go @@ -108,41 +108,41 @@ var ( // // For example, a TLS structure: // -// enum { e1(1), e2(2) } EnumType; -// struct { -// EnumType sel; -// select(sel) { -// case e1: uint16 -// case e2: uint32 -// } data; -// } VariantItem; +// enum { e1(1), e2(2) } EnumType; +// struct { +// EnumType sel; +// select(sel) { +// case e1: uint16 +// case e2: uint32 +// } data; +// } VariantItem; // // would have a corresponding Go type: // -// type VariantItem struct { -// Sel tls.Enum `tls:"maxval:2"` -// Data16 *uint16 `tls:"selector:Sel,val:1"` -// Data32 *uint32 `tls:"selector:Sel,val:2"` -// } +// type VariantItem struct { +// Sel tls.Enum `tls:"maxval:2"` +// Data16 *uint16 `tls:"selector:Sel,val:1"` +// Data32 *uint32 `tls:"selector:Sel,val:2"` +// } // // TLS fixed-length vectors of types other than opaque or uint8 are not supported. // // For TLS variable-length vectors that are themselves used in other vectors, // create a single-field structure to represent the inner type. For example, for: // -// opaque InnerType<1..65535>; -// struct { -// InnerType inners<1,65535>; -// } Something; +// opaque InnerType<1..65535>; +// struct { +// InnerType inners<1,65535>; +// } Something; // // convert to: // -// type InnerType struct { -// Val []byte `tls:"minlen:1,maxlen:65535"` -// } -// type Something struct { -// Inners []InnerType `tls:"minlen:1,maxlen:65535"` -// } +// type InnerType struct { +// Val []byte `tls:"minlen:1,maxlen:65535"` +// } +// type Something struct { +// Inners []InnerType `tls:"minlen:1,maxlen:65535"` +// } // // If the encoded value does not fit in the Go type, Unmarshal returns a parse error. func Unmarshal(b []byte, val interface{}) ([]byte, error) { diff --git a/types/logroot.go b/types/logroot.go index bdebddef16..1c3a38045e 100644 --- a/types/logroot.go +++ b/types/logroot.go @@ -27,13 +27,14 @@ import ( // LogRootV1 holds the TLS-deserialization of the following structure // (described in RFC5246 section 4 notation): -// struct { -// uint64 tree_size; -// opaque root_hash<0..128>; -// uint64 timestamp_nanos; -// uint64 revision; -// opaque metadata<0..65535>; -// } LogRootV1; +// +// struct { +// uint64 tree_size; +// opaque root_hash<0..128>; +// uint64 timestamp_nanos; +// uint64 revision; +// opaque metadata<0..65535>; +// } LogRootV1; type LogRootV1 struct { // TreeSize is the number of leaves in the log Merkle tree. TreeSize uint64 @@ -55,12 +56,13 @@ type LogRootV1 struct { // LogRoot holds the TLS-deserialization of the following structure // (described in RFC5246 section 4 notation): // enum { v1(1), (65535)} Version; -// struct { -// Version version; -// select(version) { -// case v1: LogRootV1; -// } -// } LogRoot; +// +// struct { +// Version version; +// select(version) { +// case v1: LogRootV1; +// } +// } LogRoot; type LogRoot struct { Version tls.Enum `tls:"size:2"` V1 *LogRootV1 `tls:"selector:Version,val:1"` diff --git a/util/election2/election.go b/util/election2/election.go index 9d25bc59fb..672dd5164d 100644 --- a/util/election2/election.go +++ b/util/election2/election.go @@ -16,12 +16,12 @@ // plugging in a custom underlying mechanism. // // There are two important abstractions in this package: instance and resource. -// - An instance is a single client of the library. An instance is represented -// by an Election object (possibly multiple). -// - A resource is something guarded by master election (e.g. a piece of data, -// or operation). Each resource has at most one (most of the time; see note -// below) master instance which is said to own this resource. A single -// instance may own multiple resources (one resource per Election object). +// - An instance is a single client of the library. An instance is represented +// by an Election object (possibly multiple). +// - A resource is something guarded by master election (e.g. a piece of data, +// or operation). Each resource has at most one (most of the time; see note +// below) master instance which is said to own this resource. A single +// instance may own multiple resources (one resource per Election object). // // Note: Sometimes there can be more than 1 instance "believing" to own a // resource. The reason is that the client code operates outside of the From 5c9fff397a3eec57f95342d960795ec24434a9c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 08:47:18 +0800 Subject: [PATCH 3/6] Bump google.golang.org/api from 0.88.0 to 0.90.0 (#2789) Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.88.0 to 0.90.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.88.0...v0.90.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e940bce226..06cd66c493 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f golang.org/x/sys v0.0.0-20220624220833-87e55d714810 golang.org/x/tools v0.1.11 - google.golang.org/api v0.88.0 + google.golang.org/api v0.90.0 google.golang.org/genproto v0.0.0-20220706185917-7780775163c4 google.golang.org/grpc v1.48.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 diff --git a/go.sum b/go.sum index 2735c225c5..5822e8b15e 100644 --- a/go.sum +++ b/go.sum @@ -1059,8 +1059,8 @@ google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6r google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.88.0 h1:MPwxQRqpyskYhr2iNyfsQ8R06eeyhe7UEuR30p136ZQ= -google.golang.org/api v0.88.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.90.0 h1:WMnUWAvihIClUYFNeFA69VTuR3duKS3IalMGDQcLvq8= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= From 041195e72f1ca3975972aa96db2f238f2b6f753b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:06:11 +0800 Subject: [PATCH 4/6] Bump golang.org/x/tools from 0.1.11 to 0.1.12 (#2790) Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.11 to 0.1.12. - [Release notes](https://github.com/golang/tools/releases) - [Commits](https://github.com/golang/tools/compare/v0.1.11...v0.1.12) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 17 +++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 06cd66c493..fd26a2bff8 100644 --- a/go.mod +++ b/go.mod @@ -27,9 +27,9 @@ require ( go.etcd.io/etcd/v3 v3.5.4 go.opencensus.io v0.23.0 golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 - golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f - golang.org/x/sys v0.0.0-20220624220833-87e55d714810 - golang.org/x/tools v0.1.11 + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 + golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f + golang.org/x/tools v0.1.12 google.golang.org/api v0.90.0 google.golang.org/genproto v0.0.0-20220706185917-7780775163c4 google.golang.org/grpc v1.48.0 @@ -138,7 +138,7 @@ require ( go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.21.0 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect diff --git a/go.sum b/go.sum index 5822e8b15e..0e6817c6a9 100644 --- a/go.sum +++ b/go.sum @@ -615,7 +615,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= @@ -789,7 +789,6 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -797,8 +796,9 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -835,8 +835,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -907,7 +908,6 @@ golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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= @@ -921,8 +921,9 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1005,8 +1006,8 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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= From c1a741b009270c1f2f79ea410a1b33a866a58867 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 16:23:08 +0800 Subject: [PATCH 5/6] Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 (#2788) * Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.0 to 1.28.1. - [Release notes](https://github.com/protocolbuffers/protobuf-go/releases) - [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash) - [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.0...v1.28.1) --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * go generate -run="protoc" ./... Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Roger Ng --- crypto/keyspb/keyspb.pb.go | 2 +- go.mod | 2 +- go.sum | 3 ++- quota/etcd/quotapb/quotapb.pb.go | 2 +- quota/etcd/storagepb/storagepb.pb.go | 2 +- storage/cloudspanner/spannerpb/spanner.pb.go | 2 +- storage/storagepb/storage.pb.go | 2 +- trillian.pb.go | 2 +- trillian_admin_api.pb.go | 2 +- trillian_log_api.pb.go | 2 +- 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/crypto/keyspb/keyspb.pb.go b/crypto/keyspb/keyspb.pb.go index 1b09222a5e..735129ec4e 100644 --- a/crypto/keyspb/keyspb.pb.go +++ b/crypto/keyspb/keyspb.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc v3.20.1 // source: crypto/keyspb/keyspb.proto diff --git a/go.mod b/go.mod index fd26a2bff8..6e856942fe 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( google.golang.org/genproto v0.0.0-20220706185917-7780775163c4 google.golang.org/grpc v1.48.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/protobuf v1.28.1 ) require ( diff --git a/go.sum b/go.sum index 0e6817c6a9..e56afcbe38 100644 --- a/go.sum +++ b/go.sum @@ -1213,8 +1213,9 @@ google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX7 google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/quota/etcd/quotapb/quotapb.pb.go b/quota/etcd/quotapb/quotapb.pb.go index f2661e9a5f..47e35264e4 100644 --- a/quota/etcd/quotapb/quotapb.pb.go +++ b/quota/etcd/quotapb/quotapb.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc v3.20.1 // source: quotapb.proto diff --git a/quota/etcd/storagepb/storagepb.pb.go b/quota/etcd/storagepb/storagepb.pb.go index 5cc4dd4871..303955a401 100644 --- a/quota/etcd/storagepb/storagepb.pb.go +++ b/quota/etcd/storagepb/storagepb.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc v3.20.1 // source: storagepb.proto diff --git a/storage/cloudspanner/spannerpb/spanner.pb.go b/storage/cloudspanner/spannerpb/spanner.pb.go index be51eb4f42..b20e7a1a45 100644 --- a/storage/cloudspanner/spannerpb/spanner.pb.go +++ b/storage/cloudspanner/spannerpb/spanner.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc v3.20.1 // source: spanner.proto diff --git a/storage/storagepb/storage.pb.go b/storage/storagepb/storage.pb.go index cb32a3e993..8219ea9d2f 100644 --- a/storage/storagepb/storage.pb.go +++ b/storage/storagepb/storage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc v3.20.1 // source: storage.proto diff --git a/trillian.pb.go b/trillian.pb.go index e127dd0a6b..1af9c1c485 100644 --- a/trillian.pb.go +++ b/trillian.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc v3.20.1 // source: trillian.proto diff --git a/trillian_admin_api.pb.go b/trillian_admin_api.pb.go index 8e05f5bb1f..2d97bbf1cb 100644 --- a/trillian_admin_api.pb.go +++ b/trillian_admin_api.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc v3.20.1 // source: trillian_admin_api.proto diff --git a/trillian_log_api.pb.go b/trillian_log_api.pb.go index 451bfa2475..738e46e437 100644 --- a/trillian_log_api.pb.go +++ b/trillian_log_api.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc v3.20.1 // source: trillian_log_api.proto From 7dbb485ecd4cc3006cb8acdf730ed91d7f3919fb Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Tue, 2 Aug 2022 10:35:31 +0100 Subject: [PATCH 6/6] Updated golangci-lint and removed stale nolint directive (#2791) --- CHANGELOG.md | 1 + README.md | 2 +- experimental/batchmap/cmd/verify/verify.go | 4 +--- integration/cloudbuild/testbase/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86993f5920..352c7674d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Deprecate `--tree_ids_with_no_ephemeral_nodes` flag by setting it to all trees (`*`) by default. +* Updated golangci-lint to v1.47.3 (developers should update to this version) ## v1.4.2 diff --git a/README.md b/README.md index 4bfca358ae..1e50254b0a 100644 --- a/README.md +++ b/README.md @@ -211,7 +211,7 @@ and tests over the codebase. #### Install [golangci-lint](https://github.com/golangci/golangci-lint#local-installation). ```bash -go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.1 +go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.3 ``` #### Run code generation, build, test and linters diff --git a/experimental/batchmap/cmd/verify/verify.go b/experimental/batchmap/cmd/verify/verify.go index 2d579d5982..616ff811e4 100644 --- a/experimental/batchmap/cmd/verify/verify.go +++ b/experimental/batchmap/cmd/verify/verify.go @@ -101,9 +101,7 @@ func main() { if leaf == nil { glog.Fatalf("couldn't find expected leaf %x in tile %x", needLeafPath, tile.Path) } - // TODO(pavelkalinnikov): Remove nolint after fixing - // https://github.com/dominikh/go-tools/issues/921. - if !bytes.Equal(leaf.Hash, needValue) { // nolint: staticcheck + if !bytes.Equal(leaf.Hash, needValue) { glog.Fatalf("wrong leaf value in tile %x, leaf %x: got %x, want %x", tile.Path, leaf.Path, leaf.Hash, needValue) } diff --git a/integration/cloudbuild/testbase/Dockerfile b/integration/cloudbuild/testbase/Dockerfile index 284071e793..1281319dd4 100644 --- a/integration/cloudbuild/testbase/Dockerfile +++ b/integration/cloudbuild/testbase/Dockerfile @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y \ xxd # Install golangci-lint. See docs at: https://golangci-lint.run/usage/install/. -RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.1 +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.47.3 RUN mkdir protoc && \ (cd protoc && \