Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate merkle packages #2715

Merged
merged 5 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

## HEAD

* Start using `github.com/transparency-dev/merkle` as a replacement to the
`merkle` libraries in this repository. This is not a breaking change, but
we recommend clients also migrate over to this library at the earliest
convenient time; the long term plan is to remove `merkle` from this repo.
* `countFromInformationSchema` function to add support for MySQL 8.

### Removals
* #2711: Unused `storage/tools/hasher` removed.
* #2715: Packages under `merkle` are deprecated and to be removed. Use
https://github.com/transparency-dev/merkle instead.

### Misc improvements

Expand Down
4 changes: 4 additions & 0 deletions merkle/compact/range.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
// limitations under the License.

// Package compact provides compact Merkle tree data structures.
//
// Deprecated: This package is superseded by the corresponding functionality in
// https://github.com/transparency-dev/merkle. It will be removed in future
// releases of Trillian.
package compact

import (
Expand Down
4 changes: 2 additions & 2 deletions merkle/compact/range_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/google/trillian/merkle/rfc6962"
"github.com/google/trillian/merkle/testonly"
"github.com/google/trillian/merkle/rfc6962" // nolint:staticcheck
"github.com/google/trillian/merkle/testonly" // nolint:staticcheck

_ "github.com/golang/glog" // Required for flag handling
)
Expand Down
4 changes: 4 additions & 0 deletions merkle/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@
// limitations under the License.

// Package merkle provides Merkle tree manipulation functions.
//
// Deprecated: This package is superseded by the corresponding functionality in
// https://github.com/transparency-dev/merkle. It will be removed in future
// releases of Trillian.
package merkle
5 changes: 5 additions & 0 deletions merkle/hashers/tree_hasher.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package hashers provides an interface for log hashers.
//
// Deprecated: This package is superseded by the corresponding functionality in
// https://github.com/transparency-dev/merkle. It will be removed in future
// releases of Trillian.
package hashers

// LogHasher provides the hash functions needed to compute dense merkle trees.
Expand Down
2 changes: 1 addition & 1 deletion merkle/log_proofs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"errors"
"math/bits"

"github.com/google/trillian/merkle/compact"
"github.com/google/trillian/merkle/compact" // nolint:staticcheck
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
4 changes: 2 additions & 2 deletions merkle/log_proofs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

_ "github.com/golang/glog" // Logging flags for overarching "go test" runs.
"github.com/google/go-cmp/cmp"
"github.com/google/trillian/merkle/compact"
"github.com/google/trillian/merkle/rfc6962"
"github.com/google/trillian/merkle/compact" // nolint:staticcheck
"github.com/google/trillian/merkle/rfc6962" // nolint:staticcheck
)

// TestCalcInclusionProofNodeAddresses contains inclusion proof tests. For
Expand Down
2 changes: 1 addition & 1 deletion merkle/logverifier/hash_chainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package logverifier

import "github.com/google/trillian/merkle/hashers"
import "github.com/google/trillian/merkle/hashers" // nolint:staticcheck

// hashChainer provides convenience methods for hashing subranges of Merkle
// Tree proofs to obtain (sub-)tree hashes. Depending on how the path to a tree
Expand Down
7 changes: 6 additions & 1 deletion merkle/logverifier/log_verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package logverifier implements proof verificaion helpers for Merkle trees.
//
// Deprecated: This package is superseded by the corresponding functionality in
// https://github.com/transparency-dev/merkle. It will be removed in future
// releases of Trillian.
package logverifier

import (
Expand All @@ -20,7 +25,7 @@ import (
"fmt"
"math/bits"

"github.com/google/trillian/merkle/hashers"
"github.com/google/trillian/merkle/hashers" // nolint:staticcheck
)

// RootMismatchError occurs when an inclusion proof fails.
Expand Down
2 changes: 1 addition & 1 deletion merkle/logverifier/log_verifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

_ "github.com/golang/glog"
"github.com/google/trillian/internal/merkle/inmemory"
"github.com/google/trillian/merkle/rfc6962"
"github.com/google/trillian/merkle/rfc6962" // nolint:staticcheck
)

type inclusionProofTestVector struct {
Expand Down
4 changes: 4 additions & 0 deletions merkle/rfc6962/rfc6962.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
// limitations under the License.

// Package rfc6962 provides hashing functionality according to RFC6962.
//
// Deprecated: This package is superseded by the corresponding functionality in
// https://github.com/transparency-dev/merkle. It will be removed in future
// releases of Trillian.
package rfc6962

import (
Expand Down
4 changes: 4 additions & 0 deletions merkle/testonly/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
// limitations under the License.

// Package testonly contains code and data for testing Merkle trees.
//
// Deprecated: This package is superseded by the corresponding functionality in
// https://github.com/transparency-dev/merkle. It will be removed in future
// releases of Trillian.
package testonly

import "github.com/google/trillian/testonly"
Expand Down