From a855f96946574e17cf7280841ca9bea4a7d0ca61 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 8 Jun 2021 08:17:09 -0400 Subject: [PATCH] p2p: renames for reactors and routing layer internal moves (#6547) --- cmd/tendermint/commands/gen_node_key.go | 2 +- cmd/tendermint/commands/init.go | 2 +- cmd/tendermint/commands/probe_upnp.go | 2 +- cmd/tendermint/commands/replay.go | 3 +-- cmd/tendermint/commands/show_node_id.go | 2 +- cmd/tendermint/commands/testnet.go | 2 +- crypto/secp256k1/secp256k1.go | 5 +++-- docs/architecture/adr-060-go-api-stability.md | 6 +++--- docs/tutorials/go-built-in.md | 2 +- {blockchain => internal/blockchain}/doc.go | 0 {blockchain => internal/blockchain}/msgs.go | 0 .../blockchain}/v0/pool.go | 2 +- .../blockchain}/v0/pool_test.go | 2 +- .../blockchain}/v0/reactor.go | 4 ++-- .../blockchain}/v0/reactor_test.go | 6 +++--- .../blockchain}/v0/test_util.go | 0 .../blockchain}/v2/internal/behavior/doc.go | 0 .../v2/internal/behavior/peer_behaviour.go | 2 +- .../v2/internal/behavior/reporter.go | 2 +- .../v2/internal/behavior/reporter_test.go | 4 ++-- {blockchain => internal/blockchain}/v2/io.go | 2 +- .../blockchain}/v2/metrics.go | 0 .../blockchain}/v2/processor.go | 2 +- .../blockchain}/v2/processor_context.go | 0 .../blockchain}/v2/processor_test.go | 2 +- .../blockchain}/v2/reactor.go | 6 +++--- .../blockchain}/v2/reactor_test.go | 8 ++++---- .../blockchain}/v2/routine.go | 0 .../blockchain}/v2/routine_test.go | 0 .../blockchain}/v2/scheduler.go | 2 +- .../blockchain}/v2/scheduler_test.go | 2 +- .../blockchain}/v2/types.go | 0 {consensus => internal/consensus}/README.md | 0 .../consensus}/byzantine_test.go | 6 +++--- .../consensus}/common_test.go | 4 ++-- .../consensus}/invalid_test.go | 2 +- .../consensus}/mempool_test.go | 2 +- {consensus => internal/consensus}/metrics.go | 0 {consensus => internal/consensus}/msgs.go | 4 ++-- .../consensus}/msgs_test.go | 4 ++-- .../consensus}/peer_state.go | 4 ++-- {consensus => internal/consensus}/reactor.go | 4 ++-- .../consensus}/reactor_test.go | 8 ++++---- {consensus => internal/consensus}/replay.go | 0 .../consensus}/replay_file.go | 0 .../consensus}/replay_stubs.go | 2 +- .../consensus}/replay_test.go | 2 +- {consensus => internal/consensus}/state.go | 4 ++-- .../consensus}/state_test.go | 4 ++-- {consensus => internal/consensus}/ticker.go | 0 .../consensus}/types/height_vote_set.go | 2 +- .../consensus}/types/height_vote_set_test.go | 0 .../consensus}/types/peer_round_state.go | 0 .../consensus}/types/peer_round_state_test.go | 0 .../consensus}/types/round_state.go | 0 {consensus => internal/consensus}/wal.go | 0 {consensus => internal/consensus}/wal_fuzz.go | 0 .../consensus}/wal_generator.go | 0 {consensus => internal/consensus}/wal_test.go | 2 +- {evidence => internal/evidence}/doc.go | 0 .../evidence}/mocks/block_store.go | 0 {evidence => internal/evidence}/pool.go | 0 {evidence => internal/evidence}/pool_test.go | 4 ++-- {evidence => internal/evidence}/reactor.go | 2 +- .../evidence}/reactor_test.go | 8 ++++---- {evidence => internal/evidence}/services.go | 0 {evidence => internal/evidence}/verify.go | 0 .../evidence}/verify_test.go | 4 ++-- {mempool => internal/mempool}/cache.go | 0 .../mempool}/cache_bench_test.go | 0 {mempool => internal/mempool}/cache_test.go | 0 {mempool => internal/mempool}/errors.go | 0 {mempool => internal/mempool}/ids.go | 2 +- {mempool => internal/mempool}/ids_test.go | 2 +- {mempool => internal/mempool}/mempool.go | 2 +- {mempool => internal/mempool}/metrics.go | 0 {mempool => internal/mempool}/mock/mempool.go | 2 +- {mempool => internal/mempool}/tx.go | 2 +- .../mempool}/v0/bench_test.go | 2 +- .../mempool}/v0/cache_test.go | 2 +- .../mempool}/v0/clist_mempool.go | 4 ++-- .../mempool}/v0/clist_mempool_test.go | 2 +- {mempool => internal/mempool}/v0/doc.go | 0 {mempool => internal/mempool}/v0/reactor.go | 4 ++-- .../mempool}/v0/reactor_test.go | 6 +++--- {mempool => internal/mempool}/v1/mempool.go | 2 +- .../mempool}/v1/mempool_bench_test.go | 2 +- .../mempool}/v1/mempool_test.go | 2 +- .../mempool}/v1/priority_queue.go | 0 .../mempool}/v1/priority_queue_test.go | 0 {mempool => internal/mempool}/v1/reactor.go | 4 ++-- {mempool => internal/mempool}/v1/tx.go | 2 +- {mempool => internal/mempool}/v1/tx_test.go | 2 +- {p2p => internal/p2p}/README.md | 0 {p2p => internal/p2p}/address.go | 0 {p2p => internal/p2p}/address_test.go | 2 +- {p2p => internal/p2p}/base_reactor.go | 2 +- {p2p => internal/p2p}/conn/conn_go110.go | 0 {p2p => internal/p2p}/conn/conn_notgo110.go | 0 {p2p => internal/p2p}/conn/connection.go | 0 {p2p => internal/p2p}/conn/connection_test.go | 0 .../p2p}/conn/evil_secret_connection_test.go | 0 .../p2p}/conn/secret_connection.go | 0 .../p2p}/conn/secret_connection_test.go | 0 ...TestDeriveSecretsAndChallengeGolden.golden | 0 {p2p => internal/p2p}/conn_set.go | 0 {p2p => internal/p2p}/conn_tracker.go | 0 {p2p => internal/p2p}/conn_tracker_test.go | 0 {p2p => internal/p2p}/errors.go | 0 {p2p => internal/p2p}/key.go | 0 {p2p => internal/p2p}/key_test.go | 2 +- {p2p => internal/p2p}/metrics.go | 0 {p2p => internal/p2p}/mock/peer.go | 4 ++-- {p2p => internal/p2p}/mock/reactor.go | 4 ++-- {p2p => internal/p2p}/mocks/connection.go | 6 +++--- {p2p => internal/p2p}/mocks/peer.go | 4 ++-- {p2p => internal/p2p}/mocks/transport.go | 4 ++-- {p2p => internal/p2p}/netaddress.go | 0 {p2p => internal/p2p}/netaddress_test.go | 0 {p2p => internal/p2p}/node_info.go | 0 {p2p => internal/p2p}/node_info_test.go | 0 {p2p => internal/p2p}/p2p_test.go | 2 +- {p2p => internal/p2p}/p2ptest/network.go | 2 +- {p2p => internal/p2p}/p2ptest/require.go | 2 +- {p2p => internal/p2p}/p2ptest/util.go | 2 +- {p2p => internal/p2p}/peer.go | 2 +- {p2p => internal/p2p}/peer_set.go | 0 {p2p => internal/p2p}/peer_set_test.go | 0 {p2p => internal/p2p}/peer_test.go | 2 +- {p2p => internal/p2p}/peermanager.go | 0 .../p2p}/peermanager_scoring_test.go | 0 {p2p => internal/p2p}/peermanager_test.go | 2 +- {p2p => internal/p2p}/pex/addrbook.go | 2 +- {p2p => internal/p2p}/pex/addrbook_test.go | 2 +- {p2p => internal/p2p}/pex/bench_test.go | 2 +- {p2p => internal/p2p}/pex/errors.go | 2 +- {p2p => internal/p2p}/pex/file.go | 0 {p2p => internal/p2p}/pex/known_address.go | 2 +- {p2p => internal/p2p}/pex/params.go | 0 {p2p => internal/p2p}/pex/pex_reactor.go | 4 ++-- {p2p => internal/p2p}/pex/pex_reactor_test.go | 4 ++-- {p2p => internal/p2p}/pex/reactor.go | 4 ++-- {p2p => internal/p2p}/pex/reactor_test.go | 6 +++--- {p2p => internal/p2p}/pqueue.go | 0 {p2p => internal/p2p}/queue.go | 0 {p2p => internal/p2p}/router.go | 0 {p2p => internal/p2p}/router_filter_test.go | 0 {p2p => internal/p2p}/router_init_test.go | 0 {p2p => internal/p2p}/router_test.go | 6 +++--- {p2p => internal/p2p}/shim.go | 0 {p2p => internal/p2p}/shim_test.go | 4 ++-- {p2p => internal/p2p}/switch.go | 2 +- {p2p => internal/p2p}/switch_test.go | 2 +- {p2p => internal/p2p}/test_util.go | 2 +- {p2p => internal/p2p}/transport.go | 2 +- {p2p => internal/p2p}/transport_mconn.go | 2 +- {p2p => internal/p2p}/transport_mconn_test.go | 4 ++-- {p2p => internal/p2p}/transport_memory.go | 2 +- .../p2p}/transport_memory_test.go | 2 +- {p2p => internal/p2p}/transport_test.go | 2 +- {p2p => internal/p2p}/trust/config.go | 0 {p2p => internal/p2p}/trust/metric.go | 0 {p2p => internal/p2p}/trust/metric_test.go | 0 {p2p => internal/p2p}/trust/store.go | 0 {p2p => internal/p2p}/trust/store_test.go | 0 {p2p => internal/p2p}/trust/ticker.go | 0 {p2p => internal/p2p}/types.go | 2 +- {p2p => internal/p2p}/upnp/probe.go | 0 {p2p => internal/p2p}/upnp/upnp.go | 0 {p2p => internal/p2p}/wdrr_queue.go | 0 {p2p => internal/p2p}/wdrr_queue_test.go | 0 {statesync => internal/statesync}/chunks.go | 2 +- .../statesync}/chunks_test.go | 2 +- .../statesync}/mocks/state_provider.go | 0 {statesync => internal/statesync}/reactor.go | 2 +- .../statesync}/reactor_test.go | 4 ++-- .../statesync}/snapshots.go | 2 +- .../statesync}/snapshots_test.go | 4 ++-- .../statesync}/stateprovider.go | 0 {statesync => internal/statesync}/syncer.go | 2 +- .../statesync}/syncer_test.go | 4 ++-- node/node.go | 12 +++++------ node/node_test.go | 8 ++++---- node/public.go | 2 +- node/setup.go | 20 +++++++++---------- rpc/client/rpc_test.go | 2 +- rpc/core/consensus.go | 2 +- rpc/core/env.go | 6 +++--- rpc/core/mempool.go | 2 +- rpc/core/net.go | 2 +- rpc/core/net_test.go | 2 +- rpc/core/types/responses.go | 2 +- rpc/core/types/responses_test.go | 2 +- scripts/json2wal/main.go | 2 +- scripts/wal2json/main.go | 2 +- state/execution.go | 2 +- state/execution_test.go | 2 +- state/tx_filter.go | 2 +- state/validation_test.go | 2 +- test/e2e/app/main.go | 2 +- test/e2e/runner/setup.go | 2 +- test/fuzz/mempool/checktx.go | 4 ++-- test/fuzz/p2p/addrbook/fuzz.go | 4 ++-- test/fuzz/p2p/addrbook/init-corpus/main.go | 2 +- test/fuzz/p2p/pex/init-corpus/main.go | 2 +- test/fuzz/p2p/pex/reactor_receive.go | 4 ++-- test/fuzz/p2p/secret_connection/read_write.go | 2 +- 207 files changed, 204 insertions(+), 204 deletions(-) rename {blockchain => internal/blockchain}/doc.go (100%) rename {blockchain => internal/blockchain}/msgs.go (100%) rename {blockchain => internal/blockchain}/v0/pool.go (99%) rename {blockchain => internal/blockchain}/v0/pool_test.go (99%) rename {blockchain => internal/blockchain}/v0/reactor.go (99%) rename {blockchain => internal/blockchain}/v0/reactor_test.go (98%) rename {blockchain => internal/blockchain}/v0/test_util.go (100%) rename {blockchain => internal/blockchain}/v2/internal/behavior/doc.go (100%) rename {blockchain => internal/blockchain}/v2/internal/behavior/peer_behaviour.go (96%) rename {blockchain => internal/blockchain}/v2/internal/behavior/reporter.go (97%) rename {blockchain => internal/blockchain}/v2/internal/behavior/reporter_test.go (97%) rename {blockchain => internal/blockchain}/v2/io.go (98%) rename {blockchain => internal/blockchain}/v2/metrics.go (100%) rename {blockchain => internal/blockchain}/v2/processor.go (99%) rename {blockchain => internal/blockchain}/v2/processor_context.go (100%) rename {blockchain => internal/blockchain}/v2/processor_test.go (99%) rename {blockchain => internal/blockchain}/v2/reactor.go (98%) rename {blockchain => internal/blockchain}/v2/reactor_test.go (98%) rename {blockchain => internal/blockchain}/v2/routine.go (100%) rename {blockchain => internal/blockchain}/v2/routine_test.go (100%) rename {blockchain => internal/blockchain}/v2/scheduler.go (99%) rename {blockchain => internal/blockchain}/v2/scheduler_test.go (99%) rename {blockchain => internal/blockchain}/v2/types.go (100%) rename {consensus => internal/consensus}/README.md (100%) rename {consensus => internal/consensus}/byzantine_test.go (99%) rename {consensus => internal/consensus}/common_test.go (99%) rename {consensus => internal/consensus}/invalid_test.go (98%) rename {consensus => internal/consensus}/mempool_test.go (99%) rename {consensus => internal/consensus}/metrics.go (100%) rename {consensus => internal/consensus}/msgs.go (99%) rename {consensus => internal/consensus}/msgs_test.go (99%) rename {consensus => internal/consensus}/peer_state.go (99%) rename {consensus => internal/consensus}/reactor.go (99%) rename {consensus => internal/consensus}/reactor_test.go (98%) rename {consensus => internal/consensus}/replay.go (100%) rename {consensus => internal/consensus}/replay_file.go (100%) rename {consensus => internal/consensus}/replay_stubs.go (97%) rename {consensus => internal/consensus}/replay_test.go (99%) rename {consensus => internal/consensus}/state.go (99%) rename {consensus => internal/consensus}/state_test.go (99%) rename {consensus => internal/consensus}/ticker.go (100%) rename {consensus => internal/consensus}/types/height_vote_set.go (99%) rename {consensus => internal/consensus}/types/height_vote_set_test.go (100%) rename {consensus => internal/consensus}/types/peer_round_state.go (100%) rename {consensus => internal/consensus}/types/peer_round_state_test.go (100%) rename {consensus => internal/consensus}/types/round_state.go (100%) rename {consensus => internal/consensus}/wal.go (100%) rename {consensus => internal/consensus}/wal_fuzz.go (100%) rename {consensus => internal/consensus}/wal_generator.go (100%) rename {consensus => internal/consensus}/wal_test.go (99%) rename {evidence => internal/evidence}/doc.go (100%) rename {evidence => internal/evidence}/mocks/block_store.go (100%) rename {evidence => internal/evidence}/pool.go (100%) rename {evidence => internal/evidence}/pool_test.go (99%) rename {evidence => internal/evidence}/reactor.go (99%) rename {evidence => internal/evidence}/reactor_test.go (98%) rename {evidence => internal/evidence}/services.go (100%) rename {evidence => internal/evidence}/verify.go (100%) rename {evidence => internal/evidence}/verify_test.go (99%) rename {mempool => internal/mempool}/cache.go (100%) rename {mempool => internal/mempool}/cache_bench_test.go (100%) rename {mempool => internal/mempool}/cache_test.go (100%) rename {mempool => internal/mempool}/errors.go (100%) rename {mempool => internal/mempool}/ids.go (97%) rename {mempool => internal/mempool}/ids_test.go (90%) rename {mempool => internal/mempool}/mempool.go (98%) rename {mempool => internal/mempool}/metrics.go (100%) rename {mempool => internal/mempool}/mock/mempool.go (95%) rename {mempool => internal/mempool}/tx.go (94%) rename {mempool => internal/mempool}/v0/bench_test.go (97%) rename {mempool => internal/mempool}/v0/cache_test.go (98%) rename {mempool => internal/mempool}/v0/clist_mempool.go (99%) rename {mempool => internal/mempool}/v0/clist_mempool_test.go (99%) rename {mempool => internal/mempool}/v0/doc.go (100%) rename {mempool => internal/mempool}/v0/reactor.go (99%) rename {mempool => internal/mempool}/v0/reactor_test.go (98%) rename {mempool => internal/mempool}/v1/mempool.go (99%) rename {mempool => internal/mempool}/v1/mempool_bench_test.go (91%) rename {mempool => internal/mempool}/v1/mempool_test.go (99%) rename {mempool => internal/mempool}/v1/priority_queue.go (100%) rename {mempool => internal/mempool}/v1/priority_queue_test.go (100%) rename {mempool => internal/mempool}/v1/reactor.go (99%) rename {mempool => internal/mempool}/v1/tx.go (99%) rename {mempool => internal/mempool}/v1/tx_test.go (97%) rename {p2p => internal/p2p}/README.md (100%) rename {p2p => internal/p2p}/address.go (100%) rename {p2p => internal/p2p}/address_test.go (99%) rename {p2p => internal/p2p}/base_reactor.go (98%) rename {p2p => internal/p2p}/conn/conn_go110.go (100%) rename {p2p => internal/p2p}/conn/conn_notgo110.go (100%) rename {p2p => internal/p2p}/conn/connection.go (100%) rename {p2p => internal/p2p}/conn/connection_test.go (100%) rename {p2p => internal/p2p}/conn/evil_secret_connection_test.go (100%) rename {p2p => internal/p2p}/conn/secret_connection.go (100%) rename {p2p => internal/p2p}/conn/secret_connection_test.go (100%) rename {p2p => internal/p2p}/conn/testdata/TestDeriveSecretsAndChallengeGolden.golden (100%) rename {p2p => internal/p2p}/conn_set.go (100%) rename {p2p => internal/p2p}/conn_tracker.go (100%) rename {p2p => internal/p2p}/conn_tracker_test.go (100%) rename {p2p => internal/p2p}/errors.go (100%) rename {p2p => internal/p2p}/key.go (100%) rename {p2p => internal/p2p}/key_test.go (95%) rename {p2p => internal/p2p}/metrics.go (100%) rename {p2p => internal/p2p}/mock/peer.go (95%) rename {p2p => internal/p2p}/mock/reactor.go (84%) rename {p2p => internal/p2p}/mocks/connection.go (96%) rename {p2p => internal/p2p}/mocks/peer.go (98%) rename {p2p => internal/p2p}/mocks/transport.go (95%) rename {p2p => internal/p2p}/netaddress.go (100%) rename {p2p => internal/p2p}/netaddress_test.go (100%) rename {p2p => internal/p2p}/node_info.go (100%) rename {p2p => internal/p2p}/node_info_test.go (100%) rename {p2p => internal/p2p}/p2p_test.go (95%) rename {p2p => internal/p2p}/p2ptest/network.go (99%) rename {p2p => internal/p2p}/p2ptest/require.go (98%) rename {p2p => internal/p2p}/p2ptest/util.go (86%) rename {p2p => internal/p2p}/peer.go (99%) rename {p2p => internal/p2p}/peer_set.go (100%) rename {p2p => internal/p2p}/peer_set_test.go (100%) rename {p2p => internal/p2p}/peer_test.go (98%) rename {p2p => internal/p2p}/peermanager.go (100%) rename {p2p => internal/p2p}/peermanager_scoring_test.go (100%) rename {p2p => internal/p2p}/peermanager_test.go (99%) rename {p2p => internal/p2p}/pex/addrbook.go (99%) rename {p2p => internal/p2p}/pex/addrbook_test.go (99%) rename {p2p => internal/p2p}/pex/bench_test.go (90%) rename {p2p => internal/p2p}/pex/errors.go (97%) rename {p2p => internal/p2p}/pex/file.go (100%) rename {p2p => internal/p2p}/pex/known_address.go (98%) rename {p2p => internal/p2p}/pex/params.go (100%) rename {p2p => internal/p2p}/pex/pex_reactor.go (99%) rename {p2p => internal/p2p}/pex/pex_reactor_test.go (99%) rename {p2p => internal/p2p}/pex/reactor.go (99%) rename {p2p => internal/p2p}/pex/reactor_test.go (99%) rename {p2p => internal/p2p}/pqueue.go (100%) rename {p2p => internal/p2p}/queue.go (100%) rename {p2p => internal/p2p}/router.go (100%) rename {p2p => internal/p2p}/router_filter_test.go (100%) rename {p2p => internal/p2p}/router_init_test.go (100%) rename {p2p => internal/p2p}/router_test.go (99%) rename {p2p => internal/p2p}/shim.go (100%) rename {p2p => internal/p2p}/shim_test.go (97%) rename {p2p => internal/p2p}/switch.go (99%) rename {p2p => internal/p2p}/switch_test.go (99%) rename {p2p => internal/p2p}/test_util.go (99%) rename {p2p => internal/p2p}/transport.go (99%) rename {p2p => internal/p2p}/transport_mconn.go (99%) rename {p2p => internal/p2p}/transport_mconn_test.go (98%) rename {p2p => internal/p2p}/transport_memory.go (99%) rename {p2p => internal/p2p}/transport_memory_test.go (94%) rename {p2p => internal/p2p}/transport_test.go (99%) rename {p2p => internal/p2p}/trust/config.go (100%) rename {p2p => internal/p2p}/trust/metric.go (100%) rename {p2p => internal/p2p}/trust/metric_test.go (100%) rename {p2p => internal/p2p}/trust/store.go (100%) rename {p2p => internal/p2p}/trust/store_test.go (100%) rename {p2p => internal/p2p}/trust/ticker.go (100%) rename {p2p => internal/p2p}/types.go (68%) rename {p2p => internal/p2p}/upnp/probe.go (100%) rename {p2p => internal/p2p}/upnp/upnp.go (100%) rename {p2p => internal/p2p}/wdrr_queue.go (100%) rename {p2p => internal/p2p}/wdrr_queue_test.go (100%) rename {statesync => internal/statesync}/chunks.go (99%) rename {statesync => internal/statesync}/chunks_test.go (99%) rename {statesync => internal/statesync}/mocks/state_provider.go (100%) rename {statesync => internal/statesync}/reactor.go (99%) rename {statesync => internal/statesync}/reactor_test.go (98%) rename {statesync => internal/statesync}/snapshots.go (99%) rename {statesync => internal/statesync}/snapshots_test.go (98%) rename {statesync => internal/statesync}/stateprovider.go (100%) rename {statesync => internal/statesync}/syncer.go (99%) rename {statesync => internal/statesync}/syncer_test.go (99%) diff --git a/cmd/tendermint/commands/gen_node_key.go b/cmd/tendermint/commands/gen_node_key.go index 3216a6256..472a82fa3 100644 --- a/cmd/tendermint/commands/gen_node_key.go +++ b/cmd/tendermint/commands/gen_node_key.go @@ -5,8 +5,8 @@ import ( "github.com/spf13/cobra" + "github.com/tendermint/tendermint/internal/p2p" tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/p2p" ) // GenNodeKeyCmd allows the generation of a node key. It prints JSON-encoded diff --git a/cmd/tendermint/commands/init.go b/cmd/tendermint/commands/init.go index 99a59773c..75e6a020e 100644 --- a/cmd/tendermint/commands/init.go +++ b/cmd/tendermint/commands/init.go @@ -8,9 +8,9 @@ import ( "github.com/spf13/cobra" cfg "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/p2p" tmos "github.com/tendermint/tendermint/libs/os" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" diff --git a/cmd/tendermint/commands/probe_upnp.go b/cmd/tendermint/commands/probe_upnp.go index 7d0193c84..4471024f9 100644 --- a/cmd/tendermint/commands/probe_upnp.go +++ b/cmd/tendermint/commands/probe_upnp.go @@ -5,8 +5,8 @@ import ( "github.com/spf13/cobra" + "github.com/tendermint/tendermint/internal/p2p/upnp" tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/p2p/upnp" ) // ProbeUpnpCmd adds capabilities to test the UPnP functionality. diff --git a/cmd/tendermint/commands/replay.go b/cmd/tendermint/commands/replay.go index 5de8d0d3e..6e736bca2 100644 --- a/cmd/tendermint/commands/replay.go +++ b/cmd/tendermint/commands/replay.go @@ -2,8 +2,7 @@ package commands import ( "github.com/spf13/cobra" - - "github.com/tendermint/tendermint/consensus" + "github.com/tendermint/tendermint/internal/consensus" ) // ReplayCmd allows replaying of messages from the WAL. diff --git a/cmd/tendermint/commands/show_node_id.go b/cmd/tendermint/commands/show_node_id.go index 248afdd82..192de74ee 100644 --- a/cmd/tendermint/commands/show_node_id.go +++ b/cmd/tendermint/commands/show_node_id.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // ShowNodeIDCmd dumps node's ID to the standard output. diff --git a/cmd/tendermint/commands/testnet.go b/cmd/tendermint/commands/testnet.go index 0090ec0a6..4f453edb6 100644 --- a/cmd/tendermint/commands/testnet.go +++ b/cmd/tendermint/commands/testnet.go @@ -12,9 +12,9 @@ import ( "github.com/spf13/viper" cfg "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/bytes" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" diff --git a/crypto/secp256k1/secp256k1.go b/crypto/secp256k1/secp256k1.go index fa387e355..dfe34ae10 100644 --- a/crypto/secp256k1/secp256k1.go +++ b/crypto/secp256k1/secp256k1.go @@ -9,10 +9,11 @@ import ( "math/big" secp256k1 "github.com/btcsuite/btcd/btcec" - "golang.org/x/crypto/ripemd160" // nolint: staticcheck // necessary for Bitcoin address format - "github.com/tendermint/tendermint/crypto" tmjson "github.com/tendermint/tendermint/libs/json" + + // necessary for Bitcoin address format + "golang.org/x/crypto/ripemd160" // nolint: staticcheck ) //------------------------------------- diff --git a/docs/architecture/adr-060-go-api-stability.md b/docs/architecture/adr-060-go-api-stability.md index 112cf4ad0..d900733b7 100644 --- a/docs/architecture/adr-060-go-api-stability.md +++ b/docs/architecture/adr-060-go-api-stability.md @@ -59,7 +59,7 @@ When preparing our public API for 1.0, we should keep these principles in mind: The following is the minimum set of public APIs that will be included in 1.0, in some form: - `abci` -- `node` and related packages (e.g. possibly `config`, `libs/log`, and `version`) +- packages used for constructing nodes `config`, `libs/log`, and `version` - Client APIs, i.e. `rpc/client`, `light`, and `privval`. - `crypto` (possibly as a separate repo) @@ -91,9 +91,9 @@ For comparison, the following are the number of Tendermint imports in the Cosmos 4 github.com/tendermint/tendermint/libs/rand 1 github.com/tendermint/tendermint/libs/strings 5 github.com/tendermint/tendermint/light - 1 github.com/tendermint/tendermint/mempool + 1 github.com/tendermint/tendermint/internal/mempool 3 github.com/tendermint/tendermint/node - 5 github.com/tendermint/tendermint/p2p + 5 github.com/tendermint/tendermint/internal/p2p 4 github.com/tendermint/tendermint/privval 10 github.com/tendermint/tendermint/proto/tendermint/crypto 1 github.com/tendermint/tendermint/proto/tendermint/libs/bits diff --git a/docs/tutorials/go-built-in.md b/docs/tutorials/go-built-in.md index 040891637..f69f679e3 100644 --- a/docs/tutorials/go-built-in.md +++ b/docs/tutorials/go-built-in.md @@ -351,7 +351,7 @@ import ( tmflags "github.com/tendermint/tendermint/libs/cli/flags" "github.com/tendermint/tendermint/libs/log" nm "github.com/tendermint/tendermint/node" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/proxy" ) diff --git a/blockchain/doc.go b/internal/blockchain/doc.go similarity index 100% rename from blockchain/doc.go rename to internal/blockchain/doc.go diff --git a/blockchain/msgs.go b/internal/blockchain/msgs.go similarity index 100% rename from blockchain/msgs.go rename to internal/blockchain/msgs.go diff --git a/blockchain/v0/pool.go b/internal/blockchain/v0/pool.go similarity index 99% rename from blockchain/v0/pool.go rename to internal/blockchain/v0/pool.go index 829c4d720..fd5b3f696 100644 --- a/blockchain/v0/pool.go +++ b/internal/blockchain/v0/pool.go @@ -9,9 +9,9 @@ import ( flow "github.com/tendermint/tendermint/internal/libs/flowrate" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v0/pool_test.go b/internal/blockchain/v0/pool_test.go similarity index 99% rename from blockchain/v0/pool_test.go rename to internal/blockchain/v0/pool_test.go index 40780710a..d76d89928 100644 --- a/blockchain/v0/pool_test.go +++ b/internal/blockchain/v0/pool_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v0/reactor.go b/internal/blockchain/v0/reactor.go similarity index 99% rename from blockchain/v0/reactor.go rename to internal/blockchain/v0/reactor.go index 57d8272ab..8dec338c3 100644 --- a/blockchain/v0/reactor.go +++ b/internal/blockchain/v0/reactor.go @@ -5,10 +5,10 @@ import ( "sync" "time" - bc "github.com/tendermint/tendermint/blockchain" + bc "github.com/tendermint/tendermint/internal/blockchain" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/store" diff --git a/blockchain/v0/reactor_test.go b/internal/blockchain/v0/reactor_test.go similarity index 98% rename from blockchain/v0/reactor_test.go rename to internal/blockchain/v0/reactor_test.go index 106dbb4b6..f1b73ed3d 100644 --- a/blockchain/v0/reactor_test.go +++ b/internal/blockchain/v0/reactor_test.go @@ -9,11 +9,11 @@ import ( abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/mempool/mock" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/p2ptest" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/mempool/mock" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/p2ptest" bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" diff --git a/blockchain/v0/test_util.go b/internal/blockchain/v0/test_util.go similarity index 100% rename from blockchain/v0/test_util.go rename to internal/blockchain/v0/test_util.go diff --git a/blockchain/v2/internal/behavior/doc.go b/internal/blockchain/v2/internal/behavior/doc.go similarity index 100% rename from blockchain/v2/internal/behavior/doc.go rename to internal/blockchain/v2/internal/behavior/doc.go diff --git a/blockchain/v2/internal/behavior/peer_behaviour.go b/internal/blockchain/v2/internal/behavior/peer_behaviour.go similarity index 96% rename from blockchain/v2/internal/behavior/peer_behaviour.go rename to internal/blockchain/v2/internal/behavior/peer_behaviour.go index 9021e491c..026e1296b 100644 --- a/blockchain/v2/internal/behavior/peer_behaviour.go +++ b/internal/blockchain/v2/internal/behavior/peer_behaviour.go @@ -1,7 +1,7 @@ package behavior import ( - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // PeerBehavior is a struct describing a behavior a peer performed. diff --git a/blockchain/v2/internal/behavior/reporter.go b/internal/blockchain/v2/internal/behavior/reporter.go similarity index 97% rename from blockchain/v2/internal/behavior/reporter.go rename to internal/blockchain/v2/internal/behavior/reporter.go index 8b92bd1be..a4455ad51 100644 --- a/blockchain/v2/internal/behavior/reporter.go +++ b/internal/blockchain/v2/internal/behavior/reporter.go @@ -4,7 +4,7 @@ import ( "errors" tmsync "github.com/tendermint/tendermint/internal/libs/sync" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // Reporter provides an interface for reactors to report the behavior diff --git a/blockchain/v2/internal/behavior/reporter_test.go b/internal/blockchain/v2/internal/behavior/reporter_test.go similarity index 97% rename from blockchain/v2/internal/behavior/reporter_test.go rename to internal/blockchain/v2/internal/behavior/reporter_test.go index 1d81bd36f..3ba241e74 100644 --- a/blockchain/v2/internal/behavior/reporter_test.go +++ b/internal/blockchain/v2/internal/behavior/reporter_test.go @@ -4,8 +4,8 @@ import ( "sync" "testing" - bh "github.com/tendermint/tendermint/blockchain/v2/internal/behavior" - "github.com/tendermint/tendermint/p2p" + bh "github.com/tendermint/tendermint/internal/blockchain/v2/internal/behavior" + "github.com/tendermint/tendermint/internal/p2p" ) // TestMockReporter tests the MockReporter's ability to store reported diff --git a/blockchain/v2/io.go b/internal/blockchain/v2/io.go similarity index 98% rename from blockchain/v2/io.go rename to internal/blockchain/v2/io.go index d1c7c2256..8d02c408e 100644 --- a/blockchain/v2/io.go +++ b/internal/blockchain/v2/io.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/gogo/protobuf/proto" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" diff --git a/blockchain/v2/metrics.go b/internal/blockchain/v2/metrics.go similarity index 100% rename from blockchain/v2/metrics.go rename to internal/blockchain/v2/metrics.go diff --git a/blockchain/v2/processor.go b/internal/blockchain/v2/processor.go similarity index 99% rename from blockchain/v2/processor.go rename to internal/blockchain/v2/processor.go index c25386cdc..c74f9ca9f 100644 --- a/blockchain/v2/processor.go +++ b/internal/blockchain/v2/processor.go @@ -3,7 +3,7 @@ package v2 import ( "fmt" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" tmState "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v2/processor_context.go b/internal/blockchain/v2/processor_context.go similarity index 100% rename from blockchain/v2/processor_context.go rename to internal/blockchain/v2/processor_context.go diff --git a/blockchain/v2/processor_test.go b/internal/blockchain/v2/processor_test.go similarity index 99% rename from blockchain/v2/processor_test.go rename to internal/blockchain/v2/processor_test.go index c2e4ef458..133762caa 100644 --- a/blockchain/v2/processor_test.go +++ b/internal/blockchain/v2/processor_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" tmState "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v2/reactor.go b/internal/blockchain/v2/reactor.go similarity index 98% rename from blockchain/v2/reactor.go rename to internal/blockchain/v2/reactor.go index 394ba2b5b..5ce08c7d0 100644 --- a/blockchain/v2/reactor.go +++ b/internal/blockchain/v2/reactor.go @@ -7,11 +7,11 @@ import ( proto "github.com/gogo/protobuf/proto" - bc "github.com/tendermint/tendermint/blockchain" - "github.com/tendermint/tendermint/blockchain/v2/internal/behavior" + bc "github.com/tendermint/tendermint/internal/blockchain" + "github.com/tendermint/tendermint/internal/blockchain/v2/internal/behavior" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" diff --git a/blockchain/v2/reactor_test.go b/internal/blockchain/v2/reactor_test.go similarity index 98% rename from blockchain/v2/reactor_test.go rename to internal/blockchain/v2/reactor_test.go index 477b09f45..b034dab51 100644 --- a/blockchain/v2/reactor_test.go +++ b/internal/blockchain/v2/reactor_test.go @@ -14,14 +14,14 @@ import ( dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/blockchain/v2/internal/behavior" cfg "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/blockchain/v2/internal/behavior" + "github.com/tendermint/tendermint/internal/mempool/mock" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/mempool/mock" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/conn" bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" diff --git a/blockchain/v2/routine.go b/internal/blockchain/v2/routine.go similarity index 100% rename from blockchain/v2/routine.go rename to internal/blockchain/v2/routine.go diff --git a/blockchain/v2/routine_test.go b/internal/blockchain/v2/routine_test.go similarity index 100% rename from blockchain/v2/routine_test.go rename to internal/blockchain/v2/routine_test.go diff --git a/blockchain/v2/scheduler.go b/internal/blockchain/v2/scheduler.go similarity index 99% rename from blockchain/v2/scheduler.go rename to internal/blockchain/v2/scheduler.go index 1aa9acd3c..b6ec4fbab 100644 --- a/blockchain/v2/scheduler.go +++ b/internal/blockchain/v2/scheduler.go @@ -8,7 +8,7 @@ import ( "sort" "time" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v2/scheduler_test.go b/internal/blockchain/v2/scheduler_test.go similarity index 99% rename from blockchain/v2/scheduler_test.go rename to internal/blockchain/v2/scheduler_test.go index 8bf82c8cf..58e40d2a1 100644 --- a/blockchain/v2/scheduler_test.go +++ b/internal/blockchain/v2/scheduler_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v2/types.go b/internal/blockchain/v2/types.go similarity index 100% rename from blockchain/v2/types.go rename to internal/blockchain/v2/types.go diff --git a/consensus/README.md b/internal/consensus/README.md similarity index 100% rename from consensus/README.md rename to internal/consensus/README.md diff --git a/consensus/byzantine_test.go b/internal/consensus/byzantine_test.go similarity index 99% rename from consensus/byzantine_test.go rename to internal/consensus/byzantine_test.go index 754cc4cb9..5f72527f3 100644 --- a/consensus/byzantine_test.go +++ b/internal/consensus/byzantine_test.go @@ -12,12 +12,12 @@ import ( "github.com/stretchr/testify/require" abcicli "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/evidence" + "github.com/tendermint/tendermint/internal/evidence" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + mempoolv0 "github.com/tendermint/tendermint/internal/mempool/v0" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - mempoolv0 "github.com/tendermint/tendermint/mempool/v0" - "github.com/tendermint/tendermint/p2p" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" diff --git a/consensus/common_test.go b/internal/consensus/common_test.go similarity index 99% rename from consensus/common_test.go rename to internal/consensus/common_test.go index 52f4dc3fe..b2400669d 100644 --- a/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -23,14 +23,14 @@ import ( "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" - cstypes "github.com/tendermint/tendermint/consensus/types" + cstypes "github.com/tendermint/tendermint/internal/consensus/types" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + mempoolv0 "github.com/tendermint/tendermint/internal/mempool/v0" "github.com/tendermint/tendermint/internal/test/factory" tmbytes "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" tmpubsub "github.com/tendermint/tendermint/libs/pubsub" - mempoolv0 "github.com/tendermint/tendermint/mempool/v0" "github.com/tendermint/tendermint/privval" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" diff --git a/consensus/invalid_test.go b/internal/consensus/invalid_test.go similarity index 98% rename from consensus/invalid_test.go rename to internal/consensus/invalid_test.go index 816eafd65..8307ed5cf 100644 --- a/consensus/invalid_test.go +++ b/internal/consensus/invalid_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/bytes" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/p2p" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" diff --git a/consensus/mempool_test.go b/internal/consensus/mempool_test.go similarity index 99% rename from consensus/mempool_test.go rename to internal/consensus/mempool_test.go index ca13507b9..763e87e50 100644 --- a/consensus/mempool_test.go +++ b/internal/consensus/mempool_test.go @@ -15,7 +15,7 @@ import ( "github.com/tendermint/tendermint/abci/example/code" abci "github.com/tendermint/tendermint/abci/types" - mempl "github.com/tendermint/tendermint/mempool" + mempl "github.com/tendermint/tendermint/internal/mempool" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" ) diff --git a/consensus/metrics.go b/internal/consensus/metrics.go similarity index 100% rename from consensus/metrics.go rename to internal/consensus/metrics.go diff --git a/consensus/msgs.go b/internal/consensus/msgs.go similarity index 99% rename from consensus/msgs.go rename to internal/consensus/msgs.go index 60f869123..946dd3c10 100644 --- a/consensus/msgs.go +++ b/internal/consensus/msgs.go @@ -4,11 +4,11 @@ import ( "errors" "fmt" - cstypes "github.com/tendermint/tendermint/consensus/types" + cstypes "github.com/tendermint/tendermint/internal/consensus/types" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/bits" tmjson "github.com/tendermint/tendermint/libs/json" tmmath "github.com/tendermint/tendermint/libs/math" - "github.com/tendermint/tendermint/p2p" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" diff --git a/consensus/msgs_test.go b/internal/consensus/msgs_test.go similarity index 99% rename from consensus/msgs_test.go rename to internal/consensus/msgs_test.go index 953a6355d..b3158a0e2 100644 --- a/consensus/msgs_test.go +++ b/internal/consensus/msgs_test.go @@ -11,14 +11,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - cstypes "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/crypto/merkle" "github.com/tendermint/tendermint/crypto/tmhash" + cstypes "github.com/tendermint/tendermint/internal/consensus/types" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/bits" "github.com/tendermint/tendermint/libs/bytes" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/p2p" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" diff --git a/consensus/peer_state.go b/internal/consensus/peer_state.go similarity index 99% rename from consensus/peer_state.go rename to internal/consensus/peer_state.go index fd720d815..e63831967 100644 --- a/consensus/peer_state.go +++ b/internal/consensus/peer_state.go @@ -6,12 +6,12 @@ import ( "sync" "time" - cstypes "github.com/tendermint/tendermint/consensus/types" + cstypes "github.com/tendermint/tendermint/internal/consensus/types" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/bits" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" diff --git a/consensus/reactor.go b/internal/consensus/reactor.go similarity index 99% rename from consensus/reactor.go rename to internal/consensus/reactor.go index 834fff5bc..d26e94825 100644 --- a/consensus/reactor.go +++ b/internal/consensus/reactor.go @@ -4,13 +4,13 @@ import ( "fmt" "time" - cstypes "github.com/tendermint/tendermint/consensus/types" + cstypes "github.com/tendermint/tendermint/internal/consensus/types" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/bits" tmevents "github.com/tendermint/tendermint/libs/events" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" diff --git a/consensus/reactor_test.go b/internal/consensus/reactor_test.go similarity index 98% rename from consensus/reactor_test.go rename to internal/consensus/reactor_test.go index b4051c9a9..7617eb7b5 100644 --- a/consensus/reactor_test.go +++ b/internal/consensus/reactor_test.go @@ -19,12 +19,12 @@ import ( cfg "github.com/tendermint/tendermint/config" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/mempool" + mempoolv0 "github.com/tendermint/tendermint/internal/mempool/v0" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/p2ptest" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/mempool" - mempoolv0 "github.com/tendermint/tendermint/mempool/v0" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/p2ptest" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" sm "github.com/tendermint/tendermint/state" statemocks "github.com/tendermint/tendermint/state/mocks" diff --git a/consensus/replay.go b/internal/consensus/replay.go similarity index 100% rename from consensus/replay.go rename to internal/consensus/replay.go diff --git a/consensus/replay_file.go b/internal/consensus/replay_file.go similarity index 100% rename from consensus/replay_file.go rename to internal/consensus/replay_file.go diff --git a/consensus/replay_stubs.go b/internal/consensus/replay_stubs.go similarity index 97% rename from consensus/replay_stubs.go rename to internal/consensus/replay_stubs.go index aad99553d..c79340a0c 100644 --- a/consensus/replay_stubs.go +++ b/internal/consensus/replay_stubs.go @@ -5,7 +5,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/libs/clist" - mempl "github.com/tendermint/tendermint/mempool" + mempl "github.com/tendermint/tendermint/internal/mempool" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" diff --git a/consensus/replay_test.go b/internal/consensus/replay_test.go similarity index 99% rename from consensus/replay_test.go rename to internal/consensus/replay_test.go index e7290d6cb..e20fb5209 100644 --- a/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -24,10 +24,10 @@ import ( cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" + mempl "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" tmrand "github.com/tendermint/tendermint/libs/rand" - mempl "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/privval" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" diff --git a/consensus/state.go b/internal/consensus/state.go similarity index 99% rename from consensus/state.go rename to internal/consensus/state.go index 14d9ba945..0f0d80899 100644 --- a/consensus/state.go +++ b/internal/consensus/state.go @@ -13,17 +13,17 @@ import ( "github.com/gogo/protobuf/proto" cfg "github.com/tendermint/tendermint/config" - cstypes "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/crypto" + cstypes "github.com/tendermint/tendermint/internal/consensus/types" "github.com/tendermint/tendermint/internal/libs/fail" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" tmevents "github.com/tendermint/tendermint/libs/events" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" tmos "github.com/tendermint/tendermint/libs/os" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" diff --git a/consensus/state_test.go b/internal/consensus/state_test.go similarity index 99% rename from consensus/state_test.go rename to internal/consensus/state_test.go index 63c75a4a4..a568f4eab 100644 --- a/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -11,12 +11,12 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/abci/example/counter" - cstypes "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/crypto/tmhash" + cstypes "github.com/tendermint/tendermint/internal/consensus/types" + p2pmock "github.com/tendermint/tendermint/internal/p2p/mock" "github.com/tendermint/tendermint/libs/log" tmpubsub "github.com/tendermint/tendermint/libs/pubsub" tmrand "github.com/tendermint/tendermint/libs/rand" - p2pmock "github.com/tendermint/tendermint/p2p/mock" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" ) diff --git a/consensus/ticker.go b/internal/consensus/ticker.go similarity index 100% rename from consensus/ticker.go rename to internal/consensus/ticker.go diff --git a/consensus/types/height_vote_set.go b/internal/consensus/types/height_vote_set.go similarity index 99% rename from consensus/types/height_vote_set.go rename to internal/consensus/types/height_vote_set.go index a9d65a457..68805e09d 100644 --- a/consensus/types/height_vote_set.go +++ b/internal/consensus/types/height_vote_set.go @@ -6,9 +6,9 @@ import ( "strings" "sync" + "github.com/tendermint/tendermint/internal/p2p" tmjson "github.com/tendermint/tendermint/libs/json" tmmath "github.com/tendermint/tendermint/libs/math" - "github.com/tendermint/tendermint/p2p" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" ) diff --git a/consensus/types/height_vote_set_test.go b/internal/consensus/types/height_vote_set_test.go similarity index 100% rename from consensus/types/height_vote_set_test.go rename to internal/consensus/types/height_vote_set_test.go diff --git a/consensus/types/peer_round_state.go b/internal/consensus/types/peer_round_state.go similarity index 100% rename from consensus/types/peer_round_state.go rename to internal/consensus/types/peer_round_state.go diff --git a/consensus/types/peer_round_state_test.go b/internal/consensus/types/peer_round_state_test.go similarity index 100% rename from consensus/types/peer_round_state_test.go rename to internal/consensus/types/peer_round_state_test.go diff --git a/consensus/types/round_state.go b/internal/consensus/types/round_state.go similarity index 100% rename from consensus/types/round_state.go rename to internal/consensus/types/round_state.go diff --git a/consensus/wal.go b/internal/consensus/wal.go similarity index 100% rename from consensus/wal.go rename to internal/consensus/wal.go diff --git a/consensus/wal_fuzz.go b/internal/consensus/wal_fuzz.go similarity index 100% rename from consensus/wal_fuzz.go rename to internal/consensus/wal_fuzz.go diff --git a/consensus/wal_generator.go b/internal/consensus/wal_generator.go similarity index 100% rename from consensus/wal_generator.go rename to internal/consensus/wal_generator.go diff --git a/consensus/wal_test.go b/internal/consensus/wal_test.go similarity index 99% rename from consensus/wal_test.go rename to internal/consensus/wal_test.go index b5538f609..6eb8ca7f7 100644 --- a/consensus/wal_test.go +++ b/internal/consensus/wal_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/crypto/merkle" + "github.com/tendermint/tendermint/internal/consensus/types" "github.com/tendermint/tendermint/internal/libs/autofile" "github.com/tendermint/tendermint/libs/log" tmtypes "github.com/tendermint/tendermint/types" diff --git a/evidence/doc.go b/internal/evidence/doc.go similarity index 100% rename from evidence/doc.go rename to internal/evidence/doc.go diff --git a/evidence/mocks/block_store.go b/internal/evidence/mocks/block_store.go similarity index 100% rename from evidence/mocks/block_store.go rename to internal/evidence/mocks/block_store.go diff --git a/evidence/pool.go b/internal/evidence/pool.go similarity index 100% rename from evidence/pool.go rename to internal/evidence/pool.go diff --git a/evidence/pool_test.go b/internal/evidence/pool_test.go similarity index 99% rename from evidence/pool_test.go rename to internal/evidence/pool_test.go index 251585c39..e3d62e63f 100644 --- a/evidence/pool_test.go +++ b/internal/evidence/pool_test.go @@ -11,8 +11,8 @@ import ( dbm "github.com/tendermint/tm-db" - "github.com/tendermint/tendermint/evidence" - "github.com/tendermint/tendermint/evidence/mocks" + "github.com/tendermint/tendermint/internal/evidence" + "github.com/tendermint/tendermint/internal/evidence/mocks" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" sm "github.com/tendermint/tendermint/state" diff --git a/evidence/reactor.go b/internal/evidence/reactor.go similarity index 99% rename from evidence/reactor.go rename to internal/evidence/reactor.go index 4a0e2a8c8..941c9dbc6 100644 --- a/evidence/reactor.go +++ b/internal/evidence/reactor.go @@ -7,9 +7,9 @@ import ( clist "github.com/tendermint/tendermint/internal/libs/clist" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" ) diff --git a/evidence/reactor_test.go b/internal/evidence/reactor_test.go similarity index 98% rename from evidence/reactor_test.go rename to internal/evidence/reactor_test.go index 0c5bea23b..7fce0974f 100644 --- a/evidence/reactor_test.go +++ b/internal/evidence/reactor_test.go @@ -16,11 +16,11 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/tmhash" - "github.com/tendermint/tendermint/evidence" - "github.com/tendermint/tendermint/evidence/mocks" + "github.com/tendermint/tendermint/internal/evidence" + "github.com/tendermint/tendermint/internal/evidence/mocks" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/p2ptest" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/p2ptest" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" diff --git a/evidence/services.go b/internal/evidence/services.go similarity index 100% rename from evidence/services.go rename to internal/evidence/services.go diff --git a/evidence/verify.go b/internal/evidence/verify.go similarity index 100% rename from evidence/verify.go rename to internal/evidence/verify.go diff --git a/evidence/verify_test.go b/internal/evidence/verify_test.go similarity index 99% rename from evidence/verify_test.go rename to internal/evidence/verify_test.go index 4a1c0c451..85f997f2a 100644 --- a/evidence/verify_test.go +++ b/internal/evidence/verify_test.go @@ -13,8 +13,8 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/tmhash" - "github.com/tendermint/tendermint/evidence" - "github.com/tendermint/tendermint/evidence/mocks" + "github.com/tendermint/tendermint/internal/evidence" + "github.com/tendermint/tendermint/internal/evidence/mocks" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" diff --git a/mempool/cache.go b/internal/mempool/cache.go similarity index 100% rename from mempool/cache.go rename to internal/mempool/cache.go diff --git a/mempool/cache_bench_test.go b/internal/mempool/cache_bench_test.go similarity index 100% rename from mempool/cache_bench_test.go rename to internal/mempool/cache_bench_test.go diff --git a/mempool/cache_test.go b/internal/mempool/cache_test.go similarity index 100% rename from mempool/cache_test.go rename to internal/mempool/cache_test.go diff --git a/mempool/errors.go b/internal/mempool/errors.go similarity index 100% rename from mempool/errors.go rename to internal/mempool/errors.go diff --git a/mempool/ids.go b/internal/mempool/ids.go similarity index 97% rename from mempool/ids.go rename to internal/mempool/ids.go index 82b4a67bd..a2c1caed8 100644 --- a/mempool/ids.go +++ b/internal/mempool/ids.go @@ -4,7 +4,7 @@ import ( "fmt" tmsync "github.com/tendermint/tendermint/internal/libs/sync" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // nolint: golint diff --git a/mempool/ids_test.go b/internal/mempool/ids_test.go similarity index 90% rename from mempool/ids_test.go rename to internal/mempool/ids_test.go index b758f91bf..01cd5774a 100644 --- a/mempool/ids_test.go +++ b/internal/mempool/ids_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) func TestMempoolIDsBasic(t *testing.T) { diff --git a/mempool/mempool.go b/internal/mempool/mempool.go similarity index 98% rename from mempool/mempool.go rename to internal/mempool/mempool.go index ae6252f13..d679b3506 100644 --- a/mempool/mempool.go +++ b/internal/mempool/mempool.go @@ -6,7 +6,7 @@ import ( "math" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/metrics.go b/internal/mempool/metrics.go similarity index 100% rename from mempool/metrics.go rename to internal/mempool/metrics.go diff --git a/mempool/mock/mempool.go b/internal/mempool/mock/mempool.go similarity index 95% rename from mempool/mock/mempool.go rename to internal/mempool/mock/mempool.go index 9cec2f757..5749d2d3c 100644 --- a/mempool/mock/mempool.go +++ b/internal/mempool/mock/mempool.go @@ -5,7 +5,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/libs/clist" - mempl "github.com/tendermint/tendermint/mempool" + mempl "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/tx.go b/internal/mempool/tx.go similarity index 94% rename from mempool/tx.go rename to internal/mempool/tx.go index a040de5d9..880958504 100644 --- a/mempool/tx.go +++ b/internal/mempool/tx.go @@ -3,7 +3,7 @@ package mempool import ( "crypto/sha256" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/v0/bench_test.go b/internal/mempool/v0/bench_test.go similarity index 97% rename from mempool/v0/bench_test.go rename to internal/mempool/v0/bench_test.go index 40ffcee44..45123c9f6 100644 --- a/mempool/v0/bench_test.go +++ b/internal/mempool/v0/bench_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/tendermint/tendermint/abci/example/kvstore" - "github.com/tendermint/tendermint/mempool" + "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/proxy" ) diff --git a/mempool/v0/cache_test.go b/internal/mempool/v0/cache_test.go similarity index 98% rename from mempool/v0/cache_test.go rename to internal/mempool/v0/cache_test.go index c393f60b6..fbb719231 100644 --- a/mempool/v0/cache_test.go +++ b/internal/mempool/v0/cache_test.go @@ -9,7 +9,7 @@ import ( "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/mempool" + "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/v0/clist_mempool.go b/internal/mempool/v0/clist_mempool.go similarity index 99% rename from mempool/v0/clist_mempool.go rename to internal/mempool/v0/clist_mempool.go index 13606fd5d..4d0b09068 100644 --- a/mempool/v0/clist_mempool.go +++ b/internal/mempool/v0/clist_mempool.go @@ -11,10 +11,10 @@ import ( cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/libs/clist" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/mempool" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" - "github.com/tendermint/tendermint/mempool" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/v0/clist_mempool_test.go b/internal/mempool/v0/clist_mempool_test.go similarity index 99% rename from mempool/v0/clist_mempool_test.go rename to internal/mempool/v0/clist_mempool_test.go index ae839b506..546db827d 100644 --- a/mempool/v0/clist_mempool_test.go +++ b/internal/mempool/v0/clist_mempool_test.go @@ -20,10 +20,10 @@ import ( abciserver "github.com/tendermint/tendermint/abci/server" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/libs/log" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/v0/doc.go b/internal/mempool/v0/doc.go similarity index 100% rename from mempool/v0/doc.go rename to internal/mempool/v0/doc.go diff --git a/mempool/v0/reactor.go b/internal/mempool/v0/reactor.go similarity index 99% rename from mempool/v0/reactor.go rename to internal/mempool/v0/reactor.go index 27fc36cfe..e2ff5090e 100644 --- a/mempool/v0/reactor.go +++ b/internal/mempool/v0/reactor.go @@ -10,10 +10,10 @@ import ( cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/libs/clist" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/mempool" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/mempool" - "github.com/tendermint/tendermint/p2p" protomem "github.com/tendermint/tendermint/proto/tendermint/mempool" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/v0/reactor_test.go b/internal/mempool/v0/reactor_test.go similarity index 98% rename from mempool/v0/reactor_test.go rename to internal/mempool/v0/reactor_test.go index cc292e335..970f9afea 100644 --- a/mempool/v0/reactor_test.go +++ b/internal/mempool/v0/reactor_test.go @@ -11,11 +11,11 @@ import ( "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/mempool" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/p2ptest" "github.com/tendermint/tendermint/libs/log" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/mempool" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/p2ptest" protomem "github.com/tendermint/tendermint/proto/tendermint/mempool" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" diff --git a/mempool/v1/mempool.go b/internal/mempool/v1/mempool.go similarity index 99% rename from mempool/v1/mempool.go rename to internal/mempool/v1/mempool.go index f9c5ce9e8..9835aa936 100644 --- a/mempool/v1/mempool.go +++ b/internal/mempool/v1/mempool.go @@ -11,9 +11,9 @@ import ( "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/libs/clist" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" - "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/v1/mempool_bench_test.go b/internal/mempool/v1/mempool_bench_test.go similarity index 91% rename from mempool/v1/mempool_bench_test.go rename to internal/mempool/v1/mempool_bench_test.go index b3239d13f..ca23f1479 100644 --- a/mempool/v1/mempool_bench_test.go +++ b/internal/mempool/v1/mempool_bench_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/mempool" + "github.com/tendermint/tendermint/internal/mempool" ) func BenchmarkTxMempool_CheckTx(b *testing.B) { diff --git a/mempool/v1/mempool_test.go b/internal/mempool/v1/mempool_test.go similarity index 99% rename from mempool/v1/mempool_test.go rename to internal/mempool/v1/mempool_test.go index 2864e55c4..6dbf312d4 100644 --- a/mempool/v1/mempool_test.go +++ b/internal/mempool/v1/mempool_test.go @@ -17,8 +17,8 @@ import ( "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/v1/priority_queue.go b/internal/mempool/v1/priority_queue.go similarity index 100% rename from mempool/v1/priority_queue.go rename to internal/mempool/v1/priority_queue.go diff --git a/mempool/v1/priority_queue_test.go b/internal/mempool/v1/priority_queue_test.go similarity index 100% rename from mempool/v1/priority_queue_test.go rename to internal/mempool/v1/priority_queue_test.go diff --git a/mempool/v1/reactor.go b/internal/mempool/v1/reactor.go similarity index 99% rename from mempool/v1/reactor.go rename to internal/mempool/v1/reactor.go index 83443031b..27363c8e9 100644 --- a/mempool/v1/reactor.go +++ b/internal/mempool/v1/reactor.go @@ -9,10 +9,10 @@ import ( cfg "github.com/tendermint/tendermint/config" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/mempool" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/mempool" - "github.com/tendermint/tendermint/p2p" protomem "github.com/tendermint/tendermint/proto/tendermint/mempool" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/v1/tx.go b/internal/mempool/v1/tx.go similarity index 99% rename from mempool/v1/tx.go rename to internal/mempool/v1/tx.go index 6680a724a..4f212a6c4 100644 --- a/mempool/v1/tx.go +++ b/internal/mempool/v1/tx.go @@ -5,7 +5,7 @@ import ( "github.com/tendermint/tendermint/internal/libs/clist" tmsync "github.com/tendermint/tendermint/internal/libs/sync" - "github.com/tendermint/tendermint/mempool" + "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/v1/tx_test.go b/internal/mempool/v1/tx_test.go similarity index 97% rename from mempool/v1/tx_test.go rename to internal/mempool/v1/tx_test.go index d4a0b26bf..546a8fa9c 100644 --- a/mempool/v1/tx_test.go +++ b/internal/mempool/v1/tx_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/mempool" + "github.com/tendermint/tendermint/internal/mempool" ) func TestTxStore_GetTxBySender(t *testing.T) { diff --git a/p2p/README.md b/internal/p2p/README.md similarity index 100% rename from p2p/README.md rename to internal/p2p/README.md diff --git a/p2p/address.go b/internal/p2p/address.go similarity index 100% rename from p2p/address.go rename to internal/p2p/address.go diff --git a/p2p/address_test.go b/internal/p2p/address_test.go similarity index 99% rename from p2p/address_test.go rename to internal/p2p/address_test.go index eff6afd7a..1b5a07bf0 100644 --- a/p2p/address_test.go +++ b/internal/p2p/address_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/ed25519" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) func TestNewNodeID(t *testing.T) { diff --git a/p2p/base_reactor.go b/internal/p2p/base_reactor.go similarity index 98% rename from p2p/base_reactor.go rename to internal/p2p/base_reactor.go index 59faf4c3f..09925caf8 100644 --- a/p2p/base_reactor.go +++ b/internal/p2p/base_reactor.go @@ -1,8 +1,8 @@ package p2p import ( + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p/conn" ) // Reactor is responsible for handling incoming messages on one or more diff --git a/p2p/conn/conn_go110.go b/internal/p2p/conn/conn_go110.go similarity index 100% rename from p2p/conn/conn_go110.go rename to internal/p2p/conn/conn_go110.go diff --git a/p2p/conn/conn_notgo110.go b/internal/p2p/conn/conn_notgo110.go similarity index 100% rename from p2p/conn/conn_notgo110.go rename to internal/p2p/conn/conn_notgo110.go diff --git a/p2p/conn/connection.go b/internal/p2p/conn/connection.go similarity index 100% rename from p2p/conn/connection.go rename to internal/p2p/conn/connection.go diff --git a/p2p/conn/connection_test.go b/internal/p2p/conn/connection_test.go similarity index 100% rename from p2p/conn/connection_test.go rename to internal/p2p/conn/connection_test.go diff --git a/p2p/conn/evil_secret_connection_test.go b/internal/p2p/conn/evil_secret_connection_test.go similarity index 100% rename from p2p/conn/evil_secret_connection_test.go rename to internal/p2p/conn/evil_secret_connection_test.go diff --git a/p2p/conn/secret_connection.go b/internal/p2p/conn/secret_connection.go similarity index 100% rename from p2p/conn/secret_connection.go rename to internal/p2p/conn/secret_connection.go diff --git a/p2p/conn/secret_connection_test.go b/internal/p2p/conn/secret_connection_test.go similarity index 100% rename from p2p/conn/secret_connection_test.go rename to internal/p2p/conn/secret_connection_test.go diff --git a/p2p/conn/testdata/TestDeriveSecretsAndChallengeGolden.golden b/internal/p2p/conn/testdata/TestDeriveSecretsAndChallengeGolden.golden similarity index 100% rename from p2p/conn/testdata/TestDeriveSecretsAndChallengeGolden.golden rename to internal/p2p/conn/testdata/TestDeriveSecretsAndChallengeGolden.golden diff --git a/p2p/conn_set.go b/internal/p2p/conn_set.go similarity index 100% rename from p2p/conn_set.go rename to internal/p2p/conn_set.go diff --git a/p2p/conn_tracker.go b/internal/p2p/conn_tracker.go similarity index 100% rename from p2p/conn_tracker.go rename to internal/p2p/conn_tracker.go diff --git a/p2p/conn_tracker_test.go b/internal/p2p/conn_tracker_test.go similarity index 100% rename from p2p/conn_tracker_test.go rename to internal/p2p/conn_tracker_test.go diff --git a/p2p/errors.go b/internal/p2p/errors.go similarity index 100% rename from p2p/errors.go rename to internal/p2p/errors.go diff --git a/p2p/key.go b/internal/p2p/key.go similarity index 100% rename from p2p/key.go rename to internal/p2p/key.go diff --git a/p2p/key_test.go b/internal/p2p/key_test.go similarity index 95% rename from p2p/key_test.go rename to internal/p2p/key_test.go index 4a5e1bf28..5189f95cf 100644 --- a/p2p/key_test.go +++ b/internal/p2p/key_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/p2p" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/p2p" ) func TestLoadOrGenNodeKey(t *testing.T) { diff --git a/p2p/metrics.go b/internal/p2p/metrics.go similarity index 100% rename from p2p/metrics.go rename to internal/p2p/metrics.go diff --git a/p2p/mock/peer.go b/internal/p2p/mock/peer.go similarity index 95% rename from p2p/mock/peer.go rename to internal/p2p/mock/peer.go index d59953bc7..1df6de505 100644 --- a/p2p/mock/peer.go +++ b/internal/p2p/mock/peer.go @@ -3,9 +3,9 @@ package mock import ( "net" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/conn" ) type Peer struct { diff --git a/p2p/mock/reactor.go b/internal/p2p/mock/reactor.go similarity index 84% rename from p2p/mock/reactor.go rename to internal/p2p/mock/reactor.go index 40f918e9f..d634a8032 100644 --- a/p2p/mock/reactor.go +++ b/internal/p2p/mock/reactor.go @@ -1,9 +1,9 @@ package mock import ( + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/conn" ) type Reactor struct { diff --git a/p2p/mocks/connection.go b/internal/p2p/mocks/connection.go similarity index 96% rename from p2p/mocks/connection.go rename to internal/p2p/mocks/connection.go index 07c4540ed..5d03c0c98 100644 --- a/p2p/mocks/connection.go +++ b/internal/p2p/mocks/connection.go @@ -1,17 +1,17 @@ -// Code generated by mockery v2.5.1. DO NOT EDIT. +// Code generated by mockery 2.7.4. DO NOT EDIT. package mocks import ( context "context" - conn "github.com/tendermint/tendermint/p2p/conn" + conn "github.com/tendermint/tendermint/internal/p2p/conn" crypto "github.com/tendermint/tendermint/crypto" mock "github.com/stretchr/testify/mock" - p2p "github.com/tendermint/tendermint/p2p" + p2p "github.com/tendermint/tendermint/internal/p2p" ) // Connection is an autogenerated mock type for the Connection type diff --git a/p2p/mocks/peer.go b/internal/p2p/mocks/peer.go similarity index 98% rename from p2p/mocks/peer.go rename to internal/p2p/mocks/peer.go index fde2ddaed..94dc705b3 100644 --- a/p2p/mocks/peer.go +++ b/internal/p2p/mocks/peer.go @@ -3,14 +3,14 @@ package mocks import ( + conn "github.com/tendermint/tendermint/internal/p2p/conn" log "github.com/tendermint/tendermint/libs/log" - conn "github.com/tendermint/tendermint/p2p/conn" mock "github.com/stretchr/testify/mock" net "net" - p2p "github.com/tendermint/tendermint/p2p" + p2p "github.com/tendermint/tendermint/internal/p2p" ) // Peer is an autogenerated mock type for the Peer type diff --git a/p2p/mocks/transport.go b/internal/p2p/mocks/transport.go similarity index 95% rename from p2p/mocks/transport.go rename to internal/p2p/mocks/transport.go index 980c4a606..8035e9017 100644 --- a/p2p/mocks/transport.go +++ b/internal/p2p/mocks/transport.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.5.1. DO NOT EDIT. +// Code generated by mockery 2.7.4. DO NOT EDIT. package mocks @@ -6,7 +6,7 @@ import ( context "context" mock "github.com/stretchr/testify/mock" - p2p "github.com/tendermint/tendermint/p2p" + p2p "github.com/tendermint/tendermint/internal/p2p" ) // Transport is an autogenerated mock type for the Transport type diff --git a/p2p/netaddress.go b/internal/p2p/netaddress.go similarity index 100% rename from p2p/netaddress.go rename to internal/p2p/netaddress.go diff --git a/p2p/netaddress_test.go b/internal/p2p/netaddress_test.go similarity index 100% rename from p2p/netaddress_test.go rename to internal/p2p/netaddress_test.go diff --git a/p2p/node_info.go b/internal/p2p/node_info.go similarity index 100% rename from p2p/node_info.go rename to internal/p2p/node_info.go diff --git a/p2p/node_info_test.go b/internal/p2p/node_info_test.go similarity index 100% rename from p2p/node_info_test.go rename to internal/p2p/node_info_test.go diff --git a/p2p/p2p_test.go b/internal/p2p/p2p_test.go similarity index 95% rename from p2p/p2p_test.go rename to internal/p2p/p2p_test.go index a046cb08e..e25e4ef4d 100644 --- a/p2p/p2p_test.go +++ b/internal/p2p/p2p_test.go @@ -5,7 +5,7 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // Common setup for P2P tests. diff --git a/p2p/p2ptest/network.go b/internal/p2p/p2ptest/network.go similarity index 99% rename from p2p/p2ptest/network.go rename to internal/p2p/p2ptest/network.go index c8e16770f..9037407c6 100644 --- a/p2p/p2ptest/network.go +++ b/internal/p2p/p2ptest/network.go @@ -12,8 +12,8 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" ) // Network sets up an in-memory network that can be used for high-level P2P diff --git a/p2p/p2ptest/require.go b/internal/p2p/p2ptest/require.go similarity index 98% rename from p2p/p2ptest/require.go rename to internal/p2p/p2ptest/require.go index cce88a42a..b838fb789 100644 --- a/p2p/p2ptest/require.go +++ b/internal/p2p/p2ptest/require.go @@ -7,7 +7,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // RequireEmpty requires that the given channel is empty. diff --git a/p2p/p2ptest/util.go b/internal/p2p/p2ptest/util.go similarity index 86% rename from p2p/p2ptest/util.go rename to internal/p2p/p2ptest/util.go index f29ddeb79..b717120b3 100644 --- a/p2p/p2ptest/util.go +++ b/internal/p2p/p2ptest/util.go @@ -2,7 +2,7 @@ package p2ptest import ( gogotypes "github.com/gogo/protobuf/types" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // Message is a simple message containing a string-typed Value field. diff --git a/p2p/peer.go b/internal/p2p/peer.go similarity index 99% rename from p2p/peer.go rename to internal/p2p/peer.go index b417ed4d0..6806f6a5b 100644 --- a/p2p/peer.go +++ b/internal/p2p/peer.go @@ -7,10 +7,10 @@ import ( "runtime/debug" "time" + tmconn "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/cmap" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - tmconn "github.com/tendermint/tendermint/p2p/conn" ) //go:generate mockery --case underscore --name Peer diff --git a/p2p/peer_set.go b/internal/p2p/peer_set.go similarity index 100% rename from p2p/peer_set.go rename to internal/p2p/peer_set.go diff --git a/p2p/peer_set_test.go b/internal/p2p/peer_set_test.go similarity index 100% rename from p2p/peer_set_test.go rename to internal/p2p/peer_set_test.go diff --git a/p2p/peer_test.go b/internal/p2p/peer_test.go similarity index 98% rename from p2p/peer_test.go rename to internal/p2p/peer_test.go index 665c46706..b489679ad 100644 --- a/p2p/peer_test.go +++ b/internal/p2p/peer_test.go @@ -17,7 +17,7 @@ import ( "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/config" - tmconn "github.com/tendermint/tendermint/p2p/conn" + tmconn "github.com/tendermint/tendermint/internal/p2p/conn" ) func TestPeerBasic(t *testing.T) { diff --git a/p2p/peermanager.go b/internal/p2p/peermanager.go similarity index 100% rename from p2p/peermanager.go rename to internal/p2p/peermanager.go diff --git a/p2p/peermanager_scoring_test.go b/internal/p2p/peermanager_scoring_test.go similarity index 100% rename from p2p/peermanager_scoring_test.go rename to internal/p2p/peermanager_scoring_test.go diff --git a/p2p/peermanager_test.go b/internal/p2p/peermanager_test.go similarity index 99% rename from p2p/peermanager_test.go rename to internal/p2p/peermanager_test.go index c5134fe92..928f3551b 100644 --- a/p2p/peermanager_test.go +++ b/internal/p2p/peermanager_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // FIXME: We should probably have some randomized property-based tests for the diff --git a/p2p/pex/addrbook.go b/internal/p2p/pex/addrbook.go similarity index 99% rename from p2p/pex/addrbook.go rename to internal/p2p/pex/addrbook.go index dd8922bce..0deae6246 100644 --- a/p2p/pex/addrbook.go +++ b/internal/p2p/pex/addrbook.go @@ -17,10 +17,10 @@ import ( "github.com/minio/highwayhash" "github.com/tendermint/tendermint/crypto" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" tmmath "github.com/tendermint/tendermint/libs/math" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" ) const ( diff --git a/p2p/pex/addrbook_test.go b/internal/p2p/pex/addrbook_test.go similarity index 99% rename from p2p/pex/addrbook_test.go rename to internal/p2p/pex/addrbook_test.go index f274feff2..b89215fdc 100644 --- a/p2p/pex/addrbook_test.go +++ b/internal/p2p/pex/addrbook_test.go @@ -14,10 +14,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/p2p" ) // FIXME These tests should not rely on .(*addrBook) assertions diff --git a/p2p/pex/bench_test.go b/internal/p2p/pex/bench_test.go similarity index 90% rename from p2p/pex/bench_test.go rename to internal/p2p/pex/bench_test.go index 7d2b636f1..aed22ffea 100644 --- a/p2p/pex/bench_test.go +++ b/internal/p2p/pex/bench_test.go @@ -3,7 +3,7 @@ package pex import ( "testing" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) func BenchmarkAddrBook_hash(b *testing.B) { diff --git a/p2p/pex/errors.go b/internal/p2p/pex/errors.go similarity index 97% rename from p2p/pex/errors.go rename to internal/p2p/pex/errors.go index e60166d06..275e71bf9 100644 --- a/p2p/pex/errors.go +++ b/internal/p2p/pex/errors.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) type ErrAddrBookNonRoutable struct { diff --git a/p2p/pex/file.go b/internal/p2p/pex/file.go similarity index 100% rename from p2p/pex/file.go rename to internal/p2p/pex/file.go diff --git a/p2p/pex/known_address.go b/internal/p2p/pex/known_address.go similarity index 98% rename from p2p/pex/known_address.go rename to internal/p2p/pex/known_address.go index e956f3e97..3d551a022 100644 --- a/p2p/pex/known_address.go +++ b/internal/p2p/pex/known_address.go @@ -3,7 +3,7 @@ package pex import ( "time" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // knownAddress tracks information about a known network address diff --git a/p2p/pex/params.go b/internal/p2p/pex/params.go similarity index 100% rename from p2p/pex/params.go rename to internal/p2p/pex/params.go diff --git a/p2p/pex/pex_reactor.go b/internal/p2p/pex/pex_reactor.go similarity index 99% rename from p2p/pex/pex_reactor.go rename to internal/p2p/pex/pex_reactor.go index e821ce789..88e2e0ecf 100644 --- a/p2p/pex/pex_reactor.go +++ b/internal/p2p/pex/pex_reactor.go @@ -8,12 +8,12 @@ import ( "github.com/gogo/protobuf/proto" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/cmap" tmmath "github.com/tendermint/tendermint/libs/math" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/conn" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/pex/pex_reactor_test.go b/internal/p2p/pex/pex_reactor_test.go similarity index 99% rename from p2p/pex/pex_reactor_test.go rename to internal/p2p/pex/pex_reactor_test.go index 02a3fcdee..0df9732ea 100644 --- a/p2p/pex/pex_reactor_test.go +++ b/internal/p2p/pex/pex_reactor_test.go @@ -14,9 +14,9 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/mock" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/mock" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/pex/reactor.go b/internal/p2p/pex/reactor.go similarity index 99% rename from p2p/pex/reactor.go rename to internal/p2p/pex/reactor.go index 698a9d311..045ec624c 100644 --- a/p2p/pex/reactor.go +++ b/internal/p2p/pex/reactor.go @@ -6,11 +6,11 @@ import ( "sync" "time" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/conn" protop2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/pex/reactor_test.go b/internal/p2p/pex/reactor_test.go similarity index 99% rename from p2p/pex/reactor_test.go rename to internal/p2p/pex/reactor_test.go index 3ee0a587f..c9d32fd24 100644 --- a/p2p/pex/reactor_test.go +++ b/internal/p2p/pex/reactor_test.go @@ -10,10 +10,10 @@ import ( dbm "github.com/tendermint/tm-db" "github.com/tendermint/tendermint/crypto/ed25519" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/p2ptest" + "github.com/tendermint/tendermint/internal/p2p/pex" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/p2ptest" - "github.com/tendermint/tendermint/p2p/pex" proto "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/pqueue.go b/internal/p2p/pqueue.go similarity index 100% rename from p2p/pqueue.go rename to internal/p2p/pqueue.go diff --git a/p2p/queue.go b/internal/p2p/queue.go similarity index 100% rename from p2p/queue.go rename to internal/p2p/queue.go diff --git a/p2p/router.go b/internal/p2p/router.go similarity index 100% rename from p2p/router.go rename to internal/p2p/router.go diff --git a/p2p/router_filter_test.go b/internal/p2p/router_filter_test.go similarity index 100% rename from p2p/router_filter_test.go rename to internal/p2p/router_filter_test.go diff --git a/p2p/router_init_test.go b/internal/p2p/router_init_test.go similarity index 100% rename from p2p/router_init_test.go rename to internal/p2p/router_init_test.go diff --git a/p2p/router_test.go b/internal/p2p/router_test.go similarity index 99% rename from p2p/router_test.go rename to internal/p2p/router_test.go index a1aaab3d1..50959c7e2 100644 --- a/p2p/router_test.go +++ b/internal/p2p/router_test.go @@ -20,10 +20,10 @@ import ( "github.com/tendermint/tendermint/crypto" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/mocks" + "github.com/tendermint/tendermint/internal/p2p/p2ptest" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/mocks" - "github.com/tendermint/tendermint/p2p/p2ptest" ) func echoReactor(channel *p2p.Channel) { diff --git a/p2p/shim.go b/internal/p2p/shim.go similarity index 100% rename from p2p/shim.go rename to internal/p2p/shim.go diff --git a/p2p/shim_test.go b/internal/p2p/shim_test.go similarity index 97% rename from p2p/shim_test.go rename to internal/p2p/shim_test.go index 83fb7e382..232f02afa 100644 --- a/p2p/shim_test.go +++ b/internal/p2p/shim_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/p2p" + p2pmocks "github.com/tendermint/tendermint/internal/p2p/mocks" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" - p2pmocks "github.com/tendermint/tendermint/p2p/mocks" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" ) diff --git a/p2p/switch.go b/internal/p2p/switch.go similarity index 99% rename from p2p/switch.go rename to internal/p2p/switch.go index 30fc4d81e..4ecb85a58 100644 --- a/p2p/switch.go +++ b/internal/p2p/switch.go @@ -12,10 +12,10 @@ import ( "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/cmap" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p/conn" ) const ( diff --git a/p2p/switch_test.go b/internal/p2p/switch_test.go similarity index 99% rename from p2p/switch_test.go rename to internal/p2p/switch_test.go index 3a0d065c6..6dc8295b1 100644 --- a/p2p/switch_test.go +++ b/internal/p2p/switch_test.go @@ -22,8 +22,8 @@ import ( "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/ed25519" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p/conn" ) var ( diff --git a/p2p/test_util.go b/internal/p2p/test_util.go similarity index 99% rename from p2p/test_util.go rename to internal/p2p/test_util.go index 5b2861e50..acb823944 100644 --- a/p2p/test_util.go +++ b/internal/p2p/test_util.go @@ -11,7 +11,7 @@ import ( tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/p2p/conn" + "github.com/tendermint/tendermint/internal/p2p/conn" ) const testCh = 0x01 diff --git a/p2p/transport.go b/internal/p2p/transport.go similarity index 99% rename from p2p/transport.go rename to internal/p2p/transport.go index ff782f966..bf191a9a4 100644 --- a/p2p/transport.go +++ b/internal/p2p/transport.go @@ -7,7 +7,7 @@ import ( "net" "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/p2p/conn" + "github.com/tendermint/tendermint/internal/p2p/conn" ) //go:generate mockery --case underscore --name Transport|Connection diff --git a/p2p/transport_mconn.go b/internal/p2p/transport_mconn.go similarity index 99% rename from p2p/transport_mconn.go rename to internal/p2p/transport_mconn.go index 5295587e6..7837a4faa 100644 --- a/p2p/transport_mconn.go +++ b/internal/p2p/transport_mconn.go @@ -14,8 +14,8 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/internal/libs/protoio" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p/conn" p2pproto "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/transport_mconn_test.go b/internal/p2p/transport_mconn_test.go similarity index 98% rename from p2p/transport_mconn_test.go rename to internal/p2p/transport_mconn_test.go index 207b68563..541f4767e 100644 --- a/p2p/transport_mconn_test.go +++ b/internal/p2p/transport_mconn_test.go @@ -9,9 +9,9 @@ import ( "github.com/fortytw2/leaktest" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/conn" ) // Transports are mainly tested by common tests in transport_test.go, we diff --git a/p2p/transport_memory.go b/internal/p2p/transport_memory.go similarity index 99% rename from p2p/transport_memory.go rename to internal/p2p/transport_memory.go index ea2131071..62e94a106 100644 --- a/p2p/transport_memory.go +++ b/internal/p2p/transport_memory.go @@ -10,8 +10,8 @@ import ( "github.com/tendermint/tendermint/crypto" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p/conn" ) const ( diff --git a/p2p/transport_memory_test.go b/internal/p2p/transport_memory_test.go similarity index 94% rename from p2p/transport_memory_test.go rename to internal/p2p/transport_memory_test.go index 476248184..99eaf2d38 100644 --- a/p2p/transport_memory_test.go +++ b/internal/p2p/transport_memory_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" ) // Transports are mainly tested by common tests in transport_test.go, we diff --git a/p2p/transport_test.go b/internal/p2p/transport_test.go similarity index 99% rename from p2p/transport_test.go rename to internal/p2p/transport_test.go index ecc2f5536..0bdbf1153 100644 --- a/p2p/transport_test.go +++ b/internal/p2p/transport_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/ed25519" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/bytes" - "github.com/tendermint/tendermint/p2p" ) // transportFactory is used to set up transports for tests. diff --git a/p2p/trust/config.go b/internal/p2p/trust/config.go similarity index 100% rename from p2p/trust/config.go rename to internal/p2p/trust/config.go diff --git a/p2p/trust/metric.go b/internal/p2p/trust/metric.go similarity index 100% rename from p2p/trust/metric.go rename to internal/p2p/trust/metric.go diff --git a/p2p/trust/metric_test.go b/internal/p2p/trust/metric_test.go similarity index 100% rename from p2p/trust/metric_test.go rename to internal/p2p/trust/metric_test.go diff --git a/p2p/trust/store.go b/internal/p2p/trust/store.go similarity index 100% rename from p2p/trust/store.go rename to internal/p2p/trust/store.go diff --git a/p2p/trust/store_test.go b/internal/p2p/trust/store_test.go similarity index 100% rename from p2p/trust/store_test.go rename to internal/p2p/trust/store_test.go diff --git a/p2p/trust/ticker.go b/internal/p2p/trust/ticker.go similarity index 100% rename from p2p/trust/ticker.go rename to internal/p2p/trust/ticker.go diff --git a/p2p/types.go b/internal/p2p/types.go similarity index 68% rename from p2p/types.go rename to internal/p2p/types.go index b11765bb5..403f43528 100644 --- a/p2p/types.go +++ b/internal/p2p/types.go @@ -1,7 +1,7 @@ package p2p import ( - "github.com/tendermint/tendermint/p2p/conn" + "github.com/tendermint/tendermint/internal/p2p/conn" ) type ChannelDescriptor = conn.ChannelDescriptor diff --git a/p2p/upnp/probe.go b/internal/p2p/upnp/probe.go similarity index 100% rename from p2p/upnp/probe.go rename to internal/p2p/upnp/probe.go diff --git a/p2p/upnp/upnp.go b/internal/p2p/upnp/upnp.go similarity index 100% rename from p2p/upnp/upnp.go rename to internal/p2p/upnp/upnp.go diff --git a/p2p/wdrr_queue.go b/internal/p2p/wdrr_queue.go similarity index 100% rename from p2p/wdrr_queue.go rename to internal/p2p/wdrr_queue.go diff --git a/p2p/wdrr_queue_test.go b/internal/p2p/wdrr_queue_test.go similarity index 100% rename from p2p/wdrr_queue_test.go rename to internal/p2p/wdrr_queue_test.go diff --git a/statesync/chunks.go b/internal/statesync/chunks.go similarity index 99% rename from statesync/chunks.go rename to internal/statesync/chunks.go index 1e8e45ed3..b570f0557 100644 --- a/statesync/chunks.go +++ b/internal/statesync/chunks.go @@ -10,7 +10,7 @@ import ( "time" tmsync "github.com/tendermint/tendermint/internal/libs/sync" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // errDone is returned by chunkQueue.Next() when all chunks have been returned. diff --git a/statesync/chunks_test.go b/internal/statesync/chunks_test.go similarity index 99% rename from statesync/chunks_test.go rename to internal/statesync/chunks_test.go index 26ec2e8a5..3a8523241 100644 --- a/statesync/chunks_test.go +++ b/internal/statesync/chunks_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) func setupChunkQueue(t *testing.T) (*chunkQueue, func()) { diff --git a/statesync/mocks/state_provider.go b/internal/statesync/mocks/state_provider.go similarity index 100% rename from statesync/mocks/state_provider.go rename to internal/statesync/mocks/state_provider.go diff --git a/statesync/reactor.go b/internal/statesync/reactor.go similarity index 99% rename from statesync/reactor.go rename to internal/statesync/reactor.go index 898f83ccb..fa38ca293 100644 --- a/statesync/reactor.go +++ b/internal/statesync/reactor.go @@ -9,9 +9,9 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" diff --git a/statesync/reactor_test.go b/internal/statesync/reactor_test.go similarity index 98% rename from statesync/reactor_test.go rename to internal/statesync/reactor_test.go index 14ffa9509..df9667b29 100644 --- a/statesync/reactor_test.go +++ b/internal/statesync/reactor_test.go @@ -8,11 +8,11 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/statesync/mocks" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" proxymocks "github.com/tendermint/tendermint/proxy/mocks" - "github.com/tendermint/tendermint/statesync/mocks" ) type reactorTestSuite struct { diff --git a/statesync/snapshots.go b/internal/statesync/snapshots.go similarity index 99% rename from statesync/snapshots.go rename to internal/statesync/snapshots.go index 2ae6e7c20..6c447a617 100644 --- a/statesync/snapshots.go +++ b/internal/statesync/snapshots.go @@ -10,7 +10,7 @@ import ( "time" tmsync "github.com/tendermint/tendermint/internal/libs/sync" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) // snapshotKey is a snapshot key used for lookups. diff --git a/statesync/snapshots_test.go b/internal/statesync/snapshots_test.go similarity index 98% rename from statesync/snapshots_test.go rename to internal/statesync/snapshots_test.go index 2d0b4e0bb..74683bf45 100644 --- a/statesync/snapshots_test.go +++ b/internal/statesync/snapshots_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/statesync/mocks" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/statesync/mocks" ) func TestSnapshot_Key(t *testing.T) { diff --git a/statesync/stateprovider.go b/internal/statesync/stateprovider.go similarity index 100% rename from statesync/stateprovider.go rename to internal/statesync/stateprovider.go diff --git a/statesync/syncer.go b/internal/statesync/syncer.go similarity index 99% rename from statesync/syncer.go rename to internal/statesync/syncer.go index 298c20a7c..47f640aa3 100644 --- a/statesync/syncer.go +++ b/internal/statesync/syncer.go @@ -9,8 +9,8 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" diff --git a/statesync/syncer_test.go b/internal/statesync/syncer_test.go similarity index 99% rename from statesync/syncer_test.go rename to internal/statesync/syncer_test.go index 42f4156f3..e8c026106 100644 --- a/statesync/syncer_test.go +++ b/internal/statesync/syncer_test.go @@ -13,12 +13,12 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmsync "github.com/tendermint/tendermint/internal/libs/sync" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/statesync/mocks" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" "github.com/tendermint/tendermint/proxy" proxymocks "github.com/tendermint/tendermint/proxy/mocks" sm "github.com/tendermint/tendermint/state" - "github.com/tendermint/tendermint/statesync/mocks" "github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/version" ) diff --git a/node/node.go b/node/node.go index 34589ea0f..a285b69f6 100644 --- a/node/node.go +++ b/node/node.go @@ -16,9 +16,13 @@ import ( "github.com/rs/cors" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" - cs "github.com/tendermint/tendermint/consensus" "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/evidence" + cs "github.com/tendermint/tendermint/internal/consensus" + "github.com/tendermint/tendermint/internal/evidence" + "github.com/tendermint/tendermint/internal/mempool" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/pex" + "github.com/tendermint/tendermint/internal/statesync" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" tmnet "github.com/tendermint/tendermint/libs/net" @@ -26,9 +30,6 @@ import ( "github.com/tendermint/tendermint/libs/service" "github.com/tendermint/tendermint/libs/strings" "github.com/tendermint/tendermint/light" - "github.com/tendermint/tendermint/mempool" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/pex" "github.com/tendermint/tendermint/privval" tmgrpc "github.com/tendermint/tendermint/privval/grpc" "github.com/tendermint/tendermint/proxy" @@ -37,7 +38,6 @@ import ( rpcserver "github.com/tendermint/tendermint/rpc/jsonrpc/server" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/state/indexer" - "github.com/tendermint/tendermint/statesync" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" diff --git a/node/node_test.go b/node/node_test.go index 069cdc1ab..963a2f86b 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -21,12 +21,12 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" - "github.com/tendermint/tendermint/evidence" + "github.com/tendermint/tendermint/internal/evidence" + "github.com/tendermint/tendermint/internal/mempool" + mempoolv0 "github.com/tendermint/tendermint/internal/mempool/v0" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/mempool" - mempoolv0 "github.com/tendermint/tendermint/mempool/v0" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" diff --git a/node/public.go b/node/public.go index 80f5fc39d..fd5792880 100644 --- a/node/public.go +++ b/node/public.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" diff --git a/node/setup.go b/node/setup.go index d56502d2f..19dcf96bf 100644 --- a/node/setup.go +++ b/node/setup.go @@ -14,20 +14,21 @@ import ( dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" - bcv0 "github.com/tendermint/tendermint/blockchain/v0" - bcv2 "github.com/tendermint/tendermint/blockchain/v2" cfg "github.com/tendermint/tendermint/config" - cs "github.com/tendermint/tendermint/consensus" "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/evidence" + bcv0 "github.com/tendermint/tendermint/internal/blockchain/v0" + bcv2 "github.com/tendermint/tendermint/internal/blockchain/v2" + cs "github.com/tendermint/tendermint/internal/consensus" + "github.com/tendermint/tendermint/internal/evidence" + "github.com/tendermint/tendermint/internal/mempool" + mempoolv0 "github.com/tendermint/tendermint/internal/mempool/v0" + mempoolv1 "github.com/tendermint/tendermint/internal/mempool/v1" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/pex" + "github.com/tendermint/tendermint/internal/statesync" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" tmstrings "github.com/tendermint/tendermint/libs/strings" - "github.com/tendermint/tendermint/mempool" - mempoolv0 "github.com/tendermint/tendermint/mempool/v0" - mempoolv1 "github.com/tendermint/tendermint/mempool/v1" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/pex" protop2p "github.com/tendermint/tendermint/proto/tendermint/p2p" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" @@ -35,7 +36,6 @@ import ( kv "github.com/tendermint/tendermint/state/indexer/sink/kv" null "github.com/tendermint/tendermint/state/indexer/sink/null" psql "github.com/tendermint/tendermint/state/indexer/sink/psql" - "github.com/tendermint/tendermint/statesync" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/version" diff --git a/rpc/client/rpc_test.go b/rpc/client/rpc_test.go index 23603ec0d..f8962fb35 100644 --- a/rpc/client/rpc_test.go +++ b/rpc/client/rpc_test.go @@ -16,11 +16,11 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/config" + mempl "github.com/tendermint/tendermint/internal/mempool" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" "github.com/tendermint/tendermint/libs/service" - mempl "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/rpc/client" rpchttp "github.com/tendermint/tendermint/rpc/client/http" rpclocal "github.com/tendermint/tendermint/rpc/client/local" diff --git a/rpc/core/consensus.go b/rpc/core/consensus.go index 1473a843d..1767c4b35 100644 --- a/rpc/core/consensus.go +++ b/rpc/core/consensus.go @@ -1,7 +1,7 @@ package core import ( - cm "github.com/tendermint/tendermint/consensus" + cm "github.com/tendermint/tendermint/internal/consensus" tmmath "github.com/tendermint/tendermint/libs/math" ctypes "github.com/tendermint/tendermint/rpc/core/types" rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" diff --git a/rpc/core/env.go b/rpc/core/env.go index c436d0175..3152ee882 100644 --- a/rpc/core/env.go +++ b/rpc/core/env.go @@ -6,12 +6,12 @@ import ( "time" cfg "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/consensus" "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/internal/consensus" + mempl "github.com/tendermint/tendermint/internal/mempool" + "github.com/tendermint/tendermint/internal/p2p" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" - mempl "github.com/tendermint/tendermint/mempool" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/proxy" ctypes "github.com/tendermint/tendermint/rpc/core/types" sm "github.com/tendermint/tendermint/state" diff --git a/rpc/core/mempool.go b/rpc/core/mempool.go index 07743365c..51360166f 100644 --- a/rpc/core/mempool.go +++ b/rpc/core/mempool.go @@ -7,7 +7,7 @@ import ( "time" abci "github.com/tendermint/tendermint/abci/types" - mempl "github.com/tendermint/tendermint/mempool" + mempl "github.com/tendermint/tendermint/internal/mempool" ctypes "github.com/tendermint/tendermint/rpc/core/types" rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" "github.com/tendermint/tendermint/types" diff --git a/rpc/core/net.go b/rpc/core/net.go index 9202a6639..edcf8fffa 100644 --- a/rpc/core/net.go +++ b/rpc/core/net.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ctypes "github.com/tendermint/tendermint/rpc/core/types" rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" ) diff --git a/rpc/core/net_test.go b/rpc/core/net_test.go index d53e55ec8..821cdb663 100644 --- a/rpc/core/net_test.go +++ b/rpc/core/net_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" cfg "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/p2p" rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" ) diff --git a/rpc/core/types/responses.go b/rpc/core/types/responses.go index 1319622ad..3685664eb 100644 --- a/rpc/core/types/responses.go +++ b/rpc/core/types/responses.go @@ -7,8 +7,8 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/bytes" - "github.com/tendermint/tendermint/p2p" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" ) diff --git a/rpc/core/types/responses_test.go b/rpc/core/types/responses_test.go index 111eb2390..77ede62f3 100644 --- a/rpc/core/types/responses_test.go +++ b/rpc/core/types/responses_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) func TestStatusIndexer(t *testing.T) { diff --git a/scripts/json2wal/main.go b/scripts/json2wal/main.go index ef98977d9..d21dc6c44 100644 --- a/scripts/json2wal/main.go +++ b/scripts/json2wal/main.go @@ -14,7 +14,7 @@ import ( "os" "strings" - cs "github.com/tendermint/tendermint/consensus" + cs "github.com/tendermint/tendermint/internal/consensus" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/types" ) diff --git a/scripts/wal2json/main.go b/scripts/wal2json/main.go index 6fa890522..886e5402f 100644 --- a/scripts/wal2json/main.go +++ b/scripts/wal2json/main.go @@ -12,7 +12,7 @@ import ( "io" "os" - cs "github.com/tendermint/tendermint/consensus" + cs "github.com/tendermint/tendermint/internal/consensus" tmjson "github.com/tendermint/tendermint/libs/json" ) diff --git a/state/execution.go b/state/execution.go index 20f47c5b0..4e7d17c1d 100644 --- a/state/execution.go +++ b/state/execution.go @@ -9,8 +9,8 @@ import ( abci "github.com/tendermint/tendermint/abci/types" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" "github.com/tendermint/tendermint/internal/libs/fail" + mempl "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/libs/log" - mempl "github.com/tendermint/tendermint/mempool" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" diff --git a/state/execution_test.go b/state/execution_test.go index 5ccf03b9f..e15b1686f 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -14,8 +14,8 @@ import ( "github.com/tendermint/tendermint/crypto/ed25519" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" "github.com/tendermint/tendermint/crypto/tmhash" + mmock "github.com/tendermint/tendermint/internal/mempool/mock" "github.com/tendermint/tendermint/libs/log" - mmock "github.com/tendermint/tendermint/mempool/mock" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/state/mocks" diff --git a/state/tx_filter.go b/state/tx_filter.go index 52d055966..61340e135 100644 --- a/state/tx_filter.go +++ b/state/tx_filter.go @@ -1,7 +1,7 @@ package state import ( - mempl "github.com/tendermint/tendermint/mempool" + mempl "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/types" ) diff --git a/state/validation_test.go b/state/validation_test.go index 065cef766..d124c6bd1 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -12,9 +12,9 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" + memmock "github.com/tendermint/tendermint/internal/mempool/mock" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - memmock "github.com/tendermint/tendermint/mempool/mock" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/state/mocks" diff --git a/test/e2e/app/main.go b/test/e2e/app/main.go index 68ff63b3f..fd464220d 100644 --- a/test/e2e/app/main.go +++ b/test/e2e/app/main.go @@ -17,6 +17,7 @@ import ( "github.com/tendermint/tendermint/abci/server" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/ed25519" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" tmnet "github.com/tendermint/tendermint/libs/net" "github.com/tendermint/tendermint/light" @@ -24,7 +25,6 @@ import ( lrpc "github.com/tendermint/tendermint/light/rpc" dbs "github.com/tendermint/tendermint/light/store/db" "github.com/tendermint/tendermint/node" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/privval" grpcprivval "github.com/tendermint/tendermint/privval/grpc" privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" diff --git a/test/e2e/runner/setup.go b/test/e2e/runner/setup.go index 545f57958..1baa1f503 100644 --- a/test/e2e/runner/setup.go +++ b/test/e2e/runner/setup.go @@ -20,7 +20,7 @@ import ( "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/ed25519" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/privval" e2e "github.com/tendermint/tendermint/test/e2e/pkg" "github.com/tendermint/tendermint/types" diff --git a/test/fuzz/mempool/checktx.go b/test/fuzz/mempool/checktx.go index 6af446a10..197b0daaf 100644 --- a/test/fuzz/mempool/checktx.go +++ b/test/fuzz/mempool/checktx.go @@ -5,8 +5,8 @@ import ( "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/mempool" - mempoolv0 "github.com/tendermint/tendermint/mempool/v0" + "github.com/tendermint/tendermint/internal/mempool" + mempoolv0 "github.com/tendermint/tendermint/internal/mempool/v0" "github.com/tendermint/tendermint/proxy" ) diff --git a/test/fuzz/p2p/addrbook/fuzz.go b/test/fuzz/p2p/addrbook/fuzz.go index f2799ef04..d0dfe6530 100644 --- a/test/fuzz/p2p/addrbook/fuzz.go +++ b/test/fuzz/p2p/addrbook/fuzz.go @@ -6,8 +6,8 @@ import ( "fmt" "math/rand" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/pex" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/pex" ) var addrBook = pex.NewAddrBook("./testdata/addrbook.json", true) diff --git a/test/fuzz/p2p/addrbook/init-corpus/main.go b/test/fuzz/p2p/addrbook/init-corpus/main.go index ff9dd9107..334793cf1 100644 --- a/test/fuzz/p2p/addrbook/init-corpus/main.go +++ b/test/fuzz/p2p/addrbook/init-corpus/main.go @@ -12,7 +12,7 @@ import ( "path/filepath" "github.com/tendermint/tendermint/crypto/ed25519" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" ) func main() { diff --git a/test/fuzz/p2p/pex/init-corpus/main.go b/test/fuzz/p2p/pex/init-corpus/main.go index 7d574bd5a..6ff962f13 100644 --- a/test/fuzz/p2p/pex/init-corpus/main.go +++ b/test/fuzz/p2p/pex/init-corpus/main.go @@ -11,7 +11,7 @@ import ( "path/filepath" "github.com/tendermint/tendermint/crypto/ed25519" - "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/internal/p2p" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/test/fuzz/p2p/pex/reactor_receive.go b/test/fuzz/p2p/pex/reactor_receive.go index 70f87cc7e..ea13f2a4e 100644 --- a/test/fuzz/p2p/pex/reactor_receive.go +++ b/test/fuzz/p2p/pex/reactor_receive.go @@ -5,10 +5,10 @@ import ( "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/ed25519" + "github.com/tendermint/tendermint/internal/p2p" + "github.com/tendermint/tendermint/internal/p2p/pex" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/p2p/pex" "github.com/tendermint/tendermint/version" ) diff --git a/test/fuzz/p2p/secret_connection/read_write.go b/test/fuzz/p2p/secret_connection/read_write.go index c5c300b17..9701460f5 100644 --- a/test/fuzz/p2p/secret_connection/read_write.go +++ b/test/fuzz/p2p/secret_connection/read_write.go @@ -7,8 +7,8 @@ import ( "log" "github.com/tendermint/tendermint/crypto/ed25519" + sc "github.com/tendermint/tendermint/internal/p2p/conn" "github.com/tendermint/tendermint/libs/async" - sc "github.com/tendermint/tendermint/p2p/conn" ) func Fuzz(data []byte) int {