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

[Utility] Local Proof of Stake CLI #112

Closed
14 of 16 tasks
Olshansk opened this issue Jul 14, 2022 · 13 comments · Fixed by #169
Closed
14 of 16 tasks

[Utility] Local Proof of Stake CLI #112

Olshansk opened this issue Jul 14, 2022 · 13 comments · Fixed by #169
Assignees
Labels
client work needed to interface with the node (rpc, cli, etc..) core Core infrastructure - protocol related utility Utility specific changes

Comments

@Olshansk
Copy link
Member

Olshansk commented Jul 14, 2022

Objective

Create an entry point to interact with the local proof of stake blockchain actors for testing, development and automation purposes.

Origin Document

In order to test, develop and drive consensus in V1, we developed the Pocket v1 client to send a few simple transactions such as printing node state, triggering next view , etc...

Similar to Tendermint's abci-cli tool, we need to expand the functionality of the pocket-dev-cli to fit our needs for the time being.

Goals / Deliverables

  • Determine if the existing client suffices to fit these needs (i.e. passing params for addresses and values)
  • Define and document the list of commands to be added (e.g. stake, unstake, pause, unpause, send, etc...)
  • Update the node so the request is propagated appropriately
  • If needed, create the appropriate interfaces in the utility module (or other) to pass through or mock the request
    Bonus:
  • Start rough notes for an RPC spec
  • Compile a listen of examples and references of other RPC specs for next steps

General issue checklist

Non-goals

  • Create a fully-fledged RPC specification similar to Tendermint
  • Have functional end-to-end utility messages being submitted

Testing Methodology

  • Utility specific tests: make test_utility_*
  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md
    Remove

Creator: @Olshansk
Co-Owners: @andrewnguyen22

@Olshansk Olshansk added utility Utility specific changes priority:high labels Jul 14, 2022
@Olshansk Olshansk added the core Core infrastructure - protocol related label Jul 26, 2022
@deblasis
Copy link
Contributor

deblasis commented Aug 1, 2022

Hi there! I'll start having a look at this sometime today if that's OK :)

Goals / Deliverables

1) Determine if the existing client suffices to fit these needs (i.e. passing params for addresses and values)

The existing client provides access to 4 debug commands triggered by "broadcasting" the corresponding message.
utility/proto/message.proto describes the messages that the new/updated utility CLI should be capable of handling and indeed it looks like we should be able to handle inputs in the form of promptui prompts but also we need to handle arguments passed as flags via the CLI for automation and usage without having to wait for a user's input in general.

That said I believe that the current client should be refactored using cobra and that the current behaviour should be made available to the user under a subcommand:
eg:

./client debug

The documentation and also stuff like make client_connect should be updated to point to that subcommand.

Potentially, we could also provide direct access to the current options (ResetToGenesis, PrintNodeState, TriggerNextView, TogglePacemakerMode) via the CLI:

eg:

./client debug ResetToGenesis

I trust your judgement on this. From an implementation cost POV it's quite trivial.

2) Define and document the list of commands to be added (e.g. stake, unstake, pause, unpause, send, etc...)

As I mentioned in 1) I believe that the utility related commands should be the ones that broadcast the corresponding messages in utility/proto/message.proto, therefore (at the time of writing we are at commit 3f42f13):

  • Send
  • Stake
  • EditStake
  • Unstake
  • Unpause
  • ChangeParameter
  • DoubleSgn

I have a couple of questions:

  1. Curiously I can't find a MessagePause what am I missing?
  2. if DoubleSign is in scope, how do you feel about a JSON to describe the Vote type for vote_a and vote_b via the CLI?
  3. since the majority of these messages have an ActorType, from an UX perspective we need to define what would be the most correct form, semantically speaking.
    If we want to send an amount of 10 from 0xfromaddress to 0xtoaddress for the actorType App
    we could have
./client utility send --from 0xfromaddress --to 0xtoaddress --amount 10 --actor_type App

or

./client utility App send --from 0xfromaddress --to 0xtoaddress --amount 10

or

./client utility send App --from 0xfromaddress --to 0xtoaddress --amount 10

I am experienced enough to have a preference, so I am looking for your feedback/guidance on the best UX and therefore design here.

That's all for now I guess, I'll wait for your input about this before proceeding any further.

👋 :)

@Olshansk
Copy link
Member Author

Olshansk commented Aug 1, 2022

1) Determine if the existing client suffices to fit these needs (i.e. passing params for addresses and values)

That said I believe that the current client should be refactored using cobra and that the current behaviour should be made available to the user under a subcommand

Sounds good to me. For reference, the pocket V0 CLI (which forked Tendermint) uses cobra, and ignite cli also uses cobra in its newer version. I think we can use both of those references for other commands we will need in the future.

Reference: RPC spec for v0: https://docs.pokt.network/core/specs/rpc-spec

That said I believe that the current client should be refactored using cobra and that the current behaviour should be made available to the user under a subcommand:

I like this idea. I wanted to "protocol development" CLI be different and easier to use for development (i.e. using promptui) but didn't think through how to have a single entrpoint. Your suggestion of just having ./client debug is 👌.

Potentially, we could also provide direct access to the current options (ResetToGenesis, PrintNodeState, TriggerNextView, TogglePacemakerMode) via the CLI

Seems a bit overkill for now, so let's hold off on that.

2) Define and document the list of commands to be added (e.g. stake, unstake, pause, unpause, send, etc...)

Curiously I can't find a MessagePause what am I missing?

Not missing anything. I feel like it should be added to message.proto because I can't find it there either... cc @andrewnguyen22 for context.

I think the original idea was that nodes can get paused for potentially byzantine behaviour for a short time, but do not get slashed for some number of blocks. Therefore, "pause" is a protocol level state change, but unpause is something the operator does manually.

With that being said, the spec does enable operators to quickly & temporarily pause their nodes.

The following commands will enable us to get a pocket-specific proof-of-stake :

  • Send
  • Stake
  • EditStake
  • Unstake
  • ChangeParameter
  • The one other request I'd make is being able to send a raw transaction (i.e. a serialized proto) which will enable automation as we add more request types. See Pocket v0 app/cmd/cli/accounts.go for reference.

if DoubleSign is in scope, how do you feel about a JSON to describe the Vote type for vote_a and vote_b via the CLI?

Let's keep it out of scope for this specific PR

since the majority of these messages have an ActorType, from an UX perspective we need to define what would be the most correct form, semantically speaking.

I decided to reference ignite and pocket V0:

Screen Shot 2022-08-01 at 4 35 44 PM

Screen Shot 2022-08-01 at 4 36 33 PM

I would say that semantically utility is something that should be hidden from node operators or app users as it is an implementation-specific module and may change. Here is how I would do it:

Validator specific staking:

./client Validator stake --address 0xval_address_where_priv_key_is_on_file --amount 10

Sending is general to any account:

./client Account send --from 0xval_address_where_priv_key_is_on_file --to 0xtoaddress --amount 10

That's all for now I guess, I'll wait for your input about this before proceeding any further.

Thank you for the amazing questions! I'm also going to sync up offline and set up a time for us to discuss this in more detail, along with @andrewnguyen22, in the #v1-dev channel on discord.

@Olshansk Olshansk moved this to In Progress in V1 Dashboard Aug 2, 2022
@andrewnguyen22
Copy link
Contributor

Not missing anything.

Checkout /utility/doc/changelog.md

  • Removed pause messages and functionality as it is out of scope for the current POS iteration

I think the original idea was that nodes can get paused for potentially byzantine behaviour for a short time, but do not get slashed for some number of blocks. Therefore, "pause" is a protocol level state change, but unpause is something the operator does manually.

Nodes get slashed and then removed from consensus with a 'pause' which in the first iteration will be automatic (like Cosmos). In the subsequent implementation where we add the 'Pocket Specific' stuff, we'll add a manual 'Pause' message for operators who want to temporarily take their node offline without being slashed.

./client Account send --from 0xval_address_where_priv_key_is_on_file --to 0xtoaddress --amount 10

I don't think these flags are necessary. Just make them Cobra parameters

@Olshansk Olshansk removed the status in V1 Dashboard Aug 3, 2022
@Olshansk Olshansk added the community Open to or owned by a non-core team member label Aug 3, 2022
@deblasis
Copy link
Contributor

Thanks for the answers guys!

WIP PR coming soon, I have a non-blocker question:

  1. Private key handling:

image

When you refer to 0xval_address_where_priv_key_is_on_file how do you want me to handle that input? I saw that pocket-core basically uses a keybase that we can query given an address to find the PK but apparently, unless I am blind, there's no similar concept in V1.

@andrewnguyen22
Copy link
Contributor

Hmm we do have a keybase for V1

#150

For now just take it as a --path_to_private_key_file and make the private key plain text json for now

@deblasis
Copy link
Contributor

Hi @andrewnguyen22 and @Olshansk!

Forgive me for the delay, unfortunately, I have been dragged into other things.
This is the first batch of changes in an MVP kind-of fashion, at least I guess it's gonna tell where I am going with this.

Blatantly inspired by V0 and ignite.

Please have a quick look and point out anything that sounds just wrong apart from not implemented yet :)

I understand that this might become a blocker soon so please let me know how you would prefer me to proceed (or not proceed) further.

@Olshansk Olshansk moved this to In Progress in V1 Dashboard Aug 22, 2022
@Olshansk Olshansk added the client work needed to interface with the node (rpc, cli, etc..) label Aug 23, 2022
@Olshansk
Copy link
Member Author

Forgive me for the delay, unfortunately, I have been dragged into other things.
I understand that this might become a blocker soon so please let me know how you would prefer me to proceed (or not proceed) further.

Thanks @deblasis! Going to take a look and leave comments. Also ccing @adshmh who will likely help with the RPC spec and CLI moving forward.

Blatantly inspired by V0 and ignite.

I think that's the right approach here

@deblasis
Copy link
Contributor

deblasis commented Aug 23, 2022

Thanks @deblasis! Going to take a look and leave comments. Also ccing @adshmh who will likely help with the RPC spec and CLI moving forward.

Awesome! Thank you @Olshansk! (nice to meet you @adshmh ! )

I am pushing updates here and there to address the TODOs.

A couple of questions (non blockers):

  1. Regarding the PrivateKey we should currently read from file, should I read a plain text PrivateKey or should I port encryption and passphrase handling like in V0 (basically what's called ArmoredJson and everything around it?)
  2. Since a PrivateKey embeds an address, should I simply ignore the <from> argument in commands when a private key is provided via flag for now?

@Olshansk
Copy link
Member Author

@deblasis

Regarding the PrivateKey we should currently read from file, should I read a plain text PrivateKey or should I port encryption and passphrase handling like in V0 (basically what's called ArmoredJson and everything around it?)

Use a plain text for now. Could you create a separate github issue to make sure we don't forget to use ArmoredJson in the future?

Since a PrivateKey embeds an address, should I simply ignore the argument in commands when a private key is provided via flag for now?

This is heavily dependent on the implementation of the keybase, and I do think that the placeholder + TODO you have in the code so far is the perfect approach to unblock our work. I personally think we should merge it as is to main and iterate once the other dependencies make progress.


Are you still making any modifications on the PRs or should we review and tend to the questions / TODOs throughout? It's look like a really solid foundation for what we need 💯

@deblasis
Copy link
Contributor

deblasis commented Aug 28, 2022

Use a plain text for now. Could you create a separate github issue to make sure we don't forget to use ArmoredJson in the future?

Done: #184 (please check and provide brutally honest feedback 🙂)

This is heavily dependent on the implementation of the keybase, and I do think that the placeholder + TODO you have in the code so far is the perfect approach to unblock our work. I personally think we should merge it as is to main and iterate once the other dependencies make progress.

Awesome!

Are you still making any modifications on the PRs or should we review and tend to the questions / TODOs throughout? It's look like a really solid foundation for what we need 💯

Yes, I am still making changes, tomorrow you should get another batch of changes. I want to make sure that you guys like the command propagation so I was thinking that I'll probably implement one command end to end, ask for a review and then depending on your feedback adjust and complete all of them.

ADDED: actually, I just read that end to end is a non-goal so I will speed this up for faster iteration, anyway, nothing really changes since my ETA is still today (29/08)

@deblasis
Copy link
Contributor

deblasis commented Aug 29, 2022

@Olshansk: I have updated #176 #177 and also #169 which has some extra changes (and also all commits from the other 2 PRs) to basically connect the two parts and provide a complete overview of the changes to address this issue.

In #177 I have only written the "Stake" command and depending on your feedback I'll make the relevant changes and apply them to the other commands as well if necessary (trying to work in an MVP-like way)

@Olshansk Olshansk moved this from In Progress to In Review in V1 Dashboard Sep 4, 2022
@Olshansk Olshansk moved this from In Review to Rescope / decompose in V1 Dashboard Sep 5, 2022
@deblasis
Copy link
Contributor

deblasis commented Sep 7, 2022

@Olshansk , @andrewnguyen22:

Hi guys, please find below something that probably I should have shared at the beginning not now...

Next time I'll try to write down more words, in the form of specs/research/questions before diving into VSCode.

Please let me know if the list is exhaustive enough and/or if you would prefer this in a different format.

Compile a list of examples and references of other RPC specs for next steps:

  • Ethereum - Docs (Spec)

    🏷️ JSON-RPC 2.0 standard, uses OpenRPC.

    🚄 Transport: HTTP API, WebSocket and Unix Domain Sockets.

  • Algorand - Docs (Spec)

    🏷️ not JSON-RPC 2.0 but similar approach (arguments are in array form in the body and the endpoint represents the method call), secure (HTTPS + API token).

    🚄 Transport: HTTP API.

  • Solana Docs

    🏷️ JSON-RPC 2.0 standard.

    🚄 Transport: HTTP API, PubSub WebSocket.

  • Cosmos - Docs

    🏷️ not JSON-RPC 2.0, secure (HTTPS + basic auth).

    🚄 Transport: HTTP API (using gRPC-Gateway with OpenApi generation via protoc plugin), gRPC.

  • Polkadot Docs

    🏷️ JSON-RPC 2.0, secure (HTTPS + basic auth), SDK (javascript library), Sidecar to provide HTTP API

    🚄 Transport: HTTP API, WebSockets.

  • Avalance Docs

    🏷️ JSON-RPC 2.0, secure (HTTPS + JWT token)

    🚄 Transport: HTTP API.

  • Ripple Docs

    🏷️ not JSON-RPC 2.0, secure (HTTPS + JWT token)

    🚄 Transport: HTTP API, WebSockets.

  • Monero Docs

    🏷️ JSON-RPC 2.0, secure (HTTPS + basic auth)

    🚄 Transport: HTTP API, WebSockets.

Takeaways

  • ✅ It looks like that the ubiquitousness of HTTP APIs is here to stay.

  • ❌ The JSON-RPC 2.0 specification is pretty much implemented in the majority of cases and perhaps we should consider doing the same

  • ❌ We should start thinking about security as well at some point

  • ⁉️ Implementing other transport methods could be important. "Build it and they will come"? It would be probably nice to ask node operators from V0 for what they feel like is missing in the RPC and interaction with the nodes in general.

      Guide
      ❌ | ⁉️ = potential action item for next steps
    

@Olshansk
Copy link
Member Author

Olshansk commented Sep 8, 2022

Next time I'll try to write down more words, in the form of specs/research/questions before diving into VSCode

@andrewnguyen22 When are you going to join the VSCode club?

@deblasis This summary & takeaways are amazing! We should definitely review these in a call as a team and capture it somewhere else. Perhaps in a doc alongside the readme or in a github discussion (https://github.com/pokt-network/pocket/discussions) so we can continue the research/conversation even after this PR is closed.

@jessicadaugherty jessicadaugherty moved this from Rescope / decompose to In Review in V1 Dashboard Sep 9, 2022
@jessicadaugherty jessicadaugherty moved this from In Review to In Progress in V1 Dashboard Oct 18, 2022
@jessicadaugherty jessicadaugherty moved this from In Progress to In Review in V1 Dashboard Oct 18, 2022
deblasis added a commit that referenced this issue Nov 3, 2022
…Issue #112 (#177)

## Description

This PR updates the CLI so that it provides access to the **Utility** module commands via RPC calls

## Issue

Part of Issue #112 but we decided to split the work in 2 separate PRs

## Type of change

Please mark the options that are relevant.

- [x] New feature, functionality or library

## List of changes



## [0.0.1] - 2022-09-09
deblasis marked this conversation as resolved.
Show resolved

### Added

- Commands documentation generator
- Basic implementation with Utility commands
  - Account
    - Send
  - Actor (Application, Node, Fisherman, Validator)
    - Stake (Custodial)
    - EditStake
    - Unstake
    - Unpause
  - Governance
    - ChangeParameter
  - Debug
    - Refactored previous CLI into a subcommand
- Functionally mocked a keybase in the form of a json file (default: pk.json) that will contain the privatekey
- CLI calling RPC via generated client
- Default configuration handling/overrides
- Fixed message signing
- Reporting RPC StatusCode and body

## Testing
- [x] `make test_all`
- [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README`

## Checklist

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] If applicable, I have made corresponding changes to related local or global README
- [x] If applicable, I have added new diagrams using [mermaid.js](https://mermaid-js.github.io)
- [x] If applicable, I have added tests that prove my fix is effective or that my feature works
* chore(P2P): discuss comment on redundant line

* feat(CLI): scaffolding

Signed-off-by: Alessandro De Blasis <[email protected]>

* feat(CLI): scaffolding

* feat(CLI): scaffolding

* feat(CLI): scaffolding

Signed-off-by: Alessandro De Blasis <[email protected]>

* typo(P2P): redundant line

* fix(CLI): merge conflict fix

* chore(go.mod): tidy + vendor

* feat(Utility): CLI RPC client function

* feat(Utility): RPC defaults const

* feat(Utility): GetSignBytes

* feat(Utility): CLI utils

* feat(Utility): stake cmd scaffolding

* fix(Utility): CLI: making use of the pwd flag

* fix(Utility): CLI: code review feedback

* fix(Utility): CLI custodial stake command: OutputAddr = fromAddr

* refactor(Utility): CLI: refactor command bindings

Also added missing functionality in commands other than Stake

* refactor(Utility): CLI: named return values fix

* test(Utility): CLI: simplified tests for PK parsing from file

* feat(Utility): RPC OpenApi spec and code generation

* feat(Utility): Updated RPC spec

* docs(Utility): CLI docs barebones

* fix(Utility): CLI: added missing message handling for account

* fix(Shared): fixed RPC config

* feat(Utility): CLI updated to use the generated RPC client

* refactor(Shared): RPC config defaults -changing soon,I'm centralizin

* feat(Utility): CLI: updated to use test_artifacts default

* docs(Utility): CLI: Changelog

* fix(Utility): CLI: fixed output to user. It shouldn't be logging

* fix(Utility): CLI code review feedback

* style(Utility): code review feedback

* feat(Tooling): Updated makefile commands to better handle codegen

* fix(Utility): Fix duplicated models

* feat(Utility): CLI documentation generator + first stab at docs

* fix(Utility): CLI specific fixes

* fix(Utility): types fixes

* fix(Utility): RPC configs post-merge

* feat(Consensus): configOptions

* feat(P2P): configOptions

* feat(Utility): CLI: using configOptions to inject PK

* fix(go.mod): tidy

* fix(CLI): test_artifacts

* fix(go.mod): tidy

* fix(CLI): updated to use new typesUtil.ActorType

* fix(CLI): runtime based init

* fix(test_artifacts): fix

* fix(CLI): runtime using WithRandomPK()

* fix(CLI): fixed client-only initialization

* fix(Makefile): protogen first

* feat(Utility): GetActorName function (can we autogenerate these?)

* fix(CLI): debug commands are now feature flagged

* chore(go.mod): tidy

* chore(CLI): git rm app/pocket/rpc/client.gen.go

* chore(CLI): s/j/tx and s/prepareTx/prepareTxJson

* refactor(shared): converters

* fix(CLI): debug nits

* refactor(CLI): confirmation and credentials

* chore(CLI): removed HACK todo

* fix(Makefile): premature protoc

* fix(RPC): added imports used in codegen files

* refactor(RPC): moved scaffolding into rpc module

* Update app/client/cli/utils.go

Co-authored-by: Daniel Olshansky <[email protected]>

* fix(RPC): gitignoring generated files

* style(Persistence): reverting space change

* refactor(Defaults): runtime/defaults package

* chore(CLI): issue handle

* chore(CLI): Issue #310 links

* refactor(CLI): preallocation fix

* style(CLI): oneMillion

* style(CLI): s/RelayChainIDs/relayChainIDs

* feat(Utility): ActorType.GetName()

* chore(Utility): tracking issue #142

* chore(Utility): GetBytes -> GetCanonicalBytes

* chore(CLI): actorCmd -> accountCmd

* docs(CLI): fromAddr note (address currently sourced from pk)

* chore(Runtime): new default value from main

* refactor(CLI): moving utility functions in utils.go

* chore(CLI): NewDebug -> NewDebugCommand

* docs(CLI): added todos for exactArgs

* feat(RPC): /v1/consensus/round_state

* refactor(CLI): Stake command

* fix(CLI): tx message signing

* feat(CLI): reporting statuscode and body

* Update utility/types/message.go

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Runtime): comment spacing

* docs(CLI): Changelog

* refactor(Consensus): mocks with Return(nil) and not Do(...)

Signed-off-by: Alessandro De Blasis <[email protected]>

* chore(Consensus): SetBus mock Do(func(modules.Bus) {}) -> Return()

Signed-off-by: Alessandro De Blasis <[email protected]>

Signed-off-by: Alessandro De Blasis <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
deblasis added a commit that referenced this issue Nov 11, 2022
… (#176)

## Description

This PR introduces a simple RPC (JSONRPC) server that will be used to interact with the CLI and/or other clients

## Issue

Part of Issue #112 but we decided to split the work in 2 separate PRs

## Type of change

Please mark the options that are relevant.

- [x] New feature, functionality or library

## List of changes

- Updated node to start an RPC server if enabled via config

## Testing

- [x] `make test_all`
- [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README`

## Checklist

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] If applicable, I have made corresponding changes to related local or global README
- [x] If applicable, I have added new diagrams using [mermaid.js](https://mermaid-js.github.io)
- [x] If applicable, I have added tests that prove my fix is effective or that my feature works

* feat(RPC): scaffolding

Signed-off-by: Alessandro De Blasis <[email protected]>

* feat(RPC): scaffolding

* feat(RPC): scaffolding

Signed-off-by: Alessandro De Blasis <[email protected]>

* fix(RPC): updated config handling

* fix(config.proto): updated timeout type

* feat(RPC): basic RPC server with naive sync TX broadcast

* fix(RPC): fixed HTTP method for Health and Version routes

* style(RPC): format

* refactor(Utility): RPC server RoutesMap for CLI/client use

* refactor(Utility): RPC server exporting RouteKey and RoutesMap

for CLI/client use

* feat(Utility): RPC OpenApi spec and code generation

* refactor(Utility): RPC server refactoring using code generation

RPC server refactoring with code generation from openapi spec

* feat(Utility): Updated RPC spec

* feat(Utility): Regenerated RPC boilerplate and updates

* docs(Utility): RPC and node docs barebones + RPC spec notes

* refactor(Shared): RPC config defaults -changing soon,I'm centralizin

Signed-off-by: Alessandro De Blasis <[email protected]>

* fix(Utility): RPC: updated to use test_artifacts defaults

* docs(Utility): RPC and node basic docs

* chore(Utility): fixed versioning schema

* fix(Utility): RPC configs post-merge

* feat(Consensus): configOptions

* feat(P2P): configOptions

* fix(Utility): RPC fix post merge

* fix(Utility): RPC disabled by default because of TECHDEBT

* fix(RPC): test_artifacts in runtime

* fix(go.mod): tidy

* fix(RPC): added imports used in codegen files

* feat(RPC): config proto

* feat(RPC): RPCModule and noopRpcModule

* refactor(Shared): shared.Create -> shared.CreateNode

* docs(RPC): updated code organization post refactoring

* fix(RPC): gitignoring generated files

Signed-off-by: Alessandro De Blasis <[email protected]>

* refactor(Consensus): mocks with Return(nil) and not Do(...)

* docs(RPC): updated changelog versions

* fix(Makefile): generate_rpc_openapi

* fix(Makefile): fix for git clone + make develop_test

* Update rpc/v1/openapi.yaml

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/CHANGELOG.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/noop_module.go

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Shared): added TODOes for ValidateXXX() in modules

* docs(RPC): broadcast_tx_sync summary updated

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* fix(Makefile): gitignoring generated files breaks tests fix

* feat(Consensus): CurrentRound() and CurrentStep()

* feat(RPC): /v1/consensus/round_state

* feat(RPC): /v1/consensus/round_state handler

* docs(Docs): Adding some more color config + raw_hex_bytes

* chore(Runtime): comment spacing

* Update runtime/docs/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Consensus): SetBus mock Do(func(modules.Bus) {}) -> Return()

* docs(Pocket): changelog

* Update app/pocket/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update app/pocket/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* docs(RPC): changelog

* docs(RPC): docs TOC

* docs(RPC): Transports -> Endpoints

* feat(Tooling): swagger-ui

Signed-off-by: Alessandro De Blasis <[email protected]>

* docs(RPC): swagger ui link to editor and ref to make cmd

* feat(rpcServer): rpcServer is now IntegratableModule

* chore(Shared): tracking TODO (implement validations) #334

* fix(RPC): merge fix

* chore(go.mod): tidy

* docs(RPC): nit

* fix(RPC): int64 on RoundState fields

* refactor(Shared): unexporting XXModuleName

* feat(node): single source of truth for version + overridable

Signed-off-by: Alessandro De Blasis <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
deblasis added a commit that referenced this issue Nov 11, 2022
## Description
This PR aims at introducing CLI commands relative to the Utility module: 

- Send
- Stake
- EditStake
- Unstake
- Unpause
- ChangeParameter

Consequently, it introduces an RPC server (HTTP) and the ability to "point" the CLI at specific nodes via flags 

Fixes [issue/112](#112)

## Type of change
Please mark the options that are relevant.

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

- [x] `make test_all`
- [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md)

## Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] If applicable, I have made corresponding changes to related or global README
- [x] If applicable, I have added added new diagrams using [mermaid.js](https://mermaid-js.github.io)
- [x] If applicable, I have added tests that prove my fix is effective or that my feature works

* fix(config.proto): updated timeout type

* feat(RPC): basic RPC server with naive sync TX broadcast

* fix(RPC): fixed HTTP method for Health and Version routes

* chore(go.mod): tidy

* style(RPC): format

* chore(go.mod): tidy + vendor

* feat(Utility): CLI RPC client function

* feat(Utility): RPC defaults const

* feat(Utility): GetSignBytes

* feat(Utility): CLI utils

* feat(Utility): stake cmd scaffolding

* refactor(Utility): RPC server RoutesMap for CLI/client use

* refactor(Utility): RPC server exporting RouteKey and RoutesMap

for CLI/client use

* feat(Utility): CLI

calling updated QueryRPC to point at route from map

* refactor(Utility): RPC server exporting RouteKey and RoutesMap

for CLI/client use

* chore(Utility): Removed TODO

* fix(Utility): CLI: making use of the pwd flag

* fix(Utility): CLI: code review feedback

* fix(Utility): CLI custodial stake command: OutputAddr = fromAddr

* refactor(Utility): CLI: refactor command bindings

Also added missing functionality in commands other than Stake

* fix(Utility): Fix route after merge

* refactor(Utility): CLI: named return values fix

* test(Utility): CLI: simplified tests for PK parsing from file

* feat(Utility): RPC OpenApi spec and code generation

* refactor(Utility): RPC server refactoring using code generation

RPC server refactoring with code generation from openapi spec

* feat(Utility): RPC OpenApi spec and code generation

* feat(Utility): Updated RPC spec

* feat(Utility): Regenerated RPC boilerplate and updates

* docs(Utility): RPC and node docs barebones + RPC spec notes

* feat(Utility): Updated RPC spec

* docs(Utility): CLI docs barebones

* fix(Utility): CLI: added missing message handling for account

* fix(Shared): fixed RPC config

* feat(Utility): CLI updated to use the generated RPC client

* chore(go.mod): tidy

* refactor(Utility): CLI + RPC models in server.gen.go

* style(Utility): removed redundant struct definition

* docs(README.md): fixed LICENSE reference

* docs(README.md): updated with references to CLI, RPC and Node docs

* refactor(Shared): RPC config defaults -changing soon,I'm centralizin

* refactor(Shared): RPC config defaults -changing soon,I'm centralizin

Signed-off-by: Alessandro De Blasis <[email protected]>

* fix(Utility): RPC: updated to use test_artifacts defaults

* refactor(Shared): RPC config defaults -changing soon,I'm centralizin

* feat(Utility): CLI: updated to use test_artifacts default

* docs(Utility): RPC and node basic docs

* docs(Utility): CLI: Changelog

* fix(Utility): CLI: fixed output to user. It shouldn't be logging

* fix(Utility): CLI code review feedback

* style(Utility): code review feedback

* feat(Tooling): Updated makefile commands to better handle codegen

* feat(Tooling): Updated makefile commands to better handle codegen

Signed-off-by: Alessandro De Blasis <[email protected]>

* fix(Utility): Fix duplicated models

* chore(Utility): fixed versioning schema

* feat(Utility): CLI documentation generator + first stab at docs

* fix(Utility): CLI specific fixes

* fix(Utility): types fixes

* fix(Utility): RPC configs post-merge

* feat(Consensus): configOptions

* feat(P2P): configOptions

* feat(Utility): CLI: using configOptions to inject PK

* fix(Utility): RPC configs post-merge

* feat(Consensus): configOptions

* feat(P2P): configOptions

* fix(Utility): RPC fix post merge

* fix(Utility): RPC disabled by default because of TECHDEBT

* chore(go.mod): tidy

* fix(go.mod): tidy

* fix(CLI): test_artifacts

* fix(go.mod): tidy

* fix(CLI): updated to use new typesUtil.ActorType

* fix(CLI): runtime based init

* fix(test_artifacts): fix

* fix(CLI): runtime using WithRandomPK()

* fix(CLI): fixed client-only initialization

* fix(Makefile): protogen first

* feat(Utility): GetActorName function (can we autogenerate these?)

* fix(RPC): test_artifacts in runtime

* fix(go.mod): tidy

* fix(CLI): debug commands are now feature flagged

* chore(go.mod): tidy

* chore(CLI): git rm app/pocket/rpc/client.gen.go

* chore(CLI): s/j/tx and s/prepareTx/prepareTxJson

* refactor(shared): converters

* fix(CLI): debug nits

* refactor(CLI): confirmation and credentials

* chore(CLI): removed HACK todo

* fix(Makefile): premature protoc

* fix(RPC): added imports used in codegen files

* docs(RPC): added swagger editor link

* fix(RPC): added imports used in codegen files

* feat(RPC): config proto

* feat(RPC): RPCModule and noopRpcModule

* refactor(Shared): shared.Create -> shared.CreateNode

* refactor(RPC): moved scaffolding into rpc module

* fix(RPC): removed redundant file

* fix(CLI): debug merge fix

* docs(RPC): fixed link after refactoring

* docs(RPC): updated code organization post refactoring

* Update app/client/cli/utils.go

Co-authored-by: Daniel Olshansky <[email protected]>

* fix(RPC): gitignoring generated files

* style(Persistence): reverting space change

* refactor(Defaults): runtime/defaults package

* chore(CLI): issue handle

* chore(CLI): Issue #310 links

* refactor(CLI): preallocation fix

* style(CLI): oneMillion

* style(CLI): s/RelayChainIDs/relayChainIDs

* feat(Utility): ActorType.GetName()

* chore(Utility): tracking issue #142

* chore(Utility): GetBytes -> GetCanonicalBytes

* chore(CLI): actorCmd -> accountCmd

* docs(CLI): fromAddr note (address currently sourced from pk)

* chore(Runtime): new default value from main

* refactor(CLI): moving utility functions in utils.go

* chore(CLI): NewDebug -> NewDebugCommand

* fix(RPC): gitignoring generated files

Signed-off-by: Alessandro De Blasis <[email protected]>

* refactor(Consensus): mocks with Return(nil) and not Do(...)

* docs(RPC): updated changelog versions

* fix(Makefile): generate_rpc_openapi

* fix(Makefile): fix for git clone + make develop_test

* Update rpc/v1/openapi.yaml

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/CHANGELOG.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/noop_module.go

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Shared): added TODOes for ValidateXXX() in modules

* docs(RPC): broadcast_tx_sync summary updated

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* fix(Makefile): gitignoring generated files breaks tests fix

* docs(CLI): added todos for exactArgs

* chore(RPC): added types.go

* refactor(RPC): sourcing defaults from defaults not test_artifacts

* feat(CLI): system commands RPC🤝CLI

* feat(Consensus): CurrentRound() and CurrentStep()

* feat(RPC): /v1/consensus/round_state

* feat(RPC): /v1/consensus/round_state handler

* feat(RPC): /v1/consensus/round_state

* refactor(CLI): system command typoes copypastas

* feat(CLI): consensus commands -RoundState and individual ones

* chore(CLI): typo

* docs(CLI): short commands descriptions

* docs(Config): Adding some more color around configuration

* fix(CLI): tx message signing

* feat(CLI): reporting statuscode and body

* fix(Proto): deterministic

* refactor(CLI): prepareTxJSON -> prepareTxBytes

* docs(Docs): Adding some more color config + raw_hex_bytes

* refactor(CLI): Stake command

* fix(CLI): tx message signing

* feat(CLI): reporting statuscode and body

* Merge branch 'issue/utility_local_proof_of_stake_cli_CLI' into issue/utility_local_proof_of_stake_cli

* feat(Tooling): swagger-ui

* feat(RPC): cors feature flag

* Update utility/types/message.go

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Runtime): comment spacing

* docs(CLI): Changelog

* docs(CLI): changelog

* docs(RPC): changelog

* chore(Runtime): comment spacing

* Update runtime/docs/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Consensus): SetBus mock Do(func(modules.Bus) {}) -> Return()

* refactor(Consensus): mocks with Return(nil) and not Do(...)

Signed-off-by: Alessandro De Blasis <[email protected]>

* chore(Consensus): SetBus mock Do(func(modules.Bus) {}) -> Return()

Signed-off-by: Alessandro De Blasis <[email protected]>

* docs(Pocket): changelog

* Update app/pocket/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update app/pocket/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* docs(RPC): changelog

* docs(RPC): docs TOC

* docs(RPC): Transports -> Endpoints

* feat(Tooling): swagger-ui

Signed-off-by: Alessandro De Blasis <[email protected]>

* docs(RPC): swagger ui link to editor and ref to make cmd

* feat(rpcServer): rpcServer is now IntegratableModule

* chore(Shared): tracking TODO (implement validations) #334

* fix(RPC): merge fix

* chore(go.mod): tidy

* chore(go.mod): tidy

* feat(Tooling): added empty mock_module package for cold start

* docs(RPC): nit

* Update app/client/cli/consensus.go

Co-authored-by: Daniel Olshansky <[email protected]>

* docs(CLI): better commands descriptions

* feat(CLI): boldText helper

* style(CLI): nit: real estate

* refactor(CLI): ConsensusState

* docs(CLI): updated docs

* docs(CLI): \n at the end of sentences in Stake command desc.

* docs(CLI): regenerated docs

* fix(RPC): int64 on RoundState fields

* refactor(Shared): unexporting XXModuleName

* feat(node): single source of truth for version + overridable

Signed-off-by: Alessandro De Blasis <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Repository owner moved this from In Review to Done in V1 Dashboard Nov 11, 2022
Olshansk added a commit that referenced this issue Nov 16, 2022
… (#176)

## Description

This PR introduces a simple RPC (JSONRPC) server that will be used to interact with the CLI and/or other clients

## Issue

Part of Issue #112 but we decided to split the work in 2 separate PRs

## Type of change

Please mark the options that are relevant.

- [x] New feature, functionality or library

## List of changes

- Updated node to start an RPC server if enabled via config

## Testing

- [x] `make test_all`
- [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README`

## Checklist

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] If applicable, I have made corresponding changes to related local or global README
- [x] If applicable, I have added new diagrams using [mermaid.js](https://mermaid-js.github.io)
- [x] If applicable, I have added tests that prove my fix is effective or that my feature works

* feat(RPC): scaffolding

Signed-off-by: Alessandro De Blasis <[email protected]>

* feat(RPC): scaffolding

* feat(RPC): scaffolding

Signed-off-by: Alessandro De Blasis <[email protected]>

* fix(RPC): updated config handling

* fix(config.proto): updated timeout type

* feat(RPC): basic RPC server with naive sync TX broadcast

* fix(RPC): fixed HTTP method for Health and Version routes

* style(RPC): format

* refactor(Utility): RPC server RoutesMap for CLI/client use

* refactor(Utility): RPC server exporting RouteKey and RoutesMap

for CLI/client use

* feat(Utility): RPC OpenApi spec and code generation

* refactor(Utility): RPC server refactoring using code generation

RPC server refactoring with code generation from openapi spec

* feat(Utility): Updated RPC spec

* feat(Utility): Regenerated RPC boilerplate and updates

* docs(Utility): RPC and node docs barebones + RPC spec notes

* refactor(Shared): RPC config defaults -changing soon,I'm centralizin

Signed-off-by: Alessandro De Blasis <[email protected]>

* fix(Utility): RPC: updated to use test_artifacts defaults

* docs(Utility): RPC and node basic docs

* chore(Utility): fixed versioning schema

* fix(Utility): RPC configs post-merge

* feat(Consensus): configOptions

* feat(P2P): configOptions

* fix(Utility): RPC fix post merge

* fix(Utility): RPC disabled by default because of TECHDEBT

* fix(RPC): test_artifacts in runtime

* fix(go.mod): tidy

* fix(RPC): added imports used in codegen files

* feat(RPC): config proto

* feat(RPC): RPCModule and noopRpcModule

* refactor(Shared): shared.Create -> shared.CreateNode

* docs(RPC): updated code organization post refactoring

* fix(RPC): gitignoring generated files

Signed-off-by: Alessandro De Blasis <[email protected]>

* refactor(Consensus): mocks with Return(nil) and not Do(...)

* docs(RPC): updated changelog versions

* fix(Makefile): generate_rpc_openapi

* fix(Makefile): fix for git clone + make develop_test

* Update rpc/v1/openapi.yaml

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/CHANGELOG.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/noop_module.go

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Shared): added TODOes for ValidateXXX() in modules

* docs(RPC): broadcast_tx_sync summary updated

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* fix(Makefile): gitignoring generated files breaks tests fix

* feat(Consensus): CurrentRound() and CurrentStep()

* feat(RPC): /v1/consensus/round_state

* feat(RPC): /v1/consensus/round_state handler

* docs(Docs): Adding some more color config + raw_hex_bytes

* chore(Runtime): comment spacing

* Update runtime/docs/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Consensus): SetBus mock Do(func(modules.Bus) {}) -> Return()

* docs(Pocket): changelog

* Update app/pocket/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update app/pocket/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* docs(RPC): changelog

* docs(RPC): docs TOC

* docs(RPC): Transports -> Endpoints

* feat(Tooling): swagger-ui

Signed-off-by: Alessandro De Blasis <[email protected]>

* docs(RPC): swagger ui link to editor and ref to make cmd

* feat(rpcServer): rpcServer is now IntegratableModule

* chore(Shared): tracking TODO (implement validations) #334

* fix(RPC): merge fix

* chore(go.mod): tidy

* docs(RPC): nit

* fix(RPC): int64 on RoundState fields

* refactor(Shared): unexporting XXModuleName

* feat(node): single source of truth for version + overridable

Signed-off-by: Alessandro De Blasis <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Olshansk added a commit that referenced this issue Nov 16, 2022
## Description
This PR aims at introducing CLI commands relative to the Utility module: 

- Send
- Stake
- EditStake
- Unstake
- Unpause
- ChangeParameter

Consequently, it introduces an RPC server (HTTP) and the ability to "point" the CLI at specific nodes via flags 

Fixes [issue/112](#112)

## Type of change
Please mark the options that are relevant.

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

- [x] `make test_all`
- [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md)

## Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] If applicable, I have made corresponding changes to related or global README
- [x] If applicable, I have added added new diagrams using [mermaid.js](https://mermaid-js.github.io)
- [x] If applicable, I have added tests that prove my fix is effective or that my feature works

* fix(config.proto): updated timeout type

* feat(RPC): basic RPC server with naive sync TX broadcast

* fix(RPC): fixed HTTP method for Health and Version routes

* chore(go.mod): tidy

* style(RPC): format

* chore(go.mod): tidy + vendor

* feat(Utility): CLI RPC client function

* feat(Utility): RPC defaults const

* feat(Utility): GetSignBytes

* feat(Utility): CLI utils

* feat(Utility): stake cmd scaffolding

* refactor(Utility): RPC server RoutesMap for CLI/client use

* refactor(Utility): RPC server exporting RouteKey and RoutesMap

for CLI/client use

* feat(Utility): CLI

calling updated QueryRPC to point at route from map

* refactor(Utility): RPC server exporting RouteKey and RoutesMap

for CLI/client use

* chore(Utility): Removed TODO

* fix(Utility): CLI: making use of the pwd flag

* fix(Utility): CLI: code review feedback

* fix(Utility): CLI custodial stake command: OutputAddr = fromAddr

* refactor(Utility): CLI: refactor command bindings

Also added missing functionality in commands other than Stake

* fix(Utility): Fix route after merge

* refactor(Utility): CLI: named return values fix

* test(Utility): CLI: simplified tests for PK parsing from file

* feat(Utility): RPC OpenApi spec and code generation

* refactor(Utility): RPC server refactoring using code generation

RPC server refactoring with code generation from openapi spec

* feat(Utility): RPC OpenApi spec and code generation

* feat(Utility): Updated RPC spec

* feat(Utility): Regenerated RPC boilerplate and updates

* docs(Utility): RPC and node docs barebones + RPC spec notes

* feat(Utility): Updated RPC spec

* docs(Utility): CLI docs barebones

* fix(Utility): CLI: added missing message handling for account

* fix(Shared): fixed RPC config

* feat(Utility): CLI updated to use the generated RPC client

* chore(go.mod): tidy

* refactor(Utility): CLI + RPC models in server.gen.go

* style(Utility): removed redundant struct definition

* docs(README.md): fixed LICENSE reference

* docs(README.md): updated with references to CLI, RPC and Node docs

* refactor(Shared): RPC config defaults -changing soon,I'm centralizin

* refactor(Shared): RPC config defaults -changing soon,I'm centralizin

Signed-off-by: Alessandro De Blasis <[email protected]>

* fix(Utility): RPC: updated to use test_artifacts defaults

* refactor(Shared): RPC config defaults -changing soon,I'm centralizin

* feat(Utility): CLI: updated to use test_artifacts default

* docs(Utility): RPC and node basic docs

* docs(Utility): CLI: Changelog

* fix(Utility): CLI: fixed output to user. It shouldn't be logging

* fix(Utility): CLI code review feedback

* style(Utility): code review feedback

* feat(Tooling): Updated makefile commands to better handle codegen

* feat(Tooling): Updated makefile commands to better handle codegen

Signed-off-by: Alessandro De Blasis <[email protected]>

* fix(Utility): Fix duplicated models

* chore(Utility): fixed versioning schema

* feat(Utility): CLI documentation generator + first stab at docs

* fix(Utility): CLI specific fixes

* fix(Utility): types fixes

* fix(Utility): RPC configs post-merge

* feat(Consensus): configOptions

* feat(P2P): configOptions

* feat(Utility): CLI: using configOptions to inject PK

* fix(Utility): RPC configs post-merge

* feat(Consensus): configOptions

* feat(P2P): configOptions

* fix(Utility): RPC fix post merge

* fix(Utility): RPC disabled by default because of TECHDEBT

* chore(go.mod): tidy

* fix(go.mod): tidy

* fix(CLI): test_artifacts

* fix(go.mod): tidy

* fix(CLI): updated to use new typesUtil.ActorType

* fix(CLI): runtime based init

* fix(test_artifacts): fix

* fix(CLI): runtime using WithRandomPK()

* fix(CLI): fixed client-only initialization

* fix(Makefile): protogen first

* feat(Utility): GetActorName function (can we autogenerate these?)

* fix(RPC): test_artifacts in runtime

* fix(go.mod): tidy

* fix(CLI): debug commands are now feature flagged

* chore(go.mod): tidy

* chore(CLI): git rm app/pocket/rpc/client.gen.go

* chore(CLI): s/j/tx and s/prepareTx/prepareTxJson

* refactor(shared): converters

* fix(CLI): debug nits

* refactor(CLI): confirmation and credentials

* chore(CLI): removed HACK todo

* fix(Makefile): premature protoc

* fix(RPC): added imports used in codegen files

* docs(RPC): added swagger editor link

* fix(RPC): added imports used in codegen files

* feat(RPC): config proto

* feat(RPC): RPCModule and noopRpcModule

* refactor(Shared): shared.Create -> shared.CreateNode

* refactor(RPC): moved scaffolding into rpc module

* fix(RPC): removed redundant file

* fix(CLI): debug merge fix

* docs(RPC): fixed link after refactoring

* docs(RPC): updated code organization post refactoring

* Update app/client/cli/utils.go

Co-authored-by: Daniel Olshansky <[email protected]>

* fix(RPC): gitignoring generated files

* style(Persistence): reverting space change

* refactor(Defaults): runtime/defaults package

* chore(CLI): issue handle

* chore(CLI): Issue #310 links

* refactor(CLI): preallocation fix

* style(CLI): oneMillion

* style(CLI): s/RelayChainIDs/relayChainIDs

* feat(Utility): ActorType.GetName()

* chore(Utility): tracking issue #142

* chore(Utility): GetBytes -> GetCanonicalBytes

* chore(CLI): actorCmd -> accountCmd

* docs(CLI): fromAddr note (address currently sourced from pk)

* chore(Runtime): new default value from main

* refactor(CLI): moving utility functions in utils.go

* chore(CLI): NewDebug -> NewDebugCommand

* fix(RPC): gitignoring generated files

Signed-off-by: Alessandro De Blasis <[email protected]>

* refactor(Consensus): mocks with Return(nil) and not Do(...)

* docs(RPC): updated changelog versions

* fix(Makefile): generate_rpc_openapi

* fix(Makefile): fix for git clone + make develop_test

* Update rpc/v1/openapi.yaml

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/CHANGELOG.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/noop_module.go

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Shared): added TODOes for ValidateXXX() in modules

* docs(RPC): broadcast_tx_sync summary updated

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update rpc/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* fix(Makefile): gitignoring generated files breaks tests fix

* docs(CLI): added todos for exactArgs

* chore(RPC): added types.go

* refactor(RPC): sourcing defaults from defaults not test_artifacts

* feat(CLI): system commands RPC🤝CLI

* feat(Consensus): CurrentRound() and CurrentStep()

* feat(RPC): /v1/consensus/round_state

* feat(RPC): /v1/consensus/round_state handler

* feat(RPC): /v1/consensus/round_state

* refactor(CLI): system command typoes copypastas

* feat(CLI): consensus commands -RoundState and individual ones

* chore(CLI): typo

* docs(CLI): short commands descriptions

* docs(Config): Adding some more color around configuration

* fix(CLI): tx message signing

* feat(CLI): reporting statuscode and body

* fix(Proto): deterministic

* refactor(CLI): prepareTxJSON -> prepareTxBytes

* docs(Docs): Adding some more color config + raw_hex_bytes

* refactor(CLI): Stake command

* fix(CLI): tx message signing

* feat(CLI): reporting statuscode and body

* Merge branch 'issue/utility_local_proof_of_stake_cli_CLI' into issue/utility_local_proof_of_stake_cli

* feat(Tooling): swagger-ui

* feat(RPC): cors feature flag

* Update utility/types/message.go

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Runtime): comment spacing

* docs(CLI): Changelog

* docs(CLI): changelog

* docs(RPC): changelog

* chore(Runtime): comment spacing

* Update runtime/docs/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* chore(Consensus): SetBus mock Do(func(modules.Bus) {}) -> Return()

* refactor(Consensus): mocks with Return(nil) and not Do(...)

Signed-off-by: Alessandro De Blasis <[email protected]>

* chore(Consensus): SetBus mock Do(func(modules.Bus) {}) -> Return()

Signed-off-by: Alessandro De Blasis <[email protected]>

* docs(Pocket): changelog

* Update app/pocket/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* Update app/pocket/doc/README.md

Co-authored-by: Daniel Olshansky <[email protected]>

* docs(RPC): changelog

* docs(RPC): docs TOC

* docs(RPC): Transports -> Endpoints

* feat(Tooling): swagger-ui

Signed-off-by: Alessandro De Blasis <[email protected]>

* docs(RPC): swagger ui link to editor and ref to make cmd

* feat(rpcServer): rpcServer is now IntegratableModule

* chore(Shared): tracking TODO (implement validations) #334

* fix(RPC): merge fix

* chore(go.mod): tidy

* chore(go.mod): tidy

* feat(Tooling): added empty mock_module package for cold start

* docs(RPC): nit

* Update app/client/cli/consensus.go

Co-authored-by: Daniel Olshansky <[email protected]>

* docs(CLI): better commands descriptions

* feat(CLI): boldText helper

* style(CLI): nit: real estate

* refactor(CLI): ConsensusState

* docs(CLI): updated docs

* docs(CLI): \n at the end of sentences in Stake command desc.

* docs(CLI): regenerated docs

* fix(RPC): int64 on RoundState fields

* refactor(Shared): unexporting XXModuleName

* feat(node): single source of truth for version + overridable

Signed-off-by: Alessandro De Blasis <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client work needed to interface with the node (rpc, cli, etc..) core Core infrastructure - protocol related utility Utility specific changes
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants