-
Notifications
You must be signed in to change notification settings - Fork 531
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
CLI refactor #410
CLI refactor #410
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the global params
variable in each params.go file (which we should discuss), everything else seems well encapsulated. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass, common commands confirmed working, backwards compatibility is also 👌
I have one issue while testing, I cannot start server with default values for arguments:
$ go run main.go server
failed to parse addr 'http://127.0.0.1:8545': address http://127.0.0.1:8545: too many colons in address
exit status 1
Please take a look at this and address my comments in the code review, thanks for the extra effort on this PR 🙏
Resolved the problem with the default address, turns out it was just the default value set incorrectly to include the protocol name: |
@zivkovicmilos thanks for fixing the comments, and sorry for bugging you about the dev & dummy consensus - i’ve misunderstood your additional comments section :) merging this |
Description
This PR features a complete rewrite of the CLI module in Polygon Edge, the simplification of command additions and the pruning of several now useless packages:
The new CLI implementation is based on Cobra
Changes include
Checklist
Testing
Manual tests
The changes have been tested mostly through the e2e test suite that we have baked in, but also by following the official documentation and checking out different command flows.
Documentation update
Relevant Docs PR
Additional comments
Fixes EDGE-44
CLI changes
The following flags have been renamed:
genesis
chainid
chain-id
server
grpc
grpc-address
Dropped commands
dev
The helpful dev command has been dropped for now, and it's reintroduction should be a part of a smaller task in the future.
New tasks
During the refactor of the CLI module, several places for improvement have been spotted.
Dropping the
--seal
concept from Polygon EdgeExplained in detail in E-394
Adding unit tests
Explained in detail in E-397
Generating CLI docs
Explained in detail in E-398