Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
6f105dd
feat(RPC): scaffolding
deblasis Aug 24, 2022
50f2241
feat(RPC): scaffolding
deblasis Aug 24, 2022
23d3bbd
feat(RPC): scaffolding
deblasis Aug 24, 2022
5330530
fix(RPC): updated config handling
deblasis Aug 24, 2022
d72bf2d
fix(config.proto): updated timeout type
deblasis Aug 25, 2022
be4875d
feat(RPC): basic RPC server with naive sync TX broadcast
deblasis Aug 25, 2022
43bd107
fix(RPC): fixed HTTP method for Health and Version routes
deblasis Aug 25, 2022
4d3331d
style(RPC): format
deblasis Aug 25, 2022
762c85c
refactor(Utility): RPC server RoutesMap for CLI/client use
deblasis Aug 29, 2022
af55e4a
refactor(Utility): RPC server exporting RouteKey and RoutesMap
deblasis Aug 29, 2022
f07965e
feat(Utility): RPC OpenApi spec and code generation
deblasis Sep 6, 2022
20f0185
refactor(Utility): RPC server refactoring using code generation
deblasis Sep 6, 2022
dc51992
feat(Utility): Updated RPC spec
deblasis Sep 7, 2022
0d7c657
feat(Utility): Regenerated RPC boilerplate and updates
deblasis Sep 7, 2022
07a6349
docs(Utility): RPC and node docs barebones + RPC spec notes
deblasis Sep 7, 2022
4aa4447
refactor(Shared): RPC config defaults -changing soon,I'm centralizin
deblasis Sep 7, 2022
3ed73dd
fix(Utility): RPC: updated to use test_artifacts defaults
deblasis Sep 7, 2022
6548150
docs(Utility): RPC and node basic docs
deblasis Sep 7, 2022
ecb0f07
chore(Utility): fixed versioning schema
deblasis Sep 8, 2022
6123cbb
Merge remote-tracking branch 'upstream/main' into issue/utility_local…
deblasis Sep 15, 2022
c725570
fix(Utility): RPC configs post-merge
deblasis Sep 15, 2022
9e4501e
feat(Consensus): configOptions
deblasis Sep 15, 2022
015915d
feat(P2P): configOptions
deblasis Sep 15, 2022
5178e60
fix(Utility): RPC fix post merge
deblasis Sep 15, 2022
761ceea
fix(Utility): RPC disabled by default because of TECHDEBT
deblasis Sep 15, 2022
9d5f130
Merge remote-tracking branch 'upstream/main' into issue/utility_local…
deblasis Oct 14, 2022
5433bbf
fix(RPC): test_artifacts in runtime
deblasis Oct 14, 2022
a9bd32d
fix(go.mod): tidy
deblasis Oct 14, 2022
8fd61cd
fix(RPC): added imports used in codegen files
deblasis Oct 17, 2022
267099c
feat(RPC): config proto
deblasis Oct 17, 2022
4da3f54
feat(RPC): RPCModule and noopRpcModule
deblasis Oct 17, 2022
a5668c6
refactor(Shared): shared.Create -> shared.CreateNode
deblasis Oct 17, 2022
843bc0c
docs(RPC): updated code organization post refactoring
deblasis Oct 18, 2022
4ea5f2c
Merge remote-tracking branch 'upstream/main' into issue/utility_local…
deblasis Oct 25, 2022
ab28db1
fix(RPC): gitignoring generated files
deblasis Oct 19, 2022
b4e074d
refactor(Consensus): mocks with Return(nil) and not Do(...)
deblasis Oct 25, 2022
e21da21
docs(RPC): updated changelog versions
deblasis Oct 25, 2022
020232a
fix(Makefile): generate_rpc_openapi
deblasis Oct 25, 2022
3fa07a2
fix(Makefile): fix for git clone + make develop_test
deblasis Oct 25, 2022
26bedd7
Update rpc/v1/openapi.yaml
deblasis Oct 25, 2022
2ea4c29
Merge branch 'issue/utility_local_proof_of_stake_cli_RPC' of github.c…
deblasis Oct 25, 2022
a386526
Update rpc/doc/CHANGELOG.md
deblasis Oct 25, 2022
6060489
Update rpc/noop_module.go
deblasis Oct 25, 2022
b817942
Merge branch 'issue/utility_local_proof_of_stake_cli_RPC' of github.c…
deblasis Oct 25, 2022
976af85
chore(Shared): added TODOes for ValidateXXX() in modules
deblasis Oct 25, 2022
0fafac5
docs(RPC): broadcast_tx_sync summary updated
deblasis Oct 25, 2022
d620226
Update rpc/doc/README.md
deblasis Oct 25, 2022
3f8d614
Update rpc/doc/README.md
deblasis Oct 25, 2022
5e30739
Update rpc/doc/README.md
deblasis Oct 25, 2022
9b63346
Merge branch 'issue/utility_local_proof_of_stake_cli_RPC' of github.c…
deblasis Oct 25, 2022
1931fbb
fix(Makefile): gitignoring generated files breaks tests fix
deblasis Oct 25, 2022
b495a0c
feat(Consensus): CurrentRound() and CurrentStep()
deblasis Oct 31, 2022
2e07000
feat(RPC): /v1/consensus/round_state
deblasis Oct 31, 2022
cb3e615
feat(RPC): /v1/consensus/round_state handler
deblasis Oct 31, 2022
7c3a741
docs(Docs): Adding some more color config + raw_hex_bytes
deblasis Nov 1, 2022
d1b802f
chore(Runtime): comment spacing
deblasis Nov 2, 2022
3550f4d
Update runtime/docs/README.md
deblasis Nov 3, 2022
7dc0093
chore(Consensus): SetBus mock Do(func(modules.Bus) {}) -> Return()
deblasis Nov 3, 2022
ef62a95
Merge branch 'issue/utility_local_proof_of_stake_cli_RPC' of github.c…
deblasis Nov 3, 2022
16754c9
docs(Pocket): changelog
deblasis Nov 3, 2022
8e3cf02
Update app/pocket/doc/README.md
deblasis Nov 3, 2022
e023452
Update app/pocket/doc/README.md
deblasis Nov 3, 2022
350f28a
docs(RPC): changelog
deblasis Nov 2, 2022
a6f17a7
Merge branch 'issue/utility_local_proof_of_stake_cli_RPC' of github.c…
deblasis Nov 3, 2022
0cb1d2d
docs(RPC): docs TOC
deblasis Nov 3, 2022
022becd
docs(RPC): Transports -> Endpoints
deblasis Nov 3, 2022
5f2ba8b
feat(Tooling): swagger-ui
deblasis Nov 1, 2022
15e326d
docs(RPC): swagger ui link to editor and ref to make cmd
deblasis Nov 3, 2022
e85f046
feat(rpcServer): rpcServer is now IntegratableModule
deblasis Nov 3, 2022
b26eb91
chore(Shared): tracking TODO (implement validations) #334
deblasis Nov 3, 2022
1f2d6c6
Merge remote-tracking branch 'origin/main' into issue/utility_local_p…
deblasis Nov 3, 2022
ae931be
fix(RPC): merge fix
deblasis Nov 3, 2022
39bc308
chore(go.mod): tidy
deblasis Nov 3, 2022
c268a99
Merge remote-tracking branch 'upstream/main' into issue/utility_local…
deblasis Nov 4, 2022
52bf2c5
docs(RPC): nit
deblasis Nov 4, 2022
e9a742f
fix(RPC): int64 on RoundState fields
deblasis Nov 10, 2022
9958b01
refactor(Shared): unexporting XXModuleName
deblasis Nov 10, 2022
9ba7989
Merge remote-tracking branch 'upstream/main' into issue/utility_local…
deblasis Nov 10, 2022
0b2e2f3
Merge remote-tracking branch 'upstream/main' into issue/utility_local…
deblasis Nov 10, 2022
5ce3563
feat(node): single source of truth for version + overridable
deblasis Nov 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ go_oapi-codegen:
echo "Install with 'go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.11.0'"; \
fi; \
}

.PHONY: go_clean_deps
## Runs `go mod tidy` && `go mod vendor`
go_clean_deps:
Expand Down Expand Up @@ -251,6 +250,7 @@ protogen_local: go_protoc-go-inject-tag
protoc --go_opt=paths=source_relative -I=./p2p/raintree/types/proto --go_out=./p2p/types ./p2p/raintree/types/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./p2p/types/proto --go_out=./p2p/types ./p2p/types/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./telemetry/proto --go_out=./telemetry ./telemetry/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./rpc/types/proto --go_out=./rpc/types ./rpc/types/proto/*.proto --experimental_allow_proto3_optional
echo "View generated proto files by running: make protogen_show"

.PHONY: protogen_docker_m1
Expand All @@ -270,7 +270,12 @@ generate_rpc_openapi: go_oapi-codegen
oapi-codegen --config ./rpc/client.gen.config.yml ./rpc/v1/openapi.yaml > ./rpc/client.gen.go
echo "OpenAPI client and server generated"

## Starts a local Swagger UI instance for the RPC API
swagger-ui:
echo "Attempting to start Swagger UI at http://localhost:8080\n\n"
docker run -p 8080:8080 -e SWAGGER_JSON=/v1/openapi.yaml -v $(shell pwd)/rpc/v1:/v1 swaggerapi/swagger-ui
.PHONY: generate_cli_commands_docs

### (Re)generates the CLI commands docs (this is meant to be called by CI)
generate_cli_commands_docs:
$(eval cli_docs_dir = "app/client/cli/doc/commands")
Expand All @@ -285,12 +290,12 @@ test_all: # generate_mocks

.PHONY: test_all_with_json
## Run all go unit tests, output results in json file
test_all_with_json: # generate_mocks
test_all_with_json: generate_rpc_openapi # generate_mocks
go test -p 1 -json ./... > test_results.json

.PHONY: test_all_with_coverage
## Run all go unit tests, output results & coverage into files
test_all_with_coverage: # generate_mocks
test_all_with_coverage: generate_rpc_openapi # generate_mocks
go test -p 1 -v ./... -covermode=count -coverprofile=coverage.out
go tool cover -func=coverage.out -o=coverage.out

Expand Down
5 changes: 5 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package app

var (
AppVersion = "v0.0.1-pre-alpha.1" // this can be injected at build time with something like: go build -ldflags "-X github.com/pokt-network/pocket/app.AppVersion=v1.0.1" ./app/pocket
)
15 changes: 15 additions & 0 deletions app/pocket/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

All notable changes to this module will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.0.0.0] - 2022-11-02

### Added

- Added the simplest form of feature flagging for the RPC server functionality
- Calling the RPC server entrypoint in a goroutine if enabled
32 changes: 32 additions & 0 deletions app/pocket/doc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Node binary

The node binary is essentially the program that executes the node logic along with its supporting functions like for example the RPC server.

The spirit of the documentation is to continuously update and inform the reader of the general scope of the node binary as breaking, rapid development occurs.

## Flags

Currently, in order to run the node, it's necessary to provide at least two flags:

- `config`: Relative or absolute path to the config file
- `genesis`: Relative or absolute path to the genesis file.

### Example

```bash
pocket -config ./config.json -genesis ./genesis.json
```

## Configuration

The configuration file provides a structured way for configuring various aspects of the node and how it should behave functionally.

Things like "should the RPC server be enabled?", "what port should it be listening to?" are all defined in the config file.

For a detailed overview of all the possible settings, please review `RuntimeMgr` at [README.md](../../../runtime/docs/README.md).

## Genesis

The genesis file contains the initial state (aka genesis) of the blockchain associated with each module. Feel free to dive into the specific modules and their genesis-specific types for more information.

For a detailed overview of all the possible settings, please look in the `RuntimeMgr` [README.md](../../../runtime/docs/README.md).
13 changes: 7 additions & 6 deletions app/pocket/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import (
"flag"
"log"

"github.com/benbjohnson/clock"
"github.com/pokt-network/pocket/app"
"github.com/pokt-network/pocket/runtime"
"github.com/pokt-network/pocket/shared"
)

// See `docs/build/README.md` for details on how this is injected via mage.
var version = "UNKNOWN"

func main() {
configFilename := flag.String("config", "", "Relative or absolute path to the config file.")
genesisFilename := flag.String("genesis", "", "Relative or absolute path to the genesis file.")
Expand All @@ -19,10 +17,13 @@ func main() {
flag.Parse()

if *v {
log.Printf("Version flag currently unused %s\n", version)
log.Printf("Version flag currently unused %s\n", app.AppVersion)
return
}
pocketNode, err := shared.Create(*configFilename, *genesisFilename, clock.New())

runtimeMgr := runtime.NewManagerFromFiles(*configFilename, *genesisFilename)

pocketNode, err := shared.CreateNode(runtimeMgr)
if err != nil {
log.Fatalf("Failed to create pocket node: %s", err)
}
Expand Down
5 changes: 5 additions & 0 deletions build/config/config1.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,10 @@
"enabled": true,
"address": "0.0.0.0:9000",
"endpoint": "/metrics"
},
"rpc": {
"enabled": true,
"port": "50832",
"timeout": 30000
}
}
5 changes: 5 additions & 0 deletions build/config/config2.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,10 @@
"enabled": true,
"address": "0.0.0.0:9000",
"endpoint": "/metrics"
},
"rpc": {
"enabled": true,
"port": "50832",
"timeout": 30000
}
}
5 changes: 5 additions & 0 deletions build/config/config3.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,10 @@
"enabled": true,
"address": "0.0.0.0:9000",
"endpoint": "/metrics"
},
"rpc": {
"enabled": true,
"port": "50832",
"timeout": 30000
}
}
5 changes: 5 additions & 0 deletions build/config/config4.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,10 @@
"enabled": true,
"address": "0.0.0.0:9000",
"endpoint": "/metrics"
},
"rpc": {
"enabled": true,
"port": "50832",
"timeout": 30000
}
}
8 changes: 8 additions & 0 deletions build/deployments/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ services:
- "8080"
- "9080"
- "9000"
- "50832"
ports:
- "7081:7081"
- "8081:8080"
- "9081:9080"
- "50832:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
# Needed for DLV debugging
Expand All @@ -61,10 +63,12 @@ services:
- "8080"
- "9080"
- "9000"
- "50832"
ports:
- "7082:7082"
- "8082:8080"
- "9082:9080"
- "50833:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
# Needed for DLV debugging
Expand All @@ -87,10 +91,12 @@ services:
- "8080"
- "9080"
- "9000"
- "50832"
ports:
- "7083:7083"
- "8083:8080"
- "9083:9080"
- "50834:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
# Needed for DLV debugging
Expand All @@ -113,10 +119,12 @@ services:
- "8080"
- "9080"
- "9000"
- "50832"
ports:
- "7084:7084"
- "8084:8080"
- "9084:9080"
- "50835:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
# Needed for DLV debugging
Expand Down
12 changes: 11 additions & 1 deletion consensus/consensus_tests/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ func CreateTestConsensusPocketNode(
p2pMock := baseP2PMock(t, testChannel)
utilityMock := baseUtilityMock(t, testChannel)
telemetryMock := baseTelemetryMock(t, testChannel)
rpcMock := baseRpcMock(t, testChannel)

bus, err := shared.CreateBus(runtimeMgr, persistenceMock, p2pMock, utilityMock, consensusMod.(modules.ConsensusModule), telemetryMock)
bus, err := shared.CreateBus(runtimeMgr, persistenceMock, p2pMock, utilityMock, consensusMod.(modules.ConsensusModule), telemetryMock, rpcMock)
require.NoError(t, err)

pk, err := cryptoPocket.NewPrivateKey(runtimeMgr.GetConfig().GetBaseConfig().GetPrivateKey())
Expand Down Expand Up @@ -394,6 +395,15 @@ func baseTelemetryMock(t *testing.T, _ modules.EventsChannel) *modulesMock.MockT
return telemetryMock
}

func baseRpcMock(t *testing.T, _ modules.EventsChannel) *modulesMock.MockRPCModule {
ctrl := gomock.NewController(t)
rpcMock := modulesMock.NewMockRPCModule(ctrl)
rpcMock.EXPECT().Start().Return(nil).AnyTimes()
rpcMock.EXPECT().SetBus(gomock.Any()).Return().AnyTimes()

return rpcMock
}

func baseTelemetryTimeSeriesAgentMock(t *testing.T) *modulesMock.MockTimeSeriesAgent {
ctrl := gomock.NewController(t)
timeSeriesAgentMock := modulesMock.NewMockTimeSeriesAgent(ctrl)
Expand Down
4 changes: 2 additions & 2 deletions consensus/leader_election/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

const (
LeaderElectionModuleName = "leader_election"
leaderElectionModuleName = "leader_election"
)

type LeaderElectionModule interface {
Expand Down Expand Up @@ -40,7 +40,7 @@ func (m *leaderElectionModule) Stop() error {
}

func (m *leaderElectionModule) GetModuleName() string {
return LeaderElectionModuleName
return leaderElectionModuleName
}

func (m *leaderElectionModule) SetBus(pocketBus modules.Bus) {
Expand Down
13 changes: 11 additions & 2 deletions consensus/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

const (
DefaultLogPrefix = "NODE" // TODO(#164): Make implicit when logging is standardized
ConsensusModuleName = "consensus"
consensusModuleName = "consensus"
)

var (
Expand Down Expand Up @@ -181,7 +181,7 @@ func (m *consensusModule) Stop() error {
}

func (m *consensusModule) GetModuleName() string {
return ConsensusModuleName
return consensusModuleName
}

func (m *consensusModule) GetBus() modules.Bus {
Expand All @@ -198,6 +198,7 @@ func (m *consensusModule) SetBus(pocketBus modules.Bus) {
}

func (*consensusModule) ValidateConfig(cfg modules.Config) error {
// TODO (#334): implement this
return nil
}

Expand Down Expand Up @@ -259,6 +260,14 @@ func (m *consensusModule) CurrentHeight() uint64 {
return m.Height
}

func (m *consensusModule) CurrentRound() uint64 {
return m.Round
}

func (m *consensusModule) CurrentStep() uint64 {
return uint64(m.Step)
}

func (m *consensusModule) ValidatorMap() modules.ValidatorMap { // TODO: This needs to be dynamically updated during various operations and network changes.
return typesCons.ValidatorMapToModulesValidatorMap(m.validatorMap)
}
Expand Down
4 changes: 2 additions & 2 deletions consensus/pacemaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const (
PacemakerModuleName = "pacemaker"
pacemakerModuleName = "pacemaker"
)

type Pacemaker interface {
Expand Down Expand Up @@ -93,7 +93,7 @@ func (p *paceMaker) Stop() error {
}

func (p *paceMaker) GetModuleName() string {
return PacemakerModuleName
return pacemakerModuleName
}

func (m *paceMaker) SetBus(pocketBus modules.Bus) {
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ require (
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/swag v0.19.5 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/invopop/yaml v0.1.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
Expand Down Expand Up @@ -110,6 +111,7 @@ require (
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect
golang.org/x/text v0.3.8 // indirect
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
golang.org/x/tools v0.1.12 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
Expand Down Expand Up @@ -711,6 +713,8 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE=
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
Expand Down
5 changes: 3 additions & 2 deletions p2p/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
var _ modules.P2PModule = &p2pModule{}

const (
P2PModuleName = "p2p"
p2pModuleName = "p2p"
)

type p2pModule struct {
Expand Down Expand Up @@ -82,7 +82,7 @@ func (m *p2pModule) GetBus() modules.Bus {
}

func (m *p2pModule) GetModuleName() string {
return P2PModuleName
return p2pModuleName
}

func (m *p2pModule) Start() error {
Expand Down Expand Up @@ -163,6 +163,7 @@ func (m *p2pModule) Send(addr cryptoPocket.Address, msg *anypb.Any, topic debug.
}

func (*p2pModule) ValidateConfig(cfg modules.Config) error {
// TODO (#334): implement this
return nil
}

Expand Down
Loading