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

Implement client commands of Massa API endpoints - [merged] #1609

Closed
massa-bot opened this issue Nov 14, 2021 · 65 comments
Closed

Implement client commands of Massa API endpoints - [merged] #1609

massa-bot opened this issue Nov 14, 2021 · 65 comments

Comments

@massa-bot
Copy link

In GitLab by @AureliaDolo

Merges 293-implement-client-commands -> dev

Closes #293

@massa-bot
Copy link
Author

In GitLab by @AureliaDolo

assigned to @Adolo

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 5 commits

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

assigned to @yvan-sraka

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 2 commits

  • 779be230 - Fix `unban` arguments taken in `api-private` in intend to be serializable by `jsonrpc-core-client`
  • 31018561 - Implement JSON-RPC client methods of Massa Private API endpoints

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 1 commit

  • 29ebaf7b - WIP ...

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 1 commit

  • 42b1cbdc - Implement Commands of Massa `private-api` in the client (and performs btw few refactoring)

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

marked this merge request as ready

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

unassigned @Adolo

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

requested review from @Adolo and @damip

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

changed title from {-Resolve "-}Implement client commands{-"-} to Implement client commands{+ of Massa API endpoints+}

@massa-bot
Copy link
Author

In GitLab by @AureliaDolo

Commented on api-private/src/lib.rs line 174

Why ?

@massa-bot
Copy link
Author

In GitLab by @AureliaDolo

Commented on rpc-client/src/cmds.rs line 201

We don't have confirmation from the node that the ip was unbanned, only that the node received the message ?

@massa-bot
Copy link
Author

In GitLab by @AureliaDolo

Commented on rpc-client/src/cmds.rs line 209

Same here, we don't have confirmation that the ip is indeed banned

@massa-bot
Copy link
Author

In GitLab by @AureliaDolo

Commented on rpc-client/src/cmds.rs line 221

Same issue with confirmation

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on api-private/src/lib.rs line 174

Because I guess that now the semantic of the API call is to unban a list of IPs? I could also do a map and not stop on the first failure you're right.

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 201

So, hum ... you right I can change the output message to "Request of unbanning successfully sent"? And we could think about a new API call to get the list of banned IPs?

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 221

Maybe here we can check if (if that's the client that launched the Massa-node bin) if we detect that the forked process terminated? But this does not apply to remote that the client has not started ...

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on rpc-client/src/cmds.rs line 201

I think that just confirming that the request was sent is OK for now

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on rpc-client/src/cmds.rs line 221

the client can also perform regular pings/healthchecks... on a purpose-build API endpoint

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 221

that's true, we have to design that (in a follow-up issue ?)

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on api-private/src/lib.rs line 174

changed this line in version 4 of the diff

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 201

changed this line in version 4 of the diff

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 209

changed this line in version 4 of the diff

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 221

changed this line in version 4 of the diff

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 1 commit

  • c19b6312 - Implement Commands of Massa `private-api` in the client (and performs btw few refactoring)

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 1 commit

  • 040a4386 - Implement Commands of Massa `private-api` in the client (and performs btw few refactoring)

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 6 commits

  • 040a4386...ccd83627 - 3 commits from branch dev
  • 4758568f - Fix `unban` arguments taken in `api-private` in intend to be serializable by `jsonrpc-core-client`
  • 7c7b5024 - Implement JSON-RPC client methods of Massa Private API endpoints
  • c792b423 - Implement Commands of Massa `private-api` in the client (and performs btw few refactoring)

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

marked this merge request as draft

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on .direnv/drv line 1

what's this ?

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on .direnv/cache-pre320334.82155ff501c line 1

urgh

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on .direnv/drv line 1

sorry I really lack of https://gitlab.com/massalabs/massa/-/merge_requests/164

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on .direnv/cache-pre320334.82155ff501c line 1

changed this line in version 9 of the diff

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on .direnv/drv line 1

changed this line in version 9 of the diff

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 1 commit

  • 660c239e - Implement Commands of Massa `public-api` in the client

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on rpc-client/src/cmds.rs line 215

should be started detached, so that when we close the client, it doesn't close the node

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 215

Right!

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on rpc-client/src/main.rs line 71

Guidelines say: no leading uppercase letter, and no punctuation at the end for error messages.

https://doc.rust-lang.org/std/error/trait.Error.html

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 215

I guess the right way of doing it is https://stackoverflow.com/a/53478775/2879157

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/main.rs line 71

Thanks, I was not aware of that!

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on rpc-client/src/cmds.rs line 215

needs to be portable

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 215

grrr ... that's true, hmm ... Command::detach was removed from std::process API rust-lang/rust#17176 so I guess something like https://docs.rs/fork/ will do the job :)

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on rpc-client/src/cmds.rs line 215

yeah we can try. Ideally we need a mechanism to avoid starting 2 instances by mistake

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 215

Euhm like a mutex? We could check out if there is a process massa-node already running, an implementation could be massa-node that creates an empty lock file that the client could detect?

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on rpc-client/src/cmds.rs line 215

Or a healthcheck API endpoint, I'm not sure...

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 215

So we authorize, on the same machine, running two nodes with different ports? or we try to forbid that?

Maybe it's a good (soft) security protection to say that one machine == one node (unless we deploy several parallel Massa-based networks)

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 215

Do we postpone this study/discussion in a follow-up issue?

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/main.rs line 71

changed this line in version 10 of the diff

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 11 commits

  • 660c239e...f56cb680 - 7 commits from branch dev
  • 2bb2e3bc - Fix `unban` arguments taken in `api-private` in intend to be serializable by `jsonrpc-core-client`
  • af470717 - Implement JSON-RPC client methods of Massa Private API endpoints
  • e0aaf74e - Implement Commands of Massa `private-api` in the client (and performs btw few refactoring)
  • 5b4da3ea - Implement Commands of Massa `public-api` in the client

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on rpc-client/src/cmds.rs line 215

yes, maybe remove this command for now from the client so that we can merge and do a clean followup to add it

@massa-bot
Copy link
Author

In GitLab by @damip

Commented on rpc-client/src/cmds.rs line 221

yeah let's do it in a followup

@massa-bot
Copy link
Author

In GitLab by @damip

There are multiple "Failed to serialized command output.". Let's correct the grammar and the formatting everywhere :)

"failed to serialize command output"

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

Commented on rpc-client/src/cmds.rs line 215

changed this line in version 11 of the diff

@massa-bot
Copy link
Author

In GitLab by @yvan-sraka

added 6 commits

  • 5b4da3ea...91e526b0 - 2 commits from branch dev
  • 023677e - Fix `unban` arguments taken in `api-private` in intend to be serializable by `jsonrpc-core-client`
  • 05d1125 - Implement JSON-RPC client methods of Massa Private API endpoints
  • 008f769 - Implement Commands of Massa `private-api` in the client (and performs btw few refactoring)
  • 08c225a - Implement Commands of Massa `public-api` in the client

Compare with previous version

@massa-bot
Copy link
Author

In GitLab by @damip

approved this merge request

@massa-bot
Copy link
Author

In GitLab by @damip

enabled an automatic merge when the pipeline for 08c225a succeeds

@massa-bot
Copy link
Author

In GitLab by @damip

mentioned in commit a859773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant