diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 942f3348d..e54e94b0c 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -32,8 +32,8 @@ Friendly reminder: We have a [bug bounty program](https://hackerone.com/tendermi - P2P Protocol - Go API - - [libs/log] \#6534 Removed the existing custom Tendermint logger backed by go-kit. The logging interface, `Logger`, remains. - Tendermint still provides a default logger backed by the performant zerolog logger. (@alexanderbez) + - [libs/time] \#6495 Move types/time to libs/time to improve consistency. (@tychoish) + - [libs/log] \#6534 Removed the existing custom Tendermint logger backed by go-kit. The logging interface, `Logger`, remains. Tendermint still provides a default logger backed by the performant zerolog logger. (@alexanderbez) - [mempool] \#6529 The `Context` field has been removed from the `TxInfo` type. `CheckTx` now requires a `Context` argument. (@alexanderbez) - [abci/client, proxy] \#5673 `Async` funcs return an error, `Sync` and `Async` funcs accept `context.Context` (@melekes) - [p2p] Removed unused function `MakePoWTarget`. (@erikgrinaker) diff --git a/cmd/tendermint/commands/init.go b/cmd/tendermint/commands/init.go index 5dd9b7105..8499c9085 100644 --- a/cmd/tendermint/commands/init.go +++ b/cmd/tendermint/commands/init.go @@ -11,9 +11,9 @@ import ( "github.com/tendermint/tendermint/internal/p2p" tmos "github.com/tendermint/tendermint/libs/os" tmrand "github.com/tendermint/tendermint/libs/rand" + tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) // InitFilesCmd initializes a fresh Tendermint Core instance. diff --git a/cmd/tendermint/commands/testnet.go b/cmd/tendermint/commands/testnet.go index 4f453edb6..1a8cb34da 100644 --- a/cmd/tendermint/commands/testnet.go +++ b/cmd/tendermint/commands/testnet.go @@ -15,9 +15,9 @@ import ( "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/bytes" tmrand "github.com/tendermint/tendermint/libs/rand" + tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) var ( diff --git a/internal/consensus/common_test.go b/internal/consensus/common_test.go index 682a83137..6c97e87c9 100644 --- a/internal/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -31,12 +31,12 @@ import ( "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" tmpubsub "github.com/tendermint/tendermint/libs/pubsub" + tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/privval" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) const ( diff --git a/internal/consensus/peer_state.go b/internal/consensus/peer_state.go index e63831967..556c886fa 100644 --- a/internal/consensus/peer_state.go +++ b/internal/consensus/peer_state.go @@ -12,9 +12,9 @@ import ( "github.com/tendermint/tendermint/libs/bits" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) var ( diff --git a/internal/consensus/state.go b/internal/consensus/state.go index e117d7ddb..e31628b33 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -24,10 +24,10 @@ import ( tmmath "github.com/tendermint/tendermint/libs/math" tmos "github.com/tendermint/tendermint/libs/os" "github.com/tendermint/tendermint/libs/service" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) // Consensus sentinel errors diff --git a/internal/consensus/types/height_vote_set_test.go b/internal/consensus/types/height_vote_set_test.go index 3830b2d80..a9e309b4f 100644 --- a/internal/consensus/types/height_vote_set_test.go +++ b/internal/consensus/types/height_vote_set_test.go @@ -10,9 +10,9 @@ import ( "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/internal/test/factory" tmrand "github.com/tendermint/tendermint/libs/rand" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) var config *cfg.Config // NOTE: must be reset for each _test.go file diff --git a/internal/consensus/wal.go b/internal/consensus/wal.go index 944e26730..0d9efb839 100644 --- a/internal/consensus/wal.go +++ b/internal/consensus/wal.go @@ -16,8 +16,8 @@ import ( "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" "github.com/tendermint/tendermint/libs/service" + tmtime "github.com/tendermint/tendermint/libs/time" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" - tmtime "github.com/tendermint/tendermint/types/time" ) const ( diff --git a/internal/consensus/wal_test.go b/internal/consensus/wal_test.go index 6eb8ca7f7..180af5f34 100644 --- a/internal/consensus/wal_test.go +++ b/internal/consensus/wal_test.go @@ -16,8 +16,8 @@ import ( "github.com/tendermint/tendermint/internal/consensus/types" "github.com/tendermint/tendermint/internal/libs/autofile" "github.com/tendermint/tendermint/libs/log" + tmtime "github.com/tendermint/tendermint/libs/time" tmtypes "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) const ( diff --git a/internal/test/factory/genesis.go b/internal/test/factory/genesis.go index 0552b1e8a..31ec1674f 100644 --- a/internal/test/factory/genesis.go +++ b/internal/test/factory/genesis.go @@ -4,8 +4,8 @@ import ( "sort" cfg "github.com/tendermint/tendermint/config" + tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) func RandGenesisDoc( diff --git a/types/time/time.go b/libs/time/time.go similarity index 100% rename from types/time/time.go rename to libs/time/time.go diff --git a/types/time/time_test.go b/libs/time/time_test.go similarity index 100% rename from types/time/time_test.go rename to libs/time/time_test.go diff --git a/light/helpers_test.go b/light/helpers_test.go index ee9d1dd2d..2ca951913 100644 --- a/light/helpers_test.go +++ b/light/helpers_test.go @@ -6,9 +6,9 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" ) diff --git a/node/node.go b/node/node.go index 418e7c59f..fe14c0044 100644 --- a/node/node.go +++ b/node/node.go @@ -28,6 +28,7 @@ import ( tmpubsub "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/libs/service" "github.com/tendermint/tendermint/libs/strings" + tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/light" "github.com/tendermint/tendermint/privval" tmgrpc "github.com/tendermint/tendermint/privval/grpc" @@ -39,7 +40,6 @@ import ( "github.com/tendermint/tendermint/state/indexer" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) // nodeImpl is the highest level interface to a full Tendermint node. diff --git a/node/node_test.go b/node/node_test.go index 741afeabf..135902716 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -28,13 +28,13 @@ import ( "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" tmrand "github.com/tendermint/tendermint/libs/rand" + tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/state/indexer" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) func TestNodeStartStop(t *testing.T) { diff --git a/privval/file.go b/privval/file.go index fdcfd1b30..4ec918c70 100644 --- a/privval/file.go +++ b/privval/file.go @@ -18,9 +18,9 @@ import ( tmbytes "github.com/tendermint/tendermint/libs/bytes" tmjson "github.com/tendermint/tendermint/libs/json" tmos "github.com/tendermint/tendermint/libs/os" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) // TODO: type ? diff --git a/privval/file_test.go b/privval/file_test.go index 5d283031d..680428ac2 100644 --- a/privval/file_test.go +++ b/privval/file_test.go @@ -16,9 +16,9 @@ import ( "github.com/tendermint/tendermint/crypto/tmhash" tmjson "github.com/tendermint/tendermint/libs/json" tmrand "github.com/tendermint/tendermint/libs/rand" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) func TestGenLoadValidator(t *testing.T) { diff --git a/state/execution_test.go b/state/execution_test.go index 1b1cf6042..8e0ec563a 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -16,13 +16,13 @@ import ( "github.com/tendermint/tendermint/crypto/tmhash" mmock "github.com/tendermint/tendermint/internal/mempool/mock" "github.com/tendermint/tendermint/libs/log" + tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/state/mocks" sf "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" dbm "github.com/tendermint/tm-db" ) diff --git a/state/helpers_test.go b/state/helpers_test.go index 7772d7b35..6d575e147 100644 --- a/state/helpers_test.go +++ b/state/helpers_test.go @@ -13,13 +13,13 @@ import ( cryptoenc "github.com/tendermint/tendermint/crypto/encoding" "github.com/tendermint/tendermint/internal/test/factory" tmrand "github.com/tendermint/tendermint/libs/rand" + tmtime "github.com/tendermint/tendermint/libs/time" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" sf "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) type paramsChangeTestCase struct { diff --git a/state/state.go b/state/state.go index bf266085c..132a86fda 100644 --- a/state/state.go +++ b/state/state.go @@ -9,10 +9,10 @@ import ( "github.com/gogo/protobuf/proto" + tmtime "github.com/tendermint/tendermint/libs/time" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" tmversion "github.com/tendermint/tendermint/proto/tendermint/version" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" ) diff --git a/state/validation_test.go b/state/validation_test.go index 8ed7cdb6f..151f2be61 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -15,13 +15,13 @@ import ( memmock "github.com/tendermint/tendermint/internal/mempool/mock" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/state/mocks" sf "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" dbm "github.com/tendermint/tm-db" ) diff --git a/store/store_test.go b/store/store_test.go index a631ead5a..d07e001e6 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -16,10 +16,10 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/log" tmrand "github.com/tendermint/tendermint/libs/rand" + tmtime "github.com/tendermint/tendermint/libs/time" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" ) diff --git a/types/block_test.go b/types/block_test.go index 8685de6c7..1c762653b 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -23,9 +23,9 @@ import ( "github.com/tendermint/tendermint/libs/bits" "github.com/tendermint/tendermint/libs/bytes" tmrand "github.com/tendermint/tendermint/libs/rand" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmversion "github.com/tendermint/tendermint/proto/tendermint/version" - tmtime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" ) diff --git a/types/canonical.go b/types/canonical.go index 49d98405d..01c3d851d 100644 --- a/types/canonical.go +++ b/types/canonical.go @@ -3,8 +3,8 @@ package types import ( "time" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) // Canonical* wraps the structs in types for amino encoding them for use in SignBytes / the Signable interface. diff --git a/types/genesis.go b/types/genesis.go index 40e0cf11e..47580d5f7 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -11,7 +11,7 @@ import ( "github.com/tendermint/tendermint/crypto" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmjson "github.com/tendermint/tendermint/libs/json" - tmtime "github.com/tendermint/tendermint/types/time" + tmtime "github.com/tendermint/tendermint/libs/time" ) const ( diff --git a/types/genesis_test.go b/types/genesis_test.go index bfb122e64..7fb3088dd 100644 --- a/types/genesis_test.go +++ b/types/genesis_test.go @@ -10,7 +10,7 @@ import ( "github.com/tendermint/tendermint/crypto/ed25519" tmjson "github.com/tendermint/tendermint/libs/json" - tmtime "github.com/tendermint/tendermint/types/time" + tmtime "github.com/tendermint/tendermint/libs/time" ) func TestGenesisBad(t *testing.T) { diff --git a/types/proposal.go b/types/proposal.go index 7b106a750..450cc2a43 100644 --- a/types/proposal.go +++ b/types/proposal.go @@ -7,8 +7,8 @@ import ( "github.com/tendermint/tendermint/internal/libs/protoio" tmbytes "github.com/tendermint/tendermint/libs/bytes" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) var ( diff --git a/types/vote_set_test.go b/types/vote_set_test.go index ef009aacc..542665e2d 100644 --- a/types/vote_set_test.go +++ b/types/vote_set_test.go @@ -11,8 +11,8 @@ import ( "github.com/tendermint/tendermint/crypto" tmrand "github.com/tendermint/tendermint/libs/rand" + tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) func TestVoteSet_AddVote_Good(t *testing.T) {