Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Core] Consolidate all node configurations into a new configs package - (Issue #396) #403

Merged
merged 122 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
80eb15b
refactor(shared): centralized config_protos
deblasis Dec 15, 2022
35b128a
feat(test_artifacts): deterministic keygen
deblasis Dec 15, 2022
df5c92e
refactor(runtime): refactored to use centralized configs
deblasis Dec 15, 2022
97803dd
refactor(Consensus): refactored to use centralized config
deblasis Dec 15, 2022
d439459
refactor(logger): refactored to use centralized logging
deblasis Dec 15, 2022
807086f
refactor(P2P): refactored to use centralized configs
deblasis Dec 15, 2022
774e9fd
refactor(Persistence): refactored to use centralized configs
deblasis Dec 15, 2022
c88f455
refactor(RPC): refactored to use centralized configs
deblasis Dec 15, 2022
d2f3ba7
refactor(telemetry): refactored to use centralized configs
deblasis Dec 15, 2022
ab115f6
refactor(Utility): refactored to use centralized configs
deblasis Dec 15, 2022
80a7ba2
refactor(shared): refactored to use centralized configs
deblasis Dec 15, 2022
6187b29
style(shared): 🧹
deblasis Dec 15, 2022
fe88719
refactor(config): removed baseconfig, added max_mempool_count
deblasis Dec 19, 2022
375fcac
refactor(config): removed base_config
deblasis Dec 19, 2022
2ea6b95
refactor(genesis): single genesis
deblasis Dec 19, 2022
f599882
refactor(core): core types
deblasis Dec 19, 2022
43c560f
refactor(shared): core types
deblasis Dec 19, 2022
f60517b
refactor(genesis): centralized genesis
deblasis Dec 19, 2022
a689e90
refactor(consensus): removed converter
deblasis Dec 19, 2022
b4a5fd9
refactor(persistence): removed converter
deblasis Dec 19, 2022
535130d
chore(go.mod): tidy
deblasis Dec 19, 2022
00de795
refactor(consensus): centralized genesis + core types
deblasis Dec 19, 2022
0165bd4
refactor(persistence): centralized genesis + core types
deblasis Dec 19, 2022
2248e74
refactor(p2p): centralized genesis + core types
deblasis Dec 19, 2022
fa09298
refactor(runtime): centralized genesis + core types
deblasis Dec 19, 2022
f71d831
refactor(utility): centralized genesis + core types
deblasis Dec 19, 2022
910b20e
refactor(shared): centralized genesis + core types
deblasis Dec 19, 2022
4da6cbb
chore(telemetry): simplified interface
deblasis Dec 19, 2022
75fa712
refactor(makefile): updated to handle relocated protos
deblasis Dec 19, 2022
31a4013
wip new RPC endpoints
deblasis Dec 19, 2022
0b56298
test(consensus): fixes
deblasis Dec 19, 2022
f52182f
chore(consensus): 🧹
deblasis Dec 19, 2022
8e02599
chore(runtime): 🧹
deblasis Dec 19, 2022
04c75d4
chore(Makefile): | | |
deblasis Dec 19, 2022
b54cc52
refactor(persistence): genesis stakedActorsInsertConfigs
deblasis Dec 20, 2022
052c491
style(persistence): nit
deblasis Dec 21, 2022
01a1fb2
style(persistence): nits
deblasis Dec 21, 2022
b6d86fd
style(persistence): nits
deblasis Dec 21, 2022
27db554
style(persistence): nits
deblasis Dec 21, 2022
20f862d
style(runtime): nits
deblasis Dec 21, 2022
7396e81
docs(runtime): changelog
deblasis Dec 21, 2022
f37f02a
docs(consensus): changelog
deblasis Dec 21, 2022
b50bd6a
docs(persistence): changelog
deblasis Dec 21, 2022
2b04333
chore(persistence): 🧹
deblasis Dec 21, 2022
a49a8cd
chore(utility): spacing
deblasis Dec 21, 2022
cf55682
docs(utility): changelog
deblasis Dec 21, 2022
285932f
docs(P2P): changelog
deblasis Dec 21, 2022
4e2cc72
chore(P2P): nits
deblasis Dec 21, 2022
829e2ff
docs(RPC): changelog
deblasis Dec 21, 2022
a89f218
docs(shared): changelog
deblasis Dec 21, 2022
9dfafb9
refactor(consensus): ValidatorMap pointers vs values
deblasis Dec 26, 2022
7cb47dc
chore(persistence): cleanup
deblasis Dec 26, 2022
a09c234
chore(runtime): nits
deblasis Dec 26, 2022
7b576df
chore(runtime): fixed issue reference
deblasis Dec 26, 2022
0a9f151
chore(core): added todo reference
deblasis Dec 26, 2022
eb685fb
refactor(core): protos using core, utilTypes phased out
deblasis Dec 26, 2022
ceb768e
refactor(CLI): updated to use coreTypes instead of utilTypes
deblasis Dec 26, 2022
82e463c
refactor(runtime): updated to use coreTypes instead of utilTypes
deblasis Dec 26, 2022
555bdc2
refactor(core): ActorType.GetName()
deblasis Dec 26, 2022
b8b6674
refactor(utility): updated to use coreTypes instead of utilTypes
deblasis Dec 26, 2022
c7d1326
fix(core): pool_names value fix
deblasis Dec 26, 2022
469635a
refactor(core): enum simplification, removed trailing _POOL
deblasis Dec 27, 2022
d9da996
Update Makefile
deblasis Dec 27, 2022
5bef1b1
Update persistence/genesis.go
deblasis Dec 27, 2022
8ceecb3
refactor(runtime): factoring instead of sync.Once
deblasis Dec 27, 2022
8561177
chore(runtime): cleanup
deblasis Dec 27, 2022
5df685c
refactor(runtime): parseGenesisJSON -> parseGenesis
deblasis Dec 27, 2022
f5694ab
refactor(shared): node -> serviceNode
deblasis Dec 27, 2022
196845e
refactor(runtime): simplified keygen
deblasis Dec 27, 2022
d16a455
fix(persistence): genesis pool handling
deblasis Dec 27, 2022
7f64ccb
Update runtime/test_artifacts/generator.go
deblasis Dec 27, 2022
ece9cf8
fix(persistence): added missing actortype to queries
deblasis Dec 27, 2022
8305e6e
fix(P2P): ActorsToAddrBook considers only validators
deblasis Dec 27, 2022
048ebbc
fix(core): PoolNames FriendlyName()
deblasis Dec 27, 2022
0db801d
docs(demos): iteration 3 demo keys management
deblasis Dec 27, 2022
5bacd1b
fix(P2P): added missing ActorType in tests
deblasis Dec 27, 2022
8a9c0ae
fix(utility): poolName friendlyName
deblasis Dec 27, 2022
505a104
test(persistence): updated statehash in deterministic test
deblasis Dec 27, 2022
3cfd657
refactor(runtime): default config handling and separation
deblasis Dec 28, 2022
2c420c7
feat(genesis): params are not hardcoded anymore
deblasis Dec 28, 2022
0d62c5b
test(utility): defaults from test_artifacts
deblasis Dec 28, 2022
10e04cc
fix(config): removed redundant cfg (now we have defaults logic)
deblasis Dec 28, 2022
e9cc6e8
Update utility/types/proto/stake_status.proto
deblasis Dec 28, 2022
1e6ceab
Revert "Update utility/types/proto/stake_status.proto"
deblasis Dec 28, 2022
623999f
docs(utility): linked issue #258 to todo item
deblasis Dec 28, 2022
e9ebc6e
refactor(test_artifacts): DRY config generation logic
deblasis Dec 28, 2022
4e24c6a
docs(build): CHANGELOG
deblasis Dec 28, 2022
b26663f
docs(build): typo
deblasis Dec 28, 2022
be6ba7d
docs(logger): CHANGELOG
deblasis Dec 28, 2022
df13c44
docs(telemetry): CHANGELOG
deblasis Dec 28, 2022
c47ddfa
docs(consensus): CHANGELOG
deblasis Dec 28, 2022
31c79db
docs(P2P): CHANGELOG
deblasis Dec 28, 2022
00dc7f4
docs(persistence): CHANGELOG
deblasis Dec 28, 2022
ea999af
docs(RPC): CHANGELOG
deblasis Dec 28, 2022
9edd1e4
docs(runtime): CHANGELOG
deblasis Dec 28, 2022
2d58822
docs(shared): CHANGELOG
deblasis Dec 28, 2022
834b885
docs(utility): CHANGELOG
deblasis Dec 28, 2022
f6100ad
docs(persistence): CHANGELOG consolidation
deblasis Dec 28, 2022
c91a7ad
Merge remote-tracking branch 'upstream/main' into issue/396-consolida…
deblasis Dec 28, 2022
a4fa535
docs(CLI): CHANGELOG
deblasis Dec 28, 2022
8d02ad5
fix(CLI): CHANGELOG versioning
deblasis Dec 28, 2022
ff57847
Update docs/demos/iteration_3_end_to_end_tx.md
deblasis Dec 30, 2022
4bddf5f
Update docs/demos/iteration_3_end_to_end_tx.md
deblasis Dec 30, 2022
0532b07
Update persistence/docs/CHANGELOG.md
deblasis Dec 30, 2022
c86f8c5
refactor(persistence): s/InitParams/InitGenesisParams
deblasis Dec 30, 2022
69cb8eb
docs(runtime): config options godoc
deblasis Dec 30, 2022
00ae143
refactor(runtime): default values in defaults package
deblasis Dec 30, 2022
5b237f2
refactor(core): poolNames -> pools
deblasis Dec 30, 2022
8d9cb1a
docs(P2P): added TODO
deblasis Dec 30, 2022
d7a521e
refactor(persistence): actorType from schema
deblasis Dec 30, 2022
b8d1946
chore(shared): CHANGELOG 📆
deblasis Dec 30, 2022
fb42810
test(persistence): added test for GetAllStakedActors
deblasis Jan 3, 2023
6ff3c3a
refactor(persistence): actorType set in getActorForRow
deblasis Jan 3, 2023
414276a
chore(persistence): argument types in InsertFn
deblasis Jan 3, 2023
d82b018
docs(shared): CHANGELOGs dates
deblasis Jan 3, 2023
6dea794
chore(shared): rm val keys
deblasis Jan 3, 2023
52b500b
chore(gitignore): added validator keys
deblasis Jan 3, 2023
ac0e99d
docs(iteration3demo): updated to source keys from /tmp/
deblasis Jan 3, 2023
3524dc9
docs(P2P): added todo #426
deblasis Jan 3, 2023
636638f
docs(CLI): updated README
deblasis Jan 3, 2023
2f73d5e
docs(runtime): updated README
deblasis Jan 3, 2023
26ef163
docs(development): README
deblasis Jan 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@ rpc/client.gen.go
build/config/gen*.json

# Ignored generated files by build
bin/*
bin/*

# Validator keys used for testing/demoes
val1.json
val2.json
23 changes: 12 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,18 +243,19 @@ protogen_clean: ## Remove all the generated protobufs.
.PHONY: protogen_local
protogen_local: go_protoc-go-inject-tag ## Generate go structures for all of the protobufs
$(eval proto_dir = ".")
protoc --go_opt=paths=source_relative -I=./shared/messaging/proto --go_out=./shared/messaging ./shared/messaging/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./shared/codec/proto --go_out=./shared/codec ./shared/codec/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./persistence/indexer/proto --go_out=./persistence/indexer/ ./persistence/indexer/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./persistence/proto --go_out=./persistence/types ./persistence/proto/*.proto --experimental_allow_proto3_optional
# TODO: Use a forloop to avoid all the code duplication and improve readability
protoc --go_opt=paths=source_relative -I=./shared/messaging/proto --go_out=./shared/messaging ./shared/messaging/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./shared/codec/proto --go_out=./shared/codec ./shared/codec/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./persistence/indexer/proto --go_out=./persistence/indexer ./persistence/indexer/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./shared/ -I=./persistence/proto --go_out=./persistence/types ./persistence/proto/*.proto --experimental_allow_proto3_optional
protoc-go-inject-tag -input="./persistence/types/*.pb.go"
protoc --go_opt=paths=source_relative -I=./utility/types/proto --go_out=./utility/types ./utility/types/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./consensus/types/proto --go_out=./consensus/types ./consensus/types/proto/*.proto --experimental_allow_proto3_optional
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=./logger/proto --go_out=./logger ./logger/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
protoc --go_opt=paths=source_relative -I=./shared/ -I=./utility/types/proto --go_out=./utility/types ./utility/types/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./consensus/types/proto --go_out=./consensus/types ./consensus/types/proto/*.proto --experimental_allow_proto3_optional
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=./runtime/configs/proto --go_out=./runtime/configs ./runtime/configs/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./shared/core/types/proto --go_out=./shared/core/types ./shared/core/types/proto/*.proto --experimental_allow_proto3_optional
protoc --go_opt=paths=source_relative -I=./shared/ -I=./runtime/genesis/proto --go_out=./runtime/genesis ./runtime/genesis/proto/*.proto --experimental_allow_proto3_optional
protoc-go-inject-tag -input="./runtime/genesis/*.pb.go"
echo "View generated proto files by running: make protogen_show"

.PHONY: protogen_docker_m1
Expand Down
11 changes: 6 additions & 5 deletions app/client/cli/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"regexp"
"strings"

coreTypes "github.com/pokt-network/pocket/shared/core/types"
typesUtil "github.com/pokt-network/pocket/utility/types"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -34,17 +35,17 @@ type (
cmdOption func(*cobra.Command)
actorCmdDef struct {
Name string
ActorType typesUtil.ActorType
ActorType coreTypes.ActorType
Options []cmdOption
}
)

func NewActorCommands(cmdOptions []cmdOption) []*cobra.Command {
actorCmdDefs := []actorCmdDef{
{"Application", typesUtil.ActorType_App, cmdOptions},
{"Node", typesUtil.ActorType_ServiceNode, cmdOptions},
{"Fisherman", typesUtil.ActorType_Fisherman, cmdOptions},
{"Validator", typesUtil.ActorType_Validator, cmdOptions},
{"Application", coreTypes.ActorType_ACTOR_TYPE_APP, cmdOptions},
{"Node", coreTypes.ActorType_ACTOR_TYPE_SERVICENODE, cmdOptions},
{"Fisherman", coreTypes.ActorType_ACTOR_TYPE_FISH, cmdOptions},
{"Validator", coreTypes.ActorType_ACTOR_TYPE_VAL, cmdOptions},
}

cmds := make([]*cobra.Command, len(actorCmdDefs))
Expand Down
11 changes: 8 additions & 3 deletions app/client/cli/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.2] - 2022-11-02
## [0.0.0.3] - 2023-01-03

- Updated to use `coreTypes` instead of utility types for `Actor` and `ActorType`
- Updated README.md

## [0.0.0.2] - 2022-11-02

### Added

Expand All @@ -16,13 +21,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- System commands working end-to-end
- Added Consensus State commands

## [0.0.1] - 2022-09-09
## [0.0.0.1] - 2022-09-09

### Added

- Commands documentation generator

## [0.0.0] - 2022-09-07
## [0.0.0.0] - 2022-09-07

### Added

Expand Down
1 change: 1 addition & 0 deletions app/client/cli/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Command tree available [here](./commands/client.md)
│ │ └── main.go # commands specific documentation generator
│ ├── gov.go # Governance subcommand
│ ├── utils.go # support functions
│ ├── system.go # System subcommand
│ └── utils_test.go # tests for the support functions
└── main.go # entrypoint
```
6 changes: 2 additions & 4 deletions build/config/config1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"base": {
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "6fd0bc54cc2dd205eaf226eebdb0451629b321f11d279013ce6fdd5a33059256b2eda2232ffb2750bf761141f70f75a03a025f65b2b2b417c7f8b3c9ca91e8e4"
},
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "6fd0bc54cc2dd205eaf226eebdb0451629b321f11d279013ce6fdd5a33059256b2eda2232ffb2750bf761141f70f75a03a025f65b2b2b417c7f8b3c9ca91e8e4",
"consensus": {
"max_mempool_bytes": 500000000,
"pacemaker_config": {
Expand Down
6 changes: 2 additions & 4 deletions build/config/config2.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"base": {
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "5db3e9d97d04d6d70359de924bb02039c602080d6bf01a692bad31ad5ef93524c16043323c83ffd901a8bf7d73543814b8655aa4695f7bfb49d01926fc161cdb"
},
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "5db3e9d97d04d6d70359de924bb02039c602080d6bf01a692bad31ad5ef93524c16043323c83ffd901a8bf7d73543814b8655aa4695f7bfb49d01926fc161cdb",
"consensus": {
"max_mempool_bytes": 500000000,
"pacemaker_config": {
Expand Down
6 changes: 2 additions & 4 deletions build/config/config3.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"base": {
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "b37d3ba2f232060c41ba1177fea6008d885fcccad6826d64ee7d49f94d1dbc49a8b6be75d7551da093f788f7286c3a9cb885cfc8e52710eac5f1d5e5b4bf19b2"
},
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "b37d3ba2f232060c41ba1177fea6008d885fcccad6826d64ee7d49f94d1dbc49a8b6be75d7551da093f788f7286c3a9cb885cfc8e52710eac5f1d5e5b4bf19b2",
"consensus": {
"max_mempool_bytes": 500000000,
"pacemaker_config": {
Expand Down
6 changes: 2 additions & 4 deletions build/config/config4.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"base": {
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "c6c136d010d07d7f5e9944aa3594a10f9210dd3e26ebc1bc1516a6d957fd0df353ee26c82826694ffe1773d7b60d5f20dd9e91bdf8745544711bec5ff9c6fb4a"
},
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "c6c136d010d07d7f5e9944aa3594a10f9210dd3e26ebc1bc1516a6d957fd0df353ee26c82826694ffe1773d7b60d5f20dd9e91bdf8745544711bec5ff9c6fb4a",
"consensus": {
"max_mempool_bytes": 500000000,
"pacemaker_config": {
Expand Down
Loading